~jconti/ubuntu/oneiric/webkit/fix_doc_path

« back to all changes in this revision

Viewing changes to WebCore/rendering/RenderVideo.h

* New upstream (semi-stable) release
* Fix building on IA64 (Closes: #547797)
  Thanks to Colin Watson <cjwatson@ubuntu.com>
* Fix building on alpha (Closes: #548499)
* Fix building on amd64 FreeBSD

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2007 Apple Inc.  All rights reserved.
 
2
 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
3
3
 *
4
4
 * Redistribution and use in source and binary forms, with or without
5
5
 * modification, are permitted provided that the following conditions
42
42
    RenderVideo(HTMLMediaElement*);
43
43
    virtual ~RenderVideo();
44
44
 
 
45
    void videoSizeChanged();
 
46
    IntRect videoBox() const;
 
47
    
 
48
#if USE(ACCELERATED_COMPOSITING)
 
49
    bool supportsAcceleratedRendering() const;
 
50
    void acceleratedRenderingStateChanged();
 
51
    GraphicsLayer* videoGraphicsLayer() const;
 
52
#endif
 
53
 
 
54
private:
 
55
    virtual void updateFromElement();
 
56
 
 
57
    virtual void intrinsicSizeChanged() { videoSizeChanged(); }
 
58
 
45
59
    virtual const char* renderName() const { return "RenderVideo"; }
46
60
 
47
61
    virtual bool requiresLayer() const { return true; }
48
62
    virtual bool isVideo() const { return true; }
49
63
 
50
 
    virtual void paintReplaced(PaintInfo& paintInfo, int tx, int ty);
 
64
    virtual void paintReplaced(PaintInfo&, int tx, int ty);
51
65
 
52
66
    virtual void layout();
53
67
 
56
70
 
57
71
    virtual void calcPrefWidths();
58
72
    
59
 
    void videoSizeChanged();
60
 
    IntRect videoBox() const;
61
 
    
62
 
    void updateFromElement();
63
 
 
64
 
#if USE(ACCELERATED_COMPOSITING)
65
 
    bool supportsAcceleratedRendering() const;
66
 
    virtual void acceleratedRenderingStateChanged();
67
 
    GraphicsLayer* videoGraphicsLayer() const;
68
 
#endif
69
 
 
70
 
protected:
71
 
    virtual void intrinsicSizeChanged() { videoSizeChanged(); }
72
 
 
73
 
private:
74
73
    int calcAspectRatioWidth() const;
75
74
    int calcAspectRatioHeight() const;
76
75
 
80
79
    void updatePlayer();
81
80
};
82
81
 
 
82
inline RenderVideo* toRenderVideo(RenderObject* object)
 
83
{
 
84
    ASSERT(!object || object->isVideo());
 
85
    return static_cast<RenderVideo*>(object);
 
86
}
 
87
 
 
88
// This will catch anyone doing an unnecessary cast.
 
89
void toRenderVideo(const RenderVideo*);
 
90
 
83
91
} // namespace WebCore
84
92
 
85
93
#endif