Commit 36eaa5b1 authored by eseidel's avatar eseidel
Browse files

Bug #: 5045

Submitted by: eseidel
Reviewed by: none needed, svg build fix only.
        * WebCore+SVG/DrawDocument.mm:
        (-[DrawView primaryView]): cast to DrawView * (newer gcc fix)
        * kdom/cache/KDOMLoader.cpp:
        (Loader::slotFinished): toLong -> toInt
        * ksvg2/svg/SVGAngleImpl.cpp:
        (SVGAngleImpl::setValueAsString): toFloat -> toDouble
        * ksvg2/svg/SVGComponentTransferFunctionElementImpl.cpp:
        (SVGComponentTransferFunctionElementImpl::parseAttribute): ditto
        * ksvg2/svg/SVGFEGaussianBlurElementImpl.cpp:
        (SVGFEGaussianBlurElementImpl::parseAttribute): ditto
        * ksvg2/svg/SVGFEOffsetElementImpl.cpp:
        (SVGFEOffsetElementImpl::parseAttribute): ditto
        * ksvg2/svg/SVGFETurbulenceElementImpl.cpp:
        (SVGFETurbulenceElementImpl::parseAttribute): ditto
        * ksvg2/svg/SVGFitToViewBoxImpl.cpp:
        (SVGFitToViewBoxImpl::parseViewBox): ditto
        * ksvg2/svg/SVGNumberListImpl.cpp:
        (SVGNumberListImpl::parse): ditto
        * ksvg2/svg/SVGStopElementImpl.cpp:
        (SVGStopElementImpl::parseAttribute): ditto


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@10562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 67ba8ce8
......@@ -355,7 +355,7 @@ void Loader::slotFinished(KIO::Job *job)
r->object->data(r->buffer, true);
emit requestDone(r->docLoader, r->object);
time_t expireDate = j->queryMetaData(QString::fromLatin1("expire-date")).toLong();
time_t expireDate = j->queryMetaData(QString::fromLatin1("expire-date")).toInt();
#ifdef LOADER_DEBUG
kdDebug() << "Loader::slotFinished, url = " << j->url().url() << endl;
......
2005-09-18 Eric Seidel <eseidel@apple.com>
No review needed, SVG build fix only.
* WebCore+SVG/DrawDocument.mm:
(-[DrawView primaryView]): cast to DrawView * (newer gcc fix)
* kdom/cache/KDOMLoader.cpp:
(Loader::slotFinished): toLong -> toInt
* ksvg2/svg/SVGAngleImpl.cpp:
(SVGAngleImpl::setValueAsString): toFloat -> toDouble
* ksvg2/svg/SVGComponentTransferFunctionElementImpl.cpp:
(SVGComponentTransferFunctionElementImpl::parseAttribute): ditto
* ksvg2/svg/SVGFEGaussianBlurElementImpl.cpp:
(SVGFEGaussianBlurElementImpl::parseAttribute): ditto
* ksvg2/svg/SVGFEOffsetElementImpl.cpp:
(SVGFEOffsetElementImpl::parseAttribute): ditto
* ksvg2/svg/SVGFETurbulenceElementImpl.cpp:
(SVGFETurbulenceElementImpl::parseAttribute): ditto
* ksvg2/svg/SVGFitToViewBoxImpl.cpp:
(SVGFitToViewBoxImpl::parseViewBox): ditto
* ksvg2/svg/SVGNumberListImpl.cpp:
(SVGNumberListImpl::parse): ditto
* ksvg2/svg/SVGStopElementImpl.cpp:
(SVGStopElementImpl::parseAttribute): ditto
2005-09-16 Adele Peterson <adele@apple.com>
Rolling out the fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=4924
......
......@@ -257,7 +257,7 @@ using namespace KSVG;
- (DrawView *)primaryView
{
if (_private->primaryView)
return _private->primaryView->view();
return (DrawView *)_private->primaryView->view();
return nil;
}
......
......@@ -92,7 +92,7 @@ void SVGAngleImpl::setValueAsString(KDOM::DOMStringImpl *valueAsString)
QString s = m_valueAsString.string();
bool bOK;
m_valueInSpecifiedUnits = s.toFloat(&bOK);
m_valueInSpecifiedUnits = s.toDouble(&bOK);
m_unitType = SVG_ANGLETYPE_UNSPECIFIED;
if(!bOK)
......
......@@ -135,27 +135,27 @@ void SVGComponentTransferFunctionElementImpl::parseAttribute(KDOM::AttributeImpl
}
case ATTR_SLOPE:
{
slope()->setBaseVal(value.string().toFloat());
slope()->setBaseVal(value.string().toDouble());
break;
}
case ATTR_INTERCEPT:
{
intercept()->setBaseVal(value.string().toFloat());
intercept()->setBaseVal(value.string().toDouble());
break;
}
case ATTR_AMPLITUDE:
{
amplitude()->setBaseVal(value.string().toFloat());
amplitude()->setBaseVal(value.string().toDouble());
break;
}
case ATTR_EXPONENT:
{
exponent()->setBaseVal(value.string().toFloat());
exponent()->setBaseVal(value.string().toDouble());
break;
}
case ATTR_OFFSET:
{
offset()->setBaseVal(value.string().toFloat());
offset()->setBaseVal(value.string().toDouble());
break;
}
default:
......
......@@ -91,11 +91,11 @@ void SVGFEGaussianBlurElementImpl::parseAttribute(KDOM::AttributeImpl *attr)
case ATTR_STDDEVIATION:
{
QStringList numbers = QStringList::split(' ', value.string());
stdDeviationX()->setBaseVal(numbers[0].toFloat());
stdDeviationX()->setBaseVal(numbers[0].toDouble());
if(numbers.count() == 1)
stdDeviationY()->setBaseVal(numbers[0].toFloat());
stdDeviationY()->setBaseVal(numbers[0].toDouble());
else
stdDeviationY()->setBaseVal(numbers[1].toFloat());
stdDeviationY()->setBaseVal(numbers[1].toDouble());
break;
}
......
......@@ -86,12 +86,12 @@ void SVGFEOffsetElementImpl::parseAttribute(KDOM::AttributeImpl *attr)
{
case ATTR_DX:
{
dx()->setBaseVal(value.string().toFloat());
dx()->setBaseVal(value.string().toDouble());
break;
}
case ATTR_DY:
{
dy()->setBaseVal(value.string().toFloat());
dy()->setBaseVal(value.string().toDouble());
break;
}
case ATTR_IN:
......
......@@ -129,17 +129,17 @@ void SVGFETurbulenceElementImpl::parseAttribute(KDOM::AttributeImpl *attr)
case ATTR_BASEFREQUENCY:
{
QStringList numbers = QStringList::split(' ', value.string());
baseFrequencyX()->setBaseVal(numbers[0].toFloat());
baseFrequencyX()->setBaseVal(numbers[0].toDouble());
if(numbers.count() == 1)
baseFrequencyY()->setBaseVal(numbers[0].toFloat());
baseFrequencyY()->setBaseVal(numbers[0].toDouble());
else
baseFrequencyY()->setBaseVal(numbers[1].toFloat());
baseFrequencyY()->setBaseVal(numbers[1].toDouble());
break;
}
case ATTR_SEED:
{
seed()->setBaseVal(value.string().toFloat());
seed()->setBaseVal(value.string().toDouble());
break;
}
case ATTR_NUMOCTAVES:
......
......@@ -80,10 +80,10 @@ void SVGFitToViewBoxImpl::parseViewBox(KDOM::DOMStringImpl *str)
QStringList points = QStringList::split(' ', viewbox.replace(',', ' ').simplifyWhiteSpace());
if (points.count() == 4) {
viewBox()->baseVal()->setX(points[0].toFloat());
viewBox()->baseVal()->setY(points[1].toFloat());
viewBox()->baseVal()->setWidth(points[2].toFloat());
viewBox()->baseVal()->setHeight(points[3].toFloat());
viewBox()->baseVal()->setX(points[0].toDouble());
viewBox()->baseVal()->setY(points[1].toDouble());
viewBox()->baseVal()->setWidth(points[2].toDouble());
viewBox()->baseVal()->setHeight(points[3].toDouble());
} else {
fprintf(stderr, "WARNING: Malformed viewbox string: %s (l: %i)", viewbox.ascii(), viewbox.length());
}
......
......@@ -44,7 +44,7 @@ void SVGNumberListImpl::parse(const QString &value, const SVGStyledElementImpl *
for(unsigned int i = 0;i < numbers.count();i++)
{
SVGNumberImpl *number = new SVGNumberImpl(context);
number->setValue(numbers[i].toFloat());
number->setValue(numbers[i].toDouble());
appendItem(number);
}
}
......
......@@ -61,9 +61,9 @@ void SVGStopElementImpl::parseAttribute(KDOM::AttributeImpl *attr)
case ATTR_OFFSET:
{
if(value.string().endsWith(QString::fromLatin1("%")))
offset()->setBaseVal(value.string().left(value.length() - 1).toFloat() / 100.);
offset()->setBaseVal(value.string().left(value.length() - 1).toDouble() / 100.);
else
offset()->setBaseVal(value.string().toFloat());
offset()->setBaseVal(value.string().toDouble());
break;
}
default:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment