Web Inspector: JSContext inspection should report exceptions in the console
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-02-21  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Web Inspector: JSContext inspection should report exceptions in the console
4         https://bugs.webkit.org/show_bug.cgi?id=128776
5
6         Reviewed by Timothy Hatcher.
7
8         Include some clean up of ConsoleMessage and ScriptCallStack construction.
9
10         Covered by existing tests.
11
12         * bindings/js/JSDOMBinding.cpp:
13         (WebCore::reportException):
14         Simplify code now that createStackTraceFromException handles it.
15
16         * page/ContentSecurityPolicy.cpp:
17         (WebCore::gatherSecurityPolicyViolationEventData):
18         (WebCore::ContentSecurityPolicy::reportViolation):
19         ScriptCallStack can give us the first non-native callframe.
20
21         * inspector/InspectorResourceAgent.cpp:
22         (WebCore::InspectorResourceAgent::buildInitiatorObject):
23         * inspector/PageDebuggerAgent.cpp:
24         (WebCore::PageDebuggerAgent::breakpointActionLog):
25         * inspector/TimelineRecordFactory.cpp:
26         (WebCore::TimelineRecordFactory::createGenericRecord):
27         * page/Console.cpp:
28         (WebCore::internalAddMessage):
29         (WebCore::Console::profile):
30         (WebCore::Console::profileEnd):
31         (WebCore::Console::timeEnd):
32         * page/ContentSecurityPolicy.cpp:
33         (WebCore::gatherSecurityPolicyViolationEventData):
34         (WebCore::ContentSecurityPolicy::reportViolation):
35         * page/DOMWindow.cpp:
36         (WebCore::DOMWindow::postMessage):
37
38 2014-02-21  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
39
40         Fixing the !ENABLE(SVG_FONTS) build
41         https://bugs.webkit.org/show_bug.cgi?id=129150
42
43         Reviewed by Anders Carlsson.
44
45         No new tests required.
46
47         * svg/SVGAltGlyphElement.cpp:
48         * svg/SVGAltGlyphElement.h:
49         * svg/svgtags.in:
50
51 2014-02-21  Radu Stavila  <stavila@adobe.com>
52
53         [CSS Regions] Use the named-flow-specific object RenderNamedFlowFragment instead of the generic RenderRegion whenever possible
54         https://bugs.webkit.org/show_bug.cgi?id=128599
55
56         Reviewed by Andrei Bucur.
57
58         Use the named flow specific RenderNamedFlowFragment instead of the generic RenderRegion, whenever possible.
59         Move named flow specific methods from RenderRegion to RenderNamedFlowFragment.
60
61         No new tests required.
62
63         * dom/Element.cpp:
64         (WebCore::Element::renderNamedFlowFragment):
65         (WebCore::Element::webkitRegionOverset):
66         (WebCore::Element::webkitGetRegionFlowRanges):
67         * dom/Element.h:
68         * inspector/InspectorCSSAgent.cpp:
69         (WebCore::InspectorCSSAgent::buildArrayForRegions):
70         * rendering/PaintInfo.h:
71         (WebCore::PaintInfo::PaintInfo):
72         * rendering/RenderBlock.cpp:
73         (WebCore::RenderBlock::paint):
74         (WebCore::RenderBlock::paintObject):
75         * rendering/RenderBox.cpp:
76         (WebCore::RenderBox::paintBoxDecorations):
77         (WebCore::RenderBox::pushContentsClip):
78         (WebCore::RenderBox::layoutOverflowRectForPropagation):
79         * rendering/RenderBox.h:
80         * rendering/RenderBoxModelObject.cpp:
81         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
82         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
83         * rendering/RenderBoxModelObject.h:
84         * rendering/RenderInline.h:
85         * rendering/RenderLayer.cpp:
86         (WebCore::RenderLayer::paint):
87         (WebCore::RenderLayer::paintLayer):
88         (WebCore::RenderLayer::paintLayerContents):
89         (WebCore::RenderLayer::paintLayerByApplyingTransform):
90         (WebCore::RenderLayer::updatePaintingInfoForFragments):
91         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
92         (WebCore::RenderLayer::paintBackgroundForFragments):
93         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
94         (WebCore::RenderLayer::paintOutlineForFragments):
95         (WebCore::RenderLayer::paintMaskForFragments):
96         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
97         (WebCore::RenderLayer::calculateClipRects):
98         * rendering/RenderLayer.h:
99         * rendering/RenderNamedFlowFragment.cpp:
100         (WebCore::RenderNamedFlowFragment::getRanges):
101         * rendering/RenderNamedFlowFragment.h:
102         * rendering/RenderNamedFlowThread.cpp:
103         (WebCore::RenderNamedFlowThread::updateWritingMode):
104         (WebCore::compareRenderNamedFlowFragments):
105         (WebCore::addFragmentToList):
106         (WebCore::RenderNamedFlowThread::addFragmentToNamedFlowThread):
107         (WebCore::RenderNamedFlowThread::addRegionToThread):
108         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
109         (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
110         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
111         (WebCore::RenderNamedFlowThread::getRanges):
112         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
113         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
114         * rendering/RenderNamedFlowThread.h:
115         * rendering/RenderRegion.cpp:
116         * rendering/RenderRegion.h:
117         * rendering/RenderReplaced.cpp:
118         (WebCore::RenderReplaced::shouldPaint):
119         * rendering/RenderReplica.cpp:
120         (WebCore::RenderReplica::paint):
121         * rendering/RootInlineBox.cpp:
122         (WebCore::RootInlineBox::paint):
123         * rendering/svg/RenderSVGRoot.cpp:
124         (WebCore::RenderSVGRoot::paintReplaced):
125
126 2014-02-21  Andrei Bucur  <abucur@adobe.com>
127
128         [CSS Regions] Regions don't paint correctly in new-multicol elements
129         https://bugs.webkit.org/show_bug.cgi?id=120711
130
131         Reviewed by David Hyatt.
132
133         This patch implements basic support for regions inside multi-column elements.
134         Currently, the painting and hit-testing logic of CSS Regions is not aware of
135         enclosing multi-column elements. The change is integrated at a layer level by
136         making use of the pre-computed layer fragments during the painting and hit-testing
137         phases for regions.
138
139         There are limitations such that self painting layers found inside the named flow
140         thread layer will not be correctly processed because they don't go through the
141         layer fragment collection step. This is not trivial to implement because the enclosing
142         pagination layer provided by the multi-column element is not visibile from inside
143         the named flow thread layer and they reside in different coordinate systems.
144
145         A side effect of this patch is the fix of regions incorrect clipping in certain
146         cases (when both a region and its container clip their overflow, the region's
147         content is visible outside the container).
148
149         Tests: fast/regions/region-clipping.html
150                fast/regions/regions-in-multicol-bt.html
151                fast/regions/regions-in-multicol-hover-overflow.html
152                fast/regions/regions-in-multicol-hover.html
153                fast/regions/regions-in-multicol-lr.html
154                fast/regions/regions-in-multicol-rl.html
155                fast/regions/regions-in-multicol.html
156
157         * rendering/RenderLayer.cpp:
158         (WebCore::RenderLayer::paintLayerContents):
159         (WebCore::RenderLayer::hitTestLayer):
160         (WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
161         (WebCore::RenderLayer::hitTestFlowThreadIfRegionForFragments):
162         * rendering/RenderLayer.h:
163
164 2014-02-21  Mihai Tica  <mitica@adobe.com>
165
166         [CSS Blending] Refactor -webkit-blend-mode to -webkit-mix-blend-mode
167         https://bugs.webkit.org/show_bug.cgi?id=128805
168
169         Reviewed by Dean Jackson.
170
171         The spec defines the mix-blend-mode property. This means that the
172         prefixed version should be -webkit-mix-blend-mode, instead of
173         -webkit-blend-mode.
174
175         * css/CSSComputedStyleDeclaration.cpp:
176         (WebCore::ComputedStyleExtractor::propertyValue):
177         * css/CSSParser.cpp:
178         (WebCore::isValidKeywordPropertyAndValue):
179         (WebCore::isKeywordPropertyID):
180         (WebCore::CSSParser::parseValue):
181         * css/CSSPropertyNames.in:
182         * css/DeprecatedStyleBuilder.cpp:
183         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
184
185 2014-02-21  Ryosuke Niwa  <rniwa@webkit.org>
186
187         Bindings tests rebaseline after r164473.
188
189         * bindings/scripts/test/ObjC/DOMTestObj.mm:
190         (-[DOMTestObj mutablePoint]):
191         (-[DOMTestObj immutablePoint]):
192         (-[DOMTestObj mutablePointFunction]):
193         (-[DOMTestObj immutablePointFunction]):
194         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
195         (-[DOMTestTypedefs immutablePointFunction]):
196
197 2014-02-21  Tim Horton  <timothy_horton@apple.com>
198
199         Remove removed symbol from exports list.
200
201         * WebCore.exp.in:
202
203 2014-02-20  ChangSeok Oh  <changseok.oh@collabora.com>
204
205         Rename EXT_draw_buffers to WEBGL_draw_buffers
206         https://bugs.webkit.org/show_bug.cgi?id=128894
207
208         Reviewed by Dean Jackson.
209
210         I noticed the related spec has changed. Accordingly chromium also changed its implementation
211         to meet the spec. So here I'd like to apply it to webkit as well.
212
213         Merged from Blink (patch by bajones):
214         https://src.chromium.org/viewvc/blink?revision=152065&view=revision
215
216         Test: fast/canvas/webgl/webgl-draw-buffers.html
217
218         * CMakeLists.txt:
219         * DerivedSources.cpp:
220         * DerivedSources.make:
221         * GNUmakefile.list.am:
222         * WebCore.vcxproj/WebCore.vcxproj:
223         * WebCore.vcxproj/WebCore.vcxproj.filters:
224         * WebCore.xcodeproj/project.pbxproj:
225         * bindings/js/JSWebGLRenderingContextCustom.cpp:
226         (WebCore::toJS):
227         * html/canvas/EXTDrawBuffers.idl: Removed.
228         * html/canvas/WebGLDrawBuffers.cpp: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.cpp.
229         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
230         (WebCore::WebGLDrawBuffers::~WebGLDrawBuffers):
231         (WebCore::WebGLDrawBuffers::getName):
232         (WebCore::WebGLDrawBuffers::create):
233         (WebCore::WebGLDrawBuffers::supported):
234         (WebCore::WebGLDrawBuffers::drawBuffersWEBGL):
235         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
236         * html/canvas/WebGLDrawBuffers.h: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.h.
237         * html/canvas/WebGLDrawBuffers.idl: Added.
238         * html/canvas/WebGLExtension.h:
239         * html/canvas/WebGLFramebuffer.cpp:
240         (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
241         * html/canvas/WebGLRenderingContext.cpp:
242         (WebCore::WebGLRenderingContext::getExtension):
243         (WebCore::WebGLRenderingContext::getParameter):
244         (WebCore::WebGLRenderingContext::getSupportedExtensions):
245         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
246         (WebCore::WebGLRenderingContext::supportsDrawBuffers):
247         * html/canvas/WebGLRenderingContext.h:
248
249 2014-02-20  Ryosuke Niwa  <rniwa@webkit.org>
250
251         m_ancestorDisabledState should never be unknown
252         https://bugs.webkit.org/show_bug.cgi?id=129084
253
254         Reviewed by Benjamin Poulain.
255
256         In order to resolve the bug 129035, a text form control elements needs to synchronously change
257         its inner text element's editability by setting or unsetting contenteditable content attribute.
258         Before this patch, we could not do this because editability of a text form control dependent on
259         its disabled-ness which was only computed lazily via updateAncestorDisabledState().
260
261         This patch makes HTMLFieldSetElement and HTMLFormControlElement update this state synchronously.
262         To avoid O(k) DOM traversal, where k is the depth of the tree, in insertedInto and removedFrom of
263         HTMLFormControlElement on most pages, a new document-level flag, m_disabledFieldsetElementsCount,
264         has been added to indicate whether the document contains any disabled fieldset or not.
265
266         Also renamed the misleadingly named disabledAttributeChanged to disabledStateChanged, and added
267         new function of the same name (disabledAttributeChanged) to be used by HTMLFieldSetElement
268         for keeping the document-level flag up-to-date upon disabled attribute changes.
269
270         Tests: fast/forms/fieldset/fieldset-disabled-2.html
271
272         * dom/Document.cpp:
273         (WebCore::Document::Document): Initializes newly added m_disabledFieldsetElementsCount.
274         (WebCore::Document::~Document): Assert that we've done house keeping right.
275         * dom/Document.h:
276         (WebCore::Document::hasDisabledFieldsetElement): Added.
277         (WebCore::Document::addDisabledFieldsetElement): Added.
278         (WebCore::Document::removeDisabledFieldsetElement): Added.
279
280         * html/HTMLFieldSetElement.cpp:
281         (WebCore::HTMLFieldSetElement::~HTMLFieldSetElement): Removes itself from the owner document.
282
283         (WebCore::updateFromControlElementsAncestorDisabledStateUnder): Added. Updates startNode and
284         its descendants' ancestor disabled flag. We don't update controls under another disabled
285         fieldset element since disabled-ness of those controls aren't affected by startNode.
286
287         (WebCore::HTMLFieldSetElement::disabledAttributeChanged): Call addDisabledFieldsetElement and
288         removeDisabledFieldsetElement to update the owner document's flag.
289
290         (WebCore::HTMLFieldSetElement::disabledStateChanged): Renamed from disabledAttributeChanged. 
291         Enable form control elements under the first legend element and disable or enable other
292         descendent form controls in accordance with the presence of disabled content attribute.
293
294         (WebCore::HTMLFieldSetElement::childrenChanged): Update disabled-ness of form controls under
295         child legend elements because controls aren't disabled in the first legend element, and adding
296         or removing child elements may have changed the first legend element.
297
298         (WebCore::HTMLFieldSetElement::didMoveToNewDocument): Update the flag on the owner document.
299         * html/HTMLFieldSetElement.h:
300
301         * html/HTMLFormControlElement.cpp:
302         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
303         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor): Returns boolean instead of
304         updating m_ancestorDisabledState internally. Also renamed from updateAncestorDisabledState.
305
306         (WebCore::HTMLFormControlElement::setAncestorDisabled): Replaced ancestorDisabledStateWasChanged.
307         This function updates m_disabledByAncestorFieldset and calls disabledAttributeChanged as needed.
308
309         (WebCore::HTMLFormControlElement::disabledAttributeChanged): Added. Calls disabledStateChanged.
310         (WebCore::HTMLFormControlElement::disabledStateChanged): Renamed from disabledAttributeChanged.
311
312         (WebCore::HTMLFormControlElement::insertedInto): Update m_disabledByAncestorFieldset if there is
313         a possibility (i.e. the document contains any disabled fieldset element) that this form control
314         is inserted under a disabled fieldset element.
315
316         (WebCore::HTMLFormControlElement::removedFrom): If this form control element is not disabled by
317         a fieldset ancestor, then there is nothing to do. If it is, then check to see if the element is
318         still disabled now that we've lost some ancestors.
319
320         (WebCore::HTMLFormControlElement::isDisabledFormControl): No longer updates m_ancestorDisabledState
321         lazily since m_disabledByAncestorFieldset is never ambiguous now.
322
323         * html/HTMLFormControlElement.h:
324         (WebCore::HTMLFormControlElement::disabledByAncestorFieldset): Added.
325
326 2014-02-20  Zalan Bujtas  <zalan@apple.com>
327
328         Remove redundant deviceScaleFactor() functions and make callers use Document::deviceScaleFactor() when accessible.
329         https://bugs.webkit.org/show_bug.cgi?id=129137
330
331         Reviewed by Simon Fraser.
332
333         No change in behavior.
334
335         * editing/DeleteButtonController.cpp:
336         (WebCore::DeleteButtonController::createDeletionUI):
337         * page/Page.cpp:
338         * page/Page.h:
339         * platform/graphics/GraphicsContext.cpp:
340         (WebCore::GraphicsContext::GraphicsContext):
341         * platform/graphics/GraphicsContext.h:
342         * platform/graphics/cg/GraphicsContextCG.cpp:
343         (WebCore::GraphicsContext::platformInit):
344         * rendering/RenderBoxModelObject.cpp:
345         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
346         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
347         * rendering/RenderImage.cpp:
348         (WebCore::RenderImage::imageSizeForError):
349         (WebCore::RenderImage::paintReplaced):
350         * rendering/RenderLayer.cpp:
351         (WebCore::RenderLayer::drawPlatformResizerImage):
352         * rendering/RenderObject.cpp:
353         (WebCore::RenderObject::drawLineForBoxSide):
354         * rendering/RenderThemeMac.mm:
355         (WebCore::RenderThemeMac::paintProgressBar):
356         * rendering/svg/SVGRenderingContext.cpp:
357         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
358
359 2014-02-20  David Kilzer  <ddkilzer@apple.com>
360
361         Stop generating Objective-C bindings for the SVG DOM
362         <http://webkit.org/b/129107>
363
364         Reviewed by Timothy Hatcher.
365
366         Bug 114076 stopped compiling the Objective-C bindings for the
367         SVG DOM, but we continued to generate the header and source
368         files after that landed in r147822.  This patch also stops
369         generating the unused header and source files.
370
371         * DerivedSources.make:
372         - Split BINDING_IDLS into NON_SVG_BINDING_IDLS and
373           SVG_BINDING_IDLS so that they may operated on separately.
374         - Define BINDING_IDLS again as the full list of IDL files.
375         - Rename DOM_CLASSES to JS_DOM_CLASSES so that JavaScript
376           bindings are still generated for all IDL files.
377         - Add OBJC_DOM_CLASSES so that Objective-C bindings are only
378           generated for non-SVG IDL files.
379
380         * bindings/scripts/CodeGeneratorObjC.pm:
381         (GetBaseClass):
382         (GetPropertyAttributes):
383         (AddIncludesForType):
384         (GenerateHeader):
385         (GenerateImplementation):
386         - Remove support for SVG classes.
387
388 2014-02-20  Simon Fraser  <simon.fraser@apple.com>
389
390         RenderBox::updateShapeOutsideInfoAfterStyleChange shows up on profiles
391         https://bugs.webkit.org/show_bug.cgi?id=129075
392
393         Reviewed by Dean Jackson.
394
395         updateShapeOutsideInfoAfterStyleChange() showed up on profiles in content
396         with no shapes. Avoid calling this if no style has shapeOutside().
397
398         * rendering/RenderBox.cpp:
399         (WebCore::RenderBox::styleDidChange):
400
401 2014-02-20  ChangSeok Oh  <changseok.oh@collabora.com>
402
403         Remove unused chromium stuff in Extensions3D
404         https://bugs.webkit.org/show_bug.cgi?id=129086
405
406         Reviewed by Anders Carlsson.
407
408         Remove GL_CHROMIUM_copy_texture and GL_CHROMIUM_flipy interfaces since they are used nowhere.
409
410         No new tests since no functionality changed.
411
412         * platform/graphics/Extensions3D.h:
413         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
414         * platform/graphics/opengl/Extensions3DOpenGL.h:
415         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
416         * platform/graphics/opengl/Extensions3DOpenGLES.h:
417
418 2014-02-20  Joseph Pecoraro  <pecoraro@apple.com>
419
420         [iOS] Assert / crash trying to draw empty checked input
421         https://bugs.webkit.org/show_bug.cgi?id=129138
422
423         Reviewed by Simon Fraser.
424
425         Test: fast/forms/checkbox-empty-size.html
426
427         * rendering/RenderThemeIOS.mm:
428         (WebCore::shortened):
429         Avoid a divide by 0, but checking for the condition upfront.
430
431 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
432
433         Start fixing the view states driven by the WKScrollView
434         https://bugs.webkit.org/show_bug.cgi?id=129140
435
436         Reviewed by Tim Horton and Simon Fraser.
437
438         * platform/graphics/ca/mac/TileController.mm:
439         (WebCore::TileController::scaledExposedRect):
440         That comment was more confusing than helping. FrameView-relative coordinates should not need
441         scaling.
442
443 2014-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
444
445         Start to use std::unique_ptr for DragImageLoader
446         https://bugs.webkit.org/show_bug.cgi?id=129078
447
448         Reviewed by Ryosuke Niwa.
449
450         As a step to use std::unique_ptr, this patch replace uses of OwnPtr and PassOwnPtr
451         in the DragImageLoader class with std::unique_ptr. Besides DragImageLoader is set to
452         non-copyable class.
453
454         * dom/Clipboard.cpp:
455         (WebCore::Clipboard::setDragImage):
456         * dom/Clipboard.h:
457
458 2014-02-20  Brady Eidson  <beidson@apple.com>
459
460         Move the image controls setting to Settings.in
461         https://bugs.webkit.org/show_bug.cgi?id=129126
462
463         Reviewed by Tim Horton.
464
465         * page/Settings.cpp:
466         (WebCore::Settings::Settings):
467         * page/Settings.h:
468         * page/Settings.in:
469
470 2014-02-20  Brady Eidson  <beidson@apple.com>
471
472         Add very basic image control rendering
473         https://bugs.webkit.org/show_bug.cgi?id=129080
474
475         Reviewed by Tim Horton.
476
477         Test: fast/images/image-controls-basic.html
478
479         This patch is groundwork that adds a very basic image control that can render on top of images.
480
481         * dom/Node.h:
482         (WebCore::Node:: isImageControlsRootElement): Returns false, unless you are an ImageControls object.
483         * html/HTMLAttributeNames.in:
484
485         Teach HTMLImageElement how to understand an experimental attribute to install controls,
486         how to actually build the DOM to attach to the shadow root, how to tear that DOM down,
487         and how to make sure that Renderers are created for that DOM:
488         * html/HTMLImageElement.cpp:
489         (WebCore::HTMLImageElement::HTMLImageElement):
490         (WebCore::HTMLImageElement::parseAttribute):
491         (WebCore::HTMLImageElement::didAttachRenderers):
492         (WebCore::HTMLImageElement::updateImageControls):
493         (WebCore::HTMLImageElement::createImageControls):
494         (WebCore::HTMLImageElement::destroyImageControls):
495         (WebCore::HTMLImageElement::hasImageControls):
496         (WebCore::HTMLImageElement::childShouldCreateRenderer):
497         * html/HTMLImageElement.h:
498         (WebCore::HTMLImageElement::hasShadowControls): For RenderImage to query when it is constructed. 
499
500         Add a generic, platform independent ImageControls root element that does nothing:
501         * html/shadow/ImageControlsRootElement.cpp: Added.
502         (WebCore::ImageControlsRootElement::maybeCreate):
503         (WebCore::ImageControlsRootElement::ImageControlsRootElement):
504         (WebCore::ImageControlsRootElement::~ImageControlsRootElement):
505         * html/shadow/ImageControlsRootElement.h: Added.
506
507         Add a Mac-specific ImageControls root element that renders a 20x20 red box (for now):
508         * html/shadow/mac/ImageControlsRootElementMac.cpp: Added.
509         (WebCore::ImageControlsRootElementMac::ImageControlsRootElementMac):
510         (WebCore::ImageControlsRootElementMac::~ImageControlsRootElementMac):
511         (WebCore::ImageControlsRootElement::maybeCreate):
512         (WebCore::ImageControlsRootElementMac::maybeCreate):
513         * html/shadow/mac/ImageControlsRootElementMac.h: Added.
514
515         Since much of the RenderMedia::layout() method is now required for RenderImage as well,
516         move the logic to RenderImage. The extra work is controlled by a bool flag that will always
517         be set for RenderMedias but will only be set for certain RenderImages:
518         * rendering/RenderImage.cpp:
519         (WebCore::RenderImage::RenderImage):
520         (WebCore::RenderImage::canHaveChildren):
521         (WebCore::RenderImage::layout):
522         (WebCore::RenderImage::layoutShadowControls):
523         * rendering/RenderImage.h:
524         (WebCore::RenderImage::setHasShadowControls):
525         (WebCore::RenderImage::shadowControlsNeedCustomLayoutMetrics):
526
527         * rendering/RenderMedia.cpp:
528         (WebCore::RenderMedia::RenderMedia):
529         * rendering/RenderMedia.h:
530         (WebCore::RenderMedia::shadowControlsNeedCustomLayoutMetrics):
531
532         * WebCore.xcodeproj/project.pbxproj:
533
534 == Rolled over to ChangeLog-2014-02-20 ==