Age | Commit message (Collapse) | Author |
|
This is an easy check to add and seems like it makes things a
tiny bit smoother.
|
|
|
|
The only accepted syntax for these seems to be
<color> <length percentage> <length percentage>, no other order.
But that's just gathered from looking at other browsers as though
these are supported by all major browsers, they don't appear in
the W3C spec.
|
|
Required by Discord, which polyfills it by taking the existing native
object, polyfilling missing functions and setting window.performance to
it.
This is a hard requirement as this is done in strict mode with no
try/catch and thus causes their JavaScript to stop progressing.
|
|
|
|
|
|
Including `-webkit-repeating-linear-gradient()`
|
|
This is a basic attempt at trying to handle parent container case
justify-content: flex-end.
Test-scenario:
Head to https://ryanwatkins.me and note that now the header nav is on
the right as opposed to the left in-line with how Chrome/Firefox would
respectively handle it also, i.e. 'flex-end'
Implementation:
Move cursor to the end and render in reverse backwards shifting the
cursor leftwards.
|
|
Using the fact that there are 2^52-2 NaN representations we can
"NaN-box" all the Values possible. This means that Value no longer has
an explicit "Type" but that information is now stored in the bits of a
double. This is done by "tagging" the top two bytes of the double.
For a full explanation see the large comment with asserts at the top of
Value.
We can also use the exact representation of the tags to make checking
properties like nullish, or is_cell quicker. But the largest gains are
in the fact that the size of a Value is now halved.
The SunSpider and other benchmarks have been ran to confirm that there
are no regressions in performance compared to the previous
implementation. The tests never performed worse and in some cases
performed better. But the biggest differences can be seen in memory
usage when large arrays are allocated. A simple test which allocates a
1000 arrays of size 100000 has roughly half the memory usage.
There is also space in the representations for future expansions such as
tuples and records.
To ensure that Values on the stack and registers are not lost during
garbage collection we also have to add a check to the Heap to check for
any of the cell tags and extracting the canonical form of the pointer
if it matches.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Again, this is an entirely virtual class since the methods involve
direct access to the Painter. Though, maybe I could just expose the
Painter...
|
|
This one requires drawing to the canvas, so it doesn't make so much
sense to move the implementation over.
|
|
|
|
|
|
The implementation of this got a little funky, because it has to access
methods from CanvasState.
|
|
As with CanvasPath, this is to better match the spec IDL.
|
|
|
|
|
|
This better matches the spec, and makes it possible for things like
Path2D to reuse the same implementation without duplicate code. :^)
|
|
|
|
If absolutely positioned divs do not have a fixed position, then their
position must be calculated based off of the position of their parent
and their siblings.
|
|
Factor out the code that computes the vertical position of a Box with
respect to its siblings so that it can be used when computing the
absolutely positioned divs as well.
|
|
These allow you to specify the point were the gradient transitions
from one color to the next (without a transition hint the transition
occurs at the point 50% of the way between the two colors).
There is a little bit of guesswork in this implementation as the
specification left out how hints work with the color stop fixup,
though it appears that they are treated the same as color stops.
|
|
|
|
Without this the background-image can be painted up to 8 extra
times, that contribute nothing to the final image.
|
|
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.
|
|
This fixes the clip-rect-comma-002, clip-rect-comma-003, and
clip-rect-comma-004 web platform tests.
|
|
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.
|
|
This fixes the clip-absolute-positioned-002 web platform test.
|
|
Fix implementation of to_string() for RectStyleValue so that it can be
used by JS.
|
|
With this you can start to see Francine's face in the CSS oil painting
(https://diana-adrianne.com/purecss-francine/)
|
|
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/
|
|
Implement clip when it is defined in the css property 'clip' as a rect
according to spec; only when the div is absolutely positioned.
|
|
When a rect value is passed to the clip property via CSS, keep it in
ComputedValues so that at a later stage can make use of it.
|
|
Add ability to parse a rect when it is used as the value of a style
property.
|
|
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.
|
|
The changes from 8a03b17 to allow any JS::Value aren't a good fit, as
shown by the excessive amount of verify_cast needed :^)
|
|
|
|
This fixes an issue where iframes hidden with CSS `visibility: none`
would still be visible.
|
|
Assignments actually forward to window.location.href, as the spec
requires. Since the window object is implemented by hand, this looks a
little janky. Eventually we should move all this stuff to IDL.
|
|
This patch implements the "create a new browsing context" function from
the HTML spec and replaces our existing logic with it.
The big difference is that browsing contexts now initially navigate to
"about:blank" instead of starting out in a strange "empty" state.
This makes it possible for websites to create a new iframe and start
scripting inside it right away, without having to load an URL into it.
|
|
|
|
This will allow us to remember an arbitrary origin instead of deriving
it from the document's URL.
|
|
|
|
...instead of doing a string compare on the DOCTYPE node.
|