[GStreamer] ASSERT failure in WebKitWebSource in StreamingClient
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-08-25  Brendan Long  <b.long@cablelabs.com>
2
3         [GStreamer] ASSERT failure in WebKitWebSource in StreamingClient
4         https://bugs.webkit.org/show_bug.cgi?id=136132
5
6         adoptGRef() has an ASSERT failure if it's used on a floating pointer. For some reason,
7         WebKitWebSrc* src in StreamingClient's constructor is floating. Since we
8         don't construct this ourselves, I assume this is happening in Playbin.
9
10         If we remove the ref and adopt, GRefPtr's constructor calls gst_object_ref_sink,
11         which removes the floating reference and doesn't increment the reference count.
12         This should work, but actually causes the page to either lock up or crash (different
13         results for different testers).
14
15         In this case, it seems like the adoptGRef / gst_object_ref was the correct thing to do,
16         but adoptGRef won't actually let us do. Removing the ASSERT is a bad idea, because
17         usually we don't want to adopt floating pointers.
18
19         This is all a long way of saying that making m_src a raw pointer and manually
20         calling gst_object_ref(), and calling gst_object_unref in the destructor is the
21         best solution in this case, since it fixes the problem while leaving the ASSERT
22         to protect us in the much more common case where adopting a floating reference is bad.
23
24         Reviewed by Philippe Normand.
25
26         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
27         (StreamingClient::StreamingClient): Make m_src a raw pointer instead of a GRefPtr.
28         (StreamingClient::~StreamingClient): Unref m_src.
29         (StreamingClient::createReadBuffer): Replace m_src.get() with m_src, since it's a raw pointer now.
30         (StreamingClient::handleResponseReceived): Same.
31         (StreamingClient::handleDataReceived): Same.
32         (StreamingClient::handleNotifyFinished): Same.
33         (CachedResourceStreamingClient::notifyFinished): Same.
34         (ResourceHandleStreamingClient::didFail): Same.
35         (ResourceHandleStreamingClient::wasBlocked): Same.
36         (ResourceHandleStreamingClient::cannotShowURL): Same.
37
38 2014-08-25  Zan Dobersek  <zdobersek@igalia.com>
39
40         [GTK] Remove PopupMenuGtk, SearchPopupMenuGtk
41         https://bugs.webkit.org/show_bug.cgi?id=136211
42
43         Reviewed by Carlos Garcia Campos.
44
45         Remove the two classes from the codebase. They're not used anymore
46         after the WebKit1 layer of the GTK port was removed some time ago.
47
48         * PlatformGTK.cmake:
49         * platform/gtk/PopupMenuGtk.cpp: Removed.
50         * platform/gtk/PopupMenuGtk.h: Removed.
51         * platform/gtk/SearchPopupMenuGtk.cpp: Removed.
52         * platform/gtk/SearchPopupMenuGtk.h: Removed.
53
54 2014-08-25  Shivakumar JM  <shiva.jm@samsung.com>
55
56         Web Core: Fix unused parameter build warning.
57         https://bugs.webkit.org/show_bug.cgi?id=136208
58
59         Reviewed by Darin Adler.
60
61         Fix unused build warning by removing parameter, which is not used.
62
63         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
64         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
65
66 2014-08-22  Sergio Villar Senin  <svillar@igalia.com>
67
68         ASSERTION FAILED: !trackSizes.isEmpty() in WebCore::createGridTrackList
69         https://bugs.webkit.org/show_bug.cgi?id=136149
70
71         Reviewed by Darin Adler.
72
73         The second argument of the repeat() function is a <track-list>
74         that must have at least one <track-size>. Should it not be found,
75         the declaration must be invalidated.
76
77         * css/CSSParser.cpp:
78         (WebCore::CSSParser::parseGridTrackRepeatFunction):
79
80 2014-08-24  Zan Dobersek  <zdobersek@igalia.com>
81
82         Move WebCore storage code to C++11 lambdas, std::function
83         https://bugs.webkit.org/show_bug.cgi?id=126435
84
85         Reviewed by Darin Adler.
86
87         Use C++11 lambdas instead of WTF::bind and std::function<void ()>
88         instead of WTF::Function<void ()> in StorageAreaSync, StorageSyncManager,
89         StorageThread and StorageTracker classes.
90
91         * storage/StorageAreaSync.cpp:
92         (WebCore::StorageAreaSync::StorageAreaSync):
93         (WebCore::StorageAreaSync::scheduleFinalSync):
94         (WebCore::StorageAreaSync::syncTimerFired):
95         * storage/StorageSyncManager.cpp:
96         (WebCore::StorageSyncManager::dispatch):
97         * storage/StorageSyncManager.h:
98         * storage/StorageThread.cpp:
99         (WebCore::StorageThread::dispatch):
100         (WebCore::StorageThread::terminate):
101         (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads):
102         * storage/StorageThread.h:
103         * storage/StorageTracker.cpp:
104         (WebCore::StorageTracker::importOriginIdentifiers):
105         (WebCore::StorageTracker::syncImportOriginIdentifiers):
106         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
107         (WebCore::StorageTracker::setOriginDetails):
108         (WebCore::StorageTracker::deleteAllOrigins):
109         (WebCore::StorageTracker::deleteOrigin):
110
111 2014-08-24  Alexey Proskuryakov  <ap@apple.com>
112
113         ASSERT(extractable()) when storing a non-extractable key in IndexedDB
114         https://bugs.webkit.org/show_bug.cgi?id=136202
115         rdar://problem/17993967
116
117         Reviewed by Darin Adler.
118
119         Test: crypto/subtle/rsa-indexeddb-non-exportable.html
120
121         Removed the obsolete assertion.
122
123         * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::exportData):
124         * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::exportData):
125         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::exportData):
126
127 2014-08-24  Brian J. Burg  <burg@cs.washington.edu>
128
129         Web Inspector: Rename DOM.RGBA and remove workarounds in the bindings generator
130         https://bugs.webkit.org/show_bug.cgi?id=136025
131
132         Reviewed by Joseph Pecoraro.
133
134         Rename DOM.RGBA to DOM.RGBAColor to avoid name clashes with headers on Windows CE.
135         This workaround used to be special-cased in the bindings generator.
136
137         Type names are not used in protocol messages, so this does not introduce legacy issues.
138
139         * inspector/protocol/DOM.json:
140
141 2014-08-24  Michael Catanzaro  <mcatanzaro@igalia.com>
142
143         [GTK] Toggle buttons visually broken with GTK+ 3.13.7
144         https://bugs.webkit.org/show_bug.cgi?id=136130
145
146         Reviewed by Martin Robinson.
147
148         No new tests. Hopefully covered by existing tests, and our tests only
149         run with GTK+ 3.6 anyway.
150
151         * platform/gtk/RenderThemeGtk3.cpp:
152         (WebCore::paintToggle): use GTK_STATE_FLAG_CHECKED when compiling for
153         GTK+ 3.13.7 and above to ensure toggle buttons display as toggled.
154
155 2014-08-23  Brady Eidson  <beidson@apple.com>
156
157         Random Gamepad cleanup
158         https://bugs.webkit.org/show_bug.cgi?id=136193
159
160         Reviewed by Sam Weinig.
161
162         No new tests (Not tested yet, and no change in behavior anyways)
163
164         - Use DOMWindow WeakPtrs when iterating
165         - More references instead of pointers
166
167         * Modules/gamepad/GamepadEvent.cpp:
168         (WebCore::GamepadEvent::GamepadEvent):
169         * Modules/gamepad/GamepadEvent.h:
170         (WebCore::GamepadEvent::create):
171
172         * Modules/gamepad/GamepadManager.cpp:
173         (WebCore::GamepadManager::platformGamepadDisconnected):
174         (WebCore::GamepadManager::makeGamepadVisible):
175         * Modules/gamepad/NavigatorGamepad.cpp:
176         (WebCore::NavigatorGamepad::gamepadFromPlatformGamepad):
177         (WebCore::NavigatorGamepad::gamepadAtIndex): Deleted.
178         * Modules/gamepad/NavigatorGamepad.h:
179
180         * page/DOMWindow.cpp:
181         (WebCore::DOMWindow::DOMWindow):
182         * page/DOMWindow.h:
183
184 2014-08-23  Byungseon Shin  <sun.shin@lge.com>
185
186         Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
187         https://bugs.webkit.org/show_bug.cgi?id=109658
188
189         Reviewed by Martin Robinson.
190  
191         Based on patch originally written by Tim Horton.
192         Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.
193  
194         * WebCore.exp.in:
195         Adjust exports.
196  
197         * platform/graphics/GraphicsLayer.h:
198         Move ContentsLayerPurpose enum up out of GraphicsLayer platform implmentations
199         and into GraphicsLayer, so we can use it as a parameter.
200         Add ContentsLayerForPlugin.
201  
202         (WebCore::GraphicsLayer::setContentsToPlatformLayer):
203         Remove setContentsToMedia and setContentsToCanvas, and replace them
204         with setContentsToPlatformLayer, which previously existed but was unused
205         and simply called setContentsToMedia.
206         setContentsToPlatformLayer takes a ContentsLayerPurpose, primarily
207         so that GraphicsLayerCA can know whether it needs to setNeedsDisplay
208         the layer when parenting it (canvas) or not (everything else).
209  
210         * platform/graphics/ca/GraphicsLayerCA.cpp:
211         (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
212         Rename function setContentsToMedia -> setContentsToPlatformLayer.
213         Rename argument mediaLayer -> platformLayer.
214         Store the passed-in ContentsLayerPurpose.
215         Remove setContentsToCanvas.
216  
217         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
218         (WebCore::GraphicsLayerCA::updateContentsPlatformLayer):
219         Remove updateContentsMediaLayer and updateContentsCanvas layer,
220         add updateContentsPlatformLayer.
221  
222         * platform/graphics/ca/GraphicsLayerCA.h:
223         Do the same to the LayerChange enum.
224  
225         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
226         (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
227         (WebCore::GraphicsLayerTextureMapper::setContentsToPlatformLayer):
228         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
229         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
230         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
231         (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
232         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
233         (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
234         (WebCore::CoordinatedGraphicsLayer::destroyPlatformLayerIfNeeded):
235         (WebCore::CoordinatedGraphicsLayer::createPlatformLayerIfNeeded):
236         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
237         Fold these together in the same way as elsewhere.
238  
239         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
240         Do the same to the LayerChange enum.
241  
242         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
243         (WebCore::CoordinatedGraphicsScene::createPlatformLayerIfNeeded):
244         (WebCore::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
245         (WebCore::CoordinatedGraphicsScene::destroyPlatformLayerIfNeeded):
246         (WebCore::CoordinatedGraphicsScene::setLayerState):
247         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
248         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
249         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
250         Rename canvasLayer -> platformLayer.
251  
252         * rendering/RenderLayerBacking.cpp:
253         (WebCore::RenderLayerBacking::updateConfiguration):
254         Use the new setContentsToPlatformLayer, passing in the relevant ContentsLayerPurpose.
255
256 2014-08-23  Joseph Pecoraro  <pecoraro@apple.com>
257
258         Web Inspector: Do not copy large module source strings
259         https://bugs.webkit.org/show_bug.cgi?id=136191
260
261         Reviewed by Benjamin Poulain.
262
263         * inspector/CommandLineAPIModule.cpp:
264         (WebCore::CommandLineAPIModule::source):
265
266 2014-08-23  Zan Dobersek  <zdobersek@igalia.com>
267
268         Remove uses of CrossThreadTask in ThreadableWebSocketChannelClientWrapper, WorkerThreadableWebSocketChannel
269         https://bugs.webkit.org/show_bug.cgi?id=133954
270
271         Reviewed by Darin Adler.
272
273         Replace uses of CrossThreadTask with C++11 lambdas in the ThreadableWebSocketChannelClientWrapper
274         and WorkerThreadableWebSocketChannel classes.
275
276         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
277         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
278         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
279         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
280         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
281         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
282         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
283         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
284         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
285         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback): Deleted.
286         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): Deleted.
287         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): Deleted.
288         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback): Deleted.
289         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback): Deleted.
290         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): Deleted.
291         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): Deleted.
292         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback): Deleted.
293         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
294         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
295         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
296         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
297         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
298         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
299         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
300         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
301         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
302         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
303         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
304         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
305         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
306         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
307         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
308         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
309         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
310         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
311         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
312         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
313         (WebCore::workerGlobalScopeDidSend): Deleted.
314         (WebCore::workerGlobalScopeDidGetBufferedAmount): Deleted.
315         (WebCore::workerGlobalScopeDidConnect): Deleted.
316         (WebCore::workerGlobalScopeDidReceiveMessage): Deleted.
317         (WebCore::workerGlobalScopeDidReceiveBinaryData): Deleted.
318         (WebCore::workerGlobalScopeDidUpdateBufferedAmount): Deleted.
319         (WebCore::workerGlobalScopeDidStartClosingHandshake): Deleted.
320         (WebCore::workerGlobalScopeDidClose): Deleted.
321         (WebCore::workerGlobalScopeDidReceiveMessageError): Deleted.
322         (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect): Deleted.
323         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend): Deleted.
324         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer): Deleted.
325         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): Deleted.
326         (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount): Deleted.
327         (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose): Deleted.
328         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail): Deleted.
329         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy): Deleted.
330         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend): Deleted.
331         (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume): Deleted.
332         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
333
334 2014-08-23  Yusuke Suzuki  <utatane.tea@gmail.com>
335
336         Clean up build warnings: control reaches end of non-void function
337         https://bugs.webkit.org/show_bug.cgi?id=135889
338
339         Reviewed by Alexey Proskuryakov.
340
341         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
342         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
343         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
344         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
345         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
346         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
347         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
348         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
349         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
350         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
351         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
352         * crypto/CryptoKey.cpp:
353         (WebCore::CryptoKey::type):
354
355 2014-08-23  Zan Dobersek  <zdobersek@igalia.com>
356
357         [TexMap] Only notify of a required flush on the first layer property change
358         https://bugs.webkit.org/show_bug.cgi?id=136104
359
360         Reviewed by Martin Robinson.
361
362         The GraphicsLayer's client should only be notified that a flush is required
363         when the first change of one of the layer's properties is initiated, instead
364         of requesting the flush on every such change.
365
366         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
367         (WebCore::GraphicsLayerTextureMapper::notifyChange):
368
369 2014-08-22  Dan Bernstein  <mitz@apple.com>
370
371         Try to fix the Mac build using the internal SDK.
372
373         * bindings/objc/PublicDOMInterfaces.h:
374
375 2014-08-22  Renato Nagy  <nagy.renato@stud.u-szeged.hu>
376
377         Remove LevelDB.
378         https://bugs.webkit.org/show_bug.cgi?id=136170
379
380         Reviewed by Gyuyoung Kim.
381
382         * CMakeLists.txt:
383         * Modules/indexeddb/IDBObjectStore.cpp:
384         (WebCore::IDBObjectStore::createIndex):
385         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
386         (WebCore::IDBTransactionCoordinator::canRunTransaction):
387         (WebCore::doScopesOverlap): Deleted.
388         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Removed.
389         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Removed.
390         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Removed.
391         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Removed.
392         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Removed.
393         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h: Removed.
394         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed.
395         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed.
396         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Removed.
397         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Removed.
398         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Removed.
399         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Removed.
400         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Removed.
401         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Removed.
402         * WebCore.vcxproj/WebCore.vcxproj:
403         * WebCore.vcxproj/WebCore.vcxproj.filters:
404         * WebCore.xcodeproj/project.pbxproj:
405         * platform/DatabaseStrategy.cpp:
406         (WebCore::DatabaseStrategy::createIDBFactoryBackend):
407         * platform/leveldb/LevelDBComparator.h: Removed.
408         * platform/leveldb/LevelDBDatabase.cpp: Removed.
409         * platform/leveldb/LevelDBDatabase.h: Removed.
410         * platform/leveldb/LevelDBIterator.h: Removed.
411         * platform/leveldb/LevelDBSlice.h: Removed.
412         * platform/leveldb/LevelDBTransaction.cpp: Removed.
413         * platform/leveldb/LevelDBTransaction.h: Removed.
414         * platform/leveldb/LevelDBWriteBatch.cpp: Removed.
415         * platform/leveldb/LevelDBWriteBatch.h: Removed.
416
417 2014-08-22  KwangHyuk Kim  <hyuki.kim@samsung.com>
418
419         [EFL] Fix build break caused by ENABLE_GAMEPAD_DEPRECATED.
420         https://bugs.webkit.org/show_bug.cgi?id=136110
421
422         Reviewed by Gyuyoung Kim.
423
424         WebCore_INCLUDE_DIRECTORY for gamepad was removed from WK2 Efl in order to fix build break when ENABLE_GAMEPAD_DEPRECATED is on.
425
426         No new tests because no functional changes.
427
428         * PlatformEfl.cmake:
429
430 2014-08-22  Benjamin Poulain  <benjamin@webkit.org>
431
432         Style invalidation does not work for adjacent node updates
433         https://bugs.webkit.org/show_bug.cgi?id=136145
434
435         Reviewed by Antti Koivisto.
436
437         There were a bunch of cases in which the style would be in an inconsistent
438         state until the style resolver kicks in for the entire document.
439
440         For example, let's take the selector "foo.bar + target". When the class "bar"
441         changes, the element foo is invalidated. The element target is untouched.
442
443         Now, if the style of "target" is accessed, nodeOrItsAncestorNeedsStyleRecalc()
444         returns false and the old style is accessed.
445
446         At some point, when the style of the entire document is resolved, the node
447         "foo" is styled, and "target" is invalidated.
448
449
450         To fix the issue, this patch adds an extra flag keeping track of subtrees that
451         have any node needing style recalc: DirectChildNeedsStyleRecalcFlag.
452
453         When invalidating the node "foo", its parent is marked with
454         DirectChildNeedsStyleRecalcFlag to note that one of the child nodes has an invalid style.
455
456         When verifying the style state in nodeOrItsAncestorNeedsStyleRecalc(), we check that flag
457         in addition to the siblings dependencies to find if the node is part of a subtree that may
458         be invalid due to sibling selectors.
459
460         Similarly, in the style resolver, we use the flag to clear the style on all elements
461         that could potentially be invalid.
462
463
464         This patch removes the changes introduced by r172721
465         (The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element).
466         That bug was just a special case of what is solved here.
467
468
469         Tests: fast/selectors/attribute-direct-adjacent-style-update.html
470                fast/selectors/attribute-sibling-style-update.html
471                fast/selectors/class-direct-adjacent-style-update.html
472                fast/selectors/class-sibling-style-update.html
473                fast/selectors/first-child-direct-adjacent-style-update.html
474                fast/selectors/first-child-sibling-style-update.html
475
476         * css/SelectorChecker.cpp:
477         (WebCore::SelectorChecker::checkOne):
478         * cssjit/SelectorCompiler.cpp:
479         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
480         (WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty): Deleted.
481         * dom/ContainerNode.h:
482         (WebCore::ContainerNode::directChildNeedsStyleRecalc):
483         (WebCore::ContainerNode::setDirectChildNeedsStyleRecalc):
484         Remove the special case for :empty.
485
486         * dom/Document.cpp:
487         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
488         * dom/Element.cpp:
489         (WebCore::checkForEmptyStyleChange):
490         (WebCore::checkForSiblingStyleChanges):
491         (WebCore::Element::setStyleOfSiblingsAffectedByEmpty): Deleted.
492         (WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty): Deleted.
493         * dom/Element.h:
494         (WebCore::Element::styleOfSiblingsAffectedByEmpty): Deleted.
495         * dom/ElementRareData.h:
496         (WebCore::ElementRareData::ElementRareData):
497         (WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty): Deleted.
498         (WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty): Deleted.
499         * dom/Node.cpp:
500         (WebCore::markAncestorsWithChildNeedsStyleRecalc):
501         (WebCore::Node::setNeedsStyleRecalc):
502         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Deleted.
503         * dom/Node.h:
504         (WebCore::Node::clearChildNeedsStyleRecalc):
505         * style/StyleResolveTree.cpp:
506         (WebCore::Style::resetStyleForNonRenderedDescendants):
507
508 2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>
509
510         Remove unused legacy InspectorFrontendHost methods
511         https://bugs.webkit.org/show_bug.cgi?id=136186
512
513         Reviewed by Andreas Kling.
514
515         * bindings/js/JSInspectorFrontendHostCustom.cpp:
516         (WebCore::JSInspectorFrontendHost::recordActionTaken): Deleted.
517         (WebCore::JSInspectorFrontendHost::recordPanelShown): Deleted.
518         (WebCore::JSInspectorFrontendHost::recordSettingChanged): Deleted.
519         * inspector/InspectorFrontendHost.idl:
520
521 2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>
522
523         Remove unnecessary WTFString creation in Dictionary getter
524         https://bugs.webkit.org/show_bug.cgi?id=136184
525
526         Reviewed by Benjamin Poulain.
527
528         * bindings/js/Dictionary.cpp:
529         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
530         * bindings/js/Dictionary.h:
531         * bindings/js/JSDictionary.cpp:
532         (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
533         * bindings/js/JSDictionary.h:
534
535 2014-08-22  Commit Queue  <commit-queue@webkit.org>
536
537         Unreviewed, rolling out r172866.
538         https://bugs.webkit.org/show_bug.cgi?id=136177
539
540         Broke iOS build (Requested by othermaciej on #webkit).
541
542         Reverted changeset:
543
544         "Replace use of WKCopyCFLocalizationPreferredName with
545         NSLocale public API"
546         https://bugs.webkit.org/show_bug.cgi?id=136082
547         http://trac.webkit.org/changeset/172866
548
549 2014-08-22  David Hyatt  <hyatt@apple.com>
550
551         Add proper support for letter-spacing to bopomofo Ruby
552         https://bugs.webkit.org/show_bug.cgi?id=136171
553
554         Reviewed by Sam Weinig.
555
556         Added fast/ruby/bopomofo-letter-spacing.html
557
558         * rendering/RenderRubyRun.cpp:
559         (WebCore::RenderRubyRun::layout):
560         Alter the layout of bopomofo ruby so that the distance between the base characters is the max of
561         the letter-spacing between the characters and the minimum required width to hold two rows of
562         Ruby.
563
564         Push the bopomofo ruby into the letter-spacing to ensure that it comes right after the base character
565         and not after all the letter-spacing.
566
567 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
568
569         Fix showing paint rects when selecting lines in the timeline
570         https://bugs.webkit.org/show_bug.cgi?id=136173
571
572         Reviewed by Joseph Pecoraro.
573
574         Fix the condition used to decide when to show the overlay.
575
576         * inspector/InspectorOverlay.cpp:
577         (WebCore::InspectorOverlay::shouldShowOverlay):
578
579 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
580
581         Use the correct rect for paint flashing
582         https://bugs.webkit.org/show_bug.cgi?id=136169
583
584         Reviewed by Sam Weinig.
585
586         Use the rect we've converted to root document coordinates for paint flashing.
587
588         * inspector/InspectorPageAgent.cpp:
589         (WebCore::InspectorPageAgent::didPaint):
590
591 2014-08-22  Dean Jackson  <dino@apple.com>
592
593         Google Canvas2D maps are too slow and uncontrollable with Safari with full screen mode
594         https://bugs.webkit.org/show_bug.cgi?id=136168
595
596         Reviewed by Tim Horton.
597
598         When Google maps are using their 2D "lite" fallback and you're drawing in a huge
599         window such as fullscreen 4K, we would drop back to unaccelerated mode, thinking
600         that we'd exceeded the maximum IOSurface size.
601
602         Remove the hardcoded limit on IOSurface sizes, and instead ask the system
603         what it believe the maximum to be. This was significantly higher than our
604         limit on the systems I tested.
605
606         * platform/graphics/cg/ImageBufferCG.cpp:
607         (WebCore::ImageBuffer::ImageBuffer): Include our IOSurface wrapper, which
608         has a query for maximum size, and use that instead.
609
610 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
611
612         Maybe fix Windows.
613
614         * inspector/InspectorOverlay.cpp:
615         (WebCore::InspectorOverlay::showPaintRect):
616
617 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
618
619         Implement paint flashing in the WK1 InspectorOverlay page
620         https://bugs.webkit.org/show_bug.cgi?id=136138
621
622         Reviewed by Sam Weinig, Joseph Pecoraro.
623
624         Implement paint flashing for the WebKit1 InspectorOverlay via a second canvas in the overlay page.
625         We avoid allocating backing store for this canvas until we have paint rects.
626         
627         Because this overlay page is weird and doesn't know how to paint itself, InspectorOverlay manages
628         an array of rects, and pushes them to the page when they change, before forcing a paint.
629         
630         Because iOS doesn't use the InspectorOverlay page, stub out setShowPaintRects on its
631         WebKit WebInspectorClient, but don't yet implement paint flashing there.
632
633         * inspector/InspectorOverlay.cpp:
634         (WebCore::InspectorOverlay::InspectorOverlay):
635         (WebCore::InspectorOverlay::shouldShowOverlay):
636         (WebCore::InspectorOverlay::update):
637         (WebCore::buildObjectForRect):
638         (WebCore::InspectorOverlay::setShowingPaintRects):
639         (WebCore::InspectorOverlay::showPaintRect):
640         (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
641         (WebCore::InspectorOverlay::drawPaintRects):
642         (WebCore::InspectorOverlay::forcePaint):
643         (WebCore::quadToPath): Deleted.
644         (WebCore::drawOutlinedQuad): Deleted.
645         (WebCore::InspectorOverlay::drawOutline): Deleted.
646         * inspector/InspectorOverlay.h:
647         * inspector/InspectorOverlayPage.html:
648         * inspector/InspectorOverlayPage.js:
649         (updatePaintRects):
650         (reset):
651         (_drawShapeHighlight):
652         * inspector/InspectorPageAgent.cpp:
653         (WebCore::InspectorPageAgent::setShowPaintRects):
654         (WebCore::InspectorPageAgent::didPaint):
655
656 2014-08-22  Eric Carlson  <eric.carlson@apple.com>
657
658         [iOS] Cleanup media code
659         https://bugs.webkit.org/show_bug.cgi?id=136163
660
661         Reviewed by Jer Noble.
662
663         No new tests, no functionality was changed.
664
665         * html/HTMLMediaElement.cpp:
666         (WebCore::HTMLMediaElement::HTMLMediaElement): Don't initialize m_requestingPlay.
667         (WebCore::HTMLMediaElement::parseMediaPlayerAttribute): Deleted.
668         (WebCore::HTMLMediaElement::parseAttribute): Don't call parseMediaPlayerAttribute.
669         (WebCore::HTMLMediaElement::playInternal): m_requestingPlay is dead, Jim.
670         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
671         (WebCore::HTMLMediaElement::updatePlayState): Remove obsolete FIXME.
672         * html/HTMLMediaElement.h:
673         * platform/graphics/MediaPlayer.cpp:
674         (WebCore::MediaPlayer::attributeChanged): Deleted.
675         (WebCore::MediaPlayer::readyForPlayback): Deleted.
676         * platform/graphics/MediaPlayer.h:
677         * platform/graphics/MediaPlayerPrivate.h:
678         (WebCore::MediaPlayerPrivateInterface::attributeChanged): Deleted.
679         (WebCore::MediaPlayerPrivateInterface::readyForPlayback): Deleted.
680
681 2014-08-20  Maciej Stachowiak  <mjs@apple.com>
682
683         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
684         https://bugs.webkit.org/show_bug.cgi?id=136082
685
686         Reviewed by Alexey Proskuryakov.
687
688         * platform/mac/Language.mm:
689         (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName
690         with new WebCoreNSStringExtras helper.
691         * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of
692         WKCopyCFLocalizationPreferredName.
693         (preferredBundleLocalizationName): New helper - most preferred localization available
694         in the main bundle, canonicalized the way we like it.
695         (canonicalLocalizationName): Convert a lcalization name to a string with language and
696         country code, using default if necessary (e.g. "en" maps to "en_US").
697         * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName.
698         * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2).
699         * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto
700         * platform/mac/WebCoreSystemInterface.h: ditto
701         * platform/mac/WebCoreSystemInterface.mm: ditto
702
703 2014-08-22  Daniel Bates  <dabates@apple.com>
704
705         [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
706         and ENABLE_XSLT when building with the iOS public SDK
707         https://bugs.webkit.org/show_bug.cgi?id=135945
708
709         Reviewed by Andy Estes.
710
711         Towards bringing up the iOS WebKit port using the iOS public SDK, disable the proprietary
712         iOS gesture and touch event code. For now we also temporarily disable ENABLE_TOUCH_EVENTS
713         and ENABLE_XSLT while we focus to get the rest of the port built using the public SDK. We'll
714         look to enable these features once we stabilize the build.
715
716         * Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS
717         and ENABLE_XSLT when building with the public SDK.
718         * Configurations/WebCore.xcconfig:
719         * DerivedSources.make: Conditionally generate derived sources for touch and gesture events as applicable and pass
720         define WTF_USE_APPLE_INTERNAL_SDK when generating bindings (if applicable). Make the logic for determining
721         whether WTF_PLATFORM_IOS is defined consistent with logic for determining whether WTF_USE_APPLE_INTERNAL_SDK and
722         ENABLE_ORIENTATION_EVENTS are defined. We should look to further cleanup this code.
723         * bindings/js/ios/TouchConstructors.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)".
724         * bindings/objc/DOMEvents.h: Write preprocessor logic in terms of ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS.
725         * bindings/objc/PublicDOMInterfaces.h: Include private header <WebKitAdditions/PublicDOMInterfacesIOS.h> when
726         it exists as opposed to assuming it exists when building for iOS.
727         * dom/Document.cpp:
728         (WebCore::Document::Document): Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "ENABLE(TOUCH_EVENTS) && PLATFORM(IOS)".
729         (WebCore::Document::prepareForDestruction): Ditto.
730         (WebCore::Document::removeAllEventListeners): Ditto.
731         * dom/Document.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS.
732         * dom/Document.idl: Ditto.
733         * dom/Touch.h: Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS)..
734         * dom/TouchEvent.h: Ditto.
735         * dom/TouchList.h: Ditto.
736         * dom/ios/TouchEvents.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)".
737         * history/CachedFrame.cpp: Add PLATFORM(IOS) guard.
738         * html/shadow/SliderThumbElement.cpp:
739         (WebCore::SliderThumbElement::SliderThumbElement): Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS).
740         (WebCore::SliderThumbElement::willDetachRenderers): Ditto.
741         * html/shadow/SliderThumbElement.h: Ditto.
742         * loader/EmptyClients.h: Ditto.
743         * platform/ios/PlatformEventFactoryIOS.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS.
744         Only include header <WebKitAdditions/PlatformTouchEventIOS.h> when building with ENABLE_TOUCH_EVENTS enabled.
745
746 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
747
748         Implement paint flashing via GraphicsLayers in the WK2 inspector overlay
749         https://bugs.webkit.org/show_bug.cgi?id=136136
750
751         Reviewed by Sam Weinig, Joseph Pecoraro.
752
753         Allow InspectorClient to have a custom implementation of showPaintRect(). For
754         WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers
755         which are parented in a document overlay, with 0.25s fade-out animations.
756         
757         Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext;
758         it makes no sense to paint the paint rects directly into the context of the web page.
759         Now that the paint rects are painted into an overlay, the rectangles need to be converted
760         to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl().
761         
762         Remove the generic InspectorOverlay::drawOutline()-based indicators; they will
763         be reimplemented in a later patch.
764
765         * WebCore.exp.in:
766         * inspector/InspectorClient.h:
767         (WebCore::InspectorClient::showPaintRect):
768         * inspector/InspectorInstrumentation.cpp:
769         (WebCore::InspectorInstrumentation::didPaintImpl):
770         * inspector/InspectorInstrumentation.h:
771         (WebCore::InspectorInstrumentation::didPaint):
772         * inspector/InspectorPageAgent.cpp:
773         (WebCore::InspectorPageAgent::didPaint):
774         * inspector/InspectorPageAgent.h:
775         * page/FrameView.cpp:
776         (WebCore::FrameView::didPaintContents):
777         * rendering/RenderLayerBacking.cpp:
778         (WebCore::RenderLayerBacking::paintContents):
779
780 2014-08-22  Commit Queue  <commit-queue@webkit.org>
781
782         Unreviewed, rolling out r172844.
783         https://bugs.webkit.org/show_bug.cgi?id=136164
784
785         re-applying WEBCORE_EXPORTS patch (Requested by
786         alexchristensen on #webkit).
787
788         Reverted changeset:
789
790         "Revert r172831, it broke the Windows build."
791         http://trac.webkit.org/changeset/172844
792
793 2014-08-21  David Hyatt  <hyatt@apple.com>
794
795         Implement rudimentary Bopomofo Ruby support (ruby-position:inter-character)
796         https://bugs.webkit.org/show_bug.cgi?id=136137
797         <rdar://problem/12567545>
798
799         Reviewed by Sam Weinig.
800
801         Added fast/ruby/bopomofo.html and fast/ruby/bopomofo-rl.html.
802
803         * css/CSSParser.cpp:
804         (WebCore::isValidKeywordPropertyAndValue):
805         * css/CSSPrimitiveValueMappings.h:
806         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
807         (WebCore::CSSPrimitiveValue::operator RubyPosition):
808         * css/CSSPropertyNames.in:
809         * css/CSSValueKeywords.in:
810         Add support for the new inter-character value for ruby-position and also
811         add support for a new font-size keyword, -webkit-ruby-text, that is used
812         to set a smart initial font size based off the type of ruby being presented.
813
814         * css/DeprecatedStyleBuilder.cpp:
815         (WebCore::ApplyPropertyFontSize::determineRubyTextSizeMultiplier):
816         (WebCore::ApplyPropertyFontSize::applyValue):
817         Determine the Ruby text size multiplier when -webkit-ruby-text is specified
818         as the font size. For ruby-position of before/after, we use 50% of the parent
819         font size. For inter-character ruby, we default to 25% instead. If inter-character
820         Ruby is nested, we assume it's to display tone marks, and we use 100% to ensure
821         the tone mark is the same size and does not get smaller.
822
823         * css/StyleResolver.cpp:
824         (WebCore::StyleResolver::adjustStyleForInterCharacterRuby):
825         (WebCore::StyleResolver::applyMatchedProperties):
826         * css/StyleResolver.h:
827         ruby-position is now the highest priority CSS property, and it is resolved
828         before all other properties to ensure that its value can be checked when
829         determining a smart default font size. adjustStyleForInterCharacterRuby is a new
830         function called to auto-adjust inter-character ruby text to be vertical writing mode when
831         encountered inside horizontal documents.
832
833         * css/html.css:
834         (ruby > rt):
835         Change the font-size from 50% to -webkit-ruby-text to allow us to customize it as
836         needed depending on what kind of Ruby we want to show.
837
838         * rendering/RenderRubyRun.cpp:
839         (WebCore::RenderRubyRun::layout):
840         * rendering/RenderRubyRun.h:
841         Add layout code to properly position vertical ruby text relative to a horizontal base.
842
843         * rendering/style/RenderStyleConstants.h:
844         Add the new inter-character constant for ruby-position.
845
846         * rendering/style/StyleRareInheritedData.h:
847         Increase the number of storage bits for RubyPosition from 1 to 2 now that we support 3 values.
848
849 2014-08-22  Jon Lee  <jonlee@apple.com>
850
851         Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
852         https://bugs.webkit.org/show_bug.cgi?id=136157
853
854         Reviewed by Simon Fraser.
855
856         * Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING).
857
858 2014-08-22  Zan Dobersek  <zdobersek@igalia.com>
859
860         [GTK] Add the Wayland protocol extension
861         https://bugs.webkit.org/show_bug.cgi?id=136102
862
863         Reviewed by Martin Robinson.
864
865         Add the Wayland protocol extension that allows mapping GtkWidget
866         objects (via an ID that's unique to that GtkWidget) to the
867         corresponding Wayland surface objects. This way the nested
868         compositor has the proper information about what GtkWidget has
869         to be updated when surfaces are committed by the LayerTreeHost.
870
871         * PlatformGTK.cmake:
872         * platform/graphics/wayland: Added.
873         * platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml: Added.
874
875 2014-08-21  Antti Koivisto  <antti@apple.com>
876
877         Animated GIFs scrolled out of view still cause titlebar blur to update, on tumblr.com page
878         https://bugs.webkit.org/show_bug.cgi?id=136139
879
880         Reviewed by Simon Fraser.
881
882         The mechanism for pausing GIF images outside the viewport did not work for subframes.
883
884         Test: fast/repaint/no-animation-outside-viewport-subframe.html
885
886         * WebCore.exp.in:
887         * page/FrameView.cpp:
888         (WebCore::FrameView::scrollPositionChanged):
889         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
890
891             Add a function for resuming animations as needed in all subframes.
892             This is used after scrolling instead of calling the RenderView function directly.
893
894         * page/FrameView.h:
895         * page/Page.cpp:
896         (WebCore::Page::resumeAnimatingImages):
897         * rendering/RenderElement.cpp:
898         (WebCore::RenderElement::newImageAnimationFrameAvailable):
899
900             Determine the overall visible rect so that it is correct in subframes too.
901
902         * rendering/RenderLayer.cpp:
903         (WebCore::RenderLayer::scrollTo):
904         * rendering/RenderView.cpp:
905         (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):
906
907 2014-08-21  Alex Christensen  <achristensen@webkit.org>
908
909         More WEBCORE_EXPORT macros!
910         https://bugs.webkit.org/show_bug.cgi?id=136146
911
912         Reviewed by Benjamin Poulain.
913
914         * Modules/geolocation/GeolocationClient.h:
915         * Modules/mediastream/UserMediaClient.h:
916         * Modules/mediastream/UserMediaRequest.h:
917         * Modules/notifications/NotificationClient.h:
918         * Modules/speech/SpeechSynthesis.h:
919         * bindings/generic/RuntimeEnabledFeatures.h:
920         * bindings/js/DOMWrapperWorld.h:
921         * bindings/js/GCController.h:
922         * bindings/js/IDBBindingUtilities.h:
923         * bindings/js/JSDOMBinding.h:
924         * bindings/js/JSNodeCustom.h:
925         * bindings/js/JSNodeListCustom.h:
926         * bindings/js/JSPluginElementFunctions.h:
927         * bindings/js/ScriptController.h:
928         * bindings/js/SerializedScriptValue.h:
929         * crypto/SerializedCryptoKeyWrap.h:
930         * css/LengthFunctions.h:
931         * css/StyleProperties.h:
932         * css/StyleSheetContents.h:
933         * dom/DeviceOrientationClient.h:
934         * dom/Range.h:
935         * dom/ScriptExecutionContext.h:
936         * dom/StyledElement.h:
937         * dom/TreeScope.h:
938         * dom/UIEventWithKeyState.h:
939         * dom/UserGestureIndicator.h:
940         * dom/UserTypingGestureIndicator.h:
941         * dom/ViewportArguments.h:
942         * editing/SmartReplace.h:
943         * editing/TextIterator.h:
944         * editing/VisiblePosition.h:
945         * editing/VisibleSelection.h:
946         * editing/VisibleUnits.h:
947         * editing/cocoa/HTMLConverter.h:
948         * editing/htmlediting.h:
949         * editing/mac/TextAlternativeWithRange.h:
950         * editing/mac/TextUndoInsertionMarkupMac.h:
951         * editing/markup.h:
952         * history/HistoryItem.cpp:
953         * history/PageCache.h:
954         * html/TimeRanges.h:
955         * html/parser/HTMLParserIdioms.h:
956         * inspector/InstrumentingAgents.h:
957         * loader/FrameLoader.h:
958         * loader/ResourceBuffer.h:
959         * loader/ResourceLoadScheduler.h:
960         * loader/ResourceLoader.h:
961         (WebCore::ResourceLoader::originalRequest):
962         * loader/SubframeLoader.h:
963         * loader/SubresourceLoader.h:
964         * loader/TextResourceDecoder.h:
965         * loader/appcache/ApplicationCacheStorage.h:
966         * loader/cache/MemoryCache.h:
967         * loader/icon/IconDatabaseBase.h:
968         * loader/ios/DiskImageCacheIOS.h:
969         * page/Chrome.h:
970         * page/SecurityOrigin.h:
971         * page/SecurityPolicy.h:
972         * page/Settings.h:
973         * page/UserContentController.h:
974         * page/UserContentURLPattern.h:
975         * page/UserMessageHandlerDescriptor.h:
976         * page/ViewportConfiguration.h:
977         * page/VisitedLinkStore.h:
978         * page/WheelEventDeltaTracker.h:
979         * page/cocoa/UserAgent.h:
980         * page/scrolling/ScrollingConstraints.h:
981         * page/scrolling/ScrollingCoordinator.h:
982         * page/scrolling/ScrollingStateFixedNode.h:
983         * page/scrolling/ScrollingStateFrameScrollingNode.h:
984         * page/scrolling/ScrollingStateNode.h:
985         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
986         * page/scrolling/ScrollingStateScrollingNode.h:
987         * page/scrolling/ScrollingStateStickyNode.h:
988         * page/scrolling/ScrollingStateTree.h:
989         * page/scrolling/ScrollingThread.h:
990         * page/scrolling/ScrollingTree.h:
991         * page/scrolling/ScrollingTreeOverflowScrollingNode.h:
992         * page/scrolling/ScrollingTreeScrollingNode.h:
993         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
994         * page/scrolling/mac/ScrollingTreeFixedNode.h:
995         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
996         * page/scrolling/mac/ScrollingTreeStickyNode.h:
997         * platform/Cursor.h:
998         * platform/DragImage.h:
999         * platform/FileSystem.h:
1000         * platform/Language.h:
1001         * platform/LinkHash.h:
1002         * platform/LocalizedStrings.h:
1003         * platform/Logging.h:
1004         * platform/MemoryPressureHandler.h:
1005         * platform/NotImplemented.h:
1006         * platform/PlatformStrategies.h:
1007         * platform/PublicSuffix.h:
1008         * platform/RuntimeApplicationChecks.h:
1009         * platform/RuntimeApplicationChecksIOS.h:
1010         * platform/SchemeRegistry.h:
1011         * platform/ScrollView.h:
1012         * platform/ScrollableArea.h:
1013         * platform/Scrollbar.h:
1014         * platform/ScrollbarTheme.h:
1015         * platform/SharedBuffer.h:
1016         * platform/ThreadCheck.h:
1017         * platform/ThreadGlobalData.h:
1018         * platform/Timer.h:
1019         * platform/URL.h:
1020         * platform/UUID.h:
1021         * platform/UserActivity.h:
1022         * platform/Widget.h:
1023         * platform/cf/CFURLExtras.h:
1024         * platform/cf/RunLoopObserver.h:
1025         * platform/cocoa/SystemVersion.h:
1026         * platform/graphics/Color.h:
1027         * platform/graphics/FloatRect.h:
1028         * platform/graphics/FontCache.h:
1029         * platform/graphics/GeometryUtilities.h:
1030         * platform/graphics/GraphicsContext.h:
1031         * platform/graphics/IntRect.h:
1032         * platform/graphics/LayoutRect.h:
1033         * platform/graphics/StringTruncator.h:
1034         * platform/graphics/TextRun.h:
1035         * platform/graphics/ca/TileController.h:
1036         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
1037         * platform/graphics/cg/GraphicsContextCG.h:
1038         * platform/graphics/mac/ColorMac.h:
1039         * platform/graphics/transforms/TransformationMatrix.h:
1040         * platform/ios/FileSystemIOS.h:
1041         * platform/ios/PlatformEventFactoryIOS.h:
1042         * platform/ios/SelectionRect.h:
1043         * platform/ios/SystemMemory.h:
1044         * platform/ios/TileControllerMemoryHandlerIOS.h:
1045         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1046         * platform/mac/PlatformEventFactoryMac.h:
1047         * platform/mac/ScrollbarThemeMac.h:
1048         * platform/mac/WebCoreNSURLExtras.h:
1049         * platform/mac/WebNSAttributedStringExtras.h:
1050         * platform/network/BlobRegistry.h:
1051         * platform/network/CookieStorage.h:
1052         * platform/network/DNS.h:
1053         * platform/network/NetworkStateNotifier.h:
1054         * platform/network/PlatformCookieJar.h:
1055         * platform/network/ProxyServer.h:
1056         * platform/network/ResourceErrorBase.h:
1057         * platform/network/ResourceHandle.h:
1058         * platform/network/ResourceHandleClient.h:
1059         * platform/network/ResourceRequestBase.h:
1060         * platform/network/ResourceResponseBase.h:
1061         * platform/network/SynchronousLoaderClient.h:
1062         * platform/network/cf/ResourceError.h:
1063         * platform/network/cf/ResourceRequest.h:
1064         * platform/network/cf/ResourceResponse.h:
1065         * platform/network/ios/QuickLook.h:
1066         * platform/network/mac/AuthenticationMac.h:
1067         * platform/sql/SQLiteDatabase.cpp:
1068         * platform/text/LocaleToScriptMapping.h:
1069         * platform/text/TextBreakIterator.h:
1070         * platform/text/TextEncoding.h:
1071         (WebCore::TextEncoding::decode):
1072         * platform/text/TextEncodingRegistry.h:
1073         * platform/text/TextStream.h:
1074         * rendering/RenderBlock.h:
1075         * rendering/RenderBox.h:
1076         * rendering/RenderEmbeddedObject.h:
1077         * rendering/RenderLayer.h:
1078         * rendering/RenderLayerBacking.h:
1079         * rendering/RenderLayerCompositor.h:
1080         * rendering/RenderListItem.h:
1081         * rendering/RenderObject.h:
1082         * rendering/RenderText.h:
1083         * rendering/RenderTextControl.h:
1084         * rendering/RenderThemeIOS.h:
1085         * rendering/RenderTreeAsText.h:
1086         * rendering/RenderView.h:
1087         * rendering/RenderWidget.h:
1088         * rendering/ScrollBehavior.cpp:
1089         * rendering/break_lines.cpp:
1090         * rendering/style/RenderStyle.h:
1091         * replay/UserInputBridge.h:
1092         * storage/StorageEventDispatcher.h:
1093         * storage/StorageMap.h:
1094         * storage/StorageStrategy.h:
1095         * storage/StorageTracker.h:
1096         * testing/Internals.h:
1097         * workers/WorkerThread.h:
1098         Added more WEBCORE_EXPORT macros where needed.
1099
1100 2014-08-21  Tim Horton  <timothy_horton@apple.com>
1101
1102         Revert r172831, it broke the Windows build.
1103
1104 2014-08-21  Ryuan Choi  <ryuan.choi@samsung.com>
1105
1106         Unreviewed build fix when RUBBER_BANDING is not enabled.
1107
1108         * rendering/RenderLayer.cpp:
1109         (WebCore::RenderLayer::overhangAmount):
1110         (WebCore::RenderLayer::setHasHorizontalScrollbar):
1111         (WebCore::RenderLayer::setHasVerticalScrollbar):
1112
1113 2014-08-21  Brent Fulgham  <bfulgham@apple.com>
1114
1115         [Win] WebCore.proj is not copying WebKit resource files.
1116         https://bugs.webkit.org/show_bug.cgi?id=136142
1117         <rdar://problem/17733682>
1118
1119         Reviewed by Tim Horton.
1120
1121         * WebCore.vcxproj/WebCore.proj: Copy missing resource files during
1122         post-build step.
1123
1124 2014-08-21  Simon Fraser  <simon.fraser@apple.com>
1125
1126         Try to fix the 32-bit build by using wildcards in the exported non-virtual thunks
1127         for GraphicsLayerCA::platformCALayerAnimationStarted and GraphicsLayerCA::platformCALayerAnimationEnded.
1128
1129         * WebCore.exp.in:
1130
1131 2014-08-21  Simon Fraser  <simon.fraser@apple.com>
1132
1133         Add animationDidEnd callbacks on GraphicsLayer
1134         https://bugs.webkit.org/show_bug.cgi?id=136084
1135
1136         Reviewed by Tim Horton.
1137
1138         Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly
1139         can add animations, and know when they finish.
1140
1141         * WebCore.exp.in:
1142         * platform/graphics/GraphicsLayerClient.h:
1143         (WebCore::GraphicsLayerClient::notifyAnimationStarted):
1144         (WebCore::GraphicsLayerClient::notifyAnimationEnded):
1145         * platform/graphics/ca/GraphicsLayerCA.cpp:
1146         (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
1147         (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):
1148         * platform/graphics/ca/GraphicsLayerCA.h:
1149         * platform/graphics/ca/PlatformCALayer.h:
1150         * platform/graphics/ca/PlatformCALayerClient.h:
1151         (WebCore::PlatformCALayerClient::platformCALayerAnimationStarted):
1152         (WebCore::PlatformCALayerClient::platformCALayerAnimationEnded):
1153         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1154         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1155         (-[WebAnimationDelegate animationDidStart:]):
1156         (-[WebAnimationDelegate animationDidStop:finished:]):
1157         (PlatformCALayerMac::animationStarted):
1158         (PlatformCALayerMac::animationEnded):
1159         * rendering/RenderLayerBacking.cpp:
1160         (WebCore::RenderLayerBacking::notifyAnimationStarted):
1161         * rendering/RenderLayerBacking.h:
1162
1163 2014-08-21  Zalan Bujtas  <zalan@apple.com>
1164
1165         Enable SATURATED_LAYOUT_ARITHMETIC.
1166         https://bugs.webkit.org/show_bug.cgi?id=136106
1167
1168         Reviewed by Simon Fraser.
1169
1170         SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
1171         (No measurable performance regression on Mac.)
1172
1173         Test: fast/dynamic/saturated-layout-arithmetic.html
1174
1175         * Configurations/FeatureDefines.xcconfig:
1176
1177 2014-08-21  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1178
1179         New ruby parsing rule breaks some real web sites.
1180         https://bugs.webkit.org/show_bug.cgi?id=136062
1181
1182         Reviewed by Ryosuke Niwa.
1183
1184         An RP element should not auto close an RTC element.
1185
1186         The HTML5.1 spec was changed:
1187         http://www.w3.org/html/wg/drafts/html/master/syntax.html#parsing-main-inbody
1188         This was done at the following commit:
1189         https://github.com/w3c/html/commit/c61397b989b28235ee2228f280aa8d475f3b9ebf
1190
1191         This patch changed the RP element's behavior to follow the spec change.
1192
1193         Test: fast/ruby/rp-inside-rtc.html
1194
1195         * html/parser/HTMLTreeBuilder.cpp:
1196         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1197
1198 2014-08-21  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1199
1200         REGRESSION: CSS not() selector does not work when it appears after or within @supports
1201         https://bugs.webkit.org/show_bug.cgi?id=136063
1202
1203         Reviewed by Darin Adler.
1204
1205         CSSParser changes its m_parsingMode to SupportsMode when it finds
1206         "@supports" token. However, the mode will be never changed to
1207         NormalMode. This changes parsing algorithm for "not" token forever,
1208         and it cannot parse not pseudo class selector.
1209
1210         When we finish parsing @supports rule, we should change to normal
1211         mode.
1212
1213         @media does the same thing. This patch changed CharacterEndMediaQuery
1214         to CharacterEndConditionQuery, and we change parsing mode from
1215         SupportsMode to NormalMode when the parser finished to parse
1216         @supports rule.
1217
1218         Like "@-webkit-mediaquery", we cannot use '{' to
1219         "@-webkit-supports-condition". Changed "@-webkit-supports-condition"
1220         parsing rule and parseSupportsCondition() not to use '{'.
1221
1222         Tests: css3/supports-not-selector-cssom.html
1223                css3/supports-not-selector.html
1224
1225         * css/CSSGrammar.y.in:
1226         * css/CSSParser.cpp:
1227         (WebCore::CSSParser::parseSupportsCondition):
1228         (WebCore::isCSSLetter):
1229         (WebCore::CSSParser::realLex):
1230
1231 2014-08-21  Beth Dakin  <bdakin@apple.com>
1232
1233         overflow:scroll elements should support rubber-banding
1234         https://bugs.webkit.org/show_bug.cgi?id=91655
1235
1236         Reviewed by Sam Weinig and Darin Adler.
1237
1238         This patch enables rubber-banding in overflow regions and it keeps latching 
1239         working as currently implemented.
1240
1241         We cannot return early here if there is no scroll delta. There won't be a scroll
1242         delta in most cases during event.phase() == PlatformWheelEventPhaseEnded, but that 
1243         phase is required to be processed in order for rubber-banding to work properly. 
1244         * dom/Element.cpp:
1245         (WebCore::Element::dispatchWheelEvent):
1246         * page/EventHandler.cpp:
1247         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis):
1248
1249         Add a setting for this, which will default to true. This allows us to disable the 
1250         feature in WebKit1 for now. There is a bug about making it work.
1251         * page/Settings.in:
1252
1253         allowsHorizontalStretching() and allowsVerticalStretching() now take the 
1254         PlatformWheelEvent as a parameter, so that ScrollElasticityAutomatic can use the 
1255         event to decide whether or not stretching should be allowed in this case. 
1256         ScrollElasticityAutomatic will not allow stretching if it is a brand new gesture 
1257         that would result in a rubber-band. We don't want to rubber-band in that case
1258         because we want the event to propagate up to a parent view. Also added some helper 
1259         functions just to make that code easier to read.
1260         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1261         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1262         (WebCore::newGestureIsStarting):
1263         (WebCore::ScrollingTreeFrameScrollingNodeMac::isAlreadyPinnedInDirectionOfGesture):
1264         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsHorizontalStretching):
1265         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsVerticalStretching):
1266         * platform/mac/ScrollAnimatorMac.h:
1267         * platform/mac/ScrollAnimatorMac.mm:
1268         (WebCore::ScrollAnimatorMac::handleWheelEvent):
1269         (WebCore::newGestureIsStarting):
1270         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
1271         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
1272         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
1273         * platform/mac/ScrollElasticityController.h:
1274         * platform/mac/ScrollElasticityController.mm:
1275         (WebCore::ScrollElasticityController::handleWheelEvent):
1276
1277         To opt into rubber-banding, all we have to do is implement overhangAmount and set 
1278         scroll elasticity. We'll choose ScrollElasticityAutomatic which means that we'll
1279         only rubber-band in directions that can scroll and that we won't rubber-band for
1280         new gestures when we're already pinned to the edge.
1281         * rendering/RenderLayer.cpp:
1282         (WebCore::RenderLayer::overhangAmount):
1283         (WebCore::RenderLayer::setHasHorizontalScrollbar):
1284         (WebCore::RenderLayer::setHasVerticalScrollbar):
1285
1286 2014-08-21  Alex Christensen  <achristensen@webkit.org>
1287
1288         More WEBCORE_EXPORT macros.
1289         https://bugs.webkit.org/show_bug.cgi?id=136129
1290
1291         Reviewed by Tim Horton.
1292
1293         * Modules/geolocation/Geolocation.h:
1294         * Modules/geolocation/GeolocationController.h:
1295         * Modules/indexeddb/IDBDatabaseBackend.h:
1296         * Modules/indexeddb/IDBDatabaseMetadata.h:
1297         * Modules/indexeddb/IDBKey.h:
1298         * Modules/indexeddb/IDBKeyData.h:
1299         * Modules/indexeddb/IDBKeyPath.h:
1300         * Modules/indexeddb/IDBKeyRange.h:
1301         * Modules/indexeddb/IDBKeyRangeData.h:
1302         * Modules/notifications/Notification.h:
1303         * Modules/notifications/NotificationController.h:
1304         * bindings/js/GCController.h:
1305         * bridge/IdentifierRep.h:
1306         * css/StyleProperties.h:
1307         * dom/ExceptionCodePlaceholder.h:
1308         * dom/KeyboardEvent.h:
1309         * dom/MouseEvent.h:
1310         * dom/MouseRelatedEvent.h:
1311         * dom/Node.h:
1312         (WebCore::Node::hasEditableStyle):
1313         * dom/NodeTraversal.h:
1314         * dom/Position.h:
1315         (WebCore::Position::Position):
1316         * dom/Range.h:
1317         (WebCore::Range::startContainer):
1318         (WebCore::Range::startOffset):
1319         (WebCore::Range::endContainer):
1320         (WebCore::Range::endOffset):
1321         * editing/FrameSelection.h:
1322         (WebCore::DragCaretController::clear):
1323         * history/HistoryItem.h:
1324         * history/PageCache.h:
1325         * html/FormController.h:
1326         * html/HTMLElement.h:
1327         * html/HTMLFormElement.h:
1328         * html/HTMLFrameOwnerElement.h:
1329         * html/HTMLInputElement.h:
1330         * html/HTMLMediaElement.h:
1331         * html/HTMLOptGroupElement.h:
1332         * html/HTMLOptionElement.h:
1333         * html/HTMLPlugInElement.h:
1334         * html/HTMLPlugInImageElement.h:
1335         * html/HTMLSelectElement.h:
1336         * html/HTMLTableCellElement.h:
1337         * html/HTMLTextAreaElement.h:
1338         * html/HTMLTextFormControlElement.h:
1339         * html/HTMLVideoElement.h:
1340         * html/ImageDocument.h:
1341         * html/PluginDocument.h:
1342         * html/forms/FileIconLoader.h:
1343         * html/shadow/InsertionPoint.h:
1344         * inspector/InspectorClient.h:
1345         * inspector/InspectorController.h:
1346         * inspector/InspectorFrontendClientLocal.h:
1347         * inspector/InspectorInstrumentation.h:
1348         * loader/FrameLoadRequest.h:
1349         * loader/FrameLoader.h:
1350         * loader/FrameLoaderStateMachine.h:
1351         * loader/HistoryController.h:
1352         * loader/LoaderStrategy.h:
1353         * loader/NavigationAction.h:
1354         * loader/NetscapePlugInStreamLoader.h:
1355         * loader/ProgressTracker.h:
1356         * loader/archive/cf/LegacyWebArchive.h:
1357         * loader/cache/MemoryCache.h:
1358         * loader/icon/IconController.h:
1359         * loader/icon/IconDatabase.h:
1360         * loader/icon/IconDatabaseBase.h:
1361         * page/FocusController.h:
1362         * page/Frame.h:
1363         * page/FrameDestructionObserver.h:
1364         Replaced WEBCORE_TESTING with WEBCORE_EXPORT.
1365         * page/FrameTree.h:
1366         * page/FrameView.h:
1367         * page/Page.h:
1368         * page/PageConsole.h:
1369         * page/PageGroup.h:
1370         * page/PageThrottler.h:
1371         * page/PrintContext.h:
1372         * page/scrolling/ScrollingConstraints.h:
1373         * page/scrolling/ScrollingStateNode.h:
1374         * platform/FileChooser.h:
1375         * platform/GamepadProvider.h:
1376         * platform/Length.h:
1377         * platform/MIMETypeRegistry.h:
1378         * platform/MemoryPressureHandler.h:
1379         * platform/Pasteboard.h:
1380         * platform/PlatformExportMacros.h:
1381         Removed WEBCORE_TESTING, which I'm replacing with WEBCORE_EXPORT.
1382         * platform/PlatformKeyboardEvent.h:
1383         * platform/PlatformPasteboard.h:
1384         * platform/PlatformSpeechSynthesisVoice.h:
1385         * platform/PlatformSpeechSynthesizer.h:
1386         * platform/audio/MediaSessionManager.h:
1387         * platform/graphics/FloatPoint.h:
1388         * platform/graphics/FloatQuad.h:
1389         * platform/graphics/FloatRect.h:
1390         * platform/graphics/FloatSize.h:
1391         * platform/graphics/Font.h:
1392         * platform/graphics/FontCache.h:
1393         * platform/graphics/FontGlyphs.h:
1394         * platform/graphics/FontPlatformData.h:
1395         * platform/graphics/GlyphPageTreeNode.h:
1396         * platform/graphics/Gradient.h:
1397         * platform/graphics/GraphicsContext.h:
1398         * platform/graphics/GraphicsLayer.h:
1399         * platform/graphics/Icon.h:
1400         * platform/graphics/Image.h:
1401         * platform/graphics/ImageBuffer.h:
1402         * platform/graphics/IntPoint.h:
1403         * platform/graphics/IntRect.h:
1404         * platform/graphics/IntSize.h:
1405         * platform/graphics/LayoutRect.h:
1406         * platform/graphics/MediaPlayer.h:
1407         * platform/graphics/Path.h:
1408         * platform/graphics/Region.h:
1409         * platform/graphics/ca/GraphicsLayerCA.h:
1410         * platform/graphics/ca/LayerFlushScheduler.h:
1411         * platform/graphics/ca/LayerPool.h:
1412         * platform/graphics/ca/PlatformCAFilters.h:
1413         * platform/graphics/ca/PlatformCALayer.h:
1414         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
1415         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1416         * platform/graphics/cg/IOSurfacePool.h:
1417         * platform/graphics/cocoa/IOSurface.h:
1418         * platform/graphics/filters/FilterOperations.h:
1419         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1420         * platform/ios/LegacyTileCache.h:
1421         * platform/ios/PlatformEventFactoryIOS.h:
1422         * platform/ios/wak/FloatingPointEnvironment.h:
1423         * platform/mac/HIDGamepadProvider.h:
1424         * platform/mock/MockMediaStreamCenter.h:
1425         * platform/network/FormData.h:
1426         * platform/network/HTTPHeaderMap.h:
1427         * platform/network/NetworkStorageSession.h:
1428         * platform/network/ProtectionSpaceBase.h:
1429         * platform/network/cocoa/ProtectionSpaceCocoa.h:
1430         (WebCore::ProtectionSpace::encodingRequiresPlatformData):
1431         * platform/network/ios/QuickLook.h:
1432         * platform/text/TextBreakIterator.h:
1433         * plugins/PluginData.h:
1434         * plugins/PluginMainThreadScheduler.h:
1435         * rendering/HitTestLocation.h:
1436         * rendering/HitTestResult.h:
1437         * rendering/InlineBox.h:
1438         Added more WEBCORE_EXPORT macros, which don't do anything yet.
1439
1440 2014-08-21  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1441
1442         [GTK] WebkitWebProcess crashing navigating away from ogg video element
1443         https://bugs.webkit.org/show_bug.cgi?id=135348
1444
1445         Reviewed by Philippe Normand.
1446
1447         Let GraphicsLayerTextureMapper know it needs to detach the platform
1448         layer when a MediaPlayerPrivateGStreamerBase is destroyed.
1449
1450         No new test since media/restore-from-page-cache.html covers it.
1451
1452         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1453         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1454
1455 2014-08-20  Benjamin Poulain  <benjamin@webkit.org>
1456
1457         CSS: Implement the :placeholder-shown pseudo-class from Selectors Level 4
1458         https://bugs.webkit.org/show_bug.cgi?id=118162
1459
1460         Reviewed by Antti Koivisto.
1461
1462         Previously, HTMLTextFormControlElement was using some mix of its own state
1463         and style to change the visibility of the placeholder. That approach was a little
1464         bit too fragile, and we do not want the style to depends on the renderer() since
1465         that creates circular dependencies.
1466
1467         The biggest change here is refactoring HTMLTextFormControlElement to have
1468         1) An explicit "visible placeholder" state.
1469         2) Separate the textUpdate() from the visibilityUpdate().
1470         3) Remove the dependencies between the Element's style and the placeholder's style.
1471            This is done by simply using display:none; on the placeholder so that its parent's visibility
1472            is irrelevant.
1473
1474         When matching the selector, the style is set as unique since style sharing does not deal with
1475         the changes of HTMLTextFormControlElement.
1476
1477         Tests: fast/css/placeholder-shown-basics.html
1478                fast/selectors/placeholder-shown-long-adjacent-backtracking.html
1479                fast/selectors/placeholder-shown-sibling-style-update.html
1480                fast/selectors/placeholder-shown-style-update.html
1481                fast/selectors/placeholder-shown-with-input-basics.html
1482                fast/selectors/placeholder-shown-with-textarea-basics.html
1483
1484         * css/CSSSelector.cpp:
1485         (WebCore::CSSSelector::selectorText):
1486         Add the CSS Selector description for CSSOM.
1487
1488         * css/CSSSelector.h:
1489         * css/SelectorChecker.cpp:
1490         (WebCore::SelectorChecker::checkOne):
1491         * css/SelectorCheckerTestFunctions.h:
1492         (WebCore::isPlaceholderShown):
1493         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1494         * css/html.css:
1495         (::-webkit-input-placeholder):
1496         Previously, the display was forced through the UA stylesheet. Since the display is now part
1497         of the placeholder visibility, it is explicitly handled by HTMLTextFormControlElement and
1498         its subclasses.
1499
1500         * cssjit/SelectorCompiler.cpp:
1501         (WebCore::SelectorCompiler::addPseudoClassType):
1502         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1503         (WebCore::SelectorCompiler::makeUniqueIfNecessaryAndTestIsPlaceholderShown):
1504         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
1505         * html/HTMLInputElement.cpp:
1506         (WebCore::HTMLInputElement::parseAttribute):
1507         * html/HTMLTextAreaElement.cpp:
1508         (WebCore::HTMLTextAreaElement::updateValue):
1509         (WebCore::HTMLTextAreaElement::setValueCommon):
1510         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
1511         * html/HTMLTextFormControlElement.cpp:
1512         (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
1513         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
1514         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
1515         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
1516         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
1517         (WebCore::HTMLTextFormControlElement::selectionDirection):
1518         (WebCore::HTMLTextFormControlElement::restoreCachedSelection):
1519         (WebCore::HTMLTextFormControlElement::parseAttribute):
1520         (WebCore::HTMLTextFormControlElement::hidePlaceholder):
1521         (WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary):
1522         * html/HTMLTextFormControlElement.h:
1523         (WebCore::HTMLTextFormControlElement::isPlaceholderVisible):
1524         (WebCore::HTMLTextFormControlElement::cachedSelectionDirection):
1525         * html/TextFieldInputType.cpp:
1526         (WebCore::TextFieldInputType::updatePlaceholderText):
1527         (WebCore::TextFieldInputType::subtreeHasChanged):
1528         (WebCore::TextFieldInputType::updateInnerTextValue):
1529         * rendering/RenderTextControl.cpp:
1530         (WebCore::RenderTextControl::styleDidChange):
1531         * testing/Internals.cpp:
1532         (WebCore::Internals::visiblePlaceholder):
1533
1534 2014-08-20  Mark Rowe  <mrowe@apple.com>
1535
1536         Fix the release build after r172806.
1537
1538         * Modules/mediasource/SourceBuffer.cpp:
1539         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Add a missing semicolon.
1540
1541 2014-08-20  Benjamin Poulain  <bpoulain@apple.com>
1542
1543         Remove HTMLInputElement's suggestedValue
1544         https://bugs.webkit.org/show_bug.cgi?id=136094
1545
1546         Reviewed by Darin Adler.
1547
1548         That code is Chrome specific. It is unused now.
1549
1550         * WebCore.exp.in:
1551         * html/HTMLInputElement.cpp:
1552         (WebCore::HTMLInputElement::setValue):
1553         (WebCore::HTMLInputElement::setValueFromRenderer):
1554         (WebCore::HTMLInputElement::suggestedValue): Deleted.
1555         (WebCore::HTMLInputElement::setSuggestedValue): Deleted.
1556         * html/HTMLInputElement.h:
1557         * html/HTMLTextFormControlElement.cpp:
1558         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
1559         * html/HTMLTextFormControlElement.h:
1560         (WebCore::HTMLTextFormControlElement::isEmptySuggestedValue): Deleted.
1561         * html/InputType.cpp:
1562         (WebCore::InputType::canSetSuggestedValue): Deleted.
1563         * html/InputType.h:
1564         * html/TextFieldInputType.cpp:
1565         (WebCore::TextFieldInputType::updateInnerTextValue):
1566         (WebCore::TextFieldInputType::canSetSuggestedValue): Deleted.
1567         * html/TextFieldInputType.h:
1568         * testing/Internals.cpp:
1569         (WebCore::Internals::suggestedValue): Deleted.
1570         (WebCore::Internals::setSuggestedValue): Deleted.
1571         * testing/Internals.h:
1572         * testing/Internals.idl:
1573
1574 2014-08-20  Dean Jackson  <dino@apple.com>
1575
1576         WebAudio FFT analysis uses incorrect scaling
1577         https://bugs.webkit.org/show_bug.cgi?id=136120
1578
1579         Reviewed by Tim Horton.
1580
1581         This is a port of Blink r166687 (author rtoy)
1582         https://codereview.chromium.org/156993002
1583
1584         Currently, for a fixed sine-wave input, the peak FFT amplitude changes
1585         depending on the selected FFT size. This is incorrect; the FFT amplitude
1586         should not appreciably change when the FFT size changes.
1587
1588         Layout test added to verify the FFT result stays approximately constant,
1589         independent of the FFT size used.
1590
1591         When this test is run using an older version of WebKit, the peak varies
1592         from about -44 dB (FFT size 32) to -7 dB (FFT size 2048).  With this CL,
1593         the peak is about -7 dB.  (It's not 0 dB because of the Blackman window that is applied.)
1594
1595         Note: this change may break existing applications that depended on this strange scaling effect.
1596
1597         Test: webaudio/realtimeanalyser-fft-scaling.html
1598
1599         * Modules/webaudio/RealtimeAnalyser.cpp:
1600         (WebCore::RealtimeAnalyser::doFFTAnalysis):
1601
1602 2014-08-20  Alex Christensen  <achristensen@webkit.org>
1603
1604         Introducing WEBCORE_EXPORT macro.
1605         https://bugs.webkit.org/show_bug.cgi?id=136108
1606
1607         Reviewed by Antti Koivisto.
1608
1609         This should eventually replace WebCore.exp.in.
1610
1611         * platform/PlatformExportMacros.h:
1612         Define WEBCORE_EXPORT to nothing to not cause problems while I'm working on it.
1613         * Modules/encryptedmedia/CDM.h:
1614         * Modules/speech/DOMWindowSpeechSynthesis.h:
1615         * Modules/webdatabase/DatabaseManager.h:
1616         * Modules/webdatabase/DatabaseTracker.h:
1617         * accessibility/AXObjectCache.h:
1618         * bindings/js/DOMWrapperWorld.h:
1619         * bridge/jsc/BridgeJSC.h:
1620         * bridge/runtime_method.h:
1621         * bridge/runtime_object.h:
1622         * bridge/runtime_root.h:
1623         * css/CSSComputedStyleDeclaration.h:
1624         * css/CSSParserMode.h:
1625         * css/CSSValue.h:
1626         * css/DOMWindowCSS.h:
1627         * css/StyleSheetContents.h:
1628         * dom/CharacterData.h:
1629         * dom/ClientRect.h:
1630         * dom/ClientRectList.h:
1631         * dom/ContainerNode.h:
1632         * dom/ContextDestructionObserver.h:
1633         * dom/DOMImplementation.h:
1634         * dom/DataTransfer.h:
1635         * dom/DeviceMotionData.h:
1636         * dom/DeviceOrientationData.h:
1637         * dom/Document.h:
1638         (WebCore::Document::setAnnotatedRegionsDirty):
1639         * dom/DocumentMarker.h:
1640         * dom/DocumentMarkerController.h:
1641         * dom/DocumentStyleSheetCollection.h:
1642         * dom/Element.h:
1643         * dom/Event.h:
1644         (WebCore::Event::create):
1645         * dom/EventListenerMap.h:
1646         * editing/DictationAlternative.h:
1647         * editing/EditCommand.h:
1648         * editing/EditingStyle.h:
1649         * editing/Editor.h:
1650         * editing/mac/AlternativeTextUIController.h:
1651         * history/BackForwardController.h:
1652         * history/BackForwardList.h:
1653         * history/CachedFrame.h:
1654         * loader/CookieJar.h:
1655         * loader/CrossOriginPreflightResultCache.h:
1656         * loader/DocumentLoader.h:
1657         * loader/DocumentWriter.h:
1658         * loader/appcache/ApplicationCache.h:
1659         * loader/appcache/ApplicationCacheHost.h:
1660         * loader/appcache/ApplicationCacheStorage.h:
1661         * loader/archive/ArchiveResource.h:
1662         * loader/cache/CachedImage.h:
1663         * loader/cache/CachedResource.h:
1664         * loader/cache/CachedResourceHandle.h:
1665         * loader/cache/CachedResourceLoader.h:
1666         * page/Chrome.h:
1667         * page/ContextMenuController.h:
1668         * page/DOMWindow.h:
1669         * page/DOMWindowExtension.h:
1670         * page/DragController.h:
1671         * page/EventHandler.h:
1672         * page/animation/AnimationController.h:
1673         * page/scrolling/AsyncScrollingCoordinator.h:
1674         * platform/CalculationValue.h:
1675         * platform/ContentFilter.h:
1676         * platform/ContextMenu.h:
1677         * platform/ContextMenuItem.h:
1678         * platform/CrossThreadCopier.h:
1679         * platform/Cursor.h:
1680         * platform/DatabaseStrategy.h:
1681         * platform/DisplaySleepDisabler.h:
1682         * platform/DragData.h:
1683         * platform/LocalizedStrings.h:
1684         * platform/audio/AudioHardwareListener.h:
1685         * platform/audio/AudioSession.h:
1686         * platform/audio/ios/MediaSessionManagerIOS.mm:
1687         * platform/graphics/BitmapImage.h:
1688         * platform/graphics/Color.h:
1689         * platform/graphics/DisplayRefreshMonitor.h:
1690         * platform/graphics/transforms/AffineTransform.h:
1691         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1692         * platform/ios/WebVideoFullscreenModelMediaElement.h:
1693         * platform/ios/wak/WAKView.mm:
1694         * platform/ios/wak/WKContentObservation.h:
1695         * platform/ios/wak/WKView.h:
1696         * platform/ios/wak/WebCoreThread.h:
1697         * platform/ios/wak/WebCoreThreadMessage.h:
1698         * platform/mac/BlockExceptions.h:
1699         * platform/mock/DeviceOrientationClientMock.h:
1700         * platform/network/AuthenticationChallengeBase.h:
1701         * platform/network/BlobData.h:
1702         * platform/network/BlobDataFileReference.h:
1703         * platform/network/BlobRegistry.h:
1704         * platform/network/BlobRegistryImpl.h:
1705         * platform/network/CredentialBase.h:
1706         * platform/network/CredentialStorage.h:
1707         * platform/network/PlatformCookieJar.h:
1708         * platform/network/cf/AuthenticationChallenge.h:
1709         * platform/network/cocoa/CredentialCocoa.h:
1710         * platform/network/mac/CertificateInfo.h:
1711         * platform/sql/SQLiteDatabase.h:
1712         (WebCore::SQLiteDatabase::disableThreadingChecks):
1713         * platform/sql/SQLiteDatabaseTracker.h:
1714         * platform/sql/SQLiteStatement.h:
1715         * platform/sql/SQLiteTransaction.h:
1716         * platform/text/BidiContext.h:
1717         Added WEBCORE_EXPORT macros.
1718
1719 2014-08-20  Pratik Solanki  <psolanki@apple.com>
1720
1721         Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well
1722         https://bugs.webkit.org/show_bug.cgi?id=135896
1723
1724         Reviewed by Andreas Kling.
1725
1726         Refactor code and move it to WebCore.
1727
1728         * WebCore.exp.in:
1729         * WebCore.xcodeproj/project.pbxproj:
1730         * loader/ResourceLoader.h:
1731             Make willCacheResponse protected so that SubresourceLoader can override it.
1732         * loader/SubresourceLoader.h:
1733         * loader/cocoa/DiskCacheMonitorCocoa.h: Added.
1734             Mostly the same as the existing NetworkDiskCacheMonitor class in WebKit2. In the
1735             CFNetwork callback block, it calls a virtual function that is overridden by
1736             NetworkDiskCacheMonitor to send a message to WebContent process.
1737         (WebCore::DiskCacheMonitor::~DiskCacheMonitor):
1738         (WebCore::DiskCacheMonitor::resourceRequest):
1739         (WebCore::DiskCacheMonitor::sessionID):
1740         * loader/cocoa/DiskCacheMonitorCocoa.mm:
1741         (WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse):
1742             Copied from NetworkResourceLoader::tryGetFileBackedSharedBufferFromCFURLCachedResponse.
1743         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
1744         (WebCore::DiskCacheMonitor::DiskCacheMonitor):
1745         (WebCore::DiskCacheMonitor::resourceBecameFileBacked):
1746             Replace the cached resource data with the contents of the file backed buffer. This is
1747             used in WebKit1 (and also for any resource loads that happen from the WebContent
1748             process).
1749         * loader/cocoa/SubresourceLoaderCocoa.mm: Added.
1750         (WebCore::SubresourceLoader::willCacheResponse):
1751             Override willCacheresponse from ResourceLoader to listen for disk cache notifications.
1752
1753 2014-08-20  Eric Carlson  <eric.carlson@apple.com>
1754
1755         Cleanup MediaSession
1756         https://bugs.webkit.org/show_bug.cgi?id=136116
1757
1758         Reviewed by Brent Fulgham.
1759
1760         MediaSessionManagerClient interface isn't used, remove it.
1761         No new tests, this doesn't change behavior.
1762
1763         * WebCore.exp.in:
1764         * platform/audio/MediaSessionManager.cpp:
1765         (WebCore::MediaSessionManager::addSession): 
1766         (WebCore::MediaSessionManager::removeSession):
1767         (WebCore::MediaSessionManager::sessionWillBeginPlayback):
1768         (WebCore::MediaSessionManager::addClient): Deleted.
1769         (WebCore::MediaSessionManager::removeClient): Deleted.
1770         * platform/audio/MediaSessionManager.h:
1771         (WebCore::MediaSessionManagerClient::~MediaSessionManagerClient): Deleted.
1772         (WebCore::MediaSessionManagerClient::MediaSessionManagerClient): Deleted.
1773
1774 2014-08-20  Eric Carlson  <eric.carlson@apple.com>
1775
1776         [MSE] add additional SourceBuffer and MediaSource logging
1777         https://bugs.webkit.org/show_bug.cgi?id=136114
1778
1779         Reviewed by Brent Fulgham.
1780
1781         No new tests, this adds debug-only logging.
1782
1783         * Modules/mediasource/MediaSource.cpp:
1784         (WebCore::MediaSource::setReadyState): Fix a typo.
1785         (WebCore::MediaSource::streamEndedWithError): Log the error.
1786
1787         * Modules/mediasource/SourceBuffer.cpp:
1788         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Log when parsing fails.
1789         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Log error.
1790         (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Ditto.
1791         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Log.
1792         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Log error.
1793
1794 2014-08-20  Commit Queue  <commit-queue@webkit.org>
1795
1796         Unreviewed, rolling out r172798.
1797         https://bugs.webkit.org/show_bug.cgi?id=136113
1798
1799         Broke builds (Requested by msaboff on #webkit).
1800
1801         Reverted changeset:
1802
1803         "Introducing WEBCORE_EXPORT macro."
1804         https://bugs.webkit.org/show_bug.cgi?id=136108
1805         http://trac.webkit.org/changeset/172798
1806
1807 2014-08-20  Alex Christensen  <achristensen@webkit.org>
1808
1809         Introducing WEBCORE_EXPORT macro.
1810         https://bugs.webkit.org/show_bug.cgi?id=136108
1811
1812         Reviewed by Antti Koivisto.
1813
1814         This should eventually replace WebCore.exp.in.
1815
1816         * platform/PlatformExportMacros.h:
1817         Define WEBCORE_EXPORT to nothing to not cause problems while I'm working on it.
1818         * Modules/encryptedmedia/CDM.h:
1819         * Modules/speech/DOMWindowSpeechSynthesis.h:
1820         * Modules/webdatabase/DatabaseManager.h:
1821         * Modules/webdatabase/DatabaseTracker.h:
1822         * accessibility/AXObjectCache.h:
1823         * bindings/js/DOMWrapperWorld.h:
1824         * bridge/jsc/BridgeJSC.h:
1825         * bridge/runtime_method.cpp:
1826         * bridge/runtime_method.h:
1827         * bridge/runtime_object.cpp:
1828         * bridge/runtime_object.h:
1829         * bridge/runtime_root.h:
1830         * css/CSSComputedStyleDeclaration.h:
1831         * css/CSSParserMode.h:
1832         * css/CSSValue.h:
1833         * css/DOMWindowCSS.h:
1834         * css/StyleSheetContents.h:
1835         * dom/CharacterData.h:
1836         * dom/ClientRect.h:
1837         * dom/ClientRectList.h:
1838         * dom/ContainerNode.h:
1839         * dom/ContextDestructionObserver.h:
1840         * dom/DOMImplementation.h:
1841         * dom/DataTransfer.h:
1842         * dom/DeviceMotionData.h:
1843         * dom/DeviceOrientationData.h:
1844         * dom/Document.h:
1845         (WebCore::Document::setAnnotatedRegionsDirty):
1846         * dom/DocumentMarker.h:
1847         * dom/DocumentMarkerController.h:
1848         * dom/DocumentStyleSheetCollection.h:
1849         * dom/Element.h:
1850         * dom/Event.h:
1851         (WebCore::Event::create):
1852         * dom/EventListenerMap.h:
1853         * editing/DictationAlternative.h:
1854         * editing/EditCommand.h:
1855         * editing/EditingStyle.h:
1856         * editing/Editor.h:
1857         * editing/mac/AlternativeTextUIController.h:
1858         * history/BackForwardController.h:
1859         * history/BackForwardList.h:
1860         * history/CachedFrame.h:
1861         * loader/CookieJar.h:
1862         * loader/CrossOriginPreflightResultCache.h:
1863         * loader/DocumentLoader.h:
1864         * loader/DocumentWriter.h:
1865         * loader/appcache/ApplicationCache.h:
1866         * loader/appcache/ApplicationCacheHost.h:
1867         * loader/appcache/ApplicationCacheStorage.h:
1868         * loader/archive/ArchiveResource.h:
1869         * loader/cache/CachedImage.h:
1870         * loader/cache/CachedResource.h:
1871         * loader/cache/CachedResourceHandle.h:
1872         * loader/cache/CachedResourceLoader.h:
1873         * page/Chrome.h:
1874         * page/ContextMenuController.h:
1875         * page/DOMWindow.h:
1876         * page/DOMWindowExtension.h:
1877         * page/DragController.h:
1878         * page/EventHandler.h:
1879         * page/animation/AnimationController.h:
1880         * page/scrolling/AsyncScrollingCoordinator.h:
1881         * platform/CalculationValue.h:
1882         * platform/ContentFilter.h:
1883         * platform/ContextMenu.h:
1884         * platform/ContextMenuItem.h:
1885         * platform/CrossThreadCopier.h:
1886         * platform/Cursor.h:
1887         * platform/DatabaseStrategy.h:
1888         * platform/DisplaySleepDisabler.h:
1889         * platform/DragData.h:
1890         * platform/LocalizedStrings.h:
1891         * platform/audio/AudioHardwareListener.h:
1892         * platform/audio/AudioSession.h:
1893         * platform/audio/ios/MediaSessionManagerIOS.mm:
1894         * platform/graphics/BitmapImage.h:
1895         * platform/graphics/Color.h:
1896         * platform/graphics/DisplayRefreshMonitor.h:
1897         * platform/graphics/transforms/AffineTransform.h:
1898         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1899         * platform/ios/WebVideoFullscreenModelMediaElement.h:
1900         * platform/ios/wak/WAKView.mm:
1901         * platform/ios/wak/WKContentObservation.h:
1902         * platform/ios/wak/WKView.h:
1903         * platform/ios/wak/WebCoreThread.h:
1904         * platform/ios/wak/WebCoreThreadMessage.h:
1905         * platform/mac/BlockExceptions.h:
1906         * platform/mock/DeviceOrientationClientMock.h:
1907         * platform/network/AuthenticationChallengeBase.h:
1908         * platform/network/BlobData.h:
1909         * platform/network/BlobDataFileReference.h:
1910         * platform/network/BlobRegistry.h:
1911         * platform/network/BlobRegistryImpl.h:
1912         * platform/network/CredentialBase.h:
1913         * platform/network/CredentialStorage.h:
1914         * platform/network/PlatformCookieJar.h:
1915         * platform/network/cf/AuthenticationChallenge.h:
1916         * platform/network/cocoa/CredentialCocoa.h:
1917         * platform/network/mac/CertificateInfo.h:
1918         * platform/sql/SQLiteDatabase.h:
1919         (WebCore::SQLiteDatabase::disableThreadingChecks):
1920         * platform/sql/SQLiteDatabaseTracker.h:
1921         * platform/sql/SQLiteStatement.h:
1922         * platform/sql/SQLiteTransaction.h:
1923         * platform/text/BidiContext.h:
1924         Added WEBCORE_EXPORT macros.
1925
1926 2014-08-20  Zalan Bujtas  <zalan@apple.com>
1927
1928         Dashed/dotted borders do not paint.
1929         https://bugs.webkit.org/show_bug.cgi?id=135898
1930
1931         Reviewed by Simon Fraser.
1932
1933         Remove the empty line checks for drawLines. There's no need to protect the graphics
1934         context from empty lines.
1935
1936         Tests: fast/borders/border-painting-dashed-at-all.html
1937                fast/borders/border-painting-dashed.html
1938                fast/borders/border-painting-dotted-at-all.html
1939                fast/borders/border-painting-dotted.html
1940                fast/borders/border-painting-double-at-all.html
1941                fast/borders/border-painting-double.html
1942                fast/borders/border-painting-groove-at-all.html
1943                fast/borders/border-painting-inset-at-all.html
1944                fast/borders/border-painting-inset.html
1945                fast/borders/border-painting-outset-at-all.html
1946                fast/borders/border-painting-outset.html
1947                fast/borders/border-painting-ridge-at-all.html
1948                fast/borders/border-painting-solid-at-all.html
1949                fast/borders/border-painting-solid.html
1950                fast/borders/hidpi-border-painting-groove.html
1951                fast/borders/hidpi-border-painting-ridge.html
1952
1953         * rendering/RenderObject.cpp:
1954         (WebCore::RenderObject::drawLineForBoxSide):
1955         (WebCore::drawBorderLineRect): Deleted.
1956         (WebCore::drawBorderLine): Deleted.
1957
1958 2014-08-19  Jinwoo Song  <jinwoo7.song@samsung.com>
1959
1960         Ignore usemap attributes without '#' in img element
1961         https://bugs.webkit.org/show_bug.cgi?id=133336
1962
1963         Reviewed by Ryosuke Niwa.
1964
1965         HTML5 specification says we should ignore usemap attributes without #.
1966         http://www.w3.org/TR/html5/infrastructure.html#valid-hash-name-reference
1967
1968         Test: fast/dom/replaced-image-map-valid-hash-name.html
1969
1970         * dom/TreeScope.cpp:
1971         (WebCore::TreeScope::getImageMap):
1972
1973 2014-08-19  Pratik Solanki  <psolanki@apple.com>
1974
1975         Remove PurgeableBuffer since it is not very useful any more
1976         https://bugs.webkit.org/show_bug.cgi?id=135939
1977
1978         Reviewed by Andreas Kling.
1979
1980         The usefulness of having purgeable memory for cached resources has diminished now that
1981         WebKit uses file backed resources when possible. Since this is read only memory, it is in
1982         essence "purgeable". Having the PurgeableBuffer code adds additional complexity that we
1983         don't need. e.g. on my Mac, I am not seeing any entry for "WebCore purgeable data" when I
1984         run vmmap against the web processes that I have running. It is used on iOS, however even
1985         there much of the purgeable memory we create gets replaced by file backed memory once we get
1986         the notification from CFNetwork.
1987
1988         No new tests because no functional changes.
1989
1990         * WebCore.xcodeproj/project.pbxproj:
1991         * inspector/InspectorPageAgent.cpp:
1992         (WebCore::prepareCachedResourceBuffer):
1993         * loader/DocumentLoader.cpp:
1994         (WebCore::DocumentLoader::subresource):
1995         * loader/ResourceBuffer.cpp:
1996         (WebCore::ResourceBuffer::hasPurgeableBuffer): Deleted.
1997         (WebCore::ResourceBuffer::setShouldUsePurgeableMemory): Deleted.
1998         (WebCore::ResourceBuffer::createPurgeableBuffer): Deleted.
1999         (WebCore::ResourceBuffer::releasePurgeableBuffer): Deleted.
2000         * loader/ResourceBuffer.h:
2001         * loader/SubresourceLoader.cpp:
2002         (WebCore::SubresourceLoader::didFinishLoading):
2003         * loader/cache/CachedCSSStyleSheet.cpp:
2004         (WebCore::CachedCSSStyleSheet::sheetText):
2005         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
2006         * loader/cache/CachedCSSStyleSheet.h:
2007         * loader/cache/CachedImage.cpp:
2008         (WebCore::CachedImage::image):
2009         (WebCore::CachedImage::imageForRenderer):
2010         (WebCore::CachedImage::imageSizeForRenderer):
2011         (WebCore::CachedImage::destroyDecodedData):
2012         (WebCore::CachedImage::canUseDiskImageCache):
2013         * loader/cache/CachedImage.h:
2014         * loader/cache/CachedResource.cpp:
2015         (WebCore::CachedResource::addClientToSet):
2016         (WebCore::CachedResource::isSafeToMakePurgeable): Deleted.
2017         (WebCore::CachedResource::makePurgeable): Deleted.
2018         (WebCore::CachedResource::isPurgeable): Deleted.
2019         (WebCore::CachedResource::wasPurged): Deleted.
2020         * loader/cache/CachedResource.h:
2021         (WebCore::CachedResource::resourceBuffer):
2022         (WebCore::CachedResource::purgePriority): Deleted.
2023         * loader/cache/CachedScript.cpp:
2024         (WebCore::CachedScript::script):
2025         (WebCore::CachedScript::destroyDecodedData):
2026         * loader/cache/CachedScript.h:
2027         * loader/cache/MemoryCache.cpp:
2028         (WebCore::MemoryCache::resourceForRequestImpl):
2029         (WebCore::MemoryCache::pruneDeadResourcesToSize):
2030         (WebCore::MemoryCache::evict):
2031         (WebCore::MemoryCache::TypeStatistic::addResource):
2032         (WebCore::MemoryCache::dumpStats):
2033         (WebCore::MemoryCache::dumpLRULists):
2034         (WebCore::MemoryCache::makeResourcePurgeable): Deleted.
2035         * loader/cache/MemoryCache.h:
2036         (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
2037         (WebCore::MemoryCache::shouldMakeResourcePurgeableOnEviction): Deleted.
2038         * platform/PurgePriority.h: Removed.
2039         * platform/PurgeableBuffer.h: Removed.
2040         * platform/SharedBuffer.cpp:
2041         (WebCore::SharedBuffer::SharedBuffer):
2042         (WebCore::SharedBuffer::size):
2043         (WebCore::SharedBuffer::data):
2044         (WebCore::SharedBuffer::append):
2045         (WebCore::SharedBuffer::clear):
2046         (WebCore::SharedBuffer::copy):
2047         (WebCore::SharedBuffer::getSomeData):
2048         (WebCore::SharedBuffer::adoptPurgeableBuffer): Deleted.
2049         (WebCore::SharedBuffer::createPurgeableBuffer): Deleted.
2050         (WebCore::SharedBuffer::releasePurgeableBuffer): Deleted.
2051         * platform/SharedBuffer.h:
2052         (WebCore::SharedBuffer::hasPurgeableBuffer): Deleted.
2053         (WebCore::SharedBuffer::shouldUsePurgeableMemory): Deleted.
2054         * platform/cf/SharedBufferCF.cpp:
2055         (WebCore::SharedBuffer::SharedBuffer):
2056         * platform/mac/PurgeableBufferMac.cpp: Removed.
2057         * platform/mac/SharedBufferMac.mm:
2058         (WebCore::SharedBuffer::createCFData):
2059         * platform/soup/SharedBufferSoup.cpp:
2060
2061 2014-08-19  Zalan Bujtas  <zalan@apple.com>
2062
2063         Remove ENABLE(SUBPIXEL_LAYOUT).
2064         https://bugs.webkit.org/show_bug.cgi?id=136077
2065
2066         Reviewed by Simon Fraser.
2067
2068         Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
2069
2070         * Configurations/FeatureDefines.xcconfig:
2071         * css/CSSPrimitiveValue.cpp:
2072         (WebCore::CSSPrimitiveValue::computeLength):
2073         * dom/Element.cpp:
2074         (WebCore::adjustForLocalZoom):
2075         (WebCore::Element::offsetWidth):
2076         (WebCore::Element::offsetHeight):
2077         (WebCore::Element::clientLeft):
2078         (WebCore::Element::clientTop):
2079         (WebCore::Element::clientWidth):
2080         (WebCore::Element::clientHeight):
2081         * platform/LayoutUnit.h:
2082         (WebCore::LayoutUnit::LayoutUnit):
2083         (WebCore::LayoutUnit::ceilToFloat):
2084         (WebCore::LayoutUnit::ceil):
2085         (WebCore::LayoutUnit::round):
2086         (WebCore::LayoutUnit::floor):
2087         (WebCore::boundedMultiply):
2088         (WebCore::operator*):
2089         (WebCore::operator/):
2090         (WebCore::intMod):
2091         (WebCore::operator%):
2092         (WebCore::roundedLayoutUnit):
2093         (WebCore::ceiledLayoutUnit):
2094         (WebCore::LayoutUnit::toInt): Deleted.
2095         (WebCore::LayoutUnit::toFloat): Deleted.
2096         (WebCore::LayoutUnit::toDouble): Deleted.
2097         (WebCore::LayoutUnit::epsilon): Deleted.
2098         * platform/graphics/LayoutPoint.h:
2099         (WebCore::roundedForPainting):
2100         (WebCore::flooredForPainting):
2101         (WebCore::ceiledForPainting):
2102         (WebCore::roundedLayoutPoint):
2103         * platform/graphics/LayoutRect.cpp:
2104         (WebCore::enclosingLayoutRect):
2105         * platform/graphics/LayoutRect.h:
2106         (WebCore::pixelSnappedIntRect):
2107         (WebCore::pixelSnappedForPainting):
2108         * platform/graphics/LayoutSize.h:
2109         (WebCore::roundedLayoutSize):
2110         (WebCore::flooredForPainting):
2111         * rendering/RenderBlock.cpp:
2112         (WebCore::adjustFloatForSubPixelLayout):
2113         * rendering/RenderBlockFlow.cpp:
2114         (WebCore::RenderBlockFlow::layoutBlockChild):
2115         * rendering/RenderElement.h:
2116         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2117         * rendering/style/RenderStyle.h:
2118         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2119
2120 2014-08-19  Bem Jones-Bey  <bjonesbe@adobe.com>
2121
2122         [CSS Shapes] A few calc() test failures in the shape-image-threshold parsing tests
2123         https://bugs.webkit.org/show_bug.cgi?id=135926
2124
2125         Reviewed by Dirk Schulze.
2126
2127         shape-image-threshold is a Number, so it should be parsed as one. The
2128         default parsing doesn't support calcs, but numbers do.
2129
2130         No new tests, fixes exitsing test to pass.
2131
2132         * css/DeprecatedStyleBuilder.cpp:
2133         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Use
2134             ApplyPropertyNumber instead of ApplyPropertyDefault for
2135             shape-image-threshold.
2136
2137 2014-08-18  Maciej Stachowiak  <mjs@apple.com>
2138
2139         Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
2140         https://bugs.webkit.org/show_bug.cgi?id=136035
2141
2142         Reviewed by Dan Bernstein.
2143
2144         * WebCore.exp.in: Remove reference to no longer existent sumbols.
2145         * WebCore.order: ditto
2146         * WebCore.xcodeproj/project.pbxproj: Install new NSURLFileTyeMappings.h header.
2147         * platform/ios/MIMETypeRegistryIOS.mm:
2148         (WebCore::MIMETypeRegistry::getMIMETypeForExtension): Use NSURLFileTypeMappings
2149         directly instead of via WKSI wrapper.
2150         * platform/mac/MIMETypeRegistryMac.mm:
2151         (WebCore::MIMETypeRegistry::getMIMETypeForExtension): ditto
2152         (WebCore::MIMETypeRegistry::getExtensionsForMIMEType): ditto
2153         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): ditto
2154         * platform/mac/WebCoreSystemInterface.h: Remove references to the no-longer-used
2155         WKGetExtensionsForMIMEType, WKGetPreferredExtensionForMIMEType, or WKGetMIMETypeForExtension
2156         * platform/mac/WebCoreSystemInterface.mm: ditto
2157         * platform/spi: Added. This is where headers to declare SPI go.
2158         * platform/spi/cocoa: Added. See above.
2159         * platform/spi/cocoa/NSURLFileTypeMappingsSPI.h: Added. Header to declare
2160         the internal class NSURLFileTypeMappings and some of its methods.
2161
2162 2014-08-18  Commit Queue  <commit-queue@webkit.org>
2163
2164         Unreviewed, rolling out r172736.
2165         https://bugs.webkit.org/show_bug.cgi?id=136060
2166
2167         Caused 14% PLT regressions (Requested by rniwa on #webkit).
2168
2169         Reverted changeset:
2170
2171         "Remove PurgeableBuffer since it is not very useful any more"
2172         https://bugs.webkit.org/show_bug.cgi?id=135939
2173         http://trac.webkit.org/changeset/172736
2174
2175 2014-08-18  Simon Fraser  <simon.fraser@apple.com>
2176
2177         Provide default implementations of all GraphicsLayerClient methods
2178         https://bugs.webkit.org/show_bug.cgi?id=136054
2179
2180         Reviewed by Tim Horton.
2181
2182         Make none of the functions in GraphicsLayerClient pure virtual, since in many cases
2183         subclasses don't need to provide their own implementations.
2184
2185         * platform/graphics/GraphicsLayerClient.h:
2186         (WebCore::GraphicsLayerClient::notifyAnimationStarted):
2187         (WebCore::GraphicsLayerClient::notifyFlushRequired):
2188         (WebCore::GraphicsLayerClient::paintContents):
2189         * rendering/RenderLayerCompositor.h:
2190
2191 2014-08-18  Pratik Solanki  <psolanki@apple.com>
2192
2193         Remove PurgeableBuffer since it is not very useful any more
2194         https://bugs.webkit.org/show_bug.cgi?id=135939
2195
2196         Reviewed by Geoffrey Garen.
2197
2198         The usefulness of having purgeable memory for cached resources has diminished now that
2199         WebKit uses file backed resources when possible. Since this is read only memory, it is in
2200         essence "purgeable". Having the PurgeableBuffer code adds additional complexity that we
2201         don't need. e.g. on my Mac, I am not seeing any entry for "WebCore purgeable data" when I
2202         run vmmap against the web processes that I have running. It is used on iOS, however even
2203         there much of the purgeable memory we create gets replaced by file backed memory once we get
2204         the notification from CFNetwork.
2205
2206         No new tests because no functional changes.
2207
2208         * WebCore.xcodeproj/project.pbxproj:
2209         * inspector/InspectorPageAgent.cpp:
2210         (WebCore::prepareCachedResourceBuffer):
2211         * loader/DocumentLoader.cpp:
2212         (WebCore::DocumentLoader::subresource):
2213         * loader/ResourceBuffer.cpp:
2214         (WebCore::ResourceBuffer::hasPurgeableBuffer): Deleted.
2215         (WebCore::ResourceBuffer::setShouldUsePurgeableMemory): Deleted.
2216         (WebCore::ResourceBuffer::createPurgeableBuffer): Deleted.
2217         (WebCore::ResourceBuffer::releasePurgeableBuffer): Deleted.
2218         * loader/ResourceBuffer.h:
2219         * loader/SubresourceLoader.cpp:
2220         (WebCore::SubresourceLoader::didFinishLoading):
2221         * loader/cache/CachedCSSStyleSheet.cpp:
2222         (WebCore::CachedCSSStyleSheet::sheetText):
2223         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
2224         * loader/cache/CachedCSSStyleSheet.h:
2225         * loader/cache/CachedImage.cpp:
2226         (WebCore::CachedImage::image):
2227         (WebCore::CachedImage::imageForRenderer):
2228         (WebCore::CachedImage::imageSizeForRenderer):
2229         (WebCore::CachedImage::destroyDecodedData):
2230         (WebCore::CachedImage::canUseDiskImageCache):
2231         * loader/cache/CachedImage.h:
2232         * loader/cache/CachedResource.cpp:
2233         (WebCore::CachedResource::addClientToSet):
2234         (WebCore::CachedResource::isSafeToMakePurgeable): Deleted.
2235         (WebCore::CachedResource::makePurgeable): Deleted.
2236         (WebCore::CachedResource::isPurgeable): Deleted.
2237         (WebCore::CachedResource::wasPurged): Deleted.
2238         * loader/cache/CachedResource.h:
2239         (WebCore::CachedResource::resourceBuffer):
2240         (WebCore::CachedResource::purgePriority): Deleted.
2241         * loader/cache/CachedScript.cpp:
2242         (WebCore::CachedScript::script):
2243         (WebCore::CachedScript::destroyDecodedData):
2244         * loader/cache/CachedScript.h:
2245         * loader/cache/MemoryCache.cpp:
2246         (WebCore::MemoryCache::resourceForRequestImpl):
2247         (WebCore::MemoryCache::pruneDeadResourcesToSize):
2248         (WebCore::MemoryCache::evict):
2249         (WebCore::MemoryCache::TypeStatistic::addResource):
2250         (WebCore::MemoryCache::dumpStats):
2251         (WebCore::MemoryCache::dumpLRULists):
2252         (WebCore::MemoryCache::makeResourcePurgeable): Deleted.
2253         * loader/cache/MemoryCache.h:
2254         (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
2255         (WebCore::MemoryCache::shouldMakeResourcePurgeableOnEviction): Deleted.
2256         * platform/PurgePriority.h: Removed.
2257         * platform/PurgeableBuffer.h: Removed.
2258         * platform/SharedBuffer.cpp:
2259         (WebCore::SharedBuffer::SharedBuffer):
2260         (WebCore::SharedBuffer::size):
2261         (WebCore::SharedBuffer::data):
2262         (WebCore::SharedBuffer::append):
2263         (WebCore::SharedBuffer::clear):
2264         (WebCore::SharedBuffer::copy):
2265         (WebCore::SharedBuffer::getSomeData):
2266         (WebCore::SharedBuffer::adoptPurgeableBuffer): Deleted.
2267         (WebCore::SharedBuffer::createPurgeableBuffer): Deleted.
2268         (WebCore::SharedBuffer::releasePurgeableBuffer): Deleted.
2269         * platform/SharedBuffer.h:
2270         (WebCore::SharedBuffer::hasPurgeableBuffer): Deleted.
2271         (WebCore::SharedBuffer::shouldUsePurgeableMemory): Deleted.
2272         * platform/cf/SharedBufferCF.cpp:
2273         (WebCore::SharedBuffer::SharedBuffer):
2274         * platform/mac/PurgeableBufferMac.cpp: Removed.
2275         * platform/mac/SharedBufferMac.mm:
2276         (WebCore::SharedBuffer::createCFData):
2277         * platform/soup/SharedBufferSoup.cpp:
2278
2279 2014-08-18  Pratik Solanki  <psolanki@apple.com>
2280
2281         Use modern for loop instead of iterators in SharedBufferCF.cpp
2282         https://bugs.webkit.org/show_bug.cgi?id=136000
2283
2284         Reviewed by Andreas Kling.
2285
2286         * platform/cf/SharedBufferCF.cpp:
2287         (WebCore::SharedBuffer::copyBufferAndClear):
2288         (WebCore::SharedBuffer::copySomeDataFromDataArray):
2289         (WebCore::SharedBuffer::maybeAppendDataArray): Use auto& instead of auto for less RetainPtr/refcount churn.
2290
2291 2014-08-18  Antti Koivisto  <antti@apple.com>
2292
2293         Tighten RenderCounter typing
2294         https://bugs.webkit.org/show_bug.cgi?id=136049
2295
2296         Reviewed by Andreas Kling.
2297
2298         RenderObject* -> RenderElement&
2299
2300         * rendering/CounterNode.cpp:
2301         (WebCore::CounterNode::CounterNode):
2302         (WebCore::CounterNode::create):
2303         (WebCore::showTreeAndMark):
2304         * rendering/CounterNode.h:
2305         (WebCore::CounterNode::owner):
2306         * rendering/RenderCounter.cpp:
2307         (WebCore::previousInPreOrder):
2308         (WebCore::parentOrPseudoHostElement):
2309         (WebCore::previousSiblingOrParent):
2310         (WebCore::areRenderersElementsSiblings):
2311         (WebCore::nextInPreOrder):
2312         (WebCore::planCounter):
2313         (WebCore::findPlaceForCounter):
2314         (WebCore::makeCounterNode):
2315         (WebCore::RenderCounter::originalText):
2316         (WebCore::destroyCounterNodeWithoutMapRemoval):
2317         (WebCore::RenderCounter::destroyCounterNodes):
2318         (WebCore::RenderCounter::destroyCounterNode):
2319         (WebCore::RenderCounter::rendererRemovedFromTree):
2320         (WebCore::updateCounters):
2321         (WebCore::RenderCounter::rendererSubtreeAttached):
2322         (WebCore::RenderCounter::rendererStyleChanged):
2323         (showCounterRendererTree):
2324         * rendering/RenderCounter.h:
2325         * rendering/RenderElement.cpp:
2326         (WebCore::RenderElement::RenderElement):
2327         (WebCore::RenderElement::insertChildInternal):
2328         (WebCore::RenderElement::removeChildInternal):
2329         (WebCore::RenderElement::styleDidChange):
2330         (WebCore::RenderElement::willBeDestroyed):
2331         * rendering/RenderElement.h:
2332         (WebCore::RenderElement::hasCounterNodeMap):
2333         (WebCore::RenderElement::setHasCounterNodeMap):
2334         
2335             Move CounterNodeMap to RenderElement from RenderObject.
2336
2337         * rendering/RenderObject.cpp:
2338         (WebCore::RenderObject::willBeDestroyed):
2339         * rendering/RenderObject.h:
2340         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2341         (WebCore::RenderObject::hasCounterNodeMap): Deleted.
2342         (WebCore::RenderObject::setHasCounterNodeMap): Deleted.
2343
2344 2014-08-18  Peyton Randolph  <prandolph@apple.com>
2345
2346         Expose long mouse press WebKit API. Part of 135257 - Add long mouse press gesture
2347         https://bugs.webkit.org/show_bug.cgi?id=136048
2348
2349         Reviewed by Dan Bernstein.
2350
2351         This patch exposes long mouse press API callbacks in both the injected bundle and on the UI process
2352         through their respective page UI clients. The callbacks are modeled off of the mouseDidMoveOverElement
2353         callback. Like the mouseDidMoveOverElement callback, these callbacks allow the bundle to pass 
2354         information to the UI process via a userData out parameter.
2355
2356         * page/Chrome.cpp:
2357         (WebCore::Chrome::didBeginTrackingPotentialLongMousePress): Added.
2358         (WebCore::Chrome::didRecognizeLongMousePress): Added.
2359         (WebCore::Chrome::didCancelTrackingPotentialLongMousePress): Added.
2360         * page/Chrome.h:
2361         * page/ChromeClient.h:
2362         (WebCore::ChromeClient::didBeginTrackingPotentialLongMousePress): Added.
2363         (WebCore::ChromeClient::didRecognizeLongMousePress): Added.
2364         (WebCore::ChromeClient::didCancelTrackingPotentialLongMousePress): Added.
2365         * page/EventHandler.cpp:
2366         (WebCore::EventHandler::handleMousePressEvent): 
2367         Pass the press hit test result to kick off the long mouse press.
2368         (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Notify the chrome.
2369         (WebCore::EventHandler::recognizeLongMousePress): Ditto.
2370         (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): 
2371         Ditto. Also opportunistically remove a runtime switch check to see if long pressing is enabled. The
2372         runtime switch check was only triggered when long pressing was disabled in the middle of a long press.
2373         * page/EventHandler.h:
2374
2375 2014-08-18  Przemyslaw Kuczynski  <p.kuczynski@samsung.com>
2376
2377         Fix unintentional integer overflow before widen
2378         https://bugs.webkit.org/show_bug.cgi?id=135463
2379
2380         Reviewed by Oliver Hunt.
2381
2382         Overflowing expression is evaluated using operands arithmetic but then is used in
2383         context which expects an wider integer type. To avoid overflow at least one operand
2384         has to be representative of the wider type.
2385
2386         * loader/FTPDirectoryParser.cpp:
2387         (WebCore::parseOneFTPLine): Changed strtoul to strtoull.
2388         * loader/ProgressTracker.cpp:
2389         (WebCore::ProgressTracker::incrementProgress): Added static_cast to long long.
2390         * platform/efl/FileSystemEfl.cpp:
2391         (WebCore::getVolumeFreeSizeForPath): Added static_cast to uint64_t.
2392
2393 2014-08-18  Vivek Galatage  <vivek.vg@samsung.com>
2394
2395         Implement CanvasRenderingContext2D direction attribute
2396         https://bugs.webkit.org/show_bug.cgi?id=135878
2397
2398         Reviewed by Darin Adler.
2399
2400         The attribute, 'direction', represents the text directionality.
2401         This is an important attribute for the bi-directional text within the CanvasRenderingContext2D.
2402         The allowed set of values are 'rtl', 'ltr' and 'inherit'.
2403
2404         Specification URL: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#dom-context-2d-direction
2405
2406         Test: fast/canvas/canvas-direction.html
2407
2408         * html/canvas/CanvasRenderingContext2D.cpp:
2409         (WebCore::inheritedDirection):
2410         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2411         (WebCore::CanvasRenderingContext2D::reset):
2412         (WebCore::CanvasRenderingContext2D::State::State):
2413         (WebCore::CanvasRenderingContext2D::State::operator=):
2414         (WebCore::CanvasRenderingContext2D::direction):
2415         (WebCore::CanvasRenderingContext2D::setDirection):
2416         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2417         * html/canvas/CanvasRenderingContext2D.h:
2418         * html/canvas/CanvasRenderingContext2D.idl:
2419
2420 2014-08-18  Benjamin Poulain  <benjamin@webkit.org>
2421
2422         The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element
2423         https://bugs.webkit.org/show_bug.cgi?id=135999
2424
2425         Reviewed by Antti Koivisto.
2426
2427         In Element's checkForEmptyStyleChange(), the style invalidation was only considering the invalidation of the element
2428         for which the subtree has changed. When the pseudo class :empty is used with a sibling combinator (e.g. foo:empty+bar),
2429         we were never invalidating the style of the element on which the selector applies.
2430
2431         This patch fixes the issue by invalidating the whole subtree rooted at the parent if the :empty rules applies
2432         to siblings. A new flag "styleOfSiblingsAffectedByEmpty" is introduced to cover this case.
2433
2434         SelectorChecker just sets the flag all the time if any sibling rule exists.
2435         This is overkill but that code is just there for non-jit cases.
2436
2437         SelectorCompiler does a better job and only sets the flag if matching anything else than the rightmost element.
2438         There is a case not optimized, :empty with descendant (e.g. foo:empty>bar). Those cases are useless in practice,
2439         it is not worth optimizing them.
2440
2441         Tests: fast/css/pseudo-element-updates-on-empty.html
2442                fast/selectors/not-empty-adjacent-style-update.html
2443                fast/selectors/not-empty-style-update.html
2444
2445         * css/SelectorChecker.cpp:
2446         (WebCore::SelectorChecker::checkOne):
2447         * cssjit/SelectorCompiler.cpp:
2448         (WebCore::SelectorCompiler::fragmentMatchesTheRightmostElement):
2449         shouldUseRenderStyleFromCheckingContext() is renamed fragmentMatchesTheRightmostElement() because
2450         it is now also used by generateElementIsEmpty() in a context where the Context's style is irrelevant.
2451
2452         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2453         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
2454         (WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty):
2455         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
2456         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
2457         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
2458         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
2459         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
2460         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2461         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
2462         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
2463         (WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext): Deleted.
2464         (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmptyAndUpdateRenderStyleIfNecessary): Deleted.
2465         * dom/Element.cpp:
2466         (WebCore::checkForEmptyStyleChange):
2467         (WebCore::Element::setStyleOfSiblingsAffectedByEmpty):
2468         (WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty):
2469         * dom/Element.h:
2470         (WebCore::Element::styleOfSiblingsAffectedByEmpty):
2471         * dom/ElementRareData.h:
2472         (WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty):
2473         (WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty):
2474         (WebCore::ElementRareData::ElementRareData):
2475
2476 2014-08-18  Brent Fulgham  <bfulgham@apple.com>
2477
2478         [Mac] Unreviewed merge correction.
2479
2480         * page/mac/EventHandlerMac.mm:
2481         (WebCore::EventHandler::platformCompleteWheelEvent): Revert an
2482         unintended change from r172705.
2483
2484 2014-08-18  Bem Jones-Bey  <bjonesbe@adobe.com>
2485
2486         Small cleanup for ShapeOutsideDeltas
2487         https://bugs.webkit.org/show_bug.cgi?id=136043
2488
2489         Reviewed by Zoltan Horvath.
2490
2491         Remove explicit initializtion of LayoutUnit members and explicitly
2492         size the boolean flags so they pack properly.
2493
2494         No new tests, no behavior change.
2495
2496         * rendering/shapes/ShapeOutsideInfo.h:
2497
2498 2014-08-18  Dirk Schulze  <krit@webkit.org>
2499
2500         calc() doesn't work for SVG CSS properties
2501         https://bugs.webkit.org/show_bug.cgi?id=136026
2502
2503         Reviewed by Andreas Kling.
2504
2505         Make calc() work on SVG CSS properties as well. stroke-width and
2506         stroke-dashoffset used SVGLength. SVGLength doesn't work together with
2507         cross units length arguments like % and px (just returns 0 in these
2508         cases). I moved these properties over to Length. All modified files
2509         beside to SVGCSSParser are related to this switch.
2510
2511         Test: svg/css/parse-calc-length.html
2512
2513         * css/CSSComputedStyleDeclaration.cpp:
2514         (WebCore::ComputedStyleExtractor::propertyValue):
2515         * css/DeprecatedStyleBuilder.cpp:
2516         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2517         * css/SVGCSSComputedStyleDeclaration.cpp:
2518         (WebCore::ComputedStyleExtractor::svgPropertyValue):
2519         * css/SVGCSSParser.cpp:
2520         (WebCore::CSSParser::parseSVGValue):
2521         * css/SVGCSSStyleSelector.cpp:
2522         (WebCore::StyleResolver::applySVGProperty):
2523         * page/animation/CSSPropertyAnimation.cpp:
2524         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2525         * rendering/style/RenderStyle.h:
2526         * rendering/style/SVGRenderStyle.h:
2527         (WebCore::SVGRenderStyle::setStrokeWidth):
2528         (WebCore::SVGRenderStyle::setStrokeDashOffset):
2529         (WebCore::SVGRenderStyle::strokeWidth):
2530         (WebCore::SVGRenderStyle::strokeDashOffset):
2531         (WebCore::SVGRenderStyle::initialStrokeDashOffset): Deleted.
2532         (WebCore::SVGRenderStyle::initialStrokeWidth): Deleted.
2533         * rendering/style/SVGRenderStyleDefs.cpp:
2534         (WebCore::StyleStrokeData::StyleStrokeData):
2535         * rendering/style/SVGRenderStyleDefs.h:
2536         * rendering/svg/RenderSVGShape.cpp:
2537         (WebCore::RenderSVGShape::strokeWidth):
2538         * rendering/svg/RenderSVGText.cpp:
2539         (WebCore::RenderSVGText::strokeBoundingBox):
2540         * rendering/svg/SVGRenderSupport.cpp:
2541         (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
2542         * rendering/svg/SVGRenderTreeAsText.cpp:
2543         (WebCore::writeStyle):
2544         * svg/SVGLengthContext.cpp:
2545         (WebCore::SVGLengthContext::valueForLength):
2546
2547 2014-08-18  Andy Estes  <aestes@apple.com>
2548
2549         REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme
2550         https://bugs.webkit.org/show_bug.cgi?id=136010
2551
2552         Reviewed by Darin Adler.
2553
2554         r167856 caused WebKit to stop scheduling certain kinds of navigations (window.location changes, meta-refresh,
2555         and some calls to window.open) when the request URL is invalid. Adobe.com performs one of these navigations to
2556         an invalid URL with an external scheme (aam:), relying on Safari's navigation policy delegate to ignore the
2557         navigation and launch the external app registered to handle aam: URLs. Since the navigation is no longer
2558         scheduled, the policy delegate is never executed and the external app never launches.
2559
2560         Instead of not scheduling the navigation, allow it to proceed until the client's policy delegate has executed
2561         and made a decision. Only disallow the navigation if the policy delegate told WebKit to proceed with the load.
2562         This exposes these navigations to clients via the policy delegate and via willPerformClientRedirectToURL and
2563         didCancelClientRedirectForFrame on the frame load delegate.
2564         
2565         To constrain this check only to the navigation types covered by r167856, only two NavigationSchedulers
2566         (ScheduledRedirect and ScheduledLocationChange) enable the invalid URL check.
2567
2568         Note that r167856 also caused an iOS regression, and this was resolved in r170120 by adding a linked-on-or-after
2569         check and a WebCore setting. Since the iOS regression is also resolved by the approach described above, this
2570         patch reverts r170120 (but keeps some of its tests).
2571
2572         Tests: fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html
2573                fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html
2574                fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate.html
2575                fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html
2576                fast/loader/window-open-to-invalid-url-calls-policy-delegate.html
2577                fast/loader/window-open-to-invalid-url-disallowed.html
2578
2579         * WebCore.exp.in: Updated the symbol FrameLoader::loadFrameRequest.
2580         * loader/FrameLoader.cpp:
2581         (WebCore::FrameLoader::changeLocation): Added an AllowNavigationToInvalidURL argument; passed down to urlSelected.
2582         (WebCore::FrameLoader::urlSelected): Added an AllowNavigationToInvalidURL argument; passed down to loadFrameRequest.
2583         (WebCore::FrameLoader::loadURLIntoChildFrame): Passed AllowNavigationToInvalidURL::Yes to loadURL.
2584         (WebCore::FrameLoader::loadFrameRequest): Added an AllowNavigationToInvalidURL argument; passed down to loadURL and loadPostRequest.
2585         (WebCore::FrameLoader::loadURL): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNewWindowPolicy and loadWithNavigationAction.
2586         (WebCore::FrameLoader::loadPostRequest): Ditto.
2587         (WebCore::FrameLoader::load): Passed AllowNavigationToInvalidURL::Yes to continueLoadAfterNewWindowPolicy.
2588         (WebCore::FrameLoader::loadWithNavigationAction): Added an AllowNavigationToInvalidURL argument; passed down to loadWithDocumentLoader.
2589         (WebCore::FrameLoader::loadWithDocumentLoader): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNavigationPolicy.
2590         (WebCore::FrameLoader::reloadWithOverrideEncoding): Passed AllowNavigationToInvalidURL::Yes to loadWithDocumentLoader.
2591         (WebCore::FrameLoader::reload): Ditto.
2592         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2593             Added an AllowNavigationToInvalidURL argument; if its value is No and the request's URL is invalid, do not continue.
2594             Added a FIXME about calling clientRedirectCancelledOrFinished on non-quick redirect cancellations.
2595         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Added an AllowNavigationToInvalidURL argument; passed down to loadWithNavigationAction.
2596         (WebCore::FrameLoader::loadDifferentDocumentItem): Passed AllowNavigationToInvalidURL::Yes to either loadWithDocumentLoader or loadWithNavigationAction.
2597         * loader/FrameLoader.h:
2598         * loader/FrameLoaderTypes.h: Defined AllowNavigationToInvalidURL to have values of Yes and No.
2599         * loader/NavigationScheduler.cpp:
2600         (WebCore::ScheduledRedirect::fire): Passed AllowNavigationToInvalidURL::No to FrameLoader::changeLocation.
2601         (WebCore::ScheduledLocationChange::fire): Ditto.
2602         (WebCore::NavigationScheduler::shouldScheduleNavigation): Removed the URL::isValid check.
2603         (WebCore::NavigationScheduler::scheduleLocationChange): Passed AllowNavigationToInvalidURL::No to FrameLoder::changeLocation during fragment navigations.
2604         * page/ContextMenuController.cpp:
2605         (WebCore::openNewWindow): Passed AllowNavigationToInvalidURL::Yes to FrameLoader::loadFrameRequest.
2606         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
2607         * page/Settings.in: Removed allowNavigationToInvalidURL.
2608
2609 2014-08-18  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
2610
2611         Fix keyTimes list length of from/to/by animations.
2612         https://bugs.webkit.org/show_bug.cgi?id=136037
2613
2614         Reviewed by Darin Adler.
2615
2616         For from/to/by animations, the length of keyTimes and keyPoints
2617         attribute if are specified must be equal and must have at least
2618         2 values.
2619
2620         This is backport of my fix in Blink: https://codereview.chromium.org/453243003/
2621
2622         Test: svg/animations/invalid-keytime-number-crash.html
2623
2624         * svg/SVGAnimationElement.cpp:
2625         (WebCore::SVGAnimationElement::startedActiveInterval):
2626
2627 2014-08-18  Brent Fulgham  <bfulgham@apple.com>
2628
2629         [Mac] Follow-up to r136040 based on Darin Adler's comments.
2630
2631         Pass Widget* as a Widget&, since it can never be null.
2632
2633         * page/EventHandler.cpp:
2634         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
2635         (WebCore::EventHandler::handleWheelEvent):
2636         * page/EventHandler.h:
2637         * page/mac/EventHandlerMac.mm:
2638         (WebCore::EventHandler::platformCompleteWheelEvent):
2639         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
2640
2641 2014-08-17  Brent Fulgham  <bfulgham@apple.com>
2642
2643         [Mac] Gesture scrolls don't work in the WebKit1 clients after scrolling a non-scrollable iFrame
2644         https://bugs.webkit.org/show_bug.cgi?id=136029
2645         <rdar://problem/17767169>
2646
2647         Reviewed by Maciej Stachowiak.
2648
2649         This is difficult to test in our layout tests, since it relies on specific host application
2650         behavior.
2651
2652         If the platform widget is a frame view (IFrame), and we are in WebKit1, 'passWheelEventToWidget'
2653         has already called 'scrollWheel' on the underlying platform widget. We need to return true in
2654         this case to avoid getting multiple copies of the scrollWheel event sent to the platform widget.
2655
2656         * page/EventHandler.cpp:
2657         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Revise default stub to
2658         accept a Widget* argument.
2659         (WebCore::EventHandler::handleWheelEvent):
2660         * page/EventHandler.h:
2661         * page/mac/EventHandlerMac.mm:
2662         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Check for WK1 case and
2663         return 'true' when the underlying NSScrollView has been issues a scrollWheel event.
2664         
2665
2666 2014-08-18  Andy Estes  <aestes@apple.com>
2667
2668         Revert r172697.
2669
2670         It made several webarchive layout tests flaky and didn't have the correct behavior for non-quick redirects.
2671
2672         * loader/FrameLoader.cpp:
2673         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2674         * loader/NavigationScheduler.cpp:
2675         (WebCore::NavigationScheduler::shouldScheduleNavigation):
2676         * page/Settings.in:
2677
2678 2014-08-15  Andy Estes  <aestes@apple.com>
2679
2680         REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme
2681         https://bugs.webkit.org/show_bug.cgi?id=136010
2682
2683         Reviewed by Darin Adler.
2684
2685         r167856 caused WebKit to stop scheduling certain kinds of navigations (window.location changes, meta-refresh,
2686         and some calls to window.open) when the request URL is invalid. Adobe.com performs one of these navigations to
2687         an invalid URL with an external scheme (aam:), relying on Safari's navigation policy delegate to ignore the
2688         navigation and launch the external app registered to handle aam: URLs. Since the navigation is no longer
2689         scheduled, the policy delegate is never executed and the external app never launches.
2690
2691         Instead of not scheduling the navigation, allow it to proceed until the client's policy delegate has executed
2692         and made a decision. Only disallow the navigation if the policy delegate told WebKit to proceed with the load.
2693         This exposes these navigations to clients via the policy delegate and via willPerformClientRedirectToURL and
2694         didCancelClientRedirectForFrame on the frame load delegate.
2695
2696         Note that r167856 also caused an iOS regression, and this was resolved in r170120 by adding a linked-on-or-after
2697         check and a WebCore setting. Since the iOS regression is also resolved by the approach described above, this
2698         patch reverts r170120 (but keeps some of its tests).
2699
2700         Tests: fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html
2701                fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html
2702                fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate.html
2703                fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html
2704                fast/loader/window-open-to-invalid-url-calls-policy-delegate.html
2705                fast/loader/window-open-to-invalid-url-disallowed.html
2706
2707         * loader/FrameLoader.cpp:
2708         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Do not continue if the navigation will be a redirect
2709         to an invalid URL.
2710         * loader/NavigationScheduler.cpp:
2711         (WebCore::NavigationScheduler::shouldScheduleNavigation): Resumed scheduling navigations to invalid URLs.
2712         * page/Settings.in: Removed the allowNavigationToInvalidURL setting.
2713
2714 2014-08-15  Dean Jackson  <dino@apple.com>
2715
2716         REGRESSION (r164173): Safari AutoFill button in popover, default buttons on iCloud control panel and Safari Safe Browsing pages don't have default appearance
2717         https://bugs.webkit.org/show_bug.cgi?id=136011
2718
2719         Reviewed by Sam Weinig.
2720
2721         When we render some controls, we need to make sure the NSWindow subclass we
2722         use as the host of the AppKit views identifies itself as the key window (if
2723         the control state is correct). We already have a flag tracking this for
2724         key appearance - just make sure we do the same for isKeyWindow.
2725
2726         * platform/mac/ThemeMac.mm:
2727         (-[WebCoreThemeWindow isKeyWindow]): New override to mirror the static
2728         variable for key appearance.
2729
2730 2014-08-15  Zalan Bujtas  <zalan@apple.com>
2731
2732         Do not use FloatRect::infiniteRect() to flag full repaints.
2733         https://bugs.webkit.org/show_bug.cgi?id=135900
2734
2735         Reviewed by Simon Fraser.
2736
2737         Converting FloatRect::infiniteRect() to IntRect leads to value overflow
2738         and we end up with invalid repaint rectangle. Use a boolean flag to indicate
2739         full repaint request.
2740
2741         Covered by existing tests.
2742
2743         * platform/graphics/ca/GraphicsLayerCA.cpp:
2744         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2745         (WebCore::GraphicsLayerCA::setNeedsDisplay):
2746         (WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
2747         (WebCore::GraphicsLayerCA::repaintLayerDirtyRects):
2748         * platform/graphics/ca/GraphicsLayerCA.h:
2749         * platform/graphics/ca/PlatformCALayer.h:
2750         * platform/graphics/ca/TileGrid.cpp:
2751         (WebCore::TileGrid::setTileNeedsDisplayInRect):
2752         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2753         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2754         (PlatformCALayerMac::setNeedsDisplay):
2755         (PlatformCALayerMac::setNeedsDisplayInRect):
2756
2757 2014-08-15  Benjamin Poulain  <benjamin@webkit.org>
2758
2759         Unify the modes style resolution modes SharingRules and StyleInvalidation
2760         https://bugs.webkit.org/show_bug.cgi?id=135969
2761
2762         Reviewed by Andreas Kling.
2763
2764         Unifying the Collector and SelectorCheckers was done in previous patches,
2765         this is just removing the enums.
2766
2767         * css/ElementRuleCollector.cpp:
2768         (WebCore::ElementRuleCollector::collectMatchingRules):
2769         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
2770         * css/SelectorChecker.cpp:
2771         (WebCore::SelectorChecker::match):
2772         * css/SelectorChecker.h:
2773         * css/StyleInvalidationAnalysis.cpp:
2774         (WebCore::invalidateStyleRecursively):
2775         * cssjit/SelectorCompiler.cpp:
2776         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
2777
2778 2014-08-15  Benjamin Poulain  <benjamin@webkit.org>
2779
2780         CSS JIT: compile :-webkit-full-page-media
2781         https://bugs.webkit.org/show_bug.cgi?id=135968
2782
2783         Reviewed by Alexey Proskuryakov.
2784
2785         Add the pseudo class :-webkit-full-page-media with an unoptimized function call.
2786
2787         It would be possible to inline it, but this selector is so uncommon I don't think
2788         it is worth having any additional complexity for it.
2789
2790         * css/SelectorChecker.cpp:
2791         (WebCore::SelectorChecker::checkOne):
2792         * css/SelectorCheckerTestFunctions.h:
2793         (WebCore::isMediaDocument):
2794         * cssjit/SelectorCompiler.cpp:
2795         (WebCore::SelectorCompiler::addPseudoClassType):
2796
2797 2014-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2798
2799         Fix gliding in AxisScrollSnapAnimator for Mac
2800         https://bugs.webkit.org/show_bug.cgi?id=135971
2801
2802         Reviewed by Dean Jackson.
2803
2804         Previously, momentum events that are handled immediately after finishing a glide animation cause a second, extremely
2805         slow glide animation to trigger. To fix this, I added a new state DestinationReached. During this state, additional
2806         momentum events that are handled after the glide animation completes will not fill up the momentum window and trigger
2807         a second glide event.
2808
2809         * platform/mac/AxisScrollSnapAnimator.h:
2810         * platform/mac/AxisScrollSnapAnimator.mm:
2811         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
2812         (WebCore::AxisScrollSnapAnimator::handleWheelEvent):
2813         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate):
2814         (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
2815         (WebCore::AxisScrollSnapAnimator::computeGlideDelta):
2816
2817 2014-08-15  Eric Carlson  <eric.carlson@apple.com>
2818
2819         [MSE] Implement a maximum buffer size for SourceBuffer
2820         https://bugs.webkit.org/show_bug.cgi?id=135614
2821
2822         Reviewed by Jer Noble.
2823
2824         Implement the MSE coded frame eviction algorithm: when new buffers are appended attempt
2825         to keep the amount of data buffered below a maximum size (which is determined by the media
2826         session manager) by freeing coded frames as follows:
2827             1 - Free frames in 30 second chunks from 0 to 30 seconds before the current time.
2828             2 - If there are time ranges after the range with the current time, free frames in
2829                 30 second chunks from duration back to the beginning of the time range after
2830                 current time.
2831
2832         For now we DO NOT throw a QUOTA_EXCEEDED_ERR when we are not able to free up enough
2833         space to remain below the prescribed quota, because some big name, widely deployed, 
2834         code bases ignore the error and continue appending data as though the failed append
2835         succeeded, leading to a corrupted bitstream and failure to play.
2836
2837         * Modules/mediasource/SampleMap.cpp:
2838         (WebCore::SampleMap::addSample): Drive-by performance optimization: sample->presentationTime()
2839             is used more than once, stash it in a local variable.
2840         (WebCore::SampleMap::removeSample): Ditto.
2841
2842         * Modules/mediasource/SourceBuffer.cpp:
2843         (WebCore::logRanges): Debug-only function to log TimeRanges.
2844         (WebCore::SourceBuffer::SourceBuffer):
2845         (WebCore::SourceBuffer::remove): Optimize logging. Buffer full and coded frame eviction logic
2846             is in SourceBuffer instead of SourceBufferPrivate.
2847         (WebCore::SourceBuffer::appendBufferInternal): Ditto.
2848         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Set m_bufferFull when more data
2849             has been buffered than allowed.
2850         (WebCore::removeSamplesFromTrackBuffer): Add logging.
2851         (WebCore::SourceBuffer::removeCodedFrames): Improve logging. Avoid debug build assert when
2852             current time is after last enqueued presentation time.
2853         (WebCore::SourceBuffer::evictCodedFrames): The coded frame eviction algorithm.
2854         (WebCore::SourceBuffer::maximumBufferSize): Return the maximum amount of data that can 
2855             be buffered.
2856         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Improve logging. Don't attempt
2857             to create a PlatformTimeRanges with inverted start and end to avoid an assert in debug.
2858         (WebCore::SourceBuffer::hasAudio): New, return true if there are any audio tracks.
2859         (WebCore::SourceBuffer::hasVideo): New, return true if there are any video tracks.
2860         (WebCore::SourceBuffer::sourceBufferPrivateHasAudio): Call hasAudio.
2861         (WebCore::SourceBuffer::sourceBufferPrivateHasVideo): Call hasVideo.
2862         (WebCore::SourceBuffer::hasCurrentTime): Return true if currentTime is greater than duration.
2863         (WebCore::SourceBuffer::hasFutureTime): Ditto.
2864         (WebCore::SourceBuffer::extraMemoryCost): Return the amount of data buffered: the size of
2865             the input buffer plus the size of all track samples.
2866         (WebCore::SourceBuffer::reportExtraMemoryCost): Move buffered size calculation to extraMemoryCost.
2867         (WebCore::SourceBuffer::document): Document accessor.
2868         * Modules/mediasource/SourceBuffer.h: Drive-by size optimization by moving all bool member
2869             variables to the end of class.
2870
2871         * html/HTMLMediaElement.cpp:
2872         (WebCore::HTMLMediaElement::refreshCachedTime): Drive-by removal of overly chatty logging.
2873         (WebCore::HTMLMediaElement::maximumSourceBufferSize): New, maximum source buffer size.
2874         * html/HTMLMediaElement.h:
2875
2876         * html/HTMLMediaSession.cpp:
2877         (WebCore::HTMLMediaSession::maximumMediaSourceBufferSize): New, get maximum source buffer 
2878             size from settings, return full amount for an SourceBuffer with video and audio, return 5%
2879             of the maximum for an audio-only SourceBuffer.
2880         * html/HTMLMediaSession.h:
2881
2882         * page/Settings.in: Add maximumSourceBufferSize. Default value is enough for approximately
2883             five minutes of 1080p video and stereo audio.
2884
2885         * platform/graphics/PlatformTimeRanges.cpp:
2886         (WebCore::PlatformTimeRanges::totalDuration): Drive-by optimization.
2887         (WebCore::PlatformTimeRanges::dump): New, allow a PlatformTimeRanges to be printed.
2888         * platform/graphics/PlatformTimeRanges.h:
2889
2890         * platform/graphics/SourceBufferPrivate.h: Delete evictCodedFrames and isFull, that logic
2891             is not in SourceBuffer.
2892         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2893         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2894         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): Drive-by logging fix.
2895         (WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames): Deleted.
2896         (WebCore::SourceBufferPrivateAVFObjC::isFull): Deleted.
2897
2898         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2899         (WebCore::MockSourceBufferPrivate::evictCodedFrames): Deleted.
2900         (WebCore::MockSourceBufferPrivate::isFull): Deleted.
2901         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2902
2903 2014-08-15  Zalan Bujtas  <zalan@apple.com>
2904
2905         REGRESSION: Parts of the route/route options windows are invisible at maps.google.com
2906         https://bugs.webkit.org/show_bug.cgi?id=135977
2907         <rdar://problem/17961698>
2908
2909         Reviewed by Andreas Kling.
2910
2911         When the style change requires both layout and repaint, the style diff is set to
2912         'layout is needed' (and masks the repaint change) as normally layout is followed by a repaint.
2913         However, in compositing context, layout may not be followed by repaint, so when the style diff
2914         indicates layout, we need to figure out whether it implies repaint too.
2915         This logic should eventually be moved from RenderElement to RenderLayerModelObject/RenderLayer.
2916         -tracked here: webkit.org/b/135990
2917
2918         Test: compositing/cliprect-and-position-change-on-compositing-layer.html
2919
2920         * rendering/RenderElement.cpp:
2921         (WebCore::RenderElement::setNeedsPositionedMovementLayout):
2922         * rendering/style/RenderStyle.cpp:
2923         (WebCore::RenderStyle::changeRequiresLayerRepaint):
2924         (WebCore::RenderStyle::diffRequiresLayerRepaint):
2925         (WebCore::RenderStyle::diffRequiresRepaint): Deleted.
2926         * rendering/style/RenderStyle.h:
2927         * rendering/style/RenderStyleConstants.h:
2928
2929 2014-08-15  Brian J. Burg  <burg@cs.washington.edu>
2930
2931         Web Inspector: rewrite CodeGeneratorInspector to be modular and testable
2932         https://bugs.webkit.org/show_bug.cgi?id=131596
2933
2934         Reviewed by Joseph Pecoraro.
2935
2936         Aside from hooking up the new inspector bindings generator to the build system,
2937         there are a few comingled changes that would be painful to split from the main
2938         patch. Together, these changes make it possible to forward-declare all protocol
2939         enumerations as scoped enums, reducing weird ordering dependencies between domains.
2940
2941         All runtimeCast() methods are now static methods of BindingTraits specializations,
2942         rather than as static methods of the type builder classes.
2943
2944         All protocol enumeration types are scoped enums rather than struct-namespaced enums.
2945
2946         Remove some implicit protocol type and enumeration definitions because they trigger
2947         compiler bugs or introduce unnecessary complexity in the bindings generator.
2948
2949         No new tests, no behavior changed.
2950
2951         * CMakeLists.txt:
2952         * DerivedSources.make: Update script dependencies and the bindings generator script name.
2953
2954         * inspector/CommandLineAPIHost.cpp:
2955         (WebCore::CommandLineAPIHost::inspectImpl): Convert to BindingTraits.
2956
2957         * inspector/InspectorCSSAgent.cpp:
2958         (WebCore::InspectorCSSAgent::detectOrigin):
2959         (WebCore::InspectorCSSAgent::buildArrayForRegions):
2960         * inspector/InspectorCSSAgent.h:
2961         * inspector/InspectorDOMAgent.cpp:
2962         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2963         * inspector/InspectorPageAgent.cpp:
2964         (WebCore::InspectorPageAgent::resourceTypeJson):
2965         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
2966         (WebCore::InspectorPageAgent::getScriptExecutionStatus): Convert to scoped enums.
2967
2968         (WebCore::InspectorPageAgent::buildObjectForFrameTree): Extract FrameResourceTree::Resources
2969         into its own explicitly-defined object type. The new generator does not support implicitly
2970         defining object types as elements of arrays.
2971         * inspector/InspectorPageAgent.h:
2972         * inspector/InspectorReplayAgent.cpp: Disambiguate between internal and protocol types.
2973         (WebCore::buildInspectorObjectForSessionState):
2974         (WebCore::buildInspectorObjectForSegmentState):
2975         (WebCore::InspectorReplayAgent::sessionState):
2976         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
2977         (WebCore::InspectorReplayAgent::frameNavigated):
2978         (WebCore::InspectorReplayAgent::frameDetached):
2979         (WebCore::InspectorReplayAgent::willDispatchEvent):
2980         (WebCore::InspectorReplayAgent::startCapturing):
2981         (WebCore::InspectorReplayAgent::stopCapturing):
2982         (WebCore::InspectorReplayAgent::replayToPosition):
2983         (WebCore::InspectorReplayAgent::replayToCompletion):
2984         (WebCore::InspectorReplayAgent::pausePlayback):
2985         (WebCore::InspectorReplayAgent::cancelPlayback):
2986         (WebCore::InspectorReplayAgent::switchSession):
2987         (WebCore::InspectorReplayAgent::insertSessionSegment):
2988         (WebCore::InspectorReplayAgent::removeSessionSegment):
2989         (WebCore::InspectorReplayAgent::currentReplayState):
2990         (WebCore::InspectorReplayAgent::getAvailableSessions):
2991         (WebCore::InspectorReplayAgent::getSessionData):
2992         (WebCore::InspectorReplayAgent::getSegmentData):
2993         * inspector/InspectorReplayAgent.h:
2994         * inspector/InspectorResourceAgent.cpp:
2995         (WebCore::InspectorResourceAgent::willSendRequest):
2996         * inspector/InspectorStyleSheet.cpp: Convert to scoped enums. Extract CSSProperty::Status
2997         because scoped enums defined in a class scope trigger compiler bugs in GCC 4.8.
2998         (WebCore::buildMediaObject):
2999         (WebCore::InspectorStyle::styleWithProperties): Work around compiler disagreements.
3000         (WebCore::InspectorStyleSheet::create):
3001         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
3002         (WebCore::InspectorStyleSheetForInlineStyle::create):
3003         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
3004         * inspector/InspectorStyleSheet.h:
3005
3006         * inspector/InspectorTimelineAgent.cpp: Convert to scoped enums and BindingTraits.
3007         (WebCore::toProtocol):
3008         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
3009         (WebCore::InspectorTimelineAgent::sendEvent):
3010
3011         * inspector/protocol/CSS.json: Extract CSSProperty::Status.
3012         * inspector/protocol/Page.json: Extract FrameResourceTree::Resources.
3013
3014 2014-08-15  Jer Noble  <jer.noble@apple.com>
3015
3016         [EME][Mac] Adopt AVStreamSession.
3017         https://bugs.webkit.org/show_bug.cgi?id=135983
3018
3019         Reviewed by Eric Carlson.
3020
3021         Add AVStreamDataParsers to a new AVStreamSession instance, and expire that session when asked to release
3022         the session's keys.
3023
3024         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3025         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3026         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
3027         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
3028         (WebCore::CDMSessionMediaSourceAVFObjC::update):
3029
3030 2014-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
3031
3032         Implement snapping behavior for iOS
3033         https://bugs.webkit.org/show_bug.cgi?id=135769
3034
3035         Reviewed by Brent Fulgham.
3036
3037         Added support for snap points on iOS. This entails sending snap points from the web process to the UI process
3038         by encoding and decoding snap points and updating ScrollingTreeOverflowScrollingNodeIOS and WKWebView to support
3039         animation to snap points in the cases of mainframe and overflow scrolling, respectively.
3040
3041         There are no new tests yet -- we'll need to find a way to test this!
3042
3043         * WebCore.exp.in:
3044         * page/scrolling/AsyncScrollingCoordinator.cpp:
3045         (WebCore::setStateScrollingNodeSnapOffsetsAsFloat): Helper functions used to convert LayoutUnits to floats for snap offsets.
3046         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Update snap offsets for mainframe scrolling, as well as the state node.
3047         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Added snap offsets.
3048         * page/scrolling/AxisScrollSnapOffsets.h:
3049         (WebCore::closestSnapOffset): Computes the closest snap offset given a sorted vector of comparable types (e.g. float, LayoutUnit).
3050         * page/scrolling/ScrollingCoordinator.h:
3051         * page/scrolling/ScrollingStateScrollingNode.cpp:
3052         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
3053         (WebCore::ScrollingStateScrollingNode::setHorizontalSnapOffsets):
3054         (WebCore::ScrollingStateScrollingNode::setVerticalSnapOffsets):
3055         * page/scrolling/ScrollingStateScrollingNode.h:
3056         (WebCore::ScrollingStateScrollingNode::horizontalSnapOffsets):
3057         (WebCore::ScrollingStateScrollingNode::verticalSnapOffsets):
3058         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3059         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
3060         * page/scrolling/ScrollingTreeScrollingNode.h:
3061         (WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsets):
3062         (WebCore::ScrollingTreeScrollingNode::verticalSnapOffsets):
3063         * rendering/RenderLayer.cpp:
3064         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Update snap offsets for overflow scrolling.
3065         * rendering/RenderLayerCompositor.cpp:
3066         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Updates the state node's snap offsets for overflow scrolling.
3067
3068 2014-08-15  Dirk Schulze  <krit@webkit.org>
3069
3070         Turn r/rx/ry to presentation attributes
3071         https://bugs.webkit.org/show_bug.cgi?id=135978
3072
3073         Unreviewed typo.
3074
3075         * rendering/svg/RenderSVGEllipse.cpp:
3076         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
3077
3078 2014-08-15  Dirk Schulze  <krit@webkit.org>
3079
3080         Turn r/rx/ry to presentation attributes
3081         https://bugs.webkit.org/show_bug.cgi?id=135978
3082
3083         Reviewed by Dean Jackson.
3084
3085         This follows the patch for width and height presentation attributes and
3086         turns rx, ry and r to presentation attributes as well:
3087
3088         ​http://trac.webkit.org/changeset/171341
3089
3090         Extended existing tests.
3091
3092         * css/CSSComputedStyleDeclaration.cpp:
3093         (WebCore::ComputedStyleExtractor::propertyValue):
3094         * css/CSSParser.cpp:
3095         (WebCore::isSimpleLengthPropertyID):
3096         * css/DeprecatedStyleBuilder.cpp:
3097         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3098         * css/SVGCSSParser.cpp:
3099         (WebCore::CSSParser::parseSVGValue):
3100         * css/SVGCSSPropertyNames.in:
3101         * page/animation/CSSPropertyAnimation.cpp:
3102         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3103         * rendering/style/RenderStyle.h:
3104         * rendering/style/SVGRenderStyle.h:
3105         (WebCore::SVGRenderStyle::setR):
3106         (WebCore::SVGRenderStyle::setRx):
3107         (WebCore::SVGRenderStyle::setRy):
3108         (WebCore::SVGRenderStyle::r):
3109         (WebCore::SVGRenderStyle::rx):
3110         (WebCore::SVGRenderStyle::ry):
3111         * rendering/style/SVGRenderStyleDefs.cpp:
3112         (WebCore::StyleLayoutData::StyleLayoutData):
3113         (WebCore::StyleLayoutData::operator==):
3114         * rendering/style/SVGRenderStyleDefs.h:
3115         * rendering/svg/RenderSVGEllipse.cpp:
3116         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
3117         * rendering/svg/SVGPathData.cpp:
3118         (WebCore::updatePathFromCircleElement):
3119         (WebCore::updatePathFromEllipseElement):
3120         (WebCore::updatePathFromRectElement):
3121         (WebCore::updatePathFromLineElement): Deleted.
3122         * svg/SVGCircleElement.cpp:
3123         (WebCore::SVGCircleElement::svgAttributeChanged):
3124         * svg/SVGElement.cpp:
3125         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3126         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
3127         * svg/SVGEllipseElement.cpp:
3128         (WebCore::SVGEllipseElement::svgAttributeChanged):
3129         * svg/SVGRectElement.cpp:
3130         (WebCore::SVGRectElement::svgAttributeChanged):
3131
3132 2014-08-15  Dirk Schulze  <krit@webkit.org>
3133
3134         Turn cx/cy to presentation attributes
3135         https://bugs.webkit.org/show_bug.cgi?id=135975
3136
3137         Reviewed by Dean Jackson.
3138
3139         This follows the patch for width and height presentation attributes and
3140         turns x and y to presentation attributes as well:
3141
3142         ​http://trac.webkit.org/changeset/171341
3143
3144         Extended existing tests.
3145
3146         * css/CSSComputedStyleDeclaration.cpp:
3147         (WebCore::ComputedStyleExtractor::propertyValue):
3148         * css/CSSParser.cpp:
3149         (WebCore::isSimpleLengthPropertyID):
3150         * css/DeprecatedStyleBuilder.cpp:
3151         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3152         * css/SVGCSSParser.cpp:
3153         (WebCore::CSSParser::parseSVGValue):
3154         * css/SVGCSSPropertyNames.in:
3155         * page/animation/CSSPropertyAnimation.cpp:
3156         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3157         * rendering/style/RenderStyle.h:
3158         * rendering/style/SVGRenderStyle.h:
3159         (WebCore::SVGRenderStyle::setCx):
3160         (WebCore::SVGRenderStyle::setCy):
3161         (WebCore::SVGRenderStyle::cx):
3162         (WebCore::SVGRenderStyle::cy):
3163         * rendering/style/SVGRenderStyleDefs.cpp:
3164         (WebCore::StyleLayoutData::StyleLayoutData):
3165         (WebCore::StyleLayoutData::operator==):
3166         * rendering/style/SVGRenderStyleDefs.h:
3167         * rendering/svg/RenderSVGEllipse.cpp:
3168         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
3169         * rendering/svg/SVGPathData.cpp:
3170         (WebCore::updatePathFromCircleElement):
3171         (WebCore::updatePathFromEllipseElement):
3172         * svg/SVGCircleElement.cpp:
3173         (WebCore::SVGCircleElement::svgAttributeChanged):
3174         (WebCore::SVGCircleElement::selfHasRelativeLengths): Deleted.
3175         * svg/SVGCircleElement.h:
3176         * svg/SVGElement.cpp:
3177         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3178         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
3179         * svg/SVGEllipseElement.cpp:
3180         (WebCore::SVGEllipseElement::svgAttributeChanged):
3181         (WebCore::SVGEllipseElement::selfHasRelativeLengths): Deleted.
3182         * svg/SVGEllipseElement.h:
3183
3184 2014-08-15  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3185
3186         Fix typo in Path comment
3187         https://bugs.webkit.org/show_bug.cgi?id=135960
3188
3189         Reviewed by Alexey Proskuryakov.
3190
3191         No new tests, no change on behavior.
3192
3193         * platform/graphics/Path.h:
3194
3195 2014-08-14  Andreas Kling  <akling@apple.com>
3196
3197         Remove two unused Range functions.
3198         <https://webkit.org/b/135944>
3199
3200         Reviewed by Geoffrey Garen.
3201
3202         * dom/Range.cpp:
3203         (WebCore::Range::maxStartOffset): Deleted.
3204         (WebCore::Range::maxEndOffset): Deleted.
3205         * dom/Range.h:
3206
3207 2014-08-14  Daniel Bates  <dabates@apple.com>
3208
3209         Preserve editing style for -webkit-tap-highlight-color on all ports that enable ENABLE_TOUCH_EVENTS
3210         https://bugs.webkit.org/show_bug.cgi?id=135963
3211
3212         Reviewed by Andy Estes.
3213
3214         Currently we only preserve the CSS property -webkit-tap-highlight-color during editing operations
3215         for iOS. Instead we should preserve it for all ports that enable ENABLE_TOUCH_EVENTS as this CSS
3216         property isn't specific to iOS.
3217
3218         Also added FIXME comment with regards to the CSS property -webkit-composition-fill-color.
3219
3220         * editing/EditingStyle.cpp:
3221
3222 2014-08-14  Benjamin Poulain  <benjamin@webkit.org>
3223
3224         CSS JIT: compile the :empty pseudo class
3225         https://bugs.webkit.org/show_bug.cgi?id=135958
3226
3227         Reviewed by Andreas Kling.
3228
3229         Compile :empty, nothing fancy.
3230
3231         Tests: fast/selectors/empty-basics.html
3232                fast/selectors/empty-long-adjacent-backtracking.html
3233                fast/selectors/empty-adjacent-style-update.html
3234                fast/selectors/empty-style-update.html
3235
3236         * cssjit/SelectorCompiler.cpp:
3237         (WebCore::SelectorCompiler::addPseudoClassType):
3238         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3239         (WebCore::SelectorCompiler::jumpIfElementIsNotEmpty):
3240         (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmpty):
3241         (WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
3242         (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
3243         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
3244         * dom/CharacterData.h:
3245         (WebCore::CharacterData::dataMemoryOffset):
3246         * dom/ContainerNode.h:
3247         (WebCore::ContainerNode::firstChildMemoryOffset):
3248         * dom/Node.h:
3249         (WebCore::Node::flagIsText):
3250
3251 2014-08-14  Wenson Hsieh  <wenson_hsieh@apple.com>
3252
3253         Implement scroll snapping animations on Mac
3254         https://bugs.webkit.org/show_bug.cgi?id=135768
3255
3256         Reviewed by Beth Dakin.
3257
3258         Implementing the scroll snap animations required for snapping in both overflow and mainframe areas on Mac.
3259         Since we receive a series of discrete wheel events, we need to predict the distance we need to traverse,
3260         compute the appropriate snap point, and then compute an animation curve to that location. The snap animations
3261         are split into two types: snapping, which handles letting go of the trackpad with zero velocity, and gliding,
3262         which handles flick gestures. In both cases, sinusoidal curves are used to ease animation to the target
3263         location. In the former case, the initial velocity is low, and increases to a maximum value during the middle
3264         of the animation before decreasing to 0. In the latter case, the curve is computed such that the initial
3265         velocity matches the user's scroll velocity, and the final velocity matches a lower final velocity that is
3266         somewhat arbitrarily computed. (See the FIXME in AxisScrollSnapOffsets::initializeGlideParameters). How the
3267         equations and constants were chosen is described in greater detail in the comments above
3268         AxisScrollSnapOffsets::computeGlideDelta and AxisScrollSnapOffsets::computeSnapDelta. Note that the final
3269         velocity should ideally be equal to 0. However, with this particular curve, this caused the animation to feel
3270         too slow near the snap point.
3271
3272         No tests, since there is no observable change in behavior. Tests will be included when iOS and Mac scrolling
3273         areas hook into this code.
3274
3275         * PlatformMac.cmake:
3276         * WebCore.xcodeproj/project.pbxproj: 
3277         * page/scrolling/AxisScrollSnapOffsets.cpp: 
3278         (WebCore::closestSnapOffset): Computes the closest snap offset given velocity and prdicted destination.
3279         * page/scrolling/AxisScrollSnapOffsets.h:
3280         * platform/mac/AxisScrollSnapAnimator.h: Added.
3281         (WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient):
3282         * platform/mac/AxisScrollSnapAnimator.mm: Added.
3283         (WebCore::toWheelEventStatus): Converts a pair of PlatformWheelEventPhases to a WheelEventStatus.
3284         (WebCore::projectedInertialScrollDistance): Attempts to predict the distance covered by the inertial scrolling phase.
3285         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
3286         (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Updates the internal state of the AxisScrollSnapAnimator, given a PlatformWheelEvent
3287         (WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Determines whether or not we should override a wheel event given the animator's internal state.
3288         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Updates a single loop of the scroll snapping animation.
3289         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation):
3290         (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
3291         (WebCore::AxisScrollSnapAnimator::computeSnapDelta): See comments for more information.
3292         (WebCore::AxisScrollSnapAnimator::computeGlideDelta): See comments for more information.
3293         (WebCore::AxisScrollSnapAnimator::initializeGlideParameters):
3294         (WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta):
3295         (WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta):
3296         (WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow):
3297
3298 2014-08-14  Saam Barati  <sbarati@apple.com>
3299
3300         Allow high fidelity type profiling to be enabled and disabled.
3301         https://bugs.webkit.org/show_bug.cgi?id=135423
3302
3303         Reviewed by Geoffrey Garen.
3304
3305         PageRuntimeAgent and WorkerRuntimeAgent now call their super 
3306         class's (InspectorRuntimeAgent) implementation of willDestroyFrontendAndBackend
3307         to give InspectorRuntimeAgent a chance to recompile all JavaScript
3308         functions, if necessary, for type profiling.
3309
3310         * inspector/PageRuntimeAgent.cpp:
3311         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
3312         * inspector/WorkerRuntimeAgent.cpp:
3313         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
3314
3315 2014-08-14  Brent Fulgham  <bfulgham@apple.com>
3316
3317         [Win] Correct build when DerivedSources location not supplied by build environment
3318         https://bugs.webkit.org/show_bug.cgi?id=135954
3319         <rdar://problem/18023620>
3320
3321         Reviewed by Joseph Pecoraro.
3322
3323         The DerivedSourcesDirectory is not always defined, depending on what
3324         solution is being used to build this project. Instead, just define
3325         it directly, since we already know where it needs to go.
3326
3327         Also:
3328         1. Stop redirecting the copy output to NUL so I can see if this fails in the future.
3329         2. Make sure the target directory exists before copying to it.
3330
3331         * WebCore.vcxproj/copyForwardingHeaders.cmd: Properly specify
3332         the directories for copying the JS file.
3333
3334 2014-08-14  Zoltan Horvath  <zoltan@webkit.org>
3335
3336         [CSS3-Text] Cosmetics on RenderBlockFlow::textAlignmentForLine
3337         https://bugs.webkit.org/show_bug.cgi?id=135940
3338
3339         Reviewed by Darin Adler.
3340
3341         Processing the not CSS3_TEXT case first, and removing an extra whitespace after r172524.
3342
3343         * rendering/RenderBlockLineLayout.cpp:
3344         (WebCore::RenderBlockFlow::textAlignmentForLine):
3345
3346 2014-08-14  Martin Hock  <mhock@apple.com>
3347
3348         IndexedDB should respect SchemeRegistry's database access setting.
3349         https://bugs.webkit.org/show_bug.cgi?id=135890
3350         <rdar://problem/17989469>
3351
3352         Reviewed by Alexey Proskuryakov.
3353
3354         Test: storage/indexeddb/open-db-private-browsing.html
3355
3356         * Modules/indexeddb/IDBFactory.cpp:
3357
3358 2014-08-14  Yoav Weiss  <yoav@yoav.ws>
3359
3360         srcset with w descriptor doesn't behave as expected when sizes is not supported.
3361         https://bugs.webkit.org/show_bug.cgi?id=135935
3362
3363         Reviewed by Dean Jackson.
3364
3365         In current implementation, if sizes is not supported, when authors would write
3366         markup such as `<img src=fallback.jpg srcset="100px.jpg 100w, 400px.jpg 400w">`
3367         the first candidate in srcset would be picked, regardless of its dimensions 
3368         That is likely to be confusing for authors.
3369         Dropping these "not yet supported" candidates is likely to be less confusing,
3370         and will result in the "fallback.jpg" candidate being picked.
3371
3372         No new tests since this change only concerns builds that are built
3373         with the PICTURE_SIZES compile flag turned off.
3374
3375         * html/parser/HTMLSrcsetParser.cpp:
3376         (WebCore::parseDescriptors):
3377         Drop candidates that include either 'w' or 'h' descriptors when the
3378         sizes feature is not supported.
3379
3380 2014-08-14  Antti Koivisto  <antti@apple.com>
3381
3382         Make inherited style and parent renderer references
3383         https://bugs.webkit.org/show_bug.cgi?id=135857
3384
3385         Reviewed by Andreas Kling.
3386
3387         We don't recurse into non-rendered subtrees anymore so they can't be null.
3388         Also stop using Element::renderStyle() as it differs from e->renderer().style() in
3389         some rare cases (that should be fixed).
3390
3391         * style/StyleResolveTree.cpp:
3392         (WebCore::Style::RenderTreePosition::parent):
3393         (WebCore::Style::RenderTreePosition::RenderTreePosition):
3394         (WebCore::Style::RenderTreePosition::canInsert):
3395         (WebCore::Style::RenderTreePosition::insert):
3396         (WebCore::Style::RenderTreePosition::computeNextSibling):
3397         (WebCore::Style::shouldCreateRenderer):
3398         (WebCore::Style::styleForElement):
3399         (WebCore::Style::createRendererIfNeeded):
3400         (WebCore::Style::textRendererIsNeeded):
3401         (WebCore::Style::createTextRendererIfNeeded):
3402         (WebCore::Style::updateTextRendererAfterContentChange):
3403         (WebCore::Style::attachChildren):
3404         (WebCore::