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