1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:07:45 +00:00

LibWebView: Create a PropertyTableModel helper class for table models

We currently have StylePropertiesModel and AriaPropertiesStateModel in
LibWebView. These depend on GUI::Model and GUI::ModelIndex, which is the
only reason that the non-Serenity Ladybird chromes require LibGUI.
Further, these classes are very nearly idenitical.

This creates a PropertyTableModel to provide the base functionality for
all table-based model types used by all Ladybird chromes. It contains
code common to the style / ARIA table models, and handles the slight
differences between the two (namely, just the manner in which the values
are flattened into a list during construction).

The Qt and Serenity chromes can create thin wrappers around this class
to adapt its interface to their chrome-specific model classes (i.e.
QAbstractItemModel and GUI::Model).
This commit is contained in:
Timothy Flynn 2023-11-04 14:05:25 -04:00 committed by Andreas Kling
parent 3999c74237
commit 4d356cfca5
3 changed files with 145 additions and 0 deletions

View file

@ -8,6 +8,7 @@ set(SOURCES
Database.cpp
DOMTreeModel.cpp
History.cpp
PropertyTableModel.cpp
RequestServerAdapter.cpp
SearchEngine.cpp
SourceHighlighter.cpp