[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:54:48 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a8052be31639f42711aa86d2681df3cef990b75d
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 26 07:27:53 2002 +0000
WebCore:
- fixed 3068404 -- eliminate all user-visible messages from WebCore
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Use runJavaScriptPrompt
function instead of the more generic QInputDialog.
* khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::altText): Get
submit alt text for input element from the view factory, rather than using
i18n, since we don't support that.
* khtml/html/htmlparser.cpp: (KHTMLParser::handleIsindex): Ditto, for the
intro that says "This is a searchable index".
* khtml/rendering/render_form.cpp:
(RenderSubmitButton::defaultLabel): Ditto, for "Submit".
(RenderResetButton::defaultLabel): Ditto, for "Reset".
(RenderFileButton::slotClicked): Ifdef'd out this unused code that had i18n text in it.
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::errorString): Put in an ifdef and a FIXME to avoid i18n.
(XMLHandler::fatalError): Ditto.
(XMLTokenizer::finish): Ditto.
* khtml/misc/decoder.cpp: (Decoder::decode): Ifdef'd the check for the first
language being "ja", since that's not how we're going to trigger Japanese
auto-detect.
* khtml/rendering/render_applet.cpp: (RenderEmptyApplet::RenderEmptyApplet):
Turned off the code that does the empty applet label. I don't think it worked,
and it used i18n. We'll have to tackle this eventually.
* kwq/KWQKHTMLPartImpl.h: Added runJavaScriptPrompt.
* kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::runJavaScriptPrompt): Moved the code
here that used to be in KWQInputDialog.
* kwq/kdecore/klocale.h: Remove i18n() and KLocale::languageList(), added the functions
that are listed below.
* kwq/KWQKLocale.mm:
(inputElementAltText): Added specific function for getting one of the very few
translated strings that we need in WebCore.
(resetButtonDefaultLabel): Ditto.
(searchableIndexIntroduction): Ditto.
(submitButtonDefaultLabel): Ditto.
(KLocale::language): Use the view factory to ask for the language code, since there's no
public API to get it that WebCore can use.
* kwq/WebCoreViewFactory.h: Add new API for above.
* ForwardingHeaders/qinputdialog.h: Added empty file.
* kwq/qt/qinputdialog.h: Removed.
* kwq/KWQInputDialog.mm: Removed.
* WebCore.pbproj/project.pbxproj: Removed QInputDialog files.
WebKit:
* WebCoreSupport.subproj/WebViewFactory.m:
(-[WebViewFactory inputElementAltText]): Added.
(-[WebViewFactory resetButtonDefaultLabel]): Added.
(-[WebViewFactory searchableIndexIntroduction]): Added.
(-[WebViewFactory submitButtonDefaultLabel]): Added.
(-[WebViewFactory defaultLanguageCode]): Added.
* English.lproj/Localizable.strings: Update.
* English.lproj/StringsNotToBeLocalized.txt: Update.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 22aa13d..8f66530 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,56 @@
+2002-10-26 Darin Adler <darin at apple.com>
+
+ - fixed 3068404 -- eliminate all user-visible messages from WebCore
+
+ * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Use runJavaScriptPrompt
+ function instead of the more generic QInputDialog.
+
+ * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::altText): Get
+ submit alt text for input element from the view factory, rather than using
+ i18n, since we don't support that.
+ * khtml/html/htmlparser.cpp: (KHTMLParser::handleIsindex): Ditto, for the
+ intro that says "This is a searchable index".
+ * khtml/rendering/render_form.cpp:
+ (RenderSubmitButton::defaultLabel): Ditto, for "Submit".
+ (RenderResetButton::defaultLabel): Ditto, for "Reset".
+ (RenderFileButton::slotClicked): Ifdef'd out this unused code that had i18n text in it.
+
+ * khtml/xml/xml_tokenizer.cpp:
+ (XMLHandler::errorString): Put in an ifdef and a FIXME to avoid i18n.
+ (XMLHandler::fatalError): Ditto.
+ (XMLTokenizer::finish): Ditto.
+
+ * khtml/misc/decoder.cpp: (Decoder::decode): Ifdef'd the check for the first
+ language being "ja", since that's not how we're going to trigger Japanese
+ auto-detect.
+
+ * khtml/rendering/render_applet.cpp: (RenderEmptyApplet::RenderEmptyApplet):
+ Turned off the code that does the empty applet label. I don't think it worked,
+ and it used i18n. We'll have to tackle this eventually.
+
+ * kwq/KWQKHTMLPartImpl.h: Added runJavaScriptPrompt.
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::runJavaScriptPrompt): Moved the code
+ here that used to be in KWQInputDialog.
+
+ * kwq/kdecore/klocale.h: Remove i18n() and KLocale::languageList(), added the functions
+ that are listed below.
+ * kwq/KWQKLocale.mm:
+ (inputElementAltText): Added specific function for getting one of the very few
+ translated strings that we need in WebCore.
+ (resetButtonDefaultLabel): Ditto.
+ (searchableIndexIntroduction): Ditto.
+ (submitButtonDefaultLabel): Ditto.
+ (KLocale::language): Use the view factory to ask for the language code, since there's no
+ public API to get it that WebCore can use.
+
+ * kwq/WebCoreViewFactory.h: Add new API for above.
+
+ * ForwardingHeaders/qinputdialog.h: Added empty file.
+
+ * kwq/qt/qinputdialog.h: Removed.
+ * kwq/KWQInputDialog.mm: Removed.
+ * WebCore.pbproj/project.pbxproj: Removed QInputDialog files.
+
2002-10-25 Darin Adler <darin at apple.com>
Remove some user-visible strings. We can't have any strings that need
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 22aa13d..8f66530 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,56 @@
+2002-10-26 Darin Adler <darin at apple.com>
+
+ - fixed 3068404 -- eliminate all user-visible messages from WebCore
+
+ * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Use runJavaScriptPrompt
+ function instead of the more generic QInputDialog.
+
+ * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::altText): Get
+ submit alt text for input element from the view factory, rather than using
+ i18n, since we don't support that.
+ * khtml/html/htmlparser.cpp: (KHTMLParser::handleIsindex): Ditto, for the
+ intro that says "This is a searchable index".
+ * khtml/rendering/render_form.cpp:
+ (RenderSubmitButton::defaultLabel): Ditto, for "Submit".
+ (RenderResetButton::defaultLabel): Ditto, for "Reset".
+ (RenderFileButton::slotClicked): Ifdef'd out this unused code that had i18n text in it.
+
+ * khtml/xml/xml_tokenizer.cpp:
+ (XMLHandler::errorString): Put in an ifdef and a FIXME to avoid i18n.
+ (XMLHandler::fatalError): Ditto.
+ (XMLTokenizer::finish): Ditto.
+
+ * khtml/misc/decoder.cpp: (Decoder::decode): Ifdef'd the check for the first
+ language being "ja", since that's not how we're going to trigger Japanese
+ auto-detect.
+
+ * khtml/rendering/render_applet.cpp: (RenderEmptyApplet::RenderEmptyApplet):
+ Turned off the code that does the empty applet label. I don't think it worked,
+ and it used i18n. We'll have to tackle this eventually.
+
+ * kwq/KWQKHTMLPartImpl.h: Added runJavaScriptPrompt.
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::runJavaScriptPrompt): Moved the code
+ here that used to be in KWQInputDialog.
+
+ * kwq/kdecore/klocale.h: Remove i18n() and KLocale::languageList(), added the functions
+ that are listed below.
+ * kwq/KWQKLocale.mm:
+ (inputElementAltText): Added specific function for getting one of the very few
+ translated strings that we need in WebCore.
+ (resetButtonDefaultLabel): Ditto.
+ (searchableIndexIntroduction): Ditto.
+ (submitButtonDefaultLabel): Ditto.
+ (KLocale::language): Use the view factory to ask for the language code, since there's no
+ public API to get it that WebCore can use.
+
+ * kwq/WebCoreViewFactory.h: Add new API for above.
+
+ * ForwardingHeaders/qinputdialog.h: Added empty file.
+
+ * kwq/qt/qinputdialog.h: Removed.
+ * kwq/KWQInputDialog.mm: Removed.
+ * WebCore.pbproj/project.pbxproj: Removed QInputDialog files.
+
2002-10-25 Darin Adler <darin at apple.com>
Remove some user-visible strings. We can't have any strings that need
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 22aa13d..8f66530 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,56 @@
+2002-10-26 Darin Adler <darin at apple.com>
+
+ - fixed 3068404 -- eliminate all user-visible messages from WebCore
+
+ * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Use runJavaScriptPrompt
+ function instead of the more generic QInputDialog.
+
+ * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::altText): Get
+ submit alt text for input element from the view factory, rather than using
+ i18n, since we don't support that.
+ * khtml/html/htmlparser.cpp: (KHTMLParser::handleIsindex): Ditto, for the
+ intro that says "This is a searchable index".
+ * khtml/rendering/render_form.cpp:
+ (RenderSubmitButton::defaultLabel): Ditto, for "Submit".
+ (RenderResetButton::defaultLabel): Ditto, for "Reset".
+ (RenderFileButton::slotClicked): Ifdef'd out this unused code that had i18n text in it.
+
+ * khtml/xml/xml_tokenizer.cpp:
+ (XMLHandler::errorString): Put in an ifdef and a FIXME to avoid i18n.
+ (XMLHandler::fatalError): Ditto.
+ (XMLTokenizer::finish): Ditto.
+
+ * khtml/misc/decoder.cpp: (Decoder::decode): Ifdef'd the check for the first
+ language being "ja", since that's not how we're going to trigger Japanese
+ auto-detect.
+
+ * khtml/rendering/render_applet.cpp: (RenderEmptyApplet::RenderEmptyApplet):
+ Turned off the code that does the empty applet label. I don't think it worked,
+ and it used i18n. We'll have to tackle this eventually.
+
+ * kwq/KWQKHTMLPartImpl.h: Added runJavaScriptPrompt.
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::runJavaScriptPrompt): Moved the code
+ here that used to be in KWQInputDialog.
+
+ * kwq/kdecore/klocale.h: Remove i18n() and KLocale::languageList(), added the functions
+ that are listed below.
+ * kwq/KWQKLocale.mm:
+ (inputElementAltText): Added specific function for getting one of the very few
+ translated strings that we need in WebCore.
+ (resetButtonDefaultLabel): Ditto.
+ (searchableIndexIntroduction): Ditto.
+ (submitButtonDefaultLabel): Ditto.
+ (KLocale::language): Use the view factory to ask for the language code, since there's no
+ public API to get it that WebCore can use.
+
+ * kwq/WebCoreViewFactory.h: Add new API for above.
+
+ * ForwardingHeaders/qinputdialog.h: Added empty file.
+
+ * kwq/qt/qinputdialog.h: Removed.
+ * kwq/KWQInputDialog.mm: Removed.
+ * WebCore.pbproj/project.pbxproj: Removed QInputDialog files.
+
2002-10-25 Darin Adler <darin at apple.com>
Remove some user-visible strings. We can't have any strings that need
diff --git a/JavaScriptCore/dummy.cpp b/WebCore/ForwardingHeaders/qinputdialog.h
similarity index 100%
copy from JavaScriptCore/dummy.cpp
copy to WebCore/ForwardingHeaders/qinputdialog.h
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 6135aac..77c7db7 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -287,7 +287,6 @@
F58786DF02DE3B8601EA4122,
F58786E102DE3B8601EA4122,
F58786E302DE3B8601EA4122,
- F58786E402DE3B8601EA4122,
F58786E702DE3B8601EA4122,
F58786E802DE3B8601EA4122,
F58786E902DE3B8601EA4122,
@@ -514,7 +513,6 @@
F587857602DE375901EA4122,
F587857702DE375901EA4122,
F587857802DE375901EA4122,
- F587857A02DE375901EA4122,
F587857D02DE375901EA4122,
F587857F02DE375901EA4122,
F587858102DE375901EA4122,
@@ -4376,13 +4374,6 @@
path = ../KWQGuardedPtr.mm;
refType = 4;
};
- F58784E802DE375901EA4122 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- name = KWQInputDialog.mm;
- path = ../KWQInputDialog.mm;
- refType = 4;
- };
F58784EB02DE375901EA4122 = {
fileEncoding = 30;
isa = PBXFileReference;
@@ -5177,12 +5168,6 @@
settings = {
};
};
- F587857A02DE375901EA4122 = {
- fileRef = F58784E802DE375901EA4122;
- isa = PBXBuildFile;
- settings = {
- };
- };
F587857D02DE375901EA4122 = {
fileRef = F58784EB02DE375901EA4122;
isa = PBXBuildFile;
@@ -6738,12 +6723,6 @@
path = qimage.h;
refType = 4;
};
- F587869302DE3B8601EA4122 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = qinputdialog.h;
- refType = 4;
- };
F587869602DE3B8601EA4122 = {
fileEncoding = 30;
isa = PBXFileReference;
@@ -7158,12 +7137,6 @@
settings = {
};
};
- F58786E402DE3B8601EA4122 = {
- fileRef = F587869302DE3B8601EA4122;
- isa = PBXBuildFile;
- settings = {
- };
- };
F58786E702DE3B8601EA4122 = {
fileRef = F587869602DE3B8601EA4122;
isa = PBXBuildFile;
@@ -7487,8 +7460,6 @@
F587869002DE3B8601EA4122,
F58784E602DE375901EA4122,
F587869202DE3B8601EA4122,
- F587869302DE3B8601EA4122,
- F58784E802DE375901EA4122,
F587869602DE3B8601EA4122,
F587869702DE3B8601EA4122,
F587851102DE375901EA4122,
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 008a98c..06bee6b 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1004,6 +1004,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
case Window::Prompt:
part->xmlDocImpl()->updateRendering();
bool ok;
+#if APPLE_CHANGES
+ ok = part->impl->runJavaScriptPrompt(str, args.size() >= 2 ? args[1].toString(exec).qstring() : QString::null, str2);
+#else
if (args.size() >= 2)
str2 = QInputDialog::getText(i18n("Konqueror: Prompt"),
QStyleSheet::convertFromPlainText(str),
@@ -1014,6 +1017,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
QStyleSheet::convertFromPlainText(str),
QLineEdit::Normal,
QString::null, &ok);
+#endif
if ( ok )
return String(str2);
else
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 83d4354..c58e795 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -154,6 +154,8 @@ inline static QCString fixUpfromUnicode(const QTextCodec* codec, const QString&
return str;
}
+#if !APPLE_CHANGES
+
void HTMLFormElementImpl::i18nData()
{
QString foo1 = i18n( "You're about to send data to the Internet "
@@ -171,6 +173,7 @@ void HTMLFormElementImpl::i18nData()
"data by using <a href=\"javascript:go(0);\">Reload</a>");
}
+#endif
QByteArray HTMLFormElementImpl::formData(bool& ok)
{
@@ -1108,7 +1111,11 @@ DOMString HTMLInputElementImpl::altText() const
if ( alt.isNull() )
alt = getAttribute( ATTR_VALUE );
if ( alt.isEmpty() )
+#if APPLE_CHANGES
+ alt = inputElementAltText();
+#else
alt = i18n( "Submit" );
+#endif
return alt;
}
diff --git a/WebCore/khtml/html/htmlparser.cpp b/WebCore/khtml/html/htmlparser.cpp
index 9b46859..2715cd0 100644
--- a/WebCore/khtml/html/htmlparser.cpp
+++ b/WebCore/khtml/html/htmlparser.cpp
@@ -1287,7 +1287,11 @@ NodeImpl *KHTMLParser::handleIsindex( Token *t )
NodeImpl *child = new HTMLHRElementImpl( document );
n->addChild( child );
AttributeImpl* a = t->attrs ? t->attrs->getAttributeItem(ATTR_PROMPT) : 0;
+#if APPLE_CHANGES
+ DOMString text = searchableIndexIntroduction();
+#else
DOMString text = i18n("This is a searchable index. Enter search keywords: ");
+#endif
if (a)
text = a->value() + " ";
child = new TextImpl(document, text);
diff --git a/WebCore/khtml/misc/decoder.cpp b/WebCore/khtml/misc/decoder.cpp
index 062a2cd..5d4e1d0 100644
--- a/WebCore/khtml/misc/decoder.cpp
+++ b/WebCore/khtml/misc/decoder.cpp
@@ -477,7 +477,13 @@ QString Decoder::decode(const char *data, int len)
#endif /* APPLE_CHANGES */
found:
- if (!haveEncoding && KGlobal::locale()->languageList()[0] == "ja") {
+#if APPLE_CHANGES
+ // FIXME: We'll need our own rule for when to use Japanese auto-detect.
+ if (0)
+#else
+ if (!haveEncoding && KGlobal::locale()->languageList()[0] == "ja")
+#endif
+ {
#ifdef DECODE_DEBUG
kdDebug( 6005 ) << "Decoder: use auto-detect (" << strlen(data) << ")" << endl;
#endif
diff --git a/WebCore/khtml/rendering/render_applet.cpp b/WebCore/khtml/rendering/render_applet.cpp
index 3ca2f0c..49a1b53 100644
--- a/WebCore/khtml/rendering/render_applet.cpp
+++ b/WebCore/khtml/rendering/render_applet.cpp
@@ -152,9 +152,13 @@ RenderEmptyApplet::RenderEmptyApplet(DOM::NodeImpl* node)
// init RenderObject attributes
setInline(true);
+#if APPLE_CHANGES
+ // FIXME: Figure out how to handle this.
+#else
QLabel* label = new QLabel(i18n("Java Applet is not loaded. (Java interpreter disabled)"), node->getDocument()->view()->viewport());
label->setAlignment( Qt::AlignCenter | Qt::WordBreak );
setQWidget(label);
+#endif
}
short RenderEmptyApplet::intrinsicWidth() const
diff --git a/WebCore/khtml/rendering/render_form.cpp b/WebCore/khtml/rendering/render_form.cpp
index 62a9c2d..d79d2db 100644
--- a/WebCore/khtml/rendering/render_form.cpp
+++ b/WebCore/khtml/rendering/render_form.cpp
@@ -369,8 +369,13 @@ void RenderSubmitButton::updateFromElement()
RenderFormElement::updateFromElement();
}
-QString RenderSubmitButton::defaultLabel() {
+QString RenderSubmitButton::defaultLabel()
+{
+#if APPLE_CHANGES
+ return submitButtonDefaultLabel();
+#else
return i18n("Submit");
+#endif
}
short RenderSubmitButton::baselinePosition( bool f ) const
@@ -393,8 +398,13 @@ RenderResetButton::RenderResetButton(HTMLInputElementImpl *element)
{
}
-QString RenderResetButton::defaultLabel() {
+QString RenderResetButton::defaultLabel()
+{
+#if APPLE_CHANGES
+ return resetButtonDefaultLabel();
+#else
return i18n("Reset");
+#endif
}
@@ -622,11 +632,13 @@ void RenderFileButton::handleFocusOut()
void RenderFileButton::slotClicked()
{
+#if !APPLE_CHANGES
QString file_name = KFileDialog::getOpenFileName(QString::null, QString::null, 0, i18n("Browse..."));
if (!file_name.isNull()) {
element()->m_value = DOMString(file_name);
m_edit->setText(file_name);
}
+#endif
}
void RenderFileButton::updateFromElement()
diff --git a/WebCore/khtml/xml/xml_tokenizer.cpp b/WebCore/khtml/xml/xml_tokenizer.cpp
index ee1634d..27f858d 100644
--- a/WebCore/khtml/xml/xml_tokenizer.cpp
+++ b/WebCore/khtml/xml/xml_tokenizer.cpp
@@ -202,13 +202,23 @@ bool XMLHandler::processingInstruction(const QString &target, const QString &dat
QString XMLHandler::errorString()
{
+#if APPLE_CHANGES
+ // FIXME: Does the user ever see this?
+ return "error";
+#else
return i18n("the document is not in the correct file format");
+#endif
}
bool XMLHandler::fatalError( const QXmlParseException& exception )
{
+#if APPLE_CHANGES
+ // FIXME: Does the user ever see this?
+ errorProt += QString("fatal parsing error: %1 in line %2, column %3")
+#else
errorProt += i18n( "fatal parsing error: %1 in line %2, column %3" )
+#endif
.arg( exception.message() )
.arg( exception.lineNumber() )
.arg( exception.columnNumber() );
@@ -362,7 +372,12 @@ void XMLTokenizer::finish()
NodeImpl *html = doc->createElementNS(XHTML_NAMESPACE,"html");
NodeImpl *body = doc->createElementNS(XHTML_NAMESPACE,"body");
NodeImpl *h1 = doc->createElementNS(XHTML_NAMESPACE,"h1");
+#if APPLE_CHANGES
+ // FIXME: Is there some alternative to having this text hardcoded here?
+ NodeImpl *headingText = doc->createTextNode("XML parsing error");
+#else
NodeImpl *headingText = doc->createTextNode(i18n("XML parsing error"));
+#endif
NodeImpl *errorText = doc->createTextNode(handler.errorProtocol());
NodeImpl *hr = doc->createElementNS(XHTML_NAMESPACE,"hr");
NodeImpl *pre = doc->createElementNS(XHTML_NAMESPACE,"pre");
diff --git a/WebCore/kwq/KWQInputDialog.mm b/WebCore/kwq/KWQInputDialog.mm
deleted file mode 100644
index 3dc7c79..0000000
--- a/WebCore/kwq/KWQInputDialog.mm
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <qinputdialog.h>
-
-#import "WebCoreViewFactory.h"
-
-QString QInputDialog::getText(const QString &, const QString &prompt, QLineEdit::EchoMode, const QString &defaultValue, bool *ok)
-{
- NSString *result;
- *ok = [[WebCoreViewFactory sharedFactory] runJavaScriptTextInputPanelWithPrompt:prompt.getNSString()
- defaultText:defaultValue.getNSString() returningText:&result];
- return *ok ? QString::fromNSString(result) : QString();
-}
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 515e910..b4abca5 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -115,6 +115,7 @@ public:
static void runJavaScriptAlert(const QString &message);
static bool runJavaScriptConfirm(const QString &message);
+ static bool runJavaScriptPrompt(const QString &message, const QString &defaultValue, QString &result);
static WebCoreBridge *bridgeForWidget(QWidget *);
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index b48d41e..6c4d968 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -499,3 +499,13 @@ bool KWQKHTMLPartImpl::runJavaScriptConfirm(const QString &message)
{
return [[WebCoreViewFactory sharedFactory] runJavaScriptConfirmPanelWithMessage:message.getNSString()];
}
+
+bool KWQKHTMLPartImpl::runJavaScriptPrompt(const QString &prompt, const QString &defaultValue, QString &result)
+{
+ NSString *returnedText;
+ bool ok = [[WebCoreViewFactory sharedFactory] runJavaScriptTextInputPanelWithPrompt:prompt.getNSString()
+ defaultText:defaultValue.getNSString() returningText:&returnedText];
+ if (ok)
+ result = QString::fromNSString(returnedText);
+ return ok;
+}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index 515e910..b4abca5 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -115,6 +115,7 @@ public:
static void runJavaScriptAlert(const QString &message);
static bool runJavaScriptConfirm(const QString &message);
+ static bool runJavaScriptPrompt(const QString &message, const QString &defaultValue, QString &result);
static WebCoreBridge *bridgeForWidget(QWidget *);
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index b48d41e..6c4d968 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -499,3 +499,13 @@ bool KWQKHTMLPartImpl::runJavaScriptConfirm(const QString &message)
{
return [[WebCoreViewFactory sharedFactory] runJavaScriptConfirmPanelWithMessage:message.getNSString()];
}
+
+bool KWQKHTMLPartImpl::runJavaScriptPrompt(const QString &prompt, const QString &defaultValue, QString &result)
+{
+ NSString *returnedText;
+ bool ok = [[WebCoreViewFactory sharedFactory] runJavaScriptTextInputPanelWithPrompt:prompt.getNSString()
+ defaultText:defaultValue.getNSString() returningText:&returnedText];
+ if (ok)
+ result = QString::fromNSString(returnedText);
+ return ok;
+}
diff --git a/WebCore/kwq/KWQKLocale.h b/WebCore/kwq/KWQKLocale.h
index 33879ba..1cd7381 100644
--- a/WebCore/kwq/KWQKLocale.h
+++ b/WebCore/kwq/KWQKLocale.h
@@ -28,12 +28,14 @@
#include <qstringlist.h>
-QString i18n(const char* text);
+QString inputElementAltText();
+QString resetButtonDefaultLabel();
+QString searchableIndexIntroduction();
+QString submitButtonDefaultLabel();
class KLocale {
public:
- QString language() const;
- QStringList languageList() const;
+ static QString language();
};
#endif
diff --git a/WebCore/kwq/KWQKLocale.mm b/WebCore/kwq/KWQKLocale.mm
index dd6a0a8..5eec253 100644
--- a/WebCore/kwq/KWQKLocale.mm
+++ b/WebCore/kwq/KWQKLocale.mm
@@ -23,23 +23,33 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <klocale.h>
-#import <KWQLogging.h>
-#import <qstring.h>
+#import "klocale.h"
-QString i18n(const char *text)
+#import "KWQLogging.h"
+#import "qstring.h"
+#import "WebCoreViewFactory.h"
+
+QString inputElementAltText()
+{
+ return QString::fromNSString([[WebCoreViewFactory sharedFactory] inputElementAltText]);
+}
+
+QString resetButtonDefaultLabel()
+{
+ return QString::fromNSString([[WebCoreViewFactory sharedFactory] resetButtonDefaultLabel]);
+}
+
+QString searchableIndexIntroduction()
{
- return QString("not localized: ") + text;
+ return QString::fromNSString([[WebCoreViewFactory sharedFactory] searchableIndexIntroduction]);
}
-QString KLocale::language() const
+QString submitButtonDefaultLabel()
{
- LOG(NotYetImplemented, "not yet implemented");
- return "en_US";
+ return QString::fromNSString([[WebCoreViewFactory sharedFactory] submitButtonDefaultLabel]);
}
-QStringList KLocale::languageList() const
+QString KLocale::language()
{
- LOG(NotYetImplemented, "not yet implemented");
- return QStringList::split(",", "us");
+ return QString::fromNSString([[WebCoreViewFactory sharedFactory] defaultLanguageCode]);
}
diff --git a/WebCore/kwq/WebCoreViewFactory.h b/WebCore/kwq/WebCoreViewFactory.h
index e1c5ea0..53e5912 100644
--- a/WebCore/kwq/WebCoreViewFactory.h
+++ b/WebCore/kwq/WebCoreViewFactory.h
@@ -40,6 +40,13 @@
- (NSArray *)pluginsInfo; // array of id <WebCorePluginInfo>
+- (NSString *)inputElementAltText;
+- (NSString *)resetButtonDefaultLabel;
+- (NSString *)searchableIndexIntroduction;
+- (NSString *)submitButtonDefaultLabel;
+
+- (NSString *)defaultLanguageCode;
+
@end
@interface WebCoreViewFactory : NSObject
diff --git a/WebCore/kwq/kdecore/klocale.h b/WebCore/kwq/kdecore/klocale.h
index 33879ba..1cd7381 100644
--- a/WebCore/kwq/kdecore/klocale.h
+++ b/WebCore/kwq/kdecore/klocale.h
@@ -28,12 +28,14 @@
#include <qstringlist.h>
-QString i18n(const char* text);
+QString inputElementAltText();
+QString resetButtonDefaultLabel();
+QString searchableIndexIntroduction();
+QString submitButtonDefaultLabel();
class KLocale {
public:
- QString language() const;
- QStringList languageList() const;
+ static QString language();
};
#endif
diff --git a/WebCore/kwq/qt/qinputdialog.h b/WebCore/kwq/qt/qinputdialog.h
deleted file mode 100644
index df06288..0000000
--- a/WebCore/kwq/qt/qinputdialog.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef QINPUTDIALOG_H_
-#define QINPUTDIALOG_H_
-
-#include <qstring.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qlineedit.h>
-
-class QInputDialog {
-public:
- static QString getText(const QString &, const QString &, QLineEdit::EchoMode,
- const QString &text=QString::null, bool *ok=0);
-};
-
-#endif
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ecb1e53..b248d6b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2002-10-26 Darin Adler <darin at apple.com>
+
+ * WebCoreSupport.subproj/WebViewFactory.m:
+ (-[WebViewFactory inputElementAltText]): Added.
+ (-[WebViewFactory resetButtonDefaultLabel]): Added.
+ (-[WebViewFactory searchableIndexIntroduction]): Added.
+ (-[WebViewFactory submitButtonDefaultLabel]): Added.
+ (-[WebViewFactory defaultLanguageCode]): Added.
+
+ * English.lproj/Localizable.strings: Update.
+ * English.lproj/StringsNotToBeLocalized.txt: Update.
+
2002-10-25 Darin Adler <darin at apple.com>
* WebCoreSupport.subproj/WebViewFactory.m:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index ecb1e53..b248d6b 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,15 @@
+2002-10-26 Darin Adler <darin at apple.com>
+
+ * WebCoreSupport.subproj/WebViewFactory.m:
+ (-[WebViewFactory inputElementAltText]): Added.
+ (-[WebViewFactory resetButtonDefaultLabel]): Added.
+ (-[WebViewFactory searchableIndexIntroduction]): Added.
+ (-[WebViewFactory submitButtonDefaultLabel]): Added.
+ (-[WebViewFactory defaultLanguageCode]): Added.
+
+ * English.lproj/Localizable.strings: Update.
+ * English.lproj/StringsNotToBeLocalized.txt: Update.
+
2002-10-25 Darin Adler <darin at apple.com>
* WebCoreSupport.subproj/WebViewFactory.m:
diff --git a/WebKit/English.lproj/Localizable.strings b/WebKit/English.lproj/Localizable.strings
index 7f50737..eaaace1 100644
Binary files a/WebKit/English.lproj/Localizable.strings and b/WebKit/English.lproj/Localizable.strings differ
diff --git a/WebKit/English.lproj/StringsNotToBeLocalized.txt b/WebKit/English.lproj/StringsNotToBeLocalized.txt
index 2526da1..684190a 100644
--- a/WebKit/English.lproj/StringsNotToBeLocalized.txt
+++ b/WebKit/English.lproj/StringsNotToBeLocalized.txt
@@ -143,6 +143,7 @@
"application/x-javascript"
"com.apple.WebKit"
"displayTitle"
+"en"
"getFountCount = %d, family = %s, traits = 0x%08x, size = %f\n"
"htm"
"html"
diff --git a/WebKit/WebCoreSupport.subproj/WebViewFactory.m b/WebKit/WebCoreSupport.subproj/WebViewFactory.m
index 2467c6c..568c82f 100644
--- a/WebKit/WebCoreSupport.subproj/WebViewFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebViewFactory.m
@@ -58,4 +58,31 @@
return [[WebPluginDatabase installedPlugins] plugins];
}
+- (NSString *)inputElementAltText
+{
+ return UI_STRING_KEY("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value");
+}
+
+- (NSString *)resetButtonDefaultLabel
+{
+ return UI_STRING("Reset", "default label for Reset buttons in forms on web pages");
+}
+
+- (NSString *)searchableIndexIntroduction
+{
+ return UI_STRING("This is a searchable index. Enter search keywords: ",
+ "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'");
+}
+
+- (NSString *)submitButtonDefaultLabel
+{
+ return UI_STRING("Submit", "default label for Submit buttons in forms on web pages");
+}
+
+- (NSString *)defaultLanguageCode
+{
+ // FIXME: Need implementation. Defaults gives us a list of languages, but by name, not code.
+ return @"en";
+}
+
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list