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