- fixed issues preventing us from compiling with newer versions of gcc 4.0
* khtml/dom/dom2_events.cpp: Add definitions of some static data member constants, as required
by the C++ standard and the gcc 4.0 compiler.
* khtml/editing/selection.h: Specified KHTMLPart friend class as ::KHTMLPart, since if it's
not explicitly qualified, it means DOM::KHTMLPart.
* khtml/dom/dom_string.cpp:
(DOM::strcasecmp): Removed redundant and illegal DOM:: prefix.
(DOM::operator==): Ditto.
* khtml/ecma/kjs_binding.cpp:
(KJS::getStringOrNull): Removed redundant and illegal KJS:: prefix.
(KJS::ValueToVariant): Ditto.
* khtml/ecma/kjs_css.cpp:
(KJS::getCSSRuleConstructor): Ditto.
(KJS::getCSSValueConstructor): Ditto.
(KJS::getCSSPrimitiveValueConstructor): Ditto.
* khtml/ecma/kjs_events.cpp:
(KJS::getEventConstructor): Ditto.
(KJS::getEventExceptionConstructor): Ditto.
(KJS::getMutationEventConstructor): Ditto.
* khtml/ecma/kjs_traversal.cpp:
(KJS::getNodeFilterConstructor): Ditto.
* khtml/misc/loader_client.h: Added an empty virtual destructor to CachedObjectClient
to quiet the compiler. This doesn't really do any good, but also does no harm.
* khtml/misc/loader.cpp: (CachedObjectClient::~CachedObjectClient): Added.
* khtml/rendering/render_block.cpp: (khtml::RenderBlock::fillBlockSelectionGaps):
Initialize a couple of variables that should have been initialized to 0.
Not just about making the compiler happy -- warning found a real bug!
* kwq/KWQTextArea.mm: (RangeOfParagraph): Change else structure to work around compiler
warning bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9173
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-05-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele.
+
+ - fixed issues preventing us from compiling with newer versions of gcc 4.0
+
+ * khtml/dom/dom2_events.cpp: Add definitions of some static data member constants, as required
+ by the C++ standard and the gcc 4.0 compiler.
+
+ * khtml/editing/selection.h: Specified KHTMLPart friend class as ::KHTMLPart, since if it's
+ not explicitly qualified, it means DOM::KHTMLPart.
+
+ * khtml/dom/dom_string.cpp:
+ (DOM::strcasecmp): Removed redundant and illegal DOM:: prefix.
+ (DOM::operator==): Ditto.
+ * khtml/ecma/kjs_binding.cpp:
+ (KJS::getStringOrNull): Removed redundant and illegal KJS:: prefix.
+ (KJS::ValueToVariant): Ditto.
+ * khtml/ecma/kjs_css.cpp:
+ (KJS::getCSSRuleConstructor): Ditto.
+ (KJS::getCSSValueConstructor): Ditto.
+ (KJS::getCSSPrimitiveValueConstructor): Ditto.
+ * khtml/ecma/kjs_events.cpp:
+ (KJS::getEventConstructor): Ditto.
+ (KJS::getEventExceptionConstructor): Ditto.
+ (KJS::getMutationEventConstructor): Ditto.
+ * khtml/ecma/kjs_traversal.cpp:
+ (KJS::getNodeFilterConstructor): Ditto.
+
+ * khtml/misc/loader_client.h: Added an empty virtual destructor to CachedObjectClient
+ to quiet the compiler. This doesn't really do any good, but also does no harm.
+ * khtml/misc/loader.cpp: (CachedObjectClient::~CachedObjectClient): Added.
+
+ * khtml/rendering/render_block.cpp: (khtml::RenderBlock::fillBlockSelectionGaps):
+ Initialize a couple of variables that should have been initialized to 0.
+ Not just about making the compiler happy -- warning found a real bug!
+
+ * kwq/KWQTextArea.mm: (RangeOfParagraph): Change else structure to work around compiler
+ warning bug.
+
2005-05-13 John Sullivan <sullivan@apple.com>
* kwq/KWQTextArea.mm:
// -----------------------------------------------------------------------------
+const unsigned long KeyboardEvent::DOM_KEY_LOCATION_STANDARD;
+const unsigned long KeyboardEvent::DOM_KEY_LOCATION_LEFT;
+const unsigned long KeyboardEvent::DOM_KEY_LOCATION_RIGHT;
+const unsigned long KeyboardEvent::DOM_KEY_LOCATION_NUMPAD;
+const unsigned long KeyboardEvent::DOM_KEY_LOCATION_UNKNOWN;
+
KeyboardEvent::KeyboardEvent()
{
}
// ------------------------------------------------------------------------
-bool DOM::strcasecmp( const DOMString &as, const DOMString &bs )
+bool strcasecmp( const DOMString &as, const DOMString &bs )
{
if ( as.length() != bs.length() ) return true;
return false;
}
-bool DOM::strcasecmp( const DOMString &as, const char* bs )
+bool strcasecmp( const DOMString &as, const char* bs )
{
const QChar *a = as.unicode();
int l = as.length();
//-----------------------------------------------------------------------------
-bool DOM::operator==( const DOMString &a, const DOMString &b )
+bool operator==( const DOMString &a, const DOMString &b )
{
if (a.impl == b.impl)
return true;
return false;
}
-bool DOM::operator==( const DOMString &a, const QString &b )
+bool operator==( const DOMString &a, const QString &b )
{
unsigned int l = a.length();
return false;
}
-bool DOM::operator==( const DOMString &a, const char *b )
+bool operator==( const DOMString &a, const char *b )
{
DOMStringImpl *aimpl = a.impl;
return QString((QChar*) data(), size());
}
-Value KJS::getStringOrNull(DOMString s)
+Value getStringOrNull(DOMString s)
{
if (s.isNull())
return Null();
return String(s);
}
-QVariant KJS::ValueToVariant(ExecState* exec, const Value &val) {
+QVariant ValueToVariant(ExecState* exec, const Value &val) {
QVariant res;
switch (val.type()) {
case BooleanType:
return Value();
}
-Value KJS::getCSSRuleConstructor(ExecState *exec)
+Value getCSSRuleConstructor(ExecState *exec)
{
return cacheGlobalObject<CSSRuleConstructor>( exec, "[[cssRule.constructor]]" );
}
return Value();
}
-Value KJS::getCSSValueConstructor(ExecState *exec)
+Value getCSSValueConstructor(ExecState *exec)
{
return cacheGlobalObject<CSSValueConstructor>( exec, "[[cssValue.constructor]]" );
}
return Number(token);
}
-Value KJS::getCSSPrimitiveValueConstructor(ExecState *exec)
+Value getCSSPrimitiveValueConstructor(ExecState *exec)
{
return cacheGlobalObject<CSSPrimitiveValueConstructor>( exec, "[[cssPrimitiveValue.constructor]]" );
}
return Number(token);
}
-Value KJS::getEventConstructor(ExecState *exec)
+Value getEventConstructor(ExecState *exec)
{
return cacheGlobalObject<EventConstructor>(exec, "[[event.constructor]]");
}
return Number(token);
}
-Value KJS::getEventExceptionConstructor(ExecState *exec)
+Value getEventExceptionConstructor(ExecState *exec)
{
return cacheGlobalObject<EventExceptionConstructor>(exec, "[[eventException.constructor]]");
}
return Number(token);
}
-Value KJS::getMutationEventConstructor(ExecState *exec)
+Value getMutationEventConstructor(ExecState *exec)
{
return cacheGlobalObject<MutationEventConstructor>(exec, "[[mutationEvent.constructor]]");
}
return Number(token);
}
-Value KJS::getNodeFilterConstructor(ExecState *exec)
+Value getNodeFilterConstructor(ExecState *exec)
{
return cacheGlobalObject<NodeFilterConstructor>(exec, "[[nodeFilter.constructor]]");
}
void debugPosition() const;
void debugRenderer(khtml::RenderObject *r, bool selected) const;
- friend class KHTMLPart;
+ friend class ::KHTMLPart;
#ifndef NDEBUG
void formatForDebugger(char *buffer, unsigned length) const;
void debugPosition() const;
void debugRenderer(khtml::RenderObject *r, bool selected) const;
- friend class KHTMLPart;
+ friend class ::KHTMLPart;
#ifndef NDEBUG
void formatForDebugger(char *buffer, unsigned length) const;
// --------------------------------------
+CachedObjectClient::~CachedObjectClient() { }
void CachedObjectClient::setPixmap(const QPixmap &, const QRect&, CachedImage *) {}
void CachedObjectClient::setStyleSheet(const DOM::DOMString &/*url*/, const DOM::DOMString &/*sheet*/) {}
#ifndef KHTML_NO_XBL
class CachedObjectClient
{
public:
+ virtual ~CachedObjectClient();
+
// clipped pixmap (if it is not yet completely loaded,
// size of the complete (finished loading) pixmap
// rectangle of the part that has been loaded very recently
if (curr->isRelPositioned() && curr->layer()) {
// If the relposition offset is anything other than 0, then treat this just like an absolute positioned element.
// Just disregard it completely.
- int x, y;
+ int x = 0;
+ int y = 0;
curr->layer()->relativePositionOffset(x, y);
if (x || y)
continue;
{
exceptioncode = 0;
DocumentImpl *ownerDocThis = getDocument();
+ // FIXME: Doh! This next line isn't getting newChild, so it's never going to work!
DocumentImpl *ownerDocNew = getDocument();
if(ownerDocThis != ownerDocNew) {
kdDebug(6010)<< "not same document, newChild = " << newChild << "document = " << getDocument() << endl;
}
if (paragraphSoFar < paragraph) {
- return NSMakeRange(NSNotFound, 0);
- } else if (searchRange.location == NSNotFound || newlineRange.location == NSNotFound) {
- return searchRange;
- } else {
- return NSMakeRange(searchRange.location, newlineRange.location - searchRange.location);
+ return NSMakeRange(NSNotFound, 0);
+ }
+ if (searchRange.location == NSNotFound || newlineRange.location == NSNotFound) {
+ return searchRange;
}
+ return NSMakeRange(searchRange.location, newlineRange.location - searchRange.location);
}
- (void)setCursorPositionToIndex:(int)index inParagraph:(int)paragraph