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