html_canvasimpl.cpp [plain text]
#include "html/html_canvasimpl.h"
#include "html/html_documentimpl.h"
#include "misc/htmlhashes.h"
#include "khtmlview.h"
#include "khtml_part.h"
#include <kstringhandler.h>
#include <kglobal.h>
#include <kdebug.h>
#include "rendering/render_canvasimage.h"
#include "rendering/render_flow.h"
#include "css/cssstyleselector.h"
#include "css/cssproperties.h"
#include "css/cssvalues.h"
#include "css/csshelper.h"
#include "xml/dom2_eventsimpl.h"
#include <qstring.h>
#include <qpoint.h>
#include <qregion.h>
#include <qptrstack.h>
#include <qimage.h>
#include <qpointarray.h>
using namespace DOM;
using namespace khtml;
HTMLCanvasElementImpl::HTMLCanvasElementImpl(DocumentPtr *doc)
: HTMLImageElementImpl(doc)
{
}
HTMLCanvasElementImpl::~HTMLCanvasElementImpl()
{
}
NodeImpl::Id HTMLCanvasElementImpl::id() const
{
return ID_CANVAS;
}
bool HTMLCanvasElementImpl::mapToEntry(NodeImpl::Id attr, MappedAttributeEntry& result) const
{
return HTMLImageElementImpl::mapToEntry(attr, result);
}
void HTMLCanvasElementImpl::parseHTMLAttribute(HTMLAttributeImpl *attr)
{
switch (attr->id())
{
case ATTR_SRC: {
break;
}
default: {
HTMLImageElementImpl::parseHTMLAttribute(attr);
}
}
}
RenderObject *HTMLCanvasElementImpl::createRenderer(RenderArena *arena, RenderStyle *style)
{
return new (arena) RenderCanvasImage(this);
}
void HTMLCanvasElementImpl::attach()
{
HTMLElementImpl::attach();
}
void HTMLCanvasElementImpl::detach()
{
HTMLElementImpl::detach();
}
bool HTMLCanvasElementImpl::isURLAttribute(AttributeImpl *attr) const
{
return ((attr->id() == ATTR_USEMAP && attr->value().domString()[0] != '#'));
}