~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/rendering/RenderSVGViewportContainer.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3
3
                  2004, 2005, 2007 Rob Buis <buis@kde.org>
4
 
 
5
 
    This file is part of the KDE project
 
4
                  2009 Google, Inc.
 
5
    Copyright (C) 2009 Apple Inc. All rights reserved.
6
6
 
7
7
    This library is free software; you can redistribute it and/or
8
8
    modify it under the terms of the GNU Library General Public
29
29
 
30
30
namespace WebCore {
31
31
 
 
32
// This is used for non-root <svg> elements and <marker> elements, neither of which are SVGTransformable
 
33
// thus we inherit from RenderSVGContainer instead of RenderSVGTransformableContainer
32
34
class RenderSVGViewportContainer : public RenderSVGContainer {
33
35
public:
34
36
    RenderSVGViewportContainer(SVGStyledElement*);
35
 
    ~RenderSVGViewportContainer();
36
 
 
 
37
 
 
38
    // FIXME: This is only public for SVGResourceMarker::draw, likely the callsite should be changed.
 
39
    TransformationMatrix viewportTransform() const;
 
40
 
 
41
    virtual void paint(PaintInfo&, int parentX, int parentY);
 
42
 
 
43
private:
37
44
    virtual bool isSVGContainer() const { return true; }
38
45
    virtual const char* renderName() const { return "RenderSVGViewportContainer"; }
39
46
 
40
 
    virtual void layout();
41
 
    virtual void paint(PaintInfo&, int parentX, int parentY);
 
47
    virtual TransformationMatrix localToParentTransform() const;
42
48
 
 
49
    // FIXME: This override should be removed once callers of RenderBox::absoluteTransform() can be removed.
43
50
    virtual TransformationMatrix absoluteTransform() const;
44
 
    virtual TransformationMatrix viewportTransform() const;
45
 
 
46
 
    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
47
 
 
48
 
    FloatRect viewport() const;
49
 
 
50
 
private:
51
 
    void calcViewport(); 
52
 
 
53
 
    virtual void applyContentTransforms(PaintInfo&);
54
 
    virtual void applyAdditionalTransforms(PaintInfo&);
55
 
    
 
51
 
 
52
    virtual void calcViewport();
 
53
 
 
54
    virtual void applyViewportClip(PaintInfo&);
 
55
    virtual bool pointIsInsideViewportClip(const FloatPoint& pointInParent);
 
56
 
56
57
    FloatRect m_viewport;
57
58
};
58
59
  
 
60
inline RenderSVGViewportContainer* toRenderSVGViewportContainer(RenderObject* object)
 
61
{
 
62
    ASSERT(!object || !strcmp(object->renderName(), "RenderSVGViewportContainer"));
 
63
    return static_cast<RenderSVGViewportContainer*>(object);
 
64
}
 
65
 
 
66
// This will catch anyone doing an unnecessary cast.
 
67
void toRenderSVGViewportContainer(const RenderSVGViewportContainer*);
 
68
 
59
69
} // namespace WebCore
60
70
 
61
71
#endif // ENABLE(SVG)