The previous demo didn't work that well, not due to any LibWeb
issue (same in other browsers), it just was a broken demo.
This demo shows the neat tricks you can do with linear-gradient()s
much better.
Previously, during a m_might_drag mouse_up event, we were updating
the selection directly, which caused the selection to be accurate
but the location of the cursor index to be stale/incorrect. The
side effect of this is then future events may point to the wrong
index.
Instead, call the set_cursor function with SelectionUpdate::Set,
which handles both updating the cursor index as well as the
selection index.
See: https://css-tricks.com/html5-progress-element/ this is a neat
demo of a pure CSS progress bar that makes use of linear-gradients,
background-repeat, and background-size. All of which now work :^)
This commit moves both the ImageStyleValue and LinearGradientStyleValue
to a common base class of AbstractImageStyleValue. This abstracts
getting the natural_width/height, loading/resolving, and painting
the image.
Now for 'free' you get:
- Linear gradients working with the various background sizing/repeat
properties.
- Linear gradients working as list-markers :^) -- best feature ever!
P.s. This commit is a little large as it's tricky to make this change
incrementally without breaking things.
Add a variant of auto formatting using clang-format that doesn't use
additional packages. It works by adding a buffer-local hook to
`'before-save` for all C++ project files.
Previously the clip rect was not relative to the top/left egdes
of the element, which lead to it being positioned incorrectly.
This fixes the clip-rect-auto-004 and clip-rect-auto-005 web
platform tests.
Previously absolutely positioned boxes could only have a % height if
their parent had a absolute height (a height in pixels, em, etc).
This broke some websites/demos such as the "Francine CSS oil painting",
which starts to appear after this commit.
Francine: https://diana-adrianne.com/purecss-francine/
The -webkit version of linear-gradient does not include the `to`
before a <side or corner>. The angles of the <side or corner>
for the webkit version are also opposite that of the standard one.
So for the standard: linear-gradient(to left, red, blue)
The webkit version is: -webkit-linear-gradient(right, red, blue)
Adding the `to` in the -webkit version is invalid, omitting it in
the standard one is also invalid.
This makes sure that the debug message are properly aligned when running
the kernel bare-metal on a Raspberry Pi. While we are here, also move
the function out of line.
Defer serialization of the concatenated strings until later. This is
used heavily in SunSpider's string-validate-input subtest, which
sees a small progression.
Instead of concatenating string data every time you add two strings
together in JavaScript, we now create a new PrimitiveString that points
to the two concatenated strings instead.
This turns concatenated strings into a tree structure that doesn't have
to be serialized until someone wants the characters in the string.
This *dramatically* reduces the peak memory footprint when running
the SunSpider benchmark (from ~6G to ~1G on my machine). It's also
significantly faster (1.39x) :^)
This commit adds more colorized emojis.
🌻 - U+1F33B SUNFLOWER
🐌 - U+1F40C SNAIL
👑 - U+1F451 CROWN
📵 - U+1F4F5 NO MOBILE PHONES
🥇 - U+1F947 FIRST PLACE MEDAL
🥈 - U+1F948 SECOND PLACE MEDAL
🥑 - U+1F951 AVOCADO
🥕 - U+1F955 CARROT
🩸 - U+1FA78 DROP OF BLOOD
Converts Minesweeper's main widget to GML, polishes the custom
game window, formats the clock as human readable digital time, and
defers invoking Field's callback until the main widget has finished
relayout. Fixes inability to downsize the main window when shrinking
field size.
This patch replaces the concept of fixed resizees with opportunistic
ones which use the new SpecialDimension::OpportunisticGrow UISize.
This lets us simplify splitter resize code and take advantage of
the layout system's automatic calculations for minimum size and
expansion. Functionally the same as before, but fixes Splitter's
unintended ability to grow window size.