WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
189824
Rename Frame to BrowsingContext
https://bugs.webkit.org/show_bug.cgi?id=189824
Summary
Rename Frame to BrowsingContext
Antti Koivisto
Reported
2018-09-21 03:16:23 PDT
"Frame" is a confusing name for a non-visual object. "Browsing context" is an HTML spec term that matches well what the Frame class actually represents. We literally have this code in Document: bool hasBrowsingContext() const { return !!frame(); }
Attachments
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2018-09-21 06:22:58 PDT
oh wow
Geoffrey Garen
Comment 2
2018-09-24 14:21:32 PDT
Is it possible to make a browsing context that is not a frame?
Chris Dumez
Comment 3
2018-09-24 14:25:58 PDT
(In reply to Geoffrey Garen from
comment #2
)
> Is it possible to make a browsing context that is not a frame?
AFAIK, Frame in WebKit and "Browsing Context" in the HTML spec are synonymous. Calling it "Browsing Context" would align us nicely with the HTML spec and make it easier to implement spec text. However, I personally feel that a "Frame" is a clearer concept than a "Browsing Context". If I were not familiar with the HTML spec, I would have no idea what a browsing context is. However, it is pretty obvious what a Frame is.
Alex Christensen
Comment 4
2018-09-24 14:26:59 PDT
Could we rename iframe to ibrowsingcontext, too?
Chris Dumez
Comment 5
2018-09-24 14:28:16 PDT
(In reply to Alex Christensen from
comment #4
)
> Could we rename iframe to ibrowsingcontext, too?
I *think* this is a joke but iframe is already named HTMLIFrameElement, as per the HTML specification.
Chris Dumez
Comment 6
2018-09-24 14:30:33 PDT
I personally kind of like the current situation where it is named Frame but there is a hasBrowsingContext() utility function that helps us match the HTML spec text. Also note that in the future, we plan to have a Remote / Local version of Frame for out-of-process iframes.
Ryosuke Niwa
Comment 7
2018-09-24 15:27:27 PDT
I'm conflicted about this too. I *think* browsing context is a common enough spec jargon which appears frequently enough that anyone seriously working on a browser engine needs to be familiar with. However, I agree with Chris that the idea of a frame is a lot simpler to understand than the abstract concept of a browsing context. Maybe we can call it BrowsingContextFrame / FrameBrowsingContext? Another alternative is to add a comment saying a frame is a browsing context. But overall, having to be aware of two different terms to mean the same thing is worse than either calling it a browsing context or a frame. So I'd vote for renaming Frame to BrowsingContext if any.
Chris Dumez
Comment 8
2018-09-24 15:30:16 PDT
Yes, I would not be opposed to renaming to BrowsingContext. Maybe we should just get used to using the HTML spec terms.
Antti Koivisto
Comment 9
2018-09-25 03:54:58 PDT
(In reply to Alex Christensen from
comment #4
)
> Could we rename iframe to ibrowsingcontext, too?
I think this confusion points out why this might be a good idea.
Alex Christensen
Comment 10
2018-09-25 11:35:39 PDT
> > Could we rename iframe to ibrowsingcontext, too? > I think this confusion points out why this might be a good idea.
This was indeed a joke. It was showing that "frame" is also used in the html spec to refer to a browsing context as a point to oppose this change.
Alex Christensen
Comment 11
2018-09-25 11:36:21 PDT
We also have WKFrameInfo
Ryosuke Niwa
Comment 12
2018-09-25 11:56:46 PDT
(In reply to Alex Christensen from
comment #10
)
> > > Could we rename iframe to ibrowsingcontext, too? > > I think this confusion points out why this might be a good idea. > This was indeed a joke. It was showing that "frame" is also used in the > html spec to refer to a browsing context as a point to oppose this change.
You mean a frame element? WebCore::Frame definitely does not represent a frame element though. The word "frame" is usually used to prefer to a frame of a screen / video in the HTML spec. e.g.
https://html.spec.whatwg.org/#poster-frame
It's true that some specs colloquially refer to a browsing context as a "frame" but that's more of a legacy, and the state-of-art term going forward in the spec land is really browsing context. (In reply to Alex Christensen from
comment #11
)
> We also have WKFrameInfo
Yeah, and WKFrame and what not. Again, it's hard to tell which names would be better but since we don't have the power to change the terminology in the spec, we're probably better off alining ourselves to the spec rather than keep using a different name.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug