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