Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: Source/web/ChromeClientImpl.cpp

Issue 105363002: Make SVG images for custom CSS cursors appear sharp on retina displays (Closed) Base URL: http://src.chromium.org/blink/trunk/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/platform/Cursor.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 toWebPopupMenuImpl(webwidget)->initialize(popupContainer, bounds); 709 toWebPopupMenuImpl(webwidget)->initialize(popupContainer, bounds);
710 } 710 }
711 711
712 void ChromeClientImpl::popupClosed(WebCore::PopupContainer* popupContainer) 712 void ChromeClientImpl::popupClosed(WebCore::PopupContainer* popupContainer)
713 { 713 {
714 m_webView->popupClosed(popupContainer); 714 m_webView->popupClosed(popupContainer);
715 } 715 }
716 716
717 void ChromeClientImpl::setCursor(const WebCore::Cursor& cursor) 717 void ChromeClientImpl::setCursor(const WebCore::Cursor& cursor)
718 { 718 {
719 setCursor(WebCursorInfo(cursor)); 719 setCursor(WebCursorInfo(rasterizeSVGCursor(cursor, m_webView->deviceScaleFac tor())));
pdr. 2013/12/04 20:55:40 Is this codepath only used for SVG cursors?
Evan Wallace 2013/12/04 21:31:09 Yes, rasterizeSVGCursor() will only rasterize the
720 } 720 }
721 721
722 void ChromeClientImpl::setCursor(const WebCursorInfo& cursor) 722 void ChromeClientImpl::setCursor(const WebCursorInfo& cursor)
723 { 723 {
724 #if OS(MACOSX) 724 #if OS(MACOSX)
725 // On Mac the mousemove event propagates to both the popup and main window. 725 // On Mac the mousemove event propagates to both the popup and main window.
726 // If a popup is open we don't want the main window to change the cursor. 726 // If a popup is open we don't want the main window to change the cursor.
727 if (m_webView->hasOpenedPopup()) 727 if (m_webView->hasOpenedPopup())
728 return; 728 return;
729 #endif 729 #endif
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 { 1033 {
1034 } 1034 }
1035 1035
1036 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) 1036 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title)
1037 { 1037 {
1038 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); 1038 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
1039 } 1039 }
1040 #endif 1040 #endif
1041 1041
1042 } // namespace blink 1042 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/platform/Cursor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698