| Index: third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js b/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
|
| index 2a2cb03bd15e6062cdea6878f92a303e2264fb94..a2d99dfa65f731160484df196a6927ced45df318 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
|
| @@ -277,6 +277,12 @@ Node.prototype.isComponentSelectionCollapsed = function() {
|
| * @return {boolean}
|
| */
|
| Node.prototype.hasSelection = function() {
|
| + // TODO(luoe): use contains(node, {includeShadow: true}) when it is fixed for shadow dom.
|
| + var contents = this.querySelectorAll('content');
|
| + for (var content of contents) {
|
| + if (Array.prototype.some.call(content.getDistributedNodes(), node => node.hasSelection()))
|
| + return true;
|
| + }
|
| if (this.isComponentSelectionCollapsed())
|
| return false;
|
| return this.getComponentSelection().containsNode(this, true);
|
|
|