Commit 6364c67f by tsushima

直近親要素までアンダーライン対応

parent 98fbfd00
...@@ -722,6 +722,13 @@ var NodeContainer = function () { ...@@ -722,6 +722,13 @@ var NodeContainer = function () {
var position = (0, _position.parsePosition)(style.position); var position = (0, _position.parsePosition)(style.position);
var parentStyle = node.parentNode.style;
if (style.textDecoration === 'none' && parentStyle && parentStyle.textDecoration) {
style.parentTextDecoration = parentStyle.textDecoration;
style.parentTextDecorationColor = parentStyle.textDecorationColor;
style.parentTextDecorationStyle = parentStyle.textDecorationStyle;
}
this.style = { this.style = {
background: IS_INPUT ? _Input.INPUT_BACKGROUND : (0, _background.parseBackground)(style, resourceLoader), background: IS_INPUT ? _Input.INPUT_BACKGROUND : (0, _background.parseBackground)(style, resourceLoader),
border: IS_INPUT ? _Input.INPUT_BORDERS : (0, _border.parseBorder)(style), border: IS_INPUT ? _Input.INPUT_BORDERS : (0, _border.parseBorder)(style),
...@@ -1856,13 +1863,13 @@ var parseTextDecorationStyle = function parseTextDecorationStyle(style) { ...@@ -1856,13 +1863,13 @@ var parseTextDecorationStyle = function parseTextDecorationStyle(style) {
}; };
var parseTextDecoration = exports.parseTextDecoration = function parseTextDecoration(style) { var parseTextDecoration = exports.parseTextDecoration = function parseTextDecoration(style) {
var textDecorationLine = parseTextDecorationLine(style.textDecorationLine ? style.textDecorationLine : style.textDecoration); var textDecorationLine = parseTextDecorationLine(style.parentTextDecoration ? style.parentTextDecoration : style.textDecorationLine ? style.textDecorationLine : style.textDecoration);
if (textDecorationLine === null) { if (textDecorationLine === null) {
return TEXT_DECORATION.NONE; return TEXT_DECORATION.NONE;
} }
var textDecorationColor = style.textDecorationColor ? new _Color2.default(style.textDecorationColor) : null; var textDecorationColor = style.parentTextDecorationColor ? style.parentTextDecorationColor : style.textDecorationColor ? new _Color2.default(style.textDecorationColor) : null;
var textDecorationStyle = parseTextDecorationStyle(style.textDecorationStyle); var textDecorationStyle = style.parentTextDecorationStyle ? style.parentTextDecorationStyle : parseTextDecorationStyle(style.textDecorationStyle);
return { return {
textDecorationLine: textDecorationLine, textDecorationLine: textDecorationLine,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment