WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
62528
Rename Document::setContainsFullScreenElementRecursively
https://bugs.webkit.org/show_bug.cgi?id=62528
Summary
Rename Document::setContainsFullScreenElementRecursively
Jer Noble
Reported
2011-06-12 22:21:30 PDT
Document::setContainsFullScreenElementRecursively is named poorly, as it does not actually use recursion. Also, make explicit that the function walks up the ancestor chain and crosses frame boundaries. (See Darin's comments in
https://bugs.webkit.org/show_bug.cgi?id=62507#c5
.)
Attachments
Patch
(7.07 KB, patch)
2011-06-13 01:14 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2011-06-13 01:14:45 PDT
Created
attachment 96933
[details]
Patch
Jer Noble
Comment 2
2011-06-13 01:18:53 PDT
In the end, I made setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries() a member function in Element (alongside setContainsFullScreenElement()), so it could be used so: m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true).
Darin Adler
Comment 3
2011-06-13 08:19:30 PDT
Comment on
attachment 96933
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=96933&action=review
> Source/WebCore/dom/Element.cpp:996 > - if (parentElement() && containsFullScreenElement() && !parentElement()->containsFullScreenElement()) > - document()->setContainsFullScreenElementRecursively(parentElement(), true); > + if (containsFullScreenElement() && parentElement() && !parentElement()->containsFullScreenElement()) > + setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true);
I don’t think the additional checks in this if statement are needed or helpful. I see no compelling reason to optimize for this case, and it seems it could cause problems if the element being inserted is the top level element; we’ll miss out on the code that follows the ownerElement pointer. But it may be that the top level element is never inserted into a tree at a time where this matters.
> Source/WebCore/dom/Element.cpp:1931 > +void Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(bool flag)
I probably would not make this a member function, just because I don’t want to have to modify Element.h every time I change it. But I think it’s OK as one.
WebKit Review Bot
Comment 4
2011-06-18 13:35:10 PDT
Comment on
attachment 96933
[details]
Patch Clearing flags on attachment: 96933 Committed
r89205
: <
http://trac.webkit.org/changeset/89205
>
WebKit Review Bot
Comment 5
2011-06-18 13:35:14 PDT
All reviewed patches have been landed. Closing bug.
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