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

Side by Side Diff: Source/core/page/DragController.cpp

Issue 16599003: :hover style not applied on hover if its display property is different from original style's (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch (fixed test that was expected to fail and is now passing) Created 7 years, 6 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Google Inc. 3 * Copyright (C) 2008 Google Inc.
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 if (!dragImage) { 805 if (!dragImage) {
806 FontRenderingMode renderingMode = src->settings() ? src->settings()- >fontRenderingMode() : NormalRenderingMode; 806 FontRenderingMode renderingMode = src->settings() ? src->settings()- >fontRenderingMode() : NormalRenderingMode;
807 float deviceScaleFactor = src->page() ? src->page()->deviceScaleFact or() : 1; 807 float deviceScaleFactor = src->page() ? src->page()->deviceScaleFact or() : 1;
808 dragImage = createDragImageForLink(linkURL, hitTestResult.textConten t(), renderingMode, deviceScaleFactor); 808 dragImage = createDragImageForLink(linkURL, hitTestResult.textConten t(), renderingMode, deviceScaleFactor);
809 IntSize size = dragImageSize(dragImage); 809 IntSize size = dragImageSize(dragImage);
810 m_dragOffset = IntPoint(-size.width() / 2, -LinkDragBorderInset); 810 m_dragOffset = IntPoint(-size.width() / 2, -LinkDragBorderInset);
811 dragLoc = IntPoint(mouseDraggedPoint.x() + m_dragOffset.x(), mouseDr aggedPoint.y() + m_dragOffset.y()); 811 dragLoc = IntPoint(mouseDraggedPoint.x() + m_dragOffset.x(), mouseDr aggedPoint.y() + m_dragOffset.y());
812 } 812 }
813 doSystemDrag(dragImage, dragLoc, mouseDraggedPoint, clipboard, src, true ); 813 doSystemDrag(dragImage, dragLoc, mouseDraggedPoint, clipboard, src, true );
814 } else if (state.m_dragType == DragSourceActionDHTML) { 814 } else if (state.m_dragType == DragSourceActionDHTML) {
815 ASSERT(m_dragSourceAction & DragSourceActionDHTML); 815 if (dragImage) {
816 doSystemDrag(dragImage, dragLoc, dragOrigin, clipboard, src, false); 816 ASSERT(m_dragSourceAction & DragSourceActionDHTML);
817 doSystemDrag(dragImage, dragLoc, dragOrigin, clipboard, src, false);
818 } else {
819 startedDrag = false;
820 }
817 } else { 821 } else {
818 // draggableNode() determined an image or link node was draggable, but i t turns out the 822 // draggableNode() determined an image or link node was draggable, but i t turns out the
819 // image or link had no URL, so there is nothing to drag. 823 // image or link had no URL, so there is nothing to drag.
820 startedDrag = false; 824 startedDrag = false;
821 } 825 }
822 826
823 if (dragImage) 827 if (dragImage)
824 deleteDragImage(dragImage); 828 deleteDragImage(dragImage);
825 return startedDrag; 829 return startedDrag;
826 } 830 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 #endif 926 #endif
923 return maxDragImageSize; 927 return maxDragImageSize;
924 } 928 }
925 929
926 void DragController::cleanupAfterSystemDrag() 930 void DragController::cleanupAfterSystemDrag()
927 { 931 {
928 } 932 }
929 933
930 } // namespace WebCore 934 } // namespace WebCore
931 935
OLDNEW
« no previous file with comments | « Source/core/html/shadow/TextFieldDecorationElement.cpp ('k') | Source/core/svg/SVGImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698