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