[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:42:22 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 801a12f755c407c6240f5a0d153acf58e8f2bdd5
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu May 27 16:22:16 2004 +0000
Reviewed by Gramps
Adds a typing style member variable to khtml part.
This patch adds basic life-cycle management and
accessors. In addition, one essential piece of
behavior has been added: Clearing the typing style
whenever the selection changes.
Follow-on work will make this typing style a fully
functional part of applying styles to text while typing.
* khtml/khtml_part.cpp:
(KHTMLPart::notifySelectionChanged): Clear typing style.
(KHTMLPart::typingStyle): Getter.
(KHTMLPart::setTypingStyle): Setter.
(KHTMLPart::clearTypingStyle): Convenience. Sets to 0.
* khtml/khtml_part.h: Function declarations.
* khtml/khtmlpart_p.h:
(KHTMLPartPrivate::KHTMLPartPrivate): Initialize member variable.
(KHTMLPartPrivate::~KHTMLPartPrivate): Deref if necessary.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8efe932..a3c61a0 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,6 +1,29 @@
2004-05-27 Ken Kocienda <kocienda at apple.com>
Reviewed by Gramps
+
+ Adds a typing style member variable to khtml part.
+ This patch adds basic life-cycle management and
+ accessors. In addition, one essential piece of
+ behavior has been added: Clearing the typing style
+ whenever the selection changes.
+
+ Follow-on work will make this typing style a fully
+ functional part of applying styles to text while typing.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::notifySelectionChanged): Clear typing style.
+ (KHTMLPart::typingStyle): Getter.
+ (KHTMLPart::setTypingStyle): Setter.
+ (KHTMLPart::clearTypingStyle): Convenience. Sets to 0.
+ * khtml/khtml_part.h: Function declarations.
+ * khtml/khtmlpart_p.h:
+ (KHTMLPartPrivate::KHTMLPartPrivate): Initialize member variable.
+ (KHTMLPartPrivate::~KHTMLPartPrivate): Deref if necessary.
+
+2004-05-27 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Gramps
Add helper to get the DOM element for a Position.
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 03e20a6..617c4a0 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -2395,7 +2395,8 @@ void KHTMLPart::selectionLayoutChanged()
void KHTMLPart::notifySelectionChanged(bool closeTyping)
{
selectionLayoutChanged();
-
+ clearTypingStyle();
+
if (closeTyping)
TypingCommand::closeTyping(lastEditCommand());
@@ -4973,6 +4974,26 @@ void KHTMLPart::reappliedEditing(EditCommand &cmd)
d->m_lastEditCommand = EditCommand::emptyCommand();
}
+CSSStyleDeclarationImpl *KHTMLPart::typingStyle() const
+{
+ return d->m_typingStyle;
+}
+
+void KHTMLPart::setTypingStyle(CSSStyleDeclarationImpl *style)
+{
+ CSSStyleDeclarationImpl *old = d->m_typingStyle;
+ d->m_typingStyle = style;
+ if (d->m_typingStyle)
+ d->m_typingStyle->ref();
+ if (old)
+ old->deref();
+}
+
+void KHTMLPart::clearTypingStyle()
+{
+ setTypingStyle(0);
+}
+
#if !APPLE_CHANGES
bool KHTMLPart::checkLinkSecurity(const KURL &linkURL,const QString &message, const QString &button)
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index 791adfe..5b57448 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -46,6 +46,7 @@ class KJavaAppletContext;
namespace DOM
{
+ class CSSStyleDeclarationImpl;
class DocumentImpl;
class EventListener;
class HTMLAnchorElementImpl;
@@ -675,6 +676,21 @@ public:
void reappliedEditing(khtml::EditCommand &);
/**
+ * Returns the typing style for the document.
+ */
+ DOM::CSSStyleDeclarationImpl *typingStyle() const;
+
+ /**
+ * Sets the typing style for the document.
+ */
+ void setTypingStyle(DOM::CSSStyleDeclarationImpl *);
+
+ /**
+ * Clears the typing style for the document.
+ */
+ void clearTypingStyle();
+
+ /**
* Convenience method to show the document's view.
*
* Equivalent to widget()->show() or view()->show() .
diff --git a/WebCore/khtml/khtmlpart_p.h b/WebCore/khtml/khtmlpart_p.h
index d9aaddf..d3ea56c 100644
--- a/WebCore/khtml/khtmlpart_p.h
+++ b/WebCore/khtml/khtmlpart_p.h
@@ -42,6 +42,7 @@
#include "misc/decoder.h"
#include "java/kjavaappletcontext.h"
#include "ecma/kjs_proxy.h"
+#include "css/css_valueimpl.h"
#include "dom/dom_misc.h"
#include "xml/dom_selection.h"
@@ -156,6 +157,8 @@ public:
m_caretVisible = true;
m_caretBlinks = true;
m_caretPaint = true;
+
+ m_typingStyle = 0;
m_metaRefreshEnabled = true;
m_bHTTPRefresh = false;
@@ -212,6 +215,8 @@ public:
#ifndef Q_WS_QWS
delete m_javaContext;
#endif
+ if (m_typingStyle)
+ m_typingStyle->deref();
}
FrameList m_frames;
@@ -367,6 +372,7 @@ public:
khtml::EditCommand m_lastEditCommand;
int m_xPosForVerticalArrowNavigation;
+ DOM::CSSStyleDeclarationImpl *m_typingStyle;
int m_focusNodeNumber;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list