Use `Meta/serenity.sh build lagom MacPDF` to build, and either of
`open Build/lagom/bin/MacPDF.app` or
`Build/lagom/bin/MacPDF.app/Contents/MacOS/MacPDF` to run.
Xcode used to insert a bunch of things to Info.plist. Now it can
no longer do that, so manually put them there
1. main.m is now main.mm
2. MainMenu.xib is now no longer in a Base.lproj subfolder
3. Remove SerenityPDF.entitlements since it won't be used in our CMake
build
xib changes:
* Add a "Go" toplevel submenu
* Put a "Go to Page..." menu item in it
* Add showGoToPageDialog: to first responder
* Bind action of new menu item to that
The dialog is just a janky NSAlert for now.
This is a bit janky for several reasons:
* `initialize` is now no longer called on a bg thread
* sheet UI is janky both visually and from an implementation PoV
But hey, it works for now.
This works great when quitting and reopening the app,
but when closing a window and the reopening from Recent Files,
the current page isn't restored. In Preview.app, it is.
In the end, apparently I had "Close windows when quitting an
application" enabled in Desktop & Dock in System Settings. With that
turned off, it just worked (...but I still need to serialize the current
page in the view).
Even with it turned off, cmd-opt-q would "Quit and Keep Windows",
so I could've also used that for testing.
Automatic termination means that the app no longer shows up as
opened in the doc when the last Window is closed, but it's actually
still running and opens immediately when clicked again.
Sudden termination means that the app can close quickly on logout.
I think it means the runtime just calls _exit() and assumes all
data is saved continuously.
There are an unfortunate number of DeprecatedString conversions required
here, but these should all fall away and look much more pretty again
when other places are also ported away from DeprecatedString.
Leaves only the Element IDL interface left :^)
This isn't included in the base definition of a CSS-wide keyword, but
the CASCADE-4 spec which adds it says:
> The revert CSS-wide keyword rolls back the cascade to the cascaded
value of the earlier origin.
So it is one. While I'm at it, rename `is_builtin()` to match the spec
terminology. It's not used currently, but will be in the next commit.
For now, part of this is commented-out. Our current implementations of
`<mask>` and `<symbol>` rely on creating layout nodes, so they can't be
`display: none`.
And implement WindowProperties, the "named properties object" for Window
according to the spec.
This involves moving an AO out of LegacyPlatformObject and into a common
place that the WindowProperties class can access.
This doesn't implement the AOs on Window that actually name lookup for
the unenumerable named properties on the window yet, just the
scaffolding.
The `to_string()` for this is modified a little from the original,
because we have to calculate what the layer-count is then, instead of
having it already calculated.