[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.1/kdelibs/khtml
From: Maks Orlovich <maksim () kde ! org>
Date: 2008-10-18 16:19:47
Message-ID: 1224346787.677226.18483.nullmailer () svn ! kde ! org
[Download RAW message or body]
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<RenderWidget*>(oldFocusNode->renderer());
+ if (rw->isRedirectedWidget())
+ rw->handleFocusOut();
+ }
oldFocusNode->dispatchHTMLEvent(EventImpl::BLUR_EVENT,false,false);
oldFocusNode->dispatchUIEvent(EventImpl::DOMFOCUSOUT_EVENT);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic