diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 10:22:43 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 12:36:28 +0000 |
commit | 271a6c3487a14599023a9106329505597638d793 (patch) | |
tree | e040d58ffc86c1480b79ca8528020ca9ec919bf8 /chromium/third_party/blink/renderer/core/xml/xpath_functions.cc | |
parent | 7b2ffa587235a47d4094787d72f38102089f402a (diff) | |
download | qtwebengine-chromium-271a6c3487a14599023a9106329505597638d793.tar.gz |
BASELINE: Update Chromium to 77.0.3865.59
Change-Id: I1e89a5f3b009a9519a6705102ad65c92fe736f21
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/xml/xpath_functions.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/xml/xpath_functions.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chromium/third_party/blink/renderer/core/xml/xpath_functions.cc b/chromium/third_party/blink/renderer/core/xml/xpath_functions.cc index f34df6c908d..c16650bffe2 100644 --- a/chromium/third_party/blink/renderer/core/xml/xpath_functions.cc +++ b/chromium/third_party/blink/renderer/core/xml/xpath_functions.cc @@ -382,7 +382,7 @@ static inline String ExpandedNameLocalPart(Node* node) { // But note that Blink does not support namespace nodes. switch (node->getNodeType()) { case Node::kElementNode: - return ToElement(node)->localName(); + return To<Element>(node)->localName(); case Node::kAttributeNode: return To<Attr>(node)->localName(); case Node::kProcessingInstructionNode: @@ -395,7 +395,7 @@ static inline String ExpandedNameLocalPart(Node* node) { static inline String ExpandedNamespaceURI(Node* node) { switch (node->getNodeType()) { case Node::kElementNode: - return ToElement(node)->namespaceURI(); + return To<Element>(node)->namespaceURI(); case Node::kAttributeNode: return To<Attr>(node)->namespaceURI(); default: @@ -408,7 +408,7 @@ static inline String ExpandedName(Node* node) { switch (node->getNodeType()) { case Node::kElementNode: - prefix = ToElement(node)->prefix(); + prefix = To<Element>(node)->prefix(); break; case Node::kAttributeNode: prefix = To<Attr>(node)->prefix(); @@ -629,10 +629,9 @@ Value FunLang::Evaluate(EvaluationContext& context) const { const Attribute* language_attribute = nullptr; Node* node = context.node.Get(); while (node) { - if (node->IsElementNode()) { - Element* element = ToElement(node); + if (auto* element = DynamicTo<Element>(node)) language_attribute = element->Attributes().Find(xml_names::kLangAttr); - } + if (language_attribute) break; node = node->parentNode(); |