| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 static bool isSubmitImage(Node* node) | 541 static bool isSubmitImage(Node* node) |
| 542 { | 542 { |
| 543 return isHTMLInputElement(node) && toHTMLInputElement(node)->type() == Input
TypeNames::image; | 543 return isHTMLInputElement(node) && toHTMLInputElement(node)->type() == Input
TypeNames::image; |
| 544 } | 544 } |
| 545 | 545 |
| 546 bool EventHandler::useHandCursor(Node* node, bool isOverLink) | 546 bool EventHandler::useHandCursor(Node* node, bool isOverLink) |
| 547 { | 547 { |
| 548 if (!node) | 548 if (!node) |
| 549 return false; | 549 return false; |
| 550 | 550 |
| 551 return ((isOverLink || isSubmitImage(node)) && !node->hasEditableStyle()); | 551 return ((isOverLink || isSubmitImage(node)) && !hasEditableStyle(*node)); |
| 552 } | 552 } |
| 553 | 553 |
| 554 void EventHandler::cursorUpdateTimerFired(Timer<EventHandler>*) | 554 void EventHandler::cursorUpdateTimerFired(Timer<EventHandler>*) |
| 555 { | 555 { |
| 556 ASSERT(m_frame); | 556 ASSERT(m_frame); |
| 557 ASSERT(m_frame->document()); | 557 ASSERT(m_frame->document()); |
| 558 | 558 |
| 559 updateCursor(); | 559 updateCursor(); |
| 560 } | 560 } |
| 561 | 561 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 case CURSOR_WEBKIT_GRAB: | 728 case CURSOR_WEBKIT_GRAB: |
| 729 return grabCursor(); | 729 return grabCursor(); |
| 730 case CURSOR_WEBKIT_GRABBING: | 730 case CURSOR_WEBKIT_GRABBING: |
| 731 return grabbingCursor(); | 731 return grabbingCursor(); |
| 732 } | 732 } |
| 733 return pointerCursor(); | 733 return pointerCursor(); |
| 734 } | 734 } |
| 735 | 735 |
| 736 OptionalCursor EventHandler::selectAutoCursor(const HitTestResult& result, Node*
node, const Cursor& iBeam) | 736 OptionalCursor EventHandler::selectAutoCursor(const HitTestResult& result, Node*
node, const Cursor& iBeam) |
| 737 { | 737 { |
| 738 bool editable = (node && node->hasEditableStyle()); | 738 bool editable = (node && hasEditableStyle(*node)); |
| 739 | 739 |
| 740 const bool isOverLink = !selectionController().mouseDownMayStartSelect() &&
result.isOverLink(); | 740 const bool isOverLink = !selectionController().mouseDownMayStartSelect() &&
result.isOverLink(); |
| 741 if (useHandCursor(node, isOverLink)) | 741 if (useHandCursor(node, isOverLink)) |
| 742 return handCursor(); | 742 return handCursor(); |
| 743 | 743 |
| 744 bool inResizer = false; | 744 bool inResizer = false; |
| 745 LayoutObject* layoutObject = node ? node->layoutObject() : nullptr; | 745 LayoutObject* layoutObject = node ? node->layoutObject() : nullptr; |
| 746 if (layoutObject && m_frame->view()) { | 746 if (layoutObject && m_frame->view()) { |
| 747 PaintLayer* layer = layoutObject->enclosingLayer(); | 747 PaintLayer* layer = layoutObject->enclosingLayer(); |
| 748 inResizer = layer->getScrollableArea() && layer->getScrollableArea()->is
PointInResizeControl(result.roundedPointInMainFrame(), ResizerForPointer); | 748 inResizer = layer->getScrollableArea() && layer->getScrollableArea()->is
PointInResizeControl(result.roundedPointInMainFrame(), ResizerForPointer); |
| (...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2580 | 2580 |
| 2581 FrameHost* EventHandler::frameHost() const | 2581 FrameHost* EventHandler::frameHost() const |
| 2582 { | 2582 { |
| 2583 if (!m_frame->page()) | 2583 if (!m_frame->page()) |
| 2584 return nullptr; | 2584 return nullptr; |
| 2585 | 2585 |
| 2586 return &m_frame->page()->frameHost(); | 2586 return &m_frame->page()->frameHost(); |
| 2587 } | 2587 } |
| 2588 | 2588 |
| 2589 } // namespace blink | 2589 } // namespace blink |
| OLD | NEW |