Give NPAPI post requests a default content type
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-06-20  Anders Carlsson  <andersca@apple.com>
2
3         Give NPAPI post requests a default content type
4         https://bugs.webkit.org/show_bug.cgi?id=134120
5
6         Reviewed by Andreas Kling.
7
8         * WebCore.exp.in:
9
10 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
11
12         REGRESSION (r169972): fix issue when removing masks from compositing layers
13         https://bugs.webkit.org/show_bug.cgi?id=134118
14         <rdar://problem/17366654>
15
16         Reviewed by Dean Jackson.
17         
18         After r169972 when removing the mask, we could destroy the mask
19         layer before the call into m_graphicsLayer->setMaskLayer(), which would
20         try to call functions on the old mask. Fix by clearing the mask layer
21         on the GraphicsLayer before the mask layer gets destroyed.
22
23         Test: compositing/masks/toggle-mask.html
24
25         * rendering/RenderLayerBacking.cpp:
26         (WebCore::RenderLayerBacking::updateConfiguration):
27         (WebCore::RenderLayerBacking::updateMaskLayer):
28         * rendering/RenderLayerBacking.h:
29
30 2014-06-20  Andreas Kling  <akling@apple.com>
31
32         [Cocoa] Release freed up blocks from the JS heap after simulated memory pressure.
33         <https://webkit.org/b/134112>
34
35         Reviewed by Mark Hahnenberg.
36
37         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
38         (WebCore::MemoryPressureHandler::install):
39
40 2014-06-20  Zalan Bujtas  <zalan@apple.com>
41
42         Remove redundant RenderLayer::computeOffsetFromRoot() function.
43         https://bugs.webkit.org/show_bug.cgi?id=134088
44
45         Reviewed by Benjamin Poulain.
46
47         No change in functionality.
48
49         * rendering/RenderLayer.cpp:
50         (WebCore::RenderLayer::calculateClipRects):
51         (WebCore::RenderLayer::computeOffsetFromRoot): Deleted.
52         * rendering/RenderLayer.h:
53
54 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
55
56         [iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord previews)
57         https://bugs.webkit.org/show_bug.cgi?id=134085
58         <rdar://problem/16440586>
59
60         Reviewed by Tim Horton.
61         
62         When nodes were detached from the scrolling tree, we would previously throw away
63         all descendant nodes, expecting that they would be re-attached as we walk the compositing
64         layer tree in RenderLayerCompositor.
65         
66         However, this doesn't work across frame boundaries; the subframe may never update
67         its compositing layers again, so would lose all its scrolling nodes.
68         
69         Fix by having ScrollingStateTree::detachNode() by default set aside subframe nodes
70         into a hash map. On reattach, we'll look in the hash map and pull out an existing node
71         (with its children intact) if possible.
72
73         Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html
74                platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html
75                platform/mac-wk2/tiled-drawing/scrolling/frames/remove-coordinated-frame.html
76
77         * page/scrolling/ScrollingStateNode.cpp:
78         (WebCore::ScrollingStateNode::ScrollingStateNode):
79         * page/scrolling/ScrollingStateTree.cpp:
80         (WebCore::ScrollingStateTree::attachNode):
81         (WebCore::ScrollingStateTree::detachNode):
82         (WebCore::ScrollingStateTree::clear):
83         (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
84         (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
85         * page/scrolling/ScrollingStateTree.h:
86         * page/scrolling/ScrollingTree.cpp:
87         (WebCore::ScrollingTree::commitNewTreeState): Go back to removing the deleted
88         nodes from m_nodeMap first.
89         (WebCore::ScrollingTree::removeDestroyedNodes): There is no need for this to
90         actually make use of ScrollingTreeNode* any more; the ASSERT(!node->parent())
91         is bogus because it can fire when whole subtrees are removed, and to clear the
92         latched node we just need the ID.
93
94 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
95
96         Handle scrolling tree modifications which remove intermediate nodes
97         https://bugs.webkit.org/show_bug.cgi?id=134082
98
99         Reviewed by Tim Horton.
100
101         When updating the scrolling tree from the state tree, we failed to maintain
102         the children arrays correctly. Fix by removing all children on scrolling nodes,
103         and allowing the calls on children to add them back. A temporary hash map
104         keeps the nodes alive.
105         
106         The state tree's m_nodesRemovedSinceLastCommit was also made into a HashSet,
107         to make it easier to handle removal followed by re-insertion.
108
109         * WebCore.exp.in:
110         * page/scrolling/ScrollingStateTree.cpp:
111         (WebCore::ScrollingStateTree::attachNode): If a node is (possibly re-)added,
112         remove it from m_nodesRemovedSinceLastCommit.remove.
113         (WebCore::ScrollingStateTree::willRemoveNode):
114         (WebCore::ScrollingStateTree::setRemovedNodes):
115         * page/scrolling/ScrollingStateTree.h:
116         (WebCore::ScrollingStateTree::removedNodes):
117         * page/scrolling/ScrollingTree.cpp:
118         (WebCore::ScrollingTree::commitNewTreeState):
119         (WebCore::ScrollingTree::updateTreeFromStateNode): Clean up to have only one call
120         to updateBeforeChildren(), and remove all children from the scrolling node
121         before visiting state children.
122         (WebCore::ScrollingTree::removeDestroyedNodes): It was very wrong to assume
123         that all non-root nodes were parented in the root! Now we don't need to
124         remove from the parent anyway.
125         * page/scrolling/ScrollingTree.h:
126         * page/scrolling/ScrollingTreeNode.h:
127         (WebCore::ScrollingTreeNode::children):
128
129 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
130
131         Make ScrollingTreeNodes refounted, for easier tree reconfiguration
132         https://bugs.webkit.org/show_bug.cgi?id=134075
133
134         Reviewed by Tim Horton.
135
136         Make ScrollingTreeNode be ref-counted.
137
138         * page/scrolling/AsyncScrollingCoordinator.h:
139         * page/scrolling/ScrollingTree.cpp:
140         (WebCore::ScrollingTree::handleWheelEvent):
141         (WebCore::ScrollingTree::updateTreeFromStateNode):
142         * page/scrolling/ScrollingTree.h:
143         (WebCore::ScrollingTree::rootNode):
144         * page/scrolling/ScrollingTreeNode.cpp:
145         (WebCore::ScrollingTreeNode::appendChild):
146         * page/scrolling/ScrollingTreeNode.h:
147         * page/scrolling/ThreadedScrollingTree.cpp:
148         (WebCore::ThreadedScrollingTree::createNode):
149         * page/scrolling/ThreadedScrollingTree.h:
150         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
151         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
152         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
153         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
154         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
155         (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
156         * page/scrolling/ios/ScrollingTreeIOS.cpp:
157         (WebCore::ScrollingTreeIOS::createNode):
158         * page/scrolling/ios/ScrollingTreeIOS.h:
159         * page/scrolling/mac/ScrollingCoordinatorMac.h:
160         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
161         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
162         * page/scrolling/mac/ScrollingTreeFixedNode.h:
163         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
164         (WebCore::ScrollingTreeFixedNode::create):
165         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
166         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
167         (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
168         * page/scrolling/mac/ScrollingTreeStickyNode.h:
169         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
170         (WebCore::ScrollingTreeStickyNode::create):
171
172 2014-06-20  Enrica Casucci  <enrica@apple.com>
173
174         iOS build fix after http://trac.webkit.org/changeset/170167.
175
176         Reviewed by Geoff Garen.
177
178         * bindings/js/JSDeviceMotionEventCustom.cpp:
179         * bindings/js/JSDeviceOrientationEventCustom.cpp:
180
181 2014-06-19  Pratik Solanki  <psolanki@apple.com>
182
183         Enable synchronous willSendRequest on iOS
184         https://bugs.webkit.org/show_bug.cgi?id=134081
185         <rdar://problem/17350927>
186
187         Reviewed by Andreas Kling.
188
189         We lost the call to make willSendrequest callbacks be synchronous if possible during code
190         refactoring. The call is present in ResourceHandleMac.mm but that code is not called when
191         we use the CFNetwork based loader. Call the SPI in setupRequest().
192
193         No new tests because existing tests should cover this functionality.
194
195         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
196         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
197         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
198
199 2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
200
201         [GTK] Do not build quota files when QUOTA is disabled
202         https://bugs.webkit.org/show_bug.cgi?id=134101
203
204         Reviewed by Philippe Normand.
205
206         * CMakeLists.txt: Remove exception for GTK+ that is no longer
207         required since r170173.
208         * PlatformGTK.cmake: Generate GObject DOM bindings for Quota when enabled.
209
210 2014-06-20  Manuel Rego Casasnovas  <rego@igalia.com>
211
212         [CSS Grid Layout] Add GridSpan::iterator
213         https://bugs.webkit.org/show_bug.cgi?id=134058
214
215         Reviewed by Bem Jones-Bey.
216
217         Once that GridResolvedPosition has been introduced in r169934, this
218         patch adds a GridSpan::iterator which allows to simplify the loops over
219         GridResolvedPositions.
220         From now on we could use range-based for loops.
221
222         No new tests as it is already covered by current tests
223         (fast/css-grid-layout/).
224
225         * rendering/RenderGrid.cpp:
226         (WebCore::RenderGrid::computeNormalizedFractionBreadth): Change loop to
227         ranged-based for.
228         (WebCore::RenderGrid::insertItemIntoGrid): Ditto.
229         (WebCore::RenderGrid::gridAreaBreadthForChild): Ditto.
230         * rendering/style/GridCoordinate.h: Define GridSpan::iterator.
231         (WebCore::GridSpan::begin): Return resolved initial position.
232         (WebCore::GridSpan::end): Return next to resolved final position.
233         * rendering/style/GridResolvedPosition.h:
234         (WebCore::GridResolvedPosition::operator*): Add operator required by
235         range-based for loops.
236         (WebCore::GridResolvedPosition::operator!=): Add not equal operator.
237
238 2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
239
240         Unreviewed. Fix GTK+ debug build after r170174.
241
242         * bindings/gobject/WebKitDOMNodeFilter.cpp:
243         (WebKit::nodeFilterObjectDestroyedCallback):
244
245 2014-06-20  Tim Horton  <timothy_horton@apple.com>
246
247         LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
248         https://bugs.webkit.org/show_bug.cgi?id=134050
249         <rdar://problem/17315114>
250
251         Reviewed by Simon Fraser.
252
253         * WebCore.exp.in:
254         * WebCore.xcodeproj/project.pbxproj:
255         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
256         (WebCore::MemoryPressureHandler::platformReleaseMemory):
257         Drain all LayerPools upon memory pressure.
258
259         * platform/graphics/ca/LayerPool.cpp:
260         (WebCore::LayerPool::LayerPool):
261         (WebCore::LayerPool::~LayerPool):
262         (WebCore::LayerPool::allLayerPools):
263         (WebCore::LayerPool::sharedPool): Deleted.
264         * platform/graphics/ca/LayerPool.h:
265         * platform/graphics/ca/PlatformCALayer.cpp:
266         (WebCore::PlatformCALayer::createCompatibleLayerWithSize):
267         Add createCompatibleLayerWithSize, which optionally tries to take said layer from the LayerPool.
268
269         (WebCore::PlatformCALayer::moveToLayerPool):
270         Add moveToLayerPool, which moves the layer to the LayerPool.
271
272         (WebCore::PlatformCALayer::layerPool):
273         The LayerPool for each layer is obtained via PlatformCALayer::layerPool(), which subclasses can override for special behaviors.
274         The base class uses a global LayerPool.
275
276         * platform/graphics/ca/PlatformCALayer.h:
277         * platform/graphics/ca/TileController.cpp:
278         (WebCore::TileController::createTileLayer):
279         * platform/graphics/ca/TileGrid.cpp:
280         (WebCore::TileGrid::removeTiles):
281
282 2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
283
284         [GTK] webkit_dom_document_create_tree_walker impossible to use due to WebKitDOMNodeFilter
285         https://bugs.webkit.org/show_bug.cgi?id=93002
286
287         Reviewed by Gustavo Noronha Silva.
288
289         Add custom implementation of WebKitDOMNodeFilter to expose it as
290         an interface instead of a class.
291
292         * PlatformGTK.cmake: Add new files to compilation.
293         * bindings/gobject/GObjectNodeFilterCondition.cpp: Added.
294         (WebCore::GObjectNodeFilterCondition::~GObjectNodeFilterCondition):
295         Reset the NodeFilter WebCore object associated to the
296         WebKitDOMNodeFilter object.
297         (WebCore::GObjectNodeFilterCondition::acceptNode): Call webkit_dom_node_filter_accept_node().
298         * bindings/gobject/GObjectNodeFilterCondition.h: Added.
299         (WebCore::GObjectNodeFilterCondition::create): Create a new
300         GObjectNodeFilterCondition for the given WebKitDOMNodeFilter.
301         (WebCore::GObjectNodeFilterCondition::GObjectNodeFilterCondition):
302         * bindings/gobject/WebKitDOMNodeFilter.cpp: Added.
303         (webkit_dom_node_filter_default_init):
304         (webkit_dom_node_filter_accept_node):
305         (WebKit::nodeFilterMap): Map NodeFilter WebCore objects to
306         WebKitDOMNodeFilter objects.
307         (WebKit::nodeFilterObjectDestroyedCallback): Remove the node
308         filter form the map when the WebKitDOMNodeFilter objecrt is destroyed.
309         (WebKit::kit): Return the WebKitDOMNodeFilter object for the given
310         NodeFilter WebCore object.
311         (WebKit::core): Get or create a NodeFilter WebCore object
312         associated to the given WebKitDOMNodeFilter.
313         * bindings/gobject/WebKitDOMNodeFilter.h: Added.
314         * bindings/gobject/WebKitDOMNodeFilter.symbols: Added.
315         * bindings/gobject/WebKitDOMNodeFilterPrivate.h: Added.
316         * bindings/scripts/CodeGeneratorGObject.pm:
317         (GenerateFunction): Add exceptions for NodeFilter parameters since
318         the core method returns a PassRefPtr.
319
320 2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
321
322         [GTK] Limit the amount of API exposed to GObject DOM bindings API
323         https://bugs.webkit.org/show_bug.cgi?id=133726
324
325         Reviewed by Gustavo Noronha Silva.
326
327         Split the GObject DOM bindings API into stable and unstable. The
328         unstable API is not included in the main webkitdom.h file, so that
329         to use it users have to include the headers individually and
330         define a macro WEBKIT_DOM_USE_UNSTABLE_API. For unstable methods
331         of stable classes we generate a {ClassName}Unstable.h header file
332         containing the unstable API. From now on we only keep backwards
333         compatibility for the stable API.
334
335         * PlatformGTK.cmake: Split GObject DOM bindings related variables
336         into Stable and Unstable. Add also
337         * bindings/gobject/WebKitDOMCustom.cpp:
338         (webkit_dom_html_media_element_set_current_time): Deleted.
339         (webkit_dom_text_track_get_kind): Deleted.
340         (webkit_dom_text_track_get_mode): Deleted.
341         (webkit_dom_text_track_set_mode): Deleted.
342         * bindings/gobject/WebKitDOMCustom.h:
343         * bindings/gobject/WebKitDOMCustom.symbols: Remove custom symbols
344         added due to API changes.
345         * bindings/gobject/WebKitDOMPrivate.h: Include webkitdomdefines-unstable.h.
346         * bindings/gobject/webkitdom.symbols: Remove all unstable symbols.
347         * bindings/scripts/CodeGeneratorGObject.pm:
348         (SkipFunction): Do not skip webkit_dom_html_media_element_set_current_time anymore.
349         (GenerateHeader): Only force single header include for stable
350         headers and add WEBKIT_DOM_USE_UNSTABLE_API #ifdef to unstable headers.
351         (GenerateFunction): Only add stable symbols to the symbols
352         array. Add function prototypes to main header or unstable header
353         depending on whether it's an unstable symbol for a stable class or
354         not. Also add Stability gtk-doc tag to unstable methods.
355         (GenerateEndHeader): Add required #endifs
356         (WriteData): Write also an Unstable.h header when appropriate and
357         only generate a symbols file for stable classes.
358         (ReadStableSymbols): Read the stable symbols for the current class.
359         (GenerateInterface): Call ReadStableSymbols.
360         * bindings/scripts/gobject-generate-headers.pl: Generate webkitdomdefines-unstable.h.
361         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
362         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
363         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
364         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
365         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
366         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
367         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
368         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
369         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
370         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
371         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
372         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
373         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
374         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
375         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
376         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
377         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
378         * bindings/scripts/test/GObject/WebKitDOMreadonly.h:
379
380 2014-06-19  Andreas Kling  <akling@apple.com>
381
382         When simulating memory pressure, GC *after* releasing WebCore resources.
383
384         Since clearing the page cache is likely to create lots of garbage, defer the
385         synchronous GC until after the WebCore pressure relief, so we can see the
386         effect of clearing out all those pages.
387
388         Rubber-stamped by Gavin Barraclough.
389
390         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
391         (WebCore::MemoryPressureHandler::install):
392
393 2014-06-18  Sam Weinig  <sam@webkit.org>
394
395         Move generate prototype and constructor classes into the generated implementation files
396         https://bugs.webkit.org/show_bug.cgi?id=134054
397
398         Reviewed by Oliver Hunt.
399
400         In an effort to reduce the size of the generated bindings headers, which is important
401         as the generated headers get included in a lot of places, this patch moves the prototype
402         and constructor declarations from the header to implementation file. This works because,
403         for the most part, no code cares about the prototype or constructors except the instance.
404
405         There are a few exceptions which had to be accounted for:
406         - The global objects (JSDOMWindow and JSWorkerGlobalScope) need to have their prototypes
407           available during initialization, so they remain in the header.
408         - JSLocation requires customizing some aspects of the prototype behavior, so its prototype,
409           and any future class that uses JSCustomNamedGetterOnPrototype or JSCustomDefineOwnPropertyOnPrototype,
410           remains in the header.
411         - A few classes had custom constructor functions. Instead of keeping the entire constructor
412           in the header, I opted for pulling just the static constructor function into the header, and
413           modifying the custom constructors to use the DOMConstructorObject type as the callee, since the
414           more specific type was unnecessary.
415
416         As a result of making these changes, I was also able to remove the #include of JSDOMBinding.h from
417         all the headers, which brought in quite a bit.
418
419         * bindings/js/JSAudioContextCustom.cpp:
420         (WebCore::constructJSAudioContext):
421         (WebCore::JSAudioContextConstructor::constructJSAudioContext): Deleted.
422         * bindings/js/JSBlobCustom.cpp:
423         (WebCore::constructJSBlob):
424         (WebCore::JSBlobConstructor::constructJSBlob): Deleted.
425         * bindings/js/JSCryptoCustom.cpp:
426         * bindings/js/JSDOMFormDataCustom.cpp:
427         (WebCore::constructJSDOMFormData):
428         (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): Deleted.
429         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
430         * bindings/js/JSDOMPluginArrayCustom.cpp:
431         * bindings/js/JSDOMPluginCustom.cpp:
432         * bindings/js/JSDataCueCustom.cpp:
433         (WebCore::constructJSDataCue):
434         (WebCore::JSDataCueConstructor::constructJSDataCue): Deleted.
435         * bindings/js/JSDataTransferCustom.cpp:
436         * bindings/js/JSEventCustom.cpp:
437         * bindings/js/JSFileReaderCustom.cpp:
438         * bindings/js/JSHistoryCustom.cpp:
439         * bindings/js/JSIDBAnyCustom.cpp:
440         * bindings/js/JSIDBDatabaseCustom.cpp:
441         * bindings/js/JSIDBObjectStoreCustom.cpp:
442         * bindings/js/JSImageConstructor.cpp:
443         (WebCore::JSImageConstructor::finishCreation):
444         * bindings/js/JSImageDataCustom.cpp:
445         * bindings/js/JSInspectorFrontendHostCustom.cpp:
446         * bindings/js/JSLocationCustom.cpp:
447         * bindings/js/JSMessagePortCustom.cpp:
448         * bindings/js/JSMutationObserverCustom.cpp:
449         (WebCore::constructJSMutationObserver):
450         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Deleted.
451         * bindings/js/JSSQLResultSetRowListCustom.cpp:
452         * bindings/js/JSSQLTransactionSyncCustom.cpp:
453         * bindings/js/JSSVGLengthCustom.cpp:
454         * bindings/js/JSSharedWorkerCustom.cpp:
455         (WebCore::constructJSSharedWorker):
456         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Deleted.
457         * bindings/js/JSStorageCustom.cpp:
458         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
459         * bindings/js/JSWebKitPointCustom.cpp:
460         (WebCore::constructJSWebKitPoint):
461         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): Deleted.
462         * bindings/js/JSWorkerCustom.cpp:
463         (WebCore::constructJSWorker):
464         (WebCore::JSWorkerConstructor::constructJSWorker): Deleted.
465         * bindings/js/SerializedScriptValue.cpp:
466         * bindings/scripts/CodeGeneratorJS.pm:
467         (GenerateHeader):
468         (GenerateImplementation):
469         (GeneratePrototypeDeclaration):
470         (GenerateConstructorDeclaration):
471         (GenerateConstructorHelperMethods):
472         (HeaderNeedsPrototypeDeclaration):
473         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
474         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
475         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
476         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
477         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
478         * bindings/scripts/test/JS/JSTestEventConstructor.h:
479         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
480         * bindings/scripts/test/JS/JSTestEventTarget.h:
481         * bindings/scripts/test/JS/JSTestException.cpp:
482         * bindings/scripts/test/JS/JSTestException.h:
483         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
484         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
485         * bindings/scripts/test/JS/JSTestInterface.cpp:
486         * bindings/scripts/test/JS/JSTestInterface.h:
487         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
488         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
489         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
490         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
491         * bindings/scripts/test/JS/JSTestNode.cpp:
492         * bindings/scripts/test/JS/JSTestNode.h:
493         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
494         * bindings/scripts/test/JS/JSTestNondeterministic.h:
495         * bindings/scripts/test/JS/JSTestObj.cpp:
496         * bindings/scripts/test/JS/JSTestObj.h:
497         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
498         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
499         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
500         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
501         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
502         * bindings/scripts/test/JS/JSTestTypedefs.h:
503         * bindings/scripts/test/JS/JSattribute.cpp:
504         * bindings/scripts/test/JS/JSattribute.h:
505         * bindings/scripts/test/JS/JSreadonly.cpp:
506         * bindings/scripts/test/JS/JSreadonly.h:
507
508
509 2014-06-19  peavo@outlook.com  <peavo@outlook.com>
510
511         [Curl] Compile errors related to http header field names.
512         https://bugs.webkit.org/show_bug.cgi?id=134029
513
514         Reviewed by Brent Fulgham.
515
516         Http header field names should now be specified with an enum, not a string.
517
518         * platform/network/curl/MultipartHandle.cpp:
519         (WebCore::MultipartHandle::didReceiveResponse):
520         * platform/network/curl/ResourceHandleManager.cpp:
521         (WebCore::getProtectionSpace):
522
523 2014-06-19  Anders Carlsson  <andersca@apple.com>
524
525         Put the divider in the right place.
526
527         * DerivedSources.make:
528
529 2014-06-19  Anders Carlsson  <andersca@apple.com>
530
531         Address a review comment from Darin.
532
533         * inspector/InspectorResourceAgent.cpp:
534         (WebCore::InspectorResourceAgent::willLoadXHR):
535
536 2014-06-19  Anders Carlsson  <andersca@apple.com>
537
538         Simplify two HistoryController member functions
539         https://bugs.webkit.org/show_bug.cgi?id=134064
540
541         Reviewed by Dan Bernstein.
542
543         Remove the FrameLoadType parameter from recursiveSetProvisionalItem,
544         use early returns and modern loops.
545
546         * loader/HistoryController.cpp:
547         (WebCore::HistoryController::goToItem):
548         (WebCore::HistoryController::recursiveSetProvisionalItem):
549         (WebCore::HistoryController::recursiveGoToItem):
550         * loader/HistoryController.h:
551
552 2014-06-19  David Kilzer  <ddkilzer@apple.com>
553
554         MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
555         <http://webkit.org/b/134052>
556
557         Reviewed by Eric Carlson.
558
559         Fixes the following static analyzer warning:
560
561             WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:688:43: warning: Potential leak of an object stored into 'outOfBandTracks'
562                     NSMutableArray* outOfBandTracks = [[NSMutableArray alloc] init];
563                                                       ^
564
565         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
566         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
567         Use RetainPtr<NSMutableArray> to prevent a leak.  Use
568         Objective-C literals to clean up the code.
569
570 2014-06-18  Zan Dobersek  <zdobersek@igalia.com>
571
572         ScriptExecutionContext::Task, FileThread::Task parameters should be values
573         https://bugs.webkit.org/show_bug.cgi?id=134035
574
575         Reviewed by Anders Carlsson.
576
577         r170106 and similar previous changesets enforced ScriptExecutionContext::Task and
578         FileThread::Task parameters as rvalue references. There's technically nothing wrong
579         with that, but since both classes are move-only it is also not strictly required.
580         Accepting these parameters as values is more common in C++ value semantics as well.
581
582         * dom/Document.cpp:
583         (WebCore::Document::postTask):
584         * dom/Document.h:
585         * dom/ScriptExecutionContext.h:
586         * fileapi/FileThread.cpp:
587         (WebCore::FileThread::postTask):
588         * fileapi/FileThread.h:
589         * workers/DefaultSharedWorkerRepository.cpp:
590         (WebCore::SharedWorkerProxy::postTaskToLoader):
591         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
592         * workers/WorkerGlobalScope.cpp:
593         (WebCore::WorkerGlobalScope::postTask):
594         * workers/WorkerGlobalScope.h:
595         * workers/WorkerLoaderProxy.h:
596         * workers/WorkerMessagingProxy.cpp:
597         (WebCore::WorkerMessagingProxy::postTaskToLoader):
598         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
599         * workers/WorkerMessagingProxy.h:
600         * workers/WorkerRunLoop.cpp:
601         (WebCore::WorkerRunLoop::postTask):
602         (WebCore::WorkerRunLoop::postTaskAndTerminate):
603         (WebCore::WorkerRunLoop::postTaskForMode):
604         (WebCore::WorkerRunLoop::Task::create):
605         (WebCore::WorkerRunLoop::Task::Task):
606         * workers/WorkerRunLoop.h:
607
608 2014-06-18  James Craig  <jcraig@apple.com>
609
610         Web Inspector: AXI: expose aria-relevant
611         https://bugs.webkit.org/show_bug.cgi?id=130913
612
613         Reviewed by Joseph Pecoraro.
614
615         Expose ARIA live region relevance in Web Inspector.
616         E.g. "Live: Assertive (Additions, Text)"
617
618         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html
619
620         * inspector/InspectorDOMAgent.cpp:
621         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): Support for liveRegionRelevant.
622         * inspector/protocol/DOM.json: Defined enum values and array passed to client.
623
624 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
625
626         Add rebeccapurple to CSS named color list
627         https://bugs.webkit.org/show_bug.cgi?id=133804
628
629         Reviewed by Jer Noble.
630
631         Add the named color "rebeccapurple" (#639).
632
633         * css/SVGCSSValueKeywords.in:
634         * platform/ColorData.gperf:
635
636 2014-06-11  Jeffrey Pfau  <jpfau@apple.com>
637
638         Fix flaky beforeload tests
639         https://bugs.webkit.org/show_bug.cgi?id=133685
640
641         Reviewed by David Kilzer.
642
643         * loader/FrameLoader.cpp:
644         (WebCore::FrameLoader::loadURL):
645
646 2014-06-18  Anders Carlsson  <andersca@apple.com>
647
648         Make FrameLoadType a strongly typed enum
649         https://bugs.webkit.org/show_bug.cgi?id=134047
650
651         Reviewed by Andreas Kling.
652
653         * history/BackForwardController.cpp:
654         (WebCore::BackForwardController::goBackOrForward):
655         (WebCore::BackForwardController::goBack):
656         (WebCore::BackForwardController::goForward):
657         * history/PageCache.cpp:
658         (WebCore::logCanCachePageDecision):
659         (WebCore::PageCache::canCache):
660         * loader/FrameLoader.cpp:
661         (WebCore::isBackForwardLoadType):
662         (WebCore::FrameLoader::FrameLoader):
663         (WebCore::FrameLoader::loadURLIntoChildFrame):
664         (WebCore::FrameLoader::prepareForLoadStart):
665         (WebCore::FrameLoader::loadFrameRequest):
666         (WebCore::FrameLoader::loadURL):
667         (WebCore::FrameLoader::load):
668         (WebCore::FrameLoader::reloadWithOverrideEncoding):
669         (WebCore::FrameLoader::reload):
670         (WebCore::FrameLoader::commitProvisionalLoad):
671         (WebCore::FrameLoader::transitionToCommitted):
672         (WebCore::FrameLoader::isReplacing):
673         (WebCore::FrameLoader::setReplacing):
674         (WebCore::FrameLoader::subresourceCachePolicy):
675         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
676         (WebCore::FrameLoader::addExtraFieldsToRequest):
677         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
678         (WebCore::FrameLoader::shouldPerformFragmentNavigation):
679         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
680         (WebCore::FrameLoader::loadDifferentDocumentItem):
681         * loader/FrameLoaderTypes.h:
682         * loader/HistoryController.cpp:
683         (WebCore::HistoryController::restoreDocumentState):
684         (WebCore::HistoryController::updateForReload):
685         (WebCore::HistoryController::isReplaceLoadTypeWithProvisionalItem):
686         (WebCore::HistoryController::isReloadTypeWithProvisionalItem):
687         * loader/NavigationAction.cpp:
688         (WebCore::navigationType):
689         * loader/PolicyChecker.cpp:
690         (WebCore::PolicyChecker::PolicyChecker):
691         (WebCore::PolicyChecker::checkNavigationPolicy):
692         * loader/cache/CachedResourceLoader.cpp:
693         (WebCore::CachedResourceLoader::cachePolicy):
694         * loader/icon/IconController.cpp:
695         (WebCore::IconController::startLoader):
696
697 2014-06-18  Alex Christensen  <achristensen@webkit.org>
698
699         [curl] Unreviewed speculative build fix after r170021.
700
701         * platform/network/curl/CurlCacheEntry.cpp:
702         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
703         (WebCore::CurlCacheEntry::parseResponseHeaders):
704         * platform/network/curl/CurlDownload.cpp:
705         (WebCore::CurlDownload::didReceiveHeader):
706         * platform/network/curl/ResourceHandleManager.cpp:
707         (WebCore::getProtectionSpace):
708         (WebCore::headerCallback):
709         Use HTTPHeaderName constants.
710
711 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
712
713         Move the removeNode() tree walking from ScrollingStateNote into ScrollingStateTree
714         https://bugs.webkit.org/show_bug.cgi?id=134043
715
716         Reviewed by Beth Dakin.
717
718         It's cleaner if ScrollingStateTree does the descendant walk when removing nodes.
719         We can simply start the "willBeRemoved" walk at the node in question.
720         
721         Have willRemoveNode() just remove the node from the m_stateNodeMap directly, rather
722         than this happening in a separate walk of m_nodesRemovedSinceLastCommit.
723
724         * page/scrolling/ScrollingStateNode.cpp:
725         (WebCore::ScrollingStateNode::removeDescendant): Deleted.
726         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree): Deleted.
727         * page/scrolling/ScrollingStateNode.h:
728         * page/scrolling/ScrollingStateTree.cpp:
729         (WebCore::ScrollingStateTree::attachNode):
730         (WebCore::ScrollingStateTree::detachNode):
731         (WebCore::ScrollingStateTree::clear):
732         (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
733         (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
734         (WebCore::ScrollingStateTree::willRemoveNode):
735         (WebCore::ScrollingStateTree::removeNode): Deleted.
736         * page/scrolling/ScrollingStateTree.h:
737
738 2014-06-18  Alex Christensen  <achristensen@webkit.org>
739
740         [iOS WebGL] Fixed WEBGL_compressed_texture_pvrtc.
741         https://bugs.webkit.org/show_bug.cgi?id=133561
742         
743         Based on Blink r153971 by bajones@chromium.org.
744
745         Reviewed by Dean Jackson.
746
747         No new tests, but this should fix webgl-compressed-texture-pvrtc.html.
748
749         * html/canvas/WebGLRenderingContext.cpp:
750         (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
751         (WebCore::WebGLRenderingContext::validateCompressedTexSubDimensions):
752         Added checks for pvrtc.
753
754 2014-06-18  Anders Carlsson  <andersca@apple.com>
755
756         Work around a Windows compiler crash.
757
758         * loader/archive/cf/LegacyWebArchive.cpp:
759         (WebCore::LegacyWebArchive::createFromSelection):
760
761 2014-06-18  Benjamin Poulain  <benjamin@webkit.org>
762
763         Subtrees with :first-child and :last-child are not invalidated when siblings are added/removed
764         https://bugs.webkit.org/show_bug.cgi?id=133934
765
766         Reviewed by Antti Koivisto.
767
768         When adding/removing nodes on an element, we try to invalidate only the elements that are
769         affected. In the case of :first-child and :last-child, that optimizations is implemented
770         through two types of flags that are updated during style resolution.
771
772         The first flag is childrenAffectedByFirstChildRules (childrenAffectedByLastChildRules),
773         set on the parent of any element that could be affected by :first-child (:last-child).
774
775         The other part of the optimization is marking the style itself with firstChildState (lastChildState)
776         to further reduce invalidations.
777
778         The problem in this case happen with a subtree of element is detached. Since there is no renderer,
779         the computed style is resolved ad-hoc and stored directly on the element. When the element is moved,
780         the computed style was never cleared because the invalidation optimizations were not handling
781         elements without style.
782
783         Credit to Yusuke Suzuki for discovering the issue and creating test cases.
784
785         Tests: fast/css/getComputedStyle/empty-update-without-renderer.html
786                fast/css/getComputedStyle/first-child-update-without-renderer.html
787                fast/css/getComputedStyle/last-child-update-without-renderer.html
788
789         * dom/Element.cpp:
790         (WebCore::checkForEmptyStyleChange):
791         Clean up: pull the style directly from the function instead of expection the call sites to do that.
792         Refine the checks to avoid invalidation.
793
794         (WebCore::checkForSiblingStyleChanges):
795         Do not early return if the parent is detached, the children may still need invalidation.
796
797         When there is no renderer, assume the worst first-child/last-child and force the invalidation.
798
799         (WebCore::Element::childrenChanged):
800
801 2014-06-18  Daniel Bates  <dabates@apple.com>
802
803         REGRESSION (r167856): Unable to log into HSBC app
804         https://bugs.webkit.org/show_bug.cgi?id=133991
805         <rdar://problem/17044839>
806
807         Reviewed by David Kilzer.
808
809         Following <http://trac.webkit.org/changeset/167856> we disallow "navigation to any URL that is
810         invalid, except for JavaScript URLs, which need not be valid." A byproduct of this policy
811         decision is that we no longer notify the WebKit client to about a navigation if the destination
812         URL is invalid. And some apps, including the HSBC app for iOS, have logic to intercept URLs
813         as a means to pass data from their WebView-embedded web app to the WebView. We should expose a
814         setting called allowNavigationToInvalidURL (disabled by default on all ports and conditionally
815         enabled on iOS) to toggle whether WebCore allows navigation to any URL, even if its invalid,
816         so as to not break clients that intercept URLs and have custom logic to handle them.
817
818         Tests: fast/loader/allow-redirect-to-invalid-url-using-javascript.html
819                fast/loader/allow-redirect-to-invalid-url-using-meta-refresh.html
820                fast/loader/disallow-redirect-to-invalid-url-using-javascript.html
821                fast/loader/disallow-redirect-to-invalid-url-using-meta-refresh.html
822
823         * loader/NavigationScheduler.cpp:
824         (WebCore::NavigationScheduler::shouldScheduleNavigation): Modified to only validate
825         the URL when the setting allowNavigationToInvalidURL is disabled.
826         * page/Settings.in: Added setting allowNavigationToInvalidURL (disabled by default).
827
828 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
829
830         Make ScrollingStateNodes refcounted, and other minor cleanup
831         https://bugs.webkit.org/show_bug.cgi?id=134040
832
833         Reviewed by Beth Dakin.
834
835         Prepare for future scrolling frame gyrations by making
836         ScrollingStateNodes refcounted.
837         
838         Rename ScrollingStateNode::removeChild() to removeDescendant()
839         since that's what it does. Also rename didRemoveNode() to willRemoveNode()
840         to better match the behavior.
841         
842         Use 'auto' in more places.
843
844         * page/scrolling/AsyncScrollingCoordinator.cpp:
845         (WebCore::AsyncScrollingCoordinator::syncChildPositions):
846         * page/scrolling/ScrollingStateFixedNode.cpp:
847         (WebCore::ScrollingStateFixedNode::create):
848         (WebCore::ScrollingStateFixedNode::clone):
849         * page/scrolling/ScrollingStateFixedNode.h:
850         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
851         (WebCore::ScrollingStateFrameScrollingNode::create):
852         (WebCore::ScrollingStateFrameScrollingNode::clone):
853         * page/scrolling/ScrollingStateFrameScrollingNode.h:
854         * page/scrolling/ScrollingStateNode.cpp:
855         (WebCore::ScrollingStateNode::cloneAndReset):
856         (WebCore::ScrollingStateNode::appendChild):
857         (WebCore::ScrollingStateNode::removeDescendant):
858         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
859         (WebCore::ScrollingStateNode::removeChild): Deleted.
860         * page/scrolling/ScrollingStateNode.h:
861         (WebCore::ScrollingStateNode::children):
862         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
863         (WebCore::ScrollingStateOverflowScrollingNode::create):
864         (WebCore::ScrollingStateOverflowScrollingNode::clone):
865         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
866         * page/scrolling/ScrollingStateStickyNode.cpp:
867         (WebCore::ScrollingStateStickyNode::create):
868         (WebCore::ScrollingStateStickyNode::clone):
869         * page/scrolling/ScrollingStateStickyNode.h:
870         * page/scrolling/ScrollingStateTree.cpp:
871         (WebCore::ScrollingStateTree::attachNode):
872         (WebCore::ScrollingStateTree::removeNode):
873         (WebCore::ScrollingStateTree::willRemoveNode):
874         (WebCore::ScrollingStateTree::didRemoveNode): Deleted.
875         * page/scrolling/ScrollingStateTree.h:
876         (WebCore::ScrollingStateTree::setRootStateNode):
877         * page/scrolling/ScrollingTree.cpp:
878         (WebCore::ScrollingTree::updateTreeFromStateNode):
879
880 2014-06-18  Anders Carlsson  <andersca@apple.com>
881
882         Adopt modern C++11 loops and fix WebArchive creation functions
883         https://bugs.webkit.org/show_bug.cgi?id=134032
884
885         Reviewed by Andreas Kling.
886
887         Use modern loops in a couple of places, fix DocumentLoader::subresources() to return a Vector,
888         and stop using Vectors of PassRefPtrs.
889
890         * WebCore.exp.in:
891         * dom/Document.cpp:
892         (WebCore::Document::textInserted):
893         (WebCore::Document::textRemoved):
894         (WebCore::Document::textNodesMerged):
895         * loader/DocumentLoader.cpp:
896         (WebCore::DocumentLoader::subresources):
897         (WebCore::DocumentLoader::getSubresources): Deleted.
898         * loader/DocumentLoader.h:
899         * loader/appcache/ApplicationCache.cpp:
900         (WebCore::ApplicationCache::dump):
901         * loader/appcache/ApplicationCache.h:
902         (WebCore::ApplicationCache::resources):
903         (WebCore::ApplicationCache::begin): Deleted.
904         (WebCore::ApplicationCache::end): Deleted.
905         * loader/appcache/ApplicationCacheGroup.cpp:
906         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
907         * loader/appcache/ApplicationCacheHost.cpp:
908         (WebCore::ApplicationCacheHost::fillResourceList):
909         * loader/appcache/ApplicationCacheStorage.cpp:
910         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
911         (WebCore::ApplicationCacheStorage::store):
912         (WebCore::ApplicationCacheStorage::empty):
913         (WebCore::ApplicationCacheStorage::storeCopyOfCache):
914         * loader/archive/cf/LegacyWebArchive.cpp:
915         (WebCore::LegacyWebArchive::create):
916         (WebCore::LegacyWebArchive::createFromSelection):
917         * loader/archive/cf/LegacyWebArchive.h:
918         * xml/XMLHttpRequestProgressEventThrottle.cpp:
919         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
920
921 2014-06-18  Alex Christensen  <achristensen@webkit.org>
922
923         Remove duplicate code using sdiv.
924         https://bugs.webkit.org/show_bug.cgi?id=133764
925
926         Reviewed by Daniel Bates.
927
928         * cssjit/SelectorCompiler.cpp:
929         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
930         Use template sdiv for apple armv7s and arm64.
931
932 2014-06-18  Zan Dobersek  <zdobersek@igalia.com>
933
934         ScriptExecutionContext::Task parameters should always be rvalue references
935         https://bugs.webkit.org/show_bug.cgi?id=133615
936
937         Reviewed by Darin Adler.
938
939         ScriptExecutionContext::Task parameters should be rvalue references as the
940         passed-in objects are always ScriptExecutionContext::Task rvalues that were
941         implicitly constructed from a lambda function or rvalues of objects that
942         derive from ScriptExecutionContext::Task.
943
944         This isn't really necessary since ScriptExecutionContext::Task is non-copyable
945         and we have to use move semantics anyway, but it makes it clear that these
946         objects are expiring rvalues that must be properly dealt with.
947
948         * dom/Document.cpp:
949         (WebCore::Document::postTask):
950         * dom/Document.h:
951         * dom/ScriptExecutionContext.h:
952         * workers/DefaultSharedWorkerRepository.cpp:
953         (WebCore::SharedWorkerProxy::postTaskToLoader):
954         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
955         * workers/WorkerGlobalScope.cpp:
956         (WebCore::WorkerGlobalScope::postTask):
957         * workers/WorkerGlobalScope.h:
958         * workers/WorkerLoaderProxy.h:
959         * workers/WorkerMessagingProxy.cpp:
960         (WebCore::WorkerMessagingProxy::postTaskToLoader):
961         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
962         * workers/WorkerMessagingProxy.h:
963         * workers/WorkerRunLoop.cpp:
964         (WebCore::WorkerRunLoop::postTask):
965         (WebCore::WorkerRunLoop::postTaskAndTerminate):
966         (WebCore::WorkerRunLoop::postTaskForMode):
967         (WebCore::WorkerRunLoop::Task::create):
968         (WebCore::WorkerRunLoop::Task::Task):
969         * workers/WorkerRunLoop.h:
970
971 2014-06-18  peavo@outlook.com  <peavo@outlook.com>
972
973         [WinCairo] Compile errors when trying to compile CA code.
974         https://bugs.webkit.org/show_bug.cgi?id=134030
975
976         Reviewed by Simon Fraser.
977
978         WinCairo does not USE(CA).
979
980         * WebCore.vcxproj/WebCore.vcxproj:
981         * platform/graphics/ca/TileController.h:
982
983 2014-06-17  Tim Horton  <timothy_horton@apple.com>
984
985         [iOS][wk2] Use ImageDocument to display subframe PDFs
986         https://bugs.webkit.org/show_bug.cgi?id=133944
987         <rdar://problem/17205983>
988
989         Reviewed by Dan Bates.
990
991         * dom/DOMImplementation.cpp:
992         (WebCore::DOMImplementation::createDocument):
993         Make a ImageDocument to show our subframe PDF, if the setting is enabled.
994
995         * html/ImageDocument.cpp:
996         (WebCore::ImageDocument::finishedParsing):
997         (WebCore::ImageDocument::createDocumentStructure):
998         Set the ResourceResponse on the ImageElement upon creation, instead of
999         when the load finishes. This way, when the internal CachedImage creates
1000         its Image, it can have the correct MIME type for the response, and can
1001         make a PDFDocumentImage if necessary.
1002
1003         We never noticed this before because CachedImage falls back to making a
1004         BitmapImage, and that was the only case that was normally used.
1005
1006         Throw an explicit white background behind PDF ImageDocuments; PDFDocumentImage
1007         paints with a transparent background, but when used as an ImageDocument
1008         it seems reasonable to assume that there should be a white page background
1009         (similar to what PDFPlugin and friends do).
1010
1011         * loader/DocumentWriter.cpp:
1012         (WebCore::DocumentWriter::createDocument):
1013         Don't make a PDFDocument if we want to use an ImageDocument for this subframe PDF.
1014
1015         * page/Settings.in:
1016
1017         * platform/MIMETypeRegistry.cpp:
1018         (WebCore::MIMETypeRegistry::isPDFMIMEType):
1019         * platform/MIMETypeRegistry.h:
1020         Expose the already implemented pdfMIMETypes table just like all the rest.
1021
1022 2014-06-17  Ryuan Choi  <ryuan.choi@samsung.com>
1023
1024         Unreviewed build fix with ENABLE_NOSNIFF after r170021
1025
1026         * loader/cache/CachedScript.cpp:
1027         (WebCore::CachedScript::mimeTypeAllowedByNosniff):
1028
1029 2014-06-17  Jeremy Jones  <jeremyj@apple.com>
1030
1031         Improve enter and exit fullscreen transition by using two step transition.
1032         https://bugs.webkit.org/show_bug.cgi?id=133706
1033
1034         Reviewed by Simon Fraser.
1035
1036         setupFullscreen, creates the fullscreen views ready to receive the video layer.
1037         Once they are in place, didSetupFullscreen will move the video layer into the 
1038         new view hierarchy and initiate enterFullscreen to animate.
1039
1040         Reverse process for exit fullscreen.
1041
1042         * WebCore.exp.in: Add exports.
1043         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1044         (-[WebVideoFullscreenController enterFullscreen:]):
1045         Refactor into didSetupFullscreen.
1046         (-[WebVideoFullscreenController didSetupFullscreen]):
1047         Move the video layer once fullscreen is ready to receive it.
1048         (-[WebVideoFullscreenController didExitFullscreen]):
1049         Move the video layer back into we the web page, and initiate cleanup.
1050         (-[WebVideoFullscreenController didCleanupFullscreen]):
1051         Refactord cleanup from didExitFullscreen.
1052         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add delcarations.
1053         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1054         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
1055         Refactored from enterFullscreen. Builds views ready to receive video layer.
1056         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
1057         Animates into fullscreen.
1058         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
1059         Animates from fullscreen. Cleanup is refactored into cleanupFullscreen()
1060         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
1061         Refactored from exitFullscreen(), removes views.
1062
1063 2014-06-17  Sam Weinig  <sam@webkit.org>
1064
1065         Remove unnecessary Structure flags from generated bindings
1066         https://bugs.webkit.org/show_bug.cgi?id=133992
1067
1068         Reviewed by Daniel Bates.
1069
1070         - Remove OverridesVisitChildren flag from DOM prototype objects. They never
1071           implement visitChildren.
1072         - Remove OverridesGetOwnPropertySlot and ImplementsHasInstance from DOM constructor
1073           objects. getOwnPropertySlot is never implemented and ImplementsHasInstance is inherited
1074           automatically from DOMConstructorObject.
1075         - If we are not changing any flags, we now don't emit StructureFlags at all for the class.
1076
1077         * bindings/scripts/CodeGeneratorJS.pm:
1078         (GenerateHeader):
1079         (GeneratePrototypeDeclaration):
1080         (GenerateConstructorDeclaration):
1081         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1082         (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
1083         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
1084         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1085         (WebCore::JSTestCustomNamedGetterPrototype::JSTestCustomNamedGetterPrototype):
1086         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
1087         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1088         (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
1089         * bindings/scripts/test/JS/JSTestEventTarget.h:
1090         (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
1091         (WebCore::JSTestEventTargetConstructor::createStructure):
1092         * bindings/scripts/test/JS/JSTestException.h:
1093         (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
1094         (WebCore::JSTestExceptionConstructor::createStructure):
1095         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1096         (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
1097         (WebCore::JSTestGenerateIsReachableConstructor::createStructure):
1098         * bindings/scripts/test/JS/JSTestInterface.h:
1099         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
1100         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1101         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
1102         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
1103         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1104         (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
1105         (WebCore::JSTestNamedConstructorConstructor::createStructure):
1106         * bindings/scripts/test/JS/JSTestNode.h:
1107         (WebCore::JSTestNodePrototype::JSTestNodePrototype):
1108         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1109         (WebCore::JSTestNondeterministicPrototype::JSTestNondeterministicPrototype):
1110         (WebCore::JSTestNondeterministicConstructor::createStructure):
1111         * bindings/scripts/test/JS/JSTestObj.h:
1112         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
1113         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1114         (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
1115         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1116         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
1117         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
1118         * bindings/scripts/test/JS/JSTestTypedefs.h:
1119         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
1120         * bindings/scripts/test/JS/JSattribute.h:
1121         (WebCore::JSattributePrototype::JSattributePrototype):
1122         (WebCore::JSattributeConstructor::createStructure):
1123         * bindings/scripts/test/JS/JSreadonly.h:
1124         (WebCore::JSreadonlyPrototype::JSreadonlyPrototype):
1125         (WebCore::JSreadonlyConstructor::createStructure):
1126
1127 2014-06-17  Myles C. Maxfield  <mmaxfield@apple.com>
1128
1129         [iOS] Input type=time elements styled with SVG fonts have 0 width
1130         https://bugs.webkit.org/show_bug.cgi?id=133524
1131
1132         Reviewed by Simon Fraser.
1133
1134         Refactor how the LocalizedDateCache returns maximum widths for input elements. Currently,
1135         measuring the width of an SVG font requires a RenderObject for context, which the
1136         LocalizedDateCache can't know about (it would be a platform violation). Instead, the
1137         LocalizedDateCache can return the strings that it would use to measure the width, and the
1138         caller can actually run the width computation.
1139
1140         Test: fast/forms/time-input-svg-font.html
1141
1142         * platform/text/PlatformLocale.h:
1143         * platform/text/ios/LocalizedDateCache.h:
1144         * platform/text/ios/LocalizedDateCache.mm:
1145         (WebCore::LocalizedDateCache::maximumWidthForDateType): Take a delegate which can
1146         measure text
1147         (WebCore::LocalizedDateCache::calculateMaximumWidth): Perform maximum width
1148         computation using delegate.
1149         * platform/text/mac/LocaleMac.h:
1150         * platform/text/mac/LocaleMac.mm:
1151         (WebCore::LocaleMac::formatDateTime):
1152         (WebCore::LocaleMac::maximumWidthForDateType): Deleted. Short-circuit this and go
1153         directly to the LocalizedDateCache. This makes sense because we have to explicitly
1154         insert computed values back into the cache in this new model.
1155         * rendering/RenderThemeIOS.mm:
1156         (WebCore::adjustInputElementButtonStyle): Create a delegate and pass it to the
1157         LocalizedDateCache
1158
1159 2014-06-17  Simon Fraser  <simon.fraser@apple.com>
1160
1161         [UI-side compositing] fix reflections on composited layers
1162         https://bugs.webkit.org/show_bug.cgi?id=133942
1163
1164         Reviewed by Tim Horton.
1165
1166         Fix reflections on composited layers. There are two main set of changes.
1167         
1168         First, a PlatformCALayerRemote which is a clone has to track the layer
1169         it is a clone of, so it knows where to grab the contents from in the UI process.
1170         This layer may be told that its contents need updating out of order during
1171         recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext
1172         to allow a layer to add itself to the set of layers requiring commit.
1173         
1174         In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree()
1175         to go through clones, and copy their contents from the origin layer.
1176         
1177         The second set of changes makes platformCALayerLayerDidDisplay() work for
1178         UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*.
1179         PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know
1180         what the origin layer is.
1181
1182         Test: compositing/reflections/repaint-with-reflection.html
1183
1184         * WebCore.exp.in:
1185         * platform/graphics/GraphicsLayer.h:
1186         (WebCore::GraphicsLayer::layerDidDisplay): Deleted.
1187         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1188         (WebCore::LayerClient::platformCALayerLayerDidDisplay): Deleted.
1189         * platform/graphics/ca/GraphicsLayerCA.cpp:
1190         (WebCore::GraphicsLayerCA::layerDidDisplay):
1191         (WebCore::GraphicsLayerCA::findOrMakeClone):
1192         * platform/graphics/ca/GraphicsLayerCA.h:
1193         * platform/graphics/ca/PlatformCALayer.h:
1194         * platform/graphics/ca/PlatformCALayerClient.h:
1195         (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
1196         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1197         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1198         (PlatformCALayerMac::copyContentsFromLayer):
1199         (PlatformCALayerMac::superlayer):
1200         (PlatformCALayerMac::setContentsChanged): Deleted.
1201         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1202         (PlatformCALayerWinInternal::displayCallback):
1203         * platform/graphics/mac/WebLayer.mm:
1204         (-[WebSimpleLayer display]):
1205
1206 2014-06-17  Anders Carlsson  <andersca@apple.com>
1207
1208         Use strongly typed enums for AnimationState and AnimationInputState
1209         https://bugs.webkit.org/show_bug.cgi?id=133988
1210
1211         Reviewed by Tim Horton.
1212
1213         * page/animation/AnimationBase.cpp:
1214         (WebCore::AnimationBase::AnimationBase):
1215         (WebCore::nameForState):
1216         (WebCore::AnimationBase::updateStateMachine):
1217         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
1218         (WebCore::AnimationBase::updatePlayState):
1219         (WebCore::AnimationBase::timeToNextService):
1220         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
1221         (WebCore::AnimationBase::freezeAtTime):
1222         (WebCore::AnimationBase::beginAnimationUpdateTime):
1223         * page/animation/AnimationBase.h:
1224         (WebCore::AnimationBase::clear):
1225         (WebCore::AnimationBase::onAnimationStartResponse):
1226         (WebCore::AnimationBase::waitingToStart):
1227         (WebCore::AnimationBase::preActive):
1228         (WebCore::AnimationBase::postActive):
1229         (WebCore::AnimationBase::fillingForwards):
1230         (WebCore::AnimationBase::paused):
1231         (WebCore::AnimationBase::inPausedState):
1232         (WebCore::AnimationBase::isNew):
1233         (WebCore::AnimationBase::waitingForStartTime):
1234         (WebCore::AnimationBase::waitingForStyleAvailable):
1235         (WebCore::AnimationBase::isAnimatingProperty):
1236         (WebCore::AnimationBase::styleAvailable):
1237         (WebCore::AnimationBase::compositeAnimation):
1238         * page/animation/ImplicitAnimation.cpp:
1239         (WebCore::ImplicitAnimation::onAnimationEnd):
1240         (WebCore::ImplicitAnimation::sendTransitionEvent):
1241         (WebCore::ImplicitAnimation::reset):
1242         (WebCore::ImplicitAnimation::setOverridden):
1243         * page/animation/KeyframeAnimation.cpp:
1244         (WebCore::KeyframeAnimation::KeyframeAnimation):
1245         (WebCore::KeyframeAnimation::animate):
1246         (WebCore::KeyframeAnimation::sendAnimationEvent):
1247
1248 2014-06-17  Andreas Kling  <akling@apple.com>
1249
1250         Avoid synchronous layout in window.scrollTo(0,0) when already at (0,0)
1251         <https://webkit.org/b/133893>
1252
1253         Going from 0,0 to 0,0 is a no-op since there is no way a layout will
1254         affect the current scroll position.
1255
1256         We don't send scroll events when moving to the previous position,
1257         so this change is not observable.
1258
1259         Reviewed by Anders Carlsson.
1260
1261         * page/DOMWindow.cpp:
1262         (WebCore::DOMWindow::scrollTo):
1263
1264 2014-06-17  Alex Christensen  <achristensen@webkit.org>
1265
1266         Fix css jit register usage on armv7.
1267         https://bugs.webkit.org/show_bug.cgi?id=133952
1268
1269         Reviewed by Benjamin Poulain.
1270
1271         * cssjit/RegisterAllocator.h:
1272         List r7 as a callee saved register, which it is.
1273         * cssjit/SelectorCompiler.cpp:
1274         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
1275         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
1276         Save r6, which is used as a temporary register and must be preserved.
1277
1278 2014-06-17  Miyoung Shin  <myid.shin@samsung.com>
1279
1280         Use references instead of pointers to RenderBlock in enclosingBoxModelObject()
1281         https://bugs.webkit.org/show_bug.cgi?id=133978
1282
1283         Reviewed by Andreas Kling.
1284
1285         Just a straightforward conversion from pointers to references.
1286
1287         No new tests, no behavior change.
1288
1289         * rendering/InlineFlowBox.cpp:
1290         (WebCore::InlineFlowBox::paint):
1291         * rendering/RenderBlock.cpp:
1292         (WebCore::RenderBlock::paintObject):
1293         * rendering/RenderObject.cpp:
1294         (WebCore::RenderObject::enclosingBoxModelObject):
1295         * rendering/RenderObject.h:
1296
1297 2014-06-17  Zan Dobersek  <zdobersek@igalia.com>
1298
1299         Cache the gst_query_get_n_buffering_ranges() return value for the for-loop conditional
1300         https://bugs.webkit.org/show_bug.cgi?id=133953
1301
1302         Reviewed by Philippe Normand.
1303
1304         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1305         (WebCore::MediaPlayerPrivateGStreamer::buffered): Avoid the extra call in the for-loop
1306         conditional expression by caching the return value of gst_query_get_n_buffering_ranges().
1307
1308 2014-06-17  Zan Dobersek  <zdobersek@igalia.com>
1309
1310         Avoid Vector<char> copies in the OffsetBuffer constructor
1311         https://bugs.webkit.org/show_bug.cgi?id=133956
1312
1313         Reviewed by Andreas Kling.
1314
1315         * xml/parser/XMLDocumentParserLibxml2.cpp:
1316         (WebCore::OffsetBuffer::OffsetBuffer): Take the Vector parameter by value and
1317         move it into the member variable.
1318         (WebCore::openFunc): Move the Vector object into the OffsetBuffer constructor.
1319
1320 2014-06-17  Jer Noble  <jer.noble@apple.com>
1321
1322         [MSE] Overwritten samples are removed from buffered ranges using decode times; added samples using presentation times
1323         https://bugs.webkit.org/show_bug.cgi?id=133959
1324
1325         Reviewed by Eric Carlson.
1326
1327         Test: media/media-source/media-source-overlapping-append-buffered.html
1328
1329         Explicitly call presentationTime() on removed samples, rather than implicitly asking for the iterator's "first"
1330         member. When iterating over samples, "first" can either be presentation time, or decode time, depending on which
1331         iteration method is called. In the case of removing samples, this was using the decode time incorrectly.
1332
1333         * Modules/mediasource/SourceBuffer.cpp:
1334         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1335
1336 2014-06-16  Mihnea Ovidenie  <mihnea@adobe.com>
1337
1338         [CSSRegions] Region with border radius and overflow:hidden does not clip content
1339         https://bugs.webkit.org/show_bug.cgi?id=133476
1340
1341         Reviewed by Andrei Bucur.
1342
1343         When setting the clip before painting the named flow content,
1344         use the region's foreground rect to take the region's border radius
1345         into account if needed.
1346
1347         Test: fast/regions/region-border-radius-overflow-clip.html
1348
1349         * rendering/RenderLayer.cpp:
1350         (WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
1351
1352 2014-06-16  Sam Weinig  <sam@webkit.org>
1353
1354         Extract prototype declaration generation into a helper function
1355         https://bugs.webkit.org/show_bug.cgi?id=133969
1356
1357         Reviewed by Dan Bernstein.
1358
1359         * bindings/scripts/CodeGeneratorJS.pm:
1360         (GenerateHeader):
1361         (GeneratePrototypeDeclaration):
1362
1363 2014-06-16  Sam Weinig  <sam@webkit.org>
1364
1365         Move forward declaration of bindings static functions into their implementation files
1366         https://bugs.webkit.org/show_bug.cgi?id=133943
1367
1368         Reviewed by Geoffrey Garen.
1369
1370         - Moves the forward declaration of static functions for generated files to the implementation.
1371         - Adds a new extended attribute, ForwardDeclareInHeader, for functions that still need a 
1372           forward declaration in the header.
1373
1374         * bindings/js/JSDOMBinding.h:
1375         (WebCore::nonCachingStaticFunctionGetter):
1376         Move this helper here from JSDOMWindowCustom.cpp.
1377
1378         * bindings/js/JSDOMWindowCustom.cpp:
1379         (WebCore::JSDOMWindow::getOwnPropertySlot):
1380         Switch to comparing the property name directly rather than looking up in the static table and
1381         comparing function pointers.
1382
1383         * bindings/js/JSHistoryCustom.cpp:
1384         (WebCore::JSHistory::getOwnPropertySlotDelegate):
1385         Switch to comparing the property name directly rather than looking up in the static table and
1386         comparing function pointers and start using the nonCachingStaticFunctionGetter<> helper.
1387
1388         * bindings/js/JSLocationCustom.cpp:
1389         (WebCore::JSLocation::getOwnPropertySlotDelegate):
1390         (WebCore::JSLocation::putDelegate):
1391         Switch to comparing the property name directly rather than looking up in the static table and
1392         comparing function pointers and start using the nonCachingStaticFunctionGetter<> helper.
1393
1394         * bindings/scripts/CodeGeneratorJS.pm:
1395         (GenerateHeader):
1396         (GenerateImplementation):
1397         Move forward declaration creation to the implementation file where possible.
1398
1399         * bindings/scripts/IDLAttributes.txt:
1400         Add ForwardDeclareInHeader.
1401
1402         * page/DOMWindow.idl:
1403         * page/History.idl:
1404         * page/Location.idl:
1405         Add ForwardDeclareInHeader where necessary.
1406
1407 2014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>
1408
1409         Unreviewed build fix after r170029
1410
1411         Use String() instead of AtomicString().
1412
1413         * platform/network/HTTPParsers.cpp:
1414         (WebCore::parseHTTPHeader):
1415         * platform/network/soup/ResourceRequestSoup.cpp:
1416         (WebCore::ResourceRequest::updateSoupMessageHeaders):
1417         * platform/network/soup/ResourceResponseSoup.cpp:
1418         (WebCore::ResourceResponse::toSoupMessage):
1419
1420 2014-06-16  Brent Fulgham  <bfulgham@apple.com>
1421
1422         [Win] Use TileController on Windows
1423         https://bugs.webkit.org/show_bug.cgi?id=133895
1424
1425         Reviewed by Tim Horton.
1426
1427         * WebCore.vcxproj/WebCore.vcxproj: Add Tiled Drawing files.
1428         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1429         * platform/graphics/TiledBacking.h: No longer Cocoa-only.
1430         * platform/graphics/ca/GraphicsLayerCA.cpp:
1431         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Windows
1432         now uses the same layer type as Mac.
1433         * platform/graphics/ca/LayerPool.cpp:
1434         (WebCore::LayerPool::takeLayerWithSize): Use nullptr
1435         rather than nil for C++ code.
1436         * platform/graphics/ca/PlatformCALayer.cpp:
1437         * platform/graphics/ca/PlatformCALayer.h: Expose necessary
1438         drawing functions for Windows port.
1439         * platform/graphics/ca/TileController.cpp: Remove unneeded
1440         header include for WebLayer.
1441         * platform/graphics/ca/TileCoverageMap.cpp: Correct #includes.
1442         * platform/graphics/ca/TileGrid.h: Not just for Cococa.
1443         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove
1444         extra whitespace.
1445         * platform/graphics/ca/mac/PlatformCALayerMac.h: Remove
1446         unneeded overload.
1447         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1448         (PlatformCALayer::collectRectsToPaint): Added stub.
1449         (PlatformCALayer::drawLayerContents): Added.
1450         (PlatformCALayer::frameForLayer): Added.
1451         (PlatformCALayerWin::PlatformCALayerWin): Remove unneeded
1452         assert now that we support these types. Add TileController
1453         support.
1454         (PlatformCALayerWin::setEdgeAntialiasingMask): Added.
1455         (printLayer): Add newly-supported tile types.
1456         (PlatformCALayerWin::tiledBacking): Added.
1457         * platform/graphics/ca/win/PlatformCALayerWin.h: Update to
1458         support Tiled Drawing.
1459         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1460         (PlatformCALayerWinInternal::PlatformCALayerWinInternal): Update to
1461         recognize newly-supported layer types.
1462         (PlatformCALayerWinInternal::setNeedsDisplay): Ditto.
1463         (PlatformCALayerWinInternal::setSublayers): Ditto.
1464         (PlatformCALayerWinInternal::getSublayers): Ditto.
1465         (PlatformCALayerWinInternal::removeAllSublayers): Ditto.
1466         (PlatformCALayerWinInternal::insertSublayer): Ditto.
1467         (PlatformCALayerWinInternal::sublayerCount): Ditto.
1468         (PlatformCALayerWinInternal::indexOfSublayer): Ditto.
1469         (PlatformCALayerWinInternal::sublayerAtIndex): Ditto.
1470         (PlatformCALayerWinInternal::setBounds): Ditto.
1471         (PlatformCALayerWinInternal::setFrame): Ditto.
1472         (PlatformCALayerWinInternal::drawTile): Ditto.
1473         (PlatformCALayerWinInternal::createTileController): Ditto.
1474         (PlatformCALayerWinInternal::tiledBacking): Ditto.
1475         * platform/graphics/ca/win/PlatformCALayerWinInternal.h: Update to use
1476         TileController.
1477
1478 2014-06-16  Andreas Kling  <akling@apple.com>
1479
1480         Remove unnecessary style invalidation in RenderTextControl::styleDidChange().
1481         <https://webkit.org/b/133949>
1482
1483         This explicit invalidation of the text control's inner text element
1484         was hacked in to fix an editing test back in 2011, long before lazy
1485         render tree construction.
1486
1487         It should be safe to remove, since doing so doesn't affect any tests.
1488
1489         Reviewed by Antti Koivisto.
1490
1491         * rendering/RenderTextControl.cpp:
1492         (WebCore::RenderTextControl::styleDidChange):
1493
1494 2014-06-16  Anders Carlsson  <andersca@apple.com>
1495
1496         Fix iOS build.
1497
1498         * platform/network/cf/ResourceRequestCFNet.cpp:
1499         (WebCore::setHeaderFields):
1500
1501 2014-06-16  Anders Carlsson  <andersca@apple.com>
1502
1503         Accept-Ranges is not specific to GStreamer.
1504
1505         * platform/network/HTTPHeaderNames.in:
1506
1507 2014-06-16  Anders Carlsson  <andersca@apple.com>
1508
1509         Don't use AtomicString in HTTPHeaderMap
1510         https://bugs.webkit.org/show_bug.cgi?id=133957
1511         <rdar://problem/15256572>
1512
1513         Reviewed by Andreas Kling.
1514
1515         Use the string data that comes from the generated HTTPHeaderNames.cpp file
1516         for sharing header name data instead. In the future we can do something more fancy where
1517         we'll hash the HTTPHeaderName enum directly, but this is good enough for now.
1518
1519         * Modules/websockets/WebSocketHandshake.cpp:
1520         (WebCore::WebSocketHandshake::readHTTPHeaders):
1521         * WebCore.exp.in:
1522         * inspector/InspectorResourceAgent.cpp:
1523         (WebCore::buildObjectForHeaders):
1524         * loader/CrossOriginPreflightResultCache.cpp:
1525         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
1526         * loader/appcache/ApplicationCacheStorage.cpp:
1527         (WebCore::parseHeader):
1528         * loader/cache/CachedResource.cpp:
1529         (WebCore::shouldUpdateHeaderAfterRevalidation):
1530         * platform/network/HTTPHeaderMap.cpp:
1531         (WebCore::HTTPHeaderMap::copyData):
1532         (WebCore::internHTTPHeaderNameString):
1533         (WebCore::HTTPHeaderMap::get):
1534         (WebCore::HTTPHeaderMap::set):
1535         (WebCore::HTTPHeaderMap::add):
1536         (WebCore::CaseFoldingCStringTranslator::hash): Deleted.
1537         (WebCore::CaseFoldingCStringTranslator::equal): Deleted.
1538         (WebCore::CaseFoldingCStringTranslator::translate): Deleted.
1539         * platform/network/HTTPHeaderMap.h:
1540         * platform/network/HTTPHeaderNames.in:
1541         * platform/network/HTTPParsers.cpp:
1542         (WebCore::parseHTTPHeader):
1543         * platform/network/HTTPParsers.h:
1544         * platform/network/ResourceRequestBase.cpp:
1545         (WebCore::ResourceRequestBase::httpHeaderField):
1546         (WebCore::ResourceRequestBase::setHTTPHeaderField):
1547         (WebCore::ResourceRequestBase::addHTTPHeaderField):
1548         * platform/network/ResourceRequestBase.h:
1549         * platform/network/ResourceResponseBase.cpp:
1550         (WebCore::ResourceResponseBase::httpHeaderField):
1551         (WebCore::ResourceResponseBase::setHTTPHeaderField):
1552         (WebCore::ResourceResponseBase::addHTTPHeaderField):
1553         * platform/network/ResourceResponseBase.h:
1554         * platform/network/mac/ResourceRequestMac.mm:
1555         (WebCore::ResourceRequest::doUpdateResourceRequest):
1556         * platform/network/mac/ResourceResponseMac.mm:
1557         (WebCore::ResourceResponse::platformLazyInit):
1558         * xml/XMLHttpRequest.cpp:
1559         (WebCore::XMLHttpRequest::setRequestHeader):
1560         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
1561         (WebCore::XMLHttpRequest::getRequestHeader):
1562         (WebCore::XMLHttpRequest::getResponseHeader):
1563         * xml/XMLHttpRequest.h:
1564
1565 2014-06-16  Chris Fleizach  <cfleizach@apple.com>
1566
1567         AX: Safari crashed once in WebCore::AccessibilityObject::ariaIsHidden
1568         https://bugs.webkit.org/show_bug.cgi?id=133825
1569
1570         Reviewed by Enrica Casucci.
1571
1572         Sometimes asking accessibilityIsIgnored() will cause a newObject to be detached immediately after its created. 
1573         The creation function holds a reference with RefPtr as long as it lives, but when that method returns, the object goes away.
1574
1575         With that out of the way, I saw the same backtrace lead to updateLayoutIgnorePendingStylesheets being called while still inLayout.
1576
1577         I tried my best but could not create a reproducible layout test.
1578
1579         * accessibility/AXObjectCache.cpp:
1580         (WebCore::AXObjectCache::getOrCreate):
1581         * accessibility/AccessibilityObject.cpp:
1582         (WebCore::AccessibilityObject::updateBackingStore):
1583
1584 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
1585
1586         Unreviewed. Add more GStreamer-specific header names that are required
1587         after changes in r170021, fixing the build for ports using GStreamer.
1588
1589         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1590         (StreamingClient::handleResponseReceived):
1591         * platform/network/HTTPHeaderNames.in:
1592
1593 2014-06-16  Chris Fleizach  <cfleizach@apple.com>
1594
1595         AX: Crash at WebCore::AXObjectCache::textChanged
1596         https://bugs.webkit.org/show_bug.cgi?id=133873
1597
1598         Reviewed by Enrica Casucci.
1599
1600         This looks like a very similar problem to 
1601         https://bugs.webkit.org/show_bug.cgi?id=133825
1602
1603         The object is being created and deallocated almost right away because calling accessibilityIsIgnored triggers
1604         a deferred layout that invalidates the associated render element.
1605
1606         Despite my best efforts, I could not come up with a way to reproduce this in a layout test.
1607
1608         * accessibility/AXObjectCache.cpp:
1609         (WebCore::AXObjectCache::getOrCreate):
1610
1611 2014-06-15  Anders Carlsson  <andersca@apple.com>
1612
1613         Change ResourceRequestBase::addHTTPHeaderFields to setHTTPHeaderFields instead
1614         https://bugs.webkit.org/show_bug.cgi?id=133925
1615
1616         Reviewed by Sam Weinig.
1617
1618         * WebCore.exp.in:
1619         * platform/network/ResourceRequestBase.cpp:
1620         (WebCore::ResourceRequestBase::setHTTPHeaderFields):
1621         (WebCore::ResourceRequestBase::addHTTPHeaderFields): Deleted.
1622         * platform/network/ResourceRequestBase.h:
1623         * plugins/PluginView.cpp:
1624         (WebCore::PluginView::handlePost):
1625         * xml/XMLHttpRequest.cpp:
1626         (WebCore::XMLHttpRequest::createRequest):
1627
1628 2014-06-16  Jeongeun Kim  <je_julie.kim@samsung.com>
1629
1630         Use references instead of pointers to RenderBlock in RenderObject::enclosingBox().
1631         https://bugs.webkit.org/show_bug.cgi?id=133902
1632
1633         Reviewed by Andreas Kling.
1634
1635         Just a straightforward conversion from pointers to references.
1636
1637         No new tests, no behavior change.
1638
1639         * bindings/objc/DOMUIKitExtensions.mm:
1640         (-[DOMHTMLElement structuralComplexityContribution]):
1641         * html/HTMLMediaElement.cpp:
1642         (WebCore::HTMLMediaElement::parseAttribute):
1643         * inspector/InspectorOverlay.cpp:
1644         (WebCore::buildObjectForRendererFragments):
1645         * page/EventHandler.cpp:
1646         (WebCore::scrollNode):
1647         (WebCore::EventHandler::scrollOverflow):
1648         (WebCore::EventHandler::logicalScrollOverflow):
1649         * page/FrameView.cpp:
1650         (WebCore::FrameView::layout):
1651         * rendering/RenderBox.cpp:
1652         (WebCore::computeInlineStaticDistance):
1653         * rendering/RenderFlowThread.cpp:
1654         (WebCore::RenderFlowThread::computedRegionRangeForBox):
1655         (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion):
1656         (WebCore::RenderFlowThread::objectInFlowRegion):
1657         * rendering/RenderLayer.cpp:
1658         (WebCore::RenderLayer::calculateClipRects):
1659         * rendering/RenderObject.cpp:
1660         (WebCore::RenderObject::enclosingBox): Removed FIXME comment
1661         * rendering/RenderObject.h:
1662         * rendering/RenderScrollbar.cpp:
1663         (WebCore::RenderScrollbar::owningRenderer):
1664
1665 2014-06-16  Anders Carlsson  <andersca@apple.com>
1666
1667         Use HTTPHeaderName in more places
1668         https://bugs.webkit.org/show_bug.cgi?id=133948
1669
1670         Reviewed by Andreas Kling.
1671
1672         * loader/cache/CachedRawResource.cpp:
1673         (WebCore::shouldIgnoreHeaderForCacheReuse):
1674         * platform/network/HTTPHeaderNames.in:
1675         * xml/XMLHttpRequest.cpp:
1676         (WebCore::isSetCookieHeader):
1677         (WebCore::isForbiddenRequestHeader):
1678         (WebCore::XMLHttpRequest::isAllowedHTTPHeader):
1679         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData): Deleted.
1680         (WebCore::staticData): Deleted.
1681
1682 2014-06-16  Anders Carlsson  <andersca@apple.com>
1683
1684         Add HTTPHeaderName overloads on ResourceResponseBase
1685         https://bugs.webkit.org/show_bug.cgi?id=133946
1686
1687         Reviewed by Andreas Kling.
1688
1689         * WebCore.exp.in:
1690         * dom/Document.cpp:
1691         (WebCore::Document::lastModified):
1692         * loader/CrossOriginAccessControl.cpp:
1693         (WebCore::passesAccessControlCheck):
1694         * loader/CrossOriginPreflightResultCache.cpp:
1695         (WebCore::CrossOriginPreflightResultCacheItem::parse):
1696         * loader/FrameLoader.cpp:
1697         (WebCore::FrameLoader::receivedFirstData):
1698         (WebCore::FrameLoader::didBeginDocument):
1699         * loader/appcache/ApplicationCacheGroup.cpp:
1700         (WebCore::ApplicationCacheGroup::createResourceHandle):
1701         * loader/cache/CachedCSSStyleSheet.cpp:
1702         (WebCore::CachedCSSStyleSheet::canUseSheet):
1703         * loader/cache/CachedResource.cpp:
1704         (WebCore::CachedResource::load):
1705         * loader/cache/CachedScript.cpp:
1706         (WebCore::CachedScript::mimeType):
1707         * platform/network/HTTPHeaderNames.in:
1708         * platform/network/ResourceResponseBase.cpp:
1709         (WebCore::ResourceResponseBase::httpHeaderField):
1710         (WebCore::ResourceResponseBase::setHTTPHeaderField):
1711         * platform/network/ResourceResponseBase.h:
1712         * xml/XMLHttpRequest.cpp:
1713         (WebCore::XMLHttpRequest::getAllResponseHeaders):
1714         (WebCore::XMLHttpRequest::getResponseHeader):
1715         (WebCore::XMLHttpRequest::responseMIMEType):
1716         (WebCore::XMLHttpRequest::didReceiveResponse):
1717
1718 2014-04-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1719
1720         [Bindings] "nullable" sequence support is incomplete (i.e. sequence<NativeType>?)
1721         https://bugs.webkit.org/show_bug.cgi?id=131240
1722
1723         Reviewed by Darin Adler.
1724
1725         Nullable sequences are not fully supported in WebKit's
1726         code generator machinery. Although the generated code
1727         does add "is nullable" check to the evaluation condition
1728         (i.e. if (arg.isNull() || ...)), when the JSValue
1729         that holds a "null" JSObject is actually to be "converted"
1730         to a native Vector<T>, it fails.
1731
1732         The reason for the failure is in JSDOMBindings::toNativeArray.
1733         This method verifies that JSValue does not hold a "non-null"
1734         object, and it bails out.
1735         Analogly, the "ref ptr" variant of this method (toRefPtrNativeArray)
1736         does support nullables.
1737
1738         Patch fixes it be checking for a "null" JSValue check before hand.
1739
1740         Tests: Binding tests updated.
1741
1742         * bindings/js/JSDOMBinding.h:
1743         (WebCore::toNativeArray):
1744         * bindings/scripts/CodeGeneratorJS.pm:
1745         (JSValueToNative):
1746         * Modules/websocket/WebSocket.idl:
1747         Removed one overload ctor now that
1748         we can use nullable sequences.
1749
1750 2014-06-16  Jer Noble  <jer.noble@apple.com>
1751
1752         [MSE][Mac] Occasional image corruption after seeking
1753         https://bugs.webkit.org/show_bug.cgi?id=133879
1754
1755         Reviewed by Eric Carlson.
1756
1757         Change the order of operations for seeks: change the current time of the AVSampleBufferRenderSynchronizer
1758         before flushing and appending non-displaying samples.
1759
1760         Rather than having a single function which retrieves the fast seek time and then seeks, split this out
1761         into two functions: one which gets the fast seek time, and one which seeks. (The later of course already
1762         exists: seekToTime()).
1763
1764         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1765         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1766         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
1767         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1768         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1769         (WebCore::MediaSourcePrivateAVFObjC::fastSeekTimeForMediaTime): Renamed from seekToTime()
1770         (WebCore::MediaSourcePrivateAVFObjC::seekToTime): Deleted.
1771
1772 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
1773
1774         Have ScriptExecutionContext::Task functions take in a ScriptExecutionContext reference
1775         https://bugs.webkit.org/show_bug.cgi?id=133795
1776
1777         Reviewed by Andreas Kling.
1778
1779         The pointer to the ScriptExecutionContext object that is passed to the C++11 lambdas or
1780         helper functions wrapped in ScriptExecutionContext::Task is never null, so that parameter
1781         should be a reference instead.
1782
1783         * Modules/webdatabase/Database.cpp:
1784         (WebCore::Database::~Database):
1785         (WebCore::Database::runTransaction):
1786         (WebCore::Database::scheduleTransactionCallback):
1787         * Modules/webdatabase/DatabaseManager.cpp:
1788         (WebCore::DatabaseManager::openDatabase):
1789         * Modules/webdatabase/SQLCallbackWrapper.h:
1790         (WebCore::SQLCallbackWrapper::clear):
1791         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1792         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback):
1793         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks): Dereference the
1794         member variable that holds a never-null pointer to the ScriptExecutionContext. This should
1795         similarly be a reference.
1796         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
1797         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
1798         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback):
1799         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback):
1800         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
1801         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
1802         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback):
1803         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1804         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1805         (WebCore::workerGlobalScopeDidSend):
1806         (WebCore::workerGlobalScopeDidGetBufferedAmount):
1807         (WebCore::workerGlobalScopeDidConnect):
1808         (WebCore::workerGlobalScopeDidReceiveMessage):
1809         (WebCore::workerGlobalScopeDidReceiveBinaryData):
1810         (WebCore::workerGlobalScopeDidUpdateBufferedAmount):
1811         (WebCore::workerGlobalScopeDidStartClosingHandshake):
1812         (WebCore::workerGlobalScopeDidClose):
1813         (WebCore::workerGlobalScopeDidReceiveMessageError):
1814         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
1815         (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect):
1816         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend):
1817         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer):
1818         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob):
1819         (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount):
1820         (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose):
1821         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail):
1822         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
1823         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend):
1824         (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume):
1825         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1826         * bindings/js/JSCallbackData.h:
1827         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
1828         * bindings/js/JSDOMGlobalObjectTask.cpp:
1829         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
1830         * dom/Document.cpp:
1831         (WebCore::Document::postTask):
1832         (WebCore::Document::pendingTasksTimerFired):
1833         * dom/ScriptExecutionContext.cpp:
1834         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
1835         * dom/ScriptExecutionContext.h:
1836         (WebCore::ScriptExecutionContext::Task::performTask):
1837         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
1838         * dom/StringCallback.cpp:
1839         (WebCore::StringCallback::scheduleCallback):
1840         * fileapi/FileReader.cpp:
1841         (WebCore::delayedAbort):
1842         (WebCore::FileReader::abort):
1843         (WebCore::FileReader::doAbort): Deleted.
1844         * loader/WorkerThreadableLoader.cpp:
1845         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
1846         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy):
1847         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel):
1848         (WebCore::workerGlobalScopeDidSendData):
1849         (WebCore::workerGlobalScopeDidReceiveResponse):
1850         (WebCore::workerGlobalScopeDidReceiveData):
1851         (WebCore::workerGlobalScopeDidFinishLoading):
1852         (WebCore::workerGlobalScopeDidFail):
1853         (WebCore::workerGlobalScopeDidFailAccessControlCheck):
1854         (WebCore::workerGlobalScopeDidFailRedirectCheck):
1855         * loader/WorkerThreadableLoader.h:
1856         * loader/appcache/ApplicationCacheGroup.cpp:
1857         (WebCore::ApplicationCacheGroup::postListenerTask):
1858         * loader/cache/MemoryCache.cpp:
1859         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache):
1860         (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches):
1861         * loader/cache/MemoryCache.h:
1862         * workers/DefaultSharedWorkerRepository.cpp:
1863         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
1864         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
1865         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
1866         * workers/WorkerEventQueue.cpp:
1867         (WebCore::WorkerEventQueue::enqueueEvent):
1868         * workers/WorkerGlobalScope.cpp:
1869         (WebCore::WorkerGlobalScope::close):
1870         * workers/WorkerMessagingProxy.cpp:
1871         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
1872         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
1873         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
1874         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
1875         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
1876         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
1877         (WebCore::WorkerMessagingProxy::connectToInspector):
1878         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
1879         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
1880         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
1881         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
1882         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
1883         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
1884         (WebCore::WorkerMessagingProxy::reportPendingActivity):
1885         * workers/WorkerRunLoop.cpp:
1886         (WebCore::WorkerRunLoop::Task::performTask):
1887         * workers/WorkerScriptLoader.cpp:
1888         * workers/WorkerThread.cpp:
1889         (WebCore::WorkerThread::stop):
1890         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
1891
1892 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
1893
1894         Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
1895         https://bugs.webkit.org/show_bug.cgi?id=133677
1896
1897         Reviewed by Anders Carlsson.
1898
1899         * WebCore.exp.in: Update the changed symbol.
1900         * page/Page.cpp:
1901         (WebCore::Page::findStringMatchingRanges): The method expects the matchRanges parameter to be non-null,
1902         so it should take in that parameter by reference instead of pointer.
1903         * page/Page.h:
1904
1905 2014-06-16  Radu Stavila  <stavila@adobe.com>
1906
1907         REGRESSION (r168046): Incorrect layout for multicol spanners when moving from one thread to another
1908         https://bugs.webkit.org/show_bug.cgi?id=133589
1909
1910         Reviewed by Antti Koivisto.
1911
1912         When a spanner is moved from a multicol thread to another, its placeholder
1913         must be properly repositioned.
1914
1915         Test: fast/multicol/newmulticol/spanner-crash.html
1916
1917         * rendering/RenderMultiColumnFlowThread.cpp:
1918         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
1919
1920 2014-06-16  Mario Sanchez Prada  <mario.prada@samsung.com>
1921
1922         [ATK] Missing 'selection-changed' signal when navigating a combo box with keyboard
1923         https://bugs.webkit.org/show_bug.cgi?id=133512
1924
1925         Reviewed by Chris Fleizach.
1926
1927         Make sure that AccessibilityMenuList objects update their active
1928         option when it changes, which will send a platform-dependent
1929         accessibility-related notification when needed.
1930
1931         Test: accessibility/combo-box-collapsed-selection-changed.html
1932
1933         * rendering/RenderMenuList.cpp:
1934         (RenderMenuList::didUpdateActiveOption): Keep the out-of-bounds
1935         check for the index passed but don't avoid updating the option for
1936         the associated AccessibilityMenuList object if the selected list
1937         item does not have a renderer, because that could be the case for
1938         cases where the popup (and its elements) would be rendered in the
1939         UI Process (e.g. GTK+ port uses GtkMenu and GtkMenuItem for that).
1940
1941         * accessibility/AccessibilityMenuList.cpp:
1942         (WebCore::AccessibilityMenuList::didUpdateActiveOption): Ensure
1943         that the AccessibilityMenuListPopup object for a given menu list
1944         has accessibility children before updating its active option.
1945
1946 2014-06-16  Commit Queue  <commit-queue@webkit.org>
1947
1948         Unreviewed, rolling out r170003.
1949         https://bugs.webkit.org/show_bug.cgi?id=133938
1950
1951         This patch broke GTK build (Requested by kczech on #webkit).
1952
1953         Reverted changeset:
1954
1955         "[EFL] Platform support for WebSpeech feature."
1956         https://bugs.webkit.org/show_bug.cgi?id=116438
1957         http://trac.webkit.org/changeset/170003
1958
1959 2014-06-16  Frédéric Wang  <fred.wang@free.fr>
1960
1961         Draw radicals with glyphs for better rendering.
1962         https://bugs.webkit.org/show_bug.cgi?id=119038
1963
1964         Unreviewed ASSERT fix.
1965
1966         * rendering/mathml/RenderMathMLRoot.h:
1967
1968 2014-06-16  Frédéric Wang  <fred.wang@free.fr>
1969
1970         Draw radicals with glyphs for better rendering
1971         https://bugs.webkit.org/show_bug.cgi?id=119038
1972
1973         Reviewed by Chris Fleizach.
1974
1975         We rewrite RenderMathMLRoot in order to fix bugs with SVG transforms and dynamic modification of children and allow drawing with an OpenType MATH table.
1976         The drawing of the radical sign (without the top bar) is now moved to a RenderMathMLRadicalOperator class inheriting from RenderMathMLOperator.
1977         This class fallbacks to the original drawing with graphic primitives if an OpenType MATH table is not available.
1978
1979         Tests: mathml/opentype/roots-LatinModern.html
1980                mathml/presentation/mroot-transform.html
1981
1982         * CMakeLists.txt: add files to build system.
1983         * WebCore.vcxproj/WebCore.vcxproj: ditto.
1984         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
1985         * WebCore.xcodeproj/project.pbxproj: ditto
1986         * css/mathml.css: remove rules for msqrt/mroot. The "script level" in mroot is not incremented by 2 as specified in the spec.
1987         (math, mrow, mfenced, merror, mphantom, mstyle, menclose):
1988         (mroot > *:last-child):
1989         (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose): Deleted.
1990         (msqrt > *): Deleted.
1991         (mroot): Deleted. This rule was causing bug 126516.
1992         (mroot > * + *): Deleted.
1993         * rendering/RenderObject.h: Add two new isRenderMathML* functions for dynamic casting.
1994         (WebCore::RenderObject::isRenderMathMLRadicalOperator):
1995         (WebCore::RenderObject::isRenderMathMLRootWrapper):
1996         * rendering/mathml/RenderMathMLOperator.cpp: Accept a set of operator dictionary flags, all disabled by default. This is to allow anonymous radicas, which don't have any flag.
1997         isFencedOperator() is now replaced with the more general isAnonymous() since we allow anonymous radical operator fors msqrt/mroot.
1998         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
1999         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
2000         (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
2001         (WebCore::RenderMathMLOperator::SetOperatorProperties):
2002         (WebCore::RenderMathMLOperator::updateTokenContent):
2003         * rendering/mathml/RenderMathMLOperator.h: Allow class to be overriden, redefine the anonymous constructor, remove isFencedOperator().
2004         * rendering/mathml/RenderMathMLRadicalOperator.cpp: Added.
2005         (WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator):
2006         (WebCore::RenderMathMLRadicalOperator::stretchTo):
2007         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties):
2008         (WebCore::RenderMathMLRadicalOperator::computePreferredLogicalWidths):
2009         (WebCore::RenderMathMLRadicalOperator::computeLogicalHeight):
2010         (WebCore::RenderMathMLRadicalOperator::paint):
2011         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError):
2012         * rendering/mathml/RenderMathMLRadicalOperator.h: Added.
2013         * rendering/mathml/RenderMathMLRoot.cpp: Rewritten. Some parts to use graphic primitives are moved to RenderMathMLRadicalOperator.cpp.
2014         (WebCore::RenderMathMLRoot::RenderMathMLRoot):
2015         (WebCore::RenderMathMLRoot::baseWrapper):
2016         (WebCore::RenderMathMLRoot::radicalWrapper):
2017         (WebCore::RenderMathMLRoot::indexWrapper):
2018         (WebCore::RenderMathMLRoot::radicalOperator):
2019         (WebCore::RenderMathMLRoot::restructureWrappers):
2020         (WebCore::RenderMathMLRoot::addChild):
2021         (WebCore::RenderMathMLRoot::styleDidChange):
2022         (WebCore::RenderMathMLRoot::updateFromElement):
2023         (WebCore::RenderMathMLRoot::updateStyle):
2024         (WebCore::RenderMathMLRoot::firstLineBaseline):
2025         (WebCore::RenderMathMLRoot::layout):
2026         (WebCore::RenderMathMLRoot::paint):
2027         (WebCore::RenderMathMLRootWrapper::createAnonymousWrapper):
2028         (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring):
2029         (WebCore::RenderMathMLRootWrapper::removeChild):
2030         (WebCore::RenderMathMLRoot::paddingTop): Deleted.
2031         (WebCore::RenderMathMLRoot::paddingBottom): Deleted.
2032         (WebCore::RenderMathMLRoot::paddingLeft): Deleted.
2033         (WebCore::RenderMathMLRoot::paddingRight): Deleted.
2034         (WebCore::RenderMathMLRoot::paddingBefore): Deleted.
2035         (WebCore::RenderMathMLRoot::paddingAfter): Deleted.
2036         (WebCore::RenderMathMLRoot::paddingStart): Deleted.
2037         (WebCore::RenderMathMLRoot::paddingEnd): Deleted.
2038         (WebCore::RenderMathMLRoot::index): Deleted.
2039         * rendering/mathml/RenderMathMLRoot.h: Rewritten.
2040         (WebCore::RenderMathMLRootWrapper::RenderMathMLRootWrapper):
2041
2042 2014-06-16  Krzysztof Czech  <k.czech@samsung.com>
2043
2044         [EFL] Platform support for WebSpeech feature.
2045         https://bugs.webkit.org/show_bug.cgi?id=116438
2046
2047         Reviewed by Gyuyoung Kim.
2048
2049         It's a first step of adding support for Speech Synthesis in EFL port.
2050         Just stub out required API and support for compilation.
2051
2052         * CMakeLists.txt:
2053         * PlatformEfl.cmake:
2054         * platform/PlatformSpeechSynthesizer.h:
2055         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Added.
2056         (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
2057         (WebCore::PlatformSpeechSynthesisProviderEfl::~PlatformSpeechSynthesisProviderEfl):
2058         (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
2059         (WebCore::PlatformSpeechSynthesisProviderEfl::pause):
2060         (WebCore::PlatformSpeechSynthesisProviderEfl::resume):
2061         (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
2062         (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
2063         * platform/efl/PlatformSpeechSynthesisProviderEfl.h: Added.
2064         * platform/efl/PlatformSpeechSynthesizerEfl.cpp: Added.
2065         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2066         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2067         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
2068         (WebCore::PlatformSpeechSynthesizer::pause):
2069         (WebCore::PlatformSpeechSynthesizer::resume):
2070         (WebCore::PlatformSpeechSynthesizer::speak):
2071         (WebCore::PlatformSpeechSynthesizer::cancel):
2072
2073 2014-06-15  Benjamin Poulain  <benjamin@webkit.org>
2074
2075         CSS JIT: add support for the :lang() pseudo class
2076         https://bugs.webkit.org/show_bug.cgi?id=133913
2077
2078         Reviewed by Andreas Kling.
2079
2080         The selector is already very expensive to begin with, just implement it with
2081         a function call.
2082
2083         It is also done after every other filter since it is so inefficient.
2084
2085         Tests: fast/selectors/lang-conflict.html
2086                fast/selectors/lang-empty.html
2087                fast/selectors/lang-specificity-xml.xhtml
2088                fast/selectors/lang-specificity.html
2089
2090         * css/SelectorChecker.cpp:
2091         (WebCore::SelectorChecker::checkOne):
2092         * css/SelectorCheckerTestFunctions.h:
2093         (WebCore::matchesLangPseudoClass):
2094         * cssjit/SelectorCompiler.cpp:
2095         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2096         (WebCore::SelectorCompiler::addPseudoClassType):
2097         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2098         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
2099         * dom/Element.cpp:
2100         (WebCore::Element::computeInheritedLanguage):
2101         * dom/ElementData.cpp:
2102         (WebCore::ElementData::findLanguageAttribute):
2103         * dom/ElementData.h:
2104
2105 2014-06-15  Anders Carlsson  <andersca@apple.com>
2106
2107         Add an autorelease() member function to RetainPtr
2108         https://bugs.webkit.org/show_bug.cgi?id=133929
2109
2110         Reviewed by Dan Bernstein.
2111
2112         * bindings/objc/DOM.mm:
2113         (-[DOMNode renderedImage]):
2114         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
2115         * bindings/objc/DOMUIKitExtensions.mm:
2116         (-[DOMHTMLImageElement dataRepresentation:]):
2117         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
2118         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
2119         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):
2120
2121 2014-06-14  Anders Carlsson  <andersca@apple.com>
2122
2123         Adopt HTTPHeaderName in ResourceResponseBase
2124         https://bugs.webkit.org/show_bug.cgi?id=133919
2125
2126         Reviewed by Sam Weinig.
2127
2128         * platform/network/HTTPHeaderNames.in:
2129         * platform/network/ResourceResponseBase.cpp:
2130         (WebCore::ResourceResponseBase::updateHeaderParsedState):
2131         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2132         (WebCore::ResourceResponseBase::addHTTPHeaderField):
2133         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2134         (WebCore::ResourceResponseBase::hasCacheValidatorFields):
2135         (WebCore::parseDateValueInHeader):
2136         (WebCore::ResourceResponseBase::date):
2137         (WebCore::ResourceResponseBase::age):
2138         (WebCore::ResourceResponseBase::expires):
2139         (WebCore::ResourceResponseBase::lastModified):
2140         (WebCore::ResourceResponseBase::isAttachment):
2141         * platform/network/ResourceResponseBase.h:
2142
2143 2014-06-14  Anders Carlsson  <andersca@apple.com>
2144
2145         Simplify ResourceRequest constructors
2146         https://bugs.webkit.org/show_bug.cgi?id=133911
2147
2148         Reviewed by Sam Weinig.
2149
2150         * platform/network/cf/ResourceRequest.h:
2151         (WebCore::ResourceRequest::ResourceRequest):
2152
2153 2014-06-14  Benjamin Poulain  <benjamin@webkit.org>
2154
2155         Fix the ARM64 build
2156
2157         * cssjit/SelectorCompiler.cpp:
2158         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
2159
2160 2014-06-13  Sam Weinig  <sam@webkit.org>
2161
2162         Store DOM constants directly in the JS object rather than jumping through a custom accessor
2163         https://bugs.webkit.org/show_bug.cgi?id=133898
2164
2165         Reviewed by Oliver Hunt.
2166
2167         Instead of implementing constants as custom accessors that just happen to return a value,
2168         we now store the constant directly in the HashTableValue array (where the GetValueFunc used
2169         to be). 
2170         
2171         - For the case where the constant is accessed via the static table (still in use for instances 
2172           and some prototypes), the static lookup function will set the value on the property slot,
2173           instead of passing a function pointer.
2174         - For the case where the constant is eagerly reified (most prototypes and all constructors) the
2175           constant is put directly in the object.
2176
2177         In micro benchmarks this looks to be around a 4x speedup on the use of DOM constants.
2178
2179         This also removes support for constant strings in IDL, which we had no uses of.
2180
2181         * bindings/scripts/CodeGeneratorJS.pm:
2182         (GenerateHeader):
2183         Remove code to generate forward declaration of constant accessor functions.
2184
2185         (GenerateImplementation):
2186         Remove code to generate implementation of constant accessor functions.
2187
2188         (GenerateHashTableValueArray):
2189         Plant the constant directly in the value array.
2190
2191         * bindings/scripts/IDLParser.pm:
2192         (parseConstValue):
2193         Remove support for constant strings.
2194
2195         * bindings/scripts/test/JS/JSTestInterface.cpp:
2196         * bindings/scripts/test/JS/JSTestInterface.h:
2197         * bindings/scripts/test/JS/JSTestObj.cpp:
2198         * bindings/scripts/test/JS/JSTestObj.h:
2199         * bindings/scripts/test/ObjC/DOMTestObj.h:
2200         * bindings/scripts/test/TestObj.idl:
2201         Update test results.
2202
2203 2014-06-14  Anders Carlsson  <andersca@apple.com>
2204
2205         Simplify Document::processHttpEquiv
2206         https://bugs.webkit.org/show_bug.cgi?id=133910
2207
2208         Reviewed by Andreas Kling.
2209
2210         * dom/Document.cpp:
2211         (WebCore::Document::processHttpEquiv):
2212         * platform/network/HTTPHeaderNames.in:
2213
2214 2014-06-14  Andreas Kling  <akling@apple.com>
2215
2216         GCController should return FastMalloc memory to the system.
2217         <https://webkit.org/b/133884>
2218
2219         Reviewed by Anders Carlsson.
2220
2221         Speculative test fix; I'm kinda suspecting that some tests are reporting
2222         more memory used because we did a GC but didn't get around to returning
2223         free pages to the system yet.
2224
2225         * bindings/js/GCController.cpp:
2226         (WebCore::GCController::garbageCollectNow):
2227
2228 2014-06-14  Zan Dobersek  <zdobersek@igalia.com>
2229
2230         Generate HTTP header names that are required by WebKitWebSrc
2231         https://bugs.webkit.org/show_bug.cgi?id=133906
2232
2233         Reviewed by Anders Carlsson.
2234
2235         WebKitWebSrc implementation sets icy-metadata and transferMode.dlna HTTP headers
2236         on ResourceRequest objects. The two headers are added to HTTPHeaderNames.in, and
2237         a small tweak is added to the generator script to avoid the dot in the second
2238         header's name (which would otherwise generate invalid C++).
2239
2240         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2241         (webKitWebSrcStart):
2242         * platform/network/HTTPHeaderNames.in:
2243         * platform/network/create-http-header-name-table:
2244
2245 2014-06-14  Anders Carlsson  <andersca@apple.com>
2246
2247         Replace some uses of ResourceRequestBase::addHTTPHeaderField with setHTTPHeaderField
2248         https://bugs.webkit.org/show_bug.cgi?id=133907
2249
2250         Reviewed by Andreas Kling.
2251
2252         * Modules/websockets/WebSocketHandshake.cpp:
2253         (WebCore::WebSocketHandshake::clientHandshakeRequest):
2254         * platform/network/HTTPHeaderNames.in:
2255         * platform/network/cf/ResourceHandleCFNet.cpp:
2256         (WebCore::applyBasicAuthorizationHeader):
2257         * platform/network/mac/ResourceHandleMac.mm:
2258         (WebCore::applyBasicAuthorizationHeader):
2259
2260 2014-06-13  Anders Carlsson  <andersca@apple.com>
2261
2262         Add a ResourceRequestBase::setHTTPHeaderField overload that takes a HTTPHeaderName
2263         https://bugs.webkit.org/show_bug.cgi?id=133881
2264
2265         Reviewed by Sam Weinig.
2266
2267         * WebCore.exp.in:
2268         * fileapi/FileReaderLoader.cpp:
2269         (WebCore::FileReaderLoader::start):
2270         * inspector/InspectorResourceAgent.cpp:
2271         (WebCore::InspectorResourceAgent::willSendRequest):
2272         * loader/CrossOriginAccessControl.cpp:
2273         (WebCore::createAccessControlPreflightRequest):
2274         * loader/FrameLoader.cpp:
2275         (WebCore::FrameLoader::addExtraFieldsToRequest):
2276         * loader/PingLoader.cpp:
2277         (WebCore::PingLoader::loadImage):
2278         (WebCore::PingLoader::sendPing):
2279         * loader/appcache/ApplicationCacheGroup.cpp:
2280         (WebCore::ApplicationCacheGroup::createResourceHandle):
2281         * loader/cache/CachedResource.cpp:
2282         (WebCore::CachedResource::load):
2283         * page/EventSource.cpp:
2284         (WebCore::EventSource::connect):
2285         * platform/network/BlobResourceHandle.cpp:
2286         (WebCore::BlobResourceHandle::doStart):
2287         * platform/network/HTTPHeaderNames.in:
2288         * platform/network/ResourceRequestBase.cpp:
2289         (WebCore::ResourceRequestBase::httpHeaderField):
2290         (WebCore::ResourceRequestBase::setHTTPHeaderField):
2291         (WebCore::ResourceRequestBase::httpContentType):
2292         (WebCore::ResourceRequestBase::setHTTPContentType):
2293         (WebCore::ResourceRequestBase::httpReferrer):
2294         (WebCore::ResourceRequestBase::setHTTPReferrer):
2295         (WebCore::ResourceRequestBase::httpOrigin):
2296         (WebCore::ResourceRequestBase::setHTTPOrigin):
2297         (WebCore::ResourceRequestBase::httpUserAgent):
2298         (WebCore::ResourceRequestBase::setHTTPUserAgent):
2299         (WebCore::ResourceRequestBase::httpAccept):
2300         (WebCore::ResourceRequestBase::setHTTPAccept):
2301         * platform/network/ResourceRequestBase.h:
2302         * platform/network/mac/ResourceHandleMac.mm:
2303         (WebCore::ResourceHandle::willSendRequest):
2304
2305 2014-06-14  Simon Fraser  <simon.fraser@apple.com>
2306
2307         Masks disappear when layers become tiled
2308         https://bugs.webkit.org/show_bug.cgi?id=133892
2309         <rdar://problem/17309793>
2310
2311         Reviewed by Tim Horton.
2312         
2313         There were several problems with tiled mask layers.
2314         
2315         First, when a layer became tiled it failed to re-apply the platform layer
2316         for its mask; fixed by adding MaskLayerChanged to the set of flags in
2317         swapFromOrToTiledLayer().
2318         
2319         Secondly, in CA, a mask layer's superlayer is the layer which is it masking,
2320         so the if (oldLayer->superlayer())... code in swapFromOrToTiledLayer() would
2321         erroneously try to swap out a sublayer on the superlayer with the mask.
2322         
2323         Thirdly, the mask layer is updated after its host layer, but when the mask layer
2324         become tiled, there was no code that updated the mask platform layer on its
2325         host layer. Fix by:
2326             1. setting a bit on a layer to note that it's being used as a mask.
2327             2. setting the parent of such a layer to its host layer (mimicking CA)
2328             3. when the mask becomes tiled, dirtying the MaskLayerChanged bit on
2329                its parent and adding a clause to commitLayerChangesAfterSublayers()
2330                to update the mask layer.
2331         
2332         Finally, ASSERTION FAILED: owningGraphicsLayer()->isCommittingChanges() would
2333         fire because we failed to set the m_isCommittingChanges flag while committing
2334         the mask layer. Fix by moving the TemporaryChange<bool> that sets this flag
2335         into commitLayerChangesBeforeSublayers() and commitLayerChangesAfterSublayers().
2336         
2337         Also used safe casts in more places in GraphicsLayerCA.
2338
2339         Tests: compositing/masks/become-tiled-mask.html
2340                compositing/masks/cease-tiled-mask.html
2341                compositing/masks/tiled-mask.html
2342
2343         * platform/graphics/GraphicsLayer.cpp:
2344         (WebCore::GraphicsLayer::GraphicsLayer):
2345         (WebCore::GraphicsLayer::removeFromParent):
2346         (WebCore::GraphicsLayer::setMaskLayer):
2347         * platform/graphics/GraphicsLayer.h:
2348         (WebCore::GraphicsLayer::setIsMaskLayer):
2349         (WebCore::GraphicsLayer::isMaskLayer):
2350         (WebCore::GraphicsLayer::setMaskLayer): Deleted.
2351         * platform/graphics/ca/GraphicsLayerCA.cpp:
2352         (WebCore::GraphicsLayerCA::removeFromParent):
2353         (WebCore::GraphicsLayerCA::setMaskLayer):
2354         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
2355         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2356         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2357         (WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
2358         (WebCore::GraphicsLayerCA::updateSublayerList):
2359         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2360         (WebCore::GraphicsLayerCA::updateMaskLayer):
2361         (WebCore::GraphicsLayerCA::replicatedLayerRoot):
2362         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
2363         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2364         (WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas):
2365         (WebCore::GraphicsLayerCA::fetchCloneLayers):
2366
2367 2014-06-14  peavo@outlook.com  <peavo@outlook.com>
2368
2369         [Curl] Compile errors related to http headers.
2370         https://bugs.webkit.org/show_bug.cgi?id=133901
2371
2372         Reviewed by Brent Fulgham.
2373
2374         Http headers should now be specified with an enum, not a string.
2375
2376         * platform/network/curl/CurlCacheEntry.cpp:
2377         (WebCore::CurlCacheEntry::parseResponseHeaders):
2378         * platform/network/curl/MultipartHandle.cpp:
2379         (WebCore::MultipartHandle::didReceiveResponse):
2380
2381 2014-06-14  Brent Fulgham  <bfulgham@apple.com>
2382
2383         Unreviewed build fix after r169960.
2384
2385         * platform/graphics/ca/PlatformCALayer.cpp: Add missing include
2386         for snprintf on Windows.
2387
2388 2014-06-14  Csaba Osztrogonác  <ossy@webkit.org>
2389
2390         URTBF after r169943 and r169946.
2391
2392         * platform/network/HTTPHeaderMap.h: Removed maybe accidental deletion of the only one add function.
2393         * platform/network/HTTPHeaderNames.in: Added Sec-WebSocket-Key.
2394
2395 2014-06-14  Commit Queue  <commit-queue@webkit.org>
2396
2397         Unreviewed, rolling out r169963.
2398         https://bugs.webkit.org/show_bug.cgi?id=133899
2399
2400         Assertion in mathml/roots-removeChild.html (Requested by fredw
2401         on #webkit).
2402
2403         Reverted changeset:
2404
2405         "Draw radicals with glyphs for better rendering"
2406         https://bugs.webkit.org/show_bug.cgi?id=119038
2407         http://trac.webkit.org/changeset/169963
2408
2409 2014-06-14  Frédéric Wang  <fred.wang@free.fr>
2410
2411         Draw radicals with glyphs for better rendering
2412         https://bugs.webkit.org/show_bug.cgi?id=119038
2413
2414         Reviewed by Chris Fleizach.
2415
2416         We rewrite RenderMathMLRoot in order to fix bugs with SVG transforms and dynamic modification of children and allow drawing with an OpenType MATH table.
2417         The drawing of the radical sign (without the top bar) is now moved to a RenderMathMLRadicalOperator class inheriting from RenderMathMLOperator.
2418         This class fallbacks to the original drawing with graphic primitives if an OpenType MATH table is not available.
2419
2420         Tests: mathml/opentype/roots-LatinModern.html
2421                mathml/presentation/mroot-transform.html
2422
2423         * CMakeLists.txt: add files to build system.
2424         * WebCore.vcxproj/WebCore.vcxproj: ditto.
2425         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
2426         * WebCore.xcodeproj/project.pbxproj: ditto
2427         * css/mathml.css: remove rules for msqrt/mroot. The "script level" in mroot is not incremented by 2 as specified in the spec.
2428         (math, mrow, mfenced, merror, mphantom, mstyle, menclose):
2429         (mroot > *:last-child):
2430         (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose): Deleted.
2431         (msqrt > *): Deleted.
2432         (mroot): Deleted. This rule was causing bug 126516.
2433         (mroot > * + *): Deleted.
2434         * rendering/RenderObject.h: Add two new isRenderMathML* functions for dynamic casting.
2435         (WebCore::RenderObject::isRenderMathMLRadicalOperator):
2436         (WebCore::RenderObject::isRenderMathMLRootWrapper):
2437         * rendering/mathml/RenderMathMLOperator.cpp: Accept a set of operator dictionary flags, all disabled by default. This is to allow anonymous radicas, which don't have any flag.
2438         isFencedOperator() is now replaced with the more general isAnonymous() since we allow anonymous radical operator fors msqrt/mroot.
2439         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
2440         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
2441         (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
2442         (WebCore::RenderMathMLOperator::SetOperatorProperties):
2443         (WebCore::RenderMathMLOperator::updateTokenContent):
2444         * rendering/mathml/RenderMathMLOperator.h: Allow class to be overriden, redefine the anonymous constructor, remove isFencedOperator().
2445         * rendering/mathml/RenderMathMLRadicalOperator.cpp: Added.
2446         (WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator):
2447         (WebCore::RenderMathMLRadicalOperator::stretchTo):
2448         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties):
2449         (WebCore::RenderMathMLRadicalOperator::computePreferredLogicalWidths):
2450         (WebCore::RenderMathMLRadicalOperator::computeLogicalHeight):
2451         (WebCore::RenderMathMLRadicalOperator::paint):
2452         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError):
2453         * rendering/mathml/RenderMathMLRadicalOperator.h: Added.
2454         * rendering/mathml/RenderMathMLRoot.cpp: Rewritten. Some parts to use graphic primitives are moved to RenderMathMLRadicalOperator.cpp.
2455         (WebCore::RenderMathMLRoot::RenderMathMLRoot):
2456         (WebCore::RenderMathMLRoot::baseWrapper):
2457         (WebCore::RenderMathMLRoot::radicalWrapper):
2458         (WebCore::RenderMathMLRoot::indexWrapper):
2459         (WebCore::RenderMathMLRoot::radicalOperator):
2460         (WebCore::RenderMathMLRoot::restructureWrappers):
2461         (WebCore::RenderMathMLRoot::addChild):
2462         (WebCore::RenderMathMLRoot::styleDidChange):
2463         (WebCore::RenderMathMLRoot::updateFromElement):
2464         (WebCore::RenderMathMLRoot::updateStyle):
2465         (WebCore::RenderMathMLRoot::firstLineBaseline):
2466         (WebCore::RenderMathMLRoot::layout):
2467         (WebCore::RenderMathMLRoot::paint):
2468         (WebCore::RenderMathMLRootWrapper::createAnonymousWrapper):
2469         (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring):
2470         (WebCore::RenderMathMLRootWrapper::removeChild):
2471         (WebCore::RenderMathMLRoot::paddingTop): Deleted.
2472         (WebCore::RenderMathMLRoot::paddingBottom): Deleted.
2473         (WebCore::RenderMathMLRoot::paddingLeft): Deleted.
2474         (WebCore::RenderMathMLRoot::paddingRight): Deleted.
2475         (WebCore::RenderMathMLRoot::paddingBefore): Deleted.
2476         (WebCore::RenderMathMLRoot::paddingAfter): Deleted.
2477         (WebCore::RenderMathMLRoot::paddingStart): Deleted.
2478         (WebCore::RenderMathMLRoot::paddingEnd): Deleted.
2479         (WebCore::RenderMathMLRoot::index): Deleted.
2480         * rendering/mathml/RenderMathMLRoot.h: Rewritten.
2481         (WebCore::RenderMathMLRootWrapper::RenderMathMLRootWrapper):
2482
2483 2014-06-13  Brent Fulgham  <bfulgham@apple.com>
2484
2485         Move utility functions from WebLayer to PlatformCALayer
2486         https://bugs.webkit.org/show_bug.cgi?id=133887
2487         <rdar://problem/17309622>
2488
2489         Reviewed by Simon Fraser.
2490
2491         Move some utility functions from WebLayer.h/.mm to PlatformCALayer.
2492         Provide ObjC implementation in PlatformCALayerMac. A future patch will
2493         provide corresponding Windows versions.
2494
2495         * WebCore.exp.in:
2496         * platform/graphics/ca/PlatformCALayer.cpp:
2497         (WebCore::PlatformCALayer::drawRepaintIndicator):
2498         * platform/graphics/ca/PlatformCALayer.h:
2499         * platform/graphics/ca/TileController.cpp:
2500         (WebCore::TileController::blankPixelCountForTiles):
2501         * platform/graphics/ca/TileGrid.cpp:
2502         (WebCore::TileGrid::platformCALayerPaintContents):
2503         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2504         (PlatformCALayer::collectRectsToPaint):
2505         (PlatformCALayer::drawLayerContents):
2506         (PlatformCALayer::frameForLayer):
2507         * platform/graphics/mac/WebLayer.h:
2508         * platform/graphics/mac/WebLayer.mm:
2509         (-[WebLayer drawInContext:]):
2510         (WebCore::collectRectsToPaint): Deleted.
2511         (WebCore::drawLayerContents): Deleted.
2512         (WebCore::drawRepaintIndicator): Deleted.
2513         (WebCore::frameForLayer): Deleted.
2514
2515 2014-06-13  Alex Christensen  <achristensen@webkit.org>
2516
2517         Unreviewed disabling css jit on armv7.  It's not quite ready yet.
2518
2519         * cssjit/SelectorCompiler.cpp:
2520         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
2521         Removed extra comma.
2522
2523 2014-06-13  Alex Christensen  <achristensen@webkit.org>
2524
2525         Make css jit compile on armv7.
2526         https://bugs.webkit.org/show_bug.cgi?id=133889
2527
2528         Reviewed by Benjamin Poulain.
2529
2530         * cssjit/SelectorCompiler.cpp:
2531         (WebCore::SelectorCompiler::moduloHelper):
2532         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
2533         Implement modulo using a function call for now.
2534
2535 2014-06-13  Anders Carlsson  <andersca@apple.com>
2536
2537         Use the callOnMainThread version that takes an std::function in BlobResourceHandle::start()
2538         https://bugs.webkit.org/show_bug.cgi?id=133886
2539
2540         Reviewed by Andreas Kling.
2541
2542         Also replace a couple of NSAutoreleasePools with @autoreleasepool and an OwnPtr with an std::unique_ptr.
2543
2544         * page/scrolling/mac/ScrollingThreadMac.mm:
2545         (WebCore::ScrollingThread::threadRunLoopSourceCallback):
2546         * platform/mac/SharedTimerMac.mm:
2547         (WebCore::PowerObserver::PowerObserver):
2548         (WebCore::timerFired):
2549         (WebCore::setSharedTimerFireInterval):
2550         (WebCore::PowerObserver::create): Deleted.
2551         (WebCore::PowerObserver::didReceiveSystemPowerNotification): Deleted.
2552         * platform/network/BlobResourceHandle.cpp:
2553         (WebCore::BlobResourceHandle::start):
2554         (WebCore::delayedStartBlobResourceHandle): Deleted.
2555         * platform/network/BlobResourceHandle.h:
2556
2557 2014-06-12  Sam Weinig  <sam@webkit.org>
2558
2559         Constructors should eagerly reify their properties too
2560         https://bugs.webkit.org/show_bug.cgi?id=133822
2561
2562         Reviewed by Andreas Kling.
2563
2564         * bindings/scripts/CodeGeneratorJS.pm:
2565         (GenerateConstructorDeclaration):
2566         Constructors should never need to use the lazy property HashTable, so we can just
2567         remove its getOwnPropertySlot completely.
2568
2569         (ConstructorHasProperties):
2570         Add helper to determine if we need to reify any properties.
2571
2572         (GenerateConstructorHelperMethods):
2573         Reify if needed, and remove the implementation of getOwnPropertySlot.
2574
2575         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2576         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2577         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2578         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2579         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2580         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2581         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2582         * bindings/scripts/test/JS/JSTestEventTarget.h:
2583         * bindings/scripts/test/JS/JSTestException.cpp:
2584         * bindings/scripts/test/JS/JSTestException.h:
2585         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2586         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2587         * bindings/scripts/test/JS/JSTestInterface.cpp:
2588         * bindings/scripts/test/JS/JSTestInterface.h:
2589         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2590         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2591         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2592         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2593         * bindings/scripts/test/JS/JSTestNode.cpp:
2594         * bindings/scripts/test/JS/JSTestNode.h:
2595         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2596         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2597         * bindings/scripts/test/JS/JSTestObj.cpp:
2598         * bindings/scripts/test/JS/JSTestObj.h:
2599         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2600         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2601         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2602         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2603         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2604         * bindings/scripts/test/JS/JSTestTypedefs.h:
2605         * bindings/scripts/test/JS/JSattribute.cpp:
2606         * bindings/scripts/test/JS/JSattribute.h:
2607         * bindings/scripts/test/JS/JSreadonly.cpp:
2608         * bindings/scripts/test/JS/JSreadonly.h:
2609         Update tests.
2610
2611 2014-06-13  Alex Christensen  <achristensen@webkit.org>
2612
2613         Make css jit allocator smarter.
2614         https://bugs.webkit.org/show_bug.cgi?id=133834
2615
2616         Reviewed by Benjamin Poulain.
2617
2618         * cssjit/RegisterAllocator.h:
2619         (WebCore::RegisterAllocator::allocateRegister):
2620         (WebCore::RegisterAllocator::deallocateRegister):
2621         (WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
2622         (WebCore::LocalRegister::LocalRegister):
2623         (WebCore::RegisterAllocator::RegisterAllocator):
2624         Use a Deque for the registers.  Allocate from the front and deallocate to the back to cycle the register usage.
2625         (WebCore::RegisterAllocator::allocateRegisterWithPreference):
2626         (WebCore::LocalRegisterWithPreference::LocalRegisterWithPreference):
2627         Added the ability to specify that we prefer a certain register if it is available while allocating.
2628         These functions always return a register.  It is just a different register than preferred if the preferred register is not available.
2629         * cssjit/SelectorCompiler.cpp:
2630         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
2631         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
2632         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
2633         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
2634         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2635         Whenever we are allocating a register for the second argument, we should specify that we 
2636         prefer to have argumentGPR1 to reduce register swapping when preparing for a function call.
2637         This cannot be done for argumentGPR0 because elementAddressRegister is argumentGPR0 and it is always allocated.
2638
2639 2014-06-13  Jeremy Jones  <jeremyj@apple.com>
2640
2641         set setUsesExternalPlaybackWhileExternalScreenIsActive based on fullscreen mode
2642         https://bugs.webkit.org/show_bug.cgi?id=133829
2643
2644         Reviewed by Eric Carlson.
2645
2646         When playing inline and external screen is active, don't use external playback.
2647
2648         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2649         declare updateDisableExternalPlayback()
2650         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2651         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2652         call updateDisableExternalPlayback when player is created
2653         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
2654         call updateDisableExternalPlayback when fullscreen mode changes
2655         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
2656         update setUsesExternalPlaybackWhileExternalScreenIsActive based on fullscreen mode
2657
2658 2014-06-13  Brent Fulgham  <bfulgham@apple.com>
2659
2660         Convert LayerPool and TileCoverageMap from ObjC to C++
2661         https://bugs.webkit.org/show_bug.cgi?id=133862
2662         <rdar://problem/17302883>
2663
2664         Reviewed by Simon Fraser.
2665
2666         This just moves two ObjC files from the mac subdirectory to the parent and
2667         revises the project to build them as C++.
2668
2669         * WebCore.xcodeproj/project.pbxproj:
2670         * platform/graphics/ca/LayerPool.cpp: Copied from platform/graphics/ca/mac/LayerPool.mm.
2671         * platform/graphics/ca/LayerPool.h: Copied from platform/graphics/ca/mac/LayerPool.h.
2672         * platform/graphics/ca/TileCoverageMap.cpp: Copied from platform/graphics/ca/mac/TileCoverageMap.mm.
2673         * platform/graphics/ca/TileCoverageMap.h: Copied from platform/graphics/ca/mac/TileCoverageMap.h.
2674         * platform/graphics/ca/mac/LayerPool.h: Removed.
2675         * platform/graphics/ca/mac/LayerPool.mm: Removed.
2676         * platform/graphics/ca/mac/TileCoverageMap.h: Removed.
2677         * platform/graphics/ca/mac/TileCoverageMap.mm: Removed.
2678
2679 2014-06-13  Alex Christensen  <achristensen@webkit.org>
2680
2681         Make css jit compile for armv7.
2682         https://bugs.webkit.org/show_bug.cgi?id=133596
2683
2684         Reviewed by Benjamin Poulain.
2685
2686         * cssjit/FunctionCall.h:
2687         (WebCore::FunctionCall::swapArguments):
2688         Implemented for ARM_THUMB2 and removed allocator hack.
2689         * cssjit/RegisterAllocator.h:
2690         Added list of ARM_THUMB2 general purpose registers.
2691         (WebCore::RegisterAllocator::isValidRegister):
2692         Added ARM register range and corrected ARM64 register range now that r15 is tempRegister.
2693         * cssjit/SelectorCompiler.cpp:
2694         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
2695         Return CannotCompile if compiling fails because of lack of registers.
2696         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2697         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
2698         Implemented for ARM_THUMB2.
2699         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2700         Return false if the selector cannot be compiled because of lack of registers.
2701         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
2702         Added code using 32-bit operations and used macro assembler for 64-bit operations.
2703         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
2704         Implemented for APPLE_ARMV7S, where sdiv is not a template in the assembler.
2705         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
2706         Use addPtr instead of add64.
2707
2708 2014-06-13  Anders Carlsson  <andersca@apple.com>
2709
2710         Add a HTTPHeaderMap::get overload that takes an HTTPHeaderName
2711         https://bugs.webkit.org/show_bug.cgi?id=133877
2712
2713         Reviewed by Andreas Kling.
2714
2715         * Modules/websockets/WebSocketHandshake.cpp:
2716         (WebCore::WebSocketHandshake::serverWebSocketProtocol):
2717         (WebCore::WebSocketHandshake::serverSetCookie):
2718         (WebCore::WebSocketHandshake::serverSetCookie2):
2719         (WebCore::WebSocketHandshake::serverUpgrade):
2720         (WebCore::WebSocketHandshake::serverConnection):
2721         (WebCore::WebSocketHandshake::serverWebSocketAccept):
2722         * WebCore.exp.in:
2723         * platform/network/HTTPHeaderMap.cpp:
2724         (WebCore::HTTPHeaderMap::get):
2725         * platform/network/HTTPHeaderMap.h:
2726         * platform/network/HTTPHeaderNames.in:
2727         * plugins/PluginView.cpp:
2728         (WebCore::PluginView::handlePost):
2729
2730 2014-06-13  Commit Queue  <commit-queue@webkit.org>
2731
2732         Unreviewed, rolling out r169939.
2733         https://bugs.webkit.org/show_bug.cgi?id=133878
2734
2735         This patch raises assertions on mac (Requested by fredw on
2736         #webkit).
2737
2738         Reverted changeset:
2739
2740         "Draw radicals with glyphs for better rendering"
2741         https://bugs.webkit.org/show_bug.cgi?id=119038
2742         http://trac.webkit.org/changeset/169939
2743
2744 2014-06-13  Anders Carlsson  <andersca@apple.com>
2745
2746         Add a HTTPHeaderMap::set overload that takes a HTTPHeaderName
2747         https://bugs.webkit.org/show_bug.cgi?id=133874
2748
2749         Reviewed by Tim Horton.
2750
2751         * platform/network/HTTPHeaderMap.cpp:
2752         (WebCore::HTTPHeaderMap::set):
2753         * platform/network/HTTPHeaderMap.h:
2754         * platform/network/cf/ResourceRequestCFNet.cpp:
2755         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2756         * platform/network/mac/ResourceRequestMac.mm:
2757         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2758         * xml/XMLHttpRequest.cpp:
2759         (WebCore::XMLHttpRequest::send):
2760
2761 2014-06-13  Anders Carlsson  <andersca@apple.com>
2762
2763         Add a HTTPHeaderMap::find overload that takes a HTTPHeaderName
2764         https://bugs.webkit.org/show_bug.cgi?id=133872
2765
2766         Reviewed by Andreas Kling.
2767
2768         * loader/DocumentLoader.cpp:
2769         (WebCore::DocumentLoader::responseReceived):
2770         * platform/network/HTTPHeaderMap.cpp:
2771         (WebCore::HTTPHeaderMap::get):
2772         (WebCore::HTTPHeaderMap::find):
2773         * platform/network/HTTPHeaderMap.h:
2774         * platform/network/HTTPHeaderNames.in:
2775
2776 2014-06-13  Frédéric Wang  <fred.wang@free.fr>
2777
2778         Draw radicals with glyphs for better rendering
2779         https://bugs.webkit.org/show_bug.cgi?id=119038
2780
2781         Reviewed by Chris Fleizach.
2782
2783         We rewrite RenderMathMLRoot in order to fix bugs with SVG transforms and dynamic modification of children and allow drawing with an OpenType MATH table.
2784         The drawing of the radical sign (without the top bar) is now moved to a RenderMathMLRadicalOperator class inheriting from RenderMathMLOperator.
2785         This class fallbacks to the original drawing with graphic primitives if an OpenType MATH table is not available.
2786
2787         Tests: mathml/opentype/roots-LatinModern.html
2788                mathml/presentation/mroot-transform.html
2789
2790         * CMakeLists.txt: add files to build system.
2791         * WebCore.vcxproj/WebCore.vcxproj: ditto.
2792         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
2793         * WebCore.xcodeproj/project.pbxproj: ditto
2794         * css/mathml.css: remove rules for msqrt/mroot. The "script level" in mroot is not incremented by 2 as specified in the spec.
2795         (math, mrow, mfenced, merror, mphantom, mstyle, menclose):
2796         (mroot > *:last-child):
2797         (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose): Deleted.
2798         (msqrt > *): Deleted.
2799         (mroot): Deleted. This rule was causing bug 126516.
2800         (mroot > * + *): Deleted.
2801         * rendering/RenderObject.h: Add two new isRenderMathML* functions for dynamic casting.
2802         (WebCore::RenderObject::isRenderMathMLRadicalOperator):
2803         (WebCore::RenderObject::isRenderMathMLRootWrapper):
2804         * rendering/mathml/RenderMathMLOperator.cpp: Accept a set of operator dictionary flags, all disabled by default. This is to allow anonymous radicas, which don't have any flag.
2805         isFencedOperator() is now replaced with the more general isAnonymous() since we allow anonymous radical operator fors msqrt/mroot.
2806         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
2807         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
2808         (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
2809         (WebCore::RenderMathMLOperator::SetOperatorProperties):
2810         (WebCore::RenderMathMLOperator::updateTokenContent):
2811         * rendering/mathml/RenderMathMLOperator.h: Allow class to be overriden, redefine the anonymous constructor, remove isFencedOperator().
2812         * rendering/mathml/RenderMathMLRadicalOperator.cpp: Added.
2813         (WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator):
2814         (WebCore::RenderMathMLRadicalOperator::stretchTo):
2815         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties):
2816         (WebCore::RenderMathMLRadicalOperator::computePreferredLogicalWidths):
2817         (WebCore::RenderMathMLRadicalOperator::computeLogicalHeight):
2818         (WebCore::RenderMathMLRadicalOperator::paint):
2819         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError):
2820         * rendering/mathml/RenderMathMLRadicalOperator.h: Added.
2821         * rendering/mathml/RenderMathMLRoot.cpp: Rewritten. Some parts to use graphic primitives are moved to RenderMathMLRadicalOperator.cpp.
2822         (WebCore::RenderMathMLRoot::RenderMathMLRoot):
2823         (WebCore::RenderMathMLRoot::baseWrapper):
2824         (WebCore::RenderMathMLRoot::radicalWrapper):
2825         (WebCore::RenderMathMLRoot::indexWrapper):
2826         (WebCore::RenderMathMLRoot::radicalOperator):
2827         (WebCore::RenderMathMLRoot::restructureWrappers):
2828         (WebCore::RenderMathMLRoot::addChild):
2829         (WebCore::RenderMathMLRoot::styleDidChange):
2830         (WebCore::RenderMathMLRoot::updateFromElement):
2831         (WebCore::RenderMathMLRoot::updateStyle):
2832         (WebCore::RenderMathMLRoot::firstLineBaseline):
2833         (WebCore::RenderMathMLRoot::layout):
2834         (WebCore::RenderMathMLRoot::paint):
2835         (WebCore::RenderMathMLRootWrapper::createAnonymousWrapper):
2836         (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring):
2837         (WebCore::RenderMathMLRootWrapper::removeChild):
2838         (WebCore::RenderMathMLRoot::paddingTop): Deleted.
2839         (WebCore::RenderMathMLRoot::paddingBottom): Deleted.
2840         (WebCore::RenderMathMLRoot::paddingLeft): Deleted.
2841         (WebCore::RenderMathMLRoot::paddingRight): Deleted.
2842         (WebCore::RenderMathMLRoot::paddingBefore): Deleted.
2843         (WebCore::RenderMathMLRoot::paddingAfter): Deleted.
2844         (WebCore::RenderMathMLRoot::paddingStart): Deleted.
2845         (WebCore::RenderMathMLRoot::paddingEnd): Deleted.
2846         (WebCore::RenderMathMLRoot::index): Deleted.
2847         * rendering/mathml/RenderMathMLRoot.h: Rewritten.
2848         (WebCore::RenderMathMLRootWrapper::RenderMathMLRootWrapper):
2849
2850 2014-06-12  Anders Carlsson  <andersca@apple.com>
2851
2852         Add overloads of HTTPHeaderMap::find and remove that take enums
2853         https://bugs.webkit.org/show_bug.cgi?id=133823
2854
2855         Reviewed by Sam Weinig.
2856
2857         * WebCore.exp.in:
2858         Update symbols.
2859
2860         * WebCore.xcodeproj/project.pbxproj:
2861         Make HTTPHeaderNames.h private.
2862
2863         * platform/network/HTTPHeaderMap.cpp:
2864         (WebCore::HTTPHeaderMap::contains):
2865         Convert the enum value to a string and call the contains overload that takes a string.
2866
2867         (WebCore::HTTPHeaderMap::remove):
2868         Convert the enum value to a string and call the remove overload that takes a string.
2869
2870         * platform/network/HTTPHeaderMap.h:
2871         Add new overloads taking HTTPHeaderName and mark the versions taking string literals as deleted.
2872
2873         * platform/network/HTTPHeaderNames.in:
2874         Add new header names.
2875
2876         * platform/network/ResourceRequestBase.cpp:
2877         (WebCore::ResourceRequestBase::clearHTTPAuthorization):
2878         (WebCore::ResourceRequestBase::clearHTTPContentType):
2879         (WebCore::ResourceRequestBase::clearHTTPReferrer):
2880         (WebCore::ResourceRequestBase::clearHTTPOrigin):
2881         (WebCore::ResourceRequestBase::clearHTTPUserAgent):
2882         (WebCore::ResourceRequestBase::clearHTTPAccept):
2883         Update functions to use HTTPHeaderName enums.
2884
2885         (WebCore::ResourceRequestBase::isConditional):
2886         (WebCore::ResourceRequestBase::makeUnconditional):
2887         Simplify these.
2888
2889 2014-06-13  Jarek Czekalski  <jarekczek@poczta.onet.pl>
2890
2891         [ATK] Fix text inside "span" block in "a" block was not accessible.
2892         https://bugs.webkit.org/show_bug.cgi?id=132349
2893
2894         Reviewed by Mario Sanchez Prada.
2895
2896         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: Add link role
2897           to the list of roles whose objects always expose atk_text interface.
2898
2899 2014-06-13  Alberto Garcia  <berto@igalia.com>
2900
2901         [GTK] GLContextEGL.cpp: conflicting declaration 'typedef ptrdiff_t GLintptr'
2902         https://bugs.webkit.org/show_bug.cgi?id=133550
2903
2904         Reviewed by Gustavo Noronha Silva.
2905
2906         Cairo includes some definitions from GLX that conflict with the
2907         ones provided by our GLES2 headers (GLintptr, GLsizeiptr).
2908
2909         Since GLContextEGL doesn't use any GLX functions we can safely
2910         disable the inclusion of those functions in that source file.
2911
2912         * platform/graphics/egl/GLContextEGL.cpp:
2913
2914 2014-06-13  Manuel Rego Casasnovas  <rego@igalia.com>
2915
2916         [CSS Grid Layout] Introduce an explicit type for resolved grid positions
2917         https://bugs.webkit.org/show_bug.cgi?id=131732
2918
2919         Reviewed by Sergio Villar Senin.
2920
2921         We were using simple size_t integers to represent resolved grid
2922         positions in our internal data structures. This change allows us to
2923         clarify the code, avoid potential off by one mistakes, and move the
2924         resolving code to a central place.
2925
2926         A new class GridResolvedPosition has been created and the related
2927         methods have been moved there from RenderGrid.
2928         GridSpan is now defined by two GridResolvedPosition, so all the code
2929         using it has been modified to adapt it to GridResolvedPosition.
2930
2931         No new tests as it is already covered by current tests
2932         (fast/css-grid-layout/).
2933
2934         * CMakeLists.txt:
2935         * WebCore.vcxproj/WebCore.vcxproj:
2936         * WebCore.vcxproj/WebCore.vcxproj.filters:
2937         * WebCore.xcodeproj/project.pbxproj:
2938         * css/CSSGridTemplateAreasValue.cpp:
2939         (WebCore::stringForPosition):
2940         * css/CSSParser.cpp:
2941         (WebCore::CSSParser::parseGridTemplateAreasRow):
2942         * css/StyleResolver.cpp:
2943         (WebCore::createImplicitNamedGridLinesFromGridArea):
2944         * rendering/RenderGrid.cpp:
2945         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2946         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
2947         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2948         (WebCore::RenderGrid::insertItemIntoGrid):
2949         (WebCore::RenderGrid::placeItemsOnGrid):
2950         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
2951         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
2952         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2953         (WebCore::RenderGrid::autoPlacementMajorAxisDirection):
2954         (WebCore::RenderGrid::autoPlacementMinorAxisDirection):
2955         (WebCore::RenderGrid::gridAreaBreadthForChild):
2956         (WebCore::RenderGrid::findChildLogicalPosition):
2957         (WebCore::RenderGrid::explicitGridColumnCount): Deleted.
2958         (WebCore::RenderGrid::explicitGridRowCount): Deleted.
2959         (WebCore::isColumnSide): Deleted.
2960         (WebCore::isStartSide): Deleted.
2961         (WebCore::RenderGrid::explicitGridSizeForSide): Deleted.
2962         (WebCore::RenderGrid::resolveGridPositionsFromAutoPlacementPosition): Deleted.
2963         (WebCore::gridLinesForSide): Deleted.
2964         (WebCore::implicitNamedGridLineForSide): Deleted.
2965         (WebCore::isNonExistentNamedLineOrArea): Deleted.
2966         (WebCore::RenderGrid::adjustGridPositionsFromStyle): Deleted.
2967         (WebCore::RenderGrid::resolveGridPositionsFromStyle): Deleted.
2968         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle): Deleted.
2969         (WebCore::RenderGrid::resolveGridPositionFromStyle): Deleted.
2970         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition): Deleted.
2971         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition): Deleted.
2972         (WebCore::firstNamedGridLineBeforePosition): Deleted.
2973         (WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Deleted.
2974         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Deleted.
2975         * rendering/RenderGrid.h:
2976         * rendering/style/GridCoordinate.h:
2977         (WebCore::GridSpan::GridSpan):
2978         (WebCore::GridSpan::operator==):
2979         * rendering/style/GridPosition.h:
2980         (WebCore::GridPosition::adjustGridPositionForRowEndColumnEndSide): Deleted.
2981         (WebCore::GridPosition::adjustGridPositionForSide): Deleted.
2982         * rendering/style/GridResolvedPosition.cpp: Added.
2983         (WebCore::isColumnSide):
2984         (WebCore::isStartSide):
2985         (WebCore::explicitGridSizeForSide):
2986         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
2987         (WebCore::gridLinesForSide):
2988         (WebCore::implicitNamedGridLineForSide):
2989         (WebCore::isNonExistentNamedLineOrArea):
2990         (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle):
2991         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
2992         (WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle):
2993         (WebCore::GridResolvedPosition::resolveGridPositionFromStyle):
2994         (WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition):
2995         (WebCore::GridResolvedPosition::resolveNamedGridLinePositionAgainstOppositePosition):
2996         (WebCore::firstNamedGridLineBeforePosition):
2997         (WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
2998         (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
2999         * rendering/style/GridResolvedPosition.h: Added.
3000         (WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide):
3001         (WebCore::GridResolvedPosition::adjustGridPositionForSide):
3002         (WebCore::GridResolvedPosition::GridResolvedPosition):
3003         (WebCore::GridResolvedPosition::operator++):
3004         (WebCore::GridResolvedPosition::operator==):
3005         (WebCore::GridResolvedPosition::operator<):
3006         (WebCore::GridResolvedPosition::operator>):
3007         (WebCore::GridResolvedPosition::operator<=):
3008         (WebCore::GridResolvedPosition::operator>=):
3009         (WebCore::GridResolvedPosition::toInt):
3010         (WebCore::GridResolvedPosition::next):
3011
3012 2014-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3013
3014         [GTK] Remove all deprecated API from GObject DOM bindings
3015         https://bugs.webkit.org/show_bug.cgi?id=133728
3016
3017         Reviewed by Martin Robinson.
3018
3019         Remove all deprecated symbols from the GObject DOM bindings,
3020         keeping the deprecation infraestructure for future API breaks.
3021
3022         * PlatformGTK.cmake: Remove WebKitDOMDeprecated files from the
3023         build.
3024         * bindings/gobject/WebKitDOMDeprecated.cpp: Removed.
3025         * bindings/gobject/WebKitDOMDeprecated.h: Removed.
3026         * bindings/gobject/WebKitDOMDeprecated.symbols: Removed.
3027         * bindings/gobject/webkitdom.symbols: Updated to the current API.
3028         * bindings/scripts/CodeGeneratorGObject.pm:
3029         (SkipFunction): Remove exceptions for deprecated API.
3030         (GetFunctionDeprecationInformation): Ditto.
3031         (GetEffectiveFunctionName): Ditto.
3032         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
3033         (webkit_dom_test_event_target_dispatch_event): Deleted.
3034         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
3035         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.symbols:
3036         * dom/Element.idl: Remove GObject exception.
3037
3038 2014-06-12  Zalan Bujtas  <zalan@apple.com>
3039
3040         Subpixel rendering: Make <input type=> and <button> elements' decoration subpixel aware.
3041         https://bugs.webkit.org/show_bug.cgi?id=133812
3042         <rdar://problem/17286309>
3043
3044         Reviewed by Simon Fraser.
3045
3046         Enable <input type=> and <button> decoration painting on subpixel positions.
3047         The theme size is still integral, but its position is snapped to device pixels.
3048         Theme's label, the InlineTextBox is already subpixel position aware.
3049         webkit.org/b/132005 tracks the rest of the themes.
3050
3051         Not testable.
3052
3053         * accessibility/AccessibilityObject.cpp:
3054         (WebCore::AccessibilityObject::boundingBoxForQuads): Keep integral snapping for now.
3055         * platform/Theme.h:
3056         (WebCore::Theme::paint):
3057         (WebCore::Theme::inflateControlPaintRect):
3058         * platform/mac/ThemeMac.h:
3059         * platform/mac/ThemeMac.mm:
3060         (WebCore::inflateRect):
3061         (WebCore::configureToggleButton):
3062         (WebCore::sharedRadioCell):
3063         (WebCore::sharedCheckboxCell):
3064         (WebCore::paintToggleButton):
3065         (WebCore::setUpButtonCell):
3066         (WebCore::button):
3067         (WebCore::paintButton):
3068         (WebCore::paintStepper):
3069         (WebCore::ThemeMac::inflateControlPaintRect):
3070         (WebCore::ThemeMac::paint):
3071         * rendering/RenderBlock.cpp:
3072         (WebCore::RenderBlock::addVisualOverflowFromTheme): Keep integral snapping for now.
3073         * rendering/RenderFlowThread.cpp:
3074         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme): Keep integral snapping for now.
3075         * rendering/RenderTheme.cpp:
3076         (WebCore::RenderTheme::paint):
3077         (WebCore::RenderTheme::adjustRepaintRect):
3078         * rendering/RenderTheme.h:
3079         * rendering/RenderThemeMac.h:
3080         * rendering/RenderThemeMac.mm:
3081         (WebCore::RenderThemeMac::adjustRepaintRect):
3082
3083 2014-06-12  Brent Fulgham  <bfulgham@apple.com>
3084
3085         [Win] Avoid fork bomb during build
3086         https://bugs.webkit.org/show_bug.cgi?id=133837
3087         <rdar://problem/17296034>
3088
3089         Reviewed by Tim Horton.
3090
3091         * WebCore.vcxproj/build-generated-files.sh: Use a reasonable
3092         default value when the 'num-cpus' script is not available.
3093
3094 2014-06-12  Gavin Barraclough  <barraclough@apple.com>
3095
3096         Add support for thread/WorkQueue QoS
3097         https://bugs.webkit.org/show_bug.cgi?id=130688
3098
3099         Reviewed by Anders Carlson & Simon Fraser.
3100
3101         WebCore's ScrollingThread should be UserInteractive.
3102
3103         * page/scrolling/ScrollingThread.cpp:
3104         (WebCore::ScrollingThread::threadCallback):
3105             - ScrollingThread should be UserInteractive
3106
3107 2014-06-12  Brent Fulgham  <bfulgham@apple.com>
3108
3109         [Mac] Build fix after r169919.
3110
3111         * WebCore.xcodeproj/project.pbxproj: The 'TileController.h' file must be a private header.
3112
3113 2014-06-12  Andy Estes  <aestes@apple.com>
3114
3115         [Mac] Speculative build fix after r169921.
3116
3117         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3118         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers):
3119
3120 2014-06-12  Jer Noble  <jer.noble@apple.com>
3121
3122         [MSE][Mac] Stop observing the sample buffer renderers when destroying them.
3123         https://bugs.webkit.org/show_bug.cgi?id=133831
3124
3125         Reviewed by Beth Dakin.
3126
3127         Release our retain on our AVSampleBufferDisplayLayer and AVSampleBufferAudioRenderer by stopping
3128         our observation of its properties when removing them from the SourceBufferPrivateAVFObjC object.
3129
3130         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3131         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers):
3132
3133 2014-06-12  Brent Fulgham  <bfulgham@apple.com>
3134
3135         Correct file locations after r169914. These should have been
3136         in platform/graphics/ca.
3137
3138         Rubberstamped by Tim Horton.
3139
3140         * WebCore.xcodeproj/project.pbxproj:
3141         * platform/graphics/ca/TileController.cpp: Copied from platform/graphics/ca/mac/TileController.cpp.
3142         * platform/graphics/ca/TileController.h: Copied from platform/graphics/ca/mac/TileController.h.
3143         * platform/graphics/ca/TileGrid.cpp: Copied from platform/graphics/ca/mac/TileGrid.cpp.
3144         * platform/graphics/ca/TileGrid.h: Copied from platform/graphics/ca/mac/TileGrid.h.
3145         * platform/graphics/ca/mac/TileController.cpp: Removed.
3146         * platform/graphics/ca/mac/TileController.h: Removed.
3147         * platform/graphics/ca/mac/TileGrid.cpp: Removed.
3148         * platform/graphics/ca/mac/TileGrid.h: Removed.
3149
3150 2014-06-12  Andy Estes  <aestes@apple.com>
3151
3152         Fix the build after r169913.
3153
3154         * loader/HistoryController.cpp:
3155         (WebCore::HistoryController::restoreScrollPositionAndViewState):
3156
3157 2014-06-12  Alex Christensen  <achristensen@webkit.org>
3158
3159         Collect correct web timing data from CFNetwork.
3160         https://bugs.webkit.org/show_bug.cgi?id=133824
3161         <rdar://problem/17273654>
3162
3163         Reviewed by Simon Fraser.
3164
3165         Covered by existing web timing tests.
3166
3167         * platform/network/mac/ResourceHandleMac.mm:
3168         (WebCore::ResourceHandle::getConnectionTimingData):
3169         Use _kCFNTimingDataFetchStart as the reference start time key.
3170
3171 2014-06-12  Brent Fulgham  <bfulgham@apple.com>
3172
3173         Convert TileController and TileGrid from ObjC to C++
3174         https://bugs.webkit.org/show_bug.cgi?id=133819
3175         <rdar://problem/17291841>
3176
3177         Reviewed by Tim Horton.
3178
3179         Convert TileGrid.mm and TileController.mm into C++ implementations. This required creating a 'frameForLayer'
3180         wrapper to call the 'frame' method of the CALayer object.
3181
3182         * WebCore.xcodeproj/project.pbxproj:
3183         * platform/graphics/ca/mac/TileController.cpp: Copied from platform/graphics/ca/mac/TileController.mm.
3184         (WebCore::TileController::blankPixelCountForTiles):
3185         * platform/graphics/ca/mac/TileController.mm: Removed.
3186         * platform/graphics/ca/mac/TileGrid.cpp: Copied from platform/graphics/ca/mac/TileGrid.mm.
3187         * platform/graphics/ca/mac/TileGrid.h:
3188         * platform/graphics/ca/mac/TileGrid.mm: Removed.
3189         * platform/graphics/mac/WebLayer.h:
3190         * platform/graphics/mac/WebLayer.mm:
3191         (WebCore::frameForLayer): Wrapper function to hide ObjC call from C++ compilation unit.
3192
3193 2014-06-12  Simon Fraser  <simon.fraser@apple.com>
3194
3195         [iOS WK2] Fix crash on back/foward swipe
3196         https://bugs.webkit.org/show_bug.cgi?id=133826
3197         <rdar://problem/17032752>
3198
3199         Reviewed by Tim Horton.
3200
3201         AsyncScrollingCoordinator::frameViewForScrollingNode() would crash with a null root
3202         state node, because HistoryController::restoreScrollPositionAndViewState() tried
3203         to restore scroll position (via restoreViewState()) before hooking up the scrolling
3204         coordinator.
3205         
3206         Fix by doing the scrollingCoordinator->frameViewRootLayerDidChange() before
3207         calling restoreViewState().
3208         
3209         Also add a defensive null-check on the root state node in updateScrollPositionAfterAsyncScrollTimerFired().
3210
3211         * loader/HistoryController.cpp:
3212         (WebCore::HistoryController::restoreScrollPositionAndViewState):
3213         * page/scrolling/AsyncScrollingCoordinator.cpp:
3214         (WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode):
3215
3216 2014-06-12  Anders Carlsson  <andersca@apple.com>
3217
3218         Add a space after the comma.
3219
3220         * platform/network/HTTPHeaderMap.cpp:
3221         (WebCore::HTTPHeaderMap::add):
3222
3223 2014-06-12  Anders Carlsson  <andersca@apple.com>
3224
3225         Move header value merging to HTTPHeaderMap
3226         https://bugs.webkit.org/show_bug.cgi?id=133815
3227
3228         Reviewed by Andreas Kling.
3229
3230         * platform/network/HTTPHeaderMap.cpp:
3231         (WebCore::HTTPHeaderMap::set):
3232         (WebCore::HTTPHeaderMap::add):
3233         * platform/network/HTTPHeaderMap.h:
3234         * platform/network/ResourceRequestBase.cpp:
3235         (WebCore::ResourceRequestBase::addHTTPHeaderField):
3236         * platform/network/ResourceResponseBase.cpp:
3237         (WebCore::ResourceResponseBase::addHTTPHeaderField):
3238         * xml/XMLHttpRequest.cpp:
3239         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
3240
3241 2014-06-12  Anders Carlsson  <andersca@apple.com>
3242
3243         Add ShapeValue.cpp and move ShapeValue::isImageValid() there
3244         https://bugs.webkit.org/show_bug.cgi?id=133809
3245
3246         Reviewed by Antti Koivisto.
3247
3248         This gets rid of CachedImage.h (and ResourceRequest and friends) from RenderStyle.h.
3249
3250         * CMakeLists.txt:
3251         * WebCore.vcxproj/WebCore.vcxproj:
3252         * WebCore.vcxproj/WebCore.vcxproj.filters:
3253         * WebCore.xcodeproj/project.pbxproj:
3254         * css/CSSComputedStyleDeclaration.cpp:
3255         (WebCore::shapePropertyValue):
3256         * css/CSSCrossfadeValue.cpp:
3257         * css/CSSFilterImageValue.cpp:
3258         * css/StyleResolver.h:
3259         * page/animation/CSSPropertyAnimation.cpp:
3260         (WebCore::blendFunc):
3261         * rendering/ShapeValue.cpp: Added.
3262         (WebCore::ShapeValue::isImageValid):
3263         * rendering/shapes/ShapeOutsideInfo.cpp:
3264         (WebCore::referenceBox):
3265         (WebCore::ShapeOutsideInfo::computedShape):
3266         (WebCore::ShapeOutsideInfo::isEnabledFor):
3267         * rendering/style/ShapeValue.h:
3268         (WebCore::ShapeValue::type):
3269         (WebCore::ShapeValue::setImage):
3270         (WebCore::ShapeValue::ShapeValue):
3271         (WebCore::ShapeValue::isImageValid): Deleted.
3272
3273 2014-06-12  Zalan Bujtas  <zalan@apple.com>
3274
3275         Subpixel rendering: Make <select> element's decoration subpixel aware.
3276         https://bugs.webkit.org/show_bug.cgi?id=133781
3277         <rdar://problem/17272083>
3278
3279         Reviewed by Simon Fraser.
3280
3281         Enable <select> decoration painting on subpixel positions.
3282         The theme size is still integral, but its position is snapped to device pixels.
3283         Theme's label, the InlineTextBox is already subpixel position aware.
3284         webkit.org/b/132005 tracks the rest of the themes.
3285
3286         Not testable.
3287
3288         * rendering/RenderTheme.cpp:
3289         (WebCore::RenderTheme::paint):
3290         * rendering/RenderTheme.h:
3291         (WebCore::RenderTheme::paintMenuList):
3292         * rendering/RenderThemeMac.h:
3293         * rendering/RenderThemeMac.mm:
3294         (WebCore::inflateRect):
3295         (WebCore::RenderThemeMac::adjustRepaintRect):
3296         (WebCore::RenderThemeMac::paintMenuList):
3297         (WebCore::RenderThemeMac::progressBarRectForBounds):
3298         (WebCore::RenderThemeMac::setPopupButtonCellState):
3299         (WebCore::RenderThemeMac::inflateRect): Deleted.
3300
3301 2014-06-12  Jer Noble  <jer.noble@apple.com>
3302
3303         [MSE][Mac] Crash in MediaSourcePrivateAVFObjC::naturalSize()
3304         https://bugs.webkit.org/show_bug.cgi?id=133789
3305
3306         Reviewed by Eric Carlson.
3307
3308         Add null-check to proctect against being queried for the naturalSize before we have a
3309         m_mediaSourcePrivate.
3310
3311         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3312         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
3313
3314 2014-06-12  Alberto Garcia  <berto@igalia.com>
3315
3316         [GTK] fails to build with --disable-webgl --disable-accelerated-compositing
3317         https://bugs.webkit.org/show_bug.cgi?id=131267
3318
3319         Reviewed by Philippe Normand.
3320
3321         Add missing headers needed for Float32Array::create().
3322
3323         * Modules/webaudio/AudioBuffer.cpp:
3324
3325 2014-06-12  Sergio Villar Senin  <svillar@igalia.com>
3326
3327         [GTK] REGRESSION: application name is not correctly appended to the UA
3328         https://bugs.webkit.org/show_bug.cgi?id=133793
3329
3330         Reviewed by Carlos Garcia Campos.
3331
3332         We must use a blank to separate the default UA provided by WebKitGtk
3333         from the application name coming from the public API.
3334
3335         Added an extra test case to the API tests to catch regressions.
3336
3337         * platform/gtk/UserAgentGtk.cpp:
3338         (WebCore::standardUserAgent):
3339
3340 2014-06-12  Zan Dobersek  <zdobersek@igalia.com>
3341
3342         WorkerRunLoop::Task::performTask should take in WorkerGlobalScope* to avoid downcasting
3343         https://bugs.webkit.org/show_bug.cgi?id=133616
3344
3345         Reviewed by Andreas Kling.
3346
3347         * workers/WorkerRunLoop.cpp:
3348         (WebCore::WorkerRunLoop::Task::performTask): Demand the context parameter to be a pointer
3349         to WorkerGlobalScope instead of ScriptExecutionContext, avoiding an unnecessary downcast.
3350         In the future this complete code path should use a reference to WorkerGlobalScope instead
3351         of a pointer.
3352         * workers/WorkerRunLoop.h:
3353
3354 2014-06-12  Sergio Villar Senin  <svillar@igalia.com>
3355
3356         [GTK] Unsupported browser in www.icloud.com
3357         https://bugs.webkit.org/show_bug.cgi?id=133403
3358
3359         Reviewed by Martin Robinson.
3360
3361         We claim to be Safari (among others) to ensure maximum
3362         compatibility with existing web sites. Valid Safari UA strings do
3363         always (since Safari 3.0) contain the string "Version/X" before
3364         the "Safari/X" part. We were wrongly only adding it in very
3365         specific cases and we were placing it at the wrong position as it
3366         must precede the "Safari/X" part.
3367
3368         From now on we unconditionally prepend the "Version/X" string to
3369         the "Safari/X" part as we always claim to be Safari. This makes
3370         the NeedsSafariVersion6 quirk invalid. This not only fixes
3371         "unsupported browser" issues in icloud.com, but also in
3372         globalforestwatch.com and live.com among many others.
3373
3374         Apart from that I'm bumping the Safari Version in the UA to 8.0 as
3375         we're already claiming to be "Safari/538.35"" which corresponds to
3376         Safari 8 beta.
3377
3378         * platform/gtk/UserAgentGtk.cpp:
3379         (WebCore::buildUserAgentString):
3380         (WebCore::standardUserAgentForURL):
3381
3382 2014-06-12  Pratik Solanki  <psolanki@apple.com>
3383
3384         Avoid creating a CFData when checking if a resource is file backed
3385         https://bugs.webkit.org/show_bug.cgi?id=133783
3386
3387         Reviewed by Andreas Kling.
3388
3389         Export SharedBuffer::hasPlatformData().
3390
3391         No new tests because no functional changes.
3392
3393         * WebCore.exp.in:
3394         * platform/SharedBuffer.h:
3395
3396 2014-06-11  Myles C. Maxfield  <mmaxfield@apple.com>
3397
3398         SVGGlyphToPathTranslator ASSERTs when encountering a missing glyph in an SVG font
3399         https://bugs.webkit.org/show_bug.cgi?id=133528
3400
3401         Reviewed by Simon Fraser.
3402
3403         Turns out this assertion is benign. We can take an early out of advance() (which
3404         is then handled properly by Font::dashesForIntersectionsWithRect()
3405
3406         Test: svg/custom/skip-underline-missing-glyph.html
3407
3408         * platform/graphics/mac/FontMac.mm:
3409         (WebCore::Font::dashesForIntersectionsWithRect): Rather than skip partial results,
3410         don't skip anything at all to be consistent.
3411         * rendering/svg/SVGTextRunRenderingContext.cpp:
3412         (WebCore::SVGGlyphToPathTranslator::advance): Take an early out to avoid an ASSERT.
3413
3414 2014-06-11  Simon Fraser  <simon.fraser@apple.com>
3415
3416         [iOS WK2] Give WebKitTestRunner a viewport configuration with initial scale=1 for testing
3417         https://bugs.webkit.org/show_bug.cgi?id=133779
3418
3419         Reviewed by Benjamin Poulain.
3420
3421         Add a "testing" viewport configuration with initial scale of 1.
3422
3423         * WebCore.exp.in:
3424         * page/ViewportConfiguration.cpp:
3425         (WebCore::ViewportConfiguration::testingParameters):
3426         * page/ViewportConfiguration.h:
3427
3428 2014-06-11  Pratik Solanki  <psolanki@apple.com>
3429
3430         Keep CFDataRefs in SharedBuffer instead of merging them