Forms: Apply Google Javascript naming rules to 'ColorSuggestionPicker',
'ListPicker', 'MonthPicker', 'Picker' and 'SuggestionPicker' classes
This CL has no behavior changes.
Bug: 981231
Change-Id: I3c5bf4bff88f5ce4215179f0961d1025a45434e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3552026
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Jihwan Kim <bluewhale.marc@gmail.com>
Cr-Commit-Position: refs/heads/main@{#986387}
diff --git a/third_party/blink/renderer/core/html/forms/resources/color_suggestion_picker.js b/third_party/blink/renderer/core/html/forms/resources/color_suggestion_picker.js
index d355152..802251cb 100644
--- a/third_party/blink/renderer/core/html/forms/resources/color_suggestion_picker.js
+++ b/third_party/blink/renderer/core/html/forms/resources/color_suggestion_picker.js
@@ -52,105 +52,106 @@
class ColorSuggestionPicker extends Picker {
constructor(element, config) {
super(element, config);
- if (this._config.values.length === 0)
- this._config.values = DefaultColorPalette;
- this._container = null;
- this._layout();
- document.body.addEventListener('keydown', this._handleKeyDown.bind(this));
- this._element.addEventListener(
- 'mousemove', this._handleMouseMove.bind(this));
- this._element.addEventListener(
- 'mousedown', this._handleMouseDown.bind(this));
+ if (this.config_.values.length === 0)
+ this.config_.values = DefaultColorPalette;
+ this.container_ = null;
+ this.layout_();
+ document.body.addEventListener('keydown', this.handleKeyDown_.bind(this));
+ this.element_.addEventListener(
+ 'mousemove', this.handleMouseMove_.bind(this));
+ this.element_.addEventListener(
+ 'mousedown', this.handleMouseDown_.bind(this));
}
- get _ColorSwatchWidth() {
+ get getColorSwatchWidth_() {
return Number(window.getComputedStyle(document.body)
.getPropertyValue('--color-swatch-width')
.replace('px', ''));
}
- get _ColorSwatchHeight() {
+ get getColorSwatchHeight_() {
return Number(window.getComputedStyle(document.body)
.getPropertyValue('--color-swatch-height')
.replace('px', ''));
}
- get _ColorSwatchPadding() {
+ get getColorSwatchPadding_() {
return Number(window.getComputedStyle(document.body)
.getPropertyValue('--color-swatch-padding')
.replace('px', ''));
}
- get _ColorSwatchBorderWidth() {
+ get getColorSwatchBorderWidth_() {
return Number(window.getComputedStyle(document.body)
.getPropertyValue('--color-swatch-border-width')
.replace('px', ''));
}
- get _ColorSwatchMargin() {
+ get getColorSwatchMargin_() {
return Number(window.getComputedStyle(document.body)
.getPropertyValue('--color-swatch-margin')
.replace('px', ''));
}
- get SwatchBorderBoxWidth() {
+ get getSwatchBorderBoxWidth() {
return (
- this._ColorSwatchWidth + this._ColorSwatchPadding * 2 +
- this._ColorSwatchBorderWidth * 2 + this._ColorSwatchMargin * 2);
+ this.getColorSwatchWidth_ + this.getColorSwatchPadding_ * 2 +
+ this.getColorSwatchBorderWidth_ * 2 + this.getColorSwatchMargin_ * 2);
}
- get SwatchBorderBoxHeight() {
+ get getSwatchBorderBoxHeight() {
return (
- this._ColorSwatchHeight + this._ColorSwatchPadding * 2 +
- this._ColorSwatchBorderWidth * 2 + this._ColorSwatchMargin * 2);
+ this.getColorSwatchHeight_ + this.getColorSwatchPadding_ * 2 +
+ this.getColorSwatchBorderWidth_ * 2 + this.getColorSwatchMargin_ * 2);
}
- get SwatchesPerRow() {
+ get getSwatchesPerRow() {
return 5;
}
- get SwatchesMaxRow() {
+ get getSwatchesMaxRow() {
return 3;
}
- get ScrollbarWidth() {
+ get getScrollbarWidth() {
return Number(window.getComputedStyle(document.body)
.getPropertyValue('--scrollbar-width')
.replace('px', ''));
}
- _layout() {
+ layout_() {
const container = createElement('div', 'color-swatch-container');
container.addEventListener(
- 'click', this._handleSwatchClick.bind(this), false);
- for (let i = 0; i < this._config.values.length; ++i) {
+ 'click', this.handleSwatchClick_.bind(this), false);
+ for (let i = 0; i < this.config_.values.length; ++i) {
const swatch = createElement('button', 'color-swatch');
swatch.dataset.index = i;
- swatch.dataset.value = this._config.values[i];
- swatch.title = this._config.values[i];
- swatch.style.backgroundColor = this._config.values[i];
+ swatch.dataset.value = this.config_.values[i];
+ swatch.title = this.config_.values[i];
+ swatch.style.backgroundColor = this.config_.values[i];
container.appendChild(swatch);
}
- let containerWidth = this.SwatchBorderBoxWidth * this.SwatchesPerRow;
- if (this._config.values.length > this.SwatchesPerRow * this.SwatchesMaxRow)
- containerWidth += this.ScrollbarWidth;
+ let containerWidth = this.getSwatchBorderBoxWidth * this.getSwatchesPerRow;
+ if (this.config_.values.length >
+ this.getSwatchesPerRow * this.getSwatchesMaxRow)
+ containerWidth += this.getScrollbarWidth;
container.style.width = containerWidth + 'px';
container.style.maxHeight =
- this.SwatchBorderBoxHeight * this.SwatchesMaxRow + 'px';
- this._element.appendChild(container);
+ this.getSwatchBorderBoxHeight* this.getSwatchesMaxRow + 'px';
+ this.element_.appendChild(container);
const otherButton =
- createElement('button', 'other-color', this._config.otherColorLabel);
+ createElement('button', 'other-color', this.config_.otherColorLabel);
otherButton.addEventListener(
- 'click', this._onOtherButtonClick.bind(this), false);
- this._element.appendChild(otherButton);
- this._container = container;
- this._otherButton = otherButton;
- const elementWidth = this._element.offsetWidth;
- const elementHeight = this._element.offsetHeight;
+ 'click', this.onOtherButtonClick_.bind(this), false);
+ this.element_.appendChild(otherButton);
+ this.container_ = container;
+ this.otherButton_ = otherButton;
+ const elementWidth = this.element_.offsetWidth;
+ const elementHeight = this.element_.offsetHeight;
resizeWindow(elementWidth, elementHeight);
}
- _onOtherButtonClick() {
+ onOtherButtonClick_() {
const main = $('main');
main.innerHTML = '';
main.classList.remove('color-suggestion-picker-main');
@@ -162,23 +163,23 @@
initializeColorPicker();
}
- selectColorAtIndex(index) {
- index = Math.max(Math.min(this._container.childNodes.length - 1, index), 0);
- this._container.childNodes[index].focus();
+ selectColorAtIndex_(index) {
+ index = Math.max(Math.min(this.container_.childNodes.length - 1, index), 0);
+ this.container_.childNodes[index].focus();
}
- _handleMouseMove(event) {
+ handleMouseMove_(event) {
if (event.target.classList.contains('color-swatch'))
event.target.focus();
}
- _handleMouseDown(event) {
+ handleMouseDown_(event) {
// Prevent blur.
if (event.target.classList.contains('color-swatch'))
event.preventDefault();
}
- _handleKeyDown(event) {
+ handleKeyDown_(event) {
const key = event.key;
if (key === 'Escape')
this.handleCancel();
@@ -190,7 +191,7 @@
if (selectedElement.classList.contains('other-color')) {
if (key != 'ArrowRight' && key != 'ArrowUp')
return;
- index = this._container.childNodes.length - 1;
+ index = this.container_.childNodes.length - 1;
} else if (selectedElement.classList.contains('color-swatch')) {
index = parseInt(selectedElement.dataset.index, 10);
switch (key) {
@@ -201,23 +202,23 @@
index++;
break;
case 'ArrowUp':
- index -= this.SwatchesPerRow;
+ index -= this.getSwatchesPerRow;
break;
case 'ArrowDown':
- index += this.SwatchesPerRow;
+ index += this.getSwatchesPerRow;
break;
}
- if (index > this._container.childNodes.length - 1) {
- this._otherButton.focus();
+ if (index > this.container_.childNodes.length - 1) {
+ this.otherButton_.focus();
return;
}
}
- this.selectColorAtIndex(index);
+ this.selectColorAtIndex_(index);
}
event.preventDefault();
}
- _handleSwatchClick(event) {
+ handleSwatchClick_(event) {
if (event.target.classList.contains('color-swatch'))
this.submitValue(event.target.dataset.value);
}
diff --git a/third_party/blink/renderer/core/html/forms/resources/list_picker.js b/third_party/blink/renderer/core/html/forms/resources/list_picker.js
index a38a7ad..c0f3566 100644
--- a/third_party/blink/renderer/core/html/forms/resources/list_picker.js
+++ b/third_party/blink/renderer/core/html/forms/resources/list_picker.js
@@ -37,67 +37,67 @@
*/
constructor(element, config) {
super(element, config);
- this._selectElement = createElement('select');
- this._selectElement.size = 20;
- this._element.appendChild(this._selectElement);
- this._delayedChildrenConfig = null;
- this._delayedChildrenConfigIndex = 0;
- this._layout();
- this._selectElement.addEventListener(
- 'mouseup', this._handleMouseUp.bind(this));
- this._selectElement.addEventListener(
- 'touchstart', this._handleTouchStart.bind(this));
- this._selectElement.addEventListener(
- 'keydown', this._handleKeyDown.bind(this));
- this._selectElement.addEventListener(
- 'change', this._handleChange.bind(this));
- window.addEventListener('message', this._handleWindowMessage.bind(this));
+ this.selectElement_ = createElement('select');
+ this.selectElement_.size = 20;
+ this.element_.appendChild(this.selectElement_);
+ this.delayedChildrenConfig_ = null;
+ this.delayedChildrenConfigIndex = 0;
+ this.layout_();
+ this.selectElement_.addEventListener(
+ 'mouseup', this.handleMouseUp_.bind(this));
+ this.selectElement_.addEventListener(
+ 'touchstart', this.handleTouchStart_.bind(this));
+ this.selectElement_.addEventListener(
+ 'keydown', this.handleKeyDown_.bind(this));
+ this.selectElement_.addEventListener(
+ 'change', this.handleChange_.bind(this));
+ window.addEventListener('message', this.handleWindowMessage_.bind(this));
window.addEventListener(
- 'mousemove', this._handleWindowMouseMove.bind(this));
+ 'mousemove', this.handleWindowMouseMove_.bind(this));
window.addEventListener(
- 'mouseover', this._handleWindowMouseOver.bind(this));
- this._handleWindowTouchMoveBound = this._handleWindowTouchMove.bind(this);
- this._handleWindowTouchEndBound = this._handleWindowTouchEnd.bind(this);
- this._handleTouchSelectModeScrollBound =
- this._handleTouchSelectModeScroll.bind(this);
- this.lastMousePositionX = Infinity;
- this.lastMousePositionY = Infinity;
- this._selectionSetByMouseHover = false;
+ 'mouseover', this.handleWindowMouseOver_.bind(this));
+ this.handleWindowTouchMoveBound_ = this.handleWindowTouchMove_.bind(this);
+ this.handleWindowTouchEndBound_ = this.handleWindowTouchEnd_.bind(this);
+ this.handleTouchSelectModeScrollBound_ =
+ this.handleTouchSelectModeScroll_.bind(this);
+ this.lastMousePositionX_ = Infinity;
+ this.lastMousePositionY_ = Infinity;
+ this.selectionSetByMouseHover_ = false;
- this._trackingTouchId = null;
+ this.trackingTouchId_ = null;
- this._handleWindowDidHide();
- this._selectElement.focus();
- this._selectElement.value = this._config.selectedIndex;
+ this.handleWindowDidHide_();
+ this.selectElement_.focus();
+ this.selectElement_.value = this.config_.selectedIndex;
}
- _handleWindowDidHide() {
- this._fixWindowSize();
+ handleWindowDidHide_() {
+ this.fixWindowSize_();
const selectedOption =
- this._selectElement.options[this._selectElement.selectedIndex];
+ this.selectElement_.options[this.selectElement_.selectedIndex];
if (selectedOption)
selectedOption.scrollIntoView(false);
- window.removeEventListener('didHide', this._handleWindowDidHideBound);
+ window.removeEventListener('didHide', this.handleWindowDidHideBound_);
}
- _handleWindowMessage(event) {
+ handleWindowMessage_(event) {
eval(event.data);
if (window.updateData.type === 'update') {
- this._config.baseStyle = window.updateData.baseStyle;
- this._config.children = window.updateData.children;
- const prev_children_count = this._selectElement.children.length;
- this._update();
- if (this._config.anchorRectInScreen.x !==
+ this.config_.baseStyle = window.updateData.baseStyle;
+ this.config_.children = window.updateData.children;
+ const prevChildrenCount = this.selectElement_.children.length;
+ this.update_();
+ if (this.config_.anchorRectInScreen.x !==
window.updateData.anchorRectInScreen.x ||
- this._config.anchorRectInScreen.y !==
+ this.config_.anchorRectInScreen.y !==
window.updateData.anchorRectInScreen.y ||
- this._config.anchorRectInScreen.width !==
+ this.config_.anchorRectInScreen.width !==
window.updateData.anchorRectInScreen.width ||
- this._config.anchorRectInScreen.height !==
+ this.config_.anchorRectInScreen.height !==
window.updateData.anchorRectInScreen.height ||
- prev_children_count !== window.updateData.children.length) {
- this._config.anchorRectInScreen = window.updateData.anchorRectInScreen;
- this._fixWindowSize();
+ prevChildrenCount !== window.updateData.children.length) {
+ this.config_.anchorRectInScreen = window.updateData.anchorRectInScreen;
+ this.fixWindowSize_();
}
}
delete window.updateData;
@@ -105,12 +105,12 @@
// This should be matched to the border width of the internal listbox
// SELECT. See list_picker.css and html.css.
- static ListboxSelectBorder = 1;
+ static LISTBOX_SELECT_BORDER = 1;
- _handleWindowMouseMove(event) {
- const visibleTop = ListPicker.ListboxSelectBorder;
+ handleWindowMouseMove_(event) {
+ const visibleTop = ListPicker.LISTBOX_SELECT_BORDER;
const visibleBottom =
- this._selectElement.offsetHeight - ListPicker.ListboxSelectBorder;
+ this.selectElement_.offsetHeight - ListPicker.LISTBOX_SELECT_BORDER;
const optionBounds = event.target.getBoundingClientRect();
if (optionBounds.height >= 1.0) {
// If the height of the visible part of event.target is less than 1px,
@@ -123,77 +123,77 @@
return;
}
}
- this.lastMousePositionX = event.clientX;
- this.lastMousePositionY = event.clientY;
- this._selectionSetByMouseHover = true;
+ this.lastMousePositionX_ = event.clientX;
+ this.lastMousePositionY_ = event.clientY;
+ this.selectionSetByMouseHover_ = true;
// Prevent the select element from firing change events for mouse input.
event.preventDefault();
}
- _handleWindowMouseOver(event) {
- this._highlightOption(event.target);
+ handleWindowMouseOver_(event) {
+ this.highlightOption_(event.target);
}
- _handleMouseUp(event) {
+ handleMouseUp_(event) {
if (event.target.tagName !== 'OPTION')
return;
window.pagePopupController.setValueAndClosePopup(
- 0, this._selectElement.value);
+ 0, this.selectElement_.value);
}
- _handleTouchStart(event) {
- if (this._trackingTouchId !== null)
+ handleTouchStart_(event) {
+ if (this.trackingTouchId_ !== null)
return;
// Enter touch select mode. In touch select mode the highlight follows the
// finger and on touchend the highlighted item is selected.
const touch = event.touches[0];
- this._trackingTouchId = touch.identifier;
- this._highlightOption(touch.target);
- this._selectionSetByMouseHover = false;
- this._selectElement.addEventListener(
- 'scroll', this._handleTouchSelectModeScrollBound);
- window.addEventListener('touchmove', this._handleWindowTouchMoveBound);
- window.addEventListener('touchend', this._handleWindowTouchEndBound);
+ this.trackingTouchId_ = touch.identifier;
+ this.highlightOption_(touch.target);
+ this.selectionSetByMouseHover_ = false;
+ this.selectElement_.addEventListener(
+ 'scroll', this.handleTouchSelectModeScrollBound_);
+ window.addEventListener('touchmove', this.handleWindowTouchMoveBound_);
+ window.addEventListener('touchend', this.handleWindowTouchEndBound_);
}
- _handleTouchSelectModeScroll(event) {
- this._exitTouchSelectMode();
+ handleTouchSelectModeScroll_(event) {
+ this.exitTouchSelectMode_();
}
- _exitTouchSelectMode(event) {
- this._trackingTouchId = null;
- this._selectElement.removeEventListener(
- 'scroll', this._handleTouchSelectModeScrollBound);
- window.removeEventListener('touchmove', this._handleWindowTouchMoveBound);
- window.removeEventListener('touchend', this._handleWindowTouchEndBound);
+ exitTouchSelectMode_(event) {
+ this.trackingTouchId_ = null;
+ this.selectElement_.removeEventListener(
+ 'scroll', this.handleTouchSelectModeScrollBound_);
+ window.removeEventListener('touchmove', this.handleWindowTouchMoveBound_);
+ window.removeEventListener('touchend', this.handleWindowTouchEndBound_);
}
- _handleWindowTouchMove(event) {
- if (this._trackingTouchId === null)
+ handleWindowTouchMove_(event) {
+ if (this.trackingTouchId_ === null)
return;
- const touch = this._getTouchForId(event.touches, this._trackingTouchId);
+ const touch = this.getTouchForId_(event.touches, this.trackingTouchId_);
if (!touch)
return;
- this._highlightOption(
+ this.highlightOption_(
document.elementFromPoint(touch.clientX, touch.clientY));
- this._selectionSetByMouseHover = false;
+ this.selectionSetByMouseHover_ = false;
}
- _handleWindowTouchEnd(event) {
- if (this._trackingTouchId === null)
+ handleWindowTouchEnd_(event) {
+ if (this.trackingTouchId_ === null)
return;
const touch =
- this._getTouchForId(event.changedTouches, this._trackingTouchId);
+ this.getTouchForId_(event.changedTouches, this.trackingTouchId_);
if (!touch)
return;
const target = document.elementFromPoint(touch.clientX, touch.clientY);
if (target.tagName === 'OPTION' && !target.disabled)
window.pagePopupController.setValueAndClosePopup(
- 0, this._selectElement.value);
- this._exitTouchSelectMode();
+ 0, this.selectElement_.value);
+ this.exitTouchSelectMode_();
}
- _getTouchForId(touchList, id) {
+ getTouchForId_(touchList, id) {
for (let i = 0; i < touchList.length; i++) {
if (touchList[i].identifier === id)
return touchList[i];
@@ -201,29 +201,29 @@
return null;
}
- _highlightOption(target) {
+ highlightOption_(target) {
if (target.tagName !== 'OPTION' || target.selected || target.disabled)
return;
- const savedScrollTop = this._selectElement.scrollTop;
+ const savedScrollTop = this.selectElement_.scrollTop;
// TODO(tkent): Updating HTMLOptionElement::selected is not efficient. We
// should optimize it, or use an alternative way.
target.selected = true;
- this._selectElement.scrollTop = savedScrollTop;
+ this.selectElement_.scrollTop = savedScrollTop;
}
- _handleChange(event) {
- window.pagePopupController.setValue(this._selectElement.value);
- this._selectionSetByMouseHover = false;
+ handleChange_(event) {
+ window.pagePopupController.setValue(this.selectElement_.value);
+ this.selectionSetByMouseHover_ = false;
}
- _handleKeyDown(event) {
+ handleKeyDown_(event) {
const key = event.key;
if (key === 'Escape') {
window.pagePopupController.closePopup();
event.preventDefault();
} else if (key === 'Tab' || key === 'Enter') {
window.pagePopupController.setValueAndClosePopup(
- 0, this._selectElement.value);
+ 0, this.selectElement_.value);
event.preventDefault();
} else if (event.altKey && (key === 'ArrowDown' || key === 'ArrowUp')) {
// We need to add a delay here because, if we do it immediately the key
@@ -236,19 +236,19 @@
}
}
- _fixWindowSize() {
- this._selectElement.style.height = '';
- const scale = this._config.scaleFactor;
- const maxHeight = this._selectElement.offsetHeight;
+ fixWindowSize_() {
+ this.selectElement_.style.height = '';
+ const scale = this.config_.scaleFactor;
+ const maxHeight = this.selectElement_.offsetHeight;
const noScrollHeight =
- (this._calculateScrollHeight() + ListPicker.ListboxSelectBorder * 2);
+ (this.calculateScrollHeight_() + ListPicker.LISTBOX_SELECT_BORDER * 2);
const scrollbarWidth = getScrollbarWidth();
- const elementOffsetWidth = this._selectElement.offsetWidth;
+ const elementOffsetWidth = this.selectElement_.offsetWidth;
let desiredWindowHeight = noScrollHeight;
let desiredWindowWidth = elementOffsetWidth;
// If we already have a vertical scrollbar, subtract it out, it will get
// re-added below.
- if (this._selectElement.scrollHeight > this._selectElement.clientHeight)
+ if (this.selectElement_.scrollHeight > this.selectElement_.clientHeight)
desiredWindowWidth -= scrollbarWidth;
let expectingScrollbar = false;
if (desiredWindowHeight > maxHeight) {
@@ -260,7 +260,7 @@
}
// Screen coordinate for anchorRectInScreen and windowRect is DIP.
desiredWindowWidth = Math.max(
- this._config.anchorRectInScreen.width * scale, desiredWindowWidth);
+ this.config_.anchorRectInScreen.width * scale, desiredWindowWidth);
let windowRect = adjustWindowRect(
desiredWindowWidth / scale, desiredWindowHeight / scale,
elementOffsetWidth / scale, 0);
@@ -272,20 +272,20 @@
desiredWindowWidth / scale, windowRect.height, windowRect.width,
windowRect.height);
}
- this._selectElement.style.width = (windowRect.width * scale) + 'px';
- this._selectElement.style.height = (windowRect.height * scale) + 'px';
- this._element.style.height = (windowRect.height * scale) + 'px';
+ this.selectElement_.style.width = (windowRect.width * scale) + 'px';
+ this.selectElement_.style.height = (windowRect.height * scale) + 'px';
+ this.element_.style.height = (windowRect.height * scale) + 'px';
setWindowRect(windowRect);
}
- _calculateScrollHeight() {
+ calculateScrollHeight_() {
// Element.scrollHeight returns an integer value but this calculate the
// actual fractional value.
// TODO(tkent): This can be too large? crbug.com/579863
let top = Infinity;
let bottom = -Infinity;
- for (let i = 0; i < this._selectElement.children.length; i++) {
- const rect = this._selectElement.children[i].getBoundingClientRect();
+ for (let i = 0; i < this.selectElement_.children.length; i++) {
+ const rect = this.selectElement_.children[i].getBoundingClientRect();
// Skip hidden elements.
if (rect.width === 0 && rect.height === 0)
continue;
@@ -295,70 +295,70 @@
return Math.max(bottom - top, 0);
}
- _listItemCount() {
- return this._selectElement.querySelectorAll('option,optgroup,hr').length;
+ listItemCount_() {
+ return this.selectElement_.querySelectorAll('option,optgroup,hr').length;
}
- _layout() {
- if (this._config.isRTL)
- this._element.classList.add('rtl');
- this._selectElement.style.backgroundColor =
- this._config.baseStyle.backgroundColor;
- this._selectElement.style.color = this._config.baseStyle.color;
- this._selectElement.style.textTransform =
- this._config.baseStyle.textTransform;
- this._selectElement.style.fontSize = this._config.baseStyle.fontSize + 'px';
- this._selectElement.style.fontFamily = this._config.baseStyle.fontFamily;
- this._selectElement.style.fontStyle = this._config.baseStyle.fontStyle;
- this._selectElement.style.fontVariant = this._config.baseStyle.fontVariant;
- if (this._config.baseStyle.textAlign)
- this._selectElement.style.textAlign = this._config.baseStyle.textAlign;
- this._updateChildren(this._selectElement, this._config);
+ layout_() {
+ if (this.config_.isRTL)
+ this.element_.classList.add('rtl');
+ this.selectElement_.style.backgroundColor =
+ this.config_.baseStyle.backgroundColor;
+ this.selectElement_.style.color = this.config_.baseStyle.color;
+ this.selectElement_.style.textTransform =
+ this.config_.baseStyle.textTransform;
+ this.selectElement_.style.fontSize = this.config_.baseStyle.fontSize + 'px';
+ this.selectElement_.style.fontFamily = this.config_.baseStyle.fontFamily;
+ this.selectElement_.style.fontStyle = this.config_.baseStyle.fontStyle;
+ this.selectElement_.style.fontVariant = this.config_.baseStyle.fontVariant;
+ if (this.config_.baseStyle.textAlign)
+ this.selectElement_.style.textAlign = this.config_.baseStyle.textAlign;
+ this.updateChildren_(this.selectElement_, this.config_);
}
- _update() {
- const scrollPosition = this._selectElement.scrollTop;
- const oldValue = this._selectElement.value;
- this._layout();
- this._selectElement.value = this._config.selectedIndex;
- this._selectElement.scrollTop = scrollPosition;
+ update_() {
+ const scrollPosition = this.selectElement_.scrollTop;
+ const oldValue = this.selectElement_.value;
+ this.layout_();
+ this.selectElement_.value = this.config_.selectedIndex;
+ this.selectElement_.scrollTop = scrollPosition;
let optionUnderMouse = null;
- if (this._selectionSetByMouseHover) {
+ if (this.selectionSetByMouseHover_) {
const elementUnderMouse = document.elementFromPoint(
- this.lastMousePositionX, this.lastMousePositionY);
+ this.lastMousePositionX_, this.lastMousePositionY_);
optionUnderMouse =
elementUnderMouse && elementUnderMouse.closest('option');
}
if (optionUnderMouse)
optionUnderMouse.selected = true;
else
- this._selectElement.value = oldValue;
- this._selectElement.scrollTop = scrollPosition;
+ this.selectElement_.value = oldValue;
+ this.selectElement_.scrollTop = scrollPosition;
this.dispatchEvent('didUpdate');
}
- static DelayedLayoutThreshold = 1000;
+ static DELAYED_LAYOUT_THRESHOLD = 1000;
/**
* @param {!Element} parent Select element or optgroup element.
* @param {!Object} config
*/
- _updateChildren(parent, config) {
+ updateChildren_(parent, config) {
let outOfDateIndex = 0;
let fragment = null;
const inGroup = parent.tagName === 'OPTGROUP';
let lastListIndex = -1;
- const limit =
- Math.max(this._config.selectedIndex, ListPicker.DelayedLayoutThreshold);
+ const limit = Math.max(
+ this.config_.selectedIndex, ListPicker.DELAYED_LAYOUT_THRESHOLD);
let i;
for (i = 0; i < config.children.length; ++i) {
if (!inGroup && lastListIndex >= limit)
break;
const childConfig = config.children[i];
const item =
- this._findReusableItem(parent, childConfig, outOfDateIndex) ||
- this._createItemElement(childConfig);
- this._configureItem(item, childConfig, inGroup);
+ this.findReusableItem_(parent, childConfig, outOfDateIndex) ||
+ this.createItemElement_(childConfig);
+ this.configureItem_(item, childConfig, inGroup);
lastListIndex = item.value ? Number(item.value) : -1;
if (outOfDateIndex < parent.children.length) {
parent.insertBefore(item, parent.children[outOfDateIndex]);
@@ -378,36 +378,35 @@
}
}
if (i < config.children.length) {
- // We don't bind |config.children| and |i| to _updateChildrenLater
- // because config.children can get invalid before _updateChildrenLater
+ // We don't bind |config.children| and |i| to updateChildrenLater_
+ // because config.children can get invalid before updateChildrenLater_
// is called.
- this._delayedChildrenConfig = config.children;
- this._delayedChildrenConfigIndex = i;
+ this.delayedChildrenConfig_ = config.children;
+ this.delayedChildrenConfigIndex = i;
// Needs some amount of delay to kick the first paint.
- setTimeout(this._updateChildrenLater.bind(this), 100);
+ setTimeout(this.updateChildrenLater_.bind(this), 100);
}
}
- _updateChildrenLater(timeStamp) {
- if (!this._delayedChildrenConfig)
+ updateChildrenLater_(timeStamp) {
+ if (!this.delayedChildrenConfig_)
return;
const fragment = document.createDocumentFragment();
- const startIndex = this._delayedChildrenConfigIndex;
- for (;
- this._delayedChildrenConfigIndex < this._delayedChildrenConfig.length;
- ++this._delayedChildrenConfigIndex) {
+ const startIndex = this.delayedChildrenConfigIndex;
+ for (; this.delayedChildrenConfigIndex < this.delayedChildrenConfig_.length;
+ ++this.delayedChildrenConfigIndex) {
const childConfig =
- this._delayedChildrenConfig[this._delayedChildrenConfigIndex];
- const item = this._createItemElement(childConfig);
- this._configureItem(item, childConfig, false);
+ this.delayedChildrenConfig_[this.delayedChildrenConfigIndex];
+ const item = this.createItemElement_(childConfig);
+ this.configureItem_(item, childConfig, false);
fragment.appendChild(item);
}
- this._selectElement.appendChild(fragment);
- this._selectElement.classList.add('wrap');
- this._delayedChildrenConfig = null;
+ this.selectElement_.appendChild(fragment);
+ this.selectElement_.classList.add('wrap');
+ this.delayedChildrenConfig_ = null;
}
- _findReusableItem(parent, config, startIndex) {
+ findReusableItem_(parent, config, startIndex) {
if (startIndex >= parent.children.length)
return null;
let tagName = 'OPTION';
@@ -424,7 +423,7 @@
return null;
}
- _createItemElement(config) {
+ createItemElement_(config) {
let element;
if (!config.type || config.type === 'option')
element = createElement('option');
@@ -435,7 +434,7 @@
return element;
}
- _applyItemStyle(element, styleConfig) {
+ applyItemStyle_(element, styleConfig) {
if (!styleConfig)
return;
const style = element.style;
@@ -458,7 +457,7 @@
style.textAlign = styleConfig.textAlign ? styleConfig.textAlign : '';
}
- _configureItem(element, config, inGroup) {
+ configureItem_(element, config, inGroup) {
if (!config.type || config.type === 'option') {
element.label = config.label;
element.value = config.value;
@@ -470,9 +469,9 @@
if (config.ariaLabel)
element.setAttribute('aria-label', config.ariaLabel);
else element.removeAttribute('aria-label');
- element.style.paddingInlineStart = this._config.paddingStart + 'px';
+ element.style.paddingInlineStart = this.config_.paddingStart + 'px';
if (inGroup) {
- element.style.marginInlineStart = (-this._config.paddingStart) + 'px';
+ element.style.marginInlineStart = (-this.config_.paddingStart) + 'px';
// Should be synchronized with padding-end in list_picker.css.
element.style.marginInlineEnd = '-2px';
}
@@ -481,19 +480,19 @@
element.title = config.title;
element.disabled = config.disabled;
element.setAttribute('aria-label', config.ariaLabel);
- this._updateChildren(element, config);
- element.style.paddingInlineStart = this._config.paddingStart + 'px';
+ this.updateChildren_(element, config);
+ element.style.paddingInlineStart = this.config_.paddingStart + 'px';
} else if (config.type === 'separator') {
element.title = config.title;
element.disabled = config.disabled;
element.setAttribute('aria-label', config.ariaLabel);
if (inGroup) {
- element.style.marginInlineStart = (-this._config.paddingStart) + 'px';
+ element.style.marginInlineStart = (-this.config_.paddingStart) + 'px';
// Should be synchronized with padding-end in list_picker.css.
element.style.marginInlineEnd = '-2px';
}
}
- this._applyItemStyle(element, config.style);
+ this.applyItemStyle_(element, config.style);
}
}
diff --git a/third_party/blink/renderer/core/html/forms/resources/month_picker.js b/third_party/blink/renderer/core/html/forms/resources/month_picker.js
index 9d6051a..24bb0b18 100644
--- a/third_party/blink/renderer/core/html/forms/resources/month_picker.js
+++ b/third_party/blink/renderer/core/html/forms/resources/month_picker.js
@@ -14,9 +14,9 @@
if (global.params.isBorderTransparent) {
main.style.borderColor = 'transparent';
}
- main.style.height = (MonthPicker.Height - 2) + 'px';
- main.style.width = (MonthPicker.Width - 2) + 'px';
- resizeWindow(MonthPicker.Width, MonthPicker.Height);
+ main.style.height = (MonthPicker.HEIGHT - 2) + 'px';
+ main.style.width = (MonthPicker.WIDTH - 2) + 'px';
+ resizeWindow(MonthPicker.WIDTH, MonthPicker.HEIGHT);
}
/**
@@ -60,18 +60,18 @@
};
initializeYearListView_ = () => {
- this.yearListView_.setWidth(MonthPicker.YearWidth);
- this.yearListView_.setHeight(MonthPicker.YearHeight);
+ this.yearListView_.setWidth(MonthPicker.YEAR_WIDTH);
+ this.yearListView_.setHeight(MonthPicker.YEAR_HEIGHT);
if (global.params.isLocaleRTL) {
- this.yearListView_.element.style.right = MonthPicker.YearPadding + 'px';
+ this.yearListView_.element.style.right = MonthPicker.YEAR_PADDING + 'px';
this.yearListView_.scrubbyScrollBar.element.style.right =
- MonthPicker.YearWidth + 'px';
+ MonthPicker.YEAR_WIDTH + 'px';
} else {
- this.yearListView_.element.style.left = MonthPicker.YearPadding + 'px';
+ this.yearListView_.element.style.left = MonthPicker.YEAR_PADDING + 'px';
this.yearListView_.scrubbyScrollBar.element.style.left =
- MonthPicker.YearWidth + 'px';
+ MonthPicker.YEAR_WIDTH + 'px';
}
- this.yearListView_.element.style.top = MonthPicker.YearPadding + 'px';
+ this.yearListView_.element.style.top = MonthPicker.YEAR_PADDING + 'px';
let yearForInitialScroll = this.selectedMonth ?
this.selectedMonth.year - 1 :
@@ -105,7 +105,8 @@
this.todayButton_.element.textContent = global.params.todayLabel;
this.todayButton_.element.setAttribute(
'aria-label', global.params.todayLabel);
- this.todayButton_.element.classList.add(MonthPicker.ClassNameTodayButton);
+ this.todayButton_.element.classList.add(
+ MonthPicker.CLASS_NAME_TODAY_BUTTON);
const monthContainingToday = Month.createFromToday();
this.todayButton_.setDisabled(
!this.yearListView_.isValid(monthContainingToday));
@@ -183,10 +184,10 @@
return this.yearListView_._hadValidValueWhenOpened;
};
}
-MonthPicker.Width = 232;
-MonthPicker.YearWidth = 194;
-MonthPicker.YearHeight = 128;
-MonthPicker.YearPadding = 12;
-MonthPicker.Height = 182;
-MonthPicker.ClassNameTodayButton = 'today-button';
+MonthPicker.WIDTH = 232;
+MonthPicker.YEAR_WIDTH = 194;
+MonthPicker.YEAR_HEIGHT = 128;
+MonthPicker.YEAR_PADDING = 12;
+MonthPicker.HEIGHT = 182;
+MonthPicker.CLASS_NAME_TODAY_BUTTON = 'today-button';
window.customElements.define('month-picker', MonthPicker);
diff --git a/third_party/blink/renderer/core/html/forms/resources/picker_common.js b/third_party/blink/renderer/core/html/forms/resources/picker_common.js
index fc6acc9..f83a6d7 100644
--- a/third_party/blink/renderer/core/html/forms/resources/picker_common.js
+++ b/third_party/blink/renderer/core/html/forms/resources/picker_common.js
@@ -319,16 +319,16 @@
*/
constructor(element, config) {
super();
- this._element = element;
- this._config = config;
+ this.element_ = element;
+ this.config_ = config;
}
/**
* @enum {number}
*/
static Actions = {
- SetValue: 0,
- Cancel: -1,
+ SET_VALUE: 0,
+ CANCEL: -1,
};
/**
diff --git a/third_party/blink/renderer/core/html/forms/resources/suggestion_picker.js b/third_party/blink/renderer/core/html/forms/resources/suggestion_picker.js
index e62e6114..ad586423b 100644
--- a/third_party/blink/renderer/core/html/forms/resources/suggestion_picker.js
+++ b/third_party/blink/renderer/core/html/forms/resources/suggestion_picker.js
@@ -31,24 +31,24 @@
*/
constructor(element, config) {
super(element, config);
- this._isFocusByMouse = false;
- this._containerElement = null;
- this._setColors();
- this._layout();
- this._fixWindowSize();
- this._handleBodyKeyDownBound = this._handleBodyKeyDown.bind(this);
- document.body.addEventListener('keydown', this._handleBodyKeyDownBound);
- this._element.addEventListener(
- 'mouseout', this._handleMouseOut.bind(this), false);
+ this.isFocusByMouse_ = false;
+ this.containerElement_ = null;
+ this.setColors_();
+ this.layout_();
+ this.fixWindowSize_();
+ this.handleBodyKeyDownBound_ = this.handleBodyKeyDown_.bind(this);
+ document.body.addEventListener('keydown', this.handleBodyKeyDownBound_);
+ this.element_.addEventListener(
+ 'mouseout', this.handleMouseOut_.bind(this), false);
}
- static NumberOfVisibleEntries = 20;
+ static NUMBER_OF_VISIBLE_ENTRIES = 20;
// An entry needs to be at least this many pixels visible for it to be a visible entry.
- static VisibleEntryThresholdHeight = 4;
+ static VISIBLE_ENTRY_THRESHOLD_HEIGHT = 4;
static ActionNames = {
- OpenCalendarPicker: 'openCalendarPicker',
+ OPEN_CALENDAR_PICKER: 'openCalendarPicker',
};
- static ListEntryClass = 'suggestion-list-entry';
+ static LIST_ENTRY_CLASS = 'suggestion-list-entry';
static validateConfig(config) {
if (config.showOtherDateEntry && !config.otherDateLabel)
@@ -68,28 +68,28 @@
return null;
}
- Padding() {
+ padding_() {
return Number(
window.getComputedStyle(document.querySelector('.suggestion-list'))
.getPropertyValue('padding')
.replace('px', ''));
}
- _setColors() {
- let text = '.' + SuggestionPicker.ListEntryClass + ':focus {\
+ setColors_() {
+ let text = '.' + SuggestionPicker.LIST_ENTRY_CLASS + ':focus {\
background-color: ' +
- this._config.suggestionHighlightColor + ';\
+ this.config_.suggestionHighlightColor + ';\
color: ' +
- this._config.suggestionHighlightTextColor + '; }';
- text += '.' + SuggestionPicker.ListEntryClass +
- ':focus .label { color: ' + this._config.suggestionHighlightTextColor +
+ this.config_.suggestionHighlightTextColor + '; }';
+ text += '.' + SuggestionPicker.LIST_ENTRY_CLASS +
+ ':focus .label { color: ' + this.config_.suggestionHighlightTextColor +
'; }';
document.head.appendChild(createElement('style', null, text));
}
cleanup() {
document.body.removeEventListener(
- 'keydown', this._handleBodyKeyDownBound, false);
+ 'keydown', this.handleBodyKeyDownBound_, false);
}
/**
@@ -98,8 +98,8 @@
* @param {!string} value
* @return {!Element}
*/
- _createSuggestionEntryElement(title, label, value) {
- const entryElement = createElement('li', SuggestionPicker.ListEntryClass);
+ createSuggestionEntryElement_(title, label, value) {
+ const entryElement = createElement('li', SuggestionPicker.LIST_ENTRY_CLASS);
entryElement.tabIndex = 0;
entryElement.dataset.value = value;
const content = createElement('span', 'content');
@@ -111,7 +111,7 @@
content.appendChild(labelElement);
}
entryElement.addEventListener(
- 'mouseover', this._handleEntryMouseOver.bind(this), false);
+ 'mouseover', this.handleEntryMouseOver_.bind(this), false);
return entryElement;
}
@@ -120,8 +120,8 @@
* @param {!string} actionName
* @return {!Element}
*/
- _createActionEntryElement(title, actionName) {
- const entryElement = createElement('li', SuggestionPicker.ListEntryClass);
+ createActionEntryElement_(title, actionName) {
+ const entryElement = createElement('li', SuggestionPicker.LIST_ENTRY_CLASS);
entryElement.tabIndex = 0;
entryElement.dataset.action = actionName;
const content = createElement('span', 'content');
@@ -129,136 +129,135 @@
const titleElement = createElement('span', 'title', title);
content.appendChild(titleElement);
entryElement.addEventListener(
- 'mouseover', this._handleEntryMouseOver.bind(this), false);
+ 'mouseover', this.handleEntryMouseOver_.bind(this), false);
return entryElement;
}
/**
* @return {!number}
*/
- _measureMaxContentWidth() {
+ measureMaxContentWidth_() {
// To measure the required width, we first set the class to "measuring-width" which
// left aligns all the content including label.
- this._containerElement.classList.add('measuring-width');
+ this.containerElement_.classList.add('measuring-width');
let maxContentWidth = 0;
const contentElements =
- this._containerElement.getElementsByClassName('content');
+ this.containerElement_.getElementsByClassName('content');
for (let i = 0; i < contentElements.length; ++i) {
maxContentWidth = Math.max(
maxContentWidth, contentElements[i].getBoundingClientRect().width);
}
- this._containerElement.classList.remove('measuring-width');
+ this.containerElement_.classList.remove('measuring-width');
return maxContentWidth;
}
- _fixWindowSize() {
+ fixWindowSize_() {
const ListBorder = 2;
- const ListPadding = 2 * this.Padding();
- const zoom = this._config.zoomFactor;
+ const ListPadding = 2 * this.padding_();
+ const zoom = this.config_.zoomFactor;
let desiredWindowWidth =
- (this._measureMaxContentWidth() + ListBorder + ListPadding) * zoom;
- if (typeof this._config.inputWidth === 'number')
+ (this.measureMaxContentWidth_() + ListBorder + ListPadding) * zoom;
+ if (typeof this.config_.inputWidth === 'number')
desiredWindowWidth =
- Math.max(this._config.inputWidth, desiredWindowWidth);
+ Math.max(this.config_.inputWidth, desiredWindowWidth);
let totalHeight = ListBorder + ListPadding;
let maxHeight = 0;
let entryCount = 0;
- for (let i = 0; i < this._containerElement.childNodes.length; ++i) {
- const node = this._containerElement.childNodes[i];
- if (node.classList.contains(SuggestionPicker.ListEntryClass))
+ for (let i = 0; i < this.containerElement_.childNodes.length; ++i) {
+ const node = this.containerElement_.childNodes[i];
+ if (node.classList.contains(SuggestionPicker.LIST_ENTRY_CLASS))
entryCount++;
totalHeight += node.offsetHeight;
if (maxHeight === 0 &&
- entryCount == SuggestionPicker.NumberOfVisibleEntries)
+ entryCount == SuggestionPicker.NUMBER_OF_VISIBLE_ENTRIES)
maxHeight = totalHeight;
}
let desiredWindowHeight = totalHeight * zoom;
if (maxHeight !== 0 && totalHeight > maxHeight * zoom) {
- this._containerElement.style.maxHeight =
+ this.containerElement_.style.maxHeight =
maxHeight - ListBorder - ListPadding + 'px';
desiredWindowWidth += getScrollbarWidth() * zoom;
desiredWindowHeight = maxHeight * zoom;
- this._containerElement.style.overflowY = 'scroll';
+ this.containerElement_.style.overflowY = 'scroll';
}
const windowRect = adjustWindowRect(
desiredWindowWidth, desiredWindowHeight, desiredWindowWidth, 0);
- this._containerElement.style.height =
+ this.containerElement_.style.height =
windowRect.height / zoom - ListBorder - ListPadding + 'px';
setWindowRect(windowRect);
}
- _layout() {
- if (this._config.isRTL)
- this._element.classList.add('rtl');
- if (this._config.isLocaleRTL)
- this._element.classList.add('locale-rtl');
- this._containerElement = createElement('ul', 'suggestion-list');
+ layout_() {
+ if (this.config_.isRTL)
+ this.element_.classList.add('rtl');
+ if (this.config_.isLocaleRTL)
+ this.element_.classList.add('locale-rtl');
+ this.containerElement_ = createElement('ul', 'suggestion-list');
if (global.params.isBorderTransparent) {
- this._containerElement.style.borderColor = 'transparent';
+ this.containerElement_.style.borderColor = 'transparent';
}
- this._containerElement.addEventListener(
- 'click', this._handleEntryClick.bind(this), false);
- for (let i = 0; i < this._config.suggestionValues.length; ++i) {
- this._containerElement.appendChild(this._createSuggestionEntryElement(
- this._config.localizedSuggestionValues[i],
- this._config.suggestionLabels[i], this._config.suggestionValues[i]));
+ this.containerElement_.addEventListener(
+ 'click', this.handleEntryClick_.bind(this), false);
+ for (let i = 0; i < this.config_.suggestionValues.length; ++i) {
+ this.containerElement_.appendChild(this.createSuggestionEntryElement_(
+ this.config_.localizedSuggestionValues[i],
+ this.config_.suggestionLabels[i], this.config_.suggestionValues[i]));
}
- if (this._config.showOtherDateEntry) {
+ if (this.config_.showOtherDateEntry) {
// Add "Other..." entry
- const otherEntry = this._createActionEntryElement(
- this._config.otherDateLabel,
- SuggestionPicker.ActionNames.OpenCalendarPicker);
- this._containerElement.appendChild(otherEntry);
+ const otherEntry = this.createActionEntryElement_(
+ this.config_.otherDateLabel,
+ SuggestionPicker.ActionNames.OPEN_CALENDAR_PICKER);
+ this.containerElement_.appendChild(otherEntry);
}
- this._element.appendChild(this._containerElement);
+ this.element_.appendChild(this.containerElement_);
}
/**
* @param {!Element} entry
*/
- selectEntry(entry) {
+ selectEntry_(entry) {
if (typeof entry.dataset.value !== 'undefined') {
this.submitValue(entry.dataset.value);
} else if (
entry.dataset.action ===
- SuggestionPicker.ActionNames.OpenCalendarPicker) {
+ SuggestionPicker.ActionNames.OPEN_CALENDAR_PICKER) {
window.addEventListener(
- 'didHide', SuggestionPicker._handleWindowDidHide, false);
+ 'didHide', SuggestionPicker.handleWindowDidHide_, false);
hideWindow();
}
}
- static _handleWindowDidHide() {
+ static handleWindowDidHide_() {
openCalendarPicker();
- window.removeEventListener(
- 'didHide', SuggestionPicker._handleWindowDidHide);
+ window.removeEventListener('didHide', SuggestionPicker.handleWindowDidHide_);
}
/**
* @param {!Event} event
*/
- _handleEntryClick(event) {
+ handleEntryClick_(event) {
const entry = enclosingNodeOrSelfWithClass(
- event.target, SuggestionPicker.ListEntryClass);
+ event.target, SuggestionPicker.LIST_ENTRY_CLASS);
if (!entry)
return;
- this.selectEntry(entry);
+ this.selectEntry_(entry);
event.preventDefault();
}
/**
* @return {?Element}
*/
- _findFirstVisibleEntry() {
- const scrollTop = this._containerElement.scrollTop;
- const childNodes = this._containerElement.childNodes;
+ findFirstVisibleEntry_() {
+ const scrollTop = this.containerElement_.scrollTop;
+ const childNodes = this.containerElement_.childNodes;
for (let i = 0; i < childNodes.length; ++i) {
const node = childNodes[i];
if (node.nodeType !== Node.ELEMENT_NODE ||
- !node.classList.contains(SuggestionPicker.ListEntryClass))
+ !node.classList.contains(SuggestionPicker.LIST_ENTRY_CLASS))
continue;
if (node.offsetTop + node.offsetHeight - scrollTop >
- SuggestionPicker.VisibleEntryThresholdHeight)
+ SuggestionPicker.VISIBLE_ENTRY_THRESHOLD_HEIGHT)
return node;
}
return null;
@@ -267,17 +266,17 @@
/**
* @return {?Element}
*/
- _findLastVisibleEntry() {
+ findLastVisibleEntry_() {
const scrollBottom =
- this._containerElement.scrollTop + this._containerElement.offsetHeight;
- const childNodes = this._containerElement.childNodes;
+ this.containerElement_.scrollTop + this.containerElement_.offsetHeight;
+ const childNodes = this.containerElement_.childNodes;
for (let i = childNodes.length - 1; i >= 0; --i) {
const node = childNodes[i];
if (node.nodeType !== Node.ELEMENT_NODE ||
- !node.classList.contains(SuggestionPicker.ListEntryClass))
+ !node.classList.contains(SuggestionPicker.LIST_ENTRY_CLASS))
continue;
if (scrollBottom - node.offsetTop >
- SuggestionPicker.VisibleEntryThresholdHeight)
+ SuggestionPicker.VISIBLE_ENTRY_THRESHOLD_HEIGHT)
return node;
}
return null;
@@ -286,7 +285,7 @@
/**
* @param {!Event} event
*/
- _handleBodyKeyDown(event) {
+ handleBodyKeyDown_(event) {
let eventHandled = false;
const key = event.key;
if (key === 'Escape') {
@@ -295,55 +294,55 @@
} else if (key == 'ArrowUp') {
if (document.activeElement &&
document.activeElement.classList.contains(
- SuggestionPicker.ListEntryClass)) {
+ SuggestionPicker.LIST_ENTRY_CLASS)) {
for (let node = document.activeElement.previousElementSibling; node;
node = node.previousElementSibling) {
- if (node.classList.contains(SuggestionPicker.ListEntryClass)) {
- this._isFocusByMouse = false;
+ if (node.classList.contains(SuggestionPicker.LIST_ENTRY_CLASS)) {
+ this.isFocusByMouse_ = false;
node.focus();
break;
}
}
} else {
- this._element
+ this.element_
.querySelector(
- '.' + SuggestionPicker.ListEntryClass + ':last-child')
+ '.' + SuggestionPicker.LIST_ENTRY_CLASS + ':last-child')
.focus();
}
eventHandled = true;
} else if (key == 'ArrowDown') {
if (document.activeElement &&
document.activeElement.classList.contains(
- SuggestionPicker.ListEntryClass)) {
+ SuggestionPicker.LIST_ENTRY_CLASS)) {
for (let node = document.activeElement.nextElementSibling; node;
node = node.nextElementSibling) {
- if (node.classList.contains(SuggestionPicker.ListEntryClass)) {
- this._isFocusByMouse = false;
+ if (node.classList.contains(SuggestionPicker.LIST_ENTRY_CLASS)) {
+ this.isFocusByMouse_ = false;
node.focus();
break;
}
}
} else {
- this._element
+ this.element_
.querySelector(
- '.' + SuggestionPicker.ListEntryClass + ':first-child')
+ '.' + SuggestionPicker.LIST_ENTRY_CLASS + ':first-child')
.focus();
}
eventHandled = true;
} else if (key === 'Enter') {
- this.selectEntry(document.activeElement);
+ this.selectEntry_(document.activeElement);
eventHandled = true;
} else if (key === 'PageUp') {
- this._containerElement.scrollTop -= this._containerElement.clientHeight;
+ this.containerElement_.scrollTop -= this.containerElement_.clientHeight;
// Scrolling causes mouseover event to be called and that tries to move the focus too.
// To prevent flickering we won't focus if the current focus was caused by the mouse.
- if (!this._isFocusByMouse)
- this._findFirstVisibleEntry().focus();
+ if (!this.isFocusByMouse_)
+ this.findFirstVisibleEntry_().focus();
eventHandled = true;
} else if (key === 'PageDown') {
- this._containerElement.scrollTop += this._containerElement.clientHeight;
- if (!this._isFocusByMouse)
- this._findLastVisibleEntry().focus();
+ this.containerElement_.scrollTop += this.containerElement_.clientHeight;
+ if (!this.isFocusByMouse_)
+ this.findLastVisibleEntry_().focus();
eventHandled = true;
}
if (eventHandled)
@@ -353,12 +352,12 @@
/**
* @param {!Event} event
*/
- _handleEntryMouseOver(event) {
+ handleEntryMouseOver_(event) {
const entry = enclosingNodeOrSelfWithClass(
- event.target, SuggestionPicker.ListEntryClass);
+ event.target, SuggestionPicker.LIST_ENTRY_CLASS);
if (!entry)
return;
- this._isFocusByMouse = true;
+ this.isFocusByMouse_ = true;
entry.focus();
event.preventDefault();
}
@@ -366,11 +365,11 @@
/**
* @param {!Event} event
*/
- _handleMouseOut(event) {
+ handleMouseOut_(event) {
if (!document.activeElement.classList.contains(
- SuggestionPicker.ListEntryClass))
+ SuggestionPicker.LIST_ENTRY_CLASS))
return;
- this._isFocusByMouse = false;
+ this.isFocusByMouse_ = false;
document.activeElement.blur();
event.preventDefault();
}
diff --git a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-appearance-custom-scrollbar-thumb-hover.html b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-appearance-custom-scrollbar-thumb-hover.html
index 6017e2e2..35617c5 100644
--- a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-appearance-custom-scrollbar-thumb-hover.html
+++ b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-appearance-custom-scrollbar-thumb-hover.html
@@ -68,7 +68,7 @@
function mouseMoveToScrollbar() {
return new Promise(function(resolve, reject) {
if (window.chrome && chrome.gpuBenchmarking) {
- let selectElement = internals.pagePopupWindow.global.picker._selectElement;
+ let selectElement = internals.pagePopupWindow.global.picker.selectElement_;
let innerSelectRect = selectElement.getBoundingClientRect();
let scrollbarX = innerSelectRect.x + innerSelectRect.width - 10;
let scrollbarY = innerSelectRect.y + 50;
diff --git a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-appearance-custom-scrollbar-track-hover.html b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-appearance-custom-scrollbar-track-hover.html
index fc36357..95a84c69 100644
--- a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-appearance-custom-scrollbar-track-hover.html
+++ b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-appearance-custom-scrollbar-track-hover.html
@@ -70,7 +70,7 @@
openPickerAppearanceOnly(menu,() => {
return new Promise(function(resolve, reject) {
if (window.chrome && chrome.gpuBenchmarking) {
- let selectElement = internals.pagePopupWindow.global.picker._selectElement;
+ let selectElement = internals.pagePopupWindow.global.picker.selectElement_;
let innerSelectRect = selectElement.getBoundingClientRect();
let scrollbarX = innerSelectRect.x + innerSelectRect.width - 5;
let scrollbarY = innerSelectRect.y + innerSelectRect.height - 10;
diff --git a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-key-operations.html b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-key-operations.html
index 1882e96..ea1b989 100644
--- a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-key-operations.html
+++ b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-key-operations.html
@@ -35,32 +35,32 @@
function test1() {
debug('==> Arrow keys + Enter');
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menu.value', 'bar');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
eventSender.keyDown('ArrowDown');
- shouldBeEqualToString('picker._selectElement.value', '4');
+ shouldBeEqualToString('picker.selectElement_.value', '4');
shouldBeEqualToString('menu.value', 'bar');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
eventSender.keyDown('ArrowDown');
- shouldBeEqualToString('picker._selectElement.value', '4');
+ shouldBeEqualToString('picker.selectElement_.value', '4');
shouldBeEqualToString('menu.value', 'bar');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
eventSender.keyDown('ArrowUp');
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menu.value', 'bar');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
eventSender.keyDown('ArrowUp');
- shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('menu.value', 'bar');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'foo');
eventSender.keyDown('ArrowUp');
- shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('menu.value', 'bar');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'foo');
@@ -77,11 +77,11 @@
function test2() {
debug('==> Arrow keys + ESC');
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'foo');
eventSender.keyDown('ArrowDown');
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menu.value', 'foo');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
@@ -100,11 +100,11 @@
function testProvisionalSelectionAndBlur() {
debug('==> Arrow keys + blur');
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'foo');
eventSender.keyDown('ArrowDown');
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menu.value', 'foo');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
@@ -120,11 +120,11 @@
function test3() {
debug('==> Typeahead + ESC');
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
eventSender.keyDown('g');
- shouldBeEqualToString('picker._selectElement.value', '4');
+ shouldBeEqualToString('picker.selectElement_.value', '4');
shouldBeEqualToString('menu.value', 'bar');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
@@ -142,11 +142,11 @@
function test4() {
debug('==> Hover + ESC');
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '4');
+ shouldBeEqualToString('picker.selectElement_.value', '4');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
- hoverOverElement(picker._selectElement.children[0]);
- shouldBeEqualToString('picker._selectElement.value', '0');
+ hoverOverElement(picker.selectElement_.children[0]);
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('menu.value', 'garply');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
@@ -164,18 +164,18 @@
function test5() {
debug('==> Hover + Invalid arrow + ESC');
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '4');
+ shouldBeEqualToString('picker.selectElement_.value', '4');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
- hoverOverElement(picker._selectElement.children[0]);
- shouldBeEqualToString('picker._selectElement.value', '0');
+ hoverOverElement(picker.selectElement_.children[0]);
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('menu.value', 'garply');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
// ArrowLeft doesn't change the selection in the popup. So,
// selectMenuListText won't change.
eventSender.keyDown('ArrowLeft');
- shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('menu.value', 'garply');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
@@ -193,15 +193,15 @@
function test6() {
debug('==> Arrow key + Click');
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'foo');
eventSender.keyDown('ArrowDown');
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menu.value', 'foo');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
- clickElement(picker._selectElement.children[0]);
+ clickElement(picker.selectElement_.children[0]);
shouldBeNull('internals.pagePopupWindow');
shouldBeEqualToString('menu.value', 'foo');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'foo');
@@ -215,7 +215,7 @@
function testEnterWithoutSelection() {
debug('==> Enter with no selected OPTION');
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '');
+ shouldBeEqualToString('picker.selectElement_.value', '');
eventSender.keyDown('Enter');
shouldBeNull('internals.pagePopupWindow');
shouldBeEqualToString('menu2.value', '');
diff --git a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-mouse-operations.html b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-mouse-operations.html
index bbbbf81..1c24222 100644
--- a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-mouse-operations.html
+++ b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-mouse-operations.html
@@ -52,35 +52,35 @@
openPickerDeprecatedJsTest(menu, test1, openPickerErrorCallback);
function test1() {
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menuElement.value', 'bar');
- hoverOverElement(picker._selectElement.children[0]);
- shouldBeEqualToString('picker._selectElement.value', '0');
+ hoverOverElement(picker.selectElement_.children[0]);
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('menuElement.value', 'bar');
- hoverOverElement(picker._selectElement.children[1]);
- shouldBeEqualToString('picker._selectElement.value', '1');
+ hoverOverElement(picker.selectElement_.children[1]);
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menuElement.value', 'bar');
hoverOverElement(menuElement);
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menuElement.value', 'bar');
// Start drag selecting but release outside the popup.
- hoverOverElement(picker._selectElement.children[2]);
+ hoverOverElement(picker.selectElement_.children[2]);
eventSender.mouseDown();
- hoverOverElement(picker._selectElement.children[0]);
+ hoverOverElement(picker.selectElement_.children[0]);
hoverOverElement(menuElement);
eventSender.mouseUp();
shouldNotBe('internals.pagePopupWindow', 'null');
- shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('picker.selectElement_.value', '0');
shouldBeEqualToString('menuElement.value', 'bar');
shouldBe('clickEventCounter', '0');
shouldBe('mouseupEventCounter', '0');
- clickElement(picker._selectElement.children[2]);
+ clickElement(picker.selectElement_.children[2]);
shouldBeNull('internals.pagePopupWindow');
shouldBeEqualToString('menuElement.value', 'baz');
@@ -94,11 +94,11 @@
function test2() {
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '2');
+ shouldBeEqualToString('picker.selectElement_.value', '2');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'baz');
eventSender.keyDown('ArrowUp');
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menu.value', 'baz');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
@@ -119,8 +119,8 @@
picker = internals.pagePopupWindow.global.picker;
// We had a bug that almost-invisible OPTION was selected and the popup was
// scrolled. crbug.com/558287.
- eventSender.mouseMoveTo(10, picker._selectElement.offsetHeight - 2);
- shouldBeEqualToString('picker._selectElement.selectedOptions[0].label', 'option20');
+ eventSender.mouseMoveTo(10, picker.selectElement_.offsetHeight - 2);
+ shouldBeEqualToString('picker.selectElement_.selectedOptions[0].label', 'option20');
finishJSTest();
}
diff --git a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-multiline-title.html b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-multiline-title.html
index 386a7f6..356aa6e 100644
--- a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-multiline-title.html
+++ b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-multiline-title.html
@@ -25,7 +25,7 @@
function test1() {
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.options[0].title', 'bar\nbaz');
+ shouldBeEqualToString('picker.selectElement_.options[0].title', 'bar\nbaz');
finishJSTest();
}
</script>
diff --git a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-non-latin-update-from-element.html b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-non-latin-update-from-element.html
index 64080f65..ddb4ef8 100644
--- a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-non-latin-update-from-element.html
+++ b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-non-latin-update-from-element.html
@@ -29,7 +29,7 @@
picker.on("didUpdate", function () {
setTimeout(function() {
- shouldBeEqualToString('picker._selectElement.options[0].label', 'いろはにほへと');
+ shouldBeEqualToString('picker.selectElement_.options[0].label', 'いろはにほへと');
finishJSTest();
}, 0);
});
diff --git a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-scrollbar-button-scrolls.html b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-scrollbar-button-scrolls.html
index f56d8787..0f1b673 100644
--- a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-scrollbar-button-scrolls.html
+++ b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-scrollbar-button-scrolls.html
@@ -49,7 +49,7 @@
.then(() => {
// Click on the scrollbar forward button, and then validate
// that the scrollbar/scrollable area scrolled.
- let innerSelectRect = internals.pagePopupWindow.global.picker._selectElement.getBoundingClientRect();
+ let innerSelectRect = internals.pagePopupWindow.global.picker.selectElement_.getBoundingClientRect();
let scrollbarX = innerSelectRect.x + innerSelectRect.width - 5 + internals.pagePopupWindow.screenX;
let scrollbarY = innerSelectRect.y + innerSelectRect.height - 10 + internals.pagePopupWindow.screenY;
return (new test_driver.Actions())
@@ -62,7 +62,7 @@
.then(requestAnimationFramePromise())
.then(() => {
assert_not_equals(internals.pagePopupWindow, null, "The click shouldn't have closed the window");
- assert_greater_than(internals.pagePopupWindow.global.picker._selectElement.scrollTop, 0);
+ assert_greater_than(internals.pagePopupWindow.global.picker.selectElement_.scrollTop, 0);
});
}, "Scrollbar clicks in a popup must scroll");
</script>
diff --git a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-touch-operations.html b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-touch-operations.html
index 2480a30..018c0b7 100644
--- a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-touch-operations.html
+++ b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-touch-operations.html
@@ -51,18 +51,18 @@
eventSender.clearTouchPoints();
openPickerDeprecatedJsTest(menuElement, function () {
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menuElement.value', 'bar');
- var position = elementCenterPosition(picker._selectElement.children[0]);
+ var position = elementCenterPosition(picker.selectElement_.children[0]);
eventSender.addTouchPoint(position[0], position[1]);
eventSender.touchStart();
- shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('picker.selectElement_.value', '0');
- position = elementCenterPosition(picker._selectElement.children[2]);
+ position = elementCenterPosition(picker.selectElement_.children[2]);
eventSender.updateTouchPoint(0, position[0], position[1]);
eventSender.touchMove();
- shouldBeEqualToString('picker._selectElement.value', '2');
+ shouldBeEqualToString('picker.selectElement_.value', '2');
eventSender.releaseTouchPoint(0);
eventSender.touchEnd();
@@ -81,19 +81,19 @@
menuElement.options[0].disabled = true;
openPickerDeprecatedJsTest(menuElement, () => {
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '2');
+ shouldBeEqualToString('picker.selectElement_.value', '2');
shouldBeEqualToString('menuElement.value', 'baz');
- var position = elementCenterPosition(picker._selectElement.children[2]);
+ var position = elementCenterPosition(picker.selectElement_.children[2]);
eventSender.addTouchPoint(position[0], position[1]);
eventSender.touchStart();
- shouldBeEqualToString('picker._selectElement.value', '2');
+ shouldBeEqualToString('picker.selectElement_.value', '2');
- position = elementCenterPosition(picker._selectElement.children[0]);
+ position = elementCenterPosition(picker.selectElement_.children[0]);
eventSender.updateTouchPoint(0, position[0], position[1]);
eventSender.touchMove();
// The value is still 2 because children[0] is disabled.
- shouldBeEqualToString('picker._selectElement.value', '2');
+ shouldBeEqualToString('picker.selectElement_.value', '2');
eventSender.releaseTouchPoint(0);
eventSender.touchEnd();
@@ -112,21 +112,21 @@
debug("==> Test scrollable popup");
openPickerDeprecatedJsTest(menuElement2, function () {
picker = internals.pagePopupWindow.global.picker;
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
shouldBeEqualToString('menuElement2.value', '2');
- var position = elementCenterPosition(picker._selectElement.children[2]);
+ var position = elementCenterPosition(picker.selectElement_.children[2]);
eventSender.addTouchPoint(position[0], position[1]);
eventSender.touchStart();
- shouldBeEqualToString('picker._selectElement.value', '2');
+ shouldBeEqualToString('picker.selectElement_.value', '2');
- position = elementCenterPosition(picker._selectElement.children[3]);
+ position = elementCenterPosition(picker.selectElement_.children[3]);
eventSender.updateTouchPoint(0, position[0], position[1]);
eventSender.touchMove();
- shouldBeEqualToString('picker._selectElement.value', '3');
+ shouldBeEqualToString('picker.selectElement_.value', '3');
// Moving touch up should scroll and end touch select mode.
- position = elementCenterPosition(picker._selectElement.children[0]);
+ position = elementCenterPosition(picker.selectElement_.children[0]);
eventSender.updateTouchPoint(0, position[0], position[1]);
eventSender.touchMove();
eventSender.gestureScrollPopup(position[0], position[1], 0, -130);
@@ -139,7 +139,7 @@
function test2AfterScrollEvent() {
// touchmove event fires before the scroll event so the selection will change.
- shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('picker.selectElement_.value', '0');
eventSender.releaseTouchPoint(0);
eventSender.touchEnd();
diff --git a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-update-from-element.html b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-update-from-element.html
index 84b1677d..e94a42b 100644
--- a/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-update-from-element.html
+++ b/third_party/blink/web_tests/fast/forms/select-popup/popup-menu-update-from-element.html
@@ -31,8 +31,8 @@
function onUpdate() {
setTimeout(function() {
- shouldBeEqualToString('picker._selectElement.style.color', 'rgb(123, 0, 0)');
- shouldBeEqualToString('picker._selectElement.options[0].style.color', '');
+ shouldBeEqualToString('picker.selectElement_.style.color', 'rgb(123, 0, 0)');
+ shouldBeEqualToString('picker.selectElement_.options[0].style.color', '');
picker.removeListener("didUpdate", onUpdate);
test2();
});
@@ -42,22 +42,22 @@
}
function test2() {
- hoverOverElement(picker._selectElement.children[0]);
- shouldBeEqualToString('picker._selectElement.value', '0');
+ hoverOverElement(picker.selectElement_.children[0]);
+ shouldBeEqualToString('picker.selectElement_.value', '0');
eventSender.keyDown('ArrowDown');
- shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
picker.on("didUpdate", onUpdate);
menuElement.innerHTML = '<option>FOO</option><option>BAR</option><optgroup label="BAZ"></optgroup>';
function onUpdate() {
setTimeout(function() {
- shouldBeEqualToString('picker._selectElement.value', '1');
- shouldBe('picker._selectElement.options.length', '2');
- shouldBeEqualToString('picker._selectElement.children[0].label', 'FOO');
- shouldBeEqualToString('picker._selectElement.children[1].label', 'BAR');
- shouldBeEqualToString('picker._selectElement.children[2].tagName', 'OPTGROUP');
- shouldBeEqualToString('picker._selectElement.children[2].label', 'BAZ');
+ shouldBeEqualToString('picker.selectElement_.value', '1');
+ shouldBe('picker.selectElement_.options.length', '2');
+ shouldBeEqualToString('picker.selectElement_.children[0].label', 'FOO');
+ shouldBeEqualToString('picker.selectElement_.children[1].label', 'BAR');
+ shouldBeEqualToString('picker.selectElement_.children[2].tagName', 'OPTGROUP');
+ shouldBeEqualToString('picker.selectElement_.children[2].label', 'BAZ');
picker.removeListener("didUpdate", onUpdate);
test3();
}, 0);
@@ -65,14 +65,14 @@
}
function test3() {
- hoverOverElement(picker._selectElement.children[2]);
- shouldBeEqualToString('picker._selectElement.value', '1');
+ hoverOverElement(picker.selectElement_.children[2]);
+ shouldBeEqualToString('picker.selectElement_.value', '1');
menuElement.innerHTML = '<option>FOO</option><option>BAR</option><option selected>QUX</option>';
picker.on("didUpdate", function () {
setTimeout(function () {
- shouldBeEqualToString('picker._selectElement.value', '2');
+ shouldBeEqualToString('picker.selectElement_.value', '2');
finishJSTest();
}, 0);
});
diff --git a/third_party/blink/web_tests/fast/scrolling/time-picker-datalist-wheel.html b/third_party/blink/web_tests/fast/scrolling/time-picker-datalist-wheel.html
index 6c81a88..e80a171 100644
--- a/third_party/blink/web_tests/fast/scrolling/time-picker-datalist-wheel.html
+++ b/third_party/blink/web_tests/fast/scrolling/time-picker-datalist-wheel.html
@@ -36,7 +36,7 @@
promise_test(async t => {
await waitForCompositorCommit();
await openPicker(document.getElementById('time'));
- let scroller = internals.pagePopupWindow.global.picker._containerElement;
+ let scroller = internals.pagePopupWindow.global.picker.containerElement_;
// Scroll down two ticks, and make sure the scroll offset changed.
await dispatchWheelEvent(scroller, 0, 2);
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt
index 5e3e453..d385c8cc 100644
--- a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt
+++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt
@@ -1,10 +1,10 @@
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement.value is "bar"
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS menuElement.value is "bar"
-FAIL picker._selectElement.value should be 1. Was 2.
+FAIL picker.selectElement_.value should be 1. Was 2.
PASS menuElement.value is "bar"
-FAIL picker._selectElement.value should be 1. Was 2.
+FAIL picker.selectElement_.value should be 1. Was 2.
PASS menuElement.value is "bar"
FAIL Unexpected error: Uncaught TypeError: Cannot read properties of null (reading 'frameElement')
FAIL successfullyParsed should be true. Was false.
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-touch-operations-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-touch-operations-expected.txt
index 9f03956..702663b 100644
--- a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-touch-operations-expected.txt
+++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-touch-operations-expected.txt
@@ -1,22 +1,22 @@
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement.value is "bar"
-PASS picker._selectElement.value is "0"
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "0"
+PASS picker.selectElement_.value is "2"
PASS internals.pagePopupWindow is null
PASS menuElement.value is "baz"
==> Test disabled option
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "2"
PASS menuElement.value is "baz"
-PASS picker._selectElement.value is "2"
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "2"
+PASS picker.selectElement_.value is "2"
PASS internals.pagePopupWindow is not null
PASS menuElement.value is "baz"
==> Test scrollable popup
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement2.value is "2"
-FAIL picker._selectElement.value should be 2. Was 3.
-PASS picker._selectElement.value is "3"
-PASS picker._selectElement.value is "0"
+FAIL picker.selectElement_.value should be 2. Was 3.
+PASS picker.selectElement_.value is "3"
+PASS picker.selectElement_.value is "0"
PASS internals.pagePopupWindow is not null
PASS menuElement2.value is "2"
==> Test popup closes on outside GestureTapDawn
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-update-from-element-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-update-from-element-expected.txt
index 2d42ba9a1..d6af1528 100644
--- a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-update-from-element-expected.txt
+++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/select-popup/popup-menu-update-from-element-expected.txt
@@ -1,15 +1,15 @@
-PASS picker._selectElement.style.color is "rgb(123, 0, 0)"
-PASS picker._selectElement.options[0].style.color is ""
-PASS picker._selectElement.value is "0"
-PASS picker._selectElement.value is "1"
-PASS picker._selectElement.value is "1"
-PASS picker._selectElement.options.length is 2
-PASS picker._selectElement.children[0].label is "FOO"
-PASS picker._selectElement.children[1].label is "BAR"
-PASS picker._selectElement.children[2].tagName is "OPTGROUP"
-PASS picker._selectElement.children[2].label is "BAZ"
-PASS picker._selectElement.value is "1"
-FAIL picker._selectElement.value should be 2. Was 1.
+PASS picker.selectElement_.style.color is "rgb(123, 0, 0)"
+PASS picker.selectElement_.options[0].style.color is ""
+PASS picker.selectElement_.value is "0"
+PASS picker.selectElement_.value is "1"
+PASS picker.selectElement_.value is "1"
+PASS picker.selectElement_.options.length is 2
+PASS picker.selectElement_.children[0].label is "FOO"
+PASS picker.selectElement_.children[1].label is "BAR"
+PASS picker.selectElement_.children[2].tagName is "OPTGROUP"
+PASS picker.selectElement_.children[2].label is "BAZ"
+PASS picker.selectElement_.value is "1"
+FAIL picker.selectElement_.value should be 2. Was 1.
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt
index 5e3e453..d385c8cc 100644
--- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt
+++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt
@@ -1,10 +1,10 @@
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement.value is "bar"
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS menuElement.value is "bar"
-FAIL picker._selectElement.value should be 1. Was 2.
+FAIL picker.selectElement_.value should be 1. Was 2.
PASS menuElement.value is "bar"
-FAIL picker._selectElement.value should be 1. Was 2.
+FAIL picker.selectElement_.value should be 1. Was 2.
PASS menuElement.value is "bar"
FAIL Unexpected error: Uncaught TypeError: Cannot read properties of null (reading 'frameElement')
FAIL successfullyParsed should be true. Was false.
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-touch-operations-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-touch-operations-expected.txt
index 9f03956..702663b 100644
--- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-touch-operations-expected.txt
+++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-touch-operations-expected.txt
@@ -1,22 +1,22 @@
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement.value is "bar"
-PASS picker._selectElement.value is "0"
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "0"
+PASS picker.selectElement_.value is "2"
PASS internals.pagePopupWindow is null
PASS menuElement.value is "baz"
==> Test disabled option
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "2"
PASS menuElement.value is "baz"
-PASS picker._selectElement.value is "2"
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "2"
+PASS picker.selectElement_.value is "2"
PASS internals.pagePopupWindow is not null
PASS menuElement.value is "baz"
==> Test scrollable popup
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement2.value is "2"
-FAIL picker._selectElement.value should be 2. Was 3.
-PASS picker._selectElement.value is "3"
-PASS picker._selectElement.value is "0"
+FAIL picker.selectElement_.value should be 2. Was 3.
+PASS picker.selectElement_.value is "3"
+PASS picker.selectElement_.value is "0"
PASS internals.pagePopupWindow is not null
PASS menuElement2.value is "2"
==> Test popup closes on outside GestureTapDawn
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-update-from-element-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-update-from-element-expected.txt
index 2d42ba9a1..d6af1528 100644
--- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-update-from-element-expected.txt
+++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/fast/forms/select-popup/popup-menu-update-from-element-expected.txt
@@ -1,15 +1,15 @@
-PASS picker._selectElement.style.color is "rgb(123, 0, 0)"
-PASS picker._selectElement.options[0].style.color is ""
-PASS picker._selectElement.value is "0"
-PASS picker._selectElement.value is "1"
-PASS picker._selectElement.value is "1"
-PASS picker._selectElement.options.length is 2
-PASS picker._selectElement.children[0].label is "FOO"
-PASS picker._selectElement.children[1].label is "BAR"
-PASS picker._selectElement.children[2].tagName is "OPTGROUP"
-PASS picker._selectElement.children[2].label is "BAZ"
-PASS picker._selectElement.value is "1"
-FAIL picker._selectElement.value should be 2. Was 1.
+PASS picker.selectElement_.style.color is "rgb(123, 0, 0)"
+PASS picker.selectElement_.options[0].style.color is ""
+PASS picker.selectElement_.value is "0"
+PASS picker.selectElement_.value is "1"
+PASS picker.selectElement_.value is "1"
+PASS picker.selectElement_.options.length is 2
+PASS picker.selectElement_.children[0].label is "FOO"
+PASS picker.selectElement_.children[1].label is "BAR"
+PASS picker.selectElement_.children[2].tagName is "OPTGROUP"
+PASS picker.selectElement_.children[2].label is "BAZ"
+PASS picker.selectElement_.value is "1"
+FAIL picker.selectElement_.value should be 2. Was 1.
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-key-operations-expected.txt b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-key-operations-expected.txt
index ac7008f..dfff43d82 100644
--- a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-key-operations-expected.txt
+++ b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-key-operations-expected.txt
@@ -6,86 +6,86 @@
abc
xyz
==> Arrow keys + Enter
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "bar"
-PASS picker._selectElement.value is "4"
+PASS picker.selectElement_.value is "4"
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "garply"
-PASS picker._selectElement.value is "4"
+PASS picker.selectElement_.value is "4"
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "garply"
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "bar"
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "foo"
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "foo"
PASS internals.pagePopupWindow is null
PASS menu.value is "foo"
PASS internals.selectMenuListText(menu) is "foo"
==> Arrow keys + ESC
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS internals.selectMenuListText(menu) is "foo"
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menu.value is "foo"
PASS internals.selectMenuListText(menu) is "bar"
PASS internals.pagePopupWindow is null
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "bar"
==> Arrow keys + blur
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS internals.selectMenuListText(menu) is "foo"
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menu.value is "foo"
PASS internals.selectMenuListText(menu) is "bar"
PASS internals.pagePopupWindow is null
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "bar"
==> Typeahead + ESC
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS internals.selectMenuListText(menu) is "bar"
-PASS picker._selectElement.value is "4"
+PASS picker.selectElement_.value is "4"
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "garply"
PASS internals.pagePopupWindow is null
PASS menu.value is "garply"
PASS internals.selectMenuListText(menu) is "garply"
==> Hover + ESC
-PASS picker._selectElement.value is "4"
+PASS picker.selectElement_.value is "4"
PASS internals.selectMenuListText(menu) is "garply"
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS menu.value is "garply"
PASS internals.selectMenuListText(menu) is "garply"
PASS internals.pagePopupWindow is null
PASS menu.value is "garply"
PASS internals.selectMenuListText(menu) is "garply"
==> Hover + Invalid arrow + ESC
-PASS picker._selectElement.value is "4"
+PASS picker.selectElement_.value is "4"
PASS internals.selectMenuListText(menu) is "garply"
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS menu.value is "garply"
PASS internals.selectMenuListText(menu) is "garply"
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS menu.value is "garply"
PASS internals.selectMenuListText(menu) is "garply"
PASS internals.pagePopupWindow is null
PASS menu.value is "garply"
PASS internals.selectMenuListText(menu) is "garply"
==> Arrow key + Click
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS internals.selectMenuListText(menu) is "foo"
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menu.value is "foo"
PASS internals.selectMenuListText(menu) is "bar"
PASS internals.pagePopupWindow is null
PASS menu.value is "foo"
PASS internals.selectMenuListText(menu) is "foo"
==> Enter with no selected OPTION
-PASS picker._selectElement.value is ""
+PASS picker.selectElement_.value is ""
PASS internals.pagePopupWindow is null
PASS menu2.value is ""
PASS successfullyParsed is true
diff --git a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt
index 7feb772..a4c556e9 100644
--- a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt
+++ b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-mouse-operations-expected.txt
@@ -1,13 +1,13 @@
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement.value is "bar"
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS menuElement.value is "bar"
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement.value is "bar"
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement.value is "bar"
PASS internals.pagePopupWindow is not null
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "0"
PASS menuElement.value is "bar"
PASS clickEventCounter is 0
PASS mouseupEventCounter is 0
@@ -15,15 +15,15 @@
PASS menuElement.value is "baz"
PASS clickEventCounter is 1
PASS mouseupEventCounter is 1
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "2"
PASS internals.selectMenuListText(menu) is "baz"
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menu.value is "baz"
PASS internals.selectMenuListText(menu) is "bar"
PASS internals.pagePopupWindow is null
PASS menu.value is "bar"
PASS internals.selectMenuListText(menu) is "bar"
-PASS picker._selectElement.selectedOptions[0].label is "option20"
+PASS picker.selectElement_.selectedOptions[0].label is "option20"
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-multiline-title-expected.txt b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-multiline-title-expected.txt
index 589120c..a34d465b 100644
--- a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-multiline-title-expected.txt
+++ b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-multiline-title-expected.txt
@@ -1,4 +1,4 @@
-PASS picker._selectElement.options[0].title is "bar\nbaz"
+PASS picker.selectElement_.options[0].title is "bar\nbaz"
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-non-latin-update-from-element-expected.txt b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-non-latin-update-from-element-expected.txt
index 6f35d4d..23cf6ce 100644
--- a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-non-latin-update-from-element-expected.txt
+++ b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-non-latin-update-from-element-expected.txt
@@ -1,4 +1,4 @@
-PASS picker._selectElement.options[0].label is "いろはにほへと"
+PASS picker.selectElement_.options[0].label is "いろはにほへと"
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-touch-operations-expected.txt b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-touch-operations-expected.txt
index 1bc1bd72..2737b12 100644
--- a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-touch-operations-expected.txt
+++ b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-touch-operations-expected.txt
@@ -1,22 +1,22 @@
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement.value is "bar"
-PASS picker._selectElement.value is "0"
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "0"
+PASS picker.selectElement_.value is "2"
PASS internals.pagePopupWindow is null
PASS menuElement.value is "baz"
==> Test disabled option
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "2"
PASS menuElement.value is "baz"
-PASS picker._selectElement.value is "2"
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.value is "2"
+PASS picker.selectElement_.value is "2"
PASS internals.pagePopupWindow is not null
PASS menuElement.value is "baz"
==> Test scrollable popup
-PASS picker._selectElement.value is "1"
+PASS picker.selectElement_.value is "1"
PASS menuElement2.value is "2"
-PASS picker._selectElement.value is "2"
-PASS picker._selectElement.value is "3"
-PASS picker._selectElement.value is "0"
+PASS picker.selectElement_.value is "2"
+PASS picker.selectElement_.value is "3"
+PASS picker.selectElement_.value is "0"
PASS internals.pagePopupWindow is not null
PASS menuElement2.value is "2"
==> Test popup closes on outside GestureTapDawn
diff --git a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-update-from-element-expected.txt b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-update-from-element-expected.txt
index 4b042ec..f60ebc9 100644
--- a/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-update-from-element-expected.txt
+++ b/third_party/blink/web_tests/platform/win/fast/forms/select-popup/popup-menu-update-from-element-expected.txt
@@ -1,15 +1,15 @@
-PASS picker._selectElement.style.color is "rgb(123, 0, 0)"
-PASS picker._selectElement.options[0].style.color is ""
-PASS picker._selectElement.value is "0"
-PASS picker._selectElement.value is "1"
-PASS picker._selectElement.value is "1"
-PASS picker._selectElement.options.length is 2
-PASS picker._selectElement.children[0].label is "FOO"
-PASS picker._selectElement.children[1].label is "BAR"
-PASS picker._selectElement.children[2].tagName is "OPTGROUP"
-PASS picker._selectElement.children[2].label is "BAZ"
-PASS picker._selectElement.value is "1"
-PASS picker._selectElement.value is "2"
+PASS picker.selectElement_.style.color is "rgb(123, 0, 0)"
+PASS picker.selectElement_.options[0].style.color is ""
+PASS picker.selectElement_.value is "0"
+PASS picker.selectElement_.value is "1"
+PASS picker.selectElement_.value is "1"
+PASS picker.selectElement_.options.length is 2
+PASS picker.selectElement_.children[0].label is "FOO"
+PASS picker.selectElement_.children[1].label is "BAR"
+PASS picker.selectElement_.children[2].tagName is "OPTGROUP"
+PASS picker.selectElement_.children[2].label is "BAZ"
+PASS picker.selectElement_.value is "1"
+PASS picker.selectElement_.value is "2"
PASS successfullyParsed is true
TEST COMPLETE