| Index: Source/web/WebElement.cpp
|
| diff --git a/Source/web/WebElement.cpp b/Source/web/WebElement.cpp
|
| index 2dbf4fcde9a9f0b2cf8e55c72d9c385466a23644..c4f5f4dc9df3afa3f5af6a96cb9e0e2b772e8ed0 100644
|
| --- a/Source/web/WebElement.cpp
|
| +++ b/Source/web/WebElement.cpp
|
| @@ -152,6 +152,22 @@ WebRect WebElement::boundsInViewportSpace()
|
| return unwrap<Element>()->boundsInRootViewSpace();
|
| }
|
|
|
| +WebImage WebElement::imageContents()
|
| +{
|
| + if (isNull())
|
| + return WebImage();
|
| +
|
| + WebCore::Image* image = unwrap<Element>()->imageContents();
|
| + if (!image)
|
| + return WebImage();
|
| +
|
| + RefPtr<NativeImageSkia> bitmap = image->nativeImageForCurrentFrame();
|
| + if (!bitmap)
|
| + return WebImage();
|
| +
|
| + return bitmap->bitmap();
|
| +}
|
| +
|
| WebElement::WebElement(const PassRefPtr<Element>& elem)
|
| : WebNode(elem)
|
| {
|
|
|