SVN commit 873038 by orlovich: Backport Germain's r865830 which fixed CHANGE_EVENT for lineedits... M +1 -1 rendering/render_form.h M +3 -1 rendering/render_replaced.h M +6 -0 xml/dom_docimpl.cpp --- branches/KDE/4.1/kdelibs/khtml/rendering/render_form.h #873037:873038 @@ -256,6 +256,7 @@ virtual void updateFromElement(); virtual void setStyle(RenderStyle *style); virtual short baselinePosition( bool ) const; + virtual void handleFocusOut(); void select(); @@ -273,7 +274,6 @@ void slotReturnPressed(); void slotTextChanged(const QString &string); protected: - virtual void handleFocusOut(); private: virtual bool isEditable() const { return true; } --- branches/KDE/4.1/kdelibs/khtml/rendering/render_replaced.h #873037:873038 @@ -92,6 +92,7 @@ virtual void layout( ); virtual void updateFromElement(); + virtual void handleFocusOut() {} QWidget *widget() const { return m_widget; } KHTMLView* view() const { return m_view; } @@ -105,6 +106,7 @@ virtual bool handleEvent(const DOM::EventImpl& ev); bool isRedirectedWidget() const; bool isDisabled() const { return m_widget && !m_widget->isEnabled(); } + #ifdef ENABLE_DUMP virtual void dump(QTextStream &stream, const QString &ind) const; @@ -137,7 +139,7 @@ } virtual bool acceptsSyntheticEvents() const { return true; } - virtual void handleFocusOut() {} + bool event( QEvent *e ); bool eventFilter(QObject* /*o*/, QEvent* e); --- branches/KDE/4.1/kdelibs/khtml/xml/dom_docimpl.cpp #873037:873038 @@ -2424,6 +2424,12 @@ oldFocusNode->setActive(false); oldFocusNode->setFocus(false); + if (oldFocusNode->renderer() && oldFocusNode->renderer()->isWidget()) { + // Editable widgets may need to dispatch CHANGE_EVENT + RenderWidget* rw = static_cast(oldFocusNode->renderer()); + if (rw->isRedirectedWidget()) + rw->handleFocusOut(); + } oldFocusNode->dispatchHTMLEvent(EventImpl::BLUR_EVENT,false,false); oldFocusNode->dispatchUIEvent(EventImpl::DOMFOCUSOUT_EVENT);