Title: [253714] branches/safari-608-branch/Source/WebCore
- Revision
- 253714
- Author
- [email protected]
- Date
- 2019-12-18 13:43:58 -0800 (Wed, 18 Dec 2019)
Log Message
Cherry-pick r253653. rdar://problem/58049166
Document::setFocusedElement should not set m_focusedElement to an element in another document
https://bugs.webkit.org/show_bug.cgi?id=205325
Reviewed by Wenson Hsieh.
Added an early exit for when the newly focused element had moved
while blurring the previously focused element.
* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (253713 => 253714)
--- branches/safari-608-branch/Source/WebCore/ChangeLog 2019-12-18 21:43:56 UTC (rev 253713)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog 2019-12-18 21:43:58 UTC (rev 253714)
@@ -1,5 +1,36 @@
2019-12-18 Dan Robson <[email protected]>
+ Cherry-pick r253653. rdar://problem/58049166
+
+ Document::setFocusedElement should not set m_focusedElement to an element in another document
+ https://bugs.webkit.org/show_bug.cgi?id=205325
+
+ Reviewed by Wenson Hsieh.
+
+ Added an early exit for when the newly focused element had moved
+ while blurring the previously focused element.
+
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedElement):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-12-16 Ryosuke Niwa <[email protected]>
+
+ Document::setFocusedElement should not set m_focusedElement to an element in another document
+ https://bugs.webkit.org/show_bug.cgi?id=205325
+
+ Reviewed by Wenson Hsieh.
+
+ Added an early exit for when the newly focused element had moved
+ while blurring the previously focused element.
+
+ * dom/Document.cpp:
+ (WebCore::Document::setFocusedElement):
+
+2019-12-18 Dan Robson <[email protected]>
+
Cherry-pick r253563. rdar://problem/58049160
Consider top-level context whose origin is unique as insecure
Modified: branches/safari-608-branch/Source/WebCore/dom/Document.cpp (253713 => 253714)
--- branches/safari-608-branch/Source/WebCore/dom/Document.cpp 2019-12-18 21:43:56 UTC (rev 253713)
+++ branches/safari-608-branch/Source/WebCore/dom/Document.cpp 2019-12-18 21:43:58 UTC (rev 253714)
@@ -4181,6 +4181,11 @@
}
if (newFocusedElement && newFocusedElement->isFocusable()) {
+ if (&newFocusedElement->document() != this) {
+ // Bluring oldFocusedElement may have moved newFocusedElement across documents.
+ focusChangeBlocked = true;
+ goto SetFocusedNodeDone;
+ }
if (newFocusedElement->isRootEditableElement() && !acceptsEditingFocus(*newFocusedElement)) {
// delegate blocks focus change
focusChangeBlocked = true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes