summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/text/qtexthtmlparser.cpp6
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp31
2 files changed, 1 insertions, 36 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index a131503b85..3cb61b9eae 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -1896,11 +1896,7 @@ QVector<QCss::Declaration> QTextHtmlParser::declarationsForNode(int node) const
if (nodes.at(node).id == Html_a && nodes.at(node).hasHref)
extraPseudo = "link";
decls = selector.declarationsForNode(n, extraPseudo);
- n = selector.parentNode(n);
- while (!selector.isNullNode(n)) {
- decls = selector.declarationsForNode(n, extraPseudo) + decls;
- n = selector.parentNode(n);
- }
+
return decls;
}
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index b065f537f7..d5ddf8fbec 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -187,8 +187,6 @@ private slots:
void htmlExportImportBlockCount();
void QTBUG27354_spaceAndSoftSpace();
- void cssInheritance();
-
void QTBUG28998_linkColor();
private:
@@ -2949,35 +2947,6 @@ void tst_QTextDocument::QTBUG27354_spaceAndSoftSpace()
}
}
-void tst_QTextDocument::cssInheritance()
-{
- {
- QTextDocument td;
- td.setHtml("<html><head><style type=\"text/css\">body { line-height: 200% }</style></head><body>"
- "<p>Foo</p><p>Bar</p><p>Baz</p></body></html>");
- QTextBlock block = td.begin();
- while (block.isValid()) {
- QTextBlockFormat fmt = block.blockFormat();
- QVERIFY(fmt.lineHeightType() == QTextBlockFormat::ProportionalHeight);
- QVERIFY(fmt.lineHeight() == 200);
- block = block.next();
- }
- }
- {
- QTextDocument td;
- td.setHtml("<html><head><style type=\"text/css\">body { line-height: 200% } p { line-height: 300% }</style></head><body>"
- "<p style=\"line-height: 40px\">Foo</p><p>Bar</p><p>Baz</p></body></html>");
- QTextBlock block = td.begin();
- QTextBlockFormat fmt = block.blockFormat();
- QVERIFY(fmt.lineHeightType() == QTextBlockFormat::FixedHeight);
- QVERIFY(fmt.lineHeight() == 40);
- block = block.next();
- fmt = block.blockFormat();
- QVERIFY(fmt.lineHeightType() == QTextBlockFormat::ProportionalHeight);
- QVERIFY(fmt.lineHeight() == 300);
- }
-}
-
void tst_QTextDocument::QTBUG28998_linkColor()
{
QPalette pal;