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