diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
commit | 635860845790a19bf50bbc51ba8fb66a96dde068 (patch) | |
tree | ef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/page/win | |
parent | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff) | |
download | external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2 |
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/page/win')
-rw-r--r-- | WebCore/page/win/AccessibilityObjectWin.cpp | 5 | ||||
-rw-r--r-- | WebCore/page/win/DragControllerWin.cpp | 4 | ||||
-rw-r--r-- | WebCore/page/win/EventHandlerWin.cpp | 7 | ||||
-rw-r--r-- | WebCore/page/win/FrameCGWin.cpp | 41 | ||||
-rw-r--r-- | WebCore/page/win/FrameCairoWin.cpp | 6 | ||||
-rw-r--r-- | WebCore/page/win/FrameWin.cpp | 3 |
6 files changed, 52 insertions, 14 deletions
diff --git a/WebCore/page/win/AccessibilityObjectWin.cpp b/WebCore/page/win/AccessibilityObjectWin.cpp index e309ac8..0a386c7 100644 --- a/WebCore/page/win/AccessibilityObjectWin.cpp +++ b/WebCore/page/win/AccessibilityObjectWin.cpp @@ -23,10 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include "config.h" #include "AccessibilityObject.h" +#if HAVE(ACCESSIBILITY) + namespace WebCore { bool AccessibilityObject::accessibilityIgnoreAttachment() const @@ -35,3 +36,5 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const } } // namespace WebCore + +#endif // HAVE(ACCESSIBILITY) diff --git a/WebCore/page/win/DragControllerWin.cpp b/WebCore/page/win/DragControllerWin.cpp index 41f3008..dca8ea2 100644 --- a/WebCore/page/win/DragControllerWin.cpp +++ b/WebCore/page/win/DragControllerWin.cpp @@ -61,4 +61,8 @@ const IntSize& DragController::maxDragImageSize() return maxDragImageSize; } +void DragController::cleanupAfterSystemDrag() +{ +} + } diff --git a/WebCore/page/win/EventHandlerWin.cpp b/WebCore/page/win/EventHandlerWin.cpp index bfd2b02..88bc373 100644 --- a/WebCore/page/win/EventHandlerWin.cpp +++ b/WebCore/page/win/EventHandlerWin.cpp @@ -45,8 +45,6 @@ namespace WebCore { -unsigned EventHandler::s_accessKeyModifiers = PlatformKeyboardEvent::AltKey; - const double EventHandler::TextDragDelay = 0.0; bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) @@ -108,4 +106,9 @@ bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestR return false; } +unsigned EventHandler::accessKeyModifiers() +{ + return PlatformKeyboardEvent::AltKey; +} + } diff --git a/WebCore/page/win/FrameCGWin.cpp b/WebCore/page/win/FrameCGWin.cpp index ad22967..8b0408d 100644 --- a/WebCore/page/win/FrameCGWin.cpp +++ b/WebCore/page/win/FrameCGWin.cpp @@ -44,18 +44,13 @@ static void drawRectIntoContext(IntRect rect, FrameView* view, GraphicsContext* rect.move(-offset.width(), -offset.height()); rect = view->convertToContainingWindow(rect); - gc->concatCTM(AffineTransform().translate(-rect.x(), -rect.y())); + gc->concatCTM(TransformationMatrix().translate(-rect.x(), -rect.y())); view->paint(gc, rect); } -HBITMAP imageFromSelection(Frame* frame, bool forceBlackText) +static HBITMAP imageFromRect(const Frame* frame, IntRect& ir) { - frame->view()->setPaintRestriction(forceBlackText ? PaintRestrictionSelectionOnlyBlackText : PaintRestrictionSelectionOnly); - FloatRect fr = frame->selectionRect(); - IntRect ir(static_cast<int>(fr.x()), static_cast<int>(fr.y()), - static_cast<int>(fr.width()), static_cast<int>(fr.height())); - void* bits; HDC hdc = CreateCompatibleDC(0); int w = ir.width(); @@ -72,16 +67,44 @@ HBITMAP imageFromSelection(Frame* frame, bool forceBlackText) GraphicsContext gc(context); - frame->document()->updateLayout(); drawRectIntoContext(ir, frame->view(), &gc); CGContextRelease(context); SelectObject(hdc, hbmpOld); DeleteDC(hdc); + return hbmp; +} + +HBITMAP imageFromSelection(Frame* frame, bool forceBlackText) +{ + frame->document()->updateLayout(); + + frame->view()->setPaintRestriction(forceBlackText ? PaintRestrictionSelectionOnlyBlackText : PaintRestrictionSelectionOnly); + FloatRect fr = frame->selectionBounds(); + IntRect ir(static_cast<int>(fr.x()), static_cast<int>(fr.y()), + static_cast<int>(fr.width()), static_cast<int>(fr.height())); + HBITMAP image = imageFromRect(frame, ir); frame->view()->setPaintRestriction(PaintRestrictionNone); + return image; +} - return hbmp; +HBITMAP Frame::nodeImage(Node* node) const +{ + RenderObject* renderer = node->renderer(); + if (!renderer) + return 0; + + IntRect topLevelRect; + IntRect paintingRect = renderer->paintingRootRect(topLevelRect); + + document()->updateLayout(); + + m_view->setNodeToDraw(node); // invoke special sub-tree drawing mode + HBITMAP result = imageFromRect(this, paintingRect); + m_view->setNodeToDraw(0); + + return result; } } // namespace WebCore diff --git a/WebCore/page/win/FrameCairoWin.cpp b/WebCore/page/win/FrameCairoWin.cpp index a645a10..f5b832e 100644 --- a/WebCore/page/win/FrameCairoWin.cpp +++ b/WebCore/page/win/FrameCairoWin.cpp @@ -39,4 +39,10 @@ HBITMAP imageFromSelection(Frame* frame, bool forceBlackText) return 0; } +HBITMAP Frame::nodeImage(Node*) const +{ + notImplemented(); + return 0; +} + } // namespace WebCore diff --git a/WebCore/page/win/FrameWin.cpp b/WebCore/page/win/FrameWin.cpp index 536f5d8..fef1ffa 100644 --- a/WebCore/page/win/FrameWin.cpp +++ b/WebCore/page/win/FrameWin.cpp @@ -27,10 +27,9 @@ #include "runtime.h" #include "FrameWin.h" -#include "AffineTransform.h" +#include "TransformationMatrix.h" #include "FloatRect.h" #include "Document.h" -#include "FramePrivate.h" #include "RenderView.h" #include "Settings.h" |