[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/khtml2/impl
From: John Tapsell <john.tapsell () kdemail ! net>
Date: 2005-05-31 21:58:43
Message-ID: 1117576723.081381.7821.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 420370 by johnflux:
Fix formatting throughout
M +18 -18 HTMLImageElementImpl.cc
--- trunk/kdenonbeta/khtml2/impl/HTMLImageElementImpl.cc #420369:420370
@@ -49,13 +49,13 @@
HTMLImageElementImpl::HTMLImageElementImpl(KDOM::DocumentImpl *doc, HTMLFormElementImpl *f)
: HTMLElementImpl(doc), ismap(false), m_form(f)
{
- if (m_form)
+ if(m_form)
m_form->registerImgElement(this);
}
HTMLImageElementImpl::~HTMLImageElementImpl()
{
- if (m_form)
+ if(m_form)
m_form->removeImgElement(this);
}
@@ -73,13 +73,13 @@
setChanged();
break;
case ATTR_WIDTH:
- if (!attr->value().isEmpty())
+ if(!attr->value().isEmpty())
addCSSLength(CSS_PROP_WIDTH, attr->value());
else
removeCSSProperty(CSS_PROP_WIDTH);
break;
case ATTR_HEIGHT:
- if (!attr->value().isEmpty())
+ if(!attr->value().isEmpty())
addCSSLength(CSS_PROP_HEIGHT, attr->value());
else
removeCSSProperty(CSS_PROP_HEIGHT);
@@ -115,7 +115,7 @@
addCSSProperty(CSS_PROP_VERTICAL_ALIGN, attr->value().lower());
break;
case ATTR_USEMAP:
- if ( attr->value()[0] == '#' )
+ if(attr->value()[0] == '#' )
usemap = attr->value();
else {
//FIXME JOHNFLUX Commented out because we don't have this function yet
@@ -153,15 +153,15 @@
// lets figure out the alt text.. magic stuff
// http://www.w3.org/TR/1998/REC-html40-19980424/appendix/notes.html#altgen
// also heavily discussed by Hixie on bugzilla
- KDOM::DOMString alt( getAttribute( ATTR_ALT ) );
+ KDOM::DOMString alt(getAttribute(ATTR_ALT));
// fall back to title attribute
- if ( alt.isNull() )
- alt = getAttribute( ATTR_TITLE );
+ if(alt.isNull())
+ alt = getAttribute(ATTR_TITLE);
#if 0
- if ( alt.isNull() ) {
+ if(alt.isNull() ) {
QString p = KURL( getDocument()->completeURL( getAttribute(ATTR_SRC).string() ) ).prettyURL();
int pos;
- if ( ( pos = p.findRev( '.' ) ) > 0 )
+ if(( pos = p.findRev( '.' ) ) > 0 )
p.truncate( pos );
alt = KDOM::DOMString( KStringHandler::csqueeze( p ) );
}
@@ -178,7 +178,7 @@
RenderStyle* _style = getDocument()->styleSelector()->styleForElement(this);
_style->ref();
- if (parentNode()->renderer() && parentNode()->renderer()->childAllowed() &&
+ if(parentNode()->renderer() && parentNode()->renderer()->childAllowed() &&
_style->display() != NONE)
{
m_render = new (getDocument()->renderArena()) RenderImage(this);
@@ -187,18 +187,18 @@
}
_style->deref();
NodeBaseImpl::attach();
- if (m_render)
+ if(m_render)
m_render->updateFromElement();
}
long HTMLImageElementImpl::width() const
{
- if (!m_render) return getAttribute(ATTR_WIDTH).toInt();
+ if(!m_render) return getAttribute(ATTR_WIDTH).toInt();
// ### make a unified call for this
- if (changed()) {
+ if(changed()) {
getDocument()->updateRendering();
- if (getDocument()->view())
+ if(getDocument()->view())
getDocument()->view()->layout();
}
@@ -208,12 +208,12 @@
long HTMLImageElementImpl::height() const
{
- if (!m_render) return getAttribute(ATTR_HEIGHT).toInt();
+ if(!m_render) return getAttribute(ATTR_HEIGHT).toInt();
// ### make a unified call for this
- if (changed()) {
+ if(changed()) {
getDocument()->updateRendering();
- if (getDocument()->view())
+ if(getDocument()->view())
getDocument()->view()->layout();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic