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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: style Created 4 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
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/editing/FrameSelection.h" 44 #include "core/editing/FrameSelection.h"
45 #include "core/editing/SelectionController.h" 45 #include "core/editing/SelectionController.h"
46 #include "core/events/EventPath.h" 46 #include "core/events/EventPath.h"
47 #include "core/events/GestureEvent.h" 47 #include "core/events/GestureEvent.h"
48 #include "core/events/KeyboardEvent.h" 48 #include "core/events/KeyboardEvent.h"
49 #include "core/events/MouseEvent.h" 49 #include "core/events/MouseEvent.h"
50 #include "core/events/PointerEvent.h" 50 #include "core/events/PointerEvent.h"
51 #include "core/events/TextEvent.h" 51 #include "core/events/TextEvent.h"
52 #include "core/events/TouchEvent.h" 52 #include "core/events/TouchEvent.h"
53 #include "core/events/WheelEvent.h" 53 #include "core/events/WheelEvent.h"
54 #include "core/fetch/ImageResource.h" 54 #include "core/fetch/ImageResourceContent.h"
55 #include "core/frame/Deprecation.h" 55 #include "core/frame/Deprecation.h"
56 #include "core/frame/EventHandlerRegistry.h" 56 #include "core/frame/EventHandlerRegistry.h"
57 #include "core/frame/FrameHost.h" 57 #include "core/frame/FrameHost.h"
58 #include "core/frame/FrameView.h" 58 #include "core/frame/FrameView.h"
59 #include "core/frame/LocalFrame.h" 59 #include "core/frame/LocalFrame.h"
60 #include "core/frame/Settings.h" 60 #include "core/frame/Settings.h"
61 #include "core/frame/UseCounter.h" 61 #include "core/frame/UseCounter.h"
62 #include "core/frame/VisualViewport.h" 62 #include "core/frame/VisualViewport.h"
63 #include "core/html/HTMLDialogElement.h" 63 #include "core/html/HTMLDialogElement.h"
64 #include "core/html/HTMLFrameElementBase.h" 64 #include "core/html/HTMLFrameElementBase.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 return NoCursorChange; 418 return NoCursorChange;
419 } 419 }
420 } 420 }
421 421
422 if (style && style->cursors()) { 422 if (style && style->cursors()) {
423 const CursorList* cursors = style->cursors(); 423 const CursorList* cursors = style->cursors();
424 for (unsigned i = 0; i < cursors->size(); ++i) { 424 for (unsigned i = 0; i < cursors->size(); ++i) {
425 StyleImage* styleImage = (*cursors)[i].image(); 425 StyleImage* styleImage = (*cursors)[i].image();
426 if (!styleImage) 426 if (!styleImage)
427 continue; 427 continue;
428 ImageResource* cachedImage = styleImage->cachedImage(); 428 ImageResourceContent* cachedImage = styleImage->cachedImage();
429 if (!cachedImage) 429 if (!cachedImage)
430 continue; 430 continue;
431 float scale = styleImage->imageScaleFactor(); 431 float scale = styleImage->imageScaleFactor();
432 bool hotSpotSpecified = (*cursors)[i].hotSpotSpecified(); 432 bool hotSpotSpecified = (*cursors)[i].hotSpotSpecified();
433 // Get hotspot and convert from logical pixels to physical pixels. 433 // Get hotspot and convert from logical pixels to physical pixels.
434 IntPoint hotSpot = (*cursors)[i].hotSpot(); 434 IntPoint hotSpot = (*cursors)[i].hotSpot();
435 hotSpot.scale(scale, scale); 435 hotSpot.scale(scale, scale);
436 IntSize size = cachedImage->getImage()->size(); 436 IntSize size = cachedImage->getImage()->size();
437 if (cachedImage->errorOccurred()) 437 if (cachedImage->errorOccurred())
438 continue; 438 continue;
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
2129 } 2129 }
2130 2130
2131 FrameHost* EventHandler::frameHost() const { 2131 FrameHost* EventHandler::frameHost() const {
2132 if (!m_frame->page()) 2132 if (!m_frame->page())
2133 return nullptr; 2133 return nullptr;
2134 2134
2135 return &m_frame->page()->frameHost(); 2135 return &m_frame->page()->frameHost();
2136 } 2136 }
2137 2137
2138 } // namespace blink 2138 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698