remove some unneeded html special-casing

This commit is contained in:
Seth Alves 2016-12-09 10:18:30 -08:00
parent 37b179b00b
commit 819e3dc41d

View file

@ -150,12 +150,11 @@ bool RenderableWebEntityItem::buildWebSurface(QSharedPointer<EntityTreeRenderer>
point.setPos(windowPoint); point.setPos(windowPoint);
QList<QTouchEvent::TouchPoint> touchPoints; QList<QTouchEvent::TouchPoint> touchPoints;
touchPoints.push_back(point); touchPoints.push_back(point);
QTouchEvent* touchEvent = new QTouchEvent(QEvent::TouchEnd, nullptr, Qt::NoModifier, Qt::TouchPointReleased, touchPoints); QTouchEvent* touchEvent = new QTouchEvent(QEvent::TouchEnd, nullptr,
Qt::NoModifier, Qt::TouchPointReleased, touchPoints);
touchEvent->setWindow(_webSurface->getWindow()); touchEvent->setWindow(_webSurface->getWindow());
touchEvent->setDevice(&_touchDevice); touchEvent->setDevice(&_touchDevice);
if (_contentType == htmlContent) { touchEvent->setTarget(_webSurface->getRootItem());
touchEvent->setTarget(_webSurface->getRootItem());
}
QCoreApplication::postEvent(_webSurface->getWindow(), touchEvent); QCoreApplication::postEvent(_webSurface->getWindow(), touchEvent);
} }
}); });
@ -340,9 +339,7 @@ void RenderableWebEntityItem::handlePointerEvent(const PointerEvent& event) {
QTouchEvent* touchEvent = new QTouchEvent(type); QTouchEvent* touchEvent = new QTouchEvent(type);
touchEvent->setWindow(_webSurface->getWindow()); touchEvent->setWindow(_webSurface->getWindow());
touchEvent->setDevice(&_touchDevice); touchEvent->setDevice(&_touchDevice);
if (_contentType == htmlContent) { touchEvent->setTarget(_webSurface->getRootItem());
touchEvent->setTarget(_webSurface->getRootItem());
}
touchEvent->setTouchPoints(touchPoints); touchEvent->setTouchPoints(touchPoints);
touchEvent->setTouchPointStates(touchPointState); touchEvent->setTouchPointStates(touchPointState);