Rework UI lifecycle, finish renaming & cleanup

This commit is contained in:
Luke Street
2026-08-19 21:43:35 -06:00
parent fd0e33460f
commit 3ecd785ac2
36 changed files with 536 additions and 526 deletions
+9
View File
@@ -101,6 +101,15 @@ bool Document::focus() {
return false;
}
bool Document::has_focus() const {
if (mDocument == nullptr) {
return false;
}
auto* context = mDocument->GetContext();
const auto* focused = context != nullptr ? context->GetFocusElement() : nullptr;
return focused != nullptr && focused->GetOwnerDocument() == mDocument;
}
bool Document::set_document_styles(const Rml::String& rcss) {
if (rcss.empty()) {
mDocumentStyleSheets = nullptr;