1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00
serenity/Userland/Libraries/LibWeb
Aliaksandr Kalenik 7dc0edcb86 LibWeb: Prevent floats from being placed higher than preceding blocks
CSS 2.2 section 9.5.1:
The outer top of a floating box may not be higher than the
outer top of any _block_ or floated box generated by an
element earlier in the source document.

Where block is `BlockContainer` in LibWeb type system.
Which means `current_boxes` need to be cleared before
leaving block container.

```html
<style>
.wrapper {
  width: 100px;
  height: 300px;
  background-color: lightgray;
}

.box {
  margin: 10px;
  width: 50px;
  height: 50px;
  float: left;
}

.a { background-color: salmon; }
.b { background-color: slateblue; }
.c { background-color: green; }
</style>
<div class="wrapper">
	<div class="box a"></div>
	<div class="box b"></div>
</div>
<div class="box c">
</div>
```
2023-01-16 09:45:16 +01:00
..
Bindings LibJS+Everywhere: Rename Value::to_string to to_deprecated_string 2023-01-15 01:00:20 +00:00
Cookie LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr 2023-01-04 11:49:15 +01:00
Crypto LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
CSS LibJS+Everywhere: Rename Value::to_string to to_deprecated_string 2023-01-15 01:00:20 +00:00
DOM LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
DOMParsing LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Encoding LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Fetch LibWeb: Make sure that fetch() response cookies get saved 2023-01-15 10:53:58 +00:00
FileAPI LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
Geometry LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
HighResolutionTime LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
HTML LibJS+Everywhere: Rename Value::to_string to to_deprecated_string 2023-01-15 01:00:20 +00:00
Infra LibWeb: Remove all whitespace from input in decode_forgiving_base64 2023-01-10 17:54:01 +00:00
IntersectionObserver LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Layout LibWeb: Prevent floats from being placed higher than preceding blocks 2023-01-16 09:45:16 +01:00
Loader LibWeb: Store cookies for every HTTP response 2022-12-30 21:56:54 -05:00
MimeSniff Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
NavigationTiming LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Page LibWeb: Remove now-unused LayoutRange and LayoutPosition classes :^) 2023-01-12 19:55:10 +01:00
Painting LibWeb: Make Paintable visit its cached containing block pointer 2023-01-11 14:36:27 +01:00
Platform Userland: Replace remaining Core::Timer::construct()s with try_create() 2023-01-12 11:25:51 +01:00
ReferrerPolicy LibWeb: Implement 'Determine request’s Referrer' AO 2022-10-30 20:10:29 +00:00
RequestIdleCallback LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
ResizeObserver LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Scripts Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
SecureContexts Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Selection LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
Streams LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
SVG LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Tests Everywhere: Rename WrapperGenerator to BindingsGenerator 2022-09-21 23:06:08 +01:00
UIEvents LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
URL LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
WebAssembly LibJS+Everywhere: Return strings by value from PrimitiveString 2023-01-13 18:50:47 -05:00
WebDriver Everywhere: Fully qualify IsLvalueReference in TRY() macros 2023-01-15 00:56:31 +00:00
WebGL LibJS+Everywhere: Rename Value::to_string to to_deprecated_string 2023-01-15 01:00:20 +00:00
WebIDL LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
WebSockets LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
XHR LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
XML AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
CMakeLists.txt LibWeb: Override width calculation for table wrappers 2023-01-14 19:22:08 +01:00
Dump.cpp LibWeb: Fix ignored .to_string() errors in Web::dump_sheet() 2023-01-12 23:29:57 +00:00
Dump.h LibWeb: Fix ignored .to_string() errors in Web::dump_sheet() 2023-01-12 23:29:57 +00:00
FontCache.cpp LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
FontCache.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Forward.h LibWeb: Override width calculation for table wrappers 2023-01-14 19:22:08 +01:00
idl_files.cmake LibWeb: Sketch out basic support for SVG <foreignObject> elements 2022-11-16 13:01:21 +01:00
Namespace.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Namespace.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
PixelUnits.h LibWeb: Only allow DevicePixels operators to work with integers 2022-12-14 16:47:57 +00:00
TreeNode.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00