Commit d156ab44 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Check size

parent 56e81b4c
......@@ -110,16 +110,15 @@ static void handleDuplicateLinkElements(const QWebElement &element, QHash<QStrin
static bool isHiddenElement(const MessageViewer::MailWebEngineAccessKeyAnchor &element)
{
#if 0
// width property set to less than zero
if (element.hasAttribute(QStringLiteral("width")) && element.attribute(QStringLiteral("width")).toInt() < 1) {
if (element.boundingRect().width() < 1) {
return true;
}
// height property set to less than zero
if (element.hasAttribute(QStringLiteral("height")) && element.attribute(QStringLiteral("height")).toInt() < 1) {
if (element.boundingRect().height() < 1) {
return true;
}
#if 0
// visibility set to 'hidden' in the element itself or its parent elements.
if (element.styleProperty(QStringLiteral("visibility"), QWebElement::ComputedStyle).compare(QLatin1String("hidden"), Qt::CaseInsensitive) == 0) {
......
......@@ -28,6 +28,8 @@ class MailWebEngineAccessKeyAnchor
public:
MailWebEngineAccessKeyAnchor(const QVariant &result);
MailWebEngineAccessKeyAnchor();
QRect boundingRect() const;
private:
void initialize(const QVariant &result);
QRect mBoundingRect;
......
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