Commit e80e79ab authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[breadcrumb] Make getBreadcrumbButtons private

This API was public: I assumed I would need for testing. Turns out no,
it's not needed for testing, so make it private.

Bug: 1035691, 1061388
Change-Id: I1672d1e9764de5d98ba87b29f0a7823a35dda844
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2143095
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757726}
parent 826aa0ce
......@@ -311,8 +311,9 @@ class BreadCrumb extends HTMLElement {
* its parts, which are stored in the <button>.textContent.
*
* @return {!Array<HTMLButtonElement>}
* @private
*/
getBreadcrumbButtons() {
getBreadcrumbButtons_() {
const parts = this.shadowRoot.querySelectorAll('button[id]:not([hidden])');
if (this.parts_.length <= 4) {
return Array.from(parts);
......@@ -332,7 +333,7 @@ class BreadCrumb extends HTMLElement {
* attribute on the returned buttons.
*/
getEllipsisButtons() {
return this.getBreadcrumbButtons().filter(button => {
return this.getBreadcrumbButtons_().filter(button => {
if (!button.hasAttribute('has-tooltip') && button.offsetWidth) {
return button.offsetWidth < button.scrollWidth;
}
......@@ -375,7 +376,7 @@ class BreadCrumb extends HTMLElement {
}
if (element instanceof HTMLButtonElement) {
const parts = this.getBreadcrumbButtons();
const parts = this.getBreadcrumbButtons_();
this.signal_(parts.indexOf(element));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment