Start to use std::unique_ptr for DragImageLoader
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
3         Start to use std::unique_ptr for DragImageLoader
4         https://bugs.webkit.org/show_bug.cgi?id=129078
5
6         Reviewed by Ryosuke Niwa.
7
8         As a step to use std::unique_ptr, this patch replace uses of OwnPtr and PassOwnPtr
9         in the DragImageLoader class with std::unique_ptr. Besides DragImageLoader is set to
10         non-copyable class.
11
12         * dom/Clipboard.cpp:
13         (WebCore::Clipboard::setDragImage):
14         * dom/Clipboard.h:
15
16 2014-02-20  Brady Eidson  <beidson@apple.com>
17
18         Move the image controls setting to Settings.in
19         https://bugs.webkit.org/show_bug.cgi?id=129126
20
21         Reviewed by Tim Horton.
22
23         * page/Settings.cpp:
24         (WebCore::Settings::Settings):
25         * page/Settings.h:
26         * page/Settings.in:
27
28 2014-02-20  Brady Eidson  <beidson@apple.com>
29
30         Add very basic image control rendering
31         https://bugs.webkit.org/show_bug.cgi?id=129080
32
33         Reviewed by Tim Horton.
34
35         Test: fast/images/image-controls-basic.html
36
37         This patch is groundwork that adds a very basic image control that can render on top of images.
38
39         * dom/Node.h:
40         (WebCore::Node:: isImageControlsRootElement): Returns false, unless you are an ImageControls object.
41         * html/HTMLAttributeNames.in:
42
43         Teach HTMLImageElement how to understand an experimental attribute to install controls,
44         how to actually build the DOM to attach to the shadow root, how to tear that DOM down,
45         and how to make sure that Renderers are created for that DOM:
46         * html/HTMLImageElement.cpp:
47         (WebCore::HTMLImageElement::HTMLImageElement):
48         (WebCore::HTMLImageElement::parseAttribute):
49         (WebCore::HTMLImageElement::didAttachRenderers):
50         (WebCore::HTMLImageElement::updateImageControls):
51         (WebCore::HTMLImageElement::createImageControls):
52         (WebCore::HTMLImageElement::destroyImageControls):
53         (WebCore::HTMLImageElement::hasImageControls):
54         (WebCore::HTMLImageElement::childShouldCreateRenderer):
55         * html/HTMLImageElement.h:
56         (WebCore::HTMLImageElement::hasShadowControls): For RenderImage to query when it is constructed. 
57
58         Add a generic, platform independent ImageControls root element that does nothing:
59         * html/shadow/ImageControlsRootElement.cpp: Added.
60         (WebCore::ImageControlsRootElement::maybeCreate):
61         (WebCore::ImageControlsRootElement::ImageControlsRootElement):
62         (WebCore::ImageControlsRootElement::~ImageControlsRootElement):
63         * html/shadow/ImageControlsRootElement.h: Added.
64
65         Add a Mac-specific ImageControls root element that renders a 20x20 red box (for now):
66         * html/shadow/mac/ImageControlsRootElementMac.cpp: Added.
67         (WebCore::ImageControlsRootElementMac::ImageControlsRootElementMac):
68         (WebCore::ImageControlsRootElementMac::~ImageControlsRootElementMac):
69         (WebCore::ImageControlsRootElement::maybeCreate):
70         (WebCore::ImageControlsRootElementMac::maybeCreate):
71         * html/shadow/mac/ImageControlsRootElementMac.h: Added.
72
73         Since much of the RenderMedia::layout() method is now required for RenderImage as well,
74         move the logic to RenderImage. The extra work is controlled by a bool flag that will always
75         be set for RenderMedias but will only be set for certain RenderImages:
76         * rendering/RenderImage.cpp:
77         (WebCore::RenderImage::RenderImage):
78         (WebCore::RenderImage::canHaveChildren):
79         (WebCore::RenderImage::layout):
80         (WebCore::RenderImage::layoutShadowControls):
81         * rendering/RenderImage.h:
82         (WebCore::RenderImage::setHasShadowControls):
83         (WebCore::RenderImage::shadowControlsNeedCustomLayoutMetrics):
84
85         * rendering/RenderMedia.cpp:
86         (WebCore::RenderMedia::RenderMedia):
87         * rendering/RenderMedia.h:
88         (WebCore::RenderMedia::shadowControlsNeedCustomLayoutMetrics):
89
90         * WebCore.xcodeproj/project.pbxproj:
91
92 == Rolled over to ChangeLog-2014-02-20 ==