mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
LibWeb: Add "focused frame" concept, one focused Frame per Page
Focus currently only moves when doing a mousedown in a frame.
This commit is contained in:
parent
d1d9545875
commit
6b4a7d1ee3
7 changed files with 35 additions and 0 deletions
|
@ -53,6 +53,11 @@ public:
|
|||
Web::Frame& main_frame() { return *m_main_frame; }
|
||||
const Web::Frame& main_frame() const { return *m_main_frame; }
|
||||
|
||||
Web::Frame& focused_frame();
|
||||
const Web::Frame& focused_frame() const { return const_cast<Page*>(this)->focused_frame(); }
|
||||
|
||||
void set_focused_frame(Badge<EventHandler>, Frame&);
|
||||
|
||||
void load(const URL&);
|
||||
|
||||
bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
|
||||
|
@ -67,6 +72,7 @@ private:
|
|||
PageClient& m_client;
|
||||
|
||||
RefPtr<Frame> m_main_frame;
|
||||
WeakPtr<Frame> m_focused_frame;
|
||||
};
|
||||
|
||||
class PageClient {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue