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