mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Change CefFrame::GetName() to return assigned name if it is non-empty before returning unique name (issue #2403)
This commit is contained in:
committed by
Marshall Greenblatt
parent
3018e1866b
commit
e312a35ef3
@@ -24,7 +24,14 @@ int64_t GetIdentifier(blink::WebLocalFrame* frame) {
|
||||
return webkit_glue::kInvalidFrameId;
|
||||
}
|
||||
|
||||
std::string GetUniqueName(blink::WebLocalFrame* frame) {
|
||||
std::string GetName(blink::WebLocalFrame* frame) {
|
||||
DCHECK(frame);
|
||||
// Return the assigned name if it is non-empty. This represents the name
|
||||
// property on the frame DOM element. If the assigned name is empty, revert to
|
||||
// the internal unique name.
|
||||
if (frame->AssignedName().length() > 0) {
|
||||
return frame->AssignedName().Utf8();
|
||||
}
|
||||
content::RenderFrameImpl* render_frame =
|
||||
content::RenderFrameImpl::FromWebFrame(frame);
|
||||
DCHECK(render_frame);
|
||||
|
Reference in New Issue
Block a user