WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
122431
Move FocusController from Page to MainFrame
https://bugs.webkit.org/show_bug.cgi?id=122431
Summary
Move FocusController from Page to MainFrame
Darin Adler
Reported
2013-10-06 16:50:54 PDT
Move FocusController from Page to MainFrame
Attachments
Patch
(101.12 KB, patch)
2013-10-06 16:57 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(104.30 KB, patch)
2013-10-06 18:21 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(108.33 KB, patch)
2013-10-07 19:41 PDT
,
Darin Adler
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2
(288.31 KB, application/zip)
2013-10-07 20:19 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
(191.20 KB, application/zip)
2013-10-10 08:07 PDT
,
Build Bot
no flags
Details
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2013-10-06 16:57:00 PDT
Created
attachment 213541
[details]
Patch
Andreas Kling
Comment 2
2013-10-06 17:16:46 PDT
Comment on
attachment 213541
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=213541&action=review
> Source/WebCore/dom/Element.cpp:1959 > + if (!frame->mainFrame().focus().setFocusedElement(this, *document().frame(), direction))
*document().frame() -> *frame
> Source/WebCore/page/EventHandler.cpp:3319 > - bool changedFocusedFrame = m_frame.page() && &m_frame != &m_frame.page()->focusController().focusedOrMainFrame(); > + bool changedFocusedFrame = m_frame.page() && &m_frame != &m_frame.mainFrame().focus().focusedOrMainFrame();
I think we can lose the m_frame.page() check here. I suspect it was just there due to pointer paranoia.
> Source/WebCore/page/EventHandler.cpp:3341 > - bool changedFocusedFrame = m_frame.page() && &m_frame != &m_frame.page()->focusController().focusedOrMainFrame(); > + bool changedFocusedFrame = m_frame.page() && &m_frame != &m_frame.mainFrame().focus().focusedOrMainFrame();
Ditto.
> Source/WebCore/page/FocusController.cpp:200 > - m_focusedFrame = newFrame; > + if (oldFrame != &m_mainFrame) > + oldFrame->deref(); > + if (newFrame != &m_mainFrame) > + newFrame->ref(); > + m_focusedFrame = newFrame.get();
This could probably use a comment.
> Source/WebCore/page/FocusController.cpp:357 > + document.setFocusedElement(0);
nullptr
> Source/WebCore/page/FocusController.cpp:429 > +// @param start The node from which to start searching. The node after this will be focused. May be null. > +// > +// @return The focus node that comes after/before start node.
I know you are just moving them, but these comments sure look out-of-place in WebKit.
> Source/WebCore/page/FocusController.cpp:784 > + Node* focusedNode = (m_focusedFrame && m_focusedFrame->document()) ? m_focusedFrame->document()->focusedElement() : 0;
Looks like this should be an Element*.
> Source/WebCore/page/FocusController.h:86 > + Frame* m_focusedFrame;
Bug! This is missing from the constructor initializer list.
Darin Adler
Comment 3
2013-10-06 18:21:43 PDT
Created
attachment 213548
[details]
Patch
EFL EWS Bot
Comment 4
2013-10-06 18:30:17 PDT
Comment on
attachment 213548
[details]
Patch
Attachment 213548
[details]
did not pass efl-ews (efl): Output:
http://webkit-queues.appspot.com/results/3363092
Andreas Kling
Comment 5
2013-10-06 18:33:59 PDT
Comment on
attachment 213548
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=213548&action=review
EWS looks sick, so I'm just dumping some comments for now:
> Source/WebCore/css/SelectorChecker.cpp:414 > + Frame* frame = element->document().frame(); > + return !frame || !frame->mainFrame().focus().isActive();
I wonder if we can really find ourselves matching selectors while Document is Frame-less. isFrameFocused(Element*) in the same file seems to indicate that we could, but I'm not sure. Our future selves can figure that out.
> Source/WebCore/page/Page.cpp:421 > + if (!m_mainFrame) > + return;
This should not happen. m_mainFrame is initialized by the Page constructor and never cleared.
> Source/WebCore/page/Page.cpp:563 > + if (!m_mainFrame) > + return false;
Same here.
EFL EWS Bot
Comment 6
2013-10-06 18:44:47 PDT
Comment on
attachment 213548
[details]
Patch
Attachment 213548
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/3521053
Build Bot
Comment 7
2013-10-06 18:48:20 PDT
Comment on
attachment 213548
[details]
Patch
Attachment 213548
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/3515058
Build Bot
Comment 8
2013-10-06 19:04:19 PDT
Comment on
attachment 213548
[details]
Patch
Attachment 213548
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/3521057
Build Bot
Comment 9
2013-10-06 19:05:45 PDT
Comment on
attachment 213548
[details]
Patch
Attachment 213548
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/3514058
kov's GTK+ EWS bot
Comment 10
2013-10-06 23:36:33 PDT
Comment on
attachment 213548
[details]
Patch
Attachment 213548
[details]
did not pass gtk-ews (gtk): Output:
http://webkit-queues.appspot.com/results/3563013
Darin Adler
Comment 11
2013-10-07 19:41:28 PDT
Created
attachment 213640
[details]
Patch
Build Bot
Comment 12
2013-10-07 20:18:59 PDT
Comment on
attachment 213640
[details]
Patch
Attachment 213640
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/3746009
New failing tests: compositing/backface-visibility/backface-visibility-hierarchical-transform.html accessibility/anchor-linked-anonymous-block-crash.html compositing/absolute-inside-out-of-view-fixed.html animations/3d/matrix-transform-type-animation.html animations/3d/state-at-end-event-transform.html animations/added-while-suspended.html animations/animation-add-events-in-handler.html animations/additive-transform-animations.html animations/3d/replace-filling-transform.html accessibility/accessibility-object-detached.html compositing/backface-visibility/backface-visibility-3d.html accessibility/accessibility-node-reparent.html animations/animation-border-overflow.html http/tests/appcache/abort-cache-onchecking-resource-404.html compositing/animation/animation-compositing.html canvas/philip/tests/2d.canvas.readonly.html animations/3d/change-transform-in-end-event.html compositing/absolute-position-changed-in-composited-layer.html compositing/animation/animated-composited-inside-hidden.html http/tests/appcache/abort-cache-onchecking-manifest-404.html canvas/philip/tests/2d.canvas.reference.html canvas/philip/tests/2d.clearRect+fillRect.alpha0.5.html http/tests/appcache/404-resource.html animations/3d/transform-origin-vs-functions.html accessibility/accessibility-node-memory-management.html http/tests/appcache/abort-cache-onchecking.html accessibility/adjacent-continuations-cause-assertion-failure.html http/tests/appcache/404-manifest.html canvas/philip/tests/2d.clearRect+fillRect.basic.html canvas/philip/tests/2d.clearRect+fillRect.alpha0.html
Build Bot
Comment 13
2013-10-07 20:19:02 PDT
Created
attachment 213644
[details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-14 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
EFL EWS Bot
Comment 14
2013-10-07 20:20:40 PDT
Comment on
attachment 213640
[details]
Patch
Attachment 213640
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/3713086
Build Bot
Comment 15
2013-10-07 20:24:59 PDT
Comment on
attachment 213640
[details]
Patch
Attachment 213640
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/3708064
EFL EWS Bot
Comment 16
2013-10-07 20:38:52 PDT
Comment on
attachment 213640
[details]
Patch
Attachment 213640
[details]
did not pass efl-ews (efl): Output:
http://webkit-queues.appspot.com/results/3746015
kov's GTK+ EWS bot
Comment 17
2013-10-07 21:52:39 PDT
Comment on
attachment 213640
[details]
Patch
Attachment 213640
[details]
did not pass gtk-ews (gtk): Output:
http://webkit-queues.appspot.com/results/3342079
Build Bot
Comment 18
2013-10-10 08:07:55 PDT
Comment on
attachment 213640
[details]
Patch
Attachment 213640
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/3868020
New failing tests: compositing/backface-visibility/backface-visibility-hierarchical-transform.html compositing/absolute-inside-out-of-view-fixed.html animations/3d/matrix-transform-type-animation.html animations/3d/state-at-end-event-transform.html animations/added-while-suspended.html animations/animation-add-events-in-handler.html animations/additive-transform-animations.html animations/3d/replace-filling-transform.html accessibility/accessibility-object-detached.html compositing/backface-visibility/backface-visibility-3d.html accessibility/accessibility-node-reparent.html animations/animation-border-overflow.html http/tests/appcache/abort-cache-onchecking-resource-404.html compositing/animation/animation-compositing.html canvas/philip/tests/2d.canvas.readonly.html animations/3d/change-transform-in-end-event.html compositing/animation/busy-indicator.html compositing/absolute-position-changed-in-composited-layer.html compositing/animation/animated-composited-inside-hidden.html http/tests/appcache/abort-cache-onchecking-manifest-404.html canvas/philip/tests/2d.canvas.reference.html canvas/philip/tests/2d.clearRect+fillRect.alpha0.5.html accessibility/accessibility-node-memory-management.html compositing/backface-visibility/backface-visibility-image.html compositing/backface-visibility/backface-visibility-non3d.html accessibility/adjacent-continuations-cause-assertion-failure.html http/tests/appcache/404-manifest.html http/tests/appcache/404-resource.html compositing/absolute-position-changed-with-composited-parent-layer.html canvas/philip/tests/2d.clearRect+fillRect.alpha0.html
Build Bot
Comment 19
2013-10-10 08:07:58 PDT
Created
attachment 213885
[details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Darin Adler
Comment 20
2018-12-13 21:37:30 PST
Chris removed MainFrame so this idea doesn’t apply any more.
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