mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
Overflow clipping is currently implemented as: 1. Create clip frame for each box with hidden overflow 2. Calculate clip rect for each clip frame by intersecting padding boxes of all boxes with hidden overflow in containing block chain 3. Assign enclosing clip frame (closest clip frame in containing block chain) to each PaintableBox 4. Apply clip rect of enclosing clip frame in Paintable::before_paint() It breaks when any CSS transform other than simple translation is lying between box with hidden overflow and a clipped box, because clip rectangle will be applied when transform has already changed. The fix is implemented by relying on the following rule: "For elements whose layout is governed by the CSS box model, any value other than none for the transform also causes the element to establish a containing block for all descendants." It means everything nested into a stacking context with CSS transform can't escape its clip, so it's safe to apply its clip for all children. |
||
---|---|---|
.. | ||
Layout | ||
Ref | ||
Screenshot | ||
Text | ||
WPT | ||
add_libweb_test.py | ||
CMakeLists.txt | ||
rebaseline-libweb-test | ||
TestConfig.ini | ||
TestCSSIDSpeed.cpp | ||
TestCSSPixels.cpp | ||
TestFetchInfrastructure.cpp | ||
TestFetchURL.cpp | ||
TestHTMLTokenizer.cpp | ||
TestMicrosyntax.cpp | ||
TestMimeSniff.cpp | ||
TestNumbers.cpp | ||
tokenizer-test.html |