Commit Graph

3 Commits

Author SHA1 Message Date
Andreas Kling
11ff9d0f17 LibWeb: Move DOM classes into the Web::DOM namespace
LibWeb keeps growing and the Web namespace is filling up fast.
Let's put DOM stuff into Web::DOM, just like we already started doing
with SVG stuff in Web::SVG.
2020-07-26 20:05:15 +02:00
Andreas Kling
82444048de LibWeb: Add cached global attribute name FlyStrings
Instead of creating extremely common FlyStrings like "id" and "class"
on demand every time they are needed, we now have AttributeNames.h,
which provides Web::HTML::AttributeNames::{id,class_}

This avoids a bunch of string allocations during selector matching.
2020-05-26 23:45:43 +02:00
Andreas Kling
660ec504ca LibWeb: Move get_element_by_id() to a NonElementParentNode mixin class
This matches the current version of the DOM spec. And since C++ doesn't
have mixins this is actually a CRTP class.
2020-03-28 09:13:29 +01:00