de5b7d8b2226fd2b77f6c2e20f9a6aa1deb905c6
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-02  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r154955.
4         http://trac.webkit.org/changeset/154955
5         https://bugs.webkit.org/show_bug.cgi?id=120605
6
7         broke xcode4 build :| (Requested by kling on #webkit).
8
9         * GNUmakefile.am:
10         * GNUmakefile.list.am:
11         * WebCore.vcxproj/WebCore.vcxproj:
12         * WebCore.xcodeproj/project.pbxproj:
13         * dom/make_names.pl:
14         (defaultTagPropertyHash):
15         (printLicenseHeader):
16         * html/HTMLAnchorElement.h:
17         (WebCore::isHTMLAnchorElement):
18         (WebCore::HTMLAnchorElement):
19         * html/HTMLAreaElement.h:
20         (WebCore::isHTMLAreaElement):
21         (WebCore::HTMLAreaElement):
22         * html/HTMLAudioElement.h:
23         (WebCore::isHTMLAudioElement):
24         * html/HTMLBaseElement.h:
25         (WebCore::isHTMLBaseElement):
26         (WebCore::HTMLBaseElement):
27         * html/HTMLCanvasElement.h:
28         (WebCore::isHTMLCanvasElement):
29         * html/HTMLElement.h:
30         * html/HTMLFieldSetElement.h:
31         (WebCore::isHTMLFieldSetElement):
32         (WebCore::HTMLFieldSetElement):
33         * html/HTMLFormElement.h:
34         (WebCore::isHTMLFormElement):
35         * html/HTMLFrameSetElement.h:
36         (WebCore::isHTMLFrameSetElement):
37         (WebCore::HTMLFrameSetElement):
38         * html/HTMLImageElement.h:
39         (WebCore::isHTMLImageElement):
40         * html/HTMLInputElement.h:
41         (WebCore::isHTMLInputElement):
42         * html/HTMLLabelElement.h:
43         (WebCore::isHTMLLabelElement):
44         (WebCore::HTMLLabelElement):
45         * html/HTMLLegendElement.h:
46         (WebCore::isHTMLLegendElement):
47         (WebCore::HTMLLegendElement):
48         * html/HTMLMapElement.h:
49         (WebCore::isHTMLMapElement):
50         * html/HTMLMeterElement.h:
51         (WebCore::isHTMLMeterElement):
52         * html/HTMLOptGroupElement.h:
53         (WebCore::isHTMLOptGroupElement):
54         * html/HTMLOptionElement.h:
55         (WebCore::isHTMLOptionElement):
56         * html/HTMLParamElement.h:
57         (WebCore::isHTMLParamElement):
58         (WebCore::HTMLParamElement):
59         * html/HTMLProgressElement.h:
60         (WebCore::isHTMLProgressElement):
61         * html/HTMLScriptElement.h:
62         (WebCore::isHTMLScriptElement):
63         * html/HTMLSourceElement.h:
64         (WebCore::isHTMLSourceElement):
65         (WebCore::HTMLSourceElement):
66         * html/HTMLStyleElement.h:
67         (WebCore::isHTMLStyleElement):
68         (WebCore::HTMLStyleElement):
69         * html/HTMLTableElement.h:
70         (WebCore::isHTMLTableElement):
71         * html/HTMLTableRowElement.h:
72         (WebCore::isHTMLTableRowElement):
73         (WebCore::HTMLTableRowElement):
74         * html/HTMLTagNames.in:
75         * html/HTMLTextAreaElement.h:
76         (WebCore::isHTMLTextAreaElement):
77         * html/HTMLTitleElement.h:
78         (WebCore::isHTMLTitleElement):
79         (WebCore::HTMLTitleElement):
80         * html/HTMLTrackElement.h:
81         (WebCore::isHTMLTrackElement):
82         (WebCore::HTMLTrackElement):
83         * svg/SVGElement.h:
84         * svg/SVGFontElement.h:
85         (WebCore::isSVGFontElement):
86         * svg/SVGFontFaceElement.h:
87         (WebCore::isSVGFontFaceElement):
88         (WebCore::SVGFontFaceElement):
89         * svg/SVGForeignObjectElement.h:
90         (WebCore::isSVGForeignObjectElement):
91         (WebCore::SVGForeignObjectElement):
92         * svg/SVGImageElement.h:
93         (WebCore::isSVGImageElement):
94         * svg/SVGScriptElement.h:
95         (WebCore::isSVGScriptElement):
96         * svg/svgtags.in:
97
98 2013-09-02  Antti Koivisto  <antti@apple.com>
99
100         Clean up ContainerNode::childrenChanged
101         https://bugs.webkit.org/show_bug.cgi?id=120599
102
103         Reviewed by Andreas Kling.
104
105         - Make childrenChanged take a single struct argument instead of a long list of arguments.
106         - Use enum instead of childCountDelta. It was always -1, 0, 1 or the total number of children (in case of removing them all).
107         - Remove use of Node*, give the change range as Elements.
108         - Related cleanups.
109
110         * dom/Attr.cpp:
111         (WebCore::Attr::childrenChanged):
112         * dom/Attr.h:
113         * dom/CharacterData.cpp:
114         (WebCore::CharacterData::parserAppendData):
115         (WebCore::CharacterData::dispatchModifiedEvent):
116         * dom/ContainerNode.cpp:
117         (WebCore::ContainerNode::insertBefore):
118         (WebCore::ContainerNode::notifyChildInserted):
119         (WebCore::ContainerNode::notifyChildRemoved):
120         
121             Add private helpers for setting up the struct.
122
123         (WebCore::ContainerNode::parserInsertBefore):
124         (WebCore::ContainerNode::replaceChild):
125         (WebCore::ContainerNode::removeChild):
126         (WebCore::ContainerNode::parserRemoveChild):
127         (WebCore::ContainerNode::removeChildren):
128         (WebCore::ContainerNode::appendChild):
129         (WebCore::ContainerNode::parserAppendChild):
130         (WebCore::ContainerNode::childrenChanged):
131         (WebCore::ContainerNode::updateTreeAfterInsertion):
132         * dom/ContainerNode.h:
133         * dom/Document.cpp:
134         (WebCore::Document::childrenChanged):
135         * dom/Document.h:
136         * dom/Element.cpp:
137         (WebCore::checkForSiblingStyleChanges):
138         
139             Clean up and simplify. Since we now get element range automatically we don't need to compute it.
140
141         (WebCore::Element::childrenChanged):
142         (WebCore::Element::finishParsingChildren):
143         * dom/Element.h:
144         * dom/ShadowRoot.cpp:
145         (WebCore::ShadowRoot::childrenChanged):
146         * dom/ShadowRoot.h:
147         * html/HTMLElement.cpp:
148         (WebCore::HTMLElement::childrenChanged):
149         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
150         
151             Try to keep the existing behavior. This code needs  more cleanup to be sane. It shouldn't operate on Nodes
152             as it only really cares about Elements.
153
154         * html/HTMLElement.h:
155         * html/HTMLFieldSetElement.cpp:
156         (WebCore::HTMLFieldSetElement::childrenChanged):
157         * html/HTMLFieldSetElement.h:
158         * html/HTMLObjectElement.cpp:
159         (WebCore::HTMLObjectElement::childrenChanged):
160         * html/HTMLObjectElement.h:
161         * html/HTMLOptGroupElement.cpp:
162         (WebCore::HTMLOptGroupElement::childrenChanged):
163         * html/HTMLOptGroupElement.h:
164         * html/HTMLOptionElement.cpp:
165         (WebCore::HTMLOptionElement::childrenChanged):
166         * html/HTMLOptionElement.h:
167         * html/HTMLOutputElement.cpp:
168         (WebCore::HTMLOutputElement::childrenChanged):
169         * html/HTMLOutputElement.h:
170         * html/HTMLScriptElement.cpp:
171         (WebCore::HTMLScriptElement::childrenChanged):
172         * html/HTMLScriptElement.h:
173         * html/HTMLSelectElement.cpp:
174         (WebCore::HTMLSelectElement::childrenChanged):
175         * html/HTMLSelectElement.h:
176         * html/HTMLStyleElement.cpp:
177         (WebCore::HTMLStyleElement::childrenChanged):
178         * html/HTMLStyleElement.h:
179         * html/HTMLTextAreaElement.cpp:
180         (WebCore::HTMLTextAreaElement::childrenChanged):
181         * html/HTMLTextAreaElement.h:
182         * html/HTMLTitleElement.cpp:
183         (WebCore::HTMLTitleElement::childrenChanged):
184         * html/HTMLTitleElement.h:
185         * html/shadow/InsertionPoint.cpp:
186         (WebCore::InsertionPoint::childrenChanged):
187         * html/shadow/InsertionPoint.h:
188         * svg/SVGClipPathElement.cpp:
189         (WebCore::SVGClipPathElement::childrenChanged):
190         * svg/SVGClipPathElement.h:
191         * svg/SVGElement.cpp:
192         (WebCore::SVGElement::childrenChanged):
193         * svg/SVGElement.h:
194         * svg/SVGFELightElement.cpp:
195         (WebCore::SVGFELightElement::childrenChanged):
196         * svg/SVGFELightElement.h:
197         * svg/SVGFilterElement.cpp:
198         (WebCore::SVGFilterElement::childrenChanged):
199         * svg/SVGFilterElement.h:
200         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
201         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
202         * svg/SVGFilterPrimitiveStandardAttributes.h:
203         * svg/SVGFontFaceElement.cpp:
204         (WebCore::SVGFontFaceElement::childrenChanged):
205         * svg/SVGFontFaceElement.h:
206         * svg/SVGFontFaceFormatElement.cpp:
207         (WebCore::SVGFontFaceFormatElement::childrenChanged):
208         * svg/SVGFontFaceFormatElement.h:
209         * svg/SVGFontFaceSrcElement.cpp:
210         (WebCore::SVGFontFaceSrcElement::childrenChanged):
211         * svg/SVGFontFaceSrcElement.h:
212         * svg/SVGFontFaceUriElement.cpp:
213         (WebCore::SVGFontFaceUriElement::childrenChanged):
214         * svg/SVGFontFaceUriElement.h:
215         * svg/SVGGradientElement.cpp:
216         (WebCore::SVGGradientElement::childrenChanged):
217         * svg/SVGGradientElement.h:
218         * svg/SVGMarkerElement.cpp:
219         (WebCore::SVGMarkerElement::childrenChanged):
220         * svg/SVGMarkerElement.h:
221         * svg/SVGMaskElement.cpp:
222         (WebCore::SVGMaskElement::childrenChanged):
223         * svg/SVGMaskElement.h:
224         * svg/SVGPatternElement.cpp:
225         (WebCore::SVGPatternElement::childrenChanged):
226         * svg/SVGPatternElement.h:
227         * svg/SVGScriptElement.cpp:
228         (WebCore::SVGScriptElement::childrenChanged):
229         * svg/SVGScriptElement.h:
230         * svg/SVGStyleElement.cpp:
231         (WebCore::SVGStyleElement::childrenChanged):
232         * svg/SVGStyleElement.h:
233         * svg/SVGTitleElement.cpp:
234         (WebCore::SVGTitleElement::childrenChanged):
235         * svg/SVGTitleElement.h:
236
237 2013-09-02  Andreas Kling  <akling@apple.com>
238
239         Generate isFooElement() functions from tagname data.
240         <https://webkit.org/b/120584>
241
242         Reviewed by Antti Koivisto.
243
244         Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
245         If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
246         This also outputs an isElementOfType<T> check for the Element iterators.
247
248         Removed all the hand-written isFooElement() functions that only checked tag name.
249
250         * html/HTMLTagNames.in:
251         * svg/svgtags.in:
252
253             Added "generateTypeChecks" attribute as appropriate.
254
255         * GNUmakefile.am:
256         * GNUmakefile.list.am:
257         * WebCore.vcxproj/WebCore.vcxproj:
258         * WebCore.xcodeproj/project.pbxproj:
259
260             Added to build systems based on how HTMLNames.h was done.
261             We're just outputting an additional header file in the generated code directory
262             so I suspect most ports will just pick this up automagically.
263
264         * dom/make_names.pl:
265         (defaultTagPropertyHash):
266         (printLicenseHeader):
267         (printTypeChecks):
268         (printTypeChecksHeaderFile):
269
270             Generate a separate file for each namespace with isFooElement() helpers for
271             elements with "generateTypeChecks" attribute set.
272
273 2013-09-02  Dirk Schulze  <krit@webkit.org>
274
275         Use edgeMode=duplicate for blurring on filter() function
276         https://bugs.webkit.org/show_bug.cgi?id=120590
277
278         Reviewed by Antti Koivisto.
279
280         Filters on the CSS Image function filter() are not allowed to extend the
281         dimension of the input image. This causes weird results on blurring an image,
282         where the fading on the edges is clipped at the half of the fading.
283         We shouldn't fade edges at all and use the edgeMode=duplicate instead.
284         This will duplicate the pixel value on the nearest edge of the input image
285         instead of taking transparent black and results in nice blurred images with
286         sharp edges.
287
288         Spec: http://dev.w3.org/fxtf/filters/#blurEquivalent
289
290         Test: fast/filter-image/filter-image-blur.html
291
292         * css/CSSFilterImageValue.cpp: Pass consumer information to the renderer.
293         (WebCore::CSSFilterImageValue::image):
294         * rendering/FilterEffectRenderer.cpp: Set edgeMode for feGaussianBlur to
295             'duplicate' or 'none' depending on the consumer.
296         (WebCore::FilterEffectRenderer::build):
297         * rendering/FilterEffectRenderer.h: Add enumeration to differ between the 
298             different consumers of the renderer.
299         * rendering/RenderLayer.cpp:
300         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):  Pass consumer
301             information to the renderer.
302
303 2013-09-01  Dirk Schulze  <krit@webkit.org>
304
305         Add 'edgeMode' attribute to SVGFEGaussianBlur
306         https://bugs.webkit.org/show_bug.cgi?id=120582
307
308         Add 'edgeMode' attribute to the SVGFEGaussianBlur element. This attribute
309         allows users to define the behavior on edges with the values 'none' where
310         pixel values outside the input image are treated as transparent black. (The
311         current blurring behavior.) 'duplicate' which repeats the values on the
312         nearest edge and 'warp', which takes the pixel of the opposite site of
313         the input image.
314         Beside the attribute, this patch implements the behavior of 'duplicate'.
315
316         http://dev.w3.org/fxtf/filters/#feGaussianBlurEdgeModeAttribute
317
318         Reviewed by Rob Buis.
319
320         Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html
321                svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html
322                svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg
323                svg/filters/svg-gaussianblur-edgeMode-duplicate.svg
324
325         * platform/graphics/filters/FEGaussianBlur.cpp:
326         (WebCore::FEGaussianBlur::FEGaussianBlur):
327         (WebCore::FEGaussianBlur::create):
328         (WebCore::FEGaussianBlur::edgeMode):
329         (WebCore::FEGaussianBlur::setEdgeMode):
330         (WebCore::boxBlur):
331         (WebCore::FEGaussianBlur::platformApplyGeneric):
332         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
333         * platform/graphics/filters/FEGaussianBlur.h:
334         * rendering/FilterEffectRenderer.cpp:
335         (WebCore::FilterEffectRenderer::build):
336         * svg/SVGFEGaussianBlurElement.cpp:
337         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
338         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
339         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
340         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
341         (WebCore::SVGFEGaussianBlurElement::build):
342         * svg/SVGFEGaussianBlurElement.h:
343         * svg/SVGFEGaussianBlurElement.idl:
344
345 2013-09-01  Andreas Kling  <akling@apple.com>
346
347         EventHandler::m_frame should be a Frame&.
348         <https://webkit.org/b/120580>
349
350         Reviewed by Darin Adler.
351
352         EventHandler is tied to the lifetime of its frame, so let m_frame be a Frame&.
353         A handful of null checks and assertions removed.
354
355 2013-09-01  Darin Adler  <darin@apple.com>
356
357         Fix a mistake in my recent pasteboard/editor refactoring that was causing tests to fail.
358
359         * editing/mac/EditorMac.mm:
360         (WebCore::getImage): One place this said cachedImage but it should have said tentativeCachedImage.
361
362 2013-09-01  Darin Adler  <darin@apple.com>
363
364         HitTestResult should have innerNonSharedElement
365         https://bugs.webkit.org/show_bug.cgi?id=120579
366
367         Reviewed by Andreas Kling.
368
369         * editing/Editor.cpp:
370         (WebCore::Editor::copyImage): Call HitTestResult member function version of
371         innerNonSharedElement instead of a local function that does it.
372
373         * page/Chrome.cpp:
374         (WebCore::Chrome::setToolTip): Use innerNonSharedElement instead of getting
375         the node and checking if it's an input element. Also added some missing braces.
376
377         * page/EventHandler.cpp:
378         (WebCore::EventHandler::selectClosestWordFromHitTestResult): Use targetNode for
379         local variables instead of innerNode to match the HitTestResult function name.
380         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
381         (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
382         (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
383         (WebCore::EventHandler::handleMousePressEvent): Ditto.
384
385         * rendering/HitTestResult.cpp:
386         (WebCore::HitTestResult::innerElement): Rewrote so there there is no loop.
387         (WebCore::HitTestResult::innerNonSharedElement): Ditto.
388
389         * rendering/HitTestResult.h: Added innerNonSharedElement. Generally speaking,
390         we'd like to avoid using Node unless there is some real need.
391
392 2013-09-01  Xabier Rodriguez Calvar  <calvaris@igalia.com>
393
394         Volume slider value should be 0 when audio is muted
395         https://bugs.webkit.org/show_bug.cgi?id=120553
396
397         Reviewed by Eric Carlson.
398
399         Fixed the problem of showing a non empty slider when audio is
400         muted.
401
402         Test: media/volume-bar-empty-when-muted.html.
403
404         * html/shadow/MediaControls.cpp:
405         (WebCore::MediaControls::reset): Use setSliderVolume.
406         (WebCore::MediaControls::changedVolume): Use setSliderVolume.
407         (WebCore::MediaControls::setSliderVolume): Added to set the volume
408         to 0 when muted and to its value otherwise.
409         * html/shadow/MediaControls.h: Added setSliderVolume.
410         * html/shadow/MediaControlsApple.cpp:
411         (WebCore::MediaControlsApple::reset): Used setSliderVolume and
412         setFullscreenSliderVolume.
413         (WebCore::MediaControlsApple::changedVolume): Used
414         setFullscreenSliderVolume.
415         (WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
416         set the volume to 0 when muted and to its value otherwise.
417         * html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
418         * html/shadow/MediaControlsBlackBerry.cpp:
419         (WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.
420
421 2013-09-01  Andreas Kling  <akling@apple.com>
422
423         Give EditCommand a protected Frame& getter.
424         <https://webkit.org/b/120574>
425
426         Reviewed by Darin Adler.
427
428         EditCommand is only created for documents that are attached to a Frame,
429         we already ASSERTed as much in the EditCommand constructor.
430
431         This patch adds a "Frame& EditCommand::frame()" helper, so EditCommand
432         and its subclasses don't have to fumble around with pointers.
433
434 2013-08-31  Antti Koivisto  <antti@apple.com>
435
436         Add element ancestor iterator
437         https://bugs.webkit.org/show_bug.cgi?id=120563
438
439         Reviewed by Andreas Kling.
440
441         This patch adds ancestor iterators. They iterate over elements parent chain up to the root.
442         
443         To iterate over Element ancestors:
444         
445         auto ancestors = elementAncestors(this);
446         for (auto it = ancestors.begin(), end = ancestors.end(); it != end; ++it) {
447             Element& element = *it;
448             ...
449
450         To iterate over Element ancestors including the current element:
451         
452         auto lineage = elementLineage(this);
453         for (auto it = lineage.begin(), end = lineage.end(); it != end; ++it) {
454             Element& element = *it;
455             ...
456             
457         To iterate over ancestors of a specific Element subclass:
458
459         auto htmlAncestors = ancestorsOfType<HTMLElement>(this);
460         for (auto it = htmlAncestors.begin(), end = htmlAncestors.end(); it != end; ++it) {
461             HTMLElement& htmlElement = *it;
462             ...
463             
464         To iterate over ancestors of a specific Element subclass including the current element:
465
466         auto htmlLineage = lineageOfType<HTMLElement>(this);
467         for (auto it = htmlLineage.begin(), end = htmlLineage.end(); it != end; ++it) {
468             HTMLElement& htmlElement = *it;
469             ...
470             
471         The patch also uses the new types in a few places.
472
473         * WebCore.xcodeproj/project.pbxproj:
474         * accessibility/AccessibilityNodeObject.cpp:
475         (WebCore::AccessibilityNodeObject::mouseButtonListener):
476         (WebCore::AccessibilityNodeObject::labelForElement):
477         * dom/ElementAncestorIterator.h: Added.
478         (WebCore::::ElementAncestorIterator):
479         (WebCore::::operator):
480         (WebCore::::ElementAncestorConstIterator):
481         (WebCore::::ElementAncestorIteratorAdapter):
482         (WebCore::::begin):
483         (WebCore::::end):
484         (WebCore::::ElementAncestorConstIteratorAdapter):
485         (WebCore::elementLineage):
486         (WebCore::elementAncestors):
487         (WebCore::ancestorsOfType):
488         * dom/ElementIterator.h:
489         (WebCore::findElementAncestorOfType):
490         (WebCore::::traverseAncestor):
491         (WebCore::=):
492         * html/HTMLElement.cpp:
493         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
494         * html/HTMLFieldSetElement.h:
495         (WebCore::isHTMLFieldSetElement):
496         (WebCore::HTMLFieldSetElement):
497         * html/HTMLFrameSetElement.cpp:
498         (WebCore::HTMLFrameSetElement::findContaining):
499         * html/HTMLFrameSetElement.h:
500         (WebCore::HTMLFrameSetElement):
501         * html/HTMLInputElement.h:
502         (WebCore::isHTMLInputElement):
503         (WebCore::toHTMLInputElement):
504         * html/HTMLLegendElement.cpp:
505         (WebCore::HTMLLegendElement::associatedControl):
506
507 2013-08-31  Darin Adler  <darin@apple.com>
508
509         Refactor URL and image writing so layer-violating parts are in Editor, not Pasteboard (Mac-only at first)
510         https://bugs.webkit.org/show_bug.cgi?id=120573
511
512         Reviewed by Andreas Kling.
513
514         * editing/Editor.cpp:
515         (WebCore::Editor::copy): Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
516         (WebCore::Editor::copyURL): Use writeURLToPasteboard instead of Pasteboard::writeURL on Mac.
517         (WebCore::innerNonSharedElement): Added. Used in copyImage.
518         (WebCore::Editor::copyImage): Use innerNonSharedElement instead of innerNonSharedNode.
519         Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
520
521         * editing/Editor.h: Add new functions, writeURLToPasteboard and writeImageToPasteboard,
522         both Mac-only for now.
523
524         * editing/mac/EditorMac.mm:
525         (WebCore::Editor::pasteWithPasteboard): Removed unneeded "m_frame.editor()" round trip that
526         was left behind in this function.
527         (WebCore::getImage): Added. Helper used by writeImageToPasteboard.
528         (WebCore::Editor::writeURLToPasteboard): Added. Sets up PasteboardURL and then calls
529         Pasteboard::write with it.
530         (WebCore::Editor::writeImageToPasteboard): Added. Sets up PasteboardImage and then calls
531         Pasteboard::write with it.
532         * page/DragController.cpp:
533         (WebCore::DragController::startDrag): Use Editor::writeURLToPasteboard instead of
534         Pasteboard::writeURL on Mac.
535
536         * platform/Pasteboard.h: Added PasteboardURL and PasteboardImage structures.
537         Declare write functions for PasteboardWebContent, PasteboardURL, and PasteboardImage.
538         Guard writeURL and writeImage with !PLATFORM(MAC).
539
540         * platform/mac/PasteboardMac.mm:
541         (WebCore::writeURLForTypes): Changed this to take a PasteboardURL.
542         (WebCore::Pasteboard::write): Renamed writeURL and writeImage to this. Refactor both
543         to take PasteboardURL and PasteboardImage arguments.
544         (WebCore::fileWrapper): Renamed from fileWrapperForImage since the fact that this is
545         for an image is now clear from its argument, a PasteboardImage.
546         (WebCore::writeFileWrapperAsRTFDAttachment): Changed this function to use early return.
547
548 2013-08-31  Andreas Kling  <akling@apple.com>
549
550         EditCommand constructors should take Document&.
551         <https://webkit.org/b/120566>
552
553         Reviewed by Darin Adler.
554
555         Let EditCommand's and all subclass constructors take Document& instead of Document*.
556         EditCommand::document() now returns a Document&.
557
558         Added Editor::document() which returns Editor::frame().document() after asserting
559         that it's non-null, to make passing a Document& from Editor functions easier.
560
561 2013-08-31  Andreas Kling  <akling@apple.com>
562
563         Make more use of toRenderFoo(RenderObject&) cast helpers.
564         <https://webkit.org/b/120565>
565
566         Reviewed by Darin Adler.
567
568         To make amends for putting ugly toRenderFoo(&renderer) casts everywhere,
569         here's a patch that switches a bunch of code over to using reference-based casts.
570
571         I removed pointer-based casts altogether for these renderers:
572
573             - RenderBR
574             - RenderCombineText
575             - RenderListMarker
576             - RenderVideo
577             - RenderView
578
579 2013-08-31  Santosh Mahto  <santosh.ma@samsung.com>
580
581         warning: unused parameter ‘renderingMode'  in ImageBufferCairo.cpp:94
582         https://bugs.webkit.org/show_bug.cgi?id=120543
583
584         Reviewed by Darin Adler.
585
586         Fixing warning by adding ASSERT_UNUSED.
587
588         * platform/graphics/cairo/ImageBufferCairo.cpp:
589         (WebCore::ImageBuffer::ImageBuffer):
590
591 2013-08-31  Andreas Kling  <akling@apple.com>
592
593         Fix typo in r154931 that caused assertions in continuation tests.
594
595         * rendering/InlineFlowBox.cpp:
596         (WebCore::InlineFlowBox::paint):
597
598 2013-08-31  Rob Buis  <rwlbuis@webkit.org>
599
600         XMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
601         https://bugs.webkit.org/show_bug.cgi?id=120490
602
603         Reviewed by Ryosuke Niwa.
604
605         Retain the key of the namespaces map by using AtomicString as key instead of AtomicStringImpl*.
606
607         * editing/MarkupAccumulator.h:
608
609 2013-08-31  Andreas Kling  <akling@apple.com>
610
611         InlineBox::renderer() and pals should return references.
612         <https://webkit.org/b/120562>
613
614         Reviewed by Antti Koivisto.
615
616         Make InlineBox::renderer() and its friends return references instead of pointers.
617         Every box always has a renderer, so this clears up any ambiguity, and a number of
618         weird assertions in SVG code.
619
620         Made InlineBox::m_renderer private so subclasses have to go through renderer().
621         The next step will be to replace renderer() with tightly-typed accessors where
622         applicable (e.g InlineTextBox's renderer is always a RenderText.)
623
624         Also added reference versions of these RenderObject casts:
625
626             - toRenderBox()
627             - toRenderBlock()
628             - toRenderInline()
629             - toRenderSVGInlineText()
630
631 2013-08-31  Andreas Kling  <akling@apple.com>
632
633         PostAttachCallbackDisabler should take a ContainerNode&.
634         <https://webkit.org/b/120560>
635
636         Reviewed by Antti Koivisto.
637
638         Let PostAttachCallbackDisabler take a reference and remove an ugly assertion.
639
640         * dom/ContainerNode.h:
641         (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
642         (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
643         * dom/Document.cpp:
644         (WebCore::Document::recalcStyle):
645         * style/StyleResolveTree.cpp:
646         (WebCore::Style::attachRenderTree):
647
648 2013-08-31  Antti Koivisto  <antti@apple.com>
649
650         Rename ChildIterator -> ElementChildIterator, DescendantIterator -> ElementDescendantIterator
651         https://bugs.webkit.org/show_bug.cgi?id=120561
652
653         Reviewed by Andreas Kling.
654
655         New names are more descriptive and consistent. They also put related iterator files close by in file lists.
656         The types are always used with auto so longer names don't make them any clumsier to use.
657
658         For simplicity included all Element iterator types from ElementIterator.h so it is the only file that has
659         to be included by the clients.
660
661         * GNUmakefile.list.am:
662         * Target.pri:
663         * WebCore.vcxproj/WebCore.vcxproj:
664         * WebCore.xcodeproj/project.pbxproj:
665         * accessibility/AccessibilityNodeObject.cpp:
666         * accessibility/AccessibilityRenderObject.cpp:
667         * accessibility/AccessibilityTable.cpp:
668         * css/CSSFontFaceSource.cpp:
669         * dom/ChildIterator.h: Removed.
670         * dom/DescendantIterator.h: Removed.
671         * dom/Document.cpp:
672         * dom/ElementChildIterator.h: Copied from Source/WebCore/dom/ChildIterator.h.
673         (WebCore::::ElementChildIterator):
674         (WebCore::::operator):
675         (WebCore::::ElementChildConstIterator):
676         (WebCore::::ElementChildIteratorAdapter):
677         (WebCore::::begin):
678         (WebCore::::end):
679         (WebCore::::ElementChildConstIteratorAdapter):
680         (WebCore::elementChildren):
681         (WebCore::childrenOfType):
682         * dom/ElementDescendantIterator.h: Copied from Source/WebCore/dom/DescendantIterator.h.
683         (WebCore::::ElementDescendantIterator):
684         (WebCore::::operator):
685         (WebCore::::ElementDescendantConstIterator):
686         (WebCore::::ElementDescendantIteratorAdapter):
687         (WebCore::::begin):
688         (WebCore::::end):
689         (WebCore::::ElementDescendantConstIteratorAdapter):
690         (WebCore::elementDescendants):
691         (WebCore::descendantsOfType):
692         * dom/ElementIterator.h:
693         * dom/Node.cpp:
694         * dom/TreeScope.cpp:
695         * editing/ApplyStyleCommand.cpp:
696         * editing/markup.cpp:
697         * html/HTMLAppletElement.cpp:
698         * html/HTMLFieldSetElement.cpp:
699         * html/HTMLLabelElement.cpp:
700         * html/HTMLMapElement.cpp:
701         * html/HTMLMediaElement.cpp:
702         * html/HTMLObjectElement.cpp:
703         * loader/PlaceholderDocument.cpp:
704         * rendering/FilterEffectRenderer.cpp:
705         * style/StyleResolveTree.cpp:
706         * svg/SVGElement.cpp:
707         * svg/SVGSVGElement.cpp:
708         * svg/animation/SMILTimeContainer.cpp:
709         * svg/graphics/SVGImage.cpp:
710
711 2013-08-31  Andreas Kling  <akling@apple.com>
712
713         Don't do document style recalc unless there's a RenderView.
714         <https://webkit.org/b/120558>
715
716         Reviewed by Antti Koivisto.
717
718         There's no sense in computing style for a Document that has no RenderView.
719         Checking this before continuing also lets us know that there's a Frame & FrameView
720         present, simplifying some things later on.
721
722         * dom/Document.cpp:
723         (WebCore::Document::recalcStyle):
724         * style/StyleResolveForDocument.cpp:
725         (WebCore::Style::resolveForDocument):
726
727 2013-08-31  Antti Koivisto  <antti@apple.com>
728
729         Add common base for element iterators
730         https://bugs.webkit.org/show_bug.cgi?id=120557
731
732         Reviewed by Andreas Kling.
733
734         Add ElementIterator and use it as the base for child and descendant iterators. The only difference is the definition of operator++.
735         
736         Also renamed DescendantIteratorAssertions to ElementIteratorAssertions.
737
738         * GNUmakefile.list.am:
739         * Target.pri:
740         * WebCore.vcxproj/WebCore.vcxproj:
741         * WebCore.xcodeproj/project.pbxproj:
742         * dom/ChildIterator.h:
743         (WebCore::::ChildIterator):
744         (WebCore::::operator):
745         (WebCore::::ChildConstIterator):
746         (WebCore::::begin):
747         (WebCore::::end):
748         * dom/DescendantIterator.h:
749         (WebCore::::DescendantIterator):
750         (WebCore::::operator):
751         (WebCore::::DescendantConstIterator):
752         * dom/DescendantIteratorAssertions.h: Removed.
753         * dom/ElementIterator.h: Added.
754         (WebCore::::ElementIterator):
755         (WebCore::::traverseNext):
756         (WebCore::::traversePrevious):
757         (WebCore::::traverseNextSibling):
758         (WebCore::::traversePreviousSibling):
759         (WebCore::::operator):
760         (WebCore::=):
761         (WebCore::::ElementConstIterator):
762         * dom/ElementIteratorAssertions.h: Copied from Source/WebCore/dom/DescendantIteratorAssertions.h.
763         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
764         (WebCore::ElementIteratorAssertions::domTreeHasMutated):
765         (WebCore::ElementIteratorAssertions::dropEventDispatchAssertion):
766
767 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
768
769         [Windows] Build fix after r154921.
770
771         AVFoundationCF uses an internal wrapper object around the C-API. The call point
772         in the original patch was inside the wrapper, which did not (yet) provide
773         a method implementation.
774
775         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
776         (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
777         (WebCore::AVFWrapper::updateVideoLayerGravity):
778
779 2013-08-30  Simon Fraser  <simon.fraser@apple.com>
780
781         Video with object-fit: cover can spill outside the box
782         https://bugs.webkit.org/show_bug.cgi?id=52103
783
784         Reviewed by Dean Jackson.
785         
786         object-fit on renderers which use accelerated compositing needs special
787         treatment.
788         
789         For directly composited images, and video, GraphicsLayer needs to know
790         both the size of the content layer, and also a rectangle at which this
791         should be clipped (because, for the first time, that content layer can be
792         larger than the renderer's content box).
793         
794         AVFoundation would always aspect-ratio fit video by default, so plumb
795         through MediaPlayer a way to override that when object-fit requires it.
796         
797         Added a LAYER_TREE_INCLUDES_CONTENT_LAYERS enum to the layerTreeAsText()
798         flags so we can dump content layers for testing.
799
800         Tests: compositing/images/direct-image-object-fit.html
801                compositing/reflections/direct-image-object-fit-reflected.html
802                compositing/video/video-object-fit.html
803
804         * page/Frame.h: New LayerTreeFlagsIncludeContentLayers flag.
805         * platform/graphics/GraphicsLayer.h: New flag.
806         * platform/graphics/MediaPlayer.cpp:
807         (WebCore::MediaPlayer::shouldMaintainAspectRatio):
808         (WebCore::MediaPlayer::setShouldMaintainAspectRatio):
809         * platform/graphics/MediaPlayer.h:
810         * platform/graphics/MediaPlayerPrivate.h:
811         (WebCore::MediaPlayerPrivateInterface::shouldMaintainAspectRatio):
812         (WebCore::MediaPlayerPrivateInterface::setShouldMaintainAspectRatio):
813         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
814         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
815         (WebCore::MediaPlayerPrivateAVFoundation::setShouldMaintainAspectRatio):
816         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
817         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
818         (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
819         (WebCore::AVFWrapper::platformLayer):
820         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
821         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
822         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
823         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
824         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
825         * platform/graphics/ca/GraphicsLayerCA.cpp: We need a new m_contentsClippingLayer to
826         clip the contents layer, which only gets created when necessary. It has to be cloned
827         for reflections.
828         (WebCore::GraphicsLayerCA::willBeDestroyed):
829         (WebCore::GraphicsLayerCA::setContentsRect):
830         (WebCore::GraphicsLayerCA::setContentsClippingRect):
831         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
832         (WebCore::GraphicsLayerCA::updateSublayerList):
833         (WebCore::GraphicsLayerCA::updateContentsImage):
834         (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
835         (WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
836         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
837         (WebCore::GraphicsLayerCA::updateContentsRects):
838         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
839         (WebCore::GraphicsLayerCA::ensureCloneLayers):
840         (WebCore::GraphicsLayerCA::removeCloneLayers):
841         (WebCore::GraphicsLayerCA::fetchCloneLayers):
842         * platform/graphics/ca/GraphicsLayerCA.h:
843         * rendering/RenderLayerBacking.cpp: Need to push both the contentsRect and
844         the contentsClippingRect down to the GraphicsLayers. Most of the time they
845         are the same, unless object-fit makes them different.
846         (WebCore::RenderLayerBacking::resetContentsRect):
847         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
848         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
849         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
850         (WebCore::RenderLayerBacking::updateImageContents):
851         (WebCore::RenderLayerBacking::contentsBox):
852         * rendering/RenderLayerCompositor.cpp:
853         (WebCore::RenderLayerCompositor::layerTreeAsText):
854         * rendering/RenderVideo.cpp:
855         (WebCore::RenderVideo::updatePlayer):
856         * testing/Internals.cpp:
857         (WebCore::Internals::layerTreeAsText):
858         * testing/Internals.h:
859         * testing/Internals.idl:
860
861 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
862
863         [Windows] Update to incorporate additional suggestions
864         https://bugs.webkit.org/show_bug.cgi?id=120448
865
866         Reviewed by Darin Adler
867
868         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Add
869         notes as to why AVFoundationCF needs this extra method call.
870         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Use OVERRIDE
871         * rendering/RenderVideo.cpp: Replace ternary operator with logical &&.
872
873 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
874
875         [Windows] Vide element in page always uses non-hw accelerated mode.
876         https://bugs.webkit.org/show_bug.cgi?id=120448
877
878         Reviewed by Darin Adler
879
880         This patch is unfortunately larger than my original idea, but seems to make the
881         layout system happier. Instead of switching into composited mode when building
882         the media player, we now build the original layout tree with compositing active
883         if the underlying media element requires it. The AVFoundationCF player needs to
884         have the compositor available at construction time so it can attach to the
885         rendering device. Otherwise it falls back to CPU-only mode.
886
887         * platform/graphics/MediaPlayer.cpp:
888         (WebCore::MediaPlayer::requiresImmediateCompositing): Added
889         * platform/graphics/MediaPlayer.h:
890         * platform/graphics/MediaPlayerPrivate.h:
891         (WebCore::MediaPlayerPrivateInterface::requiresImmediateCompositing): Added
892         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
893         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Added
894         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
895         (WebCore::MediaPlayerPrivateAVFoundationCF::requiresImmediateCompositing):
896         * rendering/RenderLayerCompositor.cpp:
897         (WebCore::RenderLayerCompositor::requiresCompositingForVideo): Uses new
898         'requiresImmediateCompositing' to short-circuit check for whether a
899         compositor is required.
900         * rendering/RenderVideo.cpp:
901         (WebCore::RenderVideo::requiresImmediateCompositing):
902         * rendering/RenderVideo.h:
903
904 2013-08-30  Joseph Pecoraro  <pecoraro@apple.com>
905
906         Web Inspector: Breakpoints should have Automatically Continue Option
907         https://bugs.webkit.org/show_bug.cgi?id=120187
908
909         Reviewed by Timothy Hatcher.
910
911         Tests: inspector-protocol/debugger/removeBreakpoint.html
912                inspector-protocol/debugger/setBreakpoint-autoContinue.html
913                inspector-protocol/debugger/setBreakpoint-column.html
914                inspector-protocol/debugger/setBreakpoint-condition.html
915                inspector-protocol/debugger/setBreakpoint.html
916
917         * inspector/Inspector.json:
918         Convert the "condition" argument of setBreakpoint and setBreakpointByUrl
919         to a BreakpointOptions object with optional properties. One of which
920         is "condition" and a new option "autoContinue".
921
922         * bindings/js/ScriptDebugServer.h:
923         * bindings/js/ScriptDebugServer.cpp:
924         (WebCore::ScriptDebugServer::hasBreakpoint):
925         (WebCore::ScriptDebugServer::pauseIfNeeded):
926         Automatically continue if the breakpoint was hit and has autoContinue.
927
928         * inspector/InspectorDebuggerAgent.h:
929         * inspector/InspectorDebuggerAgent.cpp:
930         (WebCore::buildObjectForBreakpointCookie):
931         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
932         (WebCore::InspectorDebuggerAgent::setBreakpoint):
933         (WebCore::InspectorDebuggerAgent::continueToLocation):
934         (WebCore::InspectorDebuggerAgent::didParseSource):
935         * inspector/ScriptBreakpoint.h:
936         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
937         Handle the new incoming BreakpointOptions type, and set the
938         autoContinue state on ScriptBreakpoints.
939
940         * inspector/front-end/DebuggerModel.js:
941         (WebInspector.DebuggerModel.prototype.setBreakpointByURL):
942         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
943         Update old front-end to be compatible with the new API.
944
945 2013-08-30  Dean Jackson  <dino@apple.com>
946
947         Animations should use double for key values, not floats
948         https://bugs.webkit.org/show_bug.cgi?id=120547
949
950         Reviewed by Simon Fraser.
951
952         Merge https://chromium.googlesource.com/chromium/blink/+/71de046541c77120874b9bff82958ee9e0e20c7c
953
954         Some files have been renamed in the Blink port, and they have made some
955         improvements, but I took what applied to us.
956
957         All our existing tests passed.
958
959         * css/StyleResolver.cpp:
960         (WebCore::StyleResolver::keyframeStylesForAnimation):
961         * css/WebKitCSSKeyframeRule.cpp:
962         (WebCore::StyleKeyframe::parseKeyString):
963         * css/WebKitCSSKeyframeRule.h:
964         (WebCore::StyleKeyframe::getKeys):
965         * platform/graphics/GraphicsLayer.h:
966         (WebCore::AnimationValue::keyTime):
967         (WebCore::AnimationValue::AnimationValue):
968         (WebCore::FloatAnimationValue::create):
969         (WebCore::FloatAnimationValue::FloatAnimationValue):
970         (WebCore::TransformAnimationValue::create):
971         (WebCore::TransformAnimationValue::TransformAnimationValue):
972         (WebCore::FilterAnimationValue::create):
973         (WebCore::FilterAnimationValue::FilterAnimationValue):
974         * rendering/RenderLayerBacking.cpp:
975         (WebCore::RenderLayerBacking::startAnimation):
976         * rendering/style/KeyframeList.h:
977         (WebCore::KeyframeValue::KeyframeValue):
978         (WebCore::KeyframeValue::key):
979         (WebCore::KeyframeValue::setKey):
980
981 2013-08-30  Brendan Long  <b.long@cablelabs.com>
982
983         [GStreamer] support in-band text tracks
984         https://bugs.webkit.org/show_bug.cgi?id=103771
985
986         Reviewed by Eric Carlson.
987
988         Tests: New tests added because existing tests were too specific.
989            media/track/in-band/track-in-band-kate-ogg-cues-added-once.html
990            media/track/in-band/track-in-band-kate-ogg-kind.html
991            media/track/in-band/track-in-band-kate-ogg-language.html
992            media/track/in-band/track-in-band-kate-ogg-mode.html
993            media/track/in-band/track-in-band-kate-ogg-style.html
994            media/track/in-band/track-in-band-kate-ogg-track-order.html
995            media/track/in-band/track-in-band-srt-mkv-cues-added-once.html
996            media/track/in-band/track-in-band-srt-mkv-kind.html
997            media/track/in-band/track-in-band-srt-mkv-language.html
998            media/track/in-band/track-in-band-srt-mkv-mode.html
999            media/track/in-band/track-in-band-srt-mkv-style.html
1000            media/track/in-band/track-in-band-srt-mkv-track-order.html
1001
1002         * CMakeLists.txt: Add InbandTextTrackPrivateGStreamer, InbandGenericTextTrack, InbandWebVTTTextTrack, and TextCombinerGStreamer files.
1003         * GNUmakefile.list.am: Same.
1004         * PlatformEfl.cmake: Same.
1005         * Target.pri: Same.
1006         * WebCore.vcxproj/WebCore.vcxproj: Same.
1007         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
1008         * WebCore.xcodeproj/project.pbxproj: Same.
1009         * html/track/InbandGenericTextTrack.cpp: Split out code for handling generic cues.
1010         (WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Move from InbandTextTrack.
1011         (WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Same.
1012         (WebCore::GenericTextTrackCueMap::add): Same.
1013         (WebCore::GenericTextTrackCueMap::find): Same.
1014         (WebCore::GenericTextTrackCueMap::remove): Same.
1015         (WebCore::InbandGenericTextTrack::create): Same.
1016         (WebCore::InbandGenericTextTrack::updateCueFromCueData): Same.
1017         (WebCore::InbandGenericTextTrack::addGenericCue): Same.
1018         (WebCore::InbandGenericTextTrack::updateGenericCue): Same.
1019         (WebCore::InbandGenericTextTrack::removeGenericCue): Same.
1020         (WebCore::InbandGenericTextTrack::removeCue): Same.
1021         (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Empty.
1022         (WebCore::InbandGenericTextTrack::~InbandGenericTextTrack): Empty.
1023         * html/track/InbandGenericTextTrack.h: Copied from Source/WebCore/html/track/InbandTextTrack.h.
1024         The only addition is the ASSERT_NOT_REACHED() for WebVTT cues.
1025         * html/track/InbandTextTrack.cpp: Add label and language changed callbacks.
1026         (WebCore::InbandTextTrack::create): Return a generic or WebVTT text track based on the private CueFormat.
1027         (WebCore::InbandTextTrack::labelChanged): Added.
1028         (WebCore::InbandTextTrack::languageChanged): Added.
1029         * html/track/InbandTextTrack.h: Add label and language changed callbacks.
1030         * html/track/InbandWebVTTTextTrack.cpp: Added, based on InbandTextTrack.
1031         (WebCore::InbandWebVTTTextTrack::create): Same.
1032         (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Empty.
1033         (WebCore::InbandWebVTTTextTrack::~InbandWebVTTTextTrack): Empty.
1034         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): Sends data to a WebVTTParser.
1035         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Adds cues when WebVTTParser parses them.
1036         (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Prints a warning when WebVTTParser has a problem.
1037         * html/track/InbandWebVTTTextTrack.h: Added.
1038         * platform/graphics/InbandTextTrackPrivate.h:
1039         (WebCore::InbandTextTrackPrivate::cueFormat): For determining if the track will have generic or WebVTT cues.
1040         (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): Pass CueFormat in the constructor.
1041         * platform/graphics/InbandTextTrackPrivateClient.h: Same.
1042         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1043         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Pass CueFormat (Generic) to InbandTextTrackPrivate.
1044         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr specializations for GstSample and GstEvent.
1045         * platform/graphics/gstreamer/GRefPtrGStreamer.h: Same.
1046         * platform/graphics/gstreamer/GStreamerUtilities.h: Add WARN_MEDIA_MESSAGE.
1047         * platform/graphics/gstreamer/GStreamerVersioning.h: Add a function to check GStreamer version at runtime.
1048         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Added.
1049         (WebCore::textTrackPrivateEventCallback): Watches for tag and stream start events.
1050         (WebCore::textTrackPrivateSampleTimeoutCallback): See notifyTrackOfSample();
1051         (WebCore::textTrackPrivateStreamTimeoutCallback): See notifyTrackOfStreamChanged();
1052         (WebCore::textTrackPrivateTagsChangeTimeoutCallback): See notifyTrackOfTagsChanged();
1053         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Initializes tags and stream and sets up event callback.
1054         (WebCore::InbandTextTrackPrivateGStreamer::~InbandTextTrackPrivateGStreamer): Calls disconnect:
1055         (WebCore::InbandTextTrackPrivateGStreamer::disconnect): Removes signal handlers and frees some memory.
1056         (WebCore::InbandTextTrackPrivateGStreamer::handleSample): Adds samples to a list and sets up callback.
1057         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Sets up callback.
1058         (WebCore::InbandTextTrackPrivateGStreamer::tagsChanged): Same.
1059         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): Parses all queued samples with WebVTTParser.
1060         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Keeps track of current stream.
1061         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Sets label and language from tags.
1062         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Added.
1063         (WebCore::InbandTextTrackPrivateGStreamer::create): Basic RefPtr create function.
1064         (WebCore::InbandTextTrackPrivateGStreamer::pad): Returns the pad this track is associated with (used
1065         to determine if a playbin text stream has already been associated with a text track).
1066         (WebCore::InbandTextTrackPrivateGStreamer::setIndex): Sets the track index (used for sorting).
1067         (WebCore::InbandTextTrackPrivateGStreamer::streamId): Returns the stream ID (used to handle new samples).
1068         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1069         (WebCore::mediaPlayerPrivateTextChangedCallback): Called for playbin "text-changed" event. See textChanged().
1070         (WebCore::mediaPlayerPrivateTextChangeTimeoutCallback): See notifyPlayerOfText().
1071         (WebCore::mediaPlayerPrivateNewTextSampleCallback): See newTextSample().
1072         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_textTimerHandler.
1073         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect text tracks (they don't necessarily
1074         get freed here, since a script could hold a reference).
1075         (WebCore::MediaPlayerPrivateGStreamer::textChanged): Setup callback for notifyPlayerOfText.
1076         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Create text tracks.
1077         (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Handle new samples by giving them to a text track
1078         with a matching stream. This method is syncryonous because we need to get the stream start sticky event
1079         immediately.
1080         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1081         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Added. This element forwards buffers from all
1082         of its input pads, but also converts plain text to WebVTT as needed.
1083         (webkit_text_combiner_init): Setup internal funnel.
1084         (webkitTextCombinerPadEvent): If the caps are plain text make sure we have a webvttenv, otherwise connect
1085         directly to the funnel.
1086         (webkitTextCombinerRequestNewPad): Setup ghostpad and event callback.
1087         (webkitTextCombinerReleasePad): Release pad and optional associated webvttenc.
1088         (webkit_text_combiner_class_init): Setup pad templates and request/release pad functions.
1089         (webkitTextCombinerNew): Returns a new WebKitTextCombiner.
1090         * platform/graphics/gstreamer/TextCombinerGStreamer.h: Added.
1091         * platform/graphics/gstreamer/TextSinkGStreamer.cpp: Added.
1092         (webkit_text_sink_init): Set sync=false.
1093         (webkitTextSinkGetProperty): Ignore sync property.
1094         (webkitTextSinkSetProperty): Same.
1095         (webkitTextSinkQuery): Ignore position and duration queries, forward everything else to appsink.
1096         (webkit_text_sink_class_init): Setup property and query functions.
1097         (webkitTextSinkNew): Return a new WebKitTextSink.
1098         * platform/graphics/gstreamer/TextSinkGStreamer.h: Added.
1099
1100 2013-08-30  Dirk Schulze  <krit@webkit.org>
1101
1102         Animate CSS Image filter() function
1103         https://bugs.webkit.org/show_bug.cgi?id=119938
1104
1105         Reviewed by Simon Fraser.
1106
1107         With this patch, the new introduced CSS Image function filter() can be
1108         animated. According to the spec, just filter functions can be
1109         interpolated.
1110
1111         The patch also prepares StyleImage blending for interpolation of other
1112         generated images like gradients or cross-fade().
1113
1114         http://dev.w3.org/fxtf/filters/#interpolating-filter-image
1115
1116         Test: fast/filter-image/filter-image-animation.html
1117
1118         * css/CSSComputedStyleDeclaration.cpp: Reuse the code that creates a
1119             CSSValueList from ComputeStyle logic.
1120         (WebCore::valueForPixel):
1121             For StyleRules we want to have not-adjusted length values.
1122         (WebCore::ComputedStyleExtractor::valueForShadow):
1123             Add argument to switch between adjusted and not-adjusted length.
1124         (WebCore::ComputedStyleExtractor::valueForFilter):
1125             Ditto.
1126         (WebCore::ComputedStyleExtractor::propertyValue):
1127         * css/CSSComputedStyleDeclaration.h:
1128         * css/CSSFilterImageValue.h: Add helper functions
1129             for animating filters. We need to pass the FilterOperations for
1130             the image generation and the CSSValueList for StyleRule.
1131         (WebCore::CSSFilterImageValue::filterOperations):
1132         (WebCore::CSSFilterImageValue::setFilterOperations):
1133         (WebCore::CSSFilterImageValue::cachedImage):
1134         * page/animation/CSSPropertyAnimation.cpp:
1135             Add animation code to support animations between two filter()
1136             function values.
1137         (WebCore::blendFilterOperations):
1138         (WebCore::blendFunc):
1139         (WebCore::filterBlend):
1140         * rendering/style/StyleGeneratedImage.h: Add helper functions.
1141         (WebCore::CSSFilterImageValue::imageValue):
1142
1143
1144 2013-08-30  Leo Yang  <leoyang@blackberry.com>
1145
1146         Make sure remove CachedResourceClient when destructing IconLoader
1147         https://bugs.webkit.org/show_bug.cgi?id=120541
1148
1149         Reviewed by Darin Adler.
1150
1151         It's a good practice to call CachedResource::removeClient(client)
1152         when the client is being destructed. We need to do this for InconLoader
1153         to prevent m_resource from keeping dangling client in case m_resource
1154         is referenced by someone else in the future.
1155
1156         Found by code inspection. Just a defensive enhancement no new tests.
1157
1158         * loader/icon/IconLoader.cpp:
1159         (WebCore::IconLoader::~IconLoader):
1160
1161 2013-08-30  Hans Muller  <hmuller@adobe.com>
1162
1163         [CSS Shapes] Redefine the ShapeIntervals class as a template
1164         https://bugs.webkit.org/show_bug.cgi?id=120381
1165
1166         Reviewed by Alexandru Chiculita.
1167
1168         No new tests, this was just an internal refactoring.
1169
1170         The existing ShapeIntervals class has been converted into a template whose
1171         type specifies the type of the interval's x1 and x2 horizontal endpoints
1172         (formerly float). There were several other minor changes, all in the realm
1173         of refactoring:
1174
1175         - The original type was a struct with public x1 and x2 fields. It's now a class
1176         with x1 and x2 accessors. ASSERTS are now used to maintain the x2 >= x1 invariant.
1177         In the original code the invariant was not checked.
1178
1179         - The logical comparison operators have been overloaded for ShapeInterval.
1180         This obviates the IntervalX1Comparator class which has been removed.
1181
1182         - The names of the global ShapeInterval Vector set operation methods have been
1183         changed to reflect the fact that they're now members of the template class,
1184         rather than globals.
1185
1186         PolygonShape.cpp depended on the ShapeInterval class. In the one or two places
1187         where an interval's x1 or x1 fields had been set explicitly, ShapeInterval::set()
1188         is now used to set both fields. This also enables the invariant check mentioned
1189         earlier. The other changes to this class are syntatic, to account for the ShapeInterval
1190         class's changes.
1191
1192         * CMakeLists.txt:
1193         * GNUmakefile.list.am:
1194         * WebCore.vcxproj/WebCore.vcxproj:
1195         * WebCore.xcodeproj/project.pbxproj:
1196         * rendering/shapes/PolygonShape.cpp:
1197         (WebCore::appendIntervalX):
1198         (WebCore::computeXIntersections):
1199         (WebCore::computeOverlappingEdgeXProjections):
1200         (WebCore::PolygonShape::getExcludedIntervals):
1201         (WebCore::PolygonShape::getIncludedIntervals):
1202         * rendering/shapes/PolygonShape.h:
1203         * rendering/shapes/ShapeInterval.cpp: Removed.
1204         * rendering/shapes/ShapeInterval.h: The entire implementation is now here. 
1205         (WebCore::ShapeInterval::ShapeInterval):
1206         (WebCore::ShapeInterval::x1):
1207         (WebCore::ShapeInterval::x2):
1208         (WebCore::ShapeInterval::set):
1209         (WebCore::ShapeInterval::overlaps):
1210         (WebCore::ShapeInterval::intersect):
1211         (WebCore::ShapeInterval::sortVector):
1212         (WebCore::ShapeInterval::uniteVectors):
1213         (WebCore::ShapeInterval::intersectVectors):
1214         (WebCore::ShapeInterval::subtractVectors):
1215         (WebCore::operator==):
1216         (WebCore::operator!=):
1217         (WebCore::operator< ):
1218         (WebCore::operator> ):
1219         (WebCore::operator<=):
1220         (WebCore::operator>=):
1221
1222 2013-08-30  Antti Koivisto  <antti@apple.com>
1223
1224         Use Element& in StyleResolveTree
1225         https://bugs.webkit.org/show_bug.cgi?id=120540
1226
1227         Reviewed by Andreas Kling.
1228
1229         * dom/ContainerNode.cpp:
1230         (WebCore::attachChild):
1231         (WebCore::detachChild):
1232         * dom/Document.cpp:
1233         (WebCore::Document::recalcStyle):
1234         (WebCore::Document::createRenderTree):
1235         (WebCore::Document::detach):
1236         * dom/Element.cpp:
1237         (WebCore::Element::lazyReattach):
1238         (WebCore::Element::updateExistingPseudoElement):
1239         (WebCore::Element::createPseudoElementIfNeeded):
1240         (WebCore::disconnectPseudoElement):
1241         * dom/ShadowRoot.cpp:
1242         (WebCore::ShadowRoot::setResetStyleInheritance):
1243         * html/HTMLDetailsElement.cpp:
1244         (WebCore::HTMLDetailsElement::parseAttribute):
1245         * html/HTMLInputElement.cpp:
1246         (WebCore::HTMLInputElement::updateType):
1247         (WebCore::HTMLInputElement::parseAttribute):
1248         * html/HTMLObjectElement.cpp:
1249         (WebCore::HTMLObjectElement::renderFallbackContent):
1250         * html/HTMLPlugInImageElement.cpp:
1251         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
1252         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
1253         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
1254         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
1255         * html/HTMLSelectElement.cpp:
1256         (WebCore::HTMLSelectElement::parseAttribute):
1257         (WebCore::HTMLSelectElement::parseMultipleAttribute):
1258         * html/HTMLViewSourceDocument.cpp:
1259         (WebCore::HTMLViewSourceDocument::createContainingTable):
1260         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1261         (WebCore::HTMLViewSourceDocument::addLine):
1262         (WebCore::HTMLViewSourceDocument::finishLine):
1263         (WebCore::HTMLViewSourceDocument::addBase):
1264         (WebCore::HTMLViewSourceDocument::addLink):
1265         * html/parser/HTMLConstructionSite.cpp:
1266         (WebCore::executeTask):
1267         * html/parser/HTMLTreeBuilder.cpp:
1268         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1269         * html/shadow/InsertionPoint.cpp:
1270         (WebCore::InsertionPoint::willAttachRenderers):
1271         (WebCore::InsertionPoint::willDetachRenderers):
1272         * loader/PlaceholderDocument.cpp:
1273         (WebCore::PlaceholderDocument::createRenderTree):
1274         * style/StyleResolveTree.cpp:
1275         (WebCore::Style::attachChildren):
1276         (WebCore::Style::attachRenderTree):
1277         (WebCore::Style::detachChildren):
1278         (WebCore::Style::detachRenderTree):
1279         (WebCore::Style::resolveLocal):
1280         (WebCore::Style::updateTextStyle):
1281         (WebCore::Style::resolveShadowTree):
1282         (WebCore::Style::resolveTree):
1283         
1284             Documents only ever have one child element. Remove the loop.
1285
1286         (WebCore::Style::detachRenderTreeInReattachMode):
1287         (WebCore::Style::reattachRenderTree):
1288         * style/StyleResolveTree.h:
1289         * svg/SVGTests.cpp:
1290         (WebCore::SVGTests::handleAttributeChange):
1291         * xml/XMLErrors.cpp:
1292         (WebCore::XMLErrors::insertErrorMessageBlock):
1293         * xml/parser/XMLDocumentParserLibxml2.cpp:
1294         (WebCore::XMLDocumentParser::startElementNs):
1295
1296 2013-08-30  Andreas Kling  <akling@apple.com>
1297
1298         Document style resolve should take Document&.
1299         <https://webkit.org/b/120534>
1300
1301         Reviewed by Darin Adler.
1302
1303         Tweak Style::resolveTree(Document*) and Style::resolveForDocument(Document*) to take Document& instead.
1304
1305         * dom/Document.cpp:
1306         (WebCore::Document::recalcStyle):
1307         * html/HTMLLinkElement.cpp:
1308         (WebCore::HTMLLinkElement::process):
1309         * style/StyleResolveForDocument.cpp:
1310         (WebCore::Style::resolveForDocument):
1311         * style/StyleResolveForDocument.h:
1312         * style/StyleResolveTree.cpp:
1313         (WebCore::Style::resolveTree):
1314         * style/StyleResolveTree.h:
1315
1316 2013-08-30  Darin Adler  <darin@apple.com>
1317
1318         [Mac] No need for Pasteboard::getDataSelection
1319         https://bugs.webkit.org/show_bug.cgi?id=120536
1320
1321         Reviewed by Anders Carlsson.
1322
1323         * editing/Editor.h: Added some Mac-only private member functions.
1324
1325         * editing/mac/EditorMac.mm:
1326         (WebCore::Editor::selectionInWebArchiveFormat): Added.
1327         (WebCore::Editor::adjustedSelectionRange): Added.
1328         (WebCore::attributedStringForRange): Added.
1329         (WebCore::dataInRTFDFormat): Added.
1330         (WebCore::dataInRTFFormat): Added.
1331         (WebCore::Editor::dataSelectionForPasteboard): Moved the implementation
1332         of Pasteboard::getDataSelection here, refactoring to share code with the
1333         writeSelectionToPasteboard function.
1334         (WebCore::Editor::writeSelectionToPasteboard): Refactored to share code
1335         with the new function above.
1336
1337         * platform/Pasteboard.h: Removed getDataSelection. One less layering violation.
1338         * platform/mac/PasteboardMac.mm: Ditto.
1339
1340 2013-08-30  Rob Buis  <rwlbuis@webkit.org>
1341
1342         SVG error parsing empty path
1343         https://bugs.webkit.org/show_bug.cgi?id=78980
1344
1345         Reviewed by Darin Adler.
1346
1347         According to the spec (http://www.w3.org/TR/SVG/paths.html#PathData), path 'd' attribute can be empty.
1348         No error should be reported in this case.
1349
1350         * svg/SVGPathParser.cpp:
1351         (WebCore::SVGPathParser::parsePathDataFromSource):
1352         * svg/SVGPathUtilities.cpp:
1353         (WebCore::buildPathFromString):
1354         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
1355         (WebCore::buildPathFromByteStream):
1356         (WebCore::buildSVGPathSegListFromByteStream):
1357         (WebCore::buildStringFromByteStream):
1358         (WebCore::buildStringFromSVGPathSegList):
1359         (WebCore::buildSVGPathByteStreamFromString):
1360         (WebCore::buildAnimatedSVGPathByteStream):
1361         (WebCore::addToSVGPathByteStream):
1362
1363 2013-08-30  Andreas Kling  <akling@apple.com>
1364
1365         Try to fix CSS_VARIABLES and CSS_DEVICE_ADAPTATION builds.
1366
1367         * css/StyleResolver.cpp:
1368         (WebCore::StyleResolver::StyleResolver):
1369         (WebCore::StyleResolver::resolveVariables):
1370
1371 2013-08-30  Commit Queue  <commit-queue@webkit.org>
1372
1373         Unreviewed, rolling out r154891.
1374         http://trac.webkit.org/changeset/154891
1375         https://bugs.webkit.org/show_bug.cgi?id=120539
1376
1377         broke the mac build (Requested by Ossy on #webkit).
1378
1379         * platform/network/SynchronousLoaderClient.h:
1380
1381 2013-08-30  Csaba Osztrogonác  <ossy@webkit.org>
1382
1383         Add USE(CFNETWORK) guard to SynchronousLoaderClient::didReceiveAuthenticationChallengedidReceiveAuthenticationChallenge()
1384         https://bugs.webkit.org/show_bug.cgi?id=120532
1385
1386         Reviewed by Darin Adler.
1387
1388         * platform/network/SynchronousLoaderClient.h:
1389
1390 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
1391
1392         [Windows] Video inside page always uses non-hardware accelerated playback
1393         https://bugs.webkit.org/show_bug.cgi?id=120448
1394
1395         Reviewed by Eric Carlson.
1396
1397         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1398         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Check for
1399         D3D device. If it doesn't exist, switch to compositing mode and try again.
1400
1401 2013-08-30  Leo Yang  <leoyang@blackberry.com>
1402
1403         Possible dangling CachedResourceClient of StyleRuleImport and XSLImportRule
1404         https://bugs.webkit.org/show_bug.cgi?id=120479
1405
1406         Reviewed by Darin Adler.
1407
1408         In StyleRuleImport::requestStyleSheet() and XSLImportRule::loadSheet() we
1409         didn't call removeClient() for m_cachedSheet before assigning m_cachedSheet
1410         a new value. This could leave the client as a client of the old cached
1411         sheet and dangling after the client is deleted. Fix them by calling removeClient()
1412         before assigning m_cacheSheet a new value.
1413
1414         Found by code inspection. Seems no way to test it automatically.
1415
1416         * css/StyleRuleImport.cpp:
1417         (WebCore::StyleRuleImport::requestStyleSheet):
1418         * xml/XSLImportRule.cpp:
1419         (WebCore::XSLImportRule::loadSheet):
1420
1421 2013-08-30  Gabor Abraham  <abrhm@inf.u-szeged.hu>
1422
1423         Fix unused parameter warning in graphics/cairo/GraphicsContextCairo.cpp file.
1424         https://bugs.webkit.org/show_bug.cgi?id=120524
1425
1426         Reviewed by Darin Adler.
1427
1428         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1429         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1430
1431 2013-08-30  Andreas Kling  <akling@apple.com>
1432
1433         StyleResolver & friends should use Document&.
1434         <https://webkit.org/b/120527>
1435
1436         Reviewed by Antti Koivisto.
1437
1438         Document&-ify StyleResolver, ElementRuleCollector and SelectorChecker.
1439
1440 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
1441
1442         [Windows] Unreviewed build correction after r154835. Only seen when doing a
1443         full (clean) rebuild.
1444
1445         * DerivedSources.cpp: Remove reference to deleted JSHTMLDialogElement.cpp
1446
1447 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
1448
1449         Resolve unused parameter warning in FindController.cpp
1450         https://bugs.webkit.org/show_bug.cgi?id=120407
1451
1452         Reviewed by Darin Adler.
1453
1454         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1455         (wordAtPositionForAtkBoundary):
1456
1457 2013-08-30  Arpita Bahuguna  <a.bah@samsung.com>
1458
1459         setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
1460         https://bugs.webkit.org/show_bug.cgi?id=120293
1461
1462         Reviewed by Darin Adler.
1463
1464         setAttributeNode() performs a case-insensitive search for an existing
1465         attribute. If an existing attribute is found, it retrieves the index of
1466         such an attribute. For setting the attribute's new value, we call upon
1467         setAttributeInternal() to which both the index as well as the name of
1468         the attribute is passed.
1469         The name passed to this method is the same as the one passed to the
1470         setAttributeNode() API from the webpage and thus can be in any case.
1471
1472         However, setAttributeInternal() uses this name to get the corresponding
1473         existing attribute node. Since this retrieval is not case-insensitive,
1474         the existing node is not returned and thus the new value is not set on
1475         the existing node.
1476         We should instead use the passed index and use that to retrieve the
1477         existing node.
1478
1479         Note that obtaining the attribute's value using getAttributeNode() would
1480         still return the correct value, i.e. the new one.
1481
1482         Also, this change shall make our behavior similar to that of FF and IE.
1483
1484         Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
1485
1486         * dom/Element.cpp:
1487         (WebCore::Element::setAttributeInternal):
1488         If the passed index is not equal to attributeNotFound, we use that index
1489         to retrieve the existing attribute.
1490
1491 2013-08-30  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1492
1493         SimpleClassVectorTraits shall be used for RuleData
1494         https://bugs.webkit.org/show_bug.cgi?id=120526
1495
1496         Reviewed by Andreas Kling.
1497
1498         Whereas RuleData is POD type and whereas there are quite a lot of Vector<RuleData> occurrences in the code,
1499         it makes sense to use SimpleClassVectorTraits for RuleData and hence to allow using more efficient mem functions
1500         in vectors.
1501
1502         * css/RuleSet.h:
1503
1504 2013-08-30  Andreas Kling  <akling@apple.com>
1505
1506         Node::document() should return a reference.
1507         <https://webkit.org/b/120496>
1508
1509         Reviewed by Antti Koivisto.
1510
1511         Now that orphan DocumentType nodes also have document pointers, it's no longer
1512         possible to have a null Node::document().
1513
1514         Cement this by making document() return a reference, and remove the various
1515         null checks exposed by this.
1516
1517 2013-08-30  Andrei Parvu  <parvu@adobe.com>
1518
1519         [CSS Masking] -webkit-mask-repeat: space does not work
1520         Added the space option to background-repeat and -webkit-mask-repeat.
1521         With the property value 'space', the background or mask image gets repeated as often as it fits within the background positioning
1522         area. The repeated images are spaced equally to fill the unused area.
1523         https://bugs.webkit.org/show_bug.cgi?id=119324
1524
1525         Reviewed by Dirk Schulze.
1526
1527         Tests: css3/background/background-repeat-space-border.html
1528                css3/background/background-repeat-space-content.html
1529                css3/background/background-repeat-space-padding.html
1530                css3/masking/mask-repeat-space-border.html
1531                css3/masking/mask-repeat-space-content.html
1532                css3/masking/mask-repeat-space-padding.html
1533
1534         * platform/graphics/GeneratorGeneratedImage.cpp:
1535         (WebCore::GeneratorGeneratedImage::drawPattern): Passed the space values to the image buffer.
1536         * platform/graphics/Image.cpp:
1537         (WebCore::Image::drawTiled): Added the space values when computing the location of the tile.
1538         * platform/graphics/Image.h: Added the space property.
1539         (WebCore::Image::spaceSize):
1540         (WebCore::Image::setSpaceSize):
1541         * platform/graphics/ImageBuffer.h: Added the space property.
1542         (WebCore::ImageBuffer::spaceSize):
1543         (WebCore::ImageBuffer::setSpaceSize):
1544         * platform/graphics/cg/ImageBufferCG.cpp: Passed the space values when copying an image.
1545         (WebCore::ImageBuffer::copyImage):
1546         * platform/graphics/cg/ImageCG.cpp: Added the space values when creating a platform pattern.
1547         (WebCore::Image::drawPattern):
1548         * rendering/RenderBoxModelObject.cpp:
1549         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Computed the space values on x and y axis.
1550         (WebCore::getSpace):
1551         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Pass the space values to the Image class.
1552         * rendering/RenderBoxModelObject.h: Added the space property.
1553         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
1554         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
1555         * svg/graphics/SVGImage.cpp: Passed the space property to the created image.
1556         (WebCore::SVGImage::drawPatternForContainer):
1557         * svg/graphics/SVGImageForContainer.cpp: Passed the space property to the image property.
1558         (WebCore::SVGImageForContainer::drawPattern):
1559
1560 2013-08-30  Antti Koivisto  <antti@apple.com>
1561
1562         Remove AttachContext
1563         https://bugs.webkit.org/show_bug.cgi?id=120518
1564
1565         Reviewed by Andreas Kling.
1566
1567         This type is not useful anymore. Just pass the precomputed style to attachRenderTree and reattach-or-not flag to detachRenderTree.
1568
1569         * style/StyleResolveTree.cpp:
1570         (WebCore::Style::createRendererIfNeeded):
1571         (WebCore::Style::attachChildren):
1572         (WebCore::Style::attachShadowRoot):
1573         (WebCore::Style::attachRenderTree):
1574         (WebCore::Style::detachChildren):
1575         (WebCore::Style::detachShadowRoot):
1576         (WebCore::Style::detachRenderTree):
1577         (WebCore::Style::reattachRenderTree):
1578         (WebCore::Style::resolveLocal):
1579         * style/StyleResolveTree.h:
1580
1581 2013-08-30  Commit Queue  <commit-queue@webkit.org>
1582
1583         Unreviewed, rolling out r154826.
1584         http://trac.webkit.org/changeset/154826
1585         https://bugs.webkit.org/show_bug.cgi?id=120517
1586
1587         Still breaks icloud.com (Requested by mwenge_ on #webkit).
1588
1589         * rendering/RenderBox.cpp:
1590         (WebCore::RenderBox::computePositionedLogicalWidth):
1591         (WebCore::RenderBox::computePositionedLogicalHeight):
1592         * rendering/RenderBox.h:
1593         (WebCore::RenderBox::intrinsicSize):
1594         * rendering/RenderButton.h:
1595         * rendering/RenderFileUploadControl.cpp:
1596         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
1597         * rendering/RenderListBox.cpp:
1598         (WebCore::RenderListBox::RenderListBox):
1599         (WebCore::RenderListBox::computePreferredLogicalWidths):
1600         (WebCore::RenderListBox::computeLogicalHeight):
1601         * rendering/RenderListBox.h:
1602         * rendering/RenderMenuList.h:
1603         * rendering/RenderSlider.cpp:
1604         (WebCore::RenderSlider::computePreferredLogicalWidths):
1605         * rendering/RenderTextControl.cpp:
1606         (WebCore::RenderTextControl::RenderTextControl):
1607         (WebCore::RenderTextControl::computeLogicalHeight):
1608         * rendering/RenderTextControl.h:
1609
1610 2013-08-29  Ryosuke Niwa  <rniwa@webkit.org>
1611
1612         Unduplicate the code to convert between VisiblePosition and index
1613         https://bugs.webkit.org/show_bug.cgi?id=120506
1614
1615         Reviewed by Darin Adler.
1616
1617         Encapsulate the conversion between VisiblePosition and index into indexForVisiblePosition
1618         and visiblePositionForIndexUsingCharacterIterator. It's unfortunate that these two functions
1619         are different from the two other existing functions of similar names but we've at least
1620         confined problems into a single cpp file now.
1621
1622         * accessibility/AccessibilityRenderObject.cpp:
1623         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
1624         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
1625         * editing/Editor.cpp:
1626         (WebCore::findFirstMarkable):
1627         * editing/htmlediting.cpp:
1628         (WebCore::indexForVisiblePosition):
1629         (WebCore::visiblePositionForIndexUsingCharacterIterator):
1630         * editing/htmlediting.h:
1631         * html/HTMLTextFormControlElement.cpp:
1632         (WebCore::hasVisibleTextArea):
1633         (WebCore::HTMLTextFormControlElement::setSelectionRange):
1634         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
1635         (WebCore::HTMLTextFormControlElement::visiblePositionForIndex):
1636         * html/HTMLTextFormControlElement.h:
1637         * rendering/RenderTextControl.cpp:
1638         * rendering/RenderTextControl.h:
1639
1640 2013-08-29  Ryosuke Niwa  <rniwa@webkit.org>
1641
1642         Avoid Node references from AXObjectCache from leaking
1643         https://bugs.webkit.org/show_bug.cgi?id=120501
1644
1645         Reviewed by Darin Adler.
1646
1647         Merge https://chromium.googlesource.com/chromium/blink/+/454f31497613b6d0fbcfb0df757254b64a177c06
1648         without any tests since we don't have the same infrastructure to detect leaks in WebKit.
1649
1650         A real world example of this would be selecting an <option> item inside frame by keyboard. The node will not be deref()-ed until the topDocument() is detached. 
1651
1652         The issue was that AccessibilityMenuListOption is created in childrenChanged()
1653         hook called when its RenderObject is being destroyed. This patch modifies AccessibilityMenuListPopup so it won't create AccessibilityMenuListOption if its
1654         element is already detached.
1655
1656         * accessibility/AccessibilityMenuListPopup.cpp:
1657         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
1658         * rendering/RenderMenuList.cpp:
1659         (WebCore::RenderMenuList::didUpdateActiveOption):
1660
1661 2013-08-26  Simon Fraser  <simon.fraser@apple.com>
1662
1663         Implement object-fit CSS property
1664         https://bugs.webkit.org/show_bug.cgi?id=52040
1665
1666         Reviewed by Antti Koivisto, Sam Weinig.
1667         
1668         Merge object-fit patch from Blink r156535, which started as a patch
1669         by me.
1670
1671         Since then, the spec has gone to CR. This patch is an
1672         implementation of object-fit as described in
1673         http://www.w3.org/TR/2012/CR-css3-images-20120417/#object-fit
1674
1675         Object-fit is used to maintain the aspect ratio of replaced content
1676         within its content box. All object-fit values but the initial one
1677         ('fill') will always ensure that the aspect ratio is retained, in
1678         different ways (fit inside the content box, cover the content box, or
1679         use intrinsic size). Painting is always clipped against the content
1680         box, regardless of the 'overflow' property.
1681
1682         Tests: fast/css/object-fit/object-fit-canvas.html
1683                fast/css/object-fit/object-fit-embed.html
1684                fast/css/object-fit/object-fit-grow-landscape.html
1685                fast/css/object-fit/object-fit-grow-portrait.html
1686                fast/css/object-fit/object-fit-img-svg.html
1687                fast/css/object-fit/object-fit-img-svg2.html
1688                fast/css/object-fit/object-fit-img.html
1689                fast/css/object-fit/object-fit-input-image.html
1690                fast/css/object-fit/object-fit-object.html
1691                fast/css/object-fit/object-fit-shrink.html
1692                fast/css/object-fit/object-fit-video-poster.html
1693                fast/css/parsing-object-fit.html
1694                http/tests/css/object-fit-delayed-img-svg.html
1695                media/video-object-fit-change.html
1696                media/video-object-fit.html
1697
1698         * css/CSSComputedStyleDeclaration.cpp:
1699         (WebCore::ComputedStyleExtractor::propertyValue):
1700         * css/CSSParser.cpp:
1701         (WebCore::isValidKeywordPropertyAndValue):
1702         (WebCore::isKeywordPropertyID):
1703         (WebCore::CSSParser::parseValue):
1704         * css/CSSPrimitiveValueMappings.h:
1705         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1706         (WebCore::CSSPrimitiveValue::operator EObjectFit):
1707         * css/CSSProperty.cpp:
1708         (WebCore::CSSProperty::isInheritedProperty):
1709         * css/CSSPropertyNames.in:
1710         * css/CSSValueKeywords.in:
1711         * css/DeprecatedStyleBuilder.cpp:
1712         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1713         * css/StyleResolver.cpp:
1714         (WebCore::StyleResolver::applyProperty):
1715         * css/html.css:
1716         (video): Set object-fit to 'contain'. This is how VIDEO elements
1717         work, apparently.
1718         * loader/cache/CachedImage.cpp:
1719         (WebCore::CachedImage::imageSizeForRenderer):
1720         * loader/cache/CachedImage.h:
1721         * platform/graphics/LayoutSize.h:
1722         (WebCore::fitLayoutSizeToAspectRatio): New function to grow or shrink
1723         in one dimension to fit to the aspect ratio.
1724         * rendering/RenderHTMLCanvas.cpp:
1725         (WebCore::RenderHTMLCanvas::paintReplaced): Apply object-fit and
1726         clip if necessary.
1727         * rendering/RenderImage.cpp:
1728         (WebCore::RenderImage::updateInnerContentRect):
1729         (WebCore::RenderImage::imageDimensionsChanged): Update intrinsic
1730         size properly, and recalculate the inner content rectangle (the
1731         exact area occupied by the replaced content) again if appropriate.
1732         (WebCore::RenderImage::paintReplaced): Apply object-fit and clip
1733         if necessary.
1734         (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
1735         object-fit may leave parts of the content box empty, in which case
1736         it won't be fully obscured.
1737         (WebCore::RenderImage::layout):
1738         * rendering/RenderImage.h:
1739         * rendering/RenderImageResource.cpp:
1740         (WebCore::RenderImageResource::intrinsicSize): Need this to
1741         differentiate between intrinsic and extrinsic size for SVG images.
1742         * rendering/RenderImageResource.h:
1743         * rendering/RenderImageResourceStyleImage.h:
1744         * rendering/RenderReplaced.cpp:
1745         (WebCore::RenderReplaced::replacedContentRect): Return the
1746         rectangle occupied by the replaced content. This will be identical
1747         to the content box if object-fit is 'fill', but will typically be
1748         something else for other values.
1749         * rendering/RenderReplaced.h:
1750         * rendering/RenderVideo.cpp:
1751         (WebCore::RenderVideo::videoBox): Not much left to do here, with
1752         the new RenderReplaced::replacedContentRect() method in place.
1753         (WebCore::RenderVideo::paintReplaced): Apply object-fit and clip
1754         if necessary.
1755         * rendering/style/RenderStyle.cpp:
1756         (WebCore::RenderStyle::changeRequiresRepaint):
1757         * rendering/style/RenderStyle.h:
1758         * rendering/style/RenderStyleConstants.h:
1759         * rendering/style/StyleRareNonInheritedData.cpp:
1760         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1761         (WebCore::StyleRareNonInheritedData::operator==):
1762         * rendering/style/StyleRareNonInheritedData.h:
1763
1764 2013-08-29  Tim Horton  <timothy_horton@apple.com>
1765
1766         SVG clipping, masking, and gradients-on-text do not respect the device scale factor
1767         https://bugs.webkit.org/show_bug.cgi?id=120377
1768         <rdar://problem/14777944>
1769
1770         Reviewed by Simon Fraser.
1771
1772         Tests: svg/custom/masking-clipping-hidpi.svg
1773
1774         calculateTransformationToOutermostCoordinateSystem should include the page's
1775         device scale factor in its transform.
1776
1777         * rendering/svg/SVGRenderingContext.cpp:
1778         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
1779
1780 2013-08-29  Chris Fleizach  <cfleizach@apple.com>
1781
1782         AX: Crash when VoiceOver reference a TextMarker from an iframe that has been removed
1783         https://bugs.webkit.org/show_bug.cgi?id=120318
1784
1785         Reviewed by Darin Adler.
1786
1787         These crashes occur because an AXTextMarker is retrieved that reference a Node in an iframe.
1788         The iframe goes away, but when it tries to clean up and remove that Node from the InUse cache,
1789         the document() tree has already been detached, so it never clears the actual InUse cache.
1790
1791         The fix here is to pre-emptively clean up any nodes in the document going away when the frame is about to disconnect.
1792
1793         I'm removing the clearAXObjectCache() at the disconnectOwnerElement because it 
1794            1) Cleared the AXObjectCache for the iframe document (which is always empty -- only the top level doc maintains the cache), because
1795                 the document() tree had already been detached... so it essentially did nothing.
1796            2) And if it did work, we wouldn't want this behavior -- that is to say, when an iframe goes away, we don't want to clear the entire cache for all
1797                the other documents (there's even an existing layout test to verify this behavior).
1798
1799         Test: platform/mac/accessibility/stale-textmarker-crash.html
1800
1801         * accessibility/AXObjectCache.cpp:
1802         (WebCore::AXObjectCache::clearTextMarkerNodesInUse):
1803         * accessibility/AXObjectCache.h:
1804         * page/Frame.cpp:
1805         (WebCore::Frame::disconnectOwnerElement):
1806
1807 2013-08-29  Brent Fulgham  <bfulgham@apple.com>
1808
1809         [Windows] More unreviewed gardening of project file.
1810         Move css files inline with related source code.
1811
1812         * WebCore.vcxproj/WebCore.vcxproj:
1813         * WebCore.vcxproj/WebCore.vcxproj.filters:
1814
1815 2013-08-29  Sam Weinig  <sam@webkit.org>
1816
1817         Add ENABLE guards for Promises
1818         https://bugs.webkit.org/show_bug.cgi?id=120488
1819
1820         Reviewed by Andreas Kling.
1821
1822         * Configurations/FeatureDefines.xcconfig:
1823
1824 2013-08-29  Andreas Kling  <akling@apple.com>
1825
1826         Inspector: Use a bit of RefPtr::release() in generated code.
1827         <https://webkit.org/b/120485>
1828
1829         Reviewed by Darin Adler.
1830
1831         Just something I spotted while reading InspectorBackendDispatcher.cpp.
1832         Avoid 3 cases of reference count churnery.
1833
1834         * inspector/CodeGeneratorInspectorStrings.py:
1835
1836 2013-08-29  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1837
1838         According to DOM4, all DocType nodes should have a document
1839         https://bugs.webkit.org/show_bug.cgi?id=99244
1840
1841         Reviewed by Darin Adler.
1842
1843         Doctypes now always have a node document and can be moved across document boundaries as per
1844         the latest DOM4 specification:
1845         http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
1846         http://dom.spec.whatwg.org/#dom-node-ownerdocument
1847
1848         This means that DOMImplementation.createDocumentType() now sets the ownerDocument of the
1849         new DocumentType Node to the associated document of the current "context" object. In
1850         DOM4, all nodes have a document at all times. DocumentType nodes can now be moved across
1851         document boundaries so that the node can be added to a Document after being created.
1852
1853         This means we will no longer need to special case DocumentType nodes in the code and
1854         Node::document() can no longer return NULL, which means that we'll be able to remove
1855         NULL checks in call sites.
1856
1857         Firefox stable and since recently Blink already follow DOM4 here while IE10 does not (yet).
1858
1859         Test: fast/dom/createDocumentType-ownerDocument.html
1860
1861         * dom/ContainerNode.cpp:
1862         (WebCore::checkAcceptChild):
1863         * dom/DOMImplementation.cpp:
1864         (WebCore::DOMImplementation::createDocumentType):
1865         (WebCore::DOMImplementation::createDocument):
1866         * dom/Node.h:
1867         (WebCore::Node::document):
1868
1869 2013-08-29  Darin Adler  <darin@apple.com>
1870
1871         Pasteboard::writeSelection violates layering (first step, fixes it for Mac platform only)
1872         https://bugs.webkit.org/show_bug.cgi?id=120483
1873
1874         Reviewed by Anders Carlsson.
1875
1876         * editing/Editor.cpp:
1877         (WebCore::Editor::cut): Added some comments. Use the new writeSelectionToPasteboard
1878         function on Mac instead of Pasteboard::writeSelection.
1879         (WebCore::Editor::copy): Ditto.
1880
1881         * editing/Editor.h: Removed an old unused Mac-only writeSelectionToPasteboard function
1882         that was a cover that called through to Pasteboard::writeSelectionForTypes. Added a new
1883         Mac-only writeSelectionToPasteboard function that is destined to become cross-platform soon.
1884
1885         * editing/mac/EditorMac.mm:
1886         (WebCore::Editor::writeSelectionToPasteboard): Added. Uses a new pattern where the Editor
1887         puts all the data into a structure called PasteboardWebContent then calls the Pasteboard to
1888         do the work. The platform-specific aspect of PasteboardWebContent is what formats are needed
1889         for each platform.
1890
1891         * page/DragController.cpp:
1892         (WebCore::DragController::startDrag): Added some comments. Use the new writeSelectionToPasteboard
1893         function on Mac instead of Pasteboard::writeSelection.
1894
1895         * platform/Pasteboard.h: Remove some unneeded forward declarations. Added comments for all functions
1896         that don't belong in this class because they are layering violations; this becomes the to do list for
1897         the project we are beginning here. Added the new PasteboardWebContent structure, empty on all platforms
1898         except for Mac for now. Removed writeSelectionForTypes, a Mac-only function that is no longer used.
1899         Added setTypes and writeAfterSettingTypes, the two halves of the future function named writeWebContent.
1900         Put the writeSelection function inside a "not Mac" if statement. Later to be deleted entirely.
1901
1902         * platform/mac/PasteboardMac.mm: Removed now-unneeded selectionPasteboardTypes,
1903         Pasteboard::writeSelectionForTypes, and writeSelection functions.
1904         (WebCore::Pasteboard::setTypes): Added. First half of writing web content to the pasteboard.
1905         (WebCore::Pasteboard::writeAfterSettingTypes): Added. Second half of writing web content to the pasteboard.
1906
1907 2013-08-29  Antti Koivisto  <antti@apple.com>
1908
1909         Remove code behind ENABLE(DIALOG_ELEMENT)
1910         https://bugs.webkit.org/show_bug.cgi?id=120467
1911
1912         Reviewed by Darin Adler.
1913
1914         It is incomplete and no one is building it.
1915
1916         * CMakeLists.txt:
1917         * Configurations/FeatureDefines.xcconfig:
1918         * DerivedSources.make:
1919         * DerivedSources.pri:
1920         * GNUmakefile.list.am:
1921         * Target.pri:
1922         * WebCore.exp.in:
1923         * WebCore.xcodeproj/project.pbxproj:
1924         * bindings/generic/RuntimeEnabledFeatures.cpp:
1925         * bindings/generic/RuntimeEnabledFeatures.h:
1926         * css/StyleResolver.cpp:
1927         (WebCore::StyleResolver::adjustRenderStyle):
1928         * css/html.css:
1929         * dom/ContextFeatures.cpp:
1930         * dom/ContextFeatures.h:
1931         * dom/Document.cpp:
1932         * dom/Document.h:
1933         * dom/Element.cpp:
1934         (WebCore::Element::removedFrom):
1935         (WebCore::Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries):
1936         * dom/Element.h:
1937         (WebCore::Element::isDisabledFormControl):
1938         * dom/ElementRareData.h:
1939         (WebCore::ElementRareData::ElementRareData):
1940         * html/HTMLDialogElement.cpp: Removed.
1941         * html/HTMLDialogElement.h: Removed.
1942         * html/HTMLDialogElement.idl: Removed.
1943         * html/HTMLElementsAllInOne.cpp:
1944         * html/HTMLTagNames.in:
1945         * rendering/RenderDialog.cpp: Removed.
1946         * rendering/RenderDialog.h: Removed.
1947         * rendering/RenderLayer.cpp:
1948         (WebCore::RenderLayer::rebuildZOrderLists):
1949         (WebCore::RenderLayer::collectLayers):
1950         * rendering/RenderLayer.h:
1951         * rendering/RenderObject.h:
1952         (WebCore::RenderObject::isCounter):
1953         * rendering/RenderingAllInOne.cpp:
1954         * testing/InternalSettings.cpp:
1955         (WebCore::InternalSettings::Backup::Backup):
1956         (WebCore::InternalSettings::Backup::restoreTo):
1957         * testing/InternalSettings.h:
1958
1959 2013-08-29  Simon Fraser  <simon.fraser@apple.com>
1960
1961         Fix slider thumb event handling to use local, not absolute coordinates
1962         https://bugs.webkit.org/show_bug.cgi?id=120480
1963
1964         Reviewed by Darin Adler.
1965         
1966         SliderThumbElement::setPositionFromPoint() did all of its coordinate
1967         math by mapping renderer rects into absolute coordinates, which was
1968         unnecessary and expensive.
1969         
1970         Fix by doing all the math in the coordinate space of the input's
1971         renderer. This simplified the code. Also, currentPosition
1972         was computed but unused, so was removed.
1973
1974         No behavior change. Tested by fast/forms/range/slider-transformed.html
1975
1976         * html/shadow/SliderThumbElement.cpp:
1977         (WebCore::SliderThumbElement::setPositionFromPoint):
1978
1979 2013-08-29  Zan Dobersek  <zdobersek@igalia.com>
1980
1981         [Automake] libWebCoreDOM.la could use a better name
1982         https://bugs.webkit.org/show_bug.cgi?id=120232
1983
1984         Reviewed by Martin Robinson.
1985
1986         * bindings/gobject/GNUmakefile.am: Rename the libWebCoreDOM library to libGObjectDOMBindings.
1987
1988 2013-08-29  Joseph Pecoraro  <pecoraro@apple.com>
1989
1990         Web Inspector: Download Web Archive of Inspected Page
1991         https://bugs.webkit.org/show_bug.cgi?id=119774
1992
1993         Reviewed by Timothy Hatcher.
1994
1995         Add PageAgent.archive which will return a Base-64 encoded web archive
1996         when successful. In order to then allow saving non-string files, extend
1997         InspectorFrontendHost.save to allow for Base-64 encoded data.
1998
1999         * inspector/Inspector.json:
2000         * inspector/InspectorPageAgent.cpp:
2001         (WebCore::InspectorPageAgent::archive):
2002         * inspector/InspectorPageAgent.h:
2003         Introduce and implement PageAgent.archive. Create a Web Archive of the
2004         page's main frame.
2005
2006         * inspector/InspectorFrontendClient.h:
2007         * inspector/InspectorFrontendClientLocal.h:
2008         (WebCore::InspectorFrontendClientLocal::save):
2009         * inspector/InspectorFrontendHost.cpp:
2010         (WebCore::InspectorFrontendHost::save):
2011         * inspector/InspectorFrontendHost.h:
2012         * inspector/InspectorFrontendHost.idl:
2013         Extend InspectorFrontendHost.save to include a base64Encoded param.
2014
2015         * inspector/front-end/FileManager.js:
2016         * inspector/front-end/InspectorFrontendHostStub.js:
2017         (.WebInspector.InspectorFrontendHostStub.prototype.save):
2018         Misc. updates to the old inspector for function changes.
2019
2020 2013-08-29  Robert Hogan  <robert@webkit.org>
2021
2022         Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
2023         https://bugs.webkit.org/show_bug.cgi?id=93735
2024
2025         Reviewed by David Hyatt.
2026
2027         Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an 
2028         intrinsic height or width. This causes them to go down the wrong height and width computation
2029         path in RenderBox when they are absolute positioned. 
2030         
2031         The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really 
2032         possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
2033         of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
2034         To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
2035         the helpers for returning their approximation of intrinsic height and width.
2036
2037         The initial attempt at landing this patch had to be rolled out because it used LayoutUnit() for default
2038         intrinsic height of some replaced elements and this made the layout of the elements unstable in some sites.
2039         The fix for this issue is captured in intrinsic-button-and-input-height.html.
2040
2041         Tests: fast/replaced/intrinsic-button-and-input-height.html
2042                fast/replaced/width-and-height-of-positioned-replaced-elements.html
2043
2044         * rendering/RenderBox.cpp:
2045         (WebCore::isReplacedElement):
2046         (WebCore::RenderBox::computePositionedLogicalWidth):
2047         (WebCore::RenderBox::computePositionedLogicalHeight):
2048         * rendering/RenderBox.h:
2049         (WebCore::RenderBox::intrinsicSize):
2050         * rendering/RenderButton.h:
2051         * rendering/RenderFileUploadControl.cpp:
2052         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2053         * rendering/RenderListBox.cpp:
2054         (WebCore::RenderListBox::RenderListBox):
2055         (WebCore::RenderListBox::computePreferredLogicalWidths):
2056         (WebCore::RenderListBox::computeLogicalHeight):
2057         * rendering/RenderListBox.h:
2058         * rendering/RenderMenuList.h:
2059         * rendering/RenderReplaced.h:
2060         * rendering/RenderSlider.cpp:
2061         (WebCore::RenderSlider::computePreferredLogicalWidths):
2062         * rendering/RenderTextControl.cpp:
2063         (WebCore::RenderTextControl::RenderTextControl):
2064         (WebCore::RenderTextControl::computeLogicalHeight):
2065         * rendering/RenderTextControl.h:
2066
2067 2013-08-29  Brent Fulgham  <bfulgham@apple.com>
2068
2069         [Windows] Unreviewed gardening. Add missing *.css files from project.
2070
2071         * WebCore.vcxproj/WebCore.vcxproj:
2072         * WebCore.vcxproj/WebCore.vcxproj.filters:
2073
2074 2013-08-29  Pratik Solanki  <pratik.solanki@gmail.com>
2075
2076         SharedBuffer m_segments and m_dataArray must be exclusive
2077         https://bugs.webkit.org/show_bug.cgi?id=77715
2078
2079         Reviewed by Benjamin Poulain.
2080
2081         When USE(NETWORK_CFDATA_ARRAY_CALLBACK) is enabled, we use m_dataArray to hold the incoming
2082         data. We do not use m_segments. Since they are exclusive in practice, do not define or use
2083         m_segments when NETWORK_CFDATA_ARRAY_CALLBACK is enabled.
2084
2085         No new tests because no functional changes.
2086
2087         * platform/SharedBuffer.cpp:
2088         (WebCore::SharedBuffer::append):
2089         (WebCore::SharedBuffer::clear):
2090         (WebCore::SharedBuffer::copy):
2091         (WebCore::SharedBuffer::buffer):
2092         (WebCore::SharedBuffer::getSomeData):
2093         * platform/SharedBuffer.h:
2094
2095 2013-08-29  Daniel Bates  <dabates@apple.com>
2096
2097         [iOS] Upstream changes to WebCore/style
2098         https://bugs.webkit.org/show_bug.cgi?id=120173
2099
2100         Reviewed by Darin Adler.
2101
2102         * style/StyleResolveTree.cpp:
2103         (WebCore::Style::elementImplicitVisibility): Added; specific to iOS.
2104         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
2105         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
2106         (WebCore::Style::resolveTree): Modified to instantiate CheckForVisibilityChangeOnRecalcStyle when building on iOS.
2107
2108 2013-08-29  Arnaud Renevier  <a.renevier@samsung.com>
2109
2110         [cairo] canvas drawing on itself doesn't work with accelerated canvas
2111         https://bugs.webkit.org/show_bug.cgi?id=118808
2112
2113         Reviewed by Martin Robinson.
2114
2115         When copying an accelerated image, we try to get its dimensions with
2116         cairo_image_surface_get_width/cairo_image_surface_get_height. As
2117         surface is not an image, this returns width and height of 0.
2118
2119         Many other places use cairo_image_surface_get although the surface may
2120         be a gl surface. 
2121         
2122         This patch fixes those issues by implementing a cairoSurfaceSize
2123         helper that returns the surface size whatever type it is.
2124
2125         It use cairo_surface_create_similar instead of
2126         cairo_image_surface_create in copyCairoImageSurface. It also calls
2127         cairo_paint in encodeImage when a drawing over a black background is
2128         needed.
2129
2130         It copies the surface to an image surface if needed in extractImage.
2131
2132         No new tests. Covered by existing tests.
2133
2134         * platform/graphics/cairo/BitmapImageCairo.cpp:
2135         (WebCore::BitmapImage::BitmapImage):
2136         (WebCore::BitmapImage::draw):
2137         (WebCore::BitmapImage::checkForSolidColor):
2138         * platform/graphics/cairo/CairoUtilities.cpp:
2139         (WebCore::copyCairoImageSurface):
2140         (WebCore::cairoSurfaceSize):
2141         * platform/graphics/cairo/CairoUtilities.h:
2142         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2143         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2144         * platform/graphics/gtk/GdkCairoUtilities.cpp:
2145         (cairoSurfaceToGdkPixbuf):
2146         * platform/graphics/gtk/GdkCairoUtilities.h:
2147         * platform/graphics/gtk/ImageBufferGtk.cpp:
2148         (WebCore::encodeImage):
2149         * platform/graphics/gtk/ImageGtk.cpp:
2150         (WebCore::BitmapImage::getGdkPixbuf):
2151         * platform/gtk/DragIcon.cpp:
2152         (WebCore::DragIcon::setImage):
2153
2154 2013-08-29  Tamas Czene  <tczene@inf.u-szeged.hu>
2155
2156         Buildfix after r154806 for !ENABLE(CSS_REGIONS) platforms.
2157         https://bugs.webkit.org/show_bug.cgi?id=120461
2158
2159         Reviewed by Csaba Osztrogonác.
2160
2161         moveToFlowThreadIfNeeded() is used only inside of ENABLE(CSS_REGIONS)
2162         block (and only once), so it should be guarded too.
2163
2164         * style/StyleResolveTree.cpp:
2165
2166 2013-08-29  David Kilzer  <ddkilzer@apple.com>
2167
2168         BUILD FIX (r154778): AXSearchFieldCancelButtonText() is not defined on iOS
2169
2170         See: AX: Cancel button in search field not accessible.
2171         <https://webkit.org/b/120322>
2172
2173         Fixes the following build error:
2174
2175             In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:44:
2176             Source/WebCore/accessibility/AccessibilitySearchFieldButtons.cpp:46:12: error: use of undeclared identifier 'AXSearchFieldCancelButtonText'
2177                 return AXSearchFieldCancelButtonText();
2178                        ^
2179             1 error generated.
2180
2181         * accessibility/AccessibilitySearchFieldButtons.cpp:
2182         (WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
2183         Return String() instead of calling AXSearchFieldCancelButtonText() on iOS.
2184
2185 2013-08-29  Antti Koivisto  <antti@apple.com>
2186
2187         Remove NodeRenderingContext
2188         https://bugs.webkit.org/show_bug.cgi?id=120466
2189
2190         Reviewed by Andreas Kling.
2191
2192         Switch the few remaining clients of this class to call the underlying code directly.
2193
2194         * CMakeLists.txt:
2195         * GNUmakefile.list.am:
2196         * Target.pri:
2197         * WebCore.exp.in:
2198         * WebCore.vcxproj/WebCore.vcxproj:
2199         * WebCore.xcodeproj/project.pbxproj:
2200         * css/StyleResolver.cpp:
2201         (WebCore::StyleResolver::State::initForStyleResolve):
2202         * dom/DOMAllInOne.cpp:
2203         * dom/Node.cpp:
2204         * dom/Node.h:
2205         
2206             Remove Node::parentNodeForRenderingAndStyle(). Make clients invoke NodeRenderingTraversal::parent() directly.
2207
2208         * dom/NodeRenderingContext.cpp: Removed.
2209         * dom/NodeRenderingContext.h: Removed.
2210         * dom/ShadowRoot.h:
2211         * dom/Text.cpp:
2212         * dom/Text.h:
2213         * dom/TreeScope.cpp:
2214         * dom/TreeScope.h:
2215             
2216             Remove virtual TreeScope::resetStyleInheritance. Make clients cast to ShadowRoot when needed.
2217
2218         * html/HTMLSummaryElement.cpp:
2219         (WebCore::HTMLSummaryElement::detailsElement):
2220         * style/StyleResolveTree.cpp:
2221         (WebCore::Style::createTextRendererIfNeeded):
2222         
2223             For consistency switch resetStyleInheritance check to use parentNode() instead of renderingParentNode. This matches the NodeRenderingTraversal implementation.
2224             This difference is probably not testable in current trunk.
2225
2226         (WebCore::Style::resolveTree):
2227
2228 2013-08-29  Antti Koivisto  <antti@apple.com>
2229
2230         Move element renderer creation out of NodeRenderingContext
2231         https://bugs.webkit.org/show_bug.cgi?id=120461
2232
2233         Reviewed by Andreas Kling.
2234
2235         Move NodeRenderingContext::createRendererIfNeeded() and the related utility functions to StyleResolveTree.
2236         
2237         Tighten typing and constness. Refactor sligthly to be more understandable.
2238
2239         * dom/Element.cpp:
2240         (WebCore::Element::shouldMoveToFlowThread):
2241         * dom/Element.h:
2242         * dom/NodeRenderingContext.cpp:
2243         (WebCore::NodeRenderingContext::NodeRenderingContext):
2244         (WebCore::NodeRenderingContext::nextRenderer):
2245         (WebCore::NodeRenderingContext::previousRenderer):
2246         (WebCore::NodeRenderingContext::parentRenderer):
2247         * dom/NodeRenderingContext.h:
2248         * dom/PseudoElement.h:
2249         * style/StyleResolveTree.cpp:
2250         (WebCore::Style::nextSiblingRenderer):
2251         (WebCore::Style::shouldCreateRenderer):
2252         (WebCore::Style::elementInsideRegionNeedsRenderer):
2253         (WebCore::Style::moveToFlowThreadIfNeeded):
2254         (WebCore::Style::createRendererIfNeeded):
2255         (WebCore::Style::attachRenderTree):
2256         * svg/SVGElement.cpp:
2257         (WebCore::SVGElement::shouldMoveToFlowThread):
2258         * svg/SVGElement.h:
2259
2260 2013-08-28  Chris Fleizach  <cfleizach@apple.com>
2261
2262         AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 27
2263         https://bugs.webkit.org/show_bug.cgi?id=120434
2264
2265         Reviewed by Darin Adler.
2266
2267         Crash logs indicate that there's a null pointer access in rootObject. That seems like it could only
2268         happen in Document was null. 
2269
2270         Unfortunately, there are no reproducible steps and no other information to construct a test case.
2271
2272         * accessibility/AXObjectCache.cpp:
2273         (WebCore::AXObjectCache::rootObject):
2274
2275 2013-08-28  Ryosuke Niwa  <rniwa@webkit.org>
2276
2277         The code to look for an ancestor form element is duplicated in three different places
2278         https://bugs.webkit.org/show_bug.cgi?id=120391
2279
2280         Reviewed by Darin Adler.
2281
2282         Unduplicated the code by putting a single implementation in HTMLFormElement.cpp.
2283
2284         * WebCore.order:
2285         * html/FormAssociatedElement.cpp:
2286         (WebCore::FormAssociatedElement::findAssociatedForm):
2287         (WebCore::FormAssociatedElement::formAttributeChanged):
2288         * html/HTMLElement.cpp:
2289         (WebCore::HTMLElement::virtualForm):
2290         * html/HTMLElement.h:
2291         * html/HTMLFormControlElement.cpp:
2292         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2293         * html/HTMLFormElement.cpp:
2294         (WebCore::HTMLFormElement::findClosestFormAncestor):
2295         * html/HTMLFormElement.h:
2296         * html/HTMLImageElement.cpp:
2297         (WebCore::HTMLImageElement::insertedInto):
2298         * html/HTMLObjectElement.cpp:
2299         (WebCore::HTMLObjectElement::HTMLObjectElement):
2300         * html/parser/HTMLTreeBuilder.cpp:
2301         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2302
2303 2013-08-28  Ryosuke Niwa  <rniwa@webkit.org>
2304
2305         Stop throwing DOM exceptions in internal 'XMLHttpRequest' response getters
2306         https://bugs.webkit.org/show_bug.cgi?id=120446
2307
2308         Reviewed by Alexey Proskuryakov.
2309
2310         Merge https://chromium.googlesource.com/chromium/blink/+/c8188c21452501b68950a9fcc1f5cbc7b4de4df5
2311
2312         Unlike 'responseText' and 'responseXML', 'responseBlob' and
2313         'responseArrayBuffer' are not exposed to JavaScript (they don't
2314         appear in the IDL or in the specification). As they are only called from
2315         custom bindings in response to a JavaScript call to the 'response' getter,
2316         we can safely replace the exception-throwing code in the implementation
2317         with an ASSERT that the request type is correct.
2318
2319         * bindings/js/JSXMLHttpRequestCustom.cpp:
2320         (WebCore::JSXMLHttpRequest::response):
2321         * xml/XMLHttpRequest.cpp:
2322         (WebCore::XMLHttpRequest::responseBlob):
2323         (WebCore::XMLHttpRequest::responseArrayBuffer):
2324         * xml/XMLHttpRequest.h:
2325
2326 2013-08-28  Chris Curtis  <chris_curtis@apple.com>
2327
2328         https://bugs.webkit.org/show_bug.cgi?id=119548
2329         Refactoring Exception throws.
2330         
2331         Reviewed by Geoffrey Garen.
2332         
2333         Gets column information from the error object for reporting exceptions.
2334         * bindings/js/JSDOMBinding.cpp:
2335         (WebCore::reportException): 
2336         * bindings/js/ScriptCallStackFactory.cpp: 
2337         (WebCore::createScriptCallStackFromException):
2338  
2339         Moved setting an exception into the vm, These functions changed to use the new functionality.
2340  
2341         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
2342         (WebCore::JSAudioBufferSourceNode::setBuffer):
2343         * bindings/js/JSBiquadFilterNodeCustom.cpp:
2344         (WebCore::JSBiquadFilterNode::setType):
2345         * bindings/js/JSCryptoCustom.cpp:
2346         (WebCore::JSCrypto::getRandomValues):
2347         * bindings/js/JSDOMBinding.cpp:
2348         (WebCore::setDOMException):
2349         * bindings/js/JSInjectedScriptHostCustom.cpp:
2350         (WebCore::JSInjectedScriptHost::setFunctionVariableValue):
2351         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2352         (WebCore::JSJavaScriptCallFrame::evaluate):
2353         (WebCore::JSJavaScriptCallFrame::setVariableValue):
2354         * bindings/js/JSNodeFilterCondition.cpp:
2355         (WebCore::JSNodeFilterCondition::acceptNode):
2356         * bindings/js/JSOscillatorNodeCustom.cpp:
2357         (WebCore::JSOscillatorNode::setType):
2358         * bindings/js/JSPannerNodeCustom.cpp:
2359         (WebCore::JSPannerNode::setPanningModel):
2360         (WebCore::JSPannerNode::setDistanceModel):
2361         * bindings/js/JSSVGLengthCustom.cpp:
2362         (WebCore::JSSVGLength::convertToSpecifiedUnits):
2363         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2364         (WebCore::getObjectParameter):
2365         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
2366         (WebCore::JSWebGLRenderingContext::getExtension):
2367         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
2368         (WebCore::JSWebGLRenderingContext::getParameter):
2369         (WebCore::JSWebGLRenderingContext::getProgramParameter):
2370         (WebCore::JSWebGLRenderingContext::getShaderParameter):
2371         (WebCore::JSWebGLRenderingContext::getUniform):
2372         (WebCore::dataFunctionf):
2373         (WebCore::dataFunctioni):
2374         (WebCore::dataFunctionMatrix):
2375         * bindings/js/JSXMLHttpRequestCustom.cpp:
2376         (WebCore::JSXMLHttpRequest::open):
2377         * bindings/js/SerializedScriptValue.cpp:
2378         (WebCore::CloneBase::throwStackOverflow):
2379         (WebCore::CloneDeserializer::throwValidationError):
2380         (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
2381         * bindings/js/WorkerScriptController.cpp:
2382         (WebCore::WorkerScriptController::evaluate):
2383         (WebCore::WorkerScriptController::setException):
2384         * bridge/c/c_instance.cpp:
2385         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
2386         (JSC::Bindings::CInstance::invokeMethod):
2387         (JSC::Bindings::CInstance::invokeDefaultMethod):
2388         (JSC::Bindings::CInstance::invokeConstruct):
2389         (JSC::Bindings::CInstance::toJSPrimitive):
2390         * bridge/objc/objc_instance.mm:
2391         (ObjcInstance::invokeMethod):
2392         * bridge/objc/objc_runtime.mm:
2393         (JSC::Bindings::ObjcArray::setValueAt):
2394         (JSC::Bindings::ObjcArray::valueAt):
2395         * bridge/objc/objc_utility.mm:
2396         (JSC::Bindings::throwError):
2397         * bridge/qt/qt_instance.cpp:
2398         (JSC::Bindings::QtField::valueFromInstance):
2399         (JSC::Bindings::QtField::setValueToInstance):
2400         * bridge/runtime_array.cpp:
2401         (JSC::RuntimeArray::put):
2402         (JSC::RuntimeArray::putByIndex):
2403         * bridge/runtime_object.cpp:
2404         (JSC::Bindings::RuntimeObject::throwInvalidAccessError):
2405
2406 2013-08-28  Alexey Proskuryakov  <ap@apple.com>
2407
2408         Remove an unused data member from Page.
2409
2410         Rubber-stamped by Brady Eidson.
2411
2412         * page/Page.cpp:
2413         * page/Page.h:
2414         Removed m_cookieEnabled. This was completely dead code, long obsoleted by PageSettings.
2415
2416 2013-08-28  Gustavo Noronha Silva  <gns@gnome.org>
2417
2418         Unreviewed build fix - copy/paste failure, copied too much.
2419
2420         * bindings/gobject/WebKitDOMCustom.h:
2421
2422 2013-08-28  Dean Jackson  <dino@apple.com>
2423
2424         [WebGL] CoreGraphics can provide greyscale image data
2425         https://webkit.org/b/120443
2426
2427         Reviewed by Simon Fraser.
2428
2429         CoreGraphics can decode greyscale or greyscale+alpha images
2430         while preserving the format. Our WebGL texture unpacker
2431         was seeing this and assuming it meant the data did not come
2432         from an <img> element. Since that method already special cased
2433         CoreGraphics, the fix was to simply return true for these
2434         extra types.
2435
2436         I also renamed srcFormatComeFromDOMElementOrImageData
2437         to srcFormatComesFromDOMElementOrImageData.
2438
2439         Test: fast/canvas/webgl/tex-image-with-greyscale-image.html
2440
2441         * platform/graphics/GraphicsContext3D.cpp: Call new name.
2442         * platform/graphics/GraphicsContext3D.h:
2443         (WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData):
2444         Add support for R8, AR8, A8, and RA8 data formats.
2445
2446 2013-08-28  Gustavo Noronha Silva  <gns@gnome.org>
2447
2448         [GTK] HTMLElement lost setID and getID - need to add compatibility symbols
2449         https://bugs.webkit.org/show_bug.cgi?id=120440
2450
2451         Reviewed by Martin Robinson.
2452
2453         No tests, just adding compatibility symbols.
2454
2455         setID and getID were removed, and the parent class (Element) ones should be used instead.
2456         We need to keep our ABI compatible, though, so add compatibility symbols.
2457
2458         * bindings/gobject/WebKitDOMCustom.cpp:
2459         (webkit_dom_html_element_get_id):
2460         (webkit_dom_html_element_set_id):
2461         * bindings/gobject/WebKitDOMCustom.h:
2462
2463 2013-08-28  Simon Fraser  <simon.fraser@apple.com>
2464
2465         Fix compositing layers in columns
2466         https://bugs.webkit.org/show_bug.cgi?id=120436
2467
2468         Reviewed by Dave Hyatt.
2469         
2470         Remove the old hack in RenderLayer::updateLayerPosition() for placing
2471         layers in columns, which changed the layer position for composited
2472         layers; this broke hit-testing.
2473         
2474         Fix a better way by moving compositing layers to the correct
2475         positions that take column offsets into account, by fixing
2476         RenderLayer::convertToLayerCoords() to optionally apply column
2477         adjustment, and using this in the code which positions compositing layers.
2478
2479         Tests: compositing/columns/ancestor-clipped-in-paginated.html
2480                compositing/columns/clipped-in-paginated.html
2481                compositing/columns/composited-columns-vertical-rl.html
2482                compositing/columns/composited-columns.html
2483                compositing/columns/composited-in-paginated-rl.html
2484                compositing/columns/composited-in-paginated-writing-mode-rl.html
2485                compositing/columns/composited-lr-paginated-repaint.html
2486                compositing/columns/composited-rl-paginated-repaint.html
2487                compositing/columns/hittest-composited-in-paginated.html
2488                compositing/columns/rotated-in-paginated.html
2489                compositing/columns/untransformed-composited-in-paginated.html
2490
2491         * rendering/RenderLayer.cpp:
2492         (WebCore::RenderLayer::updateLayerPosition):
2493         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
2494         (WebCore::accumulateOffsetTowardsAncestor):
2495         (WebCore::RenderLayer::convertToLayerCoords):
2496         * rendering/RenderLayer.h:
2497         * rendering/RenderLayerBacking.cpp:
2498         (WebCore::RenderLayerBacking::updateCompositedBounds):
2499         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2500
2501 2013-08-28  Brent Fulgham  <bfulgham@webkit.org>
2502
2503         [WinCairo] Unreviewed build fix.
2504
2505         * WebCore.vcxproj/WebCore.vcxproj: Don't exclude the full screen
2506         window from the build.
2507         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2508
2509 2013-08-28  Benjamin Poulain  <benjamin@webkit.org>
2510
2511         Fix the build after r154780
2512
2513         * dom/SpaceSplitString.cpp:
2514         (WebCore::SpaceSplitStringData::create):
2515
2516 2013-08-27  Benjamin Poulain  <bpoulain@apple.com>
2517
2518         Simplify and clean SpaceSplitString
2519         https://bugs.webkit.org/show_bug.cgi?id=120385
2520
2521         Reviewed by Ryosuke Niwa.
2522
2523         Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
2524         This brings the following:
2525         - Fix the coding style of the header.
2526         - Remove the concepts of empty and null. The list can now be empty or have something.
2527           There is no null state.
2528         - Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
2529
2530         * WebCore.exp.in:
2531         * dom/ElementData.h:
2532         (WebCore::ElementData::hasClass):
2533         * dom/SpaceSplitString.cpp:
2534         (WebCore::tokenizeSpaceSplitString):
2535         (WebCore::SpaceSplitStringData::containsAll):
2536         (WebCore::SpaceSplitString::set):
2537         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2538         (WebCore::TokenCounterProcessor::TokenCounterProcessor):
2539         (WebCore::TokenCounterProcessor::processToken):
2540         (WebCore::TokenCounterProcessor::tokenCount):
2541         (WebCore::TokenInitializerProcessor::TokenInitializerProcessor):
2542         (WebCore::TokenInitializerProcessor::processToken):
2543         (WebCore::TokenInitializerProcessor::nextMemoryBucket):
2544         (WebCore::SpaceSplitStringData::create):
2545         (WebCore::SpaceSplitStringData::destroy):
2546         * dom/SpaceSplitString.h:
2547         (WebCore::SpaceSplitStringData::contains):
2548         (WebCore::SpaceSplitStringData::size):
2549         (WebCore::SpaceSplitStringData::operator[]):
2550         (WebCore::SpaceSplitStringData::ref):
2551         (WebCore::SpaceSplitStringData::deref):
2552         (WebCore::SpaceSplitStringData::SpaceSplitStringData):
2553         (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
2554         (WebCore::SpaceSplitStringData::tokenArrayStart):
2555         (WebCore::SpaceSplitString::SpaceSplitString):
2556         (WebCore::SpaceSplitString::operator!=):
2557         (WebCore::SpaceSplitString::clear):
2558         (WebCore::SpaceSplitString::contains):
2559         (WebCore::SpaceSplitString::containsAll):
2560         (WebCore::SpaceSplitString::size):
2561         (WebCore::SpaceSplitString::isEmpty):
2562         (WebCore::SpaceSplitString::operator[]):
2563         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2564         * html/ClassList.cpp:
2565         (WebCore::ClassList::classNames):
2566         * page/EventHandler.cpp:
2567         (WebCore::findDropZone):
2568
2569 <<<<<<< .mine
2570 2013-08-28  Benjamin Poulain  <benjamin@webkit.org>
2571
2572         Simplify and clean SpaceSplitString
2573         https://bugs.webkit.org/show_bug.cgi?id=120385
2574
2575         Reviewed by Ryosuke Niwa.
2576
2577         Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
2578         - Remove the concepts of empty and null. The list can now be empty or have something.
2579           There is no null state.
2580         - Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
2581
2582         * WebCore.exp.in:
2583         * dom/ElementData.h:
2584         (WebCore::ElementData::hasClass):
2585         * dom/SpaceSplitString.cpp:
2586         (WebCore::tokenizeSpaceSplitString):
2587         (WebCore::SpaceSplitStringData::containsAll):
2588         (WebCore::SpaceSplitString::set):
2589         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2590         (WebCore::TokenCounter::TokenCounter):
2591         (WebCore::TokenCounter::processToken):
2592         (WebCore::TokenCounter::tokenCount):
2593         (WebCore::TokenAtomicStringInitializer::TokenAtomicStringInitializer):
2594         (WebCore::TokenAtomicStringInitializer::processToken):
2595         (WebCore::TokenAtomicStringInitializer::nextMemoryBucket):
2596         (WebCore::SpaceSplitStringData::create):
2597         (WebCore::SpaceSplitStringData::destroy):
2598         * dom/SpaceSplitString.h:
2599         (WebCore::SpaceSplitStringData::contains):
2600         (WebCore::SpaceSplitStringData::size):
2601         (WebCore::SpaceSplitStringData::operator[]):
2602         (WebCore::SpaceSplitStringData::ref):
2603         (WebCore::SpaceSplitStringData::deref):
2604         (WebCore::SpaceSplitStringData::SpaceSplitStringData):
2605         (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
2606         (WebCore::SpaceSplitStringData::tokenArrayStart):
2607         (WebCore::SpaceSplitString::containsAll):
2608         (WebCore::SpaceSplitString::isEmpty):
2609         (WebCore::SpaceSplitString::operator[]):
2610         * html/ClassList.cpp:
2611         (WebCore::ClassList::classNames):
2612         * page/EventHandler.cpp:
2613         (WebCore::findDropZone):
2614
2615 =======
2616 2013-08-28  Rob Buis  <rwlbuis@webkit.org>
2617
2618         Namespace prefix is blindly followed when serializing
2619         https://bugs.webkit.org/show_bug.cgi?id=19121
2620         Serializer doesn't handling inconsistent prefixes properly
2621         https://bugs.webkit.org/show_bug.cgi?id=117764
2622         Attribute namespaces are serialized as if they were element ones
2623         https://bugs.webkit.org/show_bug.cgi?id=22958
2624
2625         Reviewed by Ryosuke Niwa.
2626
2627         Add code to make sure unique prefixes and namespace declarations are generated.
2628         Unique prefix generation happens when:
2629         - the same prefix is used to map to different namespaces or
2630         - no prefix is given but the attribute is in a namespace.
2631
2632         This is done in order to not violate constraints listed in http://www.w3.org/TR/xml-names11/. In general
2633         the pseudo code listed in http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#normalizeDocumentAlgo
2634         is used, doing the following for attributes:
2635         if the attribute has a namespace then
2636           if the attribute has no prefix OR prefix is not declared OR conflicts with existing prefix mapping to different NS then
2637             try to find the matching in-scope declaration by looking up the prefix in the namespace -> prefix mapping, if found use that prefix
2638             else if the attribute prefix is not null AND not mapped in-scope, declare the prefix
2639             else generate a unique prefix for the namespace
2640
2641         To keep track of in-scope namespaces a prefix to namespace mapping is used. 
2642
2643         Tests: fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html
2644                fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html
2645                fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html
2646                svg/custom/xlink-prefix-generation-in-attributes.html
2647
2648         * editing/MarkupAccumulator.cpp:
2649         (WebCore::MarkupAccumulator::MarkupAccumulator):
2650         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
2651         (WebCore::MarkupAccumulator::appendNamespace):
2652         (WebCore::MarkupAccumulator::generateUniquePrefix):
2653         (WebCore::MarkupAccumulator::appendAttribute):
2654         * editing/MarkupAccumulator.h:
2655
2656 2013-08-28  Sam White  <samuel_white@apple.com>
2657
2658         AX: Cancel button in search field not accessible.
2659         <https://webkit.org/b/120322>
2660
2661         Expose the cancel button that shows in an input element of
2662         type search to accessibility.
2663
2664         Reviewed by Chris Fleizach.
2665
2666         Test: platform/mac/accessibility/search-field-cancel-button.html
2667
2668         * CMakeLists.txt:
2669         * English.lproj/Localizable.strings:
2670         * GNUmakefile.list.am:
2671         * Target.pri:
2672         * WebCore.vcxproj/WebCore.vcxproj:
2673         * WebCore.xcodeproj/project.pbxproj:
2674         * accessibility/AXObjectCache.cpp:
2675         (WebCore::createFromRenderer):
2676         * accessibility/AccessibilityAllInOne.cpp:
2677         * accessibility/AccessibilitySearchFieldButtons.cpp: Added.
2678         (WebCore::AccessibilitySearchFieldCancelButton::create):
2679         (WebCore::AccessibilitySearchFieldCancelButton::AccessibilitySearchFieldCancelButton):
2680         (WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
2681         (WebCore::AccessibilitySearchFieldCancelButton::accessibilityText):
2682         (WebCore::AccessibilitySearchFieldCancelButton::press):
2683         (WebCore::AccessibilitySearchFieldCancelButton::computeAccessibilityIsIgnored):
2684         * accessibility/AccessibilitySearchFieldButtons.h: Added.
2685         * dom/Element.h:
2686         (WebCore::Element::isSearchFieldCancelButtonElement):
2687         * html/shadow/TextControlInnerElements.h:
2688         * platform/LocalizedStrings.cpp:
2689         (WebCore::AXSearchFieldCancelButtonText):
2690         * platform/LocalizedStrings.h:
2691         * platform/efl/LocalizedStringsEfl.cpp:
2692         (WebCore::AXSearchFieldCancelButtonText):
2693         * platform/gtk/LocalizedStringsGtk.cpp:
2694         (WebCore::AXSearchFieldCancelButtonText):
2695         * platform/qt/LocalizedStringsQt.cpp:
2696         (WebCore::AXSearchFieldCancelButtonText):
2697
2698 >>>>>>> .r154779
2699 2013-08-28  Eric Carlson  <eric.carlson@apple.com>
2700
2701         MediaPlayerPrivateAVFoundationObjC is painting video frames under the video layer
2702         https://bugs.webkit.org/show_bug.cgi?id=120170
2703
2704         Reviewed by Simon Fraser.
2705
2706         No new tests, it is only possible to test in the debugger.
2707
2708         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2709         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Drive by optimization.
2710         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Move logic from paint here.
2711         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Do nothing if we already have a video layer,
2712             otherwise call paint().
2713
2714 2013-08-28  Antti Koivisto  <antti@apple.com>
2715
2716         Add child and descendant const iterators
2717         https://bugs.webkit.org/show_bug.cgi?id=120430
2718
2719         Reviewed by Andreas Kling
2720
2721         This patch adds const-correct DOM tree traversal iterators. It also uses them in a few places.
2722         
2723         Some const_casts have been applied where constness breaks.
2724
2725         * dom/ChildIterator.h:
2726         (WebCore::::ChildConstIterator):
2727         (WebCore::::operator):
2728         (WebCore::=):
2729         (WebCore::::ChildConstIteratorAdapter):
2730         (WebCore::::begin):
2731         (WebCore::::end):
2732         (WebCore::elementChildren):
2733         (WebCore::childrenOfType):
2734         * dom/DescendantIterator.h:
2735         (WebCore::::DescendantConstIterator):
2736         (WebCore::::operator):
2737         (WebCore::=):
2738         (WebCore::::DescendantConstIteratorAdapter):
2739         (WebCore::::begin):
2740         (WebCore::::end):
2741         (WebCore::elementDescendants):
2742         (WebCore::descendantsOfType):
2743         * dom/Node.cpp:
2744         (WebCore::Node::numberOfScopedHTMLStyleChildren):
2745         * html/HTMLFieldSetElement.cpp:
2746         (WebCore::HTMLFieldSetElement::legend):
2747         * html/HTMLFieldSetElement.h:
2748         * html/HTMLMediaElement.cpp:
2749         (WebCore::HTMLMediaElement::finishParsingChildren):
2750         * html/HTMLObjectElement.cpp:
2751         (WebCore::HTMLObjectElement::containsJavaApplet):
2752         * svg/SVGElement.cpp:
2753         (WebCore::SVGElement::title):
2754         * svg/SVGSVGElement.cpp:
2755         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
2756         (WebCore::SVGSVGElement::checkIntersection):
2757         (WebCore::SVGSVGElement::checkEnclosure):
2758         (WebCore::SVGSVGElement::getElementById):
2759         * svg/SVGSVGElement.h:
2760
2761 2013-08-28  Lukasz Gajowy  <l.gajowy@samsung.com>
2762
2763         AX:Null pointer may be dereferenced.
2764         https://bugs.webkit.org/show_bug.cgi?id=120300
2765
2766         Reviewed by Chris Fleizach.
2767
2768         Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.
2769
2770         * accessibility/AXObjectCache.cpp:
2771         (WebCore::AXObjectCache::getOrCreate):
2772
2773 2013-08-28  Pratik Solanki  <psolanki@apple.com>
2774
2775         Document::elementSheet() should return a reference
2776         https://bugs.webkit.org/show_bug.cgi?id=120433
2777
2778         Reviewed by Andreas Kling.
2779
2780         Since elementSheet() always retruns a valid pointer, we can simply return a reference
2781         instead. Also rename m_elemSheet to m_elementSheet.
2782
2783         * css/CSSParser.cpp:
2784         (WebCore::CSSParser::parseInlineStyleDeclaration):
2785         * css/PropertySetCSSStyleDeclaration.cpp:
2786         (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
2787         * dom/Document.cpp:
2788         (WebCore::Document::~Document):
2789         (WebCore::Document::recalcStyle):
2790         (WebCore::Document::updateBaseURL):
2791         (WebCore::Document::elementSheet):
2792         * dom/Document.h:
2793         * dom/StyledElement.cpp:
2794         (WebCore::StyledElement::setInlineStyleFromString):
2795         (WebCore::StyledElement::setInlineStyleProperty):
2796         (WebCore::StyledElement::addSubresourceAttributeURLs):
2797         (WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
2798         * inspector/InspectorStyleSheet.cpp:
2799         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
2800
2801 2013-08-28  Ryosuke Niwa  <rniwa@webkit.org>
2802
2803         REGRESSION(r154586): Past names map should only be used when named item is empty
2804         https://bugs.webkit.org/show_bug.cgi?id=120432
2805
2806         Reviewed by Anders Carlsson.
2807
2808         Don't add the element from the past names map if we've found elements of the given name.
2809
2810         Test: fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html
2811
2812         * html/HTMLFormElement.cpp:
2813         (WebCore::HTMLFormElement::getNamedElements):
2814
2815 2013-08-27  Ryosuke Niwa  <rniwa@webkit.org>
2816
2817         Don't keep unassociated elements in the past names map
2818         https://bugs.webkit.org/show_bug.cgi?id=120328
2819
2820         Reviewed by Darin Adler.
2821
2822         Remove elements from the past names map of a form element when they are disassociated with the form to match
2823         the behaviors of Firefox 24 and Internet Explorer 10. The specification feedback has been submitted to WHATWG
2824         in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-August/040586.html
2825
2826         Also fix a memory leak via the past names map when the elements in the map becomes an ancestor of the form
2827         element by storing a raw pointer in the map. This is safe because the form associated elements are kept alive
2828         by another mechanism.
2829
2830         Because ~FormAssociatedElement removes entries from the past names map, we could no longer store HTMLElement*
2831         in HTMLFormElement::m_pastNamesMap as that requires casting FormAssociatedElement* to HTMLElement*, which is
2832         not possible in ~FormAssociatedElement. We instead store pointers to FormNamedItem, new base class of
2833         FormAssociatedElement and HTMLImageElement.
2834
2835         Test: fast/forms/past-names-map-should-not-contained-disassociated-elements.html
2836
2837         * Target.pri:
2838         * WebCore.exp.in:
2839         * WebCore.vcxproj/WebCore.vcxproj:
2840         * WebCore.vcxproj/WebCore.vcxproj.filters:
2841         * WebCore.xcodeproj/project.pbxproj:
2842         * html/FormAssociatedElement.cpp:
2843         * html/FormAssociatedElement.h:
2844         (WebCore::toHTMLElement):
2845
2846         * html/FormNamedItem.h: Added.
2847         (WebCore::FormNamedItem::~FormNamedItem):
2848
2849         * html/HTMLElement.h:
2850         (WebCore::HTMLElement::asFormNamedItem): Added. This allows the conversion from a HTMLFormControlElement,
2851         HTMLObjectElement, HTMLImageElement to FormNamedItem in getNamedElements to update the past names map.
2852
2853         * html/HTMLFormControlElement.h:
2854         * html/HTMLFormElement.cpp:
2855         (WebCore::HTMLFormElement::removeFormElement):
2856         (WebCore::HTMLFormElement::removeImgElement):
2857         (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap): Asserts that FormNamedItem added to or obtained
2858         from the past names map is either a form associated element or an image element; the condition guarantees
2859         that the item will be removed from the map before its element gets destructed.
2860
2861         (WebCore::HTMLFormElement::elementFromPastNamesMap):
2862         (WebCore::HTMLFormElement::addToPastNamesMap):
2863         (WebCore::HTMLFormElement::removeFromPastNamesMap): Finds and removes the obsolete item from the map in O(n).
2864         Note that removeFromVector, which is called on m_associatedElements or m_imageElements before this function is called,
2865         is already O(n).
2866
2867         (WebCore::HTMLFormElement::getNamedElements):
2868
2869         * html/HTMLFormElement.h:
2870         * html/HTMLImageElement.h:
2871         * html/HTMLObjectElement.h:
2872
2873 2013-08-28  Brendan Long  <b.long@cablelabs.com>
2874
2875         Duplicate in-band tracks when switching <source> elements
2876         https://bugs.webkit.org/show_bug.cgi?id=120369
2877
2878         Reviewed by Eric Carlson.
2879
2880         Test: media/track/track-in-band-duplicate-tracks-when-source-changes.html
2881
2882         * html/HTMLMediaElement.cpp:
2883         (WebCore::HTMLMediaElement::createMediaPlayer):
2884         Delete existing in-band tracks before creating a new media player.
2885
2886 2013-08-28  Bem Jones-Bey  <bjonesbe@adobe.com>
2887
2888         Code cleanup: rename FloatIntervalSearchAdapter and remove unnecessary inlines
2889         https://bugs.webkit.org/show_bug.cgi?id=120378
2890
2891         Reviewed by Darin Adler.
2892
2893         Rename FloatIntervalSearchAdapter to ComputeFloatOffsetAdapter. The
2894         naming of this adapter has caused much confusion in reading the code,
2895         as it wasn't apparent that calls to it were actually doing anything
2896         other than searching the interval tree. The new name is a much better
2897         description of what it actually does.
2898
2899         Also, rename m_lowValue and m_highValue member variables to make it
2900         easier to read the code that uses them.
2901
2902         Removed the inlines based on a change by eseidel in Blink.
2903
2904         No new tests, no behavior change.
2905
2906         * rendering/RenderBlock.cpp:
2907         (WebCore::::updateOffsetIfNeeded): Update for renames.
2908         (WebCore::::collectIfNeeded): Ditto.
2909         (WebCore::::getHeightRemaining): Ditto.
2910         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
2911         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
2912         * rendering/RenderBlock.h:
2913         (WebCore::RenderBlock::FloatingObject::x): Remove unnecessary inline.
2914         (WebCore::RenderBlock::FloatingObject::maxX): Ditto.
2915         (WebCore::RenderBlock::FloatingObject::y): Ditto.
2916         (WebCore::RenderBlock::FloatingObject::maxY): Ditto.
2917         (WebCore::RenderBlock::FloatingObject::width): Ditto.
2918         (WebCore::RenderBlock::FloatingObject::height): Ditto.
2919         (WebCore::RenderBlock::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter): Rename.
2920         (WebCore::RenderBlock::ComputeFloatOffsetAdapter::lowValue): Rename m_lowValue.
2921         (WebCore::RenderBlock::ComputeFloatOffsetAdapter::highValue): Rename m_highValue.
2922
2923 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
2924
2925         Resolve unused parameter warning in ScriptedAnimationController.cpp.
2926         https://bugs.webkit.org/show_bug.cgi?id=120408
2927
2928         Reviewed by Darin Adler.
2929
2930         * dom/ScriptedAnimationController.cpp:
2931         (WebCore::ScriptedAnimationController::setThrottled):
2932
2933 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
2934
2935         [CSS Grid Layout] Handle 'span' positions during layout
2936         https://bugs.webkit.org/show_bug.cgi?id=119756
2937
2938         Reviewed by Andreas Kling.
2939
2940         From Blink r149133 by <jchaffraix@chromium.org>
2941
2942         Properly handle the 'span' keyword during layout. We only had
2943         parsing support so far but with this change we are able to
2944         recognize these positions and act accordingly.
2945
2946         * rendering/RenderGrid.cpp:
2947         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
2948         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
2949         * rendering/RenderGrid.h:
2950         * rendering/style/GridPosition.h:
2951         (WebCore::GridPosition::shouldBeResolvedAgainstOppositePosition):
2952
2953 2013-08-28  Antti Koivisto  <antti@apple.com>
2954
2955         Factor descendant iterator assertions into a class.
2956         https://bugs.webkit.org/show_bug.cgi?id=120422
2957
2958         Reviewed by Darin Adler.
2959
2960         Share the assertions between ChildIterator and DescendantIterator. We can use it for future const iterators too.
2961
2962         * GNUmakefile.list.am:
2963         * Target.pri:
2964         * WebCore.vcxproj/WebCore.vcxproj:
2965         * WebCore.xcodeproj/project.pbxproj:
2966         * dom/ChildIterator.h:
2967         (WebCore::::ChildIterator):
2968         (WebCore::::operator):
2969         (WebCore::=):
2970         * dom/DescendantIterator.h:
2971         (WebCore::::DescendantIterator):
2972         (WebCore::::operator):
2973         (WebCore::=):
2974         * dom/DescendantIteratorAssertions.h: Added.
2975         (WebCore::DescendantIteratorAssertions::DescendantIteratorAssertions):
2976         (WebCore::DescendantIteratorAssertions::domTreeHasMutated):
2977         (WebCore::DescendantIteratorAssertions::dropEventDispatchAssertion):
2978
2979 2013-08-28  Darin Adler  <darin@apple.com>
2980
2981         Eliminate Pasteboard::generalPasteboard
2982         https://bugs.webkit.org/show_bug.cgi?id=120392
2983
2984         Reviewed by Anders Carlsson.
2985
2986         * WebCore.exp.in: Removed the generalPasteboard function.
2987         It didn't need to be exported, because no one was using it.
2988
2989         * editing/Editor.cpp:
2990         (WebCore::Editor::paste): Added an overload that takes a Pasteboard.
2991         (WebCore::Editor::copyURL): Ditto.
2992         * editing/Editor.h: Added overloads.
2993
2994         * editing/EditorCommand.cpp:
2995         (WebCore::executePasteGlobalSelection): Put this function inside the same
2996         platform #if that the global selection code in the Pasteboard class was in.
2997         Changed to use Pasteboard::createForGlobalSelection instead of using the
2998         Pasteboard::setSelectionMode approach.
2999         (WebCore::createCommandMap): Put PasteGlobalSelection inside the platform #if.
3000
3001         * inspector/InjectedScriptHost.cpp:
3002         (WebCore::InjectedScriptHost::copyText): Use Pasteboard::createForCopyAndPaste()
3003         instead of Pasteboard::generalPasteboard().
3004         * inspector/InspectorFrontendHost.cpp:
3005         (WebCore::InspectorFrontendHost::copyText): Ditto.
3006
3007         * platform/Pasteboard.h: Removed generalPasteboard. Replaced isSelectionMode
3008         and setSelectionMode with createForGlobalSelection.
3009
3010         * platform/blackberry/PasteboardBlackBerry.cpp: Deleted generalPasteboard.
3011         * platform/efl/PasteboardEfl.cpp: Deleted generalPasteboard.
3012
3013         * platform/gtk/PasteboardGtk.cpp: Deleted selectionClipboard, primaryClipboard,
3014         generalPasteboard, isSelectionMode, and setSelectionMode.
3015         (WebCore::Pasteboard::createForGlobalSelection): Added.
3016         * platform/gtk/PasteboardHelper.cpp: Deleted m_usePrimarySelectionClipboard,
3017         getCurrentClipboard, and getClipboard.
3018         * platform/gtk/PasteboardHelper.h: Deleted the above, plus
3019         setUsePrimarySelectionClipboard and usePrimarySelectionClipboard.
3020
3021         * platform/ios/PasteboardIOS.mm: Deleted generalPasteboard.
3022         * platform/mac/PasteboardMac.mm: Deleted generalPasteboard.
3023
3024         * platform/qt/PasteboardQt.cpp: Deleted generalPasteboard, isSelectionMode,
3025         and setSelectionMode.
3026         (WebCore::Pasteboard::createForGlobalSelection): Added.
3027
3028         * platform/win/PasteboardWin.cpp: Deleted generalPasteboard.
3029
3030 2013-08-28  Antti Koivisto  <antti@apple.com>
3031
3032         Share attach loops between Elements and ShadowRoots
3033         https://bugs.webkit.org/show_bug.cgi?id=120414
3034
3035         Reviewed Andreas Kling.
3036
3037         * style/StyleResolveTree.cpp:
3038         (WebCore::Style::attachChildren):
3039         (WebCore::Style::attachShadowRoot):
3040         (WebCore::Style::detachChildren):
3041         (WebCore::Style::detachShadowRoot):
3042
3043 2013-08-28  Anders Carlsson  <andersca@apple.com>
3044
3045         Clean up XPathExpressionNode and XPath::Function
3046         https://bugs.webkit.org/show_bug.cgi?id=120411
3047
3048         Reviewed by Antti Koivisto.
3049
3050         Rename the subexpression and function argument getters to be more descriptive,
3051         remove the non-const overloads (they were never used) and change the getters to return
3052         references since they can never be null.
3053
3054         * xml/XPathExpressionNode.cpp:
3055         * xml/XPathExpressionNode.h:
3056         (WebCore::XPath::ParseNode::~ParseNode):
3057         (WebCore::XPath::Expression::addSubExpression):
3058         (WebCore::XPath::Expression::isContextNodeSensitive):
3059         (WebCore::XPath::Expression::setIsContextNodeSensitive):
3060         (WebCore::XPath::Expression::isContextPositionSensitive):
3061         (WebCore::XPath::Expression::setIsContextPositionSensitive):
3062         (WebCore::XPath::Expression::isContextSizeSensitive):
3063         (WebCore::XPath::Expression::setIsContextSizeSensitive):
3064         (WebCore::XPath::Expression::subExpressionCount):
3065         (WebCore::XPath::Expression::subExpression):
3066         * xml/XPathFunctions.cpp:
3067         (WebCore::XPath::Function::setArguments):
3068         (WebCore::XPath::FunId::evaluate):
3069         (WebCore::XPath::FunLocalName::evaluate):
3070         (WebCore::XPath::FunNamespaceURI::evaluate):
3071         (WebCore::XPath::FunName::evaluate):
3072         (WebCore::XPath::FunCount::evaluate):
3073         (WebCore::XPath::FunString::evaluate):
3074         (WebCore::XPath::FunConcat::evaluate):
3075         (WebCore::XPath::FunStartsWith::evaluate):
3076         (WebCore::XPath::FunContains::evaluate):
3077         (WebCore::XPath::FunSubstringBefore::evaluate):
3078         (WebCore::XPath::FunSubstringAfter::evaluate):
3079         (WebCore::XPath::FunSubstring::evaluate):
3080         (WebCore::XPath::FunStringLength::evaluate):
3081         (WebCore::XPath::FunNormalizeSpace::evaluate):
3082         (WebCore::XPath::FunTranslate::evaluate):
3083         (WebCore::XPath::FunBoolean::evaluate):
3084         (WebCore::XPath::FunNot::evaluate):
3085         (WebCore::XPath::FunLang::evaluate):
3086         (WebCore::XPath::FunNumber::evaluate):
3087         (WebCore::XPath::FunSum::evaluate):
3088         (WebCore::XPath::FunFloor::evaluate):
3089         (WebCore::XPath::FunCeiling::evaluate):
3090         (WebCore::XPath::FunRound::evaluate):
3091         * xml/XPathFunctions.h:
3092         (WebCore::XPath::Function::setName):
3093         (WebCore::XPath::Function::argumentCount):
3094         (WebCore::XPath::Function::argument):
3095         (WebCore::XPath::Function::name):
3096         * xml/XPathPredicate.cpp:
3097         (WebCore::XPath::Negative::evaluate):
3098         (WebCore::XPath::NumericOp::evaluate):
3099         (WebCore::XPath::EqTestOp::evaluate):
3100         (WebCore::XPath::LogicalOp::evaluate):
3101         (WebCore::XPath::Union::evaluate):
3102
3103 2013-08-28  Andreas Kling  <akling@apple.com>
3104
3105         Page::pluginData() should return a reference.
3106         <https://webkit.org/b/120386>
3107
3108         Reviewed by Darin Adler.
3109
3110         The PluginData is lazily constructed by pluginData(); it never returns null.
3111         A small number of null checks were harmed in the making of this patch.
3112
3113 2013-08-28  Andrei Parvu  <parvu@adobe.com>
3114
3115         <https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property
3116
3117         Added the -webkit-mask-source-type property to the -webkit-mask shorthand property.
3118
3119         Reviewed by Dirk Schulze.
3120
3121         Test cases added in LayoutTests/fast/masking/parsing-mask.html
3122
3123         * css/CSSParser.cpp: Added the CSSPropertyWebkitMaskSourceType property to the array of shorthand properties.
3124         (WebCore::CSSParser::parseValue):
3125         * css/StylePropertyShorthand.cpp: Added the CSSPropertyWebkitMaskSourceType to the list of shorthands.
3126         (WebCore::webkitMaskShorthand):
3127         (WebCore::matchingShorthandsForLonghand):
3128
3129 2013-08-28  Zan Dobersek  <zdobersek@igalia.com>
3130
3131         REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1
3132         https://bugs.webkit.org/show_bug.cgi?id=120398
3133
3134         Reviewed by Anders Carlsson.
3135
3136         * bridge/c/c_class.cpp:
3137         (JSC::Bindings::CClass::methodNamed): Keep the pointer of the new CMethod object
3138         to return it after it's adopted by the new HashMap entry.
3139         (JSC::Bindings::CClass::fieldNamed): The pointer to the newly created CField object
3140         should be returned in this branch, matching the behavior before r154708.
3141
3142 2013-08-28  Antti Koivisto  <antti@apple.com>
3143
3144         Fix Qt no-libxml2 build.
3145         
3146         Not reviewed.
3147
3148         * xml/parser/XMLDocumentParserQt.cpp:
3149         (WebCore::XMLDocumentParser::parseCdata):
3150
3151 2013-08-28  Antti Koivisto  <antti@apple.com>
3152
3153         Don't use NodeRenderingContext when attaching text renderers
3154         https://bugs.webkit.org/show_bug.cgi?id=120402
3155
3156         Reviewed by Andreas Kling.
3157
3158         This patch moves various functions for creating text renderers from NodeRenderingContext and Text to StyleResolveTree.
3159         It also tightens the logic and combines some functions.
3160
3161         * dom/CharacterData.cpp:
3162         (WebCore::CharacterData::parserAppendData):
3163         (WebCore::CharacterData::setDataAndUpdate):
3164         * dom/ContainerNode.cpp:
3165         (WebCore::attachChild):
3166         (WebCore::detachChild):
3167         * dom/NodeRenderingContext.cpp:
3168         * dom/NodeRenderingContext.h:
3169         * dom/Text.cpp:
3170         (WebCore::Text::~Text):
3171         * dom/Text.h:
3172         * html/HTMLViewSourceDocument.cpp:
3173         (WebCore::HTMLViewSourceDocument::addText):
3174         * html/parser/HTMLConstructionSite.cpp:
3175         (WebCore::executeTask):
3176         * html/shadow/InsertionPoint.cpp:
3177         (WebCore::InsertionPoint::willAttachRenderers):
3178         (WebCore::InsertionPoint::willDetachRenderers):
3179         * style/StyleResolveTree.cpp:
3180         (WebCore::Style::isRendererReparented):
3181         (WebCore::Style::previousSiblingRenderer):
3182         (WebCore::Style::nextSiblingRenderer):
3183         
3184             From NodeRenderingContext::next/previousRenderer
3185
3186         (WebCore::Style::createTextRenderersForSiblingsAfterAttachIfNeeded):
3187         
3188             From Text::createTextRenderersForSiblingsAfterAttachIfNeeded()
3189
3190         (WebCore::Style::textRendererIsNeeded):
3191         
3192             From Text::textRendererIsNeeded
3193
3194         (WebCore::Style::createTextRendererIfNeeded):
3195         
3196             Combines code from Text::createTextRendererIfNeeded, NodeRenderingContext::createRendererForTextIfNeeded,
3197             NodeRenderingContext constructor and text node relevant code NodeRenderingContext::shouldCreateRenderer.
3198
3199         (WebCore::Style::attachTextRenderer):
3200         (WebCore::Style::detachTextRenderer):
3201         
3202             New functions of attaching text renderers. From Text::attach/detachText()
3203
3204         (WebCore::Style::updateTextRendererAfterContentChange):
3205         
3206             From Text::updateTextRenderer.
3207
3208         (WebCore::Style::attachShadowRoot):
3209         (WebCore::Style::attachChildren):
3210         (WebCore::Style::attachRenderTree):
3211         (WebCore::Style::detachShadowRoot):
3212         (WebCore::Style::detachChildren):
3213         (WebCore::Style::updateTextStyle):
3214         * style/StyleResolveTree.h:
3215         * xml/parser/XMLDocumentParser.cpp:
3216         (WebCore::XMLDocumentParser::exitText):
3217         * xml/parser/XMLDocumentParserLibxml2.cpp:
3218         (WebCore::XMLDocumentParser::cdataBlock):
3219
3220 2013-08-28  Antti Koivisto  <antti@apple.com>
3221
3222         Make descendant iterators always require ContainerNode root
3223         https://bugs.webkit.org/show_bug.cgi?id=120393
3224
3225         Reviewed by Andreas Kling.
3226
3227         Remove Node* root versions of the iterators. 
3228         Fix the few call sites that required them to have tighter typing.
3229
3230         * accessibility/AccessibilityNodeObject.cpp:
3231         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
3232         (WebCore::siblingWithAriaRole):
3233         * dom/ChildIterator.h:
3234         (WebCore::::ChildIteratorAdapter):
3235         (WebCore::::begin):
3236         (WebCore::::end):
3237         (WebCore::elementChildren):
3238         (WebCore::childrenOfType):
3239         * dom/DescendantIterator.h:
3240         (WebCore::::DescendantIterator):
3241         (WebCore::::DescendantIteratorAdapter):
3242         (WebCore::::begin):
3243         (WebCore::::end):
3244         (WebCore::elementDescendants):
3245         (WebCore::descendantsOfType):
3246         * editing/ApplyStyleCommand.cpp:
3247         (WebCore::dummySpanAncestorForNode):
3248         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
3249         (WebCore::ApplyStyleCommand::applyInlineStyle):
3250         * editing/ApplyStyleCommand.h:
3251
3252 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
3253
3254         WorkerGlobalScopeWebDatabase requires ENABLE(WORKERS)
3255         https://bugs.webkit.org/show_bug.cgi?id=120395
3256
3257         Reviewed by Christophe Dumez.
3258
3259         WorkerGlobalScopeDatabase uses the WorkerGlobalScope object which is
3260         defined only when WORKERS are enabled. We should guard that code.
3261
3262         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp:
3263         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.h:
3264         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl:
3265
3266 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
3267
3268         [CSS Grid Layout] Fix grid position resolution
3269         https://bugs.webkit.org/show_bug.cgi?id=119801
3270
3271         Reviewed by Andreas Kling.
3272
3273         From Blink r148833, r148878, r150403 by <jchaffraix@chromium.org>
3274
3275         Both grid-{column|row}-end and negative positions were not
3276         properly handled in our grid position resolution code. We were
3277         using the same code to resolve all the grid positions without
3278         considering the edges of the grid.
3279
3280         Also refactored the grid size estimation in
3281         resolveGridPositionsFromStyle() so we can use it for the grid size
3282         estimation. The code no longer requires the grid to be filled at
3283         that moment as the specs changed to use the "explicit grid" which
3284         is independent of grid items (only depends on style).
3285
3286         Test: fast/css-grid-layout/grid-item-negative-position-resolution.html
3287
3288         * rendering/RenderGrid.cpp:
3289         (WebCore::RenderGrid::maximumIndexInDirection):
3290         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
3291         (WebCore::adjustGridPositionForSide):
3292         (WebCore::RenderGrid::resolveGridPositionFromStyle):
3293         * rendering/RenderGrid.h:
3294
3295 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
3296
3297         [CSS Grid Layout] infinity should be defined as a negative value
3298         https://bugs.webkit.org/show_bug.cgi?id=107053
3299
3300         Reviewed by Andreas Kling.
3301
3302         From Blink r154805 by <jchaffraix@chromium.org>
3303
3304         Reject negative values for track-breadth at parse time as
3305         mentioned in the latest versions of the spec.
3306
3307         Added some extra checks to the existing tests.
3308
3309         * css/CSSParser.cpp:
3310         (WebCore::CSSParser::parseGridBreadth):
3311         * rendering/RenderGrid.cpp:
3312         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
3313
3314 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
3315
3316         [Soup] WebTiming information not shown in the inspector
3317         https://bugs.webkit.org/show_bug.cgi?id=118395
3318
3319         Reviewed by Martin Robinson.
3320
3321         WebTiming information was not correctly provided to WebCore
3322         because the gotHeadersCallback was incorrectly resetting the
3323         original ResourceResponse (which had the ResourceLoadTiming
3324         object) instead of simply updating their contents using the
3325         SoupMessage.
3326
3327         No new test required as this feature is already covered by the
3328         existing webtiming tests. In any case this change includes a fix
3329         for the http/tests/misc/webtiming-ssl.php test which was not
3330         failing even if it should because it was not correct.
3331
3332         * platform/network/soup/ResourceHandleSoup.cpp:
3333         (WebCore::gotHeadersCallback):
3334         (WebCore::restartedCallback): restartedCallback should be
3335         available only if WEB_TIMING is defined.
3336         (WebCore::createSoupMessageForHandleAndRequest): Ditto.
3337
3338 2013-08-26  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3339
3340         Scrolling allowed when overflow:hidden (seen on Acid2)
3341         https://bugs.webkit.org/show_bug.cgi?id=22769
3342
3343         Reviewed by Darin Adler.
3344
3345         Autoscroll, as well as other user-driven scroll actions,
3346         has to respect the scrollability styled into the web page.
3347         More specifically, if a html or body tags are styled with
3348         overflow:hidden, autoscroll should not scroll the containing document.
3349
3350         In order to fix this, patch hardens RenderBox::canAutoscroll as
3351         following: previously, ::canAutoscroll was relying solemnly in
3352         ::canBeScrolledAndHasScrollableArea to determine the scrollability
3353         of #document node, which was unconditionally returned as 'true'.
3354         Patch extends ::canAutoscroll to handle the #document case for
3355         main and inner frames, and now it asks through ::isScrollable if
3356         the corresponding document's FrameView is actually user-scrollable.
3357
3358         Note, that the patch change ::canAutoscroll to cover the non-mainFrame
3359         #document case, so the comment specific to Apple's Mail app can be omited
3360         now.
3361
3362         Test: fast/events/autoscroll-in-overflow-hidden-html.html
3363
3364         * rendering/RenderBox.cpp:
3365         (WebCore::RenderBox::canAutoscroll):
3366
3367 2013-08-27  Santosh Mahto  <santosh.ma@samsung.com>
3368
3369         Adding  "explicit" keyword in  forms related classes constructor
3370         https://bugs.webkit.org/show_bug.cgi?id=120366
3371
3372         Reviewed by Darin Adler.
3373
3374         Adding "explicit" keyword in constructors.
3375
3376         * html/BaseButtonInputType.h:
3377         (WebCore::BaseButtonInputType::BaseButtonInputType):
3378         * html/BaseCheckableInputType.h:
3379         (WebCore::BaseCheckableInputType::BaseCheckableInputType):
3380         * html/BaseChooserOnlyDateAndTimeInputType.h:
3381         (WebCore::BaseChooserOnlyDateAndTimeInputType::BaseChooserOnlyDateAndTimeInputType):
3382         * html/BaseClickableWithKeyInputType.h:
3383         (WebCore::BaseClickableWithKeyInputType::BaseClickableWithKeyInputType):
3384         * html/BaseTextInputType.h:
3385         (WebCore::BaseTextInputType::BaseTextInputType):
3386         * html/ColorInputType.h:
3387         (WebCore::ColorInputType::ColorInputType):
3388         * html/DateInputType.h:
3389         * html/DateTimeInputType.h:
3390         (WebCore::DateTimeInputType::DateTimeInputType):
3391         * html/DateTimeLocalInputType.h:
3392         (WebCore::DateTimeLocalInputType::DateTimeLocalInputType):
3393         * html/EmailInputType.h:
3394         (WebCore::EmailInputType::EmailInputType):
3395         * html/FileInputType.h:
3396         * html/HiddenInputType.h:
3397         (WebCore::HiddenInputType::HiddenInputType):
3398         * html/ImageData.h:
3399         * html/ImageInputType.h:
3400         * html/InputType.h:
3401         (WebCore::InputType::InputType):
3402         * html/MediaController.h:
3403         * html/MonthInputType.h:
3404         (WebCore::MonthInputType::MonthInputType):
3405         * html/RadioInputType.h:
3406         (WebCore::RadioInputType::RadioInputType):
3407         * html/RangeInputType.h:
3408         * html/ResetInputType.h:
3409         (WebCore::ResetInputType::ResetInputType):
3410         * html/SearchInputType.h:
3411         * html/SubmitInputType.h:
3412         (WebCore::SubmitInputType::SubmitInputType):
3413         * html/TelephoneInputType.h:
3414         (WebCore::TelephoneInputType::TelephoneInputType):
3415         * html/TextFieldInputType.h:
3416         * html/TextInputType.h:
3417         (WebCore::TextInputType::TextInputType):
3418         * html/TimeInputType.h:
3419         * html/URLInputType.h:
3420         (WebCore::URLInputType::URLInputType):
3421         * html/ValidationMessage.h:
3422         * html/WeekInputType.h:
3423         (WebCore::WeekInputType::WeekInputType):
3424
3425 2013-08-27  Benjamin Poulain  <benjamin@webkit.org>
3426
3427         Fix the indentation of SpaceSplitString
3428         https://bugs.webkit.org/show_bug.cgi?id=120390
3429
3430         Reviewed by Ryosuke Niwa.
3431
3432         * dom/SpaceSplitString.h:
3433         (WebCore::SpaceSplitStringData::contains):
3434         (WebCore::SpaceSplitStringData::isUnique):
3435         (WebCore::SpaceSplitStringData::size):
3436         (WebCore::SpaceSplitStringData::operator[]):
3437         (WebCore::SpaceSplitString::SpaceSplitString):
3438         (WebCore::SpaceSplitString::operator!=):
3439         (WebCore::SpaceSplitString::clear):
3440         (WebCore::SpaceSplitString::contains):
3441         (WebCore::SpaceSplitString::containsAll):
3442         (WebCore::SpaceSplitString::size):
3443         (WebCore::SpaceSplitString::isNull):
3444         (WebCore::SpaceSplitString::operator[]):
3445         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
3446         (WebCore::SpaceSplitString::ensureUnique):
3447
3448 2013-08-27  Andreas Kling  <akling@apple.com>
3449
3450         Make it less awkward to check if a Frame is the main Frame.
3451         <https://webkit.org/b/120382>
3452
3453         Reviewed by Anders Carlsson.
3454
3455         Added Page::frameIsMainFrame(const Frame*) so code that wants to find out if a given
3456         Frame is a Page's main frame doesn't have to do a manual pointer compare.
3457
3458         * page/Page.h:
3459         (WebCore::Page::frameIsMainFrame):
3460
3461             Added. Replaces (frame == &page->mainFrame()) idiom.
3462
3463 2013-08-27  Morten Stenshorne  <mstensho@opera.com>
3464
3465         Improve multicol intrinsic width calculation
3466         https://bugs.webkit.org/show_bug.cgi?id=116677
3467
3468         Reviewed by David Hyatt.
3469
3470         Test: fast/css-intrinsic-dimensions/multicol.html
3471
3472         * rendering/RenderBlock.cpp:
3473         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
3474         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
3475         * rendering/RenderBlock.h:
3476
3477 2013-08-27  Rob Buis  <rwlbuis@webkit.org>
3478
3479         feImage fails if referenced node contains radialGradient declaration
3480         https://bugs.webkit.org/show_bug.cgi?id=118735
3481
3482         Reviewed by Darin Adler.
3483
3484         Only call parent's updateRelativeLengthsInformation for graphics elements.
3485
3486         Tests: svg/custom/feImage-pserver-with-percentage-expected.svg
3487                svg/custom/feImage-pserver-with-percentage.svg
3488
3489         * svg/SVGElement.cpp:
3490         (WebCore::SVGElement::updateRelativeLengthsInformation):
3491
3492 2013-08-27  Darin Adler  <darin@apple.com>
3493
3494         No need for generalPasteboard (aside from "global selection mode")
3495         https://bugs.webkit.org/show_bug.cgi?id=120367
3496
3497         Reviewed by Alexey Proskuryakov.
3498
3499         * editing/Editor.cpp:
3500         (WebCore::Editor::pasteAsPlainTextBypassingDHTML):
3501         (WebCore::Editor::dispatchCPPEvent):
3502         (WebCore::Editor::cut):
3503         (WebCore::Editor::copy):
3504         (WebCore::Editor::paste):
3505         (WebCore::Editor::pasteAsPlainText):
3506         (WebCore::Editor::copyURL):
3507         (WebCore::Editor::copyImage):
3508         Use Pasteboard::createForCopyAndPaste rather than the single general pasteboard
3509         for editing operations.
3510
3511 2013-08-27  Chris Fleizach  <cfleizach@apple.com>
3512
3513         <https://webkit.org/b/120117> AX: <noscript> contents are exposed as static text
3514
3515         Reviewed by Tim Horton.
3516
3517         If <noscript> is not being used (because there is script) then we need to ignore its contents for AX.
3518
3519         Test: accessibility/noscript-ignored.html
3520
3521         * accessibility/AccessibilityRenderObject.cpp:
3522         (WebCore::AccessibilityRenderObject::addCanvasChildren):
3523         * accessibility/AccessibilityNodeObject.cpp:
3524         (WebCore::AccessibilityNodeObject::canHaveChildren):
3525
3526 2013-08-27  Anders Carlsson  <andersca@apple.com>
3527
3528         Stop using deleteAllValues in CClass
3529         https://bugs.webkit.org/show_bug.cgi?id=120376
3530
3531         Reviewed by Andreas Kling.
3532
3533         * bridge/c/c_class.cpp:
3534         (JSC::Bindings::CClass::CClass):
3535         (JSC::Bindings::CClass::~CClass):
3536         (JSC::Bindings::CClass::methodNamed):
3537         (JSC::Bindings::CClass::fieldNamed):
3538         * bridge/c/c_class.h:
3539         * bridge/jsc/BridgeJSC.h:
3540
3541 2013-08-27  Benjamin Poulain  <benjamin@webkit.org>
3542
3543         Clean ClassList and DOMSettableTokenList
3544         https://bugs.webkit.org/show_bug.cgi?id=120344
3545
3546         Reviewed by Ryosuke Niwa.
3547
3548         This patch cleans ClassList and DOMSettableTokenList to make it simpler to update
3549         SpaceSplitString:
3550         - Move the implementation of virtual functions to the cpp file.
3551         - Clean the #includes.
3552         - Make the implemented pure virtual methods final.
3553         - Make the element() accessor const.
3554
3555         * html/ClassList.cpp:
3556         (WebCore::ClassList::create):
3557         (WebCore::ClassList::element):
3558         (WebCore::ClassList::value):
3559         (WebCore::ClassList::setValue):
3560         (WebCore::ClassList::classNames):
3561         * html/ClassList.h:
3562         * html/DOMSettableTokenList.cpp:
3563         (WebCore::DOMSettableTokenList::create):
3564         (WebCore::DOMSettableTokenList::ref):
3565         (WebCore::DOMSettableTokenList::deref):
3566         (WebCore::DOMSettableTokenList::length):
3567         (WebCore::DOMSettableTokenList::value):
3568         * html/DOMSettableTokenList.h:
3569         * html/DOMTokenList.h:
3570         (WebCore::DOMTokenList::element):
3571
3572 2013-08-27  Arunprasad Rajkumar  <arurajku@cisco.com>
3573
3574         Replace currentTime() with monotonicallyIncreasingTime() in WebCore
3575         https://bugs.webkit.org/show_bug.cgi?id=119958
3576
3577         Reviewed by Alexey Proskuryakov.
3578
3579         WTF::currentTime() is prone to NTP and manual adjustments, so use
3580         WTF::monotonicallyIncreasingTime() to measure elapsed time.
3581
3582         It is a continuation of r154201.
3583
3584         * history/CachedPage.cpp:
3585         (WebCore::CachedPage::CachedPage):
3586         (WebCore::CachedPage::hasExpired):
3587         * html/parser/HTMLParserScheduler.h:
3588         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
3589         * loader/CrossOriginPreflightResultCache.cpp:
3590         (WebCore::CrossOriginPreflightResultCacheItem::parse):
3591         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
3592         * loader/FrameLoader.cpp:
3593         (WebCore::FrameLoader::setState):
3594         * loader/ProgressTracker.cpp:
3595         (WebCore::ProgressTracker::incrementProgress):
3596         * loader/cache/CachedCSSStyleSheet.cpp:
3597         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
3598         * loader/cache/CachedImage.cpp:
3599         (WebCore::CachedImage::didDraw):
3600         * loader/cache/MemoryCache.cpp:
3601         (WebCore::MemoryCache::pruneLiveResourcesToSize):
3602         * loader/icon/IconDatabase.cpp:
3603         (WebCore::IconDatabase::iconDatabaseSyncThread):
3604         (WebCore::IconDatabase::syncThreadMainLoop):
3605         (WebCore::IconDatabase::readFromDatabase):
3606         (WebCore::IconDatabase::writeToDatabase):
3607         (WebCore::IconDatabase::cleanupSyncThread):
3608         * page/animation/AnimationBase.cpp:
3609         (WebCore::AnimationBase::freezeAtTime):
3610         * page/animation/AnimationController.cpp:
3611         (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
3612         * platform/graphics/GraphicsLayerAnimation.cpp:
3613         (WebCore::GraphicsLayerAnimation::computeTotalRunningTime):
3614         (WebCore::GraphicsLayerAnimation::resume):
3615         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3616         (WebCore::AVFWrapper::createImageForTimeInRect):
3617         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3618         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
3619         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):
3620         * platform/graphics/ca/GraphicsLayerCA.cpp:
3621         (WebCore::GraphicsLayerCA::suspendAnimations):
3622         * platform/graphics/ca/PlatformCALayer.h:
3623         (WebCore::PlatformCALayer::currentTimeToMediaTime):
3624         * platform/graphics/ca/mac/LayerPool.mm:
3625         (WebCore::LayerPool::addLayer):
3626         (WebCore::LayerPool::decayedCapacity):
3627         (WebCore::LayerPool::pruneTimerFired):
3628         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3629         (mediaTimeToCurrentTime):
3630         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
3631         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted):
3632         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3633         (PlatformCALayer::printTree):
3634         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3635         (WebCore::GraphicsLayerTextureMapper::addAnimation):
3636         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
3637         (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
3638         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
3639         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3640         (WebCore::CoordinatedGraphicsLayer::addAnimation):
3641         * platform/network/DNSResolveQueue.cpp:
3642         (WebCore::DNSResolveQueue::isUsingProxy):
3643         * plugins/win/PluginMessageThrottlerWin.cpp:
3644         (WebCore::PluginMessageThrottlerWin::appendMessage):
3645         * rendering/RenderLayerCompositor.cpp:
3646         (WebCore::RenderLayerCompositor::didPaintBacking):
3647         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3648         * rendering/RenderProgress.cpp:
3649         (WebCore::RenderProgress::animationProgress):
3650         (WebCore::RenderProgress::updateAnimationState):
3651         * svg/animation/SMILTimeContainer.cpp:
3652         (WebCore::SMILTimeContainer::elapsed):
3653         (WebCore::SMILTimeContainer::begin):
3654         (WebCore::SMILTimeContainer::pause):
3655         (WebCore::SMILTimeContainer::resume):
3656         (WebCore::SMILTimeContainer::setElapsed):
3657
3658 2013-08-27  Robert Hogan  <robert@webkit.org>
3659
3660         cell width / offsetTop incorrect
3661         https://bugs.webkit.org/show_bug.cgi?id=11582
3662
3663         Reviewed by David Hyatt.
3664
3665         The offsetTop and offsetLeft of sections, rows and cells should include the table's border. There are separate
3666         problems with the offset[Top|Left] of table sections and the offsetLeft of rows which are covered under bugs 119020
3667         and 119021 respectively - here we stick to just fixing the inclusion of the border as it doesn't require rebaselining
3668         a lot of tests.
3669
3670         Test: fast/table/offset-top-includes-border.html
3671
3672         * rendering/RenderBoxModelObject.cpp:
3673         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
3674         * rendering/RenderTableSection.cpp:
3675         (WebCore::RenderTableSection::layoutRows):
3676
3677 2013-08-27  Jacky Jiang  <zhajiang@blackberry.com>
3678
3679         [BlackBerry] Rotate device from landscape to portrait during youtube streaming will cause device screen flash with video list page
3680         https://bugs.webkit.org/show_bug.cgi?id=120364
3681
3682         Reviewed by Rob Buis.
3683         Internally reviewed by Arvid Nilsson.
3684
3685         JIRA 461232
3686         When rotating device from landscape mode to portrait mode, we updated
3687         texture contents based on landscape mode front visibility and back
3688         visibility on WebKit thread at the very beginning and the landscape mode
3689         tiles wouldn't be able to cover the portrait mode screen which resulted
3690         in the screen flash.
3691         It's hard to compute front visibility information on WebKit thread because
3692         it doesn't know where the layers will be on the screen. Therefore, the
3693         front visibility won't be updated until the first time we draw textures
3694         on compositing thread.
3695         The patch traverses through LayerWebKitThread and LayerCompositingThread
3696         and discards back visibility and front visibility respectively if there
3697         is a pending orientation. In this way, we can pick up layerTilerPrefillRect
3698         as visibleRect instead of the visibleRect from the stale visibilities
3699         and add more tiles for uncovered screen when updating texture contents
3700         on WebKit thread.
3701         The patch also fixes a bug that we prune tiles based on the stale
3702         m_requiredTextureSize in pruneTextures(). We should prune tiles based
3703         on the updated pendingTextureSize instead.
3704
3705         * platform/graphics/blackberry/LayerCompositingThread.cpp:
3706         (WebCore::LayerCompositingThread::discardFrontVisibility):
3707         * platform/graphics/blackberry/LayerCompositingThread.h:
3708         * platform/graphics/blackberry/LayerCompositingThreadClient.h:
3709         (WebCore::LayerCompositingThreadClient::discardFrontVisibility):
3710         * platform/graphics/blackberry/LayerRenderer.cpp:
3711         (WebCore::LayerRenderer::discardFrontVisibility):
3712         * platform/graphics/blackberry/LayerRenderer.h:
3713         * platform/graphics/blackberry/LayerTiler.cpp:
3714         (WebCore::LayerTiler::discardFrontVisibility):
3715         (WebCore::LayerTiler::processTextureJob):
3716         (WebCore::LayerTiler::pruneTextures):
3717         (WebCore::LayerTiler::discardBackVisibility):
3718         * platform/graphics/blackberry/LayerTiler.h:
3719         * platform/graphics/blackberry/LayerWebKitThread.cpp:
3720         (WebCore::LayerWebKitThread::discardBackVisibility):
3721         * platform/graphics/blackberry/LayerWebKitThread.h:
3722
3723 2013-08-27  Antti Koivisto  <antti@apple.com>
3724
3725         Better mutation and event assertions for descendant iterators
3726         https://bugs.webkit.org/show_bug.cgi?id=120368
3727
3728         Reviewed by Andreas Kling.
3729
3730         Add mutation assertions to all functions.
3731         Drop the no-event-dispatch assertion when the iterator reaches the end. This reduces need for iterator scoping
3732         just to avoid assertions.
3733
3734         * dom/ChildIterator.h:
3735         (WebCore::::domTreeHasMutated):
3736         (WebCore::::operator):
3737         (WebCore::=):
3738         * dom/DescendantIterator.h:
3739         (WebCore::::domTreeHasMutated):
3740         (WebCore::::operator):
3741         (WebCore::=):
3742         * dom/Document.cpp:
3743         (WebCore::Document::childrenChanged):
3744         
3745             Make idiomatic.
3746
3747 2013-08-27  Renata Hodovan  <reni@webkit.org>
3748
3749         Missing null-check of parent renderer in WebCore::HTMLEmbedElement::rendererIsNeeded()
3750         https://bugs.webkit.org/show_bug.cgi?id=120343
3751
3752         Reviewed by Darin Adler.
3753
3754         Null-check the parent renderer of HTMLEmbedElement in WebCore::HTMLEmbedElement::rendererIsNeeded()
3755         and early return.
3756
3757         Test: fast/html/HTMLEmbedElement_without_parent_renderer_assert_crash.html
3758
3759         * html/HTMLEmbedElement.cpp:
3760         (WebCore::HTMLEmbedElement::rendererIsNeeded):
3761
3762 2013-08-27  Brent Fulgham  <bfulgham@apple.com>
3763
3764         [Windows] Correct method call for characteristic update.
3765
3766         Reviewed by Eric Carlson.
3767
3768         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3769         (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged):
3770         [Windows] Correct method call (should have been "characteristicsChanged", not
3771         "player()->characteristicChanged()"
3772
3773 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
3774
3775         [Windows] some track language tags are not recognized
3776         https://bugs.webkit.org/show_bug.cgi?id=120335
3777
3778         Reviewed by Eric Carlson.
3779
3780         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Revise implementation
3781         to match logic in platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjc.mm
3782
3783 2013-08-27  Andreas Kling  <akling@apple.com>
3784
3785         Clumsily fix Gtk+ build. Not my proudest moment.
3786
3787         * rendering/svg/RenderSVGResourceFilter.cpp:
3788
3789 2013-08-27  Andreas Kling  <akling@apple.com>
3790
3791         Fix Qt build.
3792
3793         * rendering/svg/RenderSVGResourceFilter.cpp:
3794
3795 2013-08-27  Andreas Kling  <akling@apple.com>
3796
3797         RenderView::availableLogicalHeight() should be self-contained.
3798         <https://webkit.org/b/120356>
3799
3800         Reviewed by Antti Koivisto.
3801
3802         Instead of checking isRenderView() in RenderBox::availableLogicalHeightUsing()
3803         and doing an early return, do everything needed without leaving RenderView instead.
3804         Document style never has min-/max-height so there's no need to apply constraints.
3805
3806         * rendering/RenderBox.cpp:
3807         (WebCore::RenderBox::availableLogicalHeightUsing):
3808         * rendering/RenderView.cpp:
3809         (WebCore::RenderView::availableLogicalHeight):
3810
3811 2013-08-27  Andreas Kling  <akling@apple.com>
3812
3813         Simplify some more Settings access where we have a Frame in reach.
3814         <https://webkit.org/b/120256>
3815
3816         Reviewed by Darin Adler.
3817
3818         RenderObjects can always find Settings through the Frame.
3819
3820         * rendering/InlineTextBox.cpp:
3821         (WebCore::InlineTextBox::paint):
3822         * rendering/RenderBoxModelObject.cpp:
3823         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3824         * rendering/svg/RenderSVGResourceFilter.cpp:
3825         (WebCore::RenderSVGResourceFilter::applyResource):
3826
3827 2013-08-27  Andreas Kling  <akling@apple.com>
3828
3829         RenderView::flowThreadController() should return a reference.
3830         <https://webkit.org/b/120363>
3831
3832         Reviewed by Antti Koivisto.
3833
3834         This function does lazy construction and always returns an object.
3835
3836 2013-08-27  Andreas Kling  <akling@apple.com>
3837
3838         HTMLAppletElement: Use child iterator to walk <param> children.
3839         <https://webkit.org/b/120361>
3840
3841         Reviewed by Antti Koivisto.
3842
3843         Take Antti's fancy new child iterator for a quick spin.
3844
3845         * html/HTMLAppletElement.cpp:
3846         (WebCore::HTMLAppletElement::updateWidget):
3847
3848 2013-08-27  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
3849
3850         [gstreamer] Make sure gstreamer source element is thread-safe
3851         https://bugs.webkit.org/show_bug.cgi?id=115352
3852
3853         Reviewed by Philippe Normand.
3854
3855         GStreamer source element may be created by any gstreamer element on any thread by calling
3856         gst_element_make_from_uri with the URIs handled by the source element.
3857         This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
3858         being created outside the main thread.
3859
3860         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3861         (webkit_web_src_init):
3862         (webKitWebSrcDispose):
3863         (webKitWebSrcFinalize):
3864         (webKitWebSrcSetProperty):
3865         (webKitWebSrcGetProperty):
3866         (removeTimeoutSources):
3867         (webKitWebSrcStop):
3868         (webKitWebSrcStart):
3869         (webKitWebSrcChangeState):
3870         (webKitWebSrcQueryWithParent):
3871         (webKitWebSrcGetUri):
3872         (webKitWebSrcSetUri):
3873         (webKitWebSrcNeedDataMainCb):
3874         (webKitWebSrcNeedDataCb):
3875         (webKitWebSrcEnoughDataMainCb):
3876         (webKitWebSrcEnoughDataCb):
3877         (webKitWebSrcSeekMainCb):
3878         (webKitWebSrcSeekDataCb):
3879         (webKitWebSrcSetMediaPlayer):
3880         (StreamingClient::StreamingClient):
3881         (StreamingClient::~StreamingClient):
3882         (StreamingClient::createReadBuffer):
3883         (StreamingClient::handleResponseReceived):
3884         (StreamingClient::handleDataReceived):
3885         (StreamingClient::handleNotifyFinished):
3886         (CachedResourceStreamingClient::CachedResourceStreamingClient):
3887         (CachedResourceStreamingClient::~CachedResourceStreamingClient):
3888         (CachedResourceStreamingClient::loadFailed):
3889         (CachedResourceStreamingClient::setDefersLoading):
3890         (CachedResourceStreamingClient::getOrCreateReadBuffer):
3891         (CachedResourceStreamingClient::responseReceived):
3892         (CachedResourceStreamingClient::dataReceived):
3893         (CachedResourceStreamingClient::notifyFinished):
3894         (ResourceHandleStreamingClient::ResourceHandleStreamingClient):
3895         (ResourceHandleStreamingClient::~ResourceHandleStreamingClient):
3896         (ResourceHandleStreamingClient::loadFailed):
3897         (ResourceHandleStreamingClient::setDefersLoading):
3898         (ResourceHandleStreamingClient::getOrCreateReadBuffer):
3899         (ResourceHandleStreamingClient::willSendRequest):
3900         (ResourceHandleStreamingClient::didReceiveResponse):
3901         (ResourceHandleStreamingClient::didReceiveData):
3902         (ResourceHandleStreamingClient::didFinishLoading):
3903         (ResourceHandleStreamingClient::didFail):
3904         (ResourceHandleStreamingClient::wasBlocked):
3905         (ResourceHandleStreamingClient::cannotShowURL):
3906         Make element thread-safe, add support to use the element without a player associated (e.g.
3907         the DASH plugin using the webkitsrc to download fragments), use GMutexLocker to simplify
3908         locks and other general improvements.
3909
3910 2013-08-27  Antti Koivisto  <antti@apple.com>
3911
3912         Remove branch from DescendantIteratorAdapter::begin() when invoking for ContainerNode
3913         https://bugs.webkit.org/show_bug.cgi?id=120358
3914
3915         Reviewed by Andreas Kling.
3916
3917         * dom/ContainerNode.h:
3918         
3919             Delete isContainerNode() so it can't be called if there is static knowledge that the object is a ContainerNode.
3920
3921         * dom/DescendantIterator.h:
3922         (WebCore::::DescendantIterator):
3923
3924             Make DescendantIterator use Node* as root instead of ContainerNode*. It is only used for equality comparison.
3925
3926         (WebCore::::begin):
3927         
3928             Remove branch. Rely on ElementTraversal specialization for ContainerNodes.
3929
3930 2013-08-27  Joseph Pecoraro  <pecoraro@apple.com>
3931
3932         Web Inspector: Column Breakpoint not working, may be off by 1
3933         https://bugs.webkit.org/show_bug.cgi?id=120334
3934
3935         Reviewed by David Kilzer.
3936
3937         JavaScriptCore changed to 1-based column numbers at some point. We
3938         need to update the ScriptDebugger assumption that they were 0-based.
3939
3940         Test: inspector-protocol/debugger/column-breakpoint.html
3941
3942         * bindings/js/ScriptDebugServer.cpp:
3943         (WebCore::ScriptDebugServer::createCallFrame):
3944         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
3945
3946 2013-08-27  Antti Koivisto  <antti@apple.com>
3947
3948         Switch some more code to element child/descendant iterators
3949         https://bugs.webkit.org/show_bug.cgi?id=120355
3950
3951         Reviewed by Andreas Kling.
3952
3953         Move from Traversal<ElementType>::next() and Traversal<ElementType>::nextSibling() to iterators.
3954
3955         * css/CSSFontFaceSource.cpp:
3956         (WebCore::CSSFontFaceSource::getFontData):
3957         * dom/Document.cpp:
3958         (WebCore::Document::removeTitle):
3959         (WebCore::Document::updateBaseURL):
3960         (WebCore::Document::processBaseElement):
3961         * dom/TreeScope.cpp:
3962         (WebCore::TreeScope::labelElementForId):
3963         (WebCore::TreeScope::findAnchor):
3964         * html/HTMLFieldSetElement.cpp:
3965         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
3966         (WebCore::HTMLFieldSetElement::childrenChanged):
3967         * html/HTMLLabelElement.cpp:
3968         (WebCore::HTMLLabelElement::control):
3969         * html/HTMLMediaElement.cpp:
3970         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
3971         * html/HTMLObjectElement.cpp:
3972         (WebCore::HTMLObjectElement::parametersForPlugin):
3973         * rendering/FilterEffectRenderer.cpp:
3974         (WebCore::FilterEffectRenderer::buildReferenceFilter):
3975         * svg/SVGFilterPrimitiveStandardAttributes.h:
3976         (WebCore::isSVGFilterPrimitiveStandardAttributes):
3977         (WebCore::SVGFilterPrimitiveStandardAttributes):
3978         * svg/animation/SMILTimeContainer.cpp:
3979         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
3980         * svg/graphics/SVGImage.cpp:
3981         (WebCore::SVGImage::hasSingleSecurityOrigin):
3982
3983 2013-08-26  Andreas Kling  <akling@apple.com>
3984
3985         FocusController::focusedOrMainFrame() should return a reference.
3986         <https://webkit.org/b/120339>
3987
3988         Reviewed by Antti Koivisto.
3989
3990         Now that Page::mainFrame() returns a reference, we can make this return a reference
3991         too, since there's always either a focused or a main frame.
3992
3993         One hectogram of null checks removed as a result.
3994
3995 2013-08-26  Andreas Kling  <akling@apple.com>
3996
3997         Document's renderer is always a RenderView.
3998         <https://webkit.org/b/120304>
3999
4000         Reviewed by Darin Adler.
4001
4002         Let's enforce this better by storing a RenderView* instead of a plain RenderObject*.
4003         We should switch callers that grab at Document::renderer() to calling renderView()
4004         instead, but that's better done separately.
4005
4006         * dom/Document.cpp:
4007         (WebCore::Document::Document):
4008         (WebCore::Document::~Document):
4009         (WebCore::Document::setRenderView):
4010         (WebCore::Document::createRenderTree):
4011         (WebCore::Document::detach):
4012         (WebCore::Document::setInPageCache):
4013         * dom/Document.h:
4014         (WebCore::Document::renderView):
4015         (WebCore::Document::renderer):
4016         * html/parser/HTMLResourcePreloader.cpp:
4017         * rendering/RenderObject.cpp:
4018         (WebCore::RenderObject::setStyle):
4019         * rendering/RenderView.h:
4020         * svg/SVGSVGElement.cpp:
4021         (WebCore::SVGSVGElement::updateCurrentTranslate):
4022
4023 2013-08-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
4024
4025         Font's fast code path doesn't handle partial runs correctly when kerning or ligatures are enabled
4026         https://bugs.webkit.org/show_bug.cgi?id=100050
4027
4028         Reviewed by Darin Adler.
4029
4030         Renamed m_characterIndex to m_characterIndexOfGlyph and gave it an inline size of 10,
4031         which covers around 66% of all cases. The rest of the cases are now preallocated to the
4032         upper limit which is length of the original TextRun.
4033
4034         * platform/graphics/FontFastPath.cpp:
4035         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
4036         (WebCore::Font::selectionRectForSimpleText):
4037         (WebCore::Font::offsetForPositionForSimpleText):
4038         * platform/graphics/WidthIterator.cpp:
4039         (WebCore::WidthIterator::WidthIterator):
4040         (WebCore::WidthIterator::advanceInternal):
4041         * platform/graphics/WidthIterator.h:
4042