mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-22 07:27:55 +01:00
2f1e782f62
Frame identifiers have changed from int64_t to string type. This is due to https://crbug.com/1502660 which removes access to frame routing IDs in the renderer process. New cross-process frame identifiers are 160-bit values (32-bit child process ID + 128-bit local frame token) and most easily represented as strings. All other frame-related expectations and behaviors remain the same.
44 lines
1.7 KiB
Diff
44 lines
1.7 KiB
Diff
diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h
|
|
index 9cd08e8b26410..d2dca33bdc62e 100644
|
|
--- third_party/blink/public/web/web_element.h
|
|
+++ third_party/blink/public/web/web_element.h
|
|
@@ -82,6 +82,9 @@ class BLINK_EXPORT WebElement : public WebNode {
|
|
WebString TextContent() const;
|
|
WebString TextContentAbridged(unsigned int max_length) const;
|
|
WebString InnerHTML() const;
|
|
+ WebString AttributeLocalName(unsigned index) const;
|
|
+ WebString AttributeValue(unsigned index) const;
|
|
+ unsigned AttributeCount() const;
|
|
|
|
// Returns true if the element's contenteditable attribute is in the true
|
|
// state or in the plaintext-only state:
|
|
diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc
|
|
index 0c2400696ecbc..3dd6e5574eb39 100644
|
|
--- third_party/blink/renderer/core/exported/web_element.cc
|
|
+++ third_party/blink/renderer/core/exported/web_element.cc
|
|
@@ -116,6 +116,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
|
|
IGNORE_EXCEPTION_FOR_TESTING);
|
|
}
|
|
|
|
+unsigned WebElement::AttributeCount() const {
|
|
+ if (!ConstUnwrap<Element>()->hasAttributes())
|
|
+ return 0;
|
|
+ return ConstUnwrap<Element>()->Attributes().size();
|
|
+}
|
|
+
|
|
+WebString WebElement::AttributeLocalName(unsigned index) const {
|
|
+ if (index >= AttributeCount())
|
|
+ return WebString();
|
|
+ return ConstUnwrap<Element>()->Attributes().at(index).LocalName();
|
|
+}
|
|
+
|
|
+WebString WebElement::AttributeValue(unsigned index) const {
|
|
+ if (index >= AttributeCount())
|
|
+ return WebString();
|
|
+ return ConstUnwrap<Element>()->Attributes().at(index).Value();
|
|
+}
|
|
+
|
|
WebString WebElement::TextContent() const {
|
|
return ConstUnwrap<Element>()->textContent();
|
|
}
|