| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 continue; | 440 continue; |
| 441 | 441 |
| 442 Image* image = cachedImage->getImage(); | 442 Image* image = cachedImage->getImage(); |
| 443 // Ensure no overflow possible in calculations above. | 443 // Ensure no overflow possible in calculations above. |
| 444 if (scale < minimumCursorScale) | 444 if (scale < minimumCursorScale) |
| 445 continue; | 445 continue; |
| 446 return Cursor(image, hotSpotSpecified, hotSpot, scale); | 446 return Cursor(image, hotSpotSpecified, hotSpot, scale); |
| 447 } | 447 } |
| 448 } | 448 } |
| 449 | 449 |
| 450 switch (style ? style->cursor() : ECursor::Auto) { | 450 switch (style ? style->cursor() : ECursor::kAuto) { |
| 451 case ECursor::Auto: { | 451 case ECursor::kAuto: { |
| 452 bool horizontalText = !style || style->isHorizontalWritingMode(); | 452 bool horizontalText = !style || style->isHorizontalWritingMode(); |
| 453 const Cursor& iBeam = | 453 const Cursor& iBeam = |
| 454 horizontalText ? iBeamCursor() : verticalTextCursor(); | 454 horizontalText ? iBeamCursor() : verticalTextCursor(); |
| 455 return selectAutoCursor(result, node, iBeam); | 455 return selectAutoCursor(result, node, iBeam); |
| 456 } | 456 } |
| 457 case ECursor::Cross: | 457 case ECursor::kCrosshair: |
| 458 return crossCursor(); | 458 return crossCursor(); |
| 459 case ECursor::Pointer: | 459 case ECursor::kPointer: |
| 460 return handCursor(); | 460 return handCursor(); |
| 461 case ECursor::Move: | 461 case ECursor::kMove: |
| 462 return moveCursor(); | 462 return moveCursor(); |
| 463 case ECursor::AllScroll: | 463 case ECursor::kAllScroll: |
| 464 return moveCursor(); | 464 return moveCursor(); |
| 465 case ECursor::EResize: | 465 case ECursor::kEResize: |
| 466 return eastResizeCursor(); | 466 return eastResizeCursor(); |
| 467 case ECursor::WResize: | 467 case ECursor::kWResize: |
| 468 return westResizeCursor(); | 468 return westResizeCursor(); |
| 469 case ECursor::NResize: | 469 case ECursor::kNResize: |
| 470 return northResizeCursor(); | 470 return northResizeCursor(); |
| 471 case ECursor::SResize: | 471 case ECursor::kSResize: |
| 472 return southResizeCursor(); | 472 return southResizeCursor(); |
| 473 case ECursor::NeResize: | 473 case ECursor::kNeResize: |
| 474 return northEastResizeCursor(); | 474 return northEastResizeCursor(); |
| 475 case ECursor::SwResize: | 475 case ECursor::kSwResize: |
| 476 return southWestResizeCursor(); | 476 return southWestResizeCursor(); |
| 477 case ECursor::NwResize: | 477 case ECursor::kNwResize: |
| 478 return northWestResizeCursor(); | 478 return northWestResizeCursor(); |
| 479 case ECursor::SeResize: | 479 case ECursor::kSeResize: |
| 480 return southEastResizeCursor(); | 480 return southEastResizeCursor(); |
| 481 case ECursor::NsResize: | 481 case ECursor::kNsResize: |
| 482 return northSouthResizeCursor(); | 482 return northSouthResizeCursor(); |
| 483 case ECursor::EwResize: | 483 case ECursor::kEwResize: |
| 484 return eastWestResizeCursor(); | 484 return eastWestResizeCursor(); |
| 485 case ECursor::NeswResize: | 485 case ECursor::kNeswResize: |
| 486 return northEastSouthWestResizeCursor(); | 486 return northEastSouthWestResizeCursor(); |
| 487 case ECursor::NwseResize: | 487 case ECursor::kNwseResize: |
| 488 return northWestSouthEastResizeCursor(); | 488 return northWestSouthEastResizeCursor(); |
| 489 case ECursor::ColResize: | 489 case ECursor::kColResize: |
| 490 return columnResizeCursor(); | 490 return columnResizeCursor(); |
| 491 case ECursor::RowResize: | 491 case ECursor::kRowResize: |
| 492 return rowResizeCursor(); | 492 return rowResizeCursor(); |
| 493 case ECursor::Text: | 493 case ECursor::kText: |
| 494 return iBeamCursor(); | 494 return iBeamCursor(); |
| 495 case ECursor::Wait: | 495 case ECursor::kWait: |
| 496 return waitCursor(); | 496 return waitCursor(); |
| 497 case ECursor::Help: | 497 case ECursor::kHelp: |
| 498 return helpCursor(); | 498 return helpCursor(); |
| 499 case ECursor::VerticalText: | 499 case ECursor::kVerticalText: |
| 500 return verticalTextCursor(); | 500 return verticalTextCursor(); |
| 501 case ECursor::Cell: | 501 case ECursor::kCell: |
| 502 return cellCursor(); | 502 return cellCursor(); |
| 503 case ECursor::ContextMenu: | 503 case ECursor::kContextMenu: |
| 504 return contextMenuCursor(); | 504 return contextMenuCursor(); |
| 505 case ECursor::Progress: | 505 case ECursor::kProgress: |
| 506 return progressCursor(); | 506 return progressCursor(); |
| 507 case ECursor::NoDrop: | 507 case ECursor::kNoDrop: |
| 508 return noDropCursor(); | 508 return noDropCursor(); |
| 509 case ECursor::Alias: | 509 case ECursor::kAlias: |
| 510 return aliasCursor(); | 510 return aliasCursor(); |
| 511 case ECursor::Copy: | 511 case ECursor::kCopy: |
| 512 return copyCursor(); | 512 return copyCursor(); |
| 513 case ECursor::None: | 513 case ECursor::kNone: |
| 514 return noneCursor(); | 514 return noneCursor(); |
| 515 case ECursor::NotAllowed: | 515 case ECursor::kNotAllowed: |
| 516 return notAllowedCursor(); | 516 return notAllowedCursor(); |
| 517 case ECursor::Default: | 517 case ECursor::kDefault: |
| 518 return pointerCursor(); | 518 return pointerCursor(); |
| 519 case ECursor::ZoomIn: | 519 case ECursor::kZoomIn: |
| 520 return zoomInCursor(); | 520 return zoomInCursor(); |
| 521 case ECursor::ZoomOut: | 521 case ECursor::kZoomOut: |
| 522 return zoomOutCursor(); | 522 return zoomOutCursor(); |
| 523 case ECursor::WebkitGrab: | 523 case ECursor::kWebkitGrab: |
| 524 return grabCursor(); | 524 return grabCursor(); |
| 525 case ECursor::WebkitGrabbing: | 525 case ECursor::kWebkitGrabbing: |
| 526 return grabbingCursor(); | 526 return grabbingCursor(); |
| 527 } | 527 } |
| 528 return pointerCursor(); | 528 return pointerCursor(); |
| 529 } | 529 } |
| 530 | 530 |
| 531 OptionalCursor EventHandler::selectAutoCursor(const HitTestResult& result, | 531 OptionalCursor EventHandler::selectAutoCursor(const HitTestResult& result, |
| 532 Node* node, | 532 Node* node, |
| 533 const Cursor& iBeam) { | 533 const Cursor& iBeam) { |
| 534 if (result.scrollbar()) { | 534 if (result.scrollbar()) { |
| 535 return pointerCursor(); | 535 return pointerCursor(); |
| (...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2125 } | 2125 } |
| 2126 | 2126 |
| 2127 FrameHost* EventHandler::frameHost() const { | 2127 FrameHost* EventHandler::frameHost() const { |
| 2128 if (!m_frame->page()) | 2128 if (!m_frame->page()) |
| 2129 return nullptr; | 2129 return nullptr; |
| 2130 | 2130 |
| 2131 return &m_frame->page()->frameHost(); | 2131 return &m_frame->page()->frameHost(); |
| 2132 } | 2132 } |
| 2133 | 2133 |
| 2134 } // namespace blink | 2134 } // namespace blink |
| OLD | NEW |