Resolve unused parameter warning in FindController.cpp
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
2
3         Resolve unused parameter warning in FindController.cpp
4         https://bugs.webkit.org/show_bug.cgi?id=120407
5
6         Reviewed by Darin Adler.
7
8         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
9         (wordAtPositionForAtkBoundary):
10
11 2013-08-30  Arpita Bahuguna  <a.bah@samsung.com>
12
13         setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
14         https://bugs.webkit.org/show_bug.cgi?id=120293
15
16         Reviewed by Darin Adler.
17
18         setAttributeNode() performs a case-insensitive search for an existing
19         attribute. If an existing attribute is found, it retrieves the index of
20         such an attribute. For setting the attribute's new value, we call upon
21         setAttributeInternal() to which both the index as well as the name of
22         the attribute is passed.
23         The name passed to this method is the same as the one passed to the
24         setAttributeNode() API from the webpage and thus can be in any case.
25
26         However, setAttributeInternal() uses this name to get the corresponding
27         existing attribute node. Since this retrieval is not case-insensitive,
28         the existing node is not returned and thus the new value is not set on
29         the existing node.
30         We should instead use the passed index and use that to retrieve the
31         existing node.
32
33         Note that obtaining the attribute's value using getAttributeNode() would
34         still return the correct value, i.e. the new one.
35
36         Also, this change shall make our behavior similar to that of FF and IE.
37
38         Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
39
40         * dom/Element.cpp:
41         (WebCore::Element::setAttributeInternal):
42         If the passed index is not equal to attributeNotFound, we use that index
43         to retrieve the existing attribute.
44
45 2013-08-30  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
46
47         SimpleClassVectorTraits shall be used for RuleData
48         https://bugs.webkit.org/show_bug.cgi?id=120526
49
50         Reviewed by Andreas Kling.
51
52         Whereas RuleData is POD type and whereas there are quite a lot of Vector<RuleData> occurrences in the code,
53         it makes sense to use SimpleClassVectorTraits for RuleData and hence to allow using more efficient mem functions
54         in vectors.
55
56         * css/RuleSet.h:
57
58 2013-08-30  Andreas Kling  <akling@apple.com>
59
60         Node::document() should return a reference.
61         <https://webkit.org/b/120496>
62
63         Reviewed by Antti Koivisto.
64
65         Now that orphan DocumentType nodes also have document pointers, it's no longer
66         possible to have a null Node::document().
67
68         Cement this by making document() return a reference, and remove the various
69         null checks exposed by this.
70
71 2013-08-30  Andrei Parvu  <parvu@adobe.com>
72
73         [CSS Masking] -webkit-mask-repeat: space does not work
74         Added the space option to background-repeat and -webkit-mask-repeat.
75         With the property value 'space', the background or mask image gets repeated as often as it fits within the background positioning
76         area. The repeated images are spaced equally to fill the unused area.
77         https://bugs.webkit.org/show_bug.cgi?id=119324
78
79         Reviewed by Dirk Schulze.
80
81         Tests: css3/background/background-repeat-space-border.html
82                css3/background/background-repeat-space-content.html
83                css3/background/background-repeat-space-padding.html
84                css3/masking/mask-repeat-space-border.html
85                css3/masking/mask-repeat-space-content.html
86                css3/masking/mask-repeat-space-padding.html
87
88         * platform/graphics/GeneratorGeneratedImage.cpp:
89         (WebCore::GeneratorGeneratedImage::drawPattern): Passed the space values to the image buffer.
90         * platform/graphics/Image.cpp:
91         (WebCore::Image::drawTiled): Added the space values when computing the location of the tile.
92         * platform/graphics/Image.h: Added the space property.
93         (WebCore::Image::spaceSize):
94         (WebCore::Image::setSpaceSize):
95         * platform/graphics/ImageBuffer.h: Added the space property.
96         (WebCore::ImageBuffer::spaceSize):
97         (WebCore::ImageBuffer::setSpaceSize):
98         * platform/graphics/cg/ImageBufferCG.cpp: Passed the space values when copying an image.
99         (WebCore::ImageBuffer::copyImage):
100         * platform/graphics/cg/ImageCG.cpp: Added the space values when creating a platform pattern.
101         (WebCore::Image::drawPattern):
102         * rendering/RenderBoxModelObject.cpp:
103         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Computed the space values on x and y axis.
104         (WebCore::getSpace):
105         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Pass the space values to the Image class.
106         * rendering/RenderBoxModelObject.h: Added the space property.
107         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
108         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
109         * svg/graphics/SVGImage.cpp: Passed the space property to the created image.
110         (WebCore::SVGImage::drawPatternForContainer):
111         * svg/graphics/SVGImageForContainer.cpp: Passed the space property to the image property.
112         (WebCore::SVGImageForContainer::drawPattern):
113
114 2013-08-30  Antti Koivisto  <antti@apple.com>
115
116         Remove AttachContext
117         https://bugs.webkit.org/show_bug.cgi?id=120518
118
119         Reviewed by Andreas Kling.
120
121         This type is not useful anymore. Just pass the precomputed style to attachRenderTree and reattach-or-not flag to detachRenderTree.
122
123         * style/StyleResolveTree.cpp:
124         (WebCore::Style::createRendererIfNeeded):
125         (WebCore::Style::attachChildren):
126         (WebCore::Style::attachShadowRoot):
127         (WebCore::Style::attachRenderTree):
128         (WebCore::Style::detachChildren):
129         (WebCore::Style::detachShadowRoot):
130         (WebCore::Style::detachRenderTree):
131         (WebCore::Style::reattachRenderTree):
132         (WebCore::Style::resolveLocal):
133         * style/StyleResolveTree.h:
134
135 2013-08-30  Commit Queue  <commit-queue@webkit.org>
136
137         Unreviewed, rolling out r154826.
138         http://trac.webkit.org/changeset/154826
139         https://bugs.webkit.org/show_bug.cgi?id=120517
140
141         Still breaks icloud.com (Requested by mwenge_ on #webkit).
142
143         * rendering/RenderBox.cpp:
144         (WebCore::RenderBox::computePositionedLogicalWidth):
145         (WebCore::RenderBox::computePositionedLogicalHeight):
146         * rendering/RenderBox.h:
147         (WebCore::RenderBox::intrinsicSize):
148         * rendering/RenderButton.h:
149         * rendering/RenderFileUploadControl.cpp:
150         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
151         * rendering/RenderListBox.cpp:
152         (WebCore::RenderListBox::RenderListBox):
153         (WebCore::RenderListBox::computePreferredLogicalWidths):
154         (WebCore::RenderListBox::computeLogicalHeight):
155         * rendering/RenderListBox.h:
156         * rendering/RenderMenuList.h:
157         * rendering/RenderSlider.cpp:
158         (WebCore::RenderSlider::computePreferredLogicalWidths):
159         * rendering/RenderTextControl.cpp:
160         (WebCore::RenderTextControl::RenderTextControl):
161         (WebCore::RenderTextControl::computeLogicalHeight):
162         * rendering/RenderTextControl.h:
163
164 2013-08-29  Ryosuke Niwa  <rniwa@webkit.org>
165
166         Unduplicate the code to convert between VisiblePosition and index
167         https://bugs.webkit.org/show_bug.cgi?id=120506
168
169         Reviewed by Darin Adler.
170
171         Encapsulate the conversion between VisiblePosition and index into indexForVisiblePosition
172         and visiblePositionForIndexUsingCharacterIterator. It's unfortunate that these two functions
173         are different from the two other existing functions of similar names but we've at least
174         confined problems into a single cpp file now.
175
176         * accessibility/AccessibilityRenderObject.cpp:
177         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
178         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
179         * editing/Editor.cpp:
180         (WebCore::findFirstMarkable):
181         * editing/htmlediting.cpp:
182         (WebCore::indexForVisiblePosition):
183         (WebCore::visiblePositionForIndexUsingCharacterIterator):
184         * editing/htmlediting.h:
185         * html/HTMLTextFormControlElement.cpp:
186         (WebCore::hasVisibleTextArea):
187         (WebCore::HTMLTextFormControlElement::setSelectionRange):
188         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
189         (WebCore::HTMLTextFormControlElement::visiblePositionForIndex):
190         * html/HTMLTextFormControlElement.h:
191         * rendering/RenderTextControl.cpp:
192         * rendering/RenderTextControl.h:
193
194 2013-08-29  Ryosuke Niwa  <rniwa@webkit.org>
195
196         Avoid Node references from AXObjectCache from leaking
197         https://bugs.webkit.org/show_bug.cgi?id=120501
198
199         Reviewed by Darin Adler.
200
201         Merge https://chromium.googlesource.com/chromium/blink/+/454f31497613b6d0fbcfb0df757254b64a177c06
202         without any tests since we don't have the same infrastructure to detect leaks in WebKit.
203
204         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. 
205
206         The issue was that AccessibilityMenuListOption is created in childrenChanged()
207         hook called when its RenderObject is being destroyed. This patch modifies AccessibilityMenuListPopup so it won't create AccessibilityMenuListOption if its
208         element is already detached.
209
210         * accessibility/AccessibilityMenuListPopup.cpp:
211         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
212         * rendering/RenderMenuList.cpp:
213         (WebCore::RenderMenuList::didUpdateActiveOption):
214
215 2013-08-26  Simon Fraser  <simon.fraser@apple.com>
216
217         Implement object-fit CSS property
218         https://bugs.webkit.org/show_bug.cgi?id=52040
219
220         Reviewed by Antti Koivisto, Sam Weinig.
221         
222         Merge object-fit patch from Blink r156535, which started as a patch
223         by me.
224
225         Since then, the spec has gone to CR. This patch is an
226         implementation of object-fit as described in
227         http://www.w3.org/TR/2012/CR-css3-images-20120417/#object-fit
228
229         Object-fit is used to maintain the aspect ratio of replaced content
230         within its content box. All object-fit values but the initial one
231         ('fill') will always ensure that the aspect ratio is retained, in
232         different ways (fit inside the content box, cover the content box, or
233         use intrinsic size). Painting is always clipped against the content
234         box, regardless of the 'overflow' property.
235
236         Tests: fast/css/object-fit/object-fit-canvas.html
237                fast/css/object-fit/object-fit-embed.html
238                fast/css/object-fit/object-fit-grow-landscape.html
239                fast/css/object-fit/object-fit-grow-portrait.html
240                fast/css/object-fit/object-fit-img-svg.html
241                fast/css/object-fit/object-fit-img-svg2.html
242                fast/css/object-fit/object-fit-img.html
243                fast/css/object-fit/object-fit-input-image.html
244                fast/css/object-fit/object-fit-object.html
245                fast/css/object-fit/object-fit-shrink.html
246                fast/css/object-fit/object-fit-video-poster.html
247                fast/css/parsing-object-fit.html
248                http/tests/css/object-fit-delayed-img-svg.html
249                media/video-object-fit-change.html
250                media/video-object-fit.html
251
252         * css/CSSComputedStyleDeclaration.cpp:
253         (WebCore::ComputedStyleExtractor::propertyValue):
254         * css/CSSParser.cpp:
255         (WebCore::isValidKeywordPropertyAndValue):
256         (WebCore::isKeywordPropertyID):
257         (WebCore::CSSParser::parseValue):
258         * css/CSSPrimitiveValueMappings.h:
259         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
260         (WebCore::CSSPrimitiveValue::operator EObjectFit):
261         * css/CSSProperty.cpp:
262         (WebCore::CSSProperty::isInheritedProperty):
263         * css/CSSPropertyNames.in:
264         * css/CSSValueKeywords.in:
265         * css/DeprecatedStyleBuilder.cpp:
266         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
267         * css/StyleResolver.cpp:
268         (WebCore::StyleResolver::applyProperty):
269         * css/html.css:
270         (video): Set object-fit to 'contain'. This is how VIDEO elements
271         work, apparently.
272         * loader/cache/CachedImage.cpp:
273         (WebCore::CachedImage::imageSizeForRenderer):
274         * loader/cache/CachedImage.h:
275         * platform/graphics/LayoutSize.h:
276         (WebCore::fitLayoutSizeToAspectRatio): New function to grow or shrink
277         in one dimension to fit to the aspect ratio.
278         * rendering/RenderHTMLCanvas.cpp:
279         (WebCore::RenderHTMLCanvas::paintReplaced): Apply object-fit and
280         clip if necessary.
281         * rendering/RenderImage.cpp:
282         (WebCore::RenderImage::updateInnerContentRect):
283         (WebCore::RenderImage::imageDimensionsChanged): Update intrinsic
284         size properly, and recalculate the inner content rectangle (the
285         exact area occupied by the replaced content) again if appropriate.
286         (WebCore::RenderImage::paintReplaced): Apply object-fit and clip
287         if necessary.
288         (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
289         object-fit may leave parts of the content box empty, in which case
290         it won't be fully obscured.
291         (WebCore::RenderImage::layout):
292         * rendering/RenderImage.h:
293         * rendering/RenderImageResource.cpp:
294         (WebCore::RenderImageResource::intrinsicSize): Need this to
295         differentiate between intrinsic and extrinsic size for SVG images.
296         * rendering/RenderImageResource.h:
297         * rendering/RenderImageResourceStyleImage.h:
298         * rendering/RenderReplaced.cpp:
299         (WebCore::RenderReplaced::replacedContentRect): Return the
300         rectangle occupied by the replaced content. This will be identical
301         to the content box if object-fit is 'fill', but will typically be
302         something else for other values.
303         * rendering/RenderReplaced.h:
304         * rendering/RenderVideo.cpp:
305         (WebCore::RenderVideo::videoBox): Not much left to do here, with
306         the new RenderReplaced::replacedContentRect() method in place.
307         (WebCore::RenderVideo::paintReplaced): Apply object-fit and clip
308         if necessary.
309         * rendering/style/RenderStyle.cpp:
310         (WebCore::RenderStyle::changeRequiresRepaint):
311         * rendering/style/RenderStyle.h:
312         * rendering/style/RenderStyleConstants.h:
313         * rendering/style/StyleRareNonInheritedData.cpp:
314         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
315         (WebCore::StyleRareNonInheritedData::operator==):
316         * rendering/style/StyleRareNonInheritedData.h:
317
318 2013-08-29  Tim Horton  <timothy_horton@apple.com>
319
320         SVG clipping, masking, and gradients-on-text do not respect the device scale factor
321         https://bugs.webkit.org/show_bug.cgi?id=120377
322         <rdar://problem/14777944>
323
324         Reviewed by Simon Fraser.
325
326         Tests: svg/custom/masking-clipping-hidpi.svg
327
328         calculateTransformationToOutermostCoordinateSystem should include the page's
329         device scale factor in its transform.
330
331         * rendering/svg/SVGRenderingContext.cpp:
332         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
333
334 2013-08-29  Chris Fleizach  <cfleizach@apple.com>
335
336         AX: Crash when VoiceOver reference a TextMarker from an iframe that has been removed
337         https://bugs.webkit.org/show_bug.cgi?id=120318
338
339         Reviewed by Darin Adler.
340
341         These crashes occur because an AXTextMarker is retrieved that reference a Node in an iframe.
342         The iframe goes away, but when it tries to clean up and remove that Node from the InUse cache,
343         the document() tree has already been detached, so it never clears the actual InUse cache.
344
345         The fix here is to pre-emptively clean up any nodes in the document going away when the frame is about to disconnect.
346
347         I'm removing the clearAXObjectCache() at the disconnectOwnerElement because it 
348            1) Cleared the AXObjectCache for the iframe document (which is always empty -- only the top level doc maintains the cache), because
349                 the document() tree had already been detached... so it essentially did nothing.
350            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
351                the other documents (there's even an existing layout test to verify this behavior).
352
353         Test: platform/mac/accessibility/stale-textmarker-crash.html
354
355         * accessibility/AXObjectCache.cpp:
356         (WebCore::AXObjectCache::clearTextMarkerNodesInUse):
357         * accessibility/AXObjectCache.h:
358         * page/Frame.cpp:
359         (WebCore::Frame::disconnectOwnerElement):
360
361 2013-08-29  Brent Fulgham  <bfulgham@apple.com>
362
363         [Windows] More unreviewed gardening of project file.
364         Move css files inline with related source code.
365
366         * WebCore.vcxproj/WebCore.vcxproj:
367         * WebCore.vcxproj/WebCore.vcxproj.filters:
368
369 2013-08-29  Sam Weinig  <sam@webkit.org>
370
371         Add ENABLE guards for Promises
372         https://bugs.webkit.org/show_bug.cgi?id=120488
373
374         Reviewed by Andreas Kling.
375
376         * Configurations/FeatureDefines.xcconfig:
377
378 2013-08-29  Andreas Kling  <akling@apple.com>
379
380         Inspector: Use a bit of RefPtr::release() in generated code.
381         <https://webkit.org/b/120485>
382
383         Reviewed by Darin Adler.
384
385         Just something I spotted while reading InspectorBackendDispatcher.cpp.
386         Avoid 3 cases of reference count churnery.
387
388         * inspector/CodeGeneratorInspectorStrings.py:
389
390 2013-08-29  Christophe Dumez  <ch.dumez@sisa.samsung.com>
391
392         According to DOM4, all DocType nodes should have a document
393         https://bugs.webkit.org/show_bug.cgi?id=99244
394
395         Reviewed by Darin Adler.
396
397         Doctypes now always have a node document and can be moved across document boundaries as per
398         the latest DOM4 specification:
399         http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
400         http://dom.spec.whatwg.org/#dom-node-ownerdocument
401
402         This means that DOMImplementation.createDocumentType() now sets the ownerDocument of the
403         new DocumentType Node to the associated document of the current "context" object. In
404         DOM4, all nodes have a document at all times. DocumentType nodes can now be moved across
405         document boundaries so that the node can be added to a Document after being created.
406
407         This means we will no longer need to special case DocumentType nodes in the code and
408         Node::document() can no longer return NULL, which means that we'll be able to remove
409         NULL checks in call sites.
410
411         Firefox stable and since recently Blink already follow DOM4 here while IE10 does not (yet).
412
413         Test: fast/dom/createDocumentType-ownerDocument.html
414
415         * dom/ContainerNode.cpp:
416         (WebCore::checkAcceptChild):
417         * dom/DOMImplementation.cpp:
418         (WebCore::DOMImplementation::createDocumentType):
419         (WebCore::DOMImplementation::createDocument):
420         * dom/Node.h:
421         (WebCore::Node::document):
422
423 2013-08-29  Darin Adler  <darin@apple.com>
424
425         Pasteboard::writeSelection violates layering (first step, fixes it for Mac platform only)
426         https://bugs.webkit.org/show_bug.cgi?id=120483
427
428         Reviewed by Anders Carlsson.
429
430         * editing/Editor.cpp:
431         (WebCore::Editor::cut): Added some comments. Use the new writeSelectionToPasteboard
432         function on Mac instead of Pasteboard::writeSelection.
433         (WebCore::Editor::copy): Ditto.
434
435         * editing/Editor.h: Removed an old unused Mac-only writeSelectionToPasteboard function
436         that was a cover that called through to Pasteboard::writeSelectionForTypes. Added a new
437         Mac-only writeSelectionToPasteboard function that is destined to become cross-platform soon.
438
439         * editing/mac/EditorMac.mm:
440         (WebCore::Editor::writeSelectionToPasteboard): Added. Uses a new pattern where the Editor
441         puts all the data into a structure called PasteboardWebContent then calls the Pasteboard to
442         do the work. The platform-specific aspect of PasteboardWebContent is what formats are needed
443         for each platform.
444
445         * page/DragController.cpp:
446         (WebCore::DragController::startDrag): Added some comments. Use the new writeSelectionToPasteboard
447         function on Mac instead of Pasteboard::writeSelection.
448
449         * platform/Pasteboard.h: Remove some unneeded forward declarations. Added comments for all functions
450         that don't belong in this class because they are layering violations; this becomes the to do list for
451         the project we are beginning here. Added the new PasteboardWebContent structure, empty on all platforms
452         except for Mac for now. Removed writeSelectionForTypes, a Mac-only function that is no longer used.
453         Added setTypes and writeAfterSettingTypes, the two halves of the future function named writeWebContent.
454         Put the writeSelection function inside a "not Mac" if statement. Later to be deleted entirely.
455
456         * platform/mac/PasteboardMac.mm: Removed now-unneeded selectionPasteboardTypes,
457         Pasteboard::writeSelectionForTypes, and writeSelection functions.
458         (WebCore::Pasteboard::setTypes): Added. First half of writing web content to the pasteboard.
459         (WebCore::Pasteboard::writeAfterSettingTypes): Added. Second half of writing web content to the pasteboard.
460
461 2013-08-29  Antti Koivisto  <antti@apple.com>
462
463         Remove code behind ENABLE(DIALOG_ELEMENT)
464         https://bugs.webkit.org/show_bug.cgi?id=120467
465
466         Reviewed by Darin Adler.
467
468         It is incomplete and no one is building it.
469
470         * CMakeLists.txt:
471         * Configurations/FeatureDefines.xcconfig:
472         * DerivedSources.make:
473         * DerivedSources.pri:
474         * GNUmakefile.list.am:
475         * Target.pri:
476         * WebCore.exp.in:
477         * WebCore.xcodeproj/project.pbxproj:
478         * bindings/generic/RuntimeEnabledFeatures.cpp:
479         * bindings/generic/RuntimeEnabledFeatures.h:
480         * css/StyleResolver.cpp:
481         (WebCore::StyleResolver::adjustRenderStyle):
482         * css/html.css:
483         * dom/ContextFeatures.cpp:
484         * dom/ContextFeatures.h:
485         * dom/Document.cpp:
486         * dom/Document.h:
487         * dom/Element.cpp:
488         (WebCore::Element::removedFrom):
489         (WebCore::Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries):
490         * dom/Element.h:
491         (WebCore::Element::isDisabledFormControl):
492         * dom/ElementRareData.h:
493         (WebCore::ElementRareData::ElementRareData):
494         * html/HTMLDialogElement.cpp: Removed.
495         * html/HTMLDialogElement.h: Removed.
496         * html/HTMLDialogElement.idl: Removed.
497         * html/HTMLElementsAllInOne.cpp:
498         * html/HTMLTagNames.in:
499         * rendering/RenderDialog.cpp: Removed.
500         * rendering/RenderDialog.h: Removed.
501         * rendering/RenderLayer.cpp:
502         (WebCore::RenderLayer::rebuildZOrderLists):
503         (WebCore::RenderLayer::collectLayers):
504         * rendering/RenderLayer.h:
505         * rendering/RenderObject.h:
506         (WebCore::RenderObject::isCounter):
507         * rendering/RenderingAllInOne.cpp:
508         * testing/InternalSettings.cpp:
509         (WebCore::InternalSettings::Backup::Backup):
510         (WebCore::InternalSettings::Backup::restoreTo):
511         * testing/InternalSettings.h:
512
513 2013-08-29  Simon Fraser  <simon.fraser@apple.com>
514
515         Fix slider thumb event handling to use local, not absolute coordinates
516         https://bugs.webkit.org/show_bug.cgi?id=120480
517
518         Reviewed by Darin Adler.
519         
520         SliderThumbElement::setPositionFromPoint() did all of its coordinate
521         math by mapping renderer rects into absolute coordinates, which was
522         unnecessary and expensive.
523         
524         Fix by doing all the math in the coordinate space of the input's
525         renderer. This simplified the code. Also, currentPosition
526         was computed but unused, so was removed.
527
528         No behavior change. Tested by fast/forms/range/slider-transformed.html
529
530         * html/shadow/SliderThumbElement.cpp:
531         (WebCore::SliderThumbElement::setPositionFromPoint):
532
533 2013-08-29  Zan Dobersek  <zdobersek@igalia.com>
534
535         [Automake] libWebCoreDOM.la could use a better name
536         https://bugs.webkit.org/show_bug.cgi?id=120232
537
538         Reviewed by Martin Robinson.
539
540         * bindings/gobject/GNUmakefile.am: Rename the libWebCoreDOM library to libGObjectDOMBindings.
541
542 2013-08-29  Joseph Pecoraro  <pecoraro@apple.com>
543
544         Web Inspector: Download Web Archive of Inspected Page
545         https://bugs.webkit.org/show_bug.cgi?id=119774
546
547         Reviewed by Timothy Hatcher.
548
549         Add PageAgent.archive which will return a Base-64 encoded web archive
550         when successful. In order to then allow saving non-string files, extend
551         InspectorFrontendHost.save to allow for Base-64 encoded data.
552
553         * inspector/Inspector.json:
554         * inspector/InspectorPageAgent.cpp:
555         (WebCore::InspectorPageAgent::archive):
556         * inspector/InspectorPageAgent.h:
557         Introduce and implement PageAgent.archive. Create a Web Archive of the
558         page's main frame.
559
560         * inspector/InspectorFrontendClient.h:
561         * inspector/InspectorFrontendClientLocal.h:
562         (WebCore::InspectorFrontendClientLocal::save):
563         * inspector/InspectorFrontendHost.cpp:
564         (WebCore::InspectorFrontendHost::save):
565         * inspector/InspectorFrontendHost.h:
566         * inspector/InspectorFrontendHost.idl:
567         Extend InspectorFrontendHost.save to include a base64Encoded param.
568
569         * inspector/front-end/FileManager.js:
570         * inspector/front-end/InspectorFrontendHostStub.js:
571         (.WebInspector.InspectorFrontendHostStub.prototype.save):
572         Misc. updates to the old inspector for function changes.
573
574 2013-08-29  Robert Hogan  <robert@webkit.org>
575
576         Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
577         https://bugs.webkit.org/show_bug.cgi?id=93735
578
579         Reviewed by David Hyatt.
580
581         Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an 
582         intrinsic height or width. This causes them to go down the wrong height and width computation
583         path in RenderBox when they are absolute positioned. 
584         
585         The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really 
586         possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
587         of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
588         To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
589         the helpers for returning their approximation of intrinsic height and width.
590
591         The initial attempt at landing this patch had to be rolled out because it used LayoutUnit() for default
592         intrinsic height of some replaced elements and this made the layout of the elements unstable in some sites.
593         The fix for this issue is captured in intrinsic-button-and-input-height.html.
594
595         Tests: fast/replaced/intrinsic-button-and-input-height.html
596                fast/replaced/width-and-height-of-positioned-replaced-elements.html
597
598         * rendering/RenderBox.cpp:
599         (WebCore::isReplacedElement):
600         (WebCore::RenderBox::computePositionedLogicalWidth):
601         (WebCore::RenderBox::computePositionedLogicalHeight):
602         * rendering/RenderBox.h:
603         (WebCore::RenderBox::intrinsicSize):
604         * rendering/RenderButton.h:
605         * rendering/RenderFileUploadControl.cpp:
606         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
607         * rendering/RenderListBox.cpp:
608         (WebCore::RenderListBox::RenderListBox):
609         (WebCore::RenderListBox::computePreferredLogicalWidths):
610         (WebCore::RenderListBox::computeLogicalHeight):
611         * rendering/RenderListBox.h:
612         * rendering/RenderMenuList.h:
613         * rendering/RenderReplaced.h:
614         * rendering/RenderSlider.cpp:
615         (WebCore::RenderSlider::computePreferredLogicalWidths):
616         * rendering/RenderTextControl.cpp:
617         (WebCore::RenderTextControl::RenderTextControl):
618         (WebCore::RenderTextControl::computeLogicalHeight):
619         * rendering/RenderTextControl.h:
620
621 2013-08-29  Brent Fulgham  <bfulgham@apple.com>
622
623         [Windows] Unreviewed gardening. Add missing *.css files from project.
624
625         * WebCore.vcxproj/WebCore.vcxproj:
626         * WebCore.vcxproj/WebCore.vcxproj.filters:
627
628 2013-08-29  Pratik Solanki  <pratik.solanki@gmail.com>
629
630         SharedBuffer m_segments and m_dataArray must be exclusive
631         https://bugs.webkit.org/show_bug.cgi?id=77715
632
633         Reviewed by Benjamin Poulain.
634
635         When USE(NETWORK_CFDATA_ARRAY_CALLBACK) is enabled, we use m_dataArray to hold the incoming
636         data. We do not use m_segments. Since they are exclusive in practice, do not define or use
637         m_segments when NETWORK_CFDATA_ARRAY_CALLBACK is enabled.
638
639         No new tests because no functional changes.
640
641         * platform/SharedBuffer.cpp:
642         (WebCore::SharedBuffer::append):
643         (WebCore::SharedBuffer::clear):
644         (WebCore::SharedBuffer::copy):
645         (WebCore::SharedBuffer::buffer):
646         (WebCore::SharedBuffer::getSomeData):
647         * platform/SharedBuffer.h:
648
649 2013-08-29  Daniel Bates  <dabates@apple.com>
650
651         [iOS] Upstream changes to WebCore/style
652         https://bugs.webkit.org/show_bug.cgi?id=120173
653
654         Reviewed by Darin Adler.
655
656         * style/StyleResolveTree.cpp:
657         (WebCore::Style::elementImplicitVisibility): Added; specific to iOS.
658         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
659         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
660         (WebCore::Style::resolveTree): Modified to instantiate CheckForVisibilityChangeOnRecalcStyle when building on iOS.
661
662 2013-08-29  Arnaud Renevier  <a.renevier@samsung.com>
663
664         [cairo] canvas drawing on itself doesn't work with accelerated canvas
665         https://bugs.webkit.org/show_bug.cgi?id=118808
666
667         Reviewed by Martin Robinson.
668
669         When copying an accelerated image, we try to get its dimensions with
670         cairo_image_surface_get_width/cairo_image_surface_get_height. As
671         surface is not an image, this returns width and height of 0.
672
673         Many other places use cairo_image_surface_get although the surface may
674         be a gl surface. 
675         
676         This patch fixes those issues by implementing a cairoSurfaceSize
677         helper that returns the surface size whatever type it is.
678
679         It use cairo_surface_create_similar instead of
680         cairo_image_surface_create in copyCairoImageSurface. It also calls
681         cairo_paint in encodeImage when a drawing over a black background is
682         needed.
683
684         It copies the surface to an image surface if needed in extractImage.
685
686         No new tests. Covered by existing tests.
687
688         * platform/graphics/cairo/BitmapImageCairo.cpp:
689         (WebCore::BitmapImage::BitmapImage):
690         (WebCore::BitmapImage::draw):
691         (WebCore::BitmapImage::checkForSolidColor):
692         * platform/graphics/cairo/CairoUtilities.cpp:
693         (WebCore::copyCairoImageSurface):
694         (WebCore::cairoSurfaceSize):
695         * platform/graphics/cairo/CairoUtilities.h:
696         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
697         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
698         * platform/graphics/gtk/GdkCairoUtilities.cpp:
699         (cairoSurfaceToGdkPixbuf):
700         * platform/graphics/gtk/GdkCairoUtilities.h:
701         * platform/graphics/gtk/ImageBufferGtk.cpp:
702         (WebCore::encodeImage):
703         * platform/graphics/gtk/ImageGtk.cpp:
704         (WebCore::BitmapImage::getGdkPixbuf):
705         * platform/gtk/DragIcon.cpp:
706         (WebCore::DragIcon::setImage):
707
708 2013-08-29  Tamas Czene  <tczene@inf.u-szeged.hu>
709
710         Buildfix after r154806 for !ENABLE(CSS_REGIONS) platforms.
711         https://bugs.webkit.org/show_bug.cgi?id=120461
712
713         Reviewed by Csaba Osztrogon√°c.
714
715         moveToFlowThreadIfNeeded() is used only inside of ENABLE(CSS_REGIONS)
716         block (and only once), so it should be guarded too.
717
718         * style/StyleResolveTree.cpp:
719
720 2013-08-29  David Kilzer  <ddkilzer@apple.com>
721
722         BUILD FIX (r154778): AXSearchFieldCancelButtonText() is not defined on iOS
723
724         See: AX: Cancel button in search field not accessible.
725         <https://webkit.org/b/120322>
726
727         Fixes the following build error:
728
729             In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:44:
730             Source/WebCore/accessibility/AccessibilitySearchFieldButtons.cpp:46:12: error: use of undeclared identifier 'AXSearchFieldCancelButtonText'
731                 return AXSearchFieldCancelButtonText();
732                        ^
733             1 error generated.
734
735         * accessibility/AccessibilitySearchFieldButtons.cpp:
736         (WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
737         Return String() instead of calling AXSearchFieldCancelButtonText() on iOS.
738
739 2013-08-29  Antti Koivisto  <antti@apple.com>
740
741         Remove NodeRenderingContext
742         https://bugs.webkit.org/show_bug.cgi?id=120466
743
744         Reviewed by Andreas Kling.
745
746         Switch the few remaining clients of this class to call the underlying code directly.
747
748         * CMakeLists.txt:
749         * GNUmakefile.list.am:
750         * Target.pri:
751         * WebCore.exp.in:
752         * WebCore.vcxproj/WebCore.vcxproj:
753         * WebCore.xcodeproj/project.pbxproj:
754         * css/StyleResolver.cpp:
755         (WebCore::StyleResolver::State::initForStyleResolve):
756         * dom/DOMAllInOne.cpp:
757         * dom/Node.cpp:
758         * dom/Node.h:
759         
760             Remove Node::parentNodeForRenderingAndStyle(). Make clients invoke NodeRenderingTraversal::parent() directly.
761
762         * dom/NodeRenderingContext.cpp: Removed.
763         * dom/NodeRenderingContext.h: Removed.
764         * dom/ShadowRoot.h:
765         * dom/Text.cpp:
766         * dom/Text.h:
767         * dom/TreeScope.cpp:
768         * dom/TreeScope.h:
769             
770             Remove virtual TreeScope::resetStyleInheritance. Make clients cast to ShadowRoot when needed.
771
772         * html/HTMLSummaryElement.cpp:
773         (WebCore::HTMLSummaryElement::detailsElement):
774         * style/StyleResolveTree.cpp:
775         (WebCore::Style::createTextRendererIfNeeded):
776         
777             For consistency switch resetStyleInheritance check to use parentNode() instead of renderingParentNode. This matches the NodeRenderingTraversal implementation.
778             This difference is probably not testable in current trunk.
779
780         (WebCore::Style::resolveTree):
781
782 2013-08-29  Antti Koivisto  <antti@apple.com>
783
784         Move element renderer creation out of NodeRenderingContext
785         https://bugs.webkit.org/show_bug.cgi?id=120461
786
787         Reviewed by Andreas Kling.
788
789         Move NodeRenderingContext::createRendererIfNeeded() and the related utility functions to StyleResolveTree.
790         
791         Tighten typing and constness. Refactor sligthly to be more understandable.
792
793         * dom/Element.cpp:
794         (WebCore::Element::shouldMoveToFlowThread):
795         * dom/Element.h:
796         * dom/NodeRenderingContext.cpp:
797         (WebCore::NodeRenderingContext::NodeRenderingContext):
798         (WebCore::NodeRenderingContext::nextRenderer):
799         (WebCore::NodeRenderingContext::previousRenderer):
800         (WebCore::NodeRenderingContext::parentRenderer):
801         * dom/NodeRenderingContext.h:
802         * dom/PseudoElement.h:
803         * style/StyleResolveTree.cpp:
804         (WebCore::Style::nextSiblingRenderer):
805         (WebCore::Style::shouldCreateRenderer):
806         (WebCore::Style::elementInsideRegionNeedsRenderer):
807         (WebCore::Style::moveToFlowThreadIfNeeded):
808         (WebCore::Style::createRendererIfNeeded):
809         (WebCore::Style::attachRenderTree):
810         * svg/SVGElement.cpp:
811         (WebCore::SVGElement::shouldMoveToFlowThread):
812         * svg/SVGElement.h:
813
814 2013-08-28  Chris Fleizach  <cfleizach@apple.com>
815
816         AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 27
817         https://bugs.webkit.org/show_bug.cgi?id=120434
818
819         Reviewed by Darin Adler.
820
821         Crash logs indicate that there's a null pointer access in rootObject. That seems like it could only
822         happen in Document was null. 
823
824         Unfortunately, there are no reproducible steps and no other information to construct a test case.
825
826         * accessibility/AXObjectCache.cpp:
827         (WebCore::AXObjectCache::rootObject):
828
829 2013-08-28  Ryosuke Niwa  <rniwa@webkit.org>
830
831         The code to look for an ancestor form element is duplicated in three different places
832         https://bugs.webkit.org/show_bug.cgi?id=120391
833
834         Reviewed by Darin Adler.
835
836         Unduplicated the code by putting a single implementation in HTMLFormElement.cpp.
837
838         * WebCore.order:
839         * html/FormAssociatedElement.cpp:
840         (WebCore::FormAssociatedElement::findAssociatedForm):
841         (WebCore::FormAssociatedElement::formAttributeChanged):
842         * html/HTMLElement.cpp:
843         (WebCore::HTMLElement::virtualForm):
844         * html/HTMLElement.h:
845         * html/HTMLFormControlElement.cpp:
846         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
847         * html/HTMLFormElement.cpp:
848         (WebCore::HTMLFormElement::findClosestFormAncestor):
849         * html/HTMLFormElement.h:
850         * html/HTMLImageElement.cpp:
851         (WebCore::HTMLImageElement::insertedInto):
852         * html/HTMLObjectElement.cpp:
853         (WebCore::HTMLObjectElement::HTMLObjectElement):
854         * html/parser/HTMLTreeBuilder.cpp:
855         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
856
857 2013-08-28  Ryosuke Niwa  <rniwa@webkit.org>
858
859         Stop throwing DOM exceptions in internal 'XMLHttpRequest' response getters
860         https://bugs.webkit.org/show_bug.cgi?id=120446
861
862         Reviewed by Alexey Proskuryakov.
863
864         Merge https://chromium.googlesource.com/chromium/blink/+/c8188c21452501b68950a9fcc1f5cbc7b4de4df5
865
866         Unlike 'responseText' and 'responseXML', 'responseBlob' and
867         'responseArrayBuffer' are not exposed to JavaScript (they don't
868         appear in the IDL or in the specification). As they are only called from
869         custom bindings in response to a JavaScript call to the 'response' getter,
870         we can safely replace the exception-throwing code in the implementation
871         with an ASSERT that the request type is correct.
872
873         * bindings/js/JSXMLHttpRequestCustom.cpp:
874         (WebCore::JSXMLHttpRequest::response):
875         * xml/XMLHttpRequest.cpp:
876         (WebCore::XMLHttpRequest::responseBlob):
877         (WebCore::XMLHttpRequest::responseArrayBuffer):
878         * xml/XMLHttpRequest.h:
879
880 2013-08-28  Chris Curtis  <chris_curtis@apple.com>
881
882         https://bugs.webkit.org/show_bug.cgi?id=119548
883         Refactoring Exception throws.
884         
885         Reviewed by Geoffrey Garen.
886         
887         Gets column information from the error object for reporting exceptions.
888         * bindings/js/JSDOMBinding.cpp:
889         (WebCore::reportException): 
890         * bindings/js/ScriptCallStackFactory.cpp: 
891         (WebCore::createScriptCallStackFromException):
892  
893         Moved setting an exception into the vm, These functions changed to use the new functionality.
894  
895         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
896         (WebCore::JSAudioBufferSourceNode::setBuffer):
897         * bindings/js/JSBiquadFilterNodeCustom.cpp:
898         (WebCore::JSBiquadFilterNode::setType):
899         * bindings/js/JSCryptoCustom.cpp:
900         (WebCore::JSCrypto::getRandomValues):
901         * bindings/js/JSDOMBinding.cpp:
902         (WebCore::setDOMException):
903         * bindings/js/JSInjectedScriptHostCustom.cpp:
904         (WebCore::JSInjectedScriptHost::setFunctionVariableValue):
905         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
906         (WebCore::JSJavaScriptCallFrame::evaluate):
907         (WebCore::JSJavaScriptCallFrame::setVariableValue):
908         * bindings/js/JSNodeFilterCondition.cpp:
909         (WebCore::JSNodeFilterCondition::acceptNode):
910         * bindings/js/JSOscillatorNodeCustom.cpp:
911         (WebCore::JSOscillatorNode::setType):
912         * bindings/js/JSPannerNodeCustom.cpp:
913         (WebCore::JSPannerNode::setPanningModel):
914         (WebCore::JSPannerNode::setDistanceModel):
915         * bindings/js/JSSVGLengthCustom.cpp:
916         (WebCore::JSSVGLength::convertToSpecifiedUnits):
917         * bindings/js/JSWebGLRenderingContextCustom.cpp:
918         (WebCore::getObjectParameter):
919         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
920         (WebCore::JSWebGLRenderingContext::getExtension):
921         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
922         (WebCore::JSWebGLRenderingContext::getParameter):
923         (WebCore::JSWebGLRenderingContext::getProgramParameter):
924         (WebCore::JSWebGLRenderingContext::getShaderParameter):
925         (WebCore::JSWebGLRenderingContext::getUniform):
926         (WebCore::dataFunctionf):
927         (WebCore::dataFunctioni):
928         (WebCore::dataFunctionMatrix):
929         * bindings/js/JSXMLHttpRequestCustom.cpp:
930         (WebCore::JSXMLHttpRequest::open):
931         * bindings/js/SerializedScriptValue.cpp:
932         (WebCore::CloneBase::throwStackOverflow):
933         (WebCore::CloneDeserializer::throwValidationError):
934         (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
935         * bindings/js/WorkerScriptController.cpp:
936         (WebCore::WorkerScriptController::evaluate):
937         (WebCore::WorkerScriptController::setException):
938         * bridge/c/c_instance.cpp:
939         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
940         (JSC::Bindings::CInstance::invokeMethod):
941         (JSC::Bindings::CInstance::invokeDefaultMethod):
942         (JSC::Bindings::CInstance::invokeConstruct):
943         (JSC::Bindings::CInstance::toJSPrimitive):
944         * bridge/objc/objc_instance.mm:
945         (ObjcInstance::invokeMethod):
946         * bridge/objc/objc_runtime.mm:
947         (JSC::Bindings::ObjcArray::setValueAt):
948         (JSC::Bindings::ObjcArray::valueAt):
949         * bridge/objc/objc_utility.mm:
950         (JSC::Bindings::throwError):
951         * bridge/qt/qt_instance.cpp:
952         (JSC::Bindings::QtField::valueFromInstance):
953         (JSC::Bindings::QtField::setValueToInstance):
954         * bridge/runtime_array.cpp:
955         (JSC::RuntimeArray::put):
956         (JSC::RuntimeArray::putByIndex):
957         * bridge/runtime_object.cpp:
958         (JSC::Bindings::RuntimeObject::throwInvalidAccessError):
959
960 2013-08-28  Alexey Proskuryakov  <ap@apple.com>
961
962         Remove an unused data member from Page.
963
964         Rubber-stamped by Brady Eidson.
965
966         * page/Page.cpp:
967         * page/Page.h:
968         Removed m_cookieEnabled. This was completely dead code, long obsoleted by PageSettings.
969
970 2013-08-28  Gustavo Noronha Silva  <gns@gnome.org>
971
972         Unreviewed build fix - copy/paste failure, copied too much.
973
974         * bindings/gobject/WebKitDOMCustom.h:
975
976 2013-08-28  Dean Jackson  <dino@apple.com>
977
978         [WebGL] CoreGraphics can provide greyscale image data
979         https://webkit.org/b/120443
980
981         Reviewed by Simon Fraser.
982
983         CoreGraphics can decode greyscale or greyscale+alpha images
984         while preserving the format. Our WebGL texture unpacker
985         was seeing this and assuming it meant the data did not come
986         from an <img> element. Since that method already special cased
987         CoreGraphics, the fix was to simply return true for these
988         extra types.
989
990         I also renamed srcFormatComeFromDOMElementOrImageData
991         to srcFormatComesFromDOMElementOrImageData.
992
993         Test: fast/canvas/webgl/tex-image-with-greyscale-image.html
994
995         * platform/graphics/GraphicsContext3D.cpp: Call new name.
996         * platform/graphics/GraphicsContext3D.h:
997         (WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData):
998         Add support for R8, AR8, A8, and RA8 data formats.
999
1000 2013-08-28  Gustavo Noronha Silva  <gns@gnome.org>
1001
1002         [GTK] HTMLElement lost setID and getID - need to add compatibility symbols
1003         https://bugs.webkit.org/show_bug.cgi?id=120440
1004
1005         Reviewed by Martin Robinson.
1006
1007         No tests, just adding compatibility symbols.
1008
1009         setID and getID were removed, and the parent class (Element) ones should be used instead.
1010         We need to keep our ABI compatible, though, so add compatibility symbols.
1011
1012         * bindings/gobject/WebKitDOMCustom.cpp:
1013         (webkit_dom_html_element_get_id):
1014         (webkit_dom_html_element_set_id):
1015         * bindings/gobject/WebKitDOMCustom.h:
1016
1017 2013-08-28  Simon Fraser  <simon.fraser@apple.com>
1018
1019         Fix compositing layers in columns
1020         https://bugs.webkit.org/show_bug.cgi?id=120436
1021
1022         Reviewed by Dave Hyatt.
1023         
1024         Remove the old hack in RenderLayer::updateLayerPosition() for placing
1025         layers in columns, which changed the layer position for composited
1026         layers; this broke hit-testing.
1027         
1028         Fix a better way by moving compositing layers to the correct
1029         positions that take column offsets into account, by fixing
1030         RenderLayer::convertToLayerCoords() to optionally apply column
1031         adjustment, and using this in the code which positions compositing layers.
1032
1033         Tests: compositing/columns/ancestor-clipped-in-paginated.html
1034                compositing/columns/clipped-in-paginated.html
1035                compositing/columns/composited-columns-vertical-rl.html
1036                compositing/columns/composited-columns.html
1037                compositing/columns/composited-in-paginated-rl.html
1038                compositing/columns/composited-in-paginated-writing-mode-rl.html
1039                compositing/columns/composited-lr-paginated-repaint.html
1040                compositing/columns/composited-rl-paginated-repaint.html
1041                compositing/columns/hittest-composited-in-paginated.html
1042                compositing/columns/rotated-in-paginated.html
1043                compositing/columns/untransformed-composited-in-paginated.html
1044
1045         * rendering/RenderLayer.cpp:
1046         (WebCore::RenderLayer::updateLayerPosition):
1047         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
1048         (WebCore::accumulateOffsetTowardsAncestor):
1049         (WebCore::RenderLayer::convertToLayerCoords):
1050         * rendering/RenderLayer.h:
1051         * rendering/RenderLayerBacking.cpp:
1052         (WebCore::RenderLayerBacking::updateCompositedBounds):
1053         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1054
1055 2013-08-28  Brent Fulgham  <bfulgham@webkit.org>
1056
1057         [WinCairo] Unreviewed build fix.
1058
1059         * WebCore.vcxproj/WebCore.vcxproj: Don't exclude the full screen
1060         window from the build.
1061         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1062
1063 2013-08-28  Benjamin Poulain  <benjamin@webkit.org>
1064
1065         Fix the build after r154780
1066
1067         * dom/SpaceSplitString.cpp:
1068         (WebCore::SpaceSplitStringData::create):
1069
1070 2013-08-27  Benjamin Poulain  <bpoulain@apple.com>
1071
1072         Simplify and clean SpaceSplitString
1073         https://bugs.webkit.org/show_bug.cgi?id=120385
1074
1075         Reviewed by Ryosuke Niwa.
1076
1077         Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
1078         This brings the following:
1079         - Fix the coding style of the header.
1080         - Remove the concepts of empty and null. The list can now be empty or have something.
1081           There is no null state.
1082         - Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
1083
1084         * WebCore.exp.in:
1085         * dom/ElementData.h:
1086         (WebCore::ElementData::hasClass):
1087         * dom/SpaceSplitString.cpp:
1088         (WebCore::tokenizeSpaceSplitString):
1089         (WebCore::SpaceSplitStringData::containsAll):
1090         (WebCore::SpaceSplitString::set):
1091         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
1092         (WebCore::TokenCounterProcessor::TokenCounterProcessor):
1093         (WebCore::TokenCounterProcessor::processToken):
1094         (WebCore::TokenCounterProcessor::tokenCount):
1095         (WebCore::TokenInitializerProcessor::TokenInitializerProcessor):
1096         (WebCore::TokenInitializerProcessor::processToken):
1097         (WebCore::TokenInitializerProcessor::nextMemoryBucket):
1098         (WebCore::SpaceSplitStringData::create):
1099         (WebCore::SpaceSplitStringData::destroy):
1100         * dom/SpaceSplitString.h:
1101         (WebCore::SpaceSplitStringData::contains):
1102         (WebCore::SpaceSplitStringData::size):
1103         (WebCore::SpaceSplitStringData::operator[]):
1104         (WebCore::SpaceSplitStringData::ref):
1105         (WebCore::SpaceSplitStringData::deref):
1106         (WebCore::SpaceSplitStringData::SpaceSplitStringData):
1107         (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
1108         (WebCore::SpaceSplitStringData::tokenArrayStart):
1109         (WebCore::SpaceSplitString::SpaceSplitString):
1110         (WebCore::SpaceSplitString::operator!=):
1111         (WebCore::SpaceSplitString::clear):
1112         (WebCore::SpaceSplitString::contains):
1113         (WebCore::SpaceSplitString::containsAll):
1114         (WebCore::SpaceSplitString::size):
1115         (WebCore::SpaceSplitString::isEmpty):
1116         (WebCore::SpaceSplitString::operator[]):
1117         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
1118         * html/ClassList.cpp:
1119         (WebCore::ClassList::classNames):
1120         * page/EventHandler.cpp:
1121         (WebCore::findDropZone):
1122
1123 <<<<<<< .mine
1124 2013-08-28  Benjamin Poulain  <benjamin@webkit.org>
1125
1126         Simplify and clean SpaceSplitString
1127         https://bugs.webkit.org/show_bug.cgi?id=120385
1128
1129         Reviewed by Ryosuke Niwa.
1130
1131         Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
1132         - Remove the concepts of empty and null. The list can now be empty or have something.
1133           There is no null state.
1134         - Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
1135
1136         * WebCore.exp.in:
1137         * dom/ElementData.h:
1138         (WebCore::ElementData::hasClass):
1139         * dom/SpaceSplitString.cpp:
1140         (WebCore::tokenizeSpaceSplitString):
1141         (WebCore::SpaceSplitStringData::containsAll):
1142         (WebCore::SpaceSplitString::set):
1143         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
1144         (WebCore::TokenCounter::TokenCounter):
1145         (WebCore::TokenCounter::processToken):
1146         (WebCore::TokenCounter::tokenCount):
1147         (WebCore::TokenAtomicStringInitializer::TokenAtomicStringInitializer):
1148         (WebCore::TokenAtomicStringInitializer::processToken):
1149         (WebCore::TokenAtomicStringInitializer::nextMemoryBucket):
1150         (WebCore::SpaceSplitStringData::create):
1151         (WebCore::SpaceSplitStringData::destroy):
1152         * dom/SpaceSplitString.h:
1153         (WebCore::SpaceSplitStringData::contains):
1154         (WebCore::SpaceSplitStringData::size):
1155         (WebCore::SpaceSplitStringData::operator[]):
1156         (WebCore::SpaceSplitStringData::ref):
1157         (WebCore::SpaceSplitStringData::deref):
1158         (WebCore::SpaceSplitStringData::SpaceSplitStringData):
1159         (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
1160         (WebCore::SpaceSplitStringData::tokenArrayStart):
1161         (WebCore::SpaceSplitString::containsAll):
1162         (WebCore::SpaceSplitString::isEmpty):
1163         (WebCore::SpaceSplitString::operator[]):
1164         * html/ClassList.cpp:
1165         (WebCore::ClassList::classNames):
1166         * page/EventHandler.cpp:
1167         (WebCore::findDropZone):
1168
1169 =======
1170 2013-08-28  Rob Buis  <rwlbuis@webkit.org>
1171
1172         Namespace prefix is blindly followed when serializing
1173         https://bugs.webkit.org/show_bug.cgi?id=19121
1174         Serializer doesn't handling inconsistent prefixes properly
1175         https://bugs.webkit.org/show_bug.cgi?id=117764
1176         Attribute namespaces are serialized as if they were element ones
1177         https://bugs.webkit.org/show_bug.cgi?id=22958
1178
1179         Reviewed by Ryosuke Niwa.
1180
1181         Add code to make sure unique prefixes and namespace declarations are generated.
1182         Unique prefix generation happens when:
1183         - the same prefix is used to map to different namespaces or
1184         - no prefix is given but the attribute is in a namespace.
1185
1186         This is done in order to not violate constraints listed in http://www.w3.org/TR/xml-names11/. In general
1187         the pseudo code listed in http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#normalizeDocumentAlgo
1188         is used, doing the following for attributes:
1189         if the attribute has a namespace then
1190           if the attribute has no prefix OR prefix is not declared OR conflicts with existing prefix mapping to different NS then
1191             try to find the matching in-scope declaration by looking up the prefix in the namespace -> prefix mapping, if found use that prefix
1192             else if the attribute prefix is not null AND not mapped in-scope, declare the prefix
1193             else generate a unique prefix for the namespace
1194
1195         To keep track of in-scope namespaces a prefix to namespace mapping is used. 
1196
1197         Tests: fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html
1198                fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html
1199                fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html
1200                svg/custom/xlink-prefix-generation-in-attributes.html
1201
1202         * editing/MarkupAccumulator.cpp:
1203         (WebCore::MarkupAccumulator::MarkupAccumulator):
1204         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
1205         (WebCore::MarkupAccumulator::appendNamespace):
1206         (WebCore::MarkupAccumulator::generateUniquePrefix):
1207         (WebCore::MarkupAccumulator::appendAttribute):
1208         * editing/MarkupAccumulator.h:
1209
1210 2013-08-28  Sam White  <samuel_white@apple.com>
1211
1212         AX: Cancel button in search field not accessible.
1213         <https://webkit.org/b/120322>
1214
1215         Expose the cancel button that shows in an input element of
1216         type search to accessibility.
1217
1218         Reviewed by Chris Fleizach.
1219
1220         Test: platform/mac/accessibility/search-field-cancel-button.html
1221
1222         * CMakeLists.txt:
1223         * English.lproj/Localizable.strings:
1224         * GNUmakefile.list.am:
1225         * Target.pri:
1226         * WebCore.vcxproj/WebCore.vcxproj:
1227         * WebCore.xcodeproj/project.pbxproj:
1228         * accessibility/AXObjectCache.cpp:
1229         (WebCore::createFromRenderer):
1230         * accessibility/AccessibilityAllInOne.cpp:
1231         * accessibility/AccessibilitySearchFieldButtons.cpp: Added.
1232         (WebCore::AccessibilitySearchFieldCancelButton::create):
1233         (WebCore::AccessibilitySearchFieldCancelButton::AccessibilitySearchFieldCancelButton):
1234         (WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
1235         (WebCore::AccessibilitySearchFieldCancelButton::accessibilityText):
1236         (WebCore::AccessibilitySearchFieldCancelButton::press):
1237         (WebCore::AccessibilitySearchFieldCancelButton::computeAccessibilityIsIgnored):
1238         * accessibility/AccessibilitySearchFieldButtons.h: Added.
1239         * dom/Element.h:
1240         (WebCore::Element::isSearchFieldCancelButtonElement):
1241         * html/shadow/TextControlInnerElements.h:
1242         * platform/LocalizedStrings.cpp:
1243         (WebCore::AXSearchFieldCancelButtonText):
1244         * platform/LocalizedStrings.h:
1245         * platform/efl/LocalizedStringsEfl.cpp:
1246         (WebCore::AXSearchFieldCancelButtonText):
1247         * platform/gtk/LocalizedStringsGtk.cpp:
1248         (WebCore::AXSearchFieldCancelButtonText):
1249         * platform/qt/LocalizedStringsQt.cpp:
1250         (WebCore::AXSearchFieldCancelButtonText):
1251
1252 >>>>>>> .r154779
1253 2013-08-28  Eric Carlson  <eric.carlson@apple.com>
1254
1255         MediaPlayerPrivateAVFoundationObjC is painting video frames under the video layer
1256         https://bugs.webkit.org/show_bug.cgi?id=120170
1257
1258         Reviewed by Simon Fraser.
1259
1260         No new tests, it is only possible to test in the debugger.
1261
1262         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1263         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Drive by optimization.
1264         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Move logic from paint here.
1265         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Do nothing if we already have a video layer,
1266             otherwise call paint().
1267
1268 2013-08-28  Antti Koivisto  <antti@apple.com>
1269
1270         Add child and descendant const iterators
1271         https://bugs.webkit.org/show_bug.cgi?id=120430
1272
1273         Reviewed by Andreas Kling
1274
1275         This patch adds const-correct DOM tree traversal iterators. It also uses them in a few places.
1276         
1277         Some const_casts have been applied where constness breaks.
1278
1279         * dom/ChildIterator.h:
1280         (WebCore::::ChildConstIterator):
1281         (WebCore::::operator):
1282         (WebCore::=):
1283         (WebCore::::ChildConstIteratorAdapter):
1284         (WebCore::::begin):
1285         (WebCore::::end):
1286         (WebCore::elementChildren):
1287         (WebCore::childrenOfType):
1288         * dom/DescendantIterator.h:
1289         (WebCore::::DescendantConstIterator):
1290         (WebCore::::operator):
1291         (WebCore::=):
1292         (WebCore::::DescendantConstIteratorAdapter):
1293         (WebCore::::begin):
1294         (WebCore::::end):
1295         (WebCore::elementDescendants):
1296         (WebCore::descendantsOfType):
1297         * dom/Node.cpp:
1298         (WebCore::Node::numberOfScopedHTMLStyleChildren):
1299         * html/HTMLFieldSetElement.cpp:
1300         (WebCore::HTMLFieldSetElement::legend):
1301         * html/HTMLFieldSetElement.h:
1302         * html/HTMLMediaElement.cpp:
1303         (WebCore::HTMLMediaElement::finishParsingChildren):
1304         * html/HTMLObjectElement.cpp:
1305         (WebCore::HTMLObjectElement::containsJavaApplet):
1306         * svg/SVGElement.cpp:
1307         (WebCore::SVGElement::title):
1308         * svg/SVGSVGElement.cpp:
1309         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
1310         (WebCore::SVGSVGElement::checkIntersection):
1311         (WebCore::SVGSVGElement::checkEnclosure):
1312         (WebCore::SVGSVGElement::getElementById):
1313         * svg/SVGSVGElement.h:
1314
1315 2013-08-28  Lukasz Gajowy  <l.gajowy@samsung.com>
1316
1317         AX:Null pointer may be dereferenced.
1318         https://bugs.webkit.org/show_bug.cgi?id=120300
1319
1320         Reviewed by Chris Fleizach.
1321
1322         Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.
1323
1324         * accessibility/AXObjectCache.cpp:
1325         (WebCore::AXObjectCache::getOrCreate):
1326
1327 2013-08-28  Pratik Solanki  <psolanki@apple.com>
1328
1329         Document::elementSheet() should return a reference
1330         https://bugs.webkit.org/show_bug.cgi?id=120433
1331
1332         Reviewed by Andreas Kling.
1333
1334         Since elementSheet() always retruns a valid pointer, we can simply return a reference
1335         instead. Also rename m_elemSheet to m_elementSheet.
1336
1337         * css/CSSParser.cpp:
1338         (WebCore::CSSParser::parseInlineStyleDeclaration):
1339         * css/PropertySetCSSStyleDeclaration.cpp:
1340         (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
1341         * dom/Document.cpp:
1342         (WebCore::Document::~Document):
1343         (WebCore::Document::recalcStyle):
1344         (WebCore::Document::updateBaseURL):
1345         (WebCore::Document::elementSheet):
1346         * dom/Document.h:
1347         * dom/StyledElement.cpp:
1348         (WebCore::StyledElement::setInlineStyleFromString):
1349         (WebCore::StyledElement::setInlineStyleProperty):
1350         (WebCore::StyledElement::addSubresourceAttributeURLs):
1351         (WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
1352         * inspector/InspectorStyleSheet.cpp:
1353         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
1354
1355 2013-08-28  Ryosuke Niwa  <rniwa@webkit.org>
1356
1357         REGRESSION(r154586): Past names map should only be used when named item is empty
1358         https://bugs.webkit.org/show_bug.cgi?id=120432
1359
1360         Reviewed by Anders Carlsson.
1361
1362         Don't add the element from the past names map if we've found elements of the given name.
1363
1364         Test: fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html
1365
1366         * html/HTMLFormElement.cpp:
1367         (WebCore::HTMLFormElement::getNamedElements):
1368
1369 2013-08-27  Ryosuke Niwa  <rniwa@webkit.org>
1370
1371         Don't keep unassociated elements in the past names map
1372         https://bugs.webkit.org/show_bug.cgi?id=120328
1373
1374         Reviewed by Darin Adler.
1375
1376         Remove elements from the past names map of a form element when they are disassociated with the form to match
1377         the behaviors of Firefox 24 and Internet Explorer 10. The specification feedback has been submitted to WHATWG
1378         in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-August/040586.html
1379
1380         Also fix a memory leak via the past names map when the elements in the map becomes an ancestor of the form
1381         element by storing a raw pointer in the map. This is safe because the form associated elements are kept alive
1382         by another mechanism.
1383
1384         Because ~FormAssociatedElement removes entries from the past names map, we could no longer store HTMLElement*
1385         in HTMLFormElement::m_pastNamesMap as that requires casting FormAssociatedElement* to HTMLElement*, which is
1386         not possible in ~FormAssociatedElement. We instead store pointers to FormNamedItem, new base class of
1387         FormAssociatedElement and HTMLImageElement.
1388
1389         Test: fast/forms/past-names-map-should-not-contained-disassociated-elements.html
1390
1391         * Target.pri:
1392         * WebCore.exp.in:
1393         * WebCore.vcxproj/WebCore.vcxproj:
1394         * WebCore.vcxproj/WebCore.vcxproj.filters:
1395         * WebCore.xcodeproj/project.pbxproj:
1396         * html/FormAssociatedElement.cpp:
1397         * html/FormAssociatedElement.h:
1398         (WebCore::toHTMLElement):
1399
1400         * html/FormNamedItem.h: Added.
1401         (WebCore::FormNamedItem::~FormNamedItem):
1402
1403         * html/HTMLElement.h:
1404         (WebCore::HTMLElement::asFormNamedItem): Added. This allows the conversion from a HTMLFormControlElement,
1405         HTMLObjectElement, HTMLImageElement to FormNamedItem in getNamedElements to update the past names map.
1406
1407         * html/HTMLFormControlElement.h:
1408         * html/HTMLFormElement.cpp:
1409         (WebCore::HTMLFormElement::removeFormElement):
1410         (WebCore::HTMLFormElement::removeImgElement):
1411         (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap): Asserts that FormNamedItem added to or obtained
1412         from the past names map is either a form associated element or an image element; the condition guarantees
1413         that the item will be removed from the map before its element gets destructed.
1414
1415         (WebCore::HTMLFormElement::elementFromPastNamesMap):
1416         (WebCore::HTMLFormElement::addToPastNamesMap):
1417         (WebCore::HTMLFormElement::removeFromPastNamesMap): Finds and removes the obsolete item from the map in O(n).
1418         Note that removeFromVector, which is called on m_associatedElements or m_imageElements before this function is called,
1419         is already O(n).
1420
1421         (WebCore::HTMLFormElement::getNamedElements):
1422
1423         * html/HTMLFormElement.h:
1424         * html/HTMLImageElement.h:
1425         * html/HTMLObjectElement.h:
1426
1427 2013-08-28  Brendan Long  <b.long@cablelabs.com>
1428
1429         Duplicate in-band tracks when switching <source> elements
1430         https://bugs.webkit.org/show_bug.cgi?id=120369
1431
1432         Reviewed by Eric Carlson.
1433
1434         Test: media/track/track-in-band-duplicate-tracks-when-source-changes.html
1435
1436         * html/HTMLMediaElement.cpp:
1437         (WebCore::HTMLMediaElement::createMediaPlayer):
1438         Delete existing in-band tracks before creating a new media player.
1439
1440 2013-08-28  Bem Jones-Bey  <bjonesbe@adobe.com>
1441
1442         Code cleanup: rename FloatIntervalSearchAdapter and remove unnecessary inlines
1443         https://bugs.webkit.org/show_bug.cgi?id=120378
1444
1445         Reviewed by Darin Adler.
1446
1447         Rename FloatIntervalSearchAdapter to ComputeFloatOffsetAdapter. The
1448         naming of this adapter has caused much confusion in reading the code,
1449         as it wasn't apparent that calls to it were actually doing anything
1450         other than searching the interval tree. The new name is a much better
1451         description of what it actually does.
1452
1453         Also, rename m_lowValue and m_highValue member variables to make it
1454         easier to read the code that uses them.
1455
1456         Removed the inlines based on a change by eseidel in Blink.
1457
1458         No new tests, no behavior change.
1459
1460         * rendering/RenderBlock.cpp:
1461         (WebCore::::updateOffsetIfNeeded): Update for renames.
1462         (WebCore::::collectIfNeeded): Ditto.
1463         (WebCore::::getHeightRemaining): Ditto.
1464         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
1465         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
1466         * rendering/RenderBlock.h:
1467         (WebCore::RenderBlock::FloatingObject::x): Remove unnecessary inline.
1468         (WebCore::RenderBlock::FloatingObject::maxX): Ditto.
1469         (WebCore::RenderBlock::FloatingObject::y): Ditto.
1470         (WebCore::RenderBlock::FloatingObject::maxY): Ditto.
1471         (WebCore::RenderBlock::FloatingObject::width): Ditto.
1472         (WebCore::RenderBlock::FloatingObject::height): Ditto.
1473         (WebCore::RenderBlock::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter): Rename.
1474         (WebCore::RenderBlock::ComputeFloatOffsetAdapter::lowValue): Rename m_lowValue.
1475         (WebCore::RenderBlock::ComputeFloatOffsetAdapter::highValue): Rename m_highValue.
1476
1477 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
1478
1479         Resolve unused parameter warning in ScriptedAnimationController.cpp.
1480         https://bugs.webkit.org/show_bug.cgi?id=120408
1481
1482         Reviewed by Darin Adler.
1483
1484         * dom/ScriptedAnimationController.cpp:
1485         (WebCore::ScriptedAnimationController::setThrottled):
1486
1487 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
1488
1489         [CSS Grid Layout] Handle 'span' positions during layout
1490         https://bugs.webkit.org/show_bug.cgi?id=119756
1491
1492         Reviewed by Andreas Kling.
1493
1494         From Blink r149133 by <jchaffraix@chromium.org>
1495
1496         Properly handle the 'span' keyword during layout. We only had
1497         parsing support so far but with this change we are able to
1498         recognize these positions and act accordingly.
1499
1500         * rendering/RenderGrid.cpp:
1501         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
1502         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
1503         * rendering/RenderGrid.h:
1504         * rendering/style/GridPosition.h:
1505         (WebCore::GridPosition::shouldBeResolvedAgainstOppositePosition):
1506
1507 2013-08-28  Antti Koivisto  <antti@apple.com>
1508
1509         Factor descendant iterator assertions into a class.
1510         https://bugs.webkit.org/show_bug.cgi?id=120422
1511
1512         Reviewed by Darin Adler.
1513
1514         Share the assertions between ChildIterator and DescendantIterator. We can use it for future const iterators too.
1515
1516         * GNUmakefile.list.am:
1517         * Target.pri:
1518         * WebCore.vcxproj/WebCore.vcxproj:
1519         * WebCore.xcodeproj/project.pbxproj:
1520         * dom/ChildIterator.h:
1521         (WebCore::::ChildIterator):
1522         (WebCore::::operator):
1523         (WebCore::=):
1524         * dom/DescendantIterator.h:
1525         (WebCore::::DescendantIterator):
1526         (WebCore::::operator):
1527         (WebCore::=):
1528         * dom/DescendantIteratorAssertions.h: Added.
1529         (WebCore::DescendantIteratorAssertions::DescendantIteratorAssertions):
1530         (WebCore::DescendantIteratorAssertions::domTreeHasMutated):
1531         (WebCore::DescendantIteratorAssertions::dropEventDispatchAssertion):
1532
1533 2013-08-28  Darin Adler  <darin@apple.com>
1534
1535         Eliminate Pasteboard::generalPasteboard
1536         https://bugs.webkit.org/show_bug.cgi?id=120392
1537
1538         Reviewed by Anders Carlsson.
1539
1540         * WebCore.exp.in: Removed the generalPasteboard function.
1541         It didn't need to be exported, because no one was using it.
1542
1543         * editing/Editor.cpp:
1544         (WebCore::Editor::paste): Added an overload that takes a Pasteboard.
1545         (WebCore::Editor::copyURL): Ditto.
1546         * editing/Editor.h: Added overloads.
1547
1548         * editing/EditorCommand.cpp:
1549         (WebCore::executePasteGlobalSelection): Put this function inside the same
1550         platform #if that the global selection code in the Pasteboard class was in.
1551         Changed to use Pasteboard::createForGlobalSelection instead of using the
1552         Pasteboard::setSelectionMode approach.
1553         (WebCore::createCommandMap): Put PasteGlobalSelection inside the platform #if.
1554
1555         * inspector/InjectedScriptHost.cpp:
1556         (WebCore::InjectedScriptHost::copyText): Use Pasteboard::createForCopyAndPaste()
1557         instead of Pasteboard::generalPasteboard().
1558         * inspector/InspectorFrontendHost.cpp:
1559         (WebCore::InspectorFrontendHost::copyText): Ditto.
1560
1561         * platform/Pasteboard.h: Removed generalPasteboard. Replaced isSelectionMode
1562         and setSelectionMode with createForGlobalSelection.
1563
1564         * platform/blackberry/PasteboardBlackBerry.cpp: Deleted generalPasteboard.
1565         * platform/efl/PasteboardEfl.cpp: Deleted generalPasteboard.
1566
1567         * platform/gtk/PasteboardGtk.cpp: Deleted selectionClipboard, primaryClipboard,
1568         generalPasteboard, isSelectionMode, and setSelectionMode.
1569         (WebCore::Pasteboard::createForGlobalSelection): Added.
1570         * platform/gtk/PasteboardHelper.cpp: Deleted m_usePrimarySelectionClipboard,
1571         getCurrentClipboard, and getClipboard.
1572         * platform/gtk/PasteboardHelper.h: Deleted the above, plus
1573         setUsePrimarySelectionClipboard and usePrimarySelectionClipboard.
1574
1575         * platform/ios/PasteboardIOS.mm: Deleted generalPasteboard.
1576         * platform/mac/PasteboardMac.mm: Deleted generalPasteboard.
1577
1578         * platform/qt/PasteboardQt.cpp: Deleted generalPasteboard, isSelectionMode,
1579         and setSelectionMode.
1580         (WebCore::Pasteboard::createForGlobalSelection): Added.
1581
1582         * platform/win/PasteboardWin.cpp: Deleted generalPasteboard.
1583
1584 2013-08-28  Antti Koivisto  <antti@apple.com>
1585
1586         Share attach loops between Elements and ShadowRoots
1587         https://bugs.webkit.org/show_bug.cgi?id=120414
1588
1589         Reviewed Andreas Kling.
1590
1591         * style/StyleResolveTree.cpp:
1592         (WebCore::Style::attachChildren):
1593         (WebCore::Style::attachShadowRoot):
1594         (WebCore::Style::detachChildren):
1595         (WebCore::Style::detachShadowRoot):
1596
1597 2013-08-28  Anders Carlsson  <andersca@apple.com>
1598
1599         Clean up XPathExpressionNode and XPath::Function
1600         https://bugs.webkit.org/show_bug.cgi?id=120411
1601
1602         Reviewed by Antti Koivisto.
1603
1604         Rename the subexpression and function argument getters to be more descriptive,
1605         remove the non-const overloads (they were never used) and change the getters to return
1606         references since they can never be null.
1607
1608         * xml/XPathExpressionNode.cpp:
1609         * xml/XPathExpressionNode.h:
1610         (WebCore::XPath::ParseNode::~ParseNode):
1611         (WebCore::XPath::Expression::addSubExpression):
1612         (WebCore::XPath::Expression::isContextNodeSensitive):
1613         (WebCore::XPath::Expression::setIsContextNodeSensitive):
1614         (WebCore::XPath::Expression::isContextPositionSensitive):
1615         (WebCore::XPath::Expression::setIsContextPositionSensitive):
1616         (WebCore::XPath::Expression::isContextSizeSensitive):
1617         (WebCore::XPath::Expression::setIsContextSizeSensitive):
1618         (WebCore::XPath::Expression::subExpressionCount):
1619         (WebCore::XPath::Expression::subExpression):
1620         * xml/XPathFunctions.cpp:
1621         (WebCore::XPath::Function::setArguments):
1622         (WebCore::XPath::FunId::evaluate):
1623         (WebCore::XPath::FunLocalName::evaluate):
1624         (WebCore::XPath::FunNamespaceURI::evaluate):
1625         (WebCore::XPath::FunName::evaluate):
1626         (WebCore::XPath::FunCount::evaluate):
1627         (WebCore::XPath::FunString::evaluate):
1628         (WebCore::XPath::FunConcat::evaluate):
1629         (WebCore::XPath::FunStartsWith::evaluate):
1630         (WebCore::XPath::FunContains::evaluate):
1631         (WebCore::XPath::FunSubstringBefore::evaluate):
1632         (WebCore::XPath::FunSubstringAfter::evaluate):
1633         (WebCore::XPath::FunSubstring::evaluate):
1634         (WebCore::XPath::FunStringLength::evaluate):
1635         (WebCore::XPath::FunNormalizeSpace::evaluate):
1636         (WebCore::XPath::FunTranslate::evaluate):
1637         (WebCore::XPath::FunBoolean::evaluate):
1638         (WebCore::XPath::FunNot::evaluate):
1639         (WebCore::XPath::FunLang::evaluate):
1640         (WebCore::XPath::FunNumber::evaluate):
1641         (WebCore::XPath::FunSum::evaluate):
1642         (WebCore::XPath::FunFloor::evaluate):
1643         (WebCore::XPath::FunCeiling::evaluate):
1644         (WebCore::XPath::FunRound::evaluate):
1645         * xml/XPathFunctions.h:
1646         (WebCore::XPath::Function::setName):
1647         (WebCore::XPath::Function::argumentCount):
1648         (WebCore::XPath::Function::argument):
1649         (WebCore::XPath::Function::name):
1650         * xml/XPathPredicate.cpp:
1651         (WebCore::XPath::Negative::evaluate):
1652         (WebCore::XPath::NumericOp::evaluate):
1653         (WebCore::XPath::EqTestOp::evaluate):
1654         (WebCore::XPath::LogicalOp::evaluate):
1655         (WebCore::XPath::Union::evaluate):
1656
1657 2013-08-28  Andreas Kling  <akling@apple.com>
1658
1659         Page::pluginData() should return a reference.
1660         <https://webkit.org/b/120386>
1661
1662         Reviewed by Darin Adler.
1663
1664         The PluginData is lazily constructed by pluginData(); it never returns null.
1665         A small number of null checks were harmed in the making of this patch.
1666
1667 2013-08-28  Andrei Parvu  <parvu@adobe.com>
1668
1669         <https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property
1670
1671         Added the -webkit-mask-source-type property to the -webkit-mask shorthand property.
1672
1673         Reviewed by Dirk Schulze.
1674
1675         Test cases added in LayoutTests/fast/masking/parsing-mask.html
1676
1677         * css/CSSParser.cpp: Added the CSSPropertyWebkitMaskSourceType property to the array of shorthand properties.
1678         (WebCore::CSSParser::parseValue):
1679         * css/StylePropertyShorthand.cpp: Added the CSSPropertyWebkitMaskSourceType to the list of shorthands.
1680         (WebCore::webkitMaskShorthand):
1681         (WebCore::matchingShorthandsForLonghand):
1682
1683 2013-08-28  Zan Dobersek  <zdobersek@igalia.com>
1684
1685         REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1
1686         https://bugs.webkit.org/show_bug.cgi?id=120398
1687
1688         Reviewed by Anders Carlsson.
1689
1690         * bridge/c/c_class.cpp:
1691         (JSC::Bindings::CClass::methodNamed): Keep the pointer of the new CMethod object
1692         to return it after it's adopted by the new HashMap entry.
1693         (JSC::Bindings::CClass::fieldNamed): The pointer to the newly created CField object
1694         should be returned in this branch, matching the behavior before r154708.
1695
1696 2013-08-28  Antti Koivisto  <antti@apple.com>
1697
1698         Fix Qt no-libxml2 build.
1699         
1700         Not reviewed.
1701
1702         * xml/parser/XMLDocumentParserQt.cpp:
1703         (WebCore::XMLDocumentParser::parseCdata):
1704
1705 2013-08-28  Antti Koivisto  <antti@apple.com>
1706
1707         Don't use NodeRenderingContext when attaching text renderers
1708         https://bugs.webkit.org/show_bug.cgi?id=120402
1709
1710         Reviewed by Andreas Kling.
1711
1712         This patch moves various functions for creating text renderers from NodeRenderingContext and Text to StyleResolveTree.
1713         It also tightens the logic and combines some functions.
1714
1715         * dom/CharacterData.cpp:
1716         (WebCore::CharacterData::parserAppendData):
1717         (WebCore::CharacterData::setDataAndUpdate):
1718         * dom/ContainerNode.cpp:
1719         (WebCore::attachChild):
1720         (WebCore::detachChild):
1721         * dom/NodeRenderingContext.cpp:
1722         * dom/NodeRenderingContext.h:
1723         * dom/Text.cpp:
1724         (WebCore::Text::~Text):
1725         * dom/Text.h:
1726         * html/HTMLViewSourceDocument.cpp:
1727         (WebCore::HTMLViewSourceDocument::addText):
1728         * html/parser/HTMLConstructionSite.cpp:
1729         (WebCore::executeTask):
1730         * html/shadow/InsertionPoint.cpp:
1731         (WebCore::InsertionPoint::willAttachRenderers):
1732         (WebCore::InsertionPoint::willDetachRenderers):
1733         * style/StyleResolveTree.cpp:
1734         (WebCore::Style::isRendererReparented):
1735         (WebCore::Style::previousSiblingRenderer):
1736         (WebCore::Style::nextSiblingRenderer):
1737         
1738             From NodeRenderingContext::next/previousRenderer
1739
1740         (WebCore::Style::createTextRenderersForSiblingsAfterAttachIfNeeded):
1741         
1742             From Text::createTextRenderersForSiblingsAfterAttachIfNeeded()
1743
1744         (WebCore::Style::textRendererIsNeeded):
1745         
1746             From Text::textRendererIsNeeded
1747
1748         (WebCore::Style::createTextRendererIfNeeded):
1749         
1750             Combines code from Text::createTextRendererIfNeeded, NodeRenderingContext::createRendererForTextIfNeeded,
1751             NodeRenderingContext constructor and text node relevant code NodeRenderingContext::shouldCreateRenderer.
1752
1753         (WebCore::Style::attachTextRenderer):
1754         (WebCore::Style::detachTextRenderer):
1755         
1756             New functions of attaching text renderers. From Text::attach/detachText()
1757
1758         (WebCore::Style::updateTextRendererAfterContentChange):
1759         
1760             From Text::updateTextRenderer.
1761
1762         (WebCore::Style::attachShadowRoot):
1763         (WebCore::Style::attachChildren):
1764         (WebCore::Style::attachRenderTree):
1765         (WebCore::Style::detachShadowRoot):
1766         (WebCore::Style::detachChildren):
1767         (WebCore::Style::updateTextStyle):
1768         * style/StyleResolveTree.h:
1769         * xml/parser/XMLDocumentParser.cpp:
1770         (WebCore::XMLDocumentParser::exitText):
1771         * xml/parser/XMLDocumentParserLibxml2.cpp:
1772         (WebCore::XMLDocumentParser::cdataBlock):
1773
1774 2013-08-28  Antti Koivisto  <antti@apple.com>
1775
1776         Make descendant iterators always require ContainerNode root
1777         https://bugs.webkit.org/show_bug.cgi?id=120393
1778
1779         Reviewed by Andreas Kling.
1780
1781         Remove Node* root versions of the iterators. 
1782         Fix the few call sites that required them to have tighter typing.
1783
1784         * accessibility/AccessibilityNodeObject.cpp:
1785         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
1786         (WebCore::siblingWithAriaRole):
1787         * dom/ChildIterator.h:
1788         (WebCore::::ChildIteratorAdapter):
1789         (WebCore::::begin):
1790         (WebCore::::end):
1791         (WebCore::elementChildren):
1792         (WebCore::childrenOfType):
1793         * dom/DescendantIterator.h:
1794         (WebCore::::DescendantIterator):
1795         (WebCore::::DescendantIteratorAdapter):
1796         (WebCore::::begin):
1797         (WebCore::::end):
1798         (WebCore::elementDescendants):
1799         (WebCore::descendantsOfType):
1800         * editing/ApplyStyleCommand.cpp:
1801         (WebCore::dummySpanAncestorForNode):
1802         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
1803         (WebCore::ApplyStyleCommand::applyInlineStyle):
1804         * editing/ApplyStyleCommand.h:
1805
1806 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
1807
1808         WorkerGlobalScopeWebDatabase requires ENABLE(WORKERS)
1809         https://bugs.webkit.org/show_bug.cgi?id=120395
1810
1811         Reviewed by Christophe Dumez.
1812
1813         WorkerGlobalScopeDatabase uses the WorkerGlobalScope object which is
1814         defined only when WORKERS are enabled. We should guard that code.
1815
1816         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp:
1817         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.h:
1818         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl:
1819
1820 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
1821
1822         [CSS Grid Layout] Fix grid position resolution
1823         https://bugs.webkit.org/show_bug.cgi?id=119801
1824
1825         Reviewed by Andreas Kling.
1826
1827         From Blink r148833, r148878, r150403 by <jchaffraix@chromium.org>
1828
1829         Both grid-{column|row}-end and negative positions were not
1830         properly handled in our grid position resolution code. We were
1831         using the same code to resolve all the grid positions without
1832         considering the edges of the grid.
1833
1834         Also refactored the grid size estimation in
1835         resolveGridPositionsFromStyle() so we can use it for the grid size
1836         estimation. The code no longer requires the grid to be filled at
1837         that moment as the specs changed to use the "explicit grid" which
1838         is independent of grid items (only depends on style).
1839
1840         Test: fast/css-grid-layout/grid-item-negative-position-resolution.html
1841
1842         * rendering/RenderGrid.cpp:
1843         (WebCore::RenderGrid::maximumIndexInDirection):
1844         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
1845         (WebCore::adjustGridPositionForSide):
1846         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1847         * rendering/RenderGrid.h:
1848
1849 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
1850
1851         [CSS Grid Layout] infinity should be defined as a negative value
1852         https://bugs.webkit.org/show_bug.cgi?id=107053
1853
1854         Reviewed by Andreas Kling.
1855
1856         From Blink r154805 by <jchaffraix@chromium.org>
1857
1858         Reject negative values for track-breadth at parse time as
1859         mentioned in the latest versions of the spec.
1860
1861         Added some extra checks to the existing tests.
1862
1863         * css/CSSParser.cpp:
1864         (WebCore::CSSParser::parseGridBreadth):
1865         * rendering/RenderGrid.cpp:
1866         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
1867
1868 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
1869
1870         [Soup] WebTiming information not shown in the inspector
1871         https://bugs.webkit.org/show_bug.cgi?id=118395
1872
1873         Reviewed by Martin Robinson.
1874
1875         WebTiming information was not correctly provided to WebCore
1876         because the gotHeadersCallback was incorrectly resetting the
1877         original ResourceResponse (which had the ResourceLoadTiming
1878         object) instead of simply updating their contents using the
1879         SoupMessage.
1880
1881         No new test required as this feature is already covered by the
1882         existing webtiming tests. In any case this change includes a fix
1883         for the http/tests/misc/webtiming-ssl.php test which was not
1884         failing even if it should because it was not correct.
1885
1886         * platform/network/soup/ResourceHandleSoup.cpp:
1887         (WebCore::gotHeadersCallback):
1888         (WebCore::restartedCallback): restartedCallback should be
1889         available only if WEB_TIMING is defined.
1890         (WebCore::createSoupMessageForHandleAndRequest): Ditto.
1891
1892 2013-08-26  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1893
1894         Scrolling allowed when overflow:hidden (seen on Acid2)
1895         https://bugs.webkit.org/show_bug.cgi?id=22769
1896
1897         Reviewed by Darin Adler.
1898
1899         Autoscroll, as well as other user-driven scroll actions,
1900         has to respect the scrollability styled into the web page.
1901         More specifically, if a html or body tags are styled with
1902         overflow:hidden, autoscroll should not scroll the containing document.
1903
1904         In order to fix this, patch hardens RenderBox::canAutoscroll as
1905         following: previously, ::canAutoscroll was relying solemnly in
1906         ::canBeScrolledAndHasScrollableArea to determine the scrollability
1907         of #document node, which was unconditionally returned as 'true'.
1908         Patch extends ::canAutoscroll to handle the #document case for
1909         main and inner frames, and now it asks through ::isScrollable if
1910         the corresponding document's FrameView is actually user-scrollable.
1911
1912         Note, that the patch change ::canAutoscroll to cover the non-mainFrame
1913         #document case, so the comment specific to Apple's Mail app can be omited
1914         now.
1915
1916         Test: fast/events/autoscroll-in-overflow-hidden-html.html
1917
1918         * rendering/RenderBox.cpp:
1919         (WebCore::RenderBox::canAutoscroll):
1920
1921 2013-08-27  Santosh Mahto  <santosh.ma@samsung.com>
1922
1923         Adding  "explicit" keyword in  forms related classes constructor
1924         https://bugs.webkit.org/show_bug.cgi?id=120366
1925
1926         Reviewed by Darin Adler.
1927
1928         Adding "explicit" keyword in constructors.
1929
1930         * html/BaseButtonInputType.h:
1931         (WebCore::BaseButtonInputType::BaseButtonInputType):
1932         * html/BaseCheckableInputType.h:
1933         (WebCore::BaseCheckableInputType::BaseCheckableInputType):
1934         * html/BaseChooserOnlyDateAndTimeInputType.h:
1935         (WebCore::BaseChooserOnlyDateAndTimeInputType::BaseChooserOnlyDateAndTimeInputType):
1936         * html/BaseClickableWithKeyInputType.h:
1937         (WebCore::BaseClickableWithKeyInputType::BaseClickableWithKeyInputType):
1938         * html/BaseTextInputType.h:
1939         (WebCore::BaseTextInputType::BaseTextInputType):
1940         * html/ColorInputType.h:
1941         (WebCore::ColorInputType::ColorInputType):
1942         * html/DateInputType.h:
1943         * html/DateTimeInputType.h:
1944         (WebCore::DateTimeInputType::DateTimeInputType):
1945         * html/DateTimeLocalInputType.h:
1946         (WebCore::DateTimeLocalInputType::DateTimeLocalInputType):
1947         * html/EmailInputType.h:
1948         (WebCore::EmailInputType::EmailInputType):
1949         * html/FileInputType.h:
1950         * html/HiddenInputType.h:
1951         (WebCore::HiddenInputType::HiddenInputType):
1952         * html/ImageData.h:
1953         * html/ImageInputType.h:
1954         * html/InputType.h:
1955         (WebCore::InputType::InputType):
1956         * html/MediaController.h:
1957         * html/MonthInputType.h:
1958         (WebCore::MonthInputType::MonthInputType):
1959         * html/RadioInputType.h:
1960         (WebCore::RadioInputType::RadioInputType):
1961         * html/RangeInputType.h:
1962         * html/ResetInputType.h:
1963         (WebCore::ResetInputType::ResetInputType):
1964         * html/SearchInputType.h:
1965         * html/SubmitInputType.h:
1966         (WebCore::SubmitInputType::SubmitInputType):
1967         * html/TelephoneInputType.h:
1968         (WebCore::TelephoneInputType::TelephoneInputType):
1969         * html/TextFieldInputType.h:
1970         * html/TextInputType.h:
1971         (WebCore::TextInputType::TextInputType):
1972         * html/TimeInputType.h:
1973         * html/URLInputType.h:
1974         (WebCore::URLInputType::URLInputType):
1975         * html/ValidationMessage.h:
1976         * html/WeekInputType.h:
1977         (WebCore::WeekInputType::WeekInputType):
1978
1979 2013-08-27  Benjamin Poulain  <benjamin@webkit.org>
1980
1981         Fix the indentation of SpaceSplitString
1982         https://bugs.webkit.org/show_bug.cgi?id=120390
1983
1984         Reviewed by Ryosuke Niwa.
1985
1986         * dom/SpaceSplitString.h:
1987         (WebCore::SpaceSplitStringData::contains):
1988         (WebCore::SpaceSplitStringData::isUnique):
1989         (WebCore::SpaceSplitStringData::size):
1990         (WebCore::SpaceSplitStringData::operator[]):
1991         (WebCore::SpaceSplitString::SpaceSplitString):
1992         (WebCore::SpaceSplitString::operator!=):
1993         (WebCore::SpaceSplitString::clear):
1994         (WebCore::SpaceSplitString::contains):
1995         (WebCore::SpaceSplitString::containsAll):
1996         (WebCore::SpaceSplitString::size):
1997         (WebCore::SpaceSplitString::isNull):
1998         (WebCore::SpaceSplitString::operator[]):
1999         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2000         (WebCore::SpaceSplitString::ensureUnique):
2001
2002 2013-08-27  Andreas Kling  <akling@apple.com>
2003
2004         Make it less awkward to check if a Frame is the main Frame.
2005         <https://webkit.org/b/120382>
2006
2007         Reviewed by Anders Carlsson.
2008
2009         Added Page::frameIsMainFrame(const Frame*) so code that wants to find out if a given
2010         Frame is a Page's main frame doesn't have to do a manual pointer compare.
2011
2012         * page/Page.h:
2013         (WebCore::Page::frameIsMainFrame):
2014
2015             Added. Replaces (frame == &page->mainFrame()) idiom.
2016
2017 2013-08-27  Morten Stenshorne  <mstensho@opera.com>
2018
2019         Improve multicol intrinsic width calculation
2020         https://bugs.webkit.org/show_bug.cgi?id=116677
2021
2022         Reviewed by David Hyatt.
2023
2024         Test: fast/css-intrinsic-dimensions/multicol.html
2025
2026         * rendering/RenderBlock.cpp:
2027         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
2028         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
2029         * rendering/RenderBlock.h:
2030
2031 2013-08-27  Rob Buis  <rwlbuis@webkit.org>
2032
2033         feImage fails if referenced node contains radialGradient declaration
2034         https://bugs.webkit.org/show_bug.cgi?id=118735
2035
2036         Reviewed by Darin Adler.
2037
2038         Only call parent's updateRelativeLengthsInformation for graphics elements.
2039
2040         Tests: svg/custom/feImage-pserver-with-percentage-expected.svg
2041                svg/custom/feImage-pserver-with-percentage.svg
2042
2043         * svg/SVGElement.cpp:
2044         (WebCore::SVGElement::updateRelativeLengthsInformation):
2045
2046 2013-08-27  Darin Adler  <darin@apple.com>
2047
2048         No need for generalPasteboard (aside from "global selection mode")
2049         https://bugs.webkit.org/show_bug.cgi?id=120367
2050
2051         Reviewed by Alexey Proskuryakov.
2052
2053         * editing/Editor.cpp:
2054         (WebCore::Editor::pasteAsPlainTextBypassingDHTML):
2055         (WebCore::Editor::dispatchCPPEvent):
2056         (WebCore::Editor::cut):
2057         (WebCore::Editor::copy):
2058         (WebCore::Editor::paste):
2059         (WebCore::Editor::pasteAsPlainText):
2060         (WebCore::Editor::copyURL):
2061         (WebCore::Editor::copyImage):
2062         Use Pasteboard::createForCopyAndPaste rather than the single general pasteboard
2063         for editing operations.
2064
2065 2013-08-27  Chris Fleizach  <cfleizach@apple.com>
2066
2067         <https://webkit.org/b/120117> AX: <noscript> contents are exposed as static text
2068
2069         Reviewed by Tim Horton.
2070
2071         If <noscript> is not being used (because there is script) then we need to ignore its contents for AX.
2072
2073         Test: accessibility/noscript-ignored.html
2074
2075         * accessibility/AccessibilityRenderObject.cpp:
2076         (WebCore::AccessibilityRenderObject::addCanvasChildren):
2077         * accessibility/AccessibilityNodeObject.cpp:
2078         (WebCore::AccessibilityNodeObject::canHaveChildren):
2079
2080 2013-08-27  Anders Carlsson  <andersca@apple.com>
2081
2082         Stop using deleteAllValues in CClass
2083         https://bugs.webkit.org/show_bug.cgi?id=120376
2084
2085         Reviewed by Andreas Kling.
2086
2087         * bridge/c/c_class.cpp:
2088         (JSC::Bindings::CClass::CClass):
2089         (JSC::Bindings::CClass::~CClass):
2090         (JSC::Bindings::CClass::methodNamed):
2091         (JSC::Bindings::CClass::fieldNamed):
2092         * bridge/c/c_class.h:
2093         * bridge/jsc/BridgeJSC.h:
2094
2095 2013-08-27  Benjamin Poulain  <benjamin@webkit.org>
2096
2097         Clean ClassList and DOMSettableTokenList
2098         https://bugs.webkit.org/show_bug.cgi?id=120344
2099
2100         Reviewed by Ryosuke Niwa.
2101
2102         This patch cleans ClassList and DOMSettableTokenList to make it simpler to update
2103         SpaceSplitString:
2104         - Move the implementation of virtual functions to the cpp file.
2105         - Clean the #includes.
2106         - Make the implemented pure virtual methods final.
2107         - Make the element() accessor const.
2108
2109         * html/ClassList.cpp:
2110         (WebCore::ClassList::create):
2111         (WebCore::ClassList::element):
2112         (WebCore::ClassList::value):
2113         (WebCore::ClassList::setValue):
2114         (WebCore::ClassList::classNames):
2115         * html/ClassList.h:
2116         * html/DOMSettableTokenList.cpp:
2117         (WebCore::DOMSettableTokenList::create):
2118         (WebCore::DOMSettableTokenList::ref):
2119         (WebCore::DOMSettableTokenList::deref):
2120         (WebCore::DOMSettableTokenList::length):
2121         (WebCore::DOMSettableTokenList::value):
2122         * html/DOMSettableTokenList.h:
2123         * html/DOMTokenList.h:
2124         (WebCore::DOMTokenList::element):
2125
2126 2013-08-27  Arunprasad Rajkumar  <arurajku@cisco.com>
2127
2128         Replace currentTime() with monotonicallyIncreasingTime() in WebCore
2129         https://bugs.webkit.org/show_bug.cgi?id=119958
2130
2131         Reviewed by Alexey Proskuryakov.
2132
2133         WTF::currentTime() is prone to NTP and manual adjustments, so use
2134         WTF::monotonicallyIncreasingTime() to measure elapsed time.
2135
2136         It is a continuation of r154201.
2137
2138         * history/CachedPage.cpp:
2139         (WebCore::CachedPage::CachedPage):
2140         (WebCore::CachedPage::hasExpired):
2141         * html/parser/HTMLParserScheduler.h:
2142         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
2143         * loader/CrossOriginPreflightResultCache.cpp:
2144         (WebCore::CrossOriginPreflightResultCacheItem::parse):
2145         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
2146         * loader/FrameLoader.cpp:
2147         (WebCore::FrameLoader::setState):
2148         * loader/ProgressTracker.cpp:
2149         (WebCore::ProgressTracker::incrementProgress):
2150         * loader/cache/CachedCSSStyleSheet.cpp:
2151         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
2152         * loader/cache/CachedImage.cpp:
2153         (WebCore::CachedImage::didDraw):
2154         * loader/cache/MemoryCache.cpp:
2155         (WebCore::MemoryCache::pruneLiveResourcesToSize):
2156         * loader/icon/IconDatabase.cpp:
2157         (WebCore::IconDatabase::iconDatabaseSyncThread):
2158         (WebCore::IconDatabase::syncThreadMainLoop):
2159         (WebCore::IconDatabase::readFromDatabase):
2160         (WebCore::IconDatabase::writeToDatabase):
2161         (WebCore::IconDatabase::cleanupSyncThread):
2162         * page/animation/AnimationBase.cpp:
2163         (WebCore::AnimationBase::freezeAtTime):
2164         * page/animation/AnimationController.cpp:
2165         (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
2166         * platform/graphics/GraphicsLayerAnimation.cpp:
2167         (WebCore::GraphicsLayerAnimation::computeTotalRunningTime):
2168         (WebCore::GraphicsLayerAnimation::resume):
2169         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2170         (WebCore::AVFWrapper::createImageForTimeInRect):
2171         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2172         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
2173         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):
2174         * platform/graphics/ca/GraphicsLayerCA.cpp:
2175         (WebCore::GraphicsLayerCA::suspendAnimations):
2176         * platform/graphics/ca/PlatformCALayer.h:
2177         (WebCore::PlatformCALayer::currentTimeToMediaTime):
2178         * platform/graphics/ca/mac/LayerPool.mm:
2179         (WebCore::LayerPool::addLayer):
2180         (WebCore::LayerPool::decayedCapacity):
2181         (WebCore::LayerPool::pruneTimerFired):
2182         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2183         (mediaTimeToCurrentTime):
2184         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2185         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted):
2186         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2187         (PlatformCALayer::printTree):
2188         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2189         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2190         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
2191         (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
2192         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
2193         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2194         (WebCore::CoordinatedGraphicsLayer::addAnimation):
2195         * platform/network/DNSResolveQueue.cpp:
2196         (WebCore::DNSResolveQueue::isUsingProxy):
2197         * plugins/win/PluginMessageThrottlerWin.cpp:
2198         (WebCore::PluginMessageThrottlerWin::appendMessage):
2199         * rendering/RenderLayerCompositor.cpp:
2200         (WebCore::RenderLayerCompositor::didPaintBacking):
2201         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2202         * rendering/RenderProgress.cpp:
2203         (WebCore::RenderProgress::animationProgress):
2204         (WebCore::RenderProgress::updateAnimationState):
2205         * svg/animation/SMILTimeContainer.cpp:
2206         (WebCore::SMILTimeContainer::elapsed):
2207         (WebCore::SMILTimeContainer::begin):
2208         (WebCore::SMILTimeContainer::pause):
2209         (WebCore::SMILTimeContainer::resume):
2210         (WebCore::SMILTimeContainer::setElapsed):
2211
2212 2013-08-27  Robert Hogan  <robert@webkit.org>
2213
2214         cell width / offsetTop incorrect
2215         https://bugs.webkit.org/show_bug.cgi?id=11582
2216
2217         Reviewed by David Hyatt.
2218
2219         The offsetTop and offsetLeft of sections, rows and cells should include the table's border. There are separate
2220         problems with the offset[Top|Left] of table sections and the offsetLeft of rows which are covered under bugs 119020
2221         and 119021 respectively - here we stick to just fixing the inclusion of the border as it doesn't require rebaselining
2222         a lot of tests.
2223
2224         Test: fast/table/offset-top-includes-border.html
2225
2226         * rendering/RenderBoxModelObject.cpp:
2227         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
2228         * rendering/RenderTableSection.cpp:
2229         (WebCore::RenderTableSection::layoutRows):
2230
2231 2013-08-27  Jacky Jiang  <zhajiang@blackberry.com>
2232
2233         [BlackBerry] Rotate device from landscape to portrait during youtube streaming will cause device screen flash with video list page
2234         https://bugs.webkit.org/show_bug.cgi?id=120364
2235
2236         Reviewed by Rob Buis.
2237         Internally reviewed by Arvid Nilsson.
2238
2239         JIRA 461232
2240         When rotating device from landscape mode to portrait mode, we updated
2241         texture contents based on landscape mode front visibility and back
2242         visibility on WebKit thread at the very beginning and the landscape mode
2243         tiles wouldn't be able to cover the portrait mode screen which resulted
2244         in the screen flash.
2245         It's hard to compute front visibility information on WebKit thread because
2246         it doesn't know where the layers will be on the screen. Therefore, the
2247         front visibility won't be updated until the first time we draw textures
2248         on compositing thread.
2249         The patch traverses through LayerWebKitThread and LayerCompositingThread
2250         and discards back visibility and front visibility respectively if there
2251         is a pending orientation. In this way, we can pick up layerTilerPrefillRect
2252         as visibleRect instead of the visibleRect from the stale visibilities
2253         and add more tiles for uncovered screen when updating texture contents
2254         on WebKit thread.
2255         The patch also fixes a bug that we prune tiles based on the stale
2256         m_requiredTextureSize in pruneTextures(). We should prune tiles based
2257         on the updated pendingTextureSize instead.
2258
2259         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2260         (WebCore::LayerCompositingThread::discardFrontVisibility):
2261         * platform/graphics/blackberry/LayerCompositingThread.h:
2262         * platform/graphics/blackberry/LayerCompositingThreadClient.h:
2263         (WebCore::LayerCompositingThreadClient::discardFrontVisibility):
2264         * platform/graphics/blackberry/LayerRenderer.cpp:
2265         (WebCore::LayerRenderer::discardFrontVisibility):
2266         * platform/graphics/blackberry/LayerRenderer.h:
2267         * platform/graphics/blackberry/LayerTiler.cpp:
2268         (WebCore::LayerTiler::discardFrontVisibility):
2269         (WebCore::LayerTiler::processTextureJob):
2270         (WebCore::LayerTiler::pruneTextures):
2271         (WebCore::LayerTiler::discardBackVisibility):
2272         * platform/graphics/blackberry/LayerTiler.h:
2273         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2274         (WebCore::LayerWebKitThread::discardBackVisibility):
2275         * platform/graphics/blackberry/LayerWebKitThread.h:
2276
2277 2013-08-27  Antti Koivisto  <antti@apple.com>
2278
2279         Better mutation and event assertions for descendant iterators
2280         https://bugs.webkit.org/show_bug.cgi?id=120368
2281
2282         Reviewed by Andreas Kling.
2283
2284         Add mutation assertions to all functions.
2285         Drop the no-event-dispatch assertion when the iterator reaches the end. This reduces need for iterator scoping
2286         just to avoid assertions.
2287
2288         * dom/ChildIterator.h:
2289         (WebCore::::domTreeHasMutated):
2290         (WebCore::::operator):
2291         (WebCore::=):
2292         * dom/DescendantIterator.h:
2293         (WebCore::::domTreeHasMutated):
2294         (WebCore::::operator):
2295         (WebCore::=):
2296         * dom/Document.cpp:
2297         (WebCore::Document::childrenChanged):
2298         
2299             Make idiomatic.
2300
2301 2013-08-27  Renata Hodovan  <reni@webkit.org>
2302
2303         Missing null-check of parent renderer in WebCore::HTMLEmbedElement::rendererIsNeeded()
2304         https://bugs.webkit.org/show_bug.cgi?id=120343
2305
2306         Reviewed by Darin Adler.
2307
2308         Null-check the parent renderer of HTMLEmbedElement in WebCore::HTMLEmbedElement::rendererIsNeeded()
2309         and early return.
2310
2311         Test: fast/html/HTMLEmbedElement_without_parent_renderer_assert_crash.html
2312
2313         * html/HTMLEmbedElement.cpp:
2314         (WebCore::HTMLEmbedElement::rendererIsNeeded):
2315
2316 2013-08-27  Brent Fulgham  <bfulgham@apple.com>
2317
2318         [Windows] Correct method call for characteristic update.
2319
2320         Reviewed by Eric Carlson.
2321
2322         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2323         (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged):
2324         [Windows] Correct method call (should have been "characteristicsChanged", not
2325         "player()->characteristicChanged()"
2326
2327 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
2328
2329         [Windows] some track language tags are not recognized
2330         https://bugs.webkit.org/show_bug.cgi?id=120335
2331
2332         Reviewed by Eric Carlson.
2333
2334         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Revise implementation
2335         to match logic in platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjc.mm
2336
2337 2013-08-27  Andreas Kling  <akling@apple.com>
2338
2339         Clumsily fix Gtk+ build. Not my proudest moment.
2340
2341         * rendering/svg/RenderSVGResourceFilter.cpp:
2342
2343 2013-08-27  Andreas Kling  <akling@apple.com>
2344
2345         Fix Qt build.
2346
2347         * rendering/svg/RenderSVGResourceFilter.cpp:
2348
2349 2013-08-27  Andreas Kling  <akling@apple.com>
2350
2351         RenderView::availableLogicalHeight() should be self-contained.
2352         <https://webkit.org/b/120356>
2353
2354         Reviewed by Antti Koivisto.
2355
2356         Instead of checking isRenderView() in RenderBox::availableLogicalHeightUsing()
2357         and doing an early return, do everything needed without leaving RenderView instead.
2358         Document style never has min-/max-height so there's no need to apply constraints.
2359
2360         * rendering/RenderBox.cpp:
2361         (WebCore::RenderBox::availableLogicalHeightUsing):
2362         * rendering/RenderView.cpp:
2363         (WebCore::RenderView::availableLogicalHeight):
2364
2365 2013-08-27  Andreas Kling  <akling@apple.com>
2366
2367         Simplify some more Settings access where we have a Frame in reach.
2368         <https://webkit.org/b/120256>
2369
2370         Reviewed by Darin Adler.
2371
2372         RenderObjects can always find Settings through the Frame.
2373
2374         * rendering/InlineTextBox.cpp:
2375         (WebCore::InlineTextBox::paint):
2376         * rendering/RenderBoxModelObject.cpp:
2377         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2378         * rendering/svg/RenderSVGResourceFilter.cpp:
2379         (WebCore::RenderSVGResourceFilter::applyResource):
2380
2381 2013-08-27  Andreas Kling  <akling@apple.com>
2382
2383         RenderView::flowThreadController() should return a reference.
2384         <https://webkit.org/b/120363>
2385
2386         Reviewed by Antti Koivisto.
2387
2388         This function does lazy construction and always returns an object.
2389
2390 2013-08-27  Andreas Kling  <akling@apple.com>
2391
2392         HTMLAppletElement: Use child iterator to walk <param> children.
2393         <https://webkit.org/b/120361>
2394
2395         Reviewed by Antti Koivisto.
2396
2397         Take Antti's fancy new child iterator for a quick spin.
2398
2399         * html/HTMLAppletElement.cpp:
2400         (WebCore::HTMLAppletElement::updateWidget):
2401
2402 2013-08-27  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
2403
2404         [gstreamer] Make sure gstreamer source element is thread-safe
2405         https://bugs.webkit.org/show_bug.cgi?id=115352
2406
2407         Reviewed by Philippe Normand.
2408
2409         GStreamer source element may be created by any gstreamer element on any thread by calling
2410         gst_element_make_from_uri with the URIs handled by the source element.
2411         This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
2412         being created outside the main thread.
2413
2414         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2415         (webkit_web_src_init):
2416         (webKitWebSrcDispose):
2417         (webKitWebSrcFinalize):
2418         (webKitWebSrcSetProperty):
2419         (webKitWebSrcGetProperty):
2420         (removeTimeoutSources):
2421         (webKitWebSrcStop):
2422         (webKitWebSrcStart):
2423         (webKitWebSrcChangeState):
2424         (webKitWebSrcQueryWithParent):
2425         (webKitWebSrcGetUri):
2426         (webKitWebSrcSetUri):
2427         (webKitWebSrcNeedDataMainCb):
2428         (webKitWebSrcNeedDataCb):
2429         (webKitWebSrcEnoughDataMainCb):
2430         (webKitWebSrcEnoughDataCb):
2431         (webKitWebSrcSeekMainCb):
2432         (webKitWebSrcSeekDataCb):
2433         (webKitWebSrcSetMediaPlayer):
2434         (StreamingClient::StreamingClient):
2435         (StreamingClient::~StreamingClient):
2436         (StreamingClient::createReadBuffer):
2437         (StreamingClient::handleResponseReceived):
2438         (StreamingClient::handleDataReceived):
2439         (StreamingClient::handleNotifyFinished):
2440         (CachedResourceStreamingClient::CachedResourceStreamingClient):
2441         (CachedResourceStreamingClient::~CachedResourceStreamingClient):
2442         (CachedResourceStreamingClient::loadFailed):
2443         (CachedResourceStreamingClient::setDefersLoading):
2444         (CachedResourceStreamingClient::getOrCreateReadBuffer):
2445         (CachedResourceStreamingClient::responseReceived):
2446         (CachedResourceStreamingClient::dataReceived):
2447         (CachedResourceStreamingClient::notifyFinished):
2448         (ResourceHandleStreamingClient::ResourceHandleStreamingClient):
2449         (ResourceHandleStreamingClient::~ResourceHandleStreamingClient):
2450         (ResourceHandleStreamingClient::loadFailed):
2451         (ResourceHandleStreamingClient::setDefersLoading):
2452         (ResourceHandleStreamingClient::getOrCreateReadBuffer):
2453         (ResourceHandleStreamingClient::willSendRequest):
2454         (ResourceHandleStreamingClient::didReceiveResponse):
2455         (ResourceHandleStreamingClient::didReceiveData):
2456         (ResourceHandleStreamingClient::didFinishLoading):
2457         (ResourceHandleStreamingClient::didFail):
2458         (ResourceHandleStreamingClient::wasBlocked):
2459         (ResourceHandleStreamingClient::cannotShowURL):
2460         Make element thread-safe, add support to use the element without a player associated (e.g.
2461         the DASH plugin using the webkitsrc to download fragments), use GMutexLocker to simplify
2462         locks and other general improvements.
2463
2464 2013-08-27  Antti Koivisto  <antti@apple.com>
2465
2466         Remove branch from DescendantIteratorAdapter::begin() when invoking for ContainerNode
2467         https://bugs.webkit.org/show_bug.cgi?id=120358
2468
2469         Reviewed by Andreas Kling.
2470
2471         * dom/ContainerNode.h:
2472         
2473             Delete isContainerNode() so it can't be called if there is static knowledge that the object is a ContainerNode.
2474
2475         * dom/DescendantIterator.h:
2476         (WebCore::::DescendantIterator):
2477
2478             Make DescendantIterator use Node* as root instead of ContainerNode*. It is only used for equality comparison.
2479
2480         (WebCore::::begin):
2481         
2482             Remove branch. Rely on ElementTraversal specialization for ContainerNodes.
2483
2484 2013-08-27  Joseph Pecoraro  <pecoraro@apple.com>
2485
2486         Web Inspector: Column Breakpoint not working, may be off by 1
2487         https://bugs.webkit.org/show_bug.cgi?id=120334
2488
2489         Reviewed by David Kilzer.
2490
2491         JavaScriptCore changed to 1-based column numbers at some point. We
2492         need to update the ScriptDebugger assumption that they were 0-based.
2493
2494         Test: inspector-protocol/debugger/column-breakpoint.html
2495
2496         * bindings/js/ScriptDebugServer.cpp:
2497         (WebCore::ScriptDebugServer::createCallFrame):
2498         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
2499
2500 2013-08-27  Antti Koivisto  <antti@apple.com>
2501
2502         Switch some more code to element child/descendant iterators
2503         https://bugs.webkit.org/show_bug.cgi?id=120355
2504
2505         Reviewed by Andreas Kling.
2506
2507         Move from Traversal<ElementType>::next() and Traversal<ElementType>::nextSibling() to iterators.
2508
2509         * css/CSSFontFaceSource.cpp:
2510         (WebCore::CSSFontFaceSource::getFontData):
2511         * dom/Document.cpp:
2512         (WebCore::Document::removeTitle):
2513         (WebCore::Document::updateBaseURL):
2514         (WebCore::Document::processBaseElement):
2515         * dom/TreeScope.cpp:
2516         (WebCore::TreeScope::labelElementForId):
2517         (WebCore::TreeScope::findAnchor):
2518         * html/HTMLFieldSetElement.cpp:
2519         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
2520         (WebCore::HTMLFieldSetElement::childrenChanged):
2521         * html/HTMLLabelElement.cpp:
2522         (WebCore::HTMLLabelElement::control):
2523         * html/HTMLMediaElement.cpp:
2524         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
2525         * html/HTMLObjectElement.cpp:
2526         (WebCore::HTMLObjectElement::parametersForPlugin):
2527         * rendering/FilterEffectRenderer.cpp:
2528         (WebCore::FilterEffectRenderer::buildReferenceFilter):
2529         * svg/SVGFilterPrimitiveStandardAttributes.h:
2530         (WebCore::isSVGFilterPrimitiveStandardAttributes):
2531         (WebCore::SVGFilterPrimitiveStandardAttributes):
2532         * svg/animation/SMILTimeContainer.cpp:
2533         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
2534         * svg/graphics/SVGImage.cpp:
2535         (WebCore::SVGImage::hasSingleSecurityOrigin):
2536
2537 2013-08-26  Andreas Kling  <akling@apple.com>
2538
2539         FocusController::focusedOrMainFrame() should return a reference.
2540         <https://webkit.org/b/120339>
2541
2542         Reviewed by Antti Koivisto.
2543
2544         Now that Page::mainFrame() returns a reference, we can make this return a reference
2545         too, since there's always either a focused or a main frame.
2546
2547         One hectogram of null checks removed as a result.
2548
2549 2013-08-26  Andreas Kling  <akling@apple.com>
2550
2551         Document's renderer is always a RenderView.
2552         <https://webkit.org/b/120304>
2553
2554         Reviewed by Darin Adler.
2555
2556         Let's enforce this better by storing a RenderView* instead of a plain RenderObject*.
2557         We should switch callers that grab at Document::renderer() to calling renderView()
2558         instead, but that's better done separately.
2559
2560         * dom/Document.cpp:
2561         (WebCore::Document::Document):
2562         (WebCore::Document::~Document):
2563         (WebCore::Document::setRenderView):
2564         (WebCore::Document::createRenderTree):
2565         (WebCore::Document::detach):
2566         (WebCore::Document::setInPageCache):
2567         * dom/Document.h:
2568         (WebCore::Document::renderView):
2569         (WebCore::Document::renderer):
2570         * html/parser/HTMLResourcePreloader.cpp:
2571         * rendering/RenderObject.cpp:
2572         (WebCore::RenderObject::setStyle):
2573         * rendering/RenderView.h:
2574         * svg/SVGSVGElement.cpp:
2575         (WebCore::SVGSVGElement::updateCurrentTranslate):
2576
2577 2013-08-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2578
2579         Font's fast code path doesn't handle partial runs correctly when kerning or ligatures are enabled
2580         https://bugs.webkit.org/show_bug.cgi?id=100050
2581
2582         Reviewed by Darin Adler.
2583
2584         Renamed m_characterIndex to m_characterIndexOfGlyph and gave it an inline size of 10,
2585         which covers around 66% of all cases. The rest of the cases are now preallocated to the
2586         upper limit which is length of the original TextRun.
2587
2588         * platform/graphics/FontFastPath.cpp:
2589         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
2590         (WebCore::Font::selectionRectForSimpleText):
2591         (WebCore::Font::offsetForPositionForSimpleText):
2592         * platform/graphics/WidthIterator.cpp:
2593         (WebCore::WidthIterator::WidthIterator):
2594         (WebCore::WidthIterator::advanceInternal):
2595         * platform/graphics/WidthIterator.h:
2596
2597 2013-08-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2598
2599         Implement DOM3 wheel event
2600         https://bugs.webkit.org/show_bug.cgi?id=94081
2601
2602         Reviewed by Darin Adler.
2603
2604         Add support for DOM Level 3 WheelEvent:
2605         http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent
2606
2607         Firefox, IE10 and since recently Blink already support it so
2608         it increases our cross-browser compatibility.
2609
2610         The non-standard 'mousewheel' event is still supported for backward
2611         compatibility. Note that the deltas returned by the mousewheel and
2612         the wheel events are not identical:
2613         - They have opposite signs.
2614         - The wheel event reports the actual amount of pixels that should be
2615         scrolled while the legacy mousewheel event reports a factor of the
2616         number of mouse wheel ticks (using a constant multiplier).
2617
2618         Tests: fast/events/wheelevent-basic.html
2619                fast/events/wheelevent-constructor.html
2620                fast/events/wheelevent-mousewheel-interaction.html
2621
2622         * dom/Document.h:
2623         * dom/Document.idl:
2624         * dom/Element.h:
2625         * dom/Element.idl:
2626         * dom/EventNames.h:
2627         * dom/EventTarget.cpp:
2628         (WebCore::legacyType):
2629         (WebCore::EventTarget::shouldObserveLegacyType):
2630         (WebCore::EventTarget::setupLegacyTypeObserverIfNeeded):
2631         (WebCore::EventTarget::fireEventListeners):
2632         * dom/EventTarget.h:
2633         * dom/Node.cpp:
2634         (WebCore::Node::didMoveToNewDocument):
2635         (WebCore::tryAddEventListener):
2636         (WebCore::tryRemoveEventListener):
2637         (WebCore::Node::defaultEventHandler):
2638         * dom/WheelEvent.cpp:
2639         (WebCore::WheelEventInit::WheelEventInit):
2640         (WebCore::WheelEvent::WheelEvent):
2641         (WebCore::WheelEvent::initWheelEvent):
2642         * dom/WheelEvent.h:
2643         (WebCore::WheelEvent::deltaX):
2644         (WebCore::WheelEvent::deltaY):
2645         (WebCore::WheelEvent::deltaZ):
2646         (WebCore::WheelEvent::wheelDelta):
2647         (WebCore::WheelEvent::wheelDeltaX):
2648         (WebCore::WheelEvent::wheelDeltaY):
2649         * dom/WheelEvent.idl:
2650         * html/HTMLAttributeNames.in:
2651         * html/HTMLElement.cpp:
2652         (WebCore::HTMLElement::eventNameForAttributeName):
2653         * page/DOMWindow.cpp:
2654         (WebCore::DOMWindow::addEventListener):
2655         (WebCore::DOMWindow::removeEventListener):
2656         * page/DOMWindow.h:
2657         * page/DOMWindow.idl:
2658         * page/EventHandler.cpp:
2659         (WebCore::EventHandler::defaultWheelEventHandler):
2660         * plugins/blackberry/PluginViewBlackBerry.cpp:
2661         (WebCore::PluginView::handleWheelEvent):
2662         * svg/SVGElementInstance.cpp:
2663         * svg/SVGElementInstance.h:
2664         * svg/SVGElementInstance.idl:
2665
2666 2013-08-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2667
2668         Assertion while scrolling news.google.com
2669         https://bugs.webkit.org/show_bug.cgi?id=115303
2670
2671         Reviewed by Anders Carlsson.
2672
2673         Do not relayout when accessing script elements during painting.
2674
2675         * html/HTMLEmbedElement.cpp:
2676         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
2677
2678 2013-08-27  Benjamin Poulain  <benjamin@webkit.org>
2679
2680         Remove DOMSettableTokenList's overload of add() and remove()
2681         https://bugs.webkit.org/show_bug.cgi?id=120341
2682
2683         Reviewed by Ryosuke Niwa.
2684
2685         Little refactoring to make other cleanups easier. Instead of modifying
2686         SpaceSplitString directly, rely on DOMTokenList ultimately changing
2687         the value, which in turn updates the tokens.
2688
2689         * html/DOMSettableTokenList.cpp:
2690         * html/DOMSettableTokenList.h:
2691         * html/DOMTokenList.h:
2692
2693 2013-08-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2694
2695         [GTK] Volume slider shows incorrect track when muted
2696         https://bugs.webkit.org/show_bug.cgi?id=120253
2697
2698         Reviewed by Philippe Normand.
2699
2700         When painting the volume bar, consider that it could be muted even
2701         then volume is different than zero.
2702
2703         * platform/gtk/RenderThemeGtk.cpp:
2704         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack): Asign
2705         painted volume as 0 when media is muted.
2706
2707 2013-08-26  Sam Weinig  <sam@webkit.org>
2708
2709         EditorInternalCommand should use Frame& where possible
2710         https://bugs.webkit.org/show_bug.cgi?id=120340
2711
2712         Reviewed by Andreas Kling.
2713
2714         Only isSupportedFromDOM still takes a Frame*, as it still has callers that expect null to work.
2715
2716         * dom/UserTypingGestureIndicator.cpp:
2717         * dom/UserTypingGestureIndicator.h:
2718         * editing/Editor.cpp:
2719         * editing/EditorCommand.cpp:
2720         * page/EventHandler.cpp:
2721
2722 2013-08-26  Ryosuke Niwa  <rniwa@webkit.org>
2723
2724         Elements in a node list of the form element's name getter should not be added to the past names map
2725         https://bugs.webkit.org/show_bug.cgi?id=120279
2726
2727         Reviewed by Darin Adler.
2728
2729         Don't add the element in the named items to the past names map when there are multiple elements.
2730         This matches IE10's behavior and the specified behavior in HTML5:
2731         http://www.w3.org/TR/2013/WD-html51-20130528/forms.html#dom-form-nameditem
2732
2733         Test: fast/forms/past-names-map-should-not-contain-nodelist-item.html
2734
2735         * html/HTMLFormElement.cpp:
2736         (WebCore::HTMLFormElement::getNamedElements):
2737
2738 2013-08-26  Ryosuke Niwa  <rniwa@webkit.org>
2739
2740         Windows build fix after r154658.
2741
2742         * page/AutoscrollController.cpp:
2743         (WebCore::getMainFrame):
2744
2745 2013-08-26  Andreas Kling  <akling@apple.com>
2746
2747         Page::mainFrame() should return a reference.
2748         <http://webkit.org/b/119677>
2749
2750         Reviewed by Antti Koivisto.
2751
2752         Page always creates the main Frame by itself now, so it will never be null during the Page's lifetime.
2753
2754         Let Page::mainFrame() return Frame& and remove a sea of null checks.
2755
2756 2013-08-26  Sam Weinig  <sam@webkit.org>
2757
2758         Remove two unnecessary .get()s.
2759
2760         Reviewed by Anders Carlsson.
2761
2762         * editing/Editor.h:
2763         (WebCore::Editor::killRing):
2764         (WebCore::Editor::spellChecker):
2765
2766 2013-08-26  Joseph Pecoraro  <pecoraro@apple.com>
2767
2768         Web Inspector: We should regenerate InspectorBackendCommands.js for Legacy Inspector.json versions
2769         https://bugs.webkit.org/show_bug.cgi?id=120242
2770
2771         Reviewed by Timothy Hatcher.
2772
2773         - Update the Inspector.json CodeGenerator to include an output_js_dir.
2774         - Cleanup multiple trailing newlines in some of the generated files.
2775         - Provide a way to not verify runtime casts, needed for Legacy inputs.
2776
2777         * CMakeLists.txt:
2778         * DerivedSources.make:
2779         * DerivedSources.pri:
2780         * GNUmakefile.am:
2781         * inspector/CodeGeneratorInspector.py:
2782         (resolve_all_types):
2783         (SmartOutput.close):
2784
2785 2013-08-26  Sam Weinig  <sam@webkit.org>
2786
2787         AlternativeTextController should hold onto Frame as a reference
2788         https://bugs.webkit.org/show_bug.cgi?id=120327
2789
2790         Reviewed by Andreas Kling.
2791
2792         While in the area I also:
2793           - Reference-ified Editor::killRing().
2794           - Const-ified Editor::m_killRing, Editor::m_spellChecker, and Editor::m_alternativeTextController.
2795
2796         * editing/AlternativeTextController.cpp:
2797         (WebCore::AlternativeTextController::AlternativeTextController):
2798         (WebCore::AlternativeTextController::stopPendingCorrection):
2799         (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
2800         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2801         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
2802         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
2803         (WebCore::AlternativeTextController::timerFired):
2804         (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
2805         (WebCore::AlternativeTextController::rootViewRectForRange):
2806         (WebCore::AlternativeTextController::respondToChangedSelection):
2807         (WebCore::AlternativeTextController::respondToAppliedEditing):
2808         (WebCore::AlternativeTextController::respondToUnappliedEditing):
2809         (WebCore::AlternativeTextController::alternativeTextClient):
2810         (WebCore::AlternativeTextController::editorClient):
2811         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
2812         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
2813         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
2814         (WebCore::AlternativeTextController::insertDictatedText):
2815         (WebCore::AlternativeTextController::applyDictationAlternative):
2816         * editing/AlternativeTextController.h:
2817         (WebCore::AlternativeTextController::UNLESS_ENABLED):
2818         * editing/Editor.cpp:
2819         (WebCore::Editor::Editor):
2820         (WebCore::Editor::addToKillRing):
2821         * editing/Editor.h:
2822         (WebCore::Editor::killRing):
2823         * editing/EditorCommand.cpp:
2824         (WebCore::executeYank):
2825         (WebCore::executeYankAndSelect):
2826
2827 2013-08-23  Andy Estes  <aestes@apple.com>
2828
2829         Fix issues found by the Clang Static Analyzer
2830         https://bugs.webkit.org/show_bug.cgi?id=120230
2831
2832         Reviewed by Darin Adler.
2833
2834         * WebCore.xcodeproj/project.pbxproj: Removed FoundationExtras.h.
2835         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed CFAutoreleaseHelper().
2836         (AXTextMarkerRange): Used HardAutorelease() instead of
2837         CFAutoreleaseHelper().
2838         (AXTextMarkerRangeStart): Ditto.
2839         (AXTextMarkerRangeEnd): Ditto.
2840         (textMarkerForVisiblePosition): Ditto.
2841         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2842         (-[WebCoreAVFMovieObserver initWithCallback:]): Called [super init]
2843         first so that we don't later use ivars from the wrong self.
2844         (-[WebCoreAVFLoaderDelegate initWithCallback:]): Ditto.
2845         * platform/mac/FoundationExtras.h: Removed.
2846         * platform/mac/KURLMac.mm:
2847         (WebCore::KURL::operator NSURL *): Used WTF's HardAutorelease().
2848         * platform/mac/WebCoreNSURLExtras.mm:
2849         (WebCore::mapHostNameWithRange): Used HardAutorelease() instead of
2850         WebCoreCFAutorelease().
2851         (WebCore::URLWithData): Ditto.
2852         (WebCore::userVisibleString): Ditto.
2853         (WebCore::URLByRemovingComponentAndSubsequentCharacter): Used Vector<>
2854         with an inline capacity rather than heap-allocating a buffer.
2855         * platform/mac/WebCoreObjCExtras.h: Used HardAutorelease() instead of
2856         WebCoreCFAutorelease().
2857         * platform/text/mac/StringImplMac.mm:
2858         (WTF::StringImpl::operator NSString *): Used WTF's HardAutorelease().
2859
2860 2013-08-26  Pratik Solanki  <psolanki@apple.com>
2861
2862         Page::console() should return a reference
2863         https://bugs.webkit.org/show_bug.cgi?id=120320
2864
2865         Reviewed by Darin Adler.
2866
2867         Page::m_console is never NULL so console() can just return a reference.
2868
2869         * css/CSSParser.cpp:
2870         (WebCore::CSSParser::logError):
2871         * dom/Document.cpp:
2872         (WebCore::Document::addConsoleMessage):
2873         (WebCore::Document::addMessage):
2874         * page/DOMWindow.cpp:
2875         (WebCore::DOMWindow::pageConsole):
2876         * page/Page.h:
2877         (WebCore::Page::console):
2878         * xml/XSLStyleSheetLibxslt.cpp:
2879         (WebCore::XSLStyleSheet::parseString):
2880         * xml/XSLTProcessorLibxslt.cpp:
2881         (WebCore::docLoaderFunc):
2882
2883 2013-08-26  Rob Buis  <rwlbuis@webkit.org>
2884
2885         Lonely stop crashes
2886         https://bugs.webkit.org/show_bug.cgi?id=87964
2887
2888         Reviewed by Darin Adler.
2889
2890         Provide a nodeAtFloatPoint implementation for RenderSVGGradientStop to avoid hitting the assert in RenderObject::nodeAtFloatPoint.
2891
2892         Test: svg/custom/stop-crash-hittest.svg
2893
2894         * rendering/svg/RenderSVGGradientStop.h:
2895
2896 2013-08-26  Sam Weinig  <sam@webkit.org>
2897
2898         Editor::spellChecker() should return a reference
2899         https://bugs.webkit.org/show_bug.cgi?id=120325
2900
2901         Reviewed by Anders Carlsson.
2902
2903         * editing/Editor.cpp:
2904         (WebCore::Editor::Editor):
2905         * editing/Editor.h:
2906         (WebCore::Editor::spellChecker):
2907         * editing/SpellChecker.cpp:
2908         (WebCore::SpellChecker::SpellChecker):
2909         (WebCore::SpellChecker::client):
2910         (WebCore::SpellChecker::isAsynchronousEnabled):
2911         (WebCore::SpellChecker::didCheck):
2912         (WebCore::SpellChecker::didCheckSucceed):
2913         * editing/SpellChecker.h:
2914         * page/EditorClient.h:
2915         * testing/Internals.cpp:
2916         (WebCore::Internals::lastSpellCheckRequestSequence):
2917         (WebCore::Internals::lastSpellCheckProcessedSequence):
2918
2919 2013-08-26  Bem Jones-Bey  <bjonesbe@adobe.com>
2920
2921         Optimize FloatIntervalSearchAdapter::collectIfNeeded
2922         https://bugs.webkit.org/show_bug.cgi?id=120237
2923
2924         Reviewed by David Hyatt.
2925
2926         This is a port of 3 Blink patches:
2927         https://codereview.chromium.org/22463002 (By shatch@chromium.org)
2928         https://chromiumcodereview.appspot.com/22909005 (By me)
2929         https://chromiumcodereview.appspot.com/23084002 (By me)
2930
2931         shatch optimized FloatIntervalSearchAdapter by having it store the
2932         outermost float instead of making a bunch of calls to
2933         logical(Left/Right/Bottom)ForFloat, and then only making that call
2934         once when heightRemaining needs to be computed.
2935
2936         I noticed that now we were storing both the last float encountered and
2937         the outermost float, and that the behavior for shape-outside wasn't
2938         significantly changed by using the outermost float instead of the last
2939         float encountered (and in most cases, using the outermost float gives
2940         more reasonable behavior). Since this isn't covered in the spec yet, I
2941         changed shape-outside to use the outermost float, making it so that we
2942         only need to store one float pointer when walking the placed floats
2943         tree, and keeping the performance win.
2944
2945         Also while changing updateOffsetIfNeeded, removed const, since that is
2946         a lie. Nothing about that method is const.
2947
2948         Test: fast/shapes/shape-outside-floats/shape-outside-floats-outermost.html
2949
2950         * rendering/RenderBlock.cpp:
2951         (WebCore::::updateOffsetIfNeeded):
2952         (WebCore::::collectIfNeeded):
2953         (WebCore::::getHeightRemaining):
2954         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
2955         (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
2956         * rendering/RenderBlock.h:
2957         (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
2958         (WebCore::RenderBlock::FloatIntervalSearchAdapter::outermostFloat):
2959
2960 2013-08-26  Alexey Proskuryakov  <ap@apple.com>
2961
2962         [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
2963         https://bugs.webkit.org/show_bug.cgi?id=113094
2964
2965         Reviewed by Darin Adler.
2966
2967         Mac platform implementation has checks for pasteboard change count, but it
2968         didn't use to update the count when writing to pasteboad from JavaScript.
2969
2970         * platform/PasteboardStrategy.h: Changed changeCount function to return a long
2971         instead of an int, as the underlying Mac type is NSInteger. Changed all methods
2972         that modify the pasteboard to return a new change count.
2973
2974         * platform/PlatformPasteboard.h: Changed all methods that modify the pasteboard
2975         to return a new change count.
2976
2977         * platform/mac/PasteboardMac.mm:
2978         (WebCore::Pasteboard::clear): Update m_changeCount.
2979         (WebCore::Pasteboard::writeSelectionForTypes): Ditto.
2980         (WebCore::Pasteboard::writePlainText): Ditto.
2981         (WebCore::writeURLForTypes): Ditto.
2982         (WebCore::Pasteboard::writeURL): Ditto.
2983         (WebCore::writeFileWrapperAsRTFDAttachment): Ditto.
2984         (WebCore::Pasteboard::writeImage): Ditto.
2985         (WebCore::Pasteboard::writePasteboard): Ditto.
2986         (WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
2987         (WebCore::Pasteboard::writeString): Ditto.
2988
2989         * platform/mac/PlatformPasteboardMac.mm:
2990         (WebCore::PlatformPasteboard::changeCount): Changed returned type to long to avoid
2991         data loss.
2992         (WebCore::PlatformPasteboard::copy): Return new change count.
2993         (WebCore::PlatformPasteboard::addTypes): Ditto.
2994         (WebCore::PlatformPasteboard::setTypes): Ditto.
2995         (WebCore::PlatformPasteboard::setBufferForType): Ditto.
2996         (WebCore::PlatformPasteboard::setPathnamesForType): Ditto.
2997         (WebCore::PlatformPasteboard::setStringForType): Ditto. Replaced -[NSURL writeToPasteboard:]
2998         with an equivalent implemnentation that tells use whether writing was successful.
2999         There is difference with invalid URL string handling - we used to silently ignore
3000         such requets, but set pasteboard content to empty URL now.
3001
3002 2013-08-24  Sam Weinig  <sam@webkit.org>
3003
3004         Add support for Promises
3005         https://bugs.webkit.org/show_bug.cgi?id=120260
3006
3007         Reviewed by Darin Adler.
3008
3009         Add an initial implementation of Promises - http://dom.spec.whatwg.org/#promises.
3010         - Despite Promises being defined in the DOM, the implementation is being put in JSC
3011           in preparation for the Promises eventually being defined in ECMAScript.
3012
3013         Tests: fast/js/Promise-already-fulfilled.html
3014                fast/js/Promise-already-rejected.html
3015                fast/js/Promise-already-resolved.html
3016                fast/js/Promise-catch-in-workers.html
3017                fast/js/Promise-catch.html
3018                fast/js/Promise-chain.html
3019                fast/js/Promise-exception.html
3020                fast/js/Promise-fulfill-in-workers.html
3021                fast/js/Promise-fulfill.html
3022                fast/js/Promise-init-in-workers.html
3023                fast/js/Promise-init.html
3024                fast/js/Promise-reject-in-workers.html
3025                fast/js/Promise-reject.html
3026                fast/js/Promise-resolve-chain.html
3027                fast/js/Promise-resolve-in-workers.html
3028                fast/js/Promise-resolve-with-then-exception.html
3029                fast/js/Promise-resolve-with-then-fulfill.html
3030                fast/js/Promise-resolve-with-then-reject.html
3031                fast/js/Promise-resolve.html
3032                fast/js/Promise-simple-fulfill-inside-callback.html
3033                fast/js/Promise-simple-fulfill.html
3034                fast/js/Promise-simple-in-workers.html
3035                fast/js/Promise-simple.html
3036                fast/js/Promise-static-fulfill.html
3037                fast/js/Promise-static-reject.html
3038                fast/js/Promise-static-resolve.html
3039                fast/js/Promise-then-in-workers.html
3040                fast/js/Promise-then-without-callbacks-in-workers.html
3041                fast/js/Promise-then-without-callbacks.html
3042                fast/js/Promise-then.html
3043                fast/js/Promise-types.html
3044                fast/js/Promise.html
3045
3046         * GNUmakefile.list.am:
3047         * Target.pri:
3048         * UseJSC.cmake:
3049         * WebCore.vcxproj/WebCore.vcxproj:
3050         * WebCore.vcxproj/WebCore.vcxproj.filters:
3051         * WebCore.xcodeproj/project.pbxproj:
3052         * bindings/js/JSBindingsAllInOne.cpp:
3053         Add new files.
3054
3055         * bindings/js/JSDOMGlobalObjectTask.cpp: Added.
3056         (WebCore::JSGlobalObjectCallback::create):
3057         (WebCore::JSGlobalObjectCallback::~JSGlobalObjectCallback):
3058         (WebCore::JSGlobalObjectCallback::call):
3059         (WebCore::JSGlobalObjectCallback::JSGlobalObjectCallback):
3060         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
3061         (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask):
3062         (WebCore::JSGlobalObjectTask::performTask):
3063         * bindings/js/JSDOMGlobalObjectTask.h: Added.
3064         (WebCore::JSGlobalObjectTask::create):
3065         Add a new task type to be used with the GlobalObjectMethodTable's new QueueTaskToEventLoop callback.
3066
3067         * bindings/js/JSDOMWindowBase.cpp:
3068         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
3069         * bindings/js/JSDOMWindowBase.h:
3070         Implement the GlobalObjectMethodTable callback, QueueTaskToEventLoop. 
3071
3072         * bindings/js/JSMainThreadExecState.h:
3073         All using JSMainThreadExecState as a simple RAII object.
3074
3075         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3076         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
3077         (WebCore::JSWorkerGlobalScopeBase::allowsAccessFrom):
3078         (WebCore::JSWorkerGlobalScopeBase::supportsProfiling):
3079         (WebCore::JSWorkerGlobalScopeBase::supportsRichSourceInfo):
3080         (WebCore::JSWorkerGlobalScopeBase::shouldInterruptScript):
3081         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled):
3082         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
3083         * bindings/js/JSWorkerGlobalScopeBase.h:
3084         Add a GlobalObjectMethodTable and implement QueueTaskToEventLoop. Forward the other callbacks
3085         to JSGlobalObject so they retain their existing behavior.
3086
3087 2013-08-26  Rob Buis  <rwlbuis@webkit.org>
3088
3089         Computed style of fill/stroke properties incorrect on references
3090         https://bugs.webkit.org/show_bug.cgi?id=114761
3091
3092         Reviewed by Darin Adler.
3093
3094         The computed style of the fill and stroke properties did not include
3095         the url() function. Added the url() string to output.
3096
3097         Updated existing tests to cover the issue.
3098
3099         * css/CSSPrimitiveValue.cpp: Cleanup.
3100         (WebCore::CSSPrimitiveValue::customCssText):
3101         * svg/SVGPaint.cpp: Added "url("
3102         (WebCore::SVGPaint::customCssText):
3103
3104 2013-08-26  Zan Dobersek  <zdobersek@igalia.com>
3105
3106         Prettify generated build guards in HTMLElementFactory.cpp
3107         https://bugs.webkit.org/show_bug.cgi?id=120310
3108
3109         Reviewed by Darin Adler.
3110
3111         Build guards should wrap the constructor definitions without empty lines between
3112         the guards and the constructor code. Similarly, build guards for addTag calls
3113         shouldn't put an empty line after the build guard closure.
3114
3115         * dom/make_names.pl:
3116         (printConstructorInterior):
3117         (printConstructors):
3118         (printFunctionInits):
3119
3120 2013-08-26  Robert Hogan  <robert@webkit.org>
3121
3122         Avoid painting every non-edge collapsed border twice over
3123         https://bugs.webkit.org/show_bug.cgi?id=119759
3124
3125         Reviewed by David Hyatt.
3126
3127         Every collapsed border that isn't on the edge of a table gets painted at least twice, once by each 
3128         adjacent cell. The joins are painted four times. This is unnecessary and results in tables with semi-transparent
3129         borders getting rendered incorrectly - each border adjoing two cells is painted twice and ends up darker than it should be. 
3130
3131         Fixing the overpainting at joins is another day's work. This patch ensures each collapsed border inside a table is only
3132         painted once. It does this by only allowing cells at the top and left edge of the table to paint their top and left collapsed borders.
3133         All the others can only paint their right and bottom collapsed border. This works because the borders are painted from bottom right to top left.
3134
3135         Tests: fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl.html
3136                fast/table/border-collapsing/collapsed-borders-adjoining-sections.html
3137
3138         * rendering/RenderTableCell.cpp:
3139         (WebCore::RenderTableCell::paintCollapsedBorders):
3140
3141 2013-08-26  Andreas Kling  <akling@apple.com>
3142
3143         Unreviewed build fix.
3144
3145         * page/Page.cpp:
3146         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
3147
3148 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
3149
3150         Unreviewed buid fix.
3151
3152         * page/Page.cpp: 
3153         (WebCore::Page::setNeedsRecalcStyleInAllFrames): Remove extra '{' character.
3154
3155 2013-08-26  Pratik Solanki  <psolanki@apple.com>
3156
3157         PageGroup::groupSettings() should return a reference
3158         https://bugs.webkit.org/show_bug.cgi?id=120319
3159
3160         Reviewed by Andreas Kling.
3161
3162         PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
3163
3164         * Modules/indexeddb/IDBFactory.cpp:
3165         * page/PageGroup.h:
3166         (WebCore::PageGroup::groupSettings):
3167         * storage/StorageNamespaceImpl.cpp:
3168         (WebCore::StorageNamespaceImpl::localStorageNamespace):
3169         * workers/DefaultSharedWorkerRepository.cpp:
3170         (WebCore::SharedWorkerProxy::groupSettings):
3171         * workers/WorkerMessagingProxy.cpp:
3172         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
3173
3174 2013-08-26  Andreas Kling  <akling@apple.com>
3175
3176         WebCore: Let Page create the main Frame.
3177         <https://webkit.org/b/119964>
3178
3179         Reviewed by Anders Carlsson.
3180
3181         Previously, Frame::create() would call Page::setMainFrame() when constructing the
3182         main Frame for a Page. Up until that point, Page had a null mainFrame().
3183
3184         To guarantee that Page::mainFrame() is never null, we re-order things so that
3185         Page is responsible for creating its own main Frame. We do this at the earliest
3186         possible point; in the Page constructor initializer list.
3187
3188         Constructing a Frame requires a FrameLoaderClient*, so I've added such a field to
3189         the PageClients struct.
3190
3191         When creating a WebKit-layer frame, we now wrap the already-instantiated
3192         Page::mainFrame() instead of creating a new Frame.
3193
3194         * loader/EmptyClients.cpp:
3195         (WebCore::fillWithEmptyClients):
3196
3197             Add an EmptyFrameLoaderClient to the PageClients constructed here.
3198
3199         * inspector/InspectorOverlay.cpp:
3200         (WebCore::InspectorOverlay::overlayPage):
3201         * svg/graphics/SVGImage.cpp:
3202         (WebCore::SVGImage::dataChanged):
3203
3204             Updated to wrap Page::mainFrame() in a FrameView instead of creating their
3205             own Frame manually.
3206
3207         * page/Frame.cpp:
3208         (WebCore::Frame::create):
3209         * page/Page.h:
3210
3211             Remove Page::setMainFrame() and the only call site.
3212
3213         * page/Page.cpp:
3214         (WebCore::Page::Page):
3215
3216             Construct Page::m_mainFrame in the initializer list.
3217
3218         (WebCore::Page::PageClients::PageClients):
3219
3220             Add "FrameLoaderClient* loaderClientForMainFrame" to PageClients.
3221
3222         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
3223
3224             Null-check the Frame::document() before calling through on it. This would
3225             otherwise crash when changing font-related Settings before calling init() on
3226             the Frame (like InspectorOverlay does.)
3227
3228 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
3229
3230         [Windows] Unreviewed build fix.
3231
3232         * rendering/RenderMediaControls.cpp: Remove references to QuickTime controls
3233         that are no longer part of WKSI.
3234         (wkHitTestMediaUIPart): 
3235         (wkMeasureMediaUIPart):
3236         (wkDrawMediaUIPart):
3237         (wkDrawMediaSliderTrack):
3238
3239 2013-08-26  Gurpreet Kaur  <gur.trio@gmail.com>
3240
3241         <https://webkit.org/b/106133> document.body.scrollTop & document.documentElement.scrollTop differ cross-browser
3242
3243         Reviewed by Darin Adler.
3244
3245         Webkit always uses document.body.scrollTop whether quirks or
3246         standard mode. Similiar behaviour is for document.body.scrollLeft.
3247         As per the specification webkit should return document.body.scrollTop
3248         for quirks mode and document.documentElement.scrollTop for standard mode.
3249         Same for document.body.scrollLeft and document.documentElement.scrollLeft.
3250
3251         Tests: fast/dom/Element/scrollLeft-Quirks.html
3252                fast/dom/Element/scrollLeft.html
3253                fast/dom/Element/scrollTop-Quirks.html
3254                fast/dom/Element/scrollTop.html
3255
3256         * dom/Element.cpp:
3257         (WebCore::Element::scrollLeft):
3258         (WebCore::Element::scrollTop): 
3259         If the element does not have any associated CSS layout box or the element
3260         is the root element and the Document is in quirks mode return zero.
3261         Else If the element is the root element return the value of scrollY
3262         for scrollTop and scrollX for scrollLeft.
3263         * html/HTMLBodyElement.cpp:
3264         (WebCore::HTMLBodyElement::scrollLeft):
3265         (WebCore::HTMLBodyElement::scrollTop):
3266         If the element is the HTML body element, the Document is in quirks mode,
3267         return the value of scrollY for scrollTop and scrollX for scrollLeft.
3268
3269 2013-08-26  Antti Koivisto  <antti@apple.com>
3270
3271         REGRESSION (r154581): Some plugin tests failing in debug bots
3272         https://bugs.webkit.org/show_bug.cgi?id=120315
3273
3274         Reviewed by Darin Adler.
3275         
3276         We are hitting the new no-event-dispatch-while-iterating assertion.
3277
3278         Detaching deletes a plugin which modifies DOM while it dies.
3279
3280         * dom/Document.cpp:
3281         (WebCore::Document::createRenderTree):
3282         (WebCore::Document::detach):
3283         
3284             Don't iterate at all. Document never has more than one Element child anyway.
3285
3286 2013-08-26  David Kilzer  <ddkilzer@apple.com>
3287
3288         BUILD FIX (r154580): RenderObject::document() returns a reference
3289
3290         See: <https://webkit.org/b/120272>
3291
3292         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3293         (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
3294         (AXAttributeStringSetHeadingLevel):
3295
3296 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
3297
3298         [Windows] Build fix after r154578.  Return Vector<String>() instead
3299         of ListHashSet<String>().
3300
3301         * platform/win/PasteboardWin.cpp:
3302         (WebCore::Pasteboard::types):
3303
3304 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
3305
3306         [Windows] Build fix after r154580.
3307
3308         * rendering/RenderThemeWin.cpp: Mirror changes made for other ports now that
3309         Frame is known to always be valid when in a render tree. This allows us to
3310         get rid of some unneeded null checks.
3311         (WebCore::RenderThemeWin::getThemeData):
3312         (WebCore::RenderThemeWin::paintMenuList):
3313
3314 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
3315
3316         [Windows] Build fix after r154554.
3317
3318         * page/AutoscrollController.cpp: Correct various places where pointers are now
3319         references.
3320         (WebCore::AutoscrollController::stopAutoscrollTimer):
3321         (WebCore::AutoscrollController::startPanScrolling):
3322         (WebCore::AutoscrollController::autoscrollTimerFired):
3323
3324 2013-08-26  Andreas Kling  <akling@apple.com>
3325
3326         Move DocumentTiming inside ENABLE(WEB_TIMING) guards.
3327         <https://webkit.org/b/120281>
3328
3329         Reviewed by Anders Carlsson.
3330
3331         Looks like this struct is only used by other ENABLE(WEB_TIMING) code, so don't bother
3332         filling it in if we're not building like that.
3333
3334         * dom/Document.cpp:
3335         (WebCore::Document::setReadyState):
3336         (WebCore::Document::finishedParsing):
3337         * dom/Document.h:
3338         * dom/DocumentTiming.h:
3339
3340 2013-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3341
3342         [GTK] Fix compile warning in WebKitDOMCustom
3343         https://bugs.webkit.org/show_bug.cgi?id=120286
3344
3345         Reviewed by Philippe Normand.
3346
3347         * bindings/gobject/WebKitDOMCustom.cpp:
3348         (webkit_dom_html_element_get_item_type): Add return 0.
3349
3350 2013-08-25  Ryosuke Niwa  <rniwa@webkit.org>
3351
3352         JSHTMLFormElement::canGetItemsForName needlessly allocates a Vector
3353         https://bugs.webkit.org/show_bug.cgi?id=120277
3354
3355         Reviewed by Sam Weinig.
3356
3357         Added HTMLFormElement::hasNamedElement and used it in JSHTMLFormElement::canGetItemsForName.
3358
3359         This required fixing a bug in HTMLFormElement::getNamedElements that the first call to getNamedElements
3360         after replacing an element A with another element B of the same name caused it to erroneously append A
3361         to namedItems via the aliases mapping. Because getNamedElements used to be always called in pairs, this
3362         wrong behavior was never visible to the Web. Fixed the bug by not adding the old element to namedItem
3363         when namedItem's size is 1.
3364
3365         Also renamed m_elementAliases to m_pastNamesMap along with related member functions.
3366
3367         No new tests are added since there should be no Web exposed behavioral change.
3368
3369         * bindings/js/JSHTMLFormElementCustom.cpp:
3370         (WebCore::JSHTMLFormElement::canGetItemsForName):
3371         * html/HTMLFormElement.cpp:
3372         (WebCore::HTMLFormElement::elementFromPastNamesMap):
3373         (WebCore::HTMLFormElement::addElementToPastNamesMap):
3374         (WebCore::HTMLFormElement::hasNamedElement):
3375         (WebCore::HTMLFormElement::getNamedElements):
3376         * html/HTMLFormElement.h:
3377
3378 2013-08-25  Andreas Kling  <akling@apple.com>
3379
3380         RenderLayerBacking::renderer() should return a reference.
3381         <https://webkit.org/b/120280>
3382
3383         Reviewed by Anders Carlsson.
3384
3385         It's just a forwarding call to RenderLayer::renderer() which already returns a reference.
3386
3387 2013-08-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3388
3389         Add toSVGMissingGlyphElement(), and use it.
3390         https://bugs.webkit.org/show_bug.cgi?id=120197
3391
3392         Reviewed by Andreas Kling.
3393
3394         As a step to clean-up static_cast<SVGXXX>, toSVGMissingGlyphElement() is added to clean-up
3395         static_cast<SVGMissingGlyphElement*>.
3396
3397         * svg/SVGFontElement.cpp:
3398         (WebCore::SVGFontElement::firstMissingGlyphElement):
3399         (WebCore::SVGFontElement::ensureGlyphCache):
3400         * svg/SVGMissingGlyphElement.h:
3401         (WebCore::toSVGMissingGlyphElement):
3402
3403 2013-08-25  Andreas Kling  <akling@apple.com>
3404
3405         RenderLayer::renderer() should return a reference.
3406         <https://webkit.org/b/120276>
3407
3408         Reviewed by Anders Carlsson.
3409
3410         RenderLayer is always created with a renderer, so make renderer() (and m_renderer) references.
3411         Nuked an assortment of useless null checks.
3412
3413 2013-08-25  Antti Koivisto  <antti@apple.com>
3414
3415         Element child and descendant iterators
3416         https://bugs.webkit.org/show_bug.cgi?id=120248
3417
3418         Reviewed by Sam Weinig and Andreas Kling.
3419
3420         Add iterators for Element children and descendants.
3421         
3422         To iterate over element children:
3423         
3424         #include "ChildIterator.h"
3425         
3426         for (auto it = elementChildren(this).begin(), end = elementChildren(this).end(); it != end; ++it) {
3427             Element& element = *it;
3428             ...
3429
3430         for (auto it = childrenOfType<HTMLAreaElement>(this).begin(), end = childrenOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
3431             HTMLAreaElement& area = *it;
3432             ...
3433
3434         To iteratate over element descendants in pre-order:
3435         
3436         #include "DescendantIterator.h"
3437         
3438         for (auto it = elementDescendants(this).begin(), end = elementDescendants(this).end(); it != end; ++it) {
3439             Element& element = *it;
3440             ...
3441
3442         for (auto it = descendantsOfType<HTMLAreaElement>(this).begin(), end = descendantsOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
3443             HTMLAreaElement& area = *it;
3444             ...
3445             
3446         The iterators assert against DOM mutations and event dispatch while iterating in debug builds.
3447             
3448         They are compatible with C++11 range-based for loops. In the future we can use
3449         
3450         for (auto& element : elementChildren(this))
3451             ...
3452
3453         etc.
3454         
3455         The patch all uses the new iterators in a few places.
3456
3457         * WebCore.xcodeproj/project.pbxproj:
3458         * accessibility/AccessibilityNodeObject.cpp:
3459         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
3460         (WebCore::siblingWithAriaRole):
3461         * accessibility/AccessibilityRenderObject.cpp:
3462         * accessibility/AccessibilityTable.cpp:
3463         (WebCore::AccessibilityTable::isDataTable):
3464         * dom/ChildIterator.h: Added.
3465         (WebCore::ChildIterator::operator*):
3466         (WebCore::ChildIterator::operator->):
3467         (WebCore::::ChildIterator):
3468         (WebCore::::operator):
3469         (WebCore::=):
3470         (WebCore::::ChildIteratorAdapter):
3471         (WebCore::::begin):
3472         (WebCore::::end):
3473         (WebCore::elementChildren):
3474         (WebCore::childrenOfType):
3475      &nb