mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 10:36:02 +00:00
LibWeb/CSS: Parse border-inline-*
properties
This doesn't currently honor `writing-mode`, `direction` and `text-orientation`.
This commit is contained in:
parent
18cccd7633
commit
cd1bba353a
Notes:
github-actions[bot]
2025-03-14 16:10:16 +00:00
Author: https://github.com/tcl3
Commit: cd1bba353a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3899
Reviewed-by: https://github.com/AtkinsSJ ✅
18 changed files with 500 additions and 133 deletions
|
@ -560,6 +560,78 @@
|
|||
"hashless-hex-color"
|
||||
]
|
||||
},
|
||||
"border-inline-end": {
|
||||
"inherited": false,
|
||||
"initial": "medium currentcolor none",
|
||||
"longhands": [
|
||||
"border-inline-end-width",
|
||||
"border-inline-end-style",
|
||||
"border-inline-end-color"
|
||||
]
|
||||
},
|
||||
"border-inline-end-color": {
|
||||
"logical-alias-for": [
|
||||
"border-top-color",
|
||||
"border-right-color",
|
||||
"border-bottom-color",
|
||||
"border-left-color"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"border-inline-end-style": {
|
||||
"logical-alias-for": [
|
||||
"border-top-style",
|
||||
"border-right-style",
|
||||
"border-bottom-style",
|
||||
"border-left-style"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"border-inline-end-width": {
|
||||
"logical-alias-for": [
|
||||
"border-top-width",
|
||||
"border-right-width",
|
||||
"border-bottom-width",
|
||||
"border-left-width"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"border-inline-start": {
|
||||
"inherited": false,
|
||||
"initial": "medium currentcolor none",
|
||||
"longhands": [
|
||||
"border-inline-start-width",
|
||||
"border-inline-start-style",
|
||||
"border-inline-start-color"
|
||||
]
|
||||
},
|
||||
"border-inline-start-color": {
|
||||
"logical-alias-for": [
|
||||
"border-top-color",
|
||||
"border-right-color",
|
||||
"border-bottom-color",
|
||||
"border-left-color"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"border-inline-start-style": {
|
||||
"logical-alias-for": [
|
||||
"border-top-style",
|
||||
"border-right-style",
|
||||
"border-bottom-style",
|
||||
"border-left-style"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"border-inline-start-width": {
|
||||
"logical-alias-for": [
|
||||
"border-top-width",
|
||||
"border-right-width",
|
||||
"border-bottom-width",
|
||||
"border-left-width"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"border-left": {
|
||||
"inherited": false,
|
||||
"initial": "medium currentcolor none",
|
||||
|
|
|
@ -197,8 +197,8 @@ RefPtr<CSSStyleValue const> ResolvedCSSStyleDeclaration::style_value_for_propert
|
|||
// FIXME: -> border-block-end-color
|
||||
// FIXME: -> border-block-start-color
|
||||
// -> border-bottom-color
|
||||
// FIXME: -> border-inline-end-color
|
||||
// FIXME: -> border-inline-start-color
|
||||
// -> border-inline-end-color
|
||||
// -> border-inline-start-color
|
||||
// -> border-left-color
|
||||
// -> border-right-color
|
||||
// -> border-top-color
|
||||
|
@ -212,6 +212,12 @@ RefPtr<CSSStyleValue const> ResolvedCSSStyleDeclaration::style_value_for_propert
|
|||
return CSSColorValue::create_from_color(layout_node.computed_values().background_color(), ColorSyntax::Modern);
|
||||
case PropertyID::BorderBottomColor:
|
||||
return CSSColorValue::create_from_color(layout_node.computed_values().border_bottom().color, ColorSyntax::Modern);
|
||||
case PropertyID::BorderInlineEndColor:
|
||||
// FIXME: Honor writing-mode, direction and text-orientation.
|
||||
return style_value_for_property(layout_node, PropertyID::BorderRightColor);
|
||||
case PropertyID::BorderInlineStartColor:
|
||||
// FIXME: Honor writing-mode, direction and text-orientation.
|
||||
return style_value_for_property(layout_node, PropertyID::BorderLeftColor);
|
||||
case PropertyID::BorderLeftColor:
|
||||
return CSSColorValue::create_from_color(layout_node.computed_values().border_left().color, ColorSyntax::Modern);
|
||||
case PropertyID::BorderRightColor:
|
||||
|
|
|
@ -600,6 +600,18 @@ void StyleComputer::for_each_property_expanding_shorthands(PropertyID property_i
|
|||
switch (property_id) {
|
||||
case PropertyID::BlockSize:
|
||||
return PropertyID::Height;
|
||||
case PropertyID::BorderInlineStartColor:
|
||||
return PropertyID::BorderLeftColor;
|
||||
case PropertyID::BorderInlineStartStyle:
|
||||
return PropertyID::BorderLeftStyle;
|
||||
case PropertyID::BorderInlineStartWidth:
|
||||
return PropertyID::BorderLeftWidth;
|
||||
case PropertyID::BorderInlineEndColor:
|
||||
return PropertyID::BorderRightColor;
|
||||
case PropertyID::BorderInlineEndStyle:
|
||||
return PropertyID::BorderRightStyle;
|
||||
case PropertyID::BorderInlineEndWidth:
|
||||
return PropertyID::BorderRightWidth;
|
||||
case PropertyID::MarginBlockStart:
|
||||
return PropertyID::MarginTop;
|
||||
case PropertyID::MarginBlockEnd:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue