mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Notify the PageClient when the children of <title> change
This commit is contained in:
parent
2a5877b02c
commit
4c8dbc908c
Notes:
sideshowbarker
2024-07-19 00:46:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4c8dbc908c3
2 changed files with 12 additions and 0 deletions
|
@ -24,7 +24,9 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLTitleElement.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -37,4 +39,11 @@ HTMLTitleElement::~HTMLTitleElement()
|
|||
{
|
||||
}
|
||||
|
||||
void HTMLTitleElement::children_changed()
|
||||
{
|
||||
HTMLElement::children_changed();
|
||||
if (auto* page = document().page())
|
||||
page->client().page_did_change_title(document().title());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,6 +36,9 @@ public:
|
|||
|
||||
HTMLTitleElement(DOM::Document&, const QualifiedName& qualified_name);
|
||||
virtual ~HTMLTitleElement() override;
|
||||
|
||||
private:
|
||||
virtual void children_changed() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue