equal
deleted
inserted
replaced
50 #include "KeyboardEvent.h" |
50 #include "KeyboardEvent.h" |
51 #include "MouseEvent.h" |
51 #include "MouseEvent.h" |
52 #include "MouseEventWithHitTestResults.h" |
52 #include "MouseEventWithHitTestResults.h" |
53 #include "Page.h" |
53 #include "Page.h" |
54 #include "PlatformKeyboardEvent.h" |
54 #include "PlatformKeyboardEvent.h" |
55 #include "PlatformScrollBar.h" |
55 #include "PlatformScrollbar.h" |
56 #include "PlatformWheelEvent.h" |
56 #include "PlatformWheelEvent.h" |
57 #include "RenderWidget.h" |
57 #include "RenderWidget.h" |
58 #include "SelectionController.h" |
58 #include "SelectionController.h" |
59 #include "Settings.h" |
59 #include "Settings.h" |
60 #include "TextEvent.h" |
60 #include "TextEvent.h" |
529 m_autoscrollRenderer = renderer; |
529 m_autoscrollRenderer = renderer; |
530 } |
530 } |
531 |
531 |
532 void EventHandler::allowDHTMLDrag(bool& flagDHTML, bool& flagUA) const |
532 void EventHandler::allowDHTMLDrag(bool& flagDHTML, bool& flagUA) const |
533 { |
533 { |
534 flagDHTML = false; |
534 if (!m_frame || !m_frame->document()) { |
535 flagUA = false; |
535 flagDHTML = false; |
536 |
536 flagUA = false; |
537 if (!m_frame) |
537 } |
538 return; |
538 |
539 |
539 unsigned mask = m_frame->page()->dragController()->delegateDragSourceAction(m_frame->view()->contentsToWindow(m_mouseDownPos)); |
540 Page* page = m_frame->page(); |
|
541 if(!page) |
|
542 return; |
|
543 |
|
544 FrameView* view = m_frame->view(); |
|
545 if(!view) |
|
546 return; |
|
547 |
|
548 unsigned mask = page->dragController()->delegateDragSourceAction(view->contentsToWindow(m_mouseDownPos)); |
|
549 flagDHTML = (mask & DragSourceActionDHTML) != DragSourceActionNone; |
540 flagDHTML = (mask & DragSourceActionDHTML) != DragSourceActionNone; |
550 flagUA = ((mask & DragSourceActionImage) || (mask & DragSourceActionLink) || (mask & DragSourceActionSelection)); |
541 flagUA = ((mask & DragSourceActionImage) || (mask & DragSourceActionLink) || (mask & DragSourceActionSelection)); |
551 |
|
552 } |
542 } |
553 |
543 |
554 HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent) |
544 HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent) |
555 { |
545 { |
556 HitTestResult result(point); |
546 HitTestResult result(point); |
694 if (!cimage) |
684 if (!cimage) |
695 continue; |
685 continue; |
696 if (cimage->image()->isNull()) |
686 if (cimage->image()->isNull()) |
697 break; |
687 break; |
698 if (!cimage->errorOccurred()) |
688 if (!cimage->errorOccurred()) |
699 //The implementation for Cursor(cimage->image(), hotSpot) is not present.So calling this method will create a partially constructed object |
689 return Cursor(cimage->image(), hotSpot); |
700 //where PlatformCursor pointer points to nothing.This will cause crashes when cursor.Imp()->Type will be called. |
|
701 //So better to call nonecursor instead of Cursor(cimage->image(), hotSpot). |
|
702 //return Cursor(cimage->image(), hotSpot). |
|
703 return noneCursor(); |
|
704 } |
690 } |
705 } |
691 } |
706 |
692 |
707 switch (style ? style->cursor() : CURSOR_AUTO) { |
693 switch (style ? style->cursor() : CURSOR_AUTO) { |
708 case CURSOR_AUTO: { |
694 case CURSOR_AUTO: { |