diff options
| author | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-03-22 15:16:29 +0100 |
|---|---|---|
| committer | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-04-18 10:57:50 +0200 |
| commit | 26e75d452eeb2762fa3ece1c63e94d01587c6260 (patch) | |
| tree | 1078b078a8cd80a5360246dcf04194cacc5c38ef /src/gui/text/qcssparser.cpp | |
| parent | ade33a91442f8085a7ddeb8e6fdf33463103b119 (diff) | |
Support rendering CSS 'border' property for html table
We supported CSS 'border-width', 'border-style' and 'border-color'
for HTML tables since 8a9bec35fb0c60a0e5990c1a12ffe6f39fdbf2d.
Now we also support the 'border' property, which is shorthand to
set all four borders' width, style and color.
Fixes: QTBUG-123167
Pick-to: 6.7 6.6
Change-Id: I5f29b94ab9facf412a9c230d554efb5c69368b6b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/text/qcssparser.cpp')
| -rw-r--r-- | src/gui/text/qcssparser.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index ac6ddc69a83..e5815ffce2d 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -987,9 +987,11 @@ void ValueExtractor::borderValue(const Declaration &decl, int *width, QCss::Bord } data.color = parseBrushValue(decl.d->values.at(i), pal); - *color = brushFromData(data.color, pal); - if (data.color.type != BrushData::DependsOnThePalette) - decl.d->parsed = QVariant::fromValue<BorderData>(data); + if (data.color.type != BrushData::Invalid) { + *color = brushFromData(data.color, pal); + if (data.color.type != BrushData::DependsOnThePalette) + decl.d->parsed = QVariant::fromValue<BorderData>(data); + } } static void parseShorthandBackgroundProperty(const QList<QCss::Value> &values, BrushData *brush, QString *image, Repeat *repeat, Qt::Alignment *alignment, const QPalette &pal) |
