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