CSSFilterImageValue constructor should require both image and filter.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-12-13  Andreas Kling  <akling@apple.com>
2
3         CSSFilterImageValue constructor should require both image and filter.
4         <https://webkit.org/b/125056>
5
6         Make the CSSFilterImageValue::create() helper take both the image and
7         filter CSSValues by PassRef since they should never be null.
8
9         Tweaked ComputedStyleExtractor::valueForFilter() to return a PassRef
10         for this to work.
11
12         Reviewed by Anders Carlsson.
13
14 2013-12-12  Andreas Kling  <akling@apple.com>
15
16         StyleResolver::adjustRenderStyle() should take RenderStyle references.
17         <https://webkit.org/b/125623>
18
19         This function doesn't handle null styles being passed, so prevent
20         it at compile time.
21
22         Reviewed by Anders Carlsson.
23
24 2013-12-13  Darin Adler  <darin@apple.com>
25
26         Eliminate awkward virtualComputedStyle construction
27         https://bugs.webkit.org/show_bug.cgi?id=125681
28
29         Reviewed by Andreas Kling.
30
31         * dom/Element.cpp:
32         (WebCore::Element::computedStyle): Tweak coding style a bit.
33
34         * dom/Element.h: Marked computedStyle virtual and got rid of virtualComputedStyle.
35         This fixes a bug that we would not call SVGElement::computedStyle if we called
36         it through an Element pointer or reference. Not sure how to get test coverage for this.
37
38         * dom/Node.cpp:
39         (WebCore::Node::computedStyle): Use a loop instead of recursive virtual calls.
40
41         * dom/Node.h: Made computedStyle virtual and got rid of virtualComputedStyle.
42
43         * svg/SVGElement.cpp:
44         (WebCore::SVGElement::computedStyle): Tweak coding style a bit.
45
46         * svg/SVGElement.h: Made computedStyle virtual (and FINAL) and got rid fo
47         virtualComputedStyle.
48
49 2013-12-13  Darin Adler  <darin@apple.com>
50
51         Fix a couple stray uses of RefPtr that should release
52         https://bugs.webkit.org/show_bug.cgi?id=125679
53
54         Reviewed by Andreas Kling.
55
56         * css/CSSParser.cpp:
57         (WebCore::CSSParser::parseFilter): Add calls to release, in
58         one case rearranging the order of operations slightly so we
59         don't release the pointer before using it.
60
61 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
62
63         WebCrypto wrapKey operation doesn't check key usage
64         https://bugs.webkit.org/show_bug.cgi?id=125675
65
66         Reviewed by Darin Adler.
67
68         Tests: crypto/subtle/unwrapKey-check-usage.html
69                crypto/subtle/wrapKey-check-usage.html
70
71         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::wrapKey):
72         Added accidentally omitted code. Other operations are fine.
73
74 2013-12-12  Darin Adler  <darin@apple.com>
75
76         Make some improvements in CSSImageGeneratorValue code
77         https://bugs.webkit.org/show_bug.cgi?id=125676
78
79         Reviewed by Simon Fraser.
80
81         * css/CSSCrossfadeValue.cpp:
82         (WebCore::subimageKnownToBeOpaque): Take a reference to the CSSValue, since
83         it's known not to be null. Used checked cast.
84         (WebCore::CSSCrossfadeValue::knownToBeOpaque): Updated to pass a reference.
85
86         * css/CSSImageGeneratorValue.cpp:
87         (WebCore::CSSImageGeneratorValue::saveCachedImageForSize): Use
88         make_unique instead of adoptPtr.
89         (WebCore::CSSImageGeneratorValue::subimageIsPending): Use checked cast.
90         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto, also
91         use nullptr.
92
93         * css/CSSImageGeneratorValue.h: Removed unneeded includes, added some forward
94         declarations, used unique_ptr instead of OwnPtr, and used CSS_VALUE_TYPE_CASTS
95         macro to create cast functions.
96
97         * css/CSSValue.cpp: Removed unneeded include of CSSImageGeneratorValue.h.
98
99         * css/StyleResolver.cpp:
100         (WebCore::StyleResolver::State::clear): Use nullptr instead of 0.
101         (WebCore::StyleResolver::applyProperty): Use checked cast and pass references
102         instead of pointers to StyleGeneratedImage::create.
103         (WebCore::StyleResolver::styleImage): Use checked cast and pass references
104         instead of pointers to generatedOrPendingFromValue.
105         (WebCore::StyleResolver::generatedOrPendingFromValue): Take the value as a
106         reference instead of a pointer.
107         (WebCore::StyleResolver::loadPendingImage): Pass a refernece instead of a
108         pointer to StyleGeneratedImage::create.
109         (WebCore::StyleResolver::loadPendingImages): Use auto for iteration instead of
110         a lot type name.
111
112         * css/StyleResolver.h: Changed generatedOrPendingFromValue to take the value
113         as a reference instead of a pointer.
114
115         * page/animation/CSSPropertyAnimation.cpp:
116         (WebCore::blendFilter): Pass a reference insted of a pointer to
117         StyleGeneratedImage::create.
118         (WebCore::crossfadeBlend): Ditto.
119         (WebCore::blendFunc): Ditto. Also use references for local variables.
120
121         * rendering/style/StyleGeneratedImage.cpp:
122         (WebCore::StyleGeneratedImage::StyleGeneratedImage): Use PassRef instead of
123         PassRefPtr for the argument type.
124         (WebCore::StyleGeneratedImage::cssValue): Updated since m_imageGeneratorValue
125         is now a Ref instead of a RefPtr. Sadly this requires a const_cast that we can
126         come back and get rid of later.
127         (WebCore::StyleGeneratedImage::imageSize): Ditto.
128         (WebCore::StyleGeneratedImage::image): Ditto.
129
130         * rendering/style/StyleGeneratedImage.h: Changed create function and constructor
131         to take a PassRef. Made imageValue non-const since it returns a non-const value,
132         to be consistent with "conceptual const". Changed m_imageGeneratorValue to be a
133         Ref instead of a RefPtr.
134
135         * rendering/style/StyleImage.h: Made WrappedImagePtr be const void*, since it's
136         a pointer used only for equality checks. Not a great idiom, but fine to use a
137         const pointer instead of non-const, and avoids the const_cast we'd otherwise
138         need in StyleGeneratedImage::data.
139
140 2013-12-12  KyungTae Kim  <ktf.kim@samsung.com>
141
142         Improve the find word boundary performance
143         https://bugs.webkit.org/show_bug.cgi?id=125619
144
145         In endWordBoundary case, the textBreakPrevious call in findWordBoundary is unnecessary.
146         So use separate function for endWordBoundary can improve the performance.
147
148         Reviewed by Darin Adler.
149
150         No tests because no operation changes.
151
152         * editing/VisibleUnits.cpp: Use findEndWordBoundary in endWordBoundary
153         (WebCore::endWordBoundary):
154         * platform/text/TextBoundaries.cpp: Add findEndWordBoundary function
155         (WebCore::findEndWordBoundary):
156         * platform/text/TextBoundaries.h:
157         * platform/text/mac/TextBoundaries.mm: Add findEndWordBoundary function
158         (WebCore::findEndWordBoundary):
159
160 2013-12-12  Benjamin Poulain  <bpoulain@apple.com>
161
162         Fix a silly mistake of r160467
163         https://bugs.webkit.org/show_bug.cgi?id=125657
164
165         Reviewed by Alexey Proskuryakov.
166
167         Fix a typo. The validity check was missing the logical not.
168
169         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
170         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
171         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
172         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
173         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
174         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
175         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
176         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
177         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
178         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
179         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
180         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
181
182 2013-12-12  Tim Horton  <timothy_horton@apple.com>
183
184         [wk2] Handle pinch-to-zoom gesture
185         https://bugs.webkit.org/show_bug.cgi?id=125604
186
187         Reviewed by Simon Fraser.
188
189         * WebCore.exp.in:
190         Export some TransformationMatrix functions.
191
192         * WebCore.xcodeproj/project.pbxproj:
193         Make some headers private so that RenderLayerCompositor/Backing can be used from WebKit2.
194
195         * rendering/RenderLayerCompositor.h:
196         (WebCore::RenderLayerCompositor::layerForContentShadow):
197         Add a getter for the content shadow layer.
198
199 2013-12-12  Brady Eidson  <beidson@apple.com>
200
201         DatabaseProcess IndexedDB: Establish a metadata backing store on disk
202         https://bugs.webkit.org/show_bug.cgi?id=125258
203
204         Reviewed by Alexey Proskuryakov, Anders Carlsson, and Tim Horton.
205
206         Teach CrossThreadCopier how to handle IDBDatabaseMetadata.
207
208         * CMakeLists.txt:
209         * GNUmakefile.list.am:
210         * WebCore.exp.in:
211         * WebCore.xcodeproj/project.pbxproj:
212
213         * Modules/indexeddb/IDBDatabaseMetadata.cpp: Added.
214         (WebCore::IDBDatabaseMetadata::isolatedCopy):
215         (WebCore::IDBObjectStoreMetadata::isolatedCopy):
216         (WebCore::IDBIndexMetadata::isolatedCopy):
217         * Modules/indexeddb/IDBDatabaseMetadata.h:
218
219         * Modules/indexeddb/IDBKeyPath.cpp:
220         (WebCore::IDBKeyPath::isolatedCopy):
221         * Modules/indexeddb/IDBKeyPath.h:
222
223         * platform/CrossThreadCopier.cpp:
224         (WebCore::::copy): Add an IDBDatabaseMetadata specialization.
225         * platform/CrossThreadCopier.h:
226
227 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
228
229         Add support for RSAES-PKCS1-v1_5
230         https://bugs.webkit.org/show_bug.cgi?id=125647
231
232         Build fix.
233
234         * crypto/CommonCryptoUtilities.h: Declare a newly used private constant.
235
236 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
237
238         Add support for RSAES-PKCS1-v1_5
239         https://bugs.webkit.org/show_bug.cgi?id=125647
240
241         Reviewed by Anders Carlsson.
242
243         Tests: crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html
244                crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html
245
246         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
247         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
248         Removed meaningless parameters arguments from private functions. The base arguments
249         class is always empty.
250
251         * WebCore.xcodeproj/project.pbxproj:
252         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
253         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
254         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
255         * bindings/js/JSCryptoKeySerializationJWK.cpp:
256         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
257         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid):
258         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
259         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: Added.
260         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::CryptoAlgorithmRSAES_PKCS1_v1_5):
261         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::~CryptoAlgorithmRSAES_PKCS1_v1_5):
262         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::create):
263         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::identifier):
264         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches):
265         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
266         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
267         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
268         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
269         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h: Added.
270         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp: Added.
271         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
272         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
273         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
274         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
275         Added support for this algorithm.
276
277 2013-12-12  Andreas Kling  <akling@apple.com>
278
279         [Mac] Stop not caching HTTP resources with "Vary" header in response.
280         <https://webkit.org/b/125483>
281         <rdar://problem/11781097>
282
283         Remove the workaround preventing resources with the "Vary" header
284         from going into cache, as the CFNetwork cache has supported this
285         for quite a while now.
286
287         31.5 MB progression on Membuster3, because we can now mmap those
288         resources from disk once they are in the cache.
289
290         We keep the workaround on PLATFORM(WIN) for now.
291
292         Reviewed by Antti Koivisto.
293
294 2013-12-12  Sam Weinig  <sam@webkit.org>
295
296         Replace uses of WTF::BitArray with std::bitset
297         https://bugs.webkit.org/show_bug.cgi?id=125642
298
299         Reviewed by Anders Carlsson.
300
301         * css/CSSParser.cpp:
302         (WebCore::filterProperties):
303         (WebCore::CSSParser::createStyleProperties):
304         * css/StyleProperties.cpp:
305         (WebCore::StyleProperties::asText):
306
307 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
308
309         Public key in a generated KeyPair should always be extractable
310         https://bugs.webkit.org/show_bug.cgi?id=125643
311
312         Reviewed by Sam Weinig.
313
314         The spec doesn't explain how generateKey works with key pairs (there are open bugs
315         about that). Making public keys non-extractable makes no sense one way or another.
316
317         Test: crypto/subtle/rsa-oaep-generate-non-extractable-key.html
318
319         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair):
320
321 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
322
323         Make algorithm.name return registered name, not normalized one
324         https://bugs.webkit.org/show_bug.cgi?id=125641
325
326         Reviewed by Anders Carlsson.
327
328         Currently, WebCrypto editor's draft stipulates that algorithm name is lowercased
329         as part of normalization.
330
331         But it makes little sense to register algorithms as mixed (mostly upper) case, yet
332         return the name lowercased. Other implementations don't bother respecting this,
333         and signs are that the spec will change.
334
335         I'd like to match other implementations here, because sticking to the spec only
336         makes us fail 3rd party test suites for no good reason.
337
338         Updated many existing tests.
339
340         * crypto/CryptoAlgorithmRegistry.cpp:
341         (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
342         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
343         * crypto/CryptoAlgorithmRegistry.h:
344         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
345         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
346         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
347         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
348         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
349         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
350         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
351         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
352         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
353         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
354
355 2013-12-12  Csaba Osztrogonác  <ossy@webkit.org>
356
357         Move CertificateInfo to WebCore
358         https://bugs.webkit.org/show_bug.cgi?id=124720
359
360         Reviewed by Darin Adler.
361
362         Based on the patch by Kwang Yul Seo <skyul@company100.net>
363
364         * GNUmakefile.list.am:
365         * PlatformEfl.cmake:
366         * PlatformGTK.cmake:
367         * WebCore.exp.in:
368         * WebCore.xcodeproj/project.pbxproj:
369         * platform/network/mac/CertificateInfo.h: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.h.
370         (WebCore::CertificateInfo::setCertificateChain): Added, because WebCoreArgumentCoders needs it.
371         * platform/network/mac/CertificateInfoMac.mm: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.mm.
372         (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersMac.mm.
373         * platform/network/soup/CertificateInfo.cpp: Copied from Source/WebKit2/Shared/WebCertificateInfo.h.
374         (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersSoup.cpp.
375         * platform/network/soup/CertificateInfo.h: Renamed from Source/WebKit2/Shared/soup/CertificateInfo.h.
376         (WebCore::CertificateInfo::setCertificate): Added, because WebCoreArgumentCoders needs it.
377         (WebCore::CertificateInfo::setTLSErrors): Added, because WebCoreArgumentCoders needs it.
378
379 2013-12-12  Commit Queue  <commit-queue@webkit.org>
380
381         Unreviewed, rolling out r160417.
382         http://trac.webkit.org/changeset/160417
383         https://bugs.webkit.org/show_bug.cgi?id=125629
384
385         The patch is causing crashes (Requested by zdobersek1 on
386         #webkit).
387
388         * accessibility/AXObjectCache.cpp:
389         (WebCore::AXObjectCache::~AXObjectCache):
390         (WebCore::AXObjectCache::remove):
391         * accessibility/AXObjectCache.h:
392         (WebCore::AXObjectCache::detachWrapper):
393         * accessibility/atk/AXObjectCacheAtk.cpp:
394         (WebCore::AXObjectCache::detachWrapper):
395         (WebCore::AXObjectCache::attachWrapper):
396         (WebCore::AXObjectCache::postPlatformNotification):
397         * accessibility/ios/AXObjectCacheIOS.mm:
398         (WebCore::AXObjectCache::detachWrapper):
399         * accessibility/mac/AXObjectCacheMac.mm:
400         (WebCore::AXObjectCache::detachWrapper):
401         * accessibility/win/AXObjectCacheWin.cpp:
402         (WebCore::AXObjectCache::detachWrapper):
403
404 2013-12-12  Martin Robinson  <mrobinson@igalia.com>
405
406         Remove a few more guards mistakenly added in r160367
407
408         Reviewed by Carlos Garcia Campos
409
410         r160367 was too liberal in hiding APIs from the GObject DOM bindings.
411         We should expose the BatteryManager and the text and audio tracks.
412
413         * Modules/battery/BatteryManager.idl:
414         * html/HTMLMediaElement.idl:
415
416 2013-12-11  Darin Adler  <darin@apple.com>
417
418         StylePendingImage needs to correctly manage the CSSValue pointer lifetime
419         https://bugs.webkit.org/show_bug.cgi?id=125468
420
421         Reviewed by Andreas Kling.
422
423         Test: fast/css/pending-image-crash.xhtml
424
425         Disconnect the reference counted StylePendingImage from the CSSValue that owns
426         it when it's not needed any more, otherwise we could end up using a pointer
427         that might no longer be valid.
428
429         * css/CSSCursorImageValue.cpp:
430         (WebCore::CSSCursorImageValue::detachPendingImage): Added. Calls detachFromCSSValue
431         on the current image if it is a StylePendingImage.
432         (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Call detachPendingImage.
433         (WebCore::CSSCursorImageValue::cachedImage): Call detachPendingImage before changing
434         m_image to a new value.
435         (WebCore::CSSCursorImageValue::clearCachedImage): Ditto.
436         * css/CSSCursorImageValue.h: Added detachPendingImage.
437
438         * css/CSSImageSetValue.cpp:
439         (WebCore::CSSImageSetValue::detachPendingImage): Added. Calls detachFromCSSValue
440         on the current image set if it is a StylePendingImage.
441         (WebCore::CSSImageSetValue::~CSSImageSetValue): Call detachPendingImage.
442         (WebCore::CSSImageSetValue::cachedImageSet): Call detachPendingImage before changing
443         m_imageSet to a new value.
444         * css/CSSImageSetValue.h: Added detachPendingImage.
445
446         * css/CSSImageValue.cpp:
447         (WebCore::CSSImageValue::detachPendingImage): Added. Calls detachFromCSSValue on the
448         current image if it is a StylePendingImage.
449         (WebCore::CSSImageValue::~CSSImageValue): Call detachPendingImage.
450         (WebCore::CSSImageValue::cachedImage): Call detachPendingImage before changing m_image
451         to a new value.
452         * css/CSSImageValue.h: Added detachPendingImage.
453
454         * rendering/style/StylePendingImage.h:
455         (WebCore::StylePendingImage::cssImageValue): Added a null check.
456         (WebCore::StylePendingImage::cssImageGeneratorValue): Added a null check.
457         (WebCore::StylePendingImage::cssCursorImageValue): Added a null check.
458         (WebCore::StylePendingImage::cssImageSetValue): Added a null check.
459         (WebCore::StylePendingImage::detachFromCSSValue): Added. Sets m_value to null since
460         the style is no longer using this StylePendingImage.
461         (WebCore::StylePendingImage::data): Changed to use the "this" pointer since all we
462         need is some arbitrary pointer uniquely identifying the image. Before loading the image,
463         we have no suitable weak identifier, so it suffices to use the unique pointer to each
464         StylePendingImage object. This function is used only in a limited way; it would be nice
465         to find a way to make the code less strange long term.
466
467 2013-12-11  Darin Adler  <darin@apple.com>
468
469         Remove some unneeded code noticed while looking at StylePendingImage
470         https://bugs.webkit.org/show_bug.cgi?id=125618
471
472         Reviewed by Andreas Kling.
473
474         * css/StyleResolver.cpp:
475         (WebCore::StyleResolver::loadPendingImage): Removed redundant function calls.
476
477         * rendering/RenderImageResource.cpp: Removed unneeded nullImage and
478         usesImageContainerSize member functions.
479         (WebCore::RenderImageResource::image): Use Image::nullImage directly instead of
480         through RenderImageResourceImage::nullImage.
481
482         * rendering/RenderImageResource.h: Removed unneeded usesImageContainerSize
483         and nullImage functions. Also removed unneeded includes.
484
485         * rendering/RenderImageResourceStyleImage.h: Removed unneeded
486         usesImageContainerSize override. Nobody was calling it.
487
488 2013-12-11  Benjamin Poulain  <bpoulain@apple.com>
489
490         Add the CFNetwork implementation of the asynchronous ResourceHandle
491         https://bugs.webkit.org/show_bug.cgi?id=124440
492
493         Reviewed by Alexey Proskuryakov.
494
495         Add a second subclass of ResourceHandleCFURLConnectionDelegate: ResourceHandleCFURLConnectionDelegateWithOperationQueue.
496         The difference is those objects handle the network callback on a different queue.
497
498         Some common code has been refactored in ResourceHandleCFURLConnectionDelegate to reduce duplicated code.
499
500         The initialization of the request and connection is moved to the subclass to clean up initialization.
501
502         * WebCore.xcodeproj/project.pbxproj:
503         * platform/network/ResourceHandle.h:
504         * platform/network/ResourceHandleClient.cpp:
505         (WebCore::ResourceHandleClient::willCacheResponseAsync):
506         * platform/network/ResourceHandleClient.h:
507         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: Added.
508         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::ResourceHandleCFURLConnectionDelegateWithOperationQueue):
509         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::~ResourceHandleCFURLConnectionDelegateWithOperationQueue):
510         (WebCore::connectionWasCancelled):
511         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
512         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupConnectionScheduling):
513         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
514         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
515         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
516         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
517         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
518         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
519         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
520         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
521         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
522         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
523         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
524         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillSendRequest):
525         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse):
526         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueShouldUseCredentialStorage):
527         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillCacheResponse):
528         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueCanAuthenticateAgainstProtectionSpace):
529         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h: Copied from Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h.
530         * platform/network/cf/ResourceHandleCFNet.cpp:
531         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
532         (WebCore::ResourceHandle::createCFURLConnection):
533         (WebCore::ResourceHandle::start):
534         (WebCore::ResourceHandle::shouldUseCredentialStorage):
535         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
536         (WebCore::ResourceHandle::continueWillSendRequest):
537         (WebCore::ResourceHandle::continueDidReceiveResponse):
538         (WebCore::ResourceHandle::continueShouldUseCredentialStorage):
539         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
540         (WebCore::ResourceHandle::continueWillCacheResponse):
541         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
542         (WebCore::ResourceHandleCFURLConnectionDelegate::releaseHandle):
543         (WebCore::ResourceHandleCFURLConnectionDelegate::synthesizeRedirectResponseIfNecessary):
544         (WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):
545         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
546         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
547         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
548         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
549         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
550         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillSendRequest):
551         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueDidReceiveResponse):
552         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueShouldUseCredentialStorage):
553         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillCacheResponse):
554         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueCanAuthenticateAgainstProtectionSpace):
555         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
556
557 2013-12-11  David Kilzer  <ddkilzer@apple.com>
558
559         Define m_hasBadParent in InlineBox if defined(ADDRESS_SANITIZER)
560         <http://webkit.org/b/125329>
561
562         Reviewed by Darin Adler.
563
564         No tests since this is a build fix for:
565
566             $ ./Tools/Scripts/build-webkit --release OTHER_CFLAGS="$inherited -DADDRESS_SANITIZER=1"
567
568         * rendering/InlineBox.cpp:
569         * rendering/InlineBox.h:
570         - Replace ASSERT_DISABLED use with
571           ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for m_hasBadParent.
572
573         * rendering/InlineFlowBox.cpp:
574         (WebCore::InlineFlowBox::~InlineFlowBox):
575         - Use !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED instead of
576           #ifndef NDEBUG since this calls setHasBadParent().
577         (WebCore::InlineFlowBox::checkConsistency):
578         - Move ASSERT(!m_hasBadChildList) outside of
579           #if CHECK_CONSISTENCY and change to
580           ASSERT_WITH_SECURITY_IMPLICATION(!m_hasBadChildList).
581
582         * rendering/InlineFlowBox.h:
583         (WebCore::InlineFlowBox::InlineFlowBox):
584         (WebCore::InlineFlowBox::setHasBadChildList):
585         - Change #ifndef NDEBUG to
586           #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for code using
587           m_hasBadChildList.
588
589 2013-12-11  Ralph Thomas  <ralpht@gmail.com>
590
591         [WebGL] Fix build on GL ES 2.0 targets after r160119
592         https://bugs.webkit.org/show_bug.cgi?id=125541
593
594         Reviewed by Brent Fulgham.
595
596         GL ES 2.0 doesn't define GL_HALF_FLOAT_ARB, so pass through HALF_FLOAT_OES (which is defined for GL ES 2.0).
597         This change also reverts r160324 which incorrectly defined GL_HALF_FLOAT_ARB for the Windows ANGLE target.
598
599         No new tests, no change in functionality.
600
601         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
602         (WebCore::GraphicsContext3D::texSubImage2D):
603
604 2013-12-11  Joseph Pecoraro  <pecoraro@apple.com>
605
606         Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore
607         https://bugs.webkit.org/show_bug.cgi?id=125324
608
609         Reviewed by Timothy Hatcher.
610
611         Part 1: Push down core inspector classes.
612
613           - Move InspectAgentBase, InspectorAgentRegistry, InspectorBackendDispatcher, InspectorValues
614             down to JavaScriptCore and into the Inspector namespace.
615           - Add forwarding headers for JavaScriptCore/inspector files.
616           - Use the Inspector namespace where appropriate.
617           - Rename InspectorBaseAgent to InspectorAgentBase for clarity.
618
619         Part 2: Push Script wrapper classes down into JavaScriptCore/bindings.
620
621           - Move ScriptObject and ScriptValue into JavaScriptCore but namespace Deprecated
622           - Add forwarding headers
623           - Use Deprecated::ScriptObject and Deprecated::ScriptValue everywhere.
624
625         Part 3: Push Down ScriptFunctionCall
626
627           - Move ScriptFunctionCall to JavaScriptCore/bindings into namespace Deprecated.
628           - Give constructor a function to all for a different JSC::call, because
629             WebCore ScriptFunctionCall's use JSMainThreadExecState when isMainThread.
630           - Prefer Deprecated::ScriptFunctionCall everywhere it is used in WebCore.
631
632         Part 4: Extract InspectorTypeBuilder helper functions
633
634           - There is a chunk of InspectorTypeBuilder that never changes. Extract it into
635             its own file, InspectorTypeBuilder.h in JSC/inspector, Inspector namespace.
636           - This moves TypeBuilder from namespace WebCore to namespace Inspector
637           - Rename the WebCore generated InspectorTypeBuilder to InspectorWebTypeBuilders,
638             eventually the CodeGenerator script will do this for more then TypeBuilders
639             and there will be "JS" TypeBuilders and "Web" TypeBuilders files.
640
641         No new tests. No change in functionality, just moving things around.
642
643         * CMakeLists.txt:
644         * ForwardingHeaders/bindings/ScriptFunctionCall.h: Added.
645         * ForwardingHeaders/bindings/ScriptObject.h: Added.
646         * ForwardingHeaders/bindings/ScriptValue.h: Added.
647         * ForwardingHeaders/inspector/InspectorAgentBase.h: Added.
648         * ForwardingHeaders/inspector/InspectorAgentRegistry.h: Added.
649         * ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Added.
650         * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Added.
651         * ForwardingHeaders/inspector/InspectorValues.h: Added.
652         * GNUmakefile.am:
653         * GNUmakefile.list.am:
654         * Modules/indexeddb/IDBAny.cpp:
655         (WebCore::IDBAny::scriptValue):
656         (WebCore::IDBAny::IDBAny):
657         * Modules/indexeddb/IDBAny.h:
658         * Modules/indexeddb/IDBCursor.cpp:
659         (WebCore::IDBCursor::key):
660         (WebCore::IDBCursor::primaryKey):
661         (WebCore::IDBCursor::value):
662         (WebCore::IDBCursor::update):
663         (WebCore::IDBCursor::continueFunction):
664         (WebCore::IDBCursor::setValueReady):
665         * Modules/indexeddb/IDBCursor.h:
666         * Modules/indexeddb/IDBFactory.cpp:
667         (WebCore::IDBFactory::cmp):
668         * Modules/indexeddb/IDBFactory.h:
669         * Modules/indexeddb/IDBIndex.cpp:
670         (WebCore::IDBIndex::openCursor):
671         (WebCore::IDBIndex::count):
672         (WebCore::IDBIndex::openKeyCursor):
673         (WebCore::IDBIndex::get):
674         (WebCore::IDBIndex::getKey):
675         * Modules/indexeddb/IDBIndex.h:
676         (WebCore::IDBIndex::openCursor):
677         (WebCore::IDBIndex::openKeyCursor):
678         * Modules/indexeddb/IDBKeyRange.cpp:
679         (WebCore::IDBKeyRange::lowerValue):
680         (WebCore::IDBKeyRange::upperValue):
681         (WebCore::IDBKeyRange::only):
682         (WebCore::IDBKeyRange::lowerBound):
683         (WebCore::IDBKeyRange::upperBound):
684         (WebCore::IDBKeyRange::bound):
685         * Modules/indexeddb/IDBKeyRange.h:
686         (WebCore::IDBKeyRange::lowerBound):
687         (WebCore::IDBKeyRange::upperBound):
688         (WebCore::IDBKeyRange::bound):
689         * Modules/indexeddb/IDBObjectStore.cpp:
690         (WebCore::IDBObjectStore::get):
691         (WebCore::generateIndexKeysForValue):
692         (WebCore::IDBObjectStore::add):
693         (WebCore::IDBObjectStore::put):
694         (WebCore::IDBObjectStore::deleteFunction):
695         (WebCore::IDBObjectStore::openCursor):
696         (WebCore::IDBObjectStore::count):
697         * Modules/indexeddb/IDBObjectStore.h:
698         * Modules/indexeddb/IDBRequest.cpp:
699         (WebCore::IDBRequest::setResultCursor):
700         (WebCore::IDBRequest::onSuccess):
701         (WebCore::IDBRequest::onSuccessInternal):
702         * Modules/indexeddb/IDBRequest.h:
703         * Modules/mediastream/CapabilityRange.cpp:
704         (WebCore::scriptValue):
705         (WebCore::CapabilityRange::min):
706         (WebCore::CapabilityRange::max):
707         * Modules/mediastream/CapabilityRange.h:
708         * Modules/mediastream/MediaTrackConstraint.h:
709         * Modules/mediastream/RTCIceCandidate.cpp:
710         * Modules/plugins/QuickTimePluginReplacement.cpp:
711         * Modules/plugins/QuickTimePluginReplacement.h:
712         * UseJSC.cmake:
713         * WebCore.exp.in:
714         * WebCore.vcxproj/WebCore.vcxproj:
715         * WebCore.vcxproj/WebCore.vcxproj.filters:
716         * WebCore.xcodeproj/project.pbxproj:
717         * bindings/js/Dictionary.h:
718         (WebCore::Dictionary::getEventListener):
719         * bindings/js/IDBBindingUtilities.cpp:
720         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
721         (WebCore::injectIDBKeyIntoScriptValue):
722         (WebCore::canInjectIDBKeyIntoScriptValue):
723         (WebCore::deserializeIDBValue):
724         (WebCore::deserializeIDBValueBuffer):
725         (WebCore::idbKeyToScriptValue):
726         (WebCore::scriptValueToIDBKey):
727         * bindings/js/IDBBindingUtilities.h:
728         * bindings/js/JSBindingsAllInOne.cpp:
729         * bindings/js/JSDictionary.cpp:
730         (WebCore::JSDictionary::convertValue):
731         * bindings/js/JSDictionary.h:
732         * bindings/js/JSHTMLCanvasElementCustom.cpp:
733         (WebCore::JSHTMLCanvasElement::getContext):
734         * bindings/js/JSInjectedScriptHostCustom.cpp:
735         (WebCore::InjectedScriptHost::scriptValueAsNode):
736         (WebCore::InjectedScriptHost::nodeAsScriptValue):
737         (WebCore::JSInjectedScriptHost::inspectedObject):
738         (WebCore::JSInjectedScriptHost::inspect):
739         * bindings/js/JSInjectedScriptManager.cpp:
740         (WebCore::InjectedScriptManager::createInjectedScript):
741         * bindings/js/JSMainThreadExecState.cpp:
742         (WebCore::functionCallHandlerFromAnyThread):
743         * bindings/js/JSMainThreadExecState.h:
744         (WebCore::JSMainThreadExecState::currentState):
745         * bindings/js/JSMessageEventCustom.cpp:
746         (WebCore::JSMessageEvent::data):
747         (WebCore::handleInitMessageEvent):
748         * bindings/js/ScheduledAction.cpp:
749         * bindings/js/ScriptCallStackFactory.cpp:
750         (WebCore::createScriptArguments):
751         * bindings/js/ScriptController.cpp:
752         (WebCore::ScriptController::evaluateInWorld):
753         (WebCore::ScriptController::evaluate):
754         (WebCore::ScriptController::executeScriptInWorld):
755         (WebCore::ScriptController::executeScript):
756         (WebCore::ScriptController::executeIfJavaScriptURL):
757         * bindings/js/ScriptController.h:
758         * bindings/js/ScriptDebugServer.cpp:
759         (WebCore::ScriptDebugServer::setScriptSource):
760         (WebCore::ScriptDebugServer::updateCallStack):
761         (WebCore::ScriptDebugServer::dispatchDidPause):
762         (WebCore::ScriptDebugServer::runScript):
763         * bindings/js/ScriptDebugServer.h:
764         * bindings/js/ScriptGlobalObject.cpp: Renamed from Source/WebCore/bindings/js/ScriptObject.cpp.
765         (WebCore::handleException):
766         (WebCore::ScriptGlobalObject::set):
767         (WebCore::ScriptGlobalObject::get):
768         (WebCore::ScriptGlobalObject::remove):
769         * bindings/js/ScriptGlobalObject.h: Copied from Source/WebCore/inspector/ScriptCallStack.h.
770         (WebCore::ScriptGlobalObject::ScriptGlobalObject):
771         * bindings/js/ScriptObject.h: Removed.
772         * bindings/js/ScriptProfile.cpp:
773         (WebCore::buildInspectorObjectFor):
774         (WebCore::ScriptProfile::buildInspectorObjectForHead):
775         (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
776         * bindings/js/ScriptProfile.h:
777         * bindings/js/ScriptProfiler.cpp:
778         (WebCore::ScriptProfiler::objectByHeapObjectId):
779         (WebCore::ScriptProfiler::getHeapObjectId):
780         * bindings/js/ScriptProfiler.h:
781         * bindings/js/ScriptState.h:
782         * bindings/js/SerializedScriptValue.cpp:
783         (WebCore::SerializedScriptValue::deserializeForInspector):
784         (WebCore::SerializedScriptValue::serialize):
785         (WebCore::SerializedScriptValue::deserialize):
786         * bindings/js/SerializedScriptValue.h:
787         * bindings/js/WorkerScriptController.cpp:
788         (WebCore::WorkerScriptController::evaluate):
789         (WebCore::WorkerScriptController::setException):
790         * bindings/js/WorkerScriptController.h:
791         * bindings/scripts/CodeGeneratorJS.pm:
792         * bindings/scripts/test/JS/JSTestObj.cpp:
793         (WebCore::setJSTestObjAnyAttribute):
794         * dom/CustomEvent.cpp:
795         (WebCore::CustomEvent::initCustomEvent):
796         * dom/CustomEvent.h:
797         (WebCore::CustomEvent::detail):
798         * dom/MessageEvent.cpp:
799         (WebCore::MessageEvent::MessageEvent):
800         (WebCore::MessageEvent::initMessageEvent):
801         * dom/MessageEvent.h:
802         (WebCore::MessageEvent::create):
803         (WebCore::MessageEvent::dataAsScriptValue):
804         * dom/PopStateEvent.h:
805         (WebCore::PopStateEvent::state):
806         * dom/ScriptElement.cpp:
807         * html/HTMLMediaElement.cpp:
808         * html/parser/XSSAuditor.cpp:
809         * html/parser/XSSAuditorDelegate.cpp:
810         * inspector/CodeGeneratorInspector.py:
811         (RawTypes.BaseType.get_raw_validator_call_text):
812         (RawTypes.Object.get_array_item_raw_c_type_text):
813         (RawTypes.Any.get_array_item_raw_c_type_text):
814         (RawTypes.Array.get_array_item_raw_c_type_text):
815         (CommandReturnPassModel.OptOutput.get_return_var_type):
816         (CommandReturnPassModel.OptOutput.get_output_parameter_type):
817         (TypeModel.ExactlyInt.get_input_param_type_text):
818         (TypeModel.ExactlyInt.get_opt_output_type_):
819         (TypeModel.init_class):
820         (TypeBindings.create_named_type_declaration.Helper):
821         (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
822         (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern):
823         (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder):
824         (Inspector):
825         (ArrayBinding.get_array_item_c_type_text):
826         (Generator.go):
827         (Generator.process_command):
828         * inspector/CodeGeneratorInspectorStrings.py:
829         (void):
830         (InspectorFrontend_h):
831         (InspectorBackendDispatchers_h):
832         * inspector/ConsoleMessage.cpp:
833         (WebCore::messageSourceValue):
834         (WebCore::messageTypeValue):
835         (WebCore::messageLevelValue):
836         (WebCore::ConsoleMessage::addToFrontend):
837         * inspector/ConsoleMessage.h:
838         * inspector/ContentSearchUtils.cpp:
839         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
840         (WebCore::ContentSearchUtils::searchInTextByLines):
841         * inspector/ContentSearchUtils.h:
842         * inspector/InjectedScript.cpp:
843         (WebCore::InjectedScript::InjectedScript):
844         (WebCore::InjectedScript::evaluate):
845         (WebCore::InjectedScript::callFunctionOn):
846         (WebCore::InjectedScript::evaluateOnCallFrame):
847         (WebCore::InjectedScript::getFunctionDetails):
848         (WebCore::InjectedScript::getProperties):
849         (WebCore::InjectedScript::getInternalProperties):
850         (WebCore::InjectedScript::nodeForObjectId):
851         (WebCore::InjectedScript::releaseObject):
852         (WebCore::InjectedScript::wrapCallFrames):
853         (WebCore::InjectedScript::wrapObject):
854         (WebCore::InjectedScript::wrapTable):
855         (WebCore::InjectedScript::wrapNode):
856         (WebCore::InjectedScript::findObjectById):
857         (WebCore::InjectedScript::inspectNode):
858         (WebCore::InjectedScript::releaseObjectGroup):
859         (WebCore::InjectedScript::nodeAsScriptValue):
860         * inspector/InjectedScript.h:
861         * inspector/InjectedScriptBase.cpp:
862         (WebCore::InjectedScriptBase::InjectedScriptBase):
863         (WebCore::InjectedScriptBase::initialize):
864         (WebCore::InjectedScriptBase::injectedScriptObject):
865         (WebCore::InjectedScriptBase::callFunctionWithEvalEnabled):
866         (WebCore::InjectedScriptBase::makeCall):
867         (WebCore::InjectedScriptBase::makeEvalCall):
868         * inspector/InjectedScriptBase.h:
869         * inspector/InjectedScriptCanvasModule.cpp:
870         (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
871         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
872         (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
873         (WebCore::InjectedScriptCanvasModule::markFrameEnd):
874         (WebCore::InjectedScriptCanvasModule::callStartCapturingFunction):
875         (WebCore::InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument):
876         (WebCore::InjectedScriptCanvasModule::traceLog):
877         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
878         (WebCore::InjectedScriptCanvasModule::resourceInfo):
879         (WebCore::InjectedScriptCanvasModule::resourceState):
880         * inspector/InjectedScriptCanvasModule.h:
881         * inspector/InjectedScriptHost.cpp:
882         (WebCore::InjectedScriptHost::inspectImpl):
883         (WebCore::InjectedScriptHost::InspectableObject::get):
884         * inspector/InjectedScriptHost.h:
885         * inspector/InjectedScriptManager.cpp:
886         (WebCore::InjectedScriptManager::injectedScriptFor):
887         * inspector/InjectedScriptManager.h:
888         * inspector/InjectedScriptModule.cpp:
889         (WebCore::InjectedScriptModule::ensureInjected):
890         * inspector/InspectorAgent.cpp:
891         (WebCore::InspectorAgent::InspectorAgent):
892         (WebCore::InspectorAgent::didCreateFrontendAndBackend):
893         (WebCore::InspectorAgent::inspect):
894         * inspector/InspectorAgent.h:
895         * inspector/InspectorAllInOne.cpp:
896         * inspector/InspectorApplicationCacheAgent.cpp:
897         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
898         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
899         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
900         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
901         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
902         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
903         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
904         * inspector/InspectorApplicationCacheAgent.h:
905         * inspector/InspectorCSSAgent.cpp:
906         (WebCore::SelectorProfile::toInspectorObject):
907         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
908         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
909         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
910         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
911         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
912         (WebCore::InspectorCSSAgent::getAllStyleSheets):
913         (WebCore::InspectorCSSAgent::getStyleSheet):
914         (WebCore::InspectorCSSAgent::setStyleText):
915         (WebCore::InspectorCSSAgent::setPropertyText):
916         (WebCore::InspectorCSSAgent::toggleProperty):
917         (WebCore::InspectorCSSAgent::setRuleSelector):
918         (WebCore::InspectorCSSAgent::addRule):
919         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
920         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
921         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
922         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
923         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
924         (WebCore::InspectorCSSAgent::collectStyleSheets):
925         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
926         (WebCore::InspectorCSSAgent::detectOrigin):
927         (WebCore::InspectorCSSAgent::buildObjectForRule):
928         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
929         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
930         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
931         (WebCore::InspectorCSSAgent::buildArrayForRegions):
932         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
933         * inspector/InspectorCSSAgent.h:
934         * inspector/InspectorCanvasAgent.cpp:
935         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
936         (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
937         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
938         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
939         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
940         (WebCore::InspectorCanvasAgent::injectedScriptCanvasModule):
941         * inspector/InspectorCanvasAgent.h:
942         * inspector/InspectorCanvasInstrumentation.h:
943         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
944         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
945         * inspector/InspectorClient.cpp:
946         * inspector/InspectorClient.h:
947         * inspector/InspectorConsoleAgent.cpp:
948         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
949         (WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend):
950         (WebCore::InspectableHeapObject::get):
951         * inspector/InspectorConsoleAgent.h:
952         * inspector/InspectorController.cpp:
953         * inspector/InspectorController.h:
954         * inspector/InspectorDOMAgent.cpp:
955         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
956         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
957         (WebCore::InspectorDOMAgent::getDocument):
958         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
959         (WebCore::InspectorDOMAgent::querySelectorAll):
960         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
961         (WebCore::InspectorDOMAgent::getEventListenersForNode):
962         (WebCore::InspectorDOMAgent::getSearchResults):
963         (WebCore::InspectorDOMAgent::resolveNode):
964         (WebCore::InspectorDOMAgent::getAttributes):
965         (WebCore::InspectorDOMAgent::buildObjectForNode):
966         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
967         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
968         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
969         (WebCore::InspectorDOMAgent::didCommitLoad):
970         (WebCore::InspectorDOMAgent::didInsertDOMNode):
971         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
972         * inspector/InspectorDOMAgent.h:
973         * inspector/InspectorDOMDebuggerAgent.cpp:
974         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
975         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
976         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
977         * inspector/InspectorDOMDebuggerAgent.h:
978         * inspector/InspectorDOMStorageAgent.cpp:
979         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
980         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
981         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
982         (WebCore::InspectorDOMStorageAgent::storageId):
983         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
984         * inspector/InspectorDOMStorageAgent.h:
985         * inspector/InspectorDatabaseAgent.cpp:
986         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
987         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
988         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
989         * inspector/InspectorDatabaseAgent.h:
990         * inspector/InspectorDatabaseResource.cpp:
991         (WebCore::InspectorDatabaseResource::bind):
992         * inspector/InspectorDebuggerAgent.cpp:
993         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
994         (WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend):
995         (WebCore::breakpointActionTypeForString):
996         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
997         (WebCore::InspectorDebuggerAgent::setBreakpoint):
998         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
999         (WebCore::scriptToInspectorObject):
1000         (WebCore::InspectorDebuggerAgent::searchInContent):
1001         (WebCore::InspectorDebuggerAgent::setScriptSource):
1002         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
1003         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
1004         (WebCore::InspectorDebuggerAgent::compileScript):
1005         (WebCore::InspectorDebuggerAgent::runScript):
1006         (WebCore::InspectorDebuggerAgent::currentCallFrames):
1007         (WebCore::InspectorDebuggerAgent::didParseSource):
1008         (WebCore::InspectorDebuggerAgent::didPause):
1009         (WebCore::InspectorDebuggerAgent::didContinue):
1010         (WebCore::InspectorDebuggerAgent::clear):
1011         * inspector/InspectorDebuggerAgent.h:
1012         * inspector/InspectorForwarding.h:
1013         * inspector/InspectorFrontendClientLocal.cpp:
1014         (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
1015         * inspector/InspectorFrontendHost.cpp:
1016         (WebCore::FrontendMenuProvider::create):
1017         (WebCore::FrontendMenuProvider::disconnect):
1018         (WebCore::FrontendMenuProvider::FrontendMenuProvider):
1019         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
1020         (WebCore::FrontendMenuProvider::contextMenuCleared):
1021         (WebCore::InspectorFrontendHost::showContextMenu):
1022         * inspector/InspectorHeapProfilerAgent.cpp:
1023         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
1024         (WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend):
1025         (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
1026         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
1027         (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
1028         (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
1029         * inspector/InspectorHeapProfilerAgent.h:
1030         * inspector/InspectorIndexedDBAgent.cpp:
1031         (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
1032         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
1033         * inspector/InspectorIndexedDBAgent.h:
1034         * inspector/InspectorInputAgent.cpp:
1035         (WebCore::InspectorInputAgent::InspectorInputAgent):
1036         (WebCore::InspectorInputAgent::didCreateFrontendAndBackend):
1037         * inspector/InspectorInputAgent.h:
1038         * inspector/InspectorInstrumentation.cpp:
1039         * inspector/InspectorInstrumentation.h:
1040         * inspector/InspectorLayerTreeAgent.cpp:
1041         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
1042         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
1043         (WebCore::InspectorLayerTreeAgent::layersForNode):
1044         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
1045         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
1046         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1047         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
1048         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
1049         * inspector/InspectorLayerTreeAgent.h:
1050         * inspector/InspectorMemoryAgent.cpp:
1051         (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
1052         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
1053         * inspector/InspectorMemoryAgent.h:
1054         * inspector/InspectorOverlay.cpp:
1055         * inspector/InspectorOverlay.h:
1056         * inspector/InspectorPageAgent.cpp:
1057         (WebCore::InspectorPageAgent::resourceTypeJson):
1058         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
1059         (WebCore::InspectorPageAgent::InspectorPageAgent):
1060         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
1061         (WebCore::buildObjectForCookie):
1062         (WebCore::buildArrayForCookies):
1063         (WebCore::InspectorPageAgent::getCookies):
1064         (WebCore::InspectorPageAgent::getResourceTree):
1065         (WebCore::InspectorPageAgent::searchInResource):
1066         (WebCore::buildObjectForSearchResult):
1067         (WebCore::InspectorPageAgent::searchInResources):
1068         (WebCore::InspectorPageAgent::buildObjectForFrame):
1069         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
1070         * inspector/InspectorPageAgent.h:
1071         * inspector/InspectorProfilerAgent.cpp:
1072         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1073         (WebCore::InspectorProfilerAgent::createProfileHeader):
1074         (WebCore::InspectorProfilerAgent::createSnapshotHeader):
1075         (WebCore::InspectorProfilerAgent::getProfileHeaders):
1076         (WebCore::InspectorProfilerAgent::getCPUProfile):
1077         (WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend):
1078         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
1079         (WebCore::InspectorProfilerAgent::getHeapObjectId):
1080         * inspector/InspectorProfilerAgent.h:
1081         * inspector/InspectorResourceAgent.cpp:
1082         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
1083         (WebCore::buildObjectForTiming):
1084         (WebCore::buildObjectForResourceRequest):
1085         (WebCore::buildObjectForResourceResponse):
1086         (WebCore::buildObjectForCachedResource):
1087         (WebCore::InspectorResourceAgent::willSendRequest):
1088         (WebCore::InspectorResourceAgent::didReceiveResponse):
1089         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1090         (WebCore::InspectorResourceAgent::buildInitiatorObject):
1091         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
1092         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
1093         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
1094         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
1095         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
1096         * inspector/InspectorResourceAgent.h:
1097         * inspector/InspectorRuntimeAgent.cpp:
1098         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
1099         (WebCore::buildErrorRangeObject):
1100         (WebCore::InspectorRuntimeAgent::parse):
1101         (WebCore::InspectorRuntimeAgent::evaluate):
1102         (WebCore::InspectorRuntimeAgent::callFunctionOn):
1103         (WebCore::InspectorRuntimeAgent::getProperties):
1104         * inspector/InspectorRuntimeAgent.h:
1105         * inspector/InspectorStyleSheet.cpp:
1106         (WebCore::buildSourceRangeObject):
1107         (WebCore::buildMediaObject):
1108         (WebCore::fillMediaListChain):
1109         (WebCore::InspectorStyle::buildObjectForStyle):
1110         (WebCore::InspectorStyle::buildArrayForComputedStyle):
1111         (WebCore::InspectorStyle::styleWithProperties):
1112         (WebCore::InspectorStyleSheet::create):
1113         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
1114         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
1115         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
1116         (WebCore::selectorsFromSource):
1117         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
1118         (WebCore::InspectorStyleSheet::buildObjectForRule):
1119         (WebCore::InspectorStyleSheet::buildObjectForStyle):
1120         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
1121         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
1122         (WebCore::InspectorStyleSheetForInlineStyle::create):
1123         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
1124         * inspector/InspectorStyleSheet.h:
1125         (WebCore::InspectorCSSId::InspectorCSSId):
1126         (WebCore::InspectorStyleSheet::canBind):
1127         * inspector/InspectorStyleTextEditor.cpp:
1128         * inspector/InspectorTimelineAgent.cpp:
1129         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
1130         (WebCore::toProtocol):
1131         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1132         (WebCore::InspectorTimelineAgent::setDOMCounters):
1133         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1134         (WebCore::InspectorTimelineAgent::sendEvent):
1135         * inspector/InspectorTimelineAgent.h:
1136         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
1137         * inspector/InspectorWebAgentBase.h: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.h.
1138         (WebCore::InspectorAgentBase::InspectorAgentBase):
1139         * inspector/InspectorWorkerAgent.cpp:
1140         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
1141         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
1142         * inspector/InspectorWorkerAgent.h:
1143         * inspector/InstrumentingAgents.cpp:
1144         * inspector/NetworkResourcesData.cpp:
1145         * inspector/PageConsoleAgent.cpp:
1146         (WebCore::InspectableNode::get):
1147         * inspector/PageDebuggerAgent.cpp:
1148         * inspector/PageDebuggerAgent.h:
1149         * inspector/PageRuntimeAgent.cpp:
1150         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
1151         * inspector/PageRuntimeAgent.h:
1152         * inspector/ScriptArguments.cpp:
1153         (WebCore::ScriptArguments::create):
1154         (WebCore::ScriptArguments::ScriptArguments):
1155         (WebCore::ScriptArguments::argumentAt):
1156         (WebCore::ScriptArguments::getFirstArgumentAsString):
1157         * inspector/ScriptArguments.h:
1158         * inspector/ScriptCallFrame.cpp:
1159         (WebCore::ScriptCallFrame::buildInspectorObject):
1160         * inspector/ScriptCallFrame.h:
1161         * inspector/ScriptCallStack.cpp:
1162         (WebCore::ScriptCallStack::buildInspectorArray):
1163         * inspector/ScriptCallStack.h:
1164         * inspector/ScriptDebugListener.h:
1165         * inspector/TimelineRecordFactory.cpp:
1166         * inspector/TimelineRecordFactory.h:
1167         (WebCore::TimelineRecordFactory::createWebSocketCreateData):
1168         (WebCore::TimelineRecordFactory::createGenericWebSocketData):
1169         * inspector/WorkerConsoleAgent.cpp:
1170         * inspector/WorkerDebuggerAgent.cpp:
1171         * inspector/WorkerInspectorController.cpp:
1172         * inspector/WorkerInspectorController.h:
1173         * inspector/WorkerRuntimeAgent.cpp:
1174         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
1175         * inspector/WorkerRuntimeAgent.h:
1176         * page/Console.cpp:
1177         * page/ContentSecurityPolicy.cpp:
1178         * page/Frame.cpp:
1179         * page/PageConsole.cpp:
1180         * plugins/PluginView.cpp:
1181         (WebCore::PluginView::performRequest):
1182         * testing/Internals.cpp:
1183         (WebCore::Internals::parserMetaData):
1184         * testing/Internals.h:
1185         * workers/SharedWorkerGlobalScope.cpp:
1186         (WebCore::createConnectEvent):
1187         * workers/WorkerGlobalScope.cpp:
1188         (WebCore::WorkerGlobalScope::importScripts):
1189         * workers/WorkerThread.cpp:
1190         * xml/XMLTreeViewer.cpp:
1191         * xml/parser/XMLDocumentParser.cpp:
1192         * xml/parser/XMLDocumentParserLibxml2.cpp:
1193
1194 2013-12-11  Laszlo Vidacs  <lac@inf.u-szeged.hu>
1195
1196         Store SHA1 hash in std::array
1197         https://bugs.webkit.org/show_bug.cgi?id=125446
1198
1199         Reviewed by Darin Adler.
1200
1201         Change Vector to std::array and use typedef.
1202
1203         * Modules/websockets/WebSocketHandshake.cpp:
1204         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
1205         * inspector/DOMPatchSupport.cpp:
1206         (WebCore::DOMPatchSupport::createDigest):
1207         * platform/network/soup/ResourceHandleSoup.cpp:
1208         (WebCore::HostTLSCertificateSet::computeCertificateHash):
1209
1210 2013-12-11  Alexey Proskuryakov  <ap@apple.com>
1211
1212         WebCrypto keys should support structured clone
1213         https://bugs.webkit.org/show_bug.cgi?id=125590
1214
1215         Reviewed by Oliver Hunt.
1216
1217         Tests: crypto/subtle/aes-postMessage.html
1218                crypto/subtle/hmac-postMessage.html
1219                crypto/subtle/postMessage-worker.html
1220                crypto/subtle/rsa-postMessage.html
1221
1222         * crypto/CryptoAlgorithmIdentifier.h:
1223         (WebCore::CryptoAlgorithmIdentifier):
1224         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
1225         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
1226         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
1227         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
1228         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
1229         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
1230         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
1231         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
1232         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
1233         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
1234         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
1235         AES_KW was added to WebCrypto spec editor's draft yesterday night. Now that we're
1236         adding a matching enum for structired clone serialization, it's as good a time as
1237         any to update the order of values to match.
1238
1239         * bindings/js/SerializedScriptValue.cpp:
1240         (WebCore::countUsages):
1241         (WebCore::CloneSerializer::dumpIfTerminal):
1242         (WebCore::CloneSerializer::write):
1243         (WebCore::CloneDeserializer::read):
1244         (WebCore::CloneDeserializer::readHMACKey):
1245         (WebCore::CloneDeserializer::readAESKey):
1246         (WebCore::CloneDeserializer::readRSAKey):
1247         (WebCore::CloneDeserializer::readCryptoKey):
1248         (WebCore::CloneDeserializer::readTerminal):
1249         Added serialization/deserialization for CryptoKey. This doesn't update version
1250         number, because we don't currently store structured clones in persistent storage -
1251         and even if we did, we wouldn't want to invalidate everything users already stored.
1252
1253         * crypto/CryptoAlgorithmRegistry.cpp:
1254         (WebCore::CryptoAlgorithmRegistry::shared):
1255         (WebCore::registryMutex):
1256         (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
1257         (WebCore::CryptoAlgorithmRegistry::nameForIdentifier):
1258         (WebCore::CryptoAlgorithmRegistry::create):
1259         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
1260         * crypto/CryptoKey.idl:
1261         With structured clone, it is now possible to send a Key to a web worker. That's
1262         of no practical use because the crypto API is not exposed in workers, but we
1263         shouldn't crash anyway.
1264
1265         * crypto/keys/CryptoKeyAES.cpp:
1266         (WebCore::CryptoKeyAES::CryptoKeyAES):
1267         (WebCore::CryptoKeyAES::isValidAESAlgorithm):
1268         * crypto/keys/CryptoKeyAES.h:
1269         Exposed isValidAESAlgorithm, so that a caller could know whether the constructor
1270         will assert.
1271
1272         * CMakeLists.txt:
1273         * GNUmakefile.am:
1274         * WebCore.vcxproj/WebCore.vcxproj.filters:
1275         * WebCore.vcxproj/WebCoreCommon.props:
1276         Added crypto/keys to search paths to avoid build breakage.
1277
1278 2013-12-11  Bear Travis  <betravis@adobe.com>
1279
1280         Web Inspector: [CSS Shapes] Highlight margin-shape for shape-outside
1281         https://bugs.webkit.org/show_bug.cgi?id=125175
1282
1283         Reviewed by Darin Adler.
1284
1285         In addition to highlighting the shape, also highlight the shape created
1286         by shape-margin with a slightly more transparent color. This patch modifies
1287         the shape info passed to the Inspector Overlay to include a path for both
1288         the raw shape and the shape with margin.
1289
1290         Test: inspector-protocol/model/highlight-shape-outside-margin.html
1291
1292         * inspector/InspectorOverlay.cpp:
1293         (WebCore::buildObjectForShapeOutside): Call Shape::buildDisplayPaths rather than
1294         Shape::buildPath, and pass along any relevant paths to the Inspector overlay.
1295         * inspector/InspectorOverlayPage.js:
1296         (_drawShapeHighlight): Draw the margin shape in addition to the raw shape.
1297         * rendering/shapes/BoxShape.cpp:
1298         (WebCore::addRoundedRect): Add a rounded rect to the path.
1299         (WebCore::BoxShape::buildDisplayPaths): Create the applicable [margin/padding/raw] shapes.
1300         * rendering/shapes/BoxShape.h:
1301         * rendering/shapes/PolygonShape.cpp:
1302         (WebCore::addPolygon): Add a set of vertices as a polygon to the path.
1303         (WebCore::PolygonShape::buildDisplayPaths): Create the applicable [margin/padding/raw] shapes.
1304         * rendering/shapes/PolygonShape.h:
1305         * rendering/shapes/RasterShape.h:
1306         (WebCore::RasterShape::buildDisplayPaths): Ditto.
1307         * rendering/shapes/RectangleShape.cpp:
1308         (WebCore::RectangleShape::buildDisplayPaths): Ditto.
1309         * rendering/shapes/RectangleShape.h:
1310         * rendering/shapes/Shape.h:
1311
1312 2013-12-11  Mario Sanchez Prada  <mario.prada@samsung.com>
1313
1314         [ATK] Expose accessibility objects WAI-ARIA landmark roles
1315         https://bugs.webkit.org/show_bug.cgi?id=125584
1316
1317         Reviewed by Chris Fleizach.
1318
1319         Exposed accessibility objects with landmark roles with the proper
1320         AtkRole, to be provided by the next stable release of ATK.
1321
1322         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1323         (webkitAccessibleGetAttributes):
1324         (atkRole):
1325
1326 2013-12-11  José Dapena Paz  <jdapena@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
1327
1328         [GTK] Add a UPower-based BatteryProvider
1329         https://bugs.webkit.org/show_bug.cgi?id=115719
1330
1331         Reviewed by Martin Robinson.
1332
1333         Introduce the BatteryProviderUPower, a provider of the system's battery status that produces the information
1334         using the upower-glib library.
1335
1336         The BatteryProviderUPower creates a new UPower client when the provider should start emitting updates and hooks
1337         up to device alteration signals. These only fire recalculation of the battery status when a battery device is altered.
1338
1339         When recalculating, every battery device is taken into account, accumulating the energy capacities when both empty
1340         and full, the current rate of energy charging/discharging, and the battery status (whether the device is charging or
1341         discharging). This gives a set of data that covers the overall battery status of the system.
1342
1343         This data is then used to calculate the battery status as perceived by the WebCore implementation. Charging is determined
1344         by examining the integral sign of the current combined energy rate. Charging and discharging times are calculated, when
1345         appropriate, by dividing the chargable/dischargable capacity with the current combined energy rate. The battery level is
1346         calculated by dividing the current energy capacity with the full energy capacity (i.e. the combined capacity of all
1347         the batteries that the system possesses). The status is (indirectly) passed onto BatteryManager by invoking the
1348         updateBatteryStatus method on the client, with the first parameter representing the battery charging/discharging state,
1349         the second parameter representing the time left until the battery is fully charged (when charging) or fully
1350         depleted (when discharging), and the third parameter representing the current battery level.
1351
1352         Whenever the implementation cannot provide any information about the battery status of the system, the client's
1353         updateBatteryStatus method is invoked with the first parameter reporting the unavailability of any information
1354         about the battery status. The other two parameters can be omitted as they default to 0 when not given and are neither
1355         available nor useful in such circumstances. The client should handle such an update by reporting the 'default' battery
1356         status - charging, the battery level being at 1.0 and both the charging and discharging time having the value of
1357         the positive infinity (as per the Battery Status API specification).
1358
1359         The implementation is heavily inspired by a similar approach to calculating battery status in GNOME Settings Daemon.
1360
1361         No new tests - no new functionality. The feature is not yet enabled. When enabled, the relevant tests pass.
1362
1363         * GNUmakefile.list.am: Add the BatteryProviderUPower(Client) build targets.
1364         * platform/glib/BatteryProviderUPower.cpp: Added.
1365         (powerDeviceAlterationCallback):
1366         (BatteryProviderUPower::BatteryProviderUPower):
1367         (BatteryProviderUPower::startUpdating):
1368         (BatteryProviderUPower::stopUpdating):
1369         (BatteryProviderUPower::updateBatteryStatus):
1370         * platform/glib/BatteryProviderUPower.h: Added.
1371         (WebCore):
1372         (BatteryProviderUPower):
1373         * platform/glib/BatteryProviderUPowerClient.h: Added.
1374         (WebCore):
1375         (BatteryProviderUPowerClient):
1376
1377 2013-12-11  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1378
1379         Improving createOffer and createAnswer LayoutTests
1380         https://bugs.webkit.org/show_bug.cgi?id=125568
1381
1382         Reviewed by Philippe Normand.
1383
1384         The constraints parameter should be optional in both. Also adding tests to check if we already have a local SDP
1385         when creating an answer.
1386
1387         Existing tests were updated.
1388
1389         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1390         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
1391
1392 2013-12-11  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1393
1394         [EFL] Fix build with CONTEXT_MENUS flag set OFF
1395         https://bugs.webkit.org/show_bug.cgi?id=125572
1396
1397         Reviewed by Gyuyoung Kim.
1398
1399         dispatchEventAsContextMenuEvent is called regardless of CONTEXT_MENUS flag setting,
1400         thus its definition in InspectorFrontendHost should not be guarded by this flag.
1401
1402         No new tests, no behaviour change.
1403
1404         * inspector/InspectorFrontendHost.cpp:
1405         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
1406
1407 2013-12-11  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
1408
1409         [CURL] Build fails after r160386.
1410         https://bugs.webkit.org/show_bug.cgi?id=125571
1411
1412         Reviewed by Zoltan Herczeg.
1413
1414         Need no new tests.
1415
1416         Fix a typo in commit r160386 that prevents building with curl.
1417
1418         * platform/network/curl/CurlCacheEntry.cpp:
1419         (WebCore::CurlCacheEntry::generateBaseFilename):
1420
1421 2013-12-11  Rob Buis  <rob.buis@samsung.com>
1422
1423         [CSS Shapes] Take into account fill-rule for polygon interpolation
1424         https://bugs.webkit.org/show_bug.cgi?id=125508
1425
1426         Reviewed by Dirk Schulze.
1427
1428         Implement the polygon fill-rule part of http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation.
1429
1430         Adapt fast/shapes/shape-outside-floats/shape-outside-animation.html.
1431
1432         * rendering/style/BasicShapes.cpp:
1433         (WebCore::BasicShape::canBlend):
1434
1435 2013-12-11  Mario Sanchez Prada  <mario.prada@samsung.com>
1436
1437         Programmatically-inserted children lack accessibility events
1438         https://bugs.webkit.org/show_bug.cgi?id=100275
1439
1440         Reviewed by Chris Fleizach.
1441
1442         Test: accessibility/children-changed-sends-notification.html
1443
1444         Emit children-changed::add and children-changed::remove whenever
1445         an object has been added/removed to the accessibility hierarchy,
1446         that is, when a new AtkObject is being attached/detached.
1447
1448         * accessibility/AXObjectCache.h: Added new enumeration to know
1449         when we are detaching a wrapper because of the cache or the
1450         element is being destroyed, so we can use that information.
1451         (WebCore::AXObjectCache::detachWrapper): Added a new parameter and
1452         updated all the prototypes in different ports.
1453         * accessibility/AXObjectCache.cpp:
1454         (WebCore::AXObjectCache::~AXObjectCache): Call detachWrapper()
1455         specifying that we do it because the cache is being destroyed.
1456         (WebCore::AXObjectCache::remove): Call detachWrapper() specifying
1457         that we do it because an accessible element is being destroyed.
1458
1459         * accessibility/atk/AXObjectCacheAtk.cpp:
1460         (WebCore::AXObjectCache::detachWrapper): Emit the children-changed
1461         signal when needed. We rely on the cached reference to the parent
1462         AtkObject (using the implementation of atk_object_get_parent from
1463         the AtkObject class) to find the right object to emit the signal
1464         from here, since the accessibility hierarchy from WebCore will no
1465         longer be accessible at this point.
1466         (WebCore::AXObjectCache::attachWrapper): Emit the children-change
1467         signal from here unless we are in the middle of a layout update,
1468         trying to provide as much information (e.g. the offset) as possible.
1469         (WebCore::AXObjectCache::postPlatformNotification): Make sure we
1470         update (touch) the subtree under an accessibility object whenever
1471         we receive AXChildrenChanded from WebCore, to ensure that those
1472         objects will also be visible rightaway to ATs, and that those get
1473         properly notified of the event at that very same moment.
1474
1475         * accessibility/ios/AXObjectCacheIOS.mm:
1476         (WebCore::AXObjectCache::detachWrapper): Updated function signature.
1477         * accessibility/mac/AXObjectCacheMac.mm:
1478         (WebCore::AXObjectCache::detachWrapper): Ditto.
1479         * accessibility/win/AXObjectCacheWin.cpp:
1480         (WebCore::AXObjectCache::detachWrapper): Ditto.
1481
1482 2013-12-11  Andreas Kling  <akling@apple.com>
1483
1484         REGRESSION(r160389): SVG test assertion extravaganza.
1485
1486         Unreviewed. Use getAttribute() instead of fastGetAttribute() for
1487         the "type" attribute since it's animatable on SVG elements.
1488
1489 2013-12-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1490
1491         Set m_nextBreakablePosition as private in InlineIterator, and use it.
1492         https://bugs.webkit.org/show_bug.cgi?id=125482
1493
1494         Reviewed by Andreas Kling.
1495
1496         InlineIterator has been exported m_nextBreakablePosition as public though it is member variable.
1497         This patch set it as private, and add getter/setter functions for it.
1498
1499         No new tests, no behavior changes.
1500
1501         * rendering/InlineIterator.h:
1502         (WebCore::InlineIterator::InlineIterator):
1503         (WebCore::InlineIterator::nextBreakablePosition):
1504         (WebCore::InlineIterator::setNextBreakablePosition):
1505         * rendering/line/BreakingContextInlineHeaders.h:
1506         (WebCore::BreakingContext::handleText):
1507
1508 2013-12-10  Gurpreet Kaur  <k.gurpreet@samsung.com>
1509
1510         top and bottom black background line not getting displayed
1511         https://bugs.webkit.org/show_bug.cgi?id=21664
1512
1513         Reviewed by Simon Fraser.
1514
1515         The table cell's background was not being displayed. Since the table
1516         cell had no child correct offsetWidth was not being set even if table
1517         width is being defined.
1518
1519         Test: fast/dom/HTMLTableElement/empy-table-cell-with-background-color.html
1520
1521         * rendering/AutoTableLayout.cpp:
1522         (WebCore::AutoTableLayout::recalcColumn):
1523         cellHasContent should also be set to true incase background color is
1524         present.
1525
1526 2013-12-10  Beth Dakin  <bdakin@apple.com>
1527
1528         Horizontal rubber-banding without a horizontal scrollbar is distracting
1529         https://bugs.webkit.org/show_bug.cgi?id=125550
1530
1531         Reviewed by Simon Fraser.
1532
1533         Setting the ScrollElasticity to ScrollElasticityAutomatic will make sure we only 
1534         rubber-band horizontally when there is a horizontal scrollbar.
1535
1536         * page/FrameView.cpp:
1537         (WebCore::FrameView::FrameView):
1538
1539 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
1540
1541         Correct a preprocessor guard from a mis-merged patch
1542
1543         In r160367, I mismerged a patch from Gustavo Noronha. This commit
1544         fixes the merge and thus fixes the CMake build.
1545
1546         * html/HTMLMediaElement.idl: Move the preprocessor guard to the correct property.
1547
1548 2013-12-10  Rob Buis  <rob.buis@samsung.com>
1549
1550         Clean up SVGScriptElement
1551         https://bugs.webkit.org/show_bug.cgi?id=125527
1552
1553         Reviewed by Sam Weinig.
1554
1555         Rewrite to not store type in m_type and also remove type getter/setter.
1556
1557         * svg/SVGScriptElement.cpp:
1558         (WebCore::SVGScriptElement::parseAttribute):
1559         (WebCore::SVGScriptElement::typeAttributeValue):
1560         * svg/SVGScriptElement.h:
1561         * svg/SVGScriptElement.idl:
1562
1563 2013-12-10  Laszlo Vidacs  <lac@inf.u-szeged.hu>
1564
1565         Use std::array when computing MD5 checksum
1566         https://bugs.webkit.org/show_bug.cgi?id=125509
1567
1568         Reviewed by Anders Carlsson.
1569
1570         Use MD5::Digest type and MD5::hashSize when computing MD5 checksum.
1571
1572         * platform/network/curl/CurlCacheEntry.cpp:
1573         (WebCore::CurlCacheEntry::generateBaseFilename):
1574
1575 2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
1576
1577         [ATK] Expose splitter elements with ATK_ROLE_SEPARATOR
1578         https://bugs.webkit.org/show_bug.cgi?id=125522
1579
1580         Reviewed by Chris Fleizach.
1581
1582         Expose objects with SplitterRole role as ATK_ROLE_SEPARATOR.
1583
1584         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1585         (atkRole):
1586
1587 2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
1588
1589         [ATK] Elements with role 'alertdialog' should be ATK_ROLE_ALERT
1590         https://bugs.webkit.org/show_bug.cgi?id=125521
1591
1592         Reviewed by Chris Fleizach.
1593
1594         Stop exposing alert dialogs as ATK_ROLE_DIALOG and do it as
1595         ATK_ROLE_ALERT instead.
1596
1597         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1598         (atkRole):
1599
1600 2013-12-10  Brendan Long  <b.long@cablelabs.com>
1601
1602         [GTK][GStreamer] media/video-preload.html is flakily crashing on WK2
1603         https://bugs.webkit.org/show_bug.cgi?id=125411
1604
1605         Reviewed by Philippe Normand.
1606
1607         No new tests because this fixes flakeyness in existing tests (media/video-preload.html, and various tests in media/track/{audio,in-band,video}).
1608
1609         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
1610         (webkitTextCombinerPadGetProperty): Copy tag list to prevent concurrent modification problems.
1611         (webkitTextCombinerPadEvent): Add locking.
1612         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1613         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Call tagsChanged() because we need it to setup m_tags.
1614         (WebCore::TrackPrivateBaseGStreamer::disconnect): Clear m_tags.
1615         (WebCore::TrackPrivateBaseGStreamer::tagsChanged): Lookup the tags while we're in this callback, because it's the only time we can guarantee that the input-selector won't unref them.
1616         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Use m_tags.
1617         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_tags and a mutex.
1618
1619 2013-12-10  László Langó  <lango@inf.u-szeged.hu>
1620
1621         PageConsole::addMessage should automatically determine column number alongside line number
1622         https://bugs.webkit.org/show_bug.cgi?id=114319
1623
1624         Reviewed by Joseph Pecoraro.
1625
1626         * dom/InlineStyleSheetOwner.cpp:
1627         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
1628         * dom/ScriptElement.cpp:
1629         (WebCore::ScriptElement::ScriptElement):
1630         * dom/ScriptableDocumentParser.h:
1631         * dom/StyledElement.cpp:
1632         (WebCore::StyledElement::styleAttributeChanged):
1633         * html/parser/HTMLDocumentParser.cpp:
1634         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
1635         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
1636         * html/parser/HTMLDocumentParser.h:
1637         * inspector/InspectorResourceAgent.cpp:
1638         (WebCore::InspectorResourceAgent::buildInitiatorObject):
1639         * page/Console.cpp:
1640         (WebCore::internalAddMessage):
1641         * page/PageConsole.cpp:
1642         (WebCore::PageConsole::printSourceURLAndPosition):
1643         (WebCore::PageConsole::addMessage):
1644         * page/PageConsole.h:
1645         * xml/parser/XMLDocumentParser.h:
1646         * xml/parser/XMLDocumentParserLibxml2.cpp:
1647         (WebCore::XMLDocumentParser::error):
1648
1649 2013-12-10  Andreas Kling  <akling@apple.com>
1650
1651         Jettison all StyleResolver data on memory pressure.
1652         <https://webkit.org/b/125498>
1653
1654         The StyleResolver can be rebuilt relatively quickly; we already
1655         have an optimization that discards it some time after last use.
1656
1657         If we find ourseles under serious memory pressure, don't wait for
1658         the timer to kick in, throw everything overboard right away.
1659
1660         ~5MB progression post-pressure on Membuster3.
1661
1662         Reviewed by Anders Carlsson.
1663
1664 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
1665
1666         [GTK] [CMake] Add support for building the DOM bindings
1667         https://bugs.webkit.org/show_bug.cgi?id=116375
1668
1669         Reviewed by Gustavo Noronha Silva.
1670
1671         The CMake build is more complete than the autotools counterpart, so autotools doesn't consider
1672         some supplemental IDL attributes when building the DOM bindings. To prevent API breaks we should
1673         protect these attributes from DOM binding generation.
1674
1675         * Modules/battery/BatteryManager.idl: Protect non-GObject DOM bound methods by C preprocessor checks.
1676         * Modules/battery/NavigatorBattery.idl: Ditto.
1677         * Modules/mediastream/HTMLMediaElementMediaStream.idl: Ditto.
1678         * Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Ditto.
1679         * Modules/networkinfo/NetworkInfoConnection.idl: Ditto.
1680         * PlatformGTK.cmake: Add build steps for building the bindings.
1681         * dom/Document.idl: Protect non-GObject DOM bound methods by C preprocessor checks.
1682         * html/HTMLMediaElement.idl: Ditto.
1683
1684 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
1685
1686         Various fixes for the CMake GTK+ build
1687
1688         Reviewed by Gustavo Noronha.
1689
1690         * PlatformGTK.cmake: Update source list.
1691
1692 2013-12-10  Robert Sipka  <sipka@inf.u-szeged.hu>
1693
1694         [nix][curl] Buildfix after r160310
1695         https://bugs.webkit.org/show_bug.cgi?id=125489
1696
1697         Reviewed by Gustavo Noronha Silva.
1698
1699         Curl doesn't include soup files.
1700
1701         * PlatformNix.cmake:
1702
1703 2013-12-10  Gustavo Noronha Silva  <gns@gnome.org>
1704
1705         [GTK] REGRESSION: www.yahoo.com redirects to the mobile version after UA change
1706         https://bugs.webkit.org/show_bug.cgi?id=125444
1707
1708         Reviewed by Martin Robinson.
1709
1710         * platform/gtk/UserAgentGtk.cpp:
1711         (WebCore::platformVersionForUAString): more correctly pretend we're Mac OS X.
1712         (WebCore::standardUserAgent): ditto.
1713
1714 2013-12-09  Gustavo Noronha Silva  <gns@gnome.org>
1715
1716         [Soup] Send original encoded data size to didReceiveBuffer
1717         https://bugs.webkit.org/show_bug.cgi?id=125410
1718
1719         Reviewed by Martin Robinson.
1720
1721         No tests, the only way to test this seems to be through the inspector UI.
1722
1723         * platform/network/ResourceHandle.h:
1724         * platform/network/ResourceHandleInternal.h:
1725         (WebCore::ResourceHandleInternal::ResourceHandleInternal): data member to track stream
1726         position.
1727         * platform/network/soup/ResourceHandleSoup.cpp:
1728         (WebCore::ResourceHandle::currentStreamPosition): obtains the current stream position by querying
1729         the first seekable input stream we find.
1730         (WebCore::nextMultipartResponsePartCallback): store the position before we start reading a new part.
1731         (WebCore::sendRequestCallback): store the position before we start reading the response body.
1732         (WebCore::readCallback): pass the position delta to didReceiveData.
1733
1734 2013-12-09  Andreas Kling  <akling@apple.com>
1735
1736         Clear out font width measurement caches on memory pressure.
1737         <https://webkit.org/b/125481>
1738
1739         The data kept in WidthCaches can be regenerated on demand. Throwing
1740         it away when we're under memory pressure buys us ~4MB on Membuster3.
1741
1742         Reviewed by Antti Koivisto.
1743
1744 2013-12-09  Seokju Kwon  <seokju@webkit.org>
1745
1746         Web Inspector: Remove enabled() in InspectorRuntimeAgent.
1747         https://bugs.webkit.org/show_bug.cgi?id=125476
1748
1749         Reviewed by Joseph Pecoraro.
1750
1751         Dead code. It's never called anywhere.
1752
1753         No new tests, no behavior change.
1754
1755         * inspector/InspectorRuntimeAgent.h:
1756
1757 2013-12-09  Sam Weinig  <sam@webkit.org>
1758
1759         Replace use of WTF::FixedArray with std::array
1760         https://bugs.webkit.org/show_bug.cgi?id=125475
1761
1762         Reviewed by Anders Carlsson.
1763
1764         * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
1765         * platform/graphics/GlyphMetricsMap.h:
1766
1767 2013-12-09  Benjamin Poulain  <bpoulain@apple.com>
1768
1769         Refactor the CFURLConnectionClient to be the synchronous implementation of an abstract network delegate
1770         https://bugs.webkit.org/show_bug.cgi?id=125379
1771
1772         Reviewed by Alexey Proskuryakov.
1773
1774         * WebCore.vcxproj/WebCore.vcxproj:
1775         * WebCore.vcxproj/WebCore.vcxproj.filters:
1776         * WebCore.xcodeproj/project.pbxproj:
1777         * platform/network/ResourceHandle.h:
1778         * platform/network/ResourceHandleInternal.h:
1779         * platform/network/cf/ResourceHandleCFNet.cpp:
1780         (WebCore::ResourceHandle::createCFURLConnection):
1781         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: Added.
1782         (WebCore::ResourceHandleCFURLConnectionDelegate::ResourceHandleCFURLConnectionDelegate):
1783         (WebCore::ResourceHandleCFURLConnectionDelegate::~ResourceHandleCFURLConnectionDelegate):
1784         (WebCore::ResourceHandleCFURLConnectionDelegate::willSendRequestCallback):
1785         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback):
1786         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataCallback):
1787         (WebCore::ResourceHandleCFURLConnectionDelegate::didFinishLoadingCallback):
1788         (WebCore::ResourceHandleCFURLConnectionDelegate::didFailCallback):
1789         (WebCore::ResourceHandleCFURLConnectionDelegate::willCacheResponseCallback):
1790         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveChallengeCallback):
1791         (WebCore::ResourceHandleCFURLConnectionDelegate::didSendBodyDataCallback):
1792         (WebCore::ResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
1793         (WebCore::ResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpaceCallback):
1794         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback):
1795         (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
1796         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: Added.
1797         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: Added.
1798         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate):
1799         (WebCore::synthesizeRedirectResponseIfNecessary):
1800         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
1801         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
1802         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):
1803         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):
1804         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail):
1805         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
1806         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge):
1807         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didSendBodyData):
1808         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
1809         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
1810         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
1811         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: Added.
1812
1813 2013-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1814
1815         REGRESSION(r136280): input[type=image] should assume coords of 0,0 when activated without physically clicking
1816         https://bugs.webkit.org/show_bug.cgi?id=125392
1817
1818         Reviewed by Darin Adler.
1819
1820         Merge https://chromium.googlesource.com/chromium/blink/+/3c33d42207cd209bb171083ba66c225f694f2101
1821
1822         Activating an image button with the keyboard or element.click() should result in selected coords of (0,0) per
1823         http://www.w3.org/TR/2013/CR-html5-20130806/forms.html#image-button-state-(type=image)
1824         "If the user activates the control without explicitly selecting a coordinate, then the coordinate (0,0) must be assumed."
1825
1826         New behavior also matches that of Internet Explorer and Firefox.
1827
1828         Tests: fast/forms/input-image-submit.html
1829
1830         * html/ImageInputType.cpp:
1831         (WebCore::ImageInputType::handleDOMActivateEvent): Set m_clickLocation to (0, 0) for simulated events.
1832
1833 2013-12-09  Jer Noble  <jer.noble@apple.com>
1834
1835         [MSE] Add support for VideoPlaybackMetrics.
1836         https://bugs.webkit.org/show_bug.cgi?id=125380
1837
1838         Reviewed by Eric Carlson.
1839
1840         Test: media/media-source/media-source-video-playback-quality.html
1841
1842         Add a new object type VideoPlaybackQuality to be returned by
1843         HTMLMediaElement.getVideoPlaybackQuality().
1844
1845         HTMLMediaElements must separately track a droppedVideoFrame count, as
1846         certain operations on SourceBuffer will drop incoming frames, which must
1847         be accounted for. Reset this count when the media engine changes, which is
1848         indicitive of a new media load requset starting.
1849
1850         Add the new VideoPlaybackQuality class:
1851         * Modules/mediasource/VideoPlaybackQuality.cpp: Added.
1852         (WebCore::VideoPlaybackQuality::create):
1853         (WebCore::VideoPlaybackQuality::VideoPlaybackQuality):
1854         * Modules/mediasource/VideoPlaybackQuality.h: Added.
1855         (WebCore::VideoPlaybackQuality::creationTime):
1856         (WebCore::VideoPlaybackQuality::totalVideoFrames):
1857         (WebCore::VideoPlaybackQuality::droppedVideoFrames):
1858         (WebCore::VideoPlaybackQuality::corruptedVideoFrames):
1859         (WebCore::VideoPlaybackQuality::totalFrameDelay):
1860         * Modules/mediasource/VideoPlaybackQuality.idl: Added.
1861
1862         Add support for the new class to HTMLMediaElement:
1863         * html/HTMLMediaElement.cpp:
1864         (HTMLMediaElement::shouldUseVideoPluginProxy):
1865         (HTMLMediaElement::getVideoPlaybackQuality):
1866         * html/HTMLMediaElement.h:
1867         * html/HTMLMediaElement.idl:
1868
1869         Report the video quality metrics from the MediaPlayer:
1870         * platform/graphics/MediaPlayer.cpp:
1871         (WebCore::MediaPlayer::totalVideoFrames):
1872         (WebCore::MediaPlayer::droppedVideoFrames):
1873         (WebCore::MediaPlayer::corruptedVideoFrames):
1874         (WebCore::MediaPlayer::totalFrameDelay):
1875         * platform/graphics/MediaPlayer.h:
1876         * platform/graphics/MediaPlayerPrivate.h:
1877         (WebCore::MediaPlayerPrivateInterface::totalVideoFrames):
1878         (WebCore::MediaPlayerPrivateInterface::droppedVideoFrames):
1879         (WebCore::MediaPlayerPrivateInterface::corruptedVideoFrames):
1880         (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
1881
1882         Correctly report the dropped frame count:
1883         * Modules/mediasource/SourceBuffer.cpp:
1884         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): needsRandomAccessFlag defaults to true.
1885         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Check the sync status of the incoming sample.
1886         (WebCore::SourceBuffer::didDropSample): Notify the media element of a dropped frame.
1887         * Modules/mediasource/SourceBuffer.h:
1888         * html/HTMLMediaElement.cpp:
1889         (WebCore::HTMLMediaElement::HTMLMediaElement):
1890         (HTMLMediaElement::mediaPlayerEngineUpdated): Reset m_droppedFrameCount.
1891         (HTMLMediaElement::getVideoPlaybackQuality): Return a new VideoPlaybackQuality object.
1892         * html/HTMLMediaElement.h:
1893         (WebCore::HTMLMediaElement::incrementDroppedFrameCount): Simple incrementer.
1894         * platform/MediaSample.h:
1895         (WebCore::MediaSample::isSync): Convenience function.
1896         (WebCore::MediaSample::isNonDisplaying): Ditto.
1897
1898         Add support in the AVFoundation MediaSource Engine:
1899         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1900         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1901         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalVideoFrames):
1902         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::droppedVideoFrames):
1903         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::corruptedVideoFrames):
1904         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
1905
1906         Add support in the Mock MediaSource Engine:
1907         * platform/mock/mediasource/MockBox.h:
1908         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1909         (WebCore::MockMediaPlayerMediaSource::totalVideoFrames): Simple accessor.
1910         (WebCore::MockMediaPlayerMediaSource::droppedVideoFrames): Ditto.
1911         (WebCore::MockMediaPlayerMediaSource::corruptedVideoFrames): Ditto.
1912         (WebCore::MockMediaPlayerMediaSource::totalFrameDelay): Ditto.
1913         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1914         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
1915         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
1916         * platform/mock/mediasource/MockMediaSourcePrivate.h:
1917         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1918         (WebCore::MockSourceBufferPrivate::enqueueSample): Increment the frame counts based on
1919             the incoming sample.
1920         * platform/mock/mediasource/MockSourceBufferPrivate.h:
1921
1922         Add the new files to the project:
1923         * bindings/gobject/GNUmakefile.am:
1924         * DerivedSources.make:
1925         * WebCore.xcodeproj/project.pbxproj:
1926         * GNUMakefile.list.am:
1927         * CMakeLists.txt:
1928
1929 2013-12-09  Simon Fraser  <simon.fraser@apple.com>
1930
1931         Avoid divide by zero in scrollbar code, and protect against Obj-C exceptions
1932         https://bugs.webkit.org/show_bug.cgi?id=125469
1933         <rdar://problem/15535772>
1934
1935         Reviewed by Beth Dakin.
1936         
1937         In ScrollbarThemeMac::setPaintCharacteristicsForScrollbar(), proportion could
1938         end up as NaN if scrollbar->totalSize() were zero. Protect against that.
1939         
1940         Also wrap functions that call into Objective-C with BEGIN_BLOCK_OBJC_EXCEPTIONS/
1941         END_BLOCK_OBJC_EXCEPTIONS.
1942
1943         * platform/mac/ScrollbarThemeMac.mm:
1944         (WebCore::ScrollbarThemeMac::scrollbarThickness):
1945         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
1946         (WebCore::ScrollbarThemeMac::minimumThumbLength):
1947         (WebCore::ScrollbarThemeMac::updateEnabledState):
1948         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
1949         (WebCore::scrollbarPainterPaint):
1950
1951 2013-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1952
1953         Implement Document.cloneNode()
1954         https://bugs.webkit.org/show_bug.cgi?id=11646
1955
1956         Reviewed by Darin Adler.
1957
1958         Merge https://chromium.googlesource.com/chromium/blink/+/dc7879025e01d63be9fcf6a84ca6c9b8b5768a80
1959
1960         Implement the behavior specified in the current DOM4 working draft:
1961         http://www.w3.org/TR/2013/WD-dom-20131107/#dom-node-clonenode
1962
1963         Tests: fast/dom/Document/clone-node.html
1964                fast/dom/HTMLDocument/clone-node-quirks-mode.html
1965                svg/custom/clone-node.html
1966
1967         * dom/Document.cpp:
1968         (WebCore::Document::cloneNode):
1969         (WebCore::Document::cloneDocumentWithoutChildren):
1970         (WebCore::Document::cloneDataFromDocument):
1971         * dom/Document.h:
1972         * html/HTMLDocument.cpp:
1973         (WebCore::HTMLDocument::cloneDocumentWithoutChildren):
1974         * html/HTMLDocument.h:
1975         * svg/SVGDocument.cpp:
1976         (WebCore::SVGDocument::cloneDocumentWithoutChildren):
1977         * svg/SVGDocument.h:
1978
1979 2013-12-09  Andreas Kling  <akling@apple.com>
1980
1981         REGRESSION(r160260): Memory pressure signal causes web process to hang.
1982         <https://webkit.org/b/125465>
1983
1984         Reviewed by Tim Horton.
1985
1986         This command caused all of my web processes to hang:
1987
1988             notifyutil -p org.WebKit.lowMemory
1989
1990         This only happens when the cache pruning code encounters a resource
1991         using purgeable memory.
1992
1993         * loader/cache/MemoryCache.cpp:
1994         (WebCore::MemoryCache::pruneLiveResourcesToSize):
1995
1996             Grab the next CachedResource pointer before continuing the loop.
1997
1998 2013-12-09  peavo@outlook.com  <peavo@outlook.com>
1999
2000         [WinCairo] OpenGL compile error.
2001         https://bugs.webkit.org/show_bug.cgi?id=125383
2002
2003         Reviewed by Darin Adler.
2004
2005         * platform/graphics/opengl/Extensions3DOpenGLES.h: Define GL_HALF_FLOAT_ARB on Windows when OPENGL_ES_2 is used.
2006
2007 2013-12-09  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2008
2009         Fix handling of 'inherit' and 'initial' for grid lines.
2010         https://bugs.webkit.org/show_bug.cgi?id=125223
2011
2012         Reviewed by Darin Adler.
2013
2014         'initial' and 'inherit' are always allowed values for CSS properties.
2015         As the CSSParser handles them automatically, those 2 values were never
2016         taken care of in StyleResolver, leading to crashes.
2017
2018         Added tests cases for 'inherit' and 'initial' to the following tests:
2019
2020         fast/css-grid-layout/grid-item-column-row-get-set.html
2021         fast/css-grid-layout/grid-item-end-after-get-set.html
2022         fast/css-grid-layout/grid-item-start-before-get-set.html
2023
2024         Patch backported from Blink: https://src.chromium.org/viewvc/blink?revision=149257&view=revision
2025
2026         * css/StyleResolver.cpp:
2027         (WebCore::StyleResolver::applyProperty):
2028         * rendering/style/RenderStyle.h:
2029         * rendering/style/StyleGridItemData.cpp:
2030         (WebCore::StyleGridItemData::StyleGridItemData):
2031
2032 2013-12-09  Joseph Pecoraro  <pecoraro@apple.com>
2033
2034         Web Inspector: Inspector.json and CodeGenerator tweaks
2035         https://bugs.webkit.org/show_bug.cgi?id=125321
2036
2037         Reviewed by Timothy Hatcher.
2038
2039         * inspector/protocol/Runtime.json:
2040         Runtime.js was depending on Network.FrameId. This is a layering
2041         violation, so ideally we can fix this later. For now, just copy
2042         the FrameId type into Runtime. They are strings so all is good.
2043
2044         * inspector/CodeGeneratorInspector.py:
2045         (Generator.EventMethodStructTemplate.append_epilog):
2046         * inspector/CodeGeneratorInspectorStrings.py:
2047         Improve --help usage information.
2048         Make the script work with a single domain json file.
2049         Add ASCIILiteral's where appropriate.
2050
2051 2013-12-09  Nick Diego Yamane  <nick.yamane@openbossa.org>
2052
2053         [Nix] Fix file name typo in PlatformNix.cmake
2054         https://bugs.webkit.org/show_bug.cgi?id=125457
2055
2056         Reviewed by Gustavo Noronha Silva.
2057
2058         Wrong file name introduced in http://trac.webkit.org/changeset/160310.
2059         * PlatformNix.cmake:
2060
2061 2013-12-09  Brendan Long  <b.long@cablelabs.com>
2062
2063         [GStreamer] Memory leak due to incorrect use of gst_tag_list_merge in TextCombinerGStreamer
2064         https://bugs.webkit.org/show_bug.cgi?id=125452
2065
2066         Reviewed by Philippe Normand.
2067
2068         No new tests because this fixes a memory leak.
2069
2070         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
2071         (webkitTextCombinerPadEvent): Use gst_tag_list_insert instead of gst_tag_list_merge, since we don't want to create a new list.
2072
2073 2013-12-09  Chris Fleizach  <cfleizach@apple.com>
2074
2075         AX: WebKit ignores @alt on IMG elements with role="text"
2076         https://bugs.webkit.org/show_bug.cgi?id=125363
2077
2078         Reviewed by Mario Sanchez Prada.
2079
2080         If an <img> element has a different role, the alt attribute should still be used in the 
2081         name calculation if present.
2082
2083         Test: accessibility/alt-tag-on-image-with-nonimage-role.html
2084
2085         * accessibility/AccessibilityNodeObject.cpp:
2086         (WebCore::AccessibilityNodeObject::usesAltTagForTextComputation):
2087         (WebCore::AccessibilityNodeObject::alternativeText):
2088         (WebCore::AccessibilityNodeObject::accessibilityDescription):
2089         (WebCore::AccessibilityNodeObject::text):
2090         * accessibility/AccessibilityNodeObject.h:
2091
2092 2013-12-08  Martin Robinson  <mrobinson@igalia.com>
2093
2094         [WK2][Soup] Use didReceiveBuffer instead of didReceiveData
2095         https://bugs.webkit.org/show_bug.cgi?id=118598
2096
2097         Reviewed by Gustavo Noronha Silva.
2098
2099         Original patch by Kwang Yul Seo  <skyul@company100.net> and Csaba Osztrogonác  <ossy@webkit.org>.
2100
2101         Switch from using didReceiveData to didReceiveBuffer for the Soup backend and
2102         let SharedBuffer wrap a SoupBuffer. This is necessary because the NetworkProcess
2103         only supports getting data via SharedBuffer.
2104
2105         * GNUmakefile.list.am: Add the new SharedBufferSoup.cpp file to the list.
2106         * PlatformEfl.cmake:
2107         * PlatformGTK.cmake:
2108         * PlatformNix.cmake:
2109         * platform/SharedBuffer.cpp: We no longer used the no-op version of the platformFoo methods.
2110         * platform/SharedBuffer.h: Ditto.
2111         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:  Use didReceiveBuffer instead of didReceiveData.
2112         * platform/network/ResourceHandleInternal.h: Have only a m_soupBuffer member instead of three to manage the buffer.
2113         * platform/network/soup/GOwnPtrSoup.cpp: Add support for SoupBuffer.
2114         * platform/network/soup/GOwnPtrSoup.h: Ditto.
2115         * platform/network/soup/ResourceHandleSoup.cpp:
2116         (WebCore::WebCoreSynchronousLoader::didReceiveData): ASSERT_NOT_REACHED here, since it should never be
2117         called now.
2118         (WebCore::WebCoreSynchronousLoader::didReceiveBuffer): Handle this call properly.
2119         (WebCore::ResourceHandle::ensureReadBuffer): Now we package up our buffer into a SoupBuffer.
2120         (WebCore::redirectSkipCallback): Use the new m_soupBuffer member.
2121         (WebCore::cleanupSoupRequestOperation): Ditto.
2122         (WebCore::nextMultipartResponsePartCallback): Ditto.
2123         (WebCore::sendRequestCallback): Ditto.
2124         (WebCore::readCallback):
2125         * platform/soup/SharedBufferSoup.cpp: Added.
2126
2127 2013-12-09  Michal Poteralski  <m.poteralski@samsung.com>
2128
2129         DataCloneError exception is not thrown when postMessage's second parameter is the source
2130         port or the target port.
2131
2132         https://bugs.webkit.org/show_bug.cgi?id=124708
2133
2134         Reviewed by Alexey Proskuryakov.
2135
2136         According to specification:
2137         http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#dom-window-postmessage
2138
2139         If the method was invoked with a second argument transfer then if any of the objects in the
2140         transfer are either the source port or the target port (if any), then a DataCloneError
2141         exception should be thrown. Currently an InvalidStateError exception is thrown what is an
2142         incorrect behaviour.
2143
2144         The proposed solution is change to the correct the exception value.
2145
2146         Tests: fast/dom/Window/postMessage-clone-port-error.html
2147
2148         * dom/MessagePort.cpp:
2149         (WebCore::MessagePort::postMessage): Improve exception value
2150
2151 2013-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2152
2153         Unreviewed. Fix the GTK+ build with NetworkProcess enabled.
2154
2155         * GNUmakefile.list.am: Add missing file to compilation.
2156
2157 2013-12-08  Ryosuke Niwa  <rniwa@webkit.org>
2158
2159         getComputedStyle border-radius shorthand omits vertical radius information
2160         https://bugs.webkit.org/show_bug.cgi?id=125394
2161
2162         Reviewed by Andreas Kling.
2163
2164         Merge https://chromium.googlesource.com/chromium/blink/+/4c2866855dddbb28bb7d978ad627acc368af23d0
2165
2166         getComputedStyle of border-radius shows the vertical radius components if they differ from their horizontal counterpants.
2167         We were incorrectly detecting this case and over simplifying the results of getComputedStyle.
2168         This patch ensures we only hide the vertical values if they are identical to the horizontal values.
2169
2170         * css/CSSComputedStyleDeclaration.cpp:
2171         (WebCore::getBorderRadiusShorthandValue):
2172
2173 2013-12-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2174
2175         [GTK] Do not skip attributes with only custom setter
2176         https://bugs.webkit.org/show_bug.cgi?id=125417
2177
2178         Reviewed by Gustavo Noronha Silva.
2179
2180         For attributes with a custom setter, we now generate the code as a
2181         read-only attribute with a getter method, unless it also has a
2182         custom getter in which case the attribute is skipped.
2183
2184         * bindings/gobject/GNUmakefile.am: Generate WebKitDOMMediaController
2185         that is now required by an attribute having a custom setter.
2186         * bindings/gobject/WebKitDOMCustom.cpp: Remove methods that are now generated.
2187         * bindings/gobject/WebKitDOMCustom.h: Ditto.
2188         * bindings/gobject/WebKitDOMCustom.symbols: Ditto.
2189         * bindings/gobject/webkitdom.symbols: Add new symbols.
2190         * bindings/scripts/CodeGeneratorGObject.pm:
2191         (SkipAttribute): Do not skip attributes having a custom setter.
2192         (GetWriteableProperties): Do not include attributes having a
2193         custom setter.
2194         (GenerateProperty): Do not return early for attributes having
2195         custom setter.
2196         (GenerateFunctions): Do not generate setter for attributes having
2197         a custom setter.
2198
2199 2013-12-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2200
2201         [GTK] Do not generate new dispatch_event methods marked as deprecated
2202         https://bugs.webkit.org/show_bug.cgi?id=125416
2203
2204         Reviewed by Gustavo Noronha Silva.
2205
2206         * bindings/scripts/CodeGeneratorGObject.pm:
2207         (SkipFunction): Skip dispatch_event methods for objects
2208         implementing EventTarget interface unless they are already
2209         deprecated.
2210         (GenerateFunction): Pass also the parentNode to SkipFunction().
2211
2212 2013-12-05  Jer Noble  <jer.noble@apple.com>
2213
2214         [MSE] Bring end-of-stream algorithm section up to current spec.
2215         https://bugs.webkit.org/show_bug.cgi?id=125270
2216
2217         Reviewed by Darin Adler.
2218
2219         Test: media/media-source/media-source-end-of-stream.html
2220
2221         Separate the "endOfStream()" method from the "end of stream algorithm".
2222
2223         * Modules/mediasource/MediaSource.cpp:
2224         (WebCore::SourceBufferIsUpdating): Added predicate function.
2225         (WebCore::MediaSource::endOfStream): Call streamEndedWithError().
2226         (WebCore::MediaSource::streamEndedWithError): Added.
2227         * Modules/mediasource/MediaSource.h:
2228         * Modules/mediasource/SourceBuffer.cpp:
2229         (WebCore::SourceBuffer::appendBufferTimerFired): Call streamEndedWithError().
2230         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
2231         * Modules/mediasource/SourceBuffer.h:
2232         * html/HTMLMediaElement.cpp:
2233         (HTMLMediaElement::mediaLoadingFailedFatally): Renamed from mediaEngineError.
2234         (HTMLMediaElement::mediaLoadingFailed): Call renamed method.
2235         * html/HTMLMediaElement.h:
2236         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2237         (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream): Set load state to Loaded.
2238         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2239         (WebCore::MockMediaPlayerMediaSource::setNetworkState): Simple setter.
2240         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
2241         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2242         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set the intitial duration to NaN.
2243         (WebCore::MockMediaSourcePrivate::markEndOfStream): Set load state to Loaded.
2244
2245 2013-12-04  Jer Noble  <jer.noble@apple.com>
2246
2247         [MSE][Mac] Crash when removing MediaSource from HTMLMediaElement.
2248         https://bugs.webkit.org/show_bug.cgi?id=125269
2249
2250         Reviewed by Sam Weinig.
2251
2252         Fixes the media/media-source/media-source-fastseek.html test when run with MallocScribble enabled.
2253
2254         It's possible for a SourceBufferPrivateAVFObjC to outlive its MediaSourcePrivateAVFObjC, so
2255         make sure to clear the pointer from the former to the latter when the latter is destroyed.
2256         That means we now have to check to see if the pointer to the latter is still valid at every
2257         call site.
2258
2259         As a drive-by fix, rename m_parent to m_mediaSource to more accurately reflect what the pointer
2260         points to.
2261
2262         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2263         (WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC): Clear the SourceBuffer's backpointer.
2264         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2265         (WebCore::SourceBufferPrivateAVFObjC::clearMediaSource): 
2266         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2267         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): Rename m_parent -> m_mediaSource.
2268         (WebCore::SourceBufferPrivateAVFObjC::append): Check m_mediaSource before calling.
2269         (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Ditto.
2270         (WebCore::SourceBufferPrivateAVFObjC::readyState): Ditto.
2271         (WebCore::SourceBufferPrivateAVFObjC::setReadyState): Ditto.
2272         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
2273         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
2274         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
2275         (WebCore::SourceBufferPrivateAVFObjC::setActive): Ditto.
2276         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2277         (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate): Clear the SourceBuffer's backpointer.
2278         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2279         (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate): Rename m_parent -> m_mediaSource.
2280         (WebCore::MockSourceBufferPrivate::removedFromMediaSource): Check m_mediaSource before calling.
2281         (WebCore::MockSourceBufferPrivate::readyState): Ditto.
2282         (WebCore::MockSourceBufferPrivate::setReadyState): Ditto.
2283         (WebCore::MockSourceBufferPrivate::setActive): Ditto.
2284         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2285         (WebCore::MockSourceBufferPrivate::clearMediaSource):
2286
2287 2013-12-07  Zoltan Horvath  <zoltan@webkit.org>
2288
2289         Remove statusWithDirection static function from RenderBlockLineLayout
2290         https://bugs.webkit.org/show_bug.cgi?id=125372
2291
2292         Reviewed by Andreas Kling.
2293
2294         I run into a FIXME about using BidiStatus constructor rather than statusWithDirection,
2295         once it's implemented. BidiStatus has got the appropriate constructor now, so I removed
2296         statusWithDirection and updated the code to use the constructor of BidiStatus.
2297
2298         No new tests, no behavior change.
2299
2300         * rendering/RenderBlockLineLayout.cpp:
2301         (WebCore::constructBidiRunsForSegment):
2302
2303 2013-12-07  ChangSeok Oh  <changseok.oh@collabora.com>
2304
2305         Unreviewed. Build fix for gtk port after r160260.
2306
2307         * loader/cache/CachedImage.h: Add missing a header.
2308
2309 2013-12-07  Gustavo Noronha Silva  <gns@gnome.org>
2310
2311         ubuntu software center hits _XReadEvents() error
2312         https://bugs.webkit.org/show_bug.cgi?id=123480
2313
2314         Reviewed by Martin Robinson.
2315
2316         * platform/gtk/WidgetBackingStoreGtkX11.cpp:
2317         (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11): clear the surface
2318         before freeing the associated pixmap.
2319
2320 2013-12-06  Tim Horton  <timothy_horton@apple.com>
2321
2322         [mac] Keep around more decoded image data, since it's purgeable
2323         https://bugs.webkit.org/show_bug.cgi?id=125273
2324         <rdar://problem/13205438>
2325
2326         Unreviewed patch to fix review comments...
2327
2328         * platform/graphics/BitmapImage.h:
2329         Dan noticed that these return statements were improperly indented.
2330
2331 2013-12-05  Jer Noble  <jer.noble@apple.com>
2332
2333         [MSE][Mac] Disable AVFoundation when enabling the MockMediaPlayerMediaSource.
2334         https://bugs.webkit.org/show_bug.cgi?id=125338
2335
2336         Reviewed by Darin Adler.
2337
2338         The MediaSource API has some assumptions which break if more than one installed
2339         media engine supports MediaSources at the same time. So when enabling the mock
2340         media source engine in DRT or WKTR, disable AVFoundation so that only the mock
2341         engine will support media source loading.
2342
2343         * testing/Internals.cpp:
2344         (WebCore::Internals::initializeMockMediaSource):
2345
2346 2013-12-06  Antti Koivisto  <antti@apple.com>
2347
2348         Use NeverDestroyed instead of DEFINE_STATIC_LOCAL
2349
2350         Reviewed by Anders Carlsson.
2351
2352         * rendering/RenderText.cpp:
2353         (WebCore::originalTextMap):
2354
2355 2013-12-05  Jer Noble  <jer.noble@apple.com>
2356
2357         [MSE] Add a runtime-setting for the MediaSource constructor.
2358         https://bugs.webkit.org/show_bug.cgi?id=125336
2359
2360         Reviewed by Eric Carlson.
2361
2362         Add a Setting to enable the MediaSource constructor.
2363
2364         * Modules/mediasource/MediaSource.idl:
2365         * page/Settings.in:
2366
2367 2013-12-06  Tim Horton  <timothy_horton@apple.com>
2368
2369         [mac] Keep around more decoded image data, since it's purgeable
2370         https://bugs.webkit.org/show_bug.cgi?id=125273
2371         <rdar://problem/13205438>
2372
2373         Reviewed by Simon Fraser.
2374
2375         No new tests, just an optimization.
2376
2377         Instead of throwing away decoded image data eagerly, allow the operating
2378         system to manage the memory via the standard purgeability mechanism,
2379         where it can.
2380
2381         This improves the performance on some pathological cases (extremely large
2382         animated GIFs) by up to 8x.
2383
2384         * loader/cache/MemoryCache.cpp:
2385         (WebCore::MemoryCache::pruneLiveResourcesToSize):
2386         Don't prune live resources' decoded data if it is purgeable.
2387
2388         * platform/graphics/BitmapImage.cpp:
2389         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
2390         Don't eagerly throw away decoded image data if it's purgeable.
2391
2392         * loader/cache/CachedImage.h:
2393         * loader/cache/CachedResource.h:
2394         (WebCore::CachedResource::decodedDataIsPurgeable):
2395         * platform/graphics/BitmapImage.h:
2396         * platform/graphics/Image.h:
2397         (WebCore::Image::decodedDataIsPurgeable):
2398
2399 2013-12-06  Antti Koivisto  <antti@apple.com>
2400
2401         Save original text for RenderText to a map
2402         https://bugs.webkit.org/show_bug.cgi?id=125278
2403
2404         Reviewed by Darin Adler.
2405         
2406         Currently the original text is fetched from the Text node. This is one of the few things 
2407         where we use the RenderText node pointer and is stopping Text nodes from being anonymous.
2408         
2409         It is very rare of original text to differ from the actual text so we can just squirrel the
2410         original to a map when it differs. This is also simplifies the code.
2411
2412         * rendering/RenderQuote.cpp:
2413         (WebCore::RenderQuote::styleDidChange):
2414         (WebCore::RenderQuote::updateDepth):
2415         * rendering/RenderText.cpp:
2416         (WebCore::originalTextMap):
2417         (WebCore::RenderText::RenderText):
2418         (WebCore::RenderText::~RenderText):
2419         (WebCore::RenderText::styleDidChange):
2420         (WebCore::RenderText::originalText):
2421         (WebCore::RenderText::setTextInternal):
2422         (WebCore::RenderText::setText):
2423         * rendering/RenderText.h:
2424         * rendering/RenderTextFragment.cpp:
2425         * rendering/RenderTextFragment.h:
2426
2427 2013-12-04  Jer Noble  <jer.noble@apple.com>
2428
2429         [MSE] Refactor MediaSourceBase back into MediaSource
2430         https://bugs.webkit.org/show_bug.cgi?id=125245
2431
2432         Reviewed by Eric Carlson.
2433
2434         Now that the legacy WebKitMediaSource has been removed, there is no reason to have
2435         a separate MediaSource and MediaSourceBase. Re-integrate the two.
2436
2437         Copy all the methods from MediaSource into MediaSourceBase, and rename the class MediaSource:
2438         * Modules/mediasource/MediaSource.cpp: Copied from MediaSourceBase.cpp.
2439         (WebCore::MediaSource::create): Copied from MediaSource.cpp.
2440         (WebCore::MediaSource::addSourceBuffer): Ditto.
2441         (WebCore::MediaSource::removeSourceBuffer): Ditto.
2442         (WebCore::MediaSource::isTypeSupported): Ditto.
2443         (WebCore::MediaSource::eventTargetInterface): Ditto.
2444         (WebCore::MediaSource::sourceBufferDidChangeAcitveState): Ditto.
2445         * Modules/mediasource/MediaSource.h: Copied from MediaSourceBase.h.
2446         (WebCore::MediaSource::sourceBuffers): Copied from MediaSource.h.
2447         (WebCore::MediaSource::activeSourceBuffers): Copied from MediaSource.h.
2448         * Modules/mediasource/MediaSourceBase.cpp: Removed.
2449         * Modules/mediasource/MediaSourceBase.h: Removed.
2450
2451         Change all references to MediaSourceBase into MediaSource:
2452         * Modules/mediasource/DOMURLMediaSource.cpp:
2453         (WebCore::DOMURLMediaSource::createObjectURL):
2454         * Modules/mediasource/DOMURLMediaSource.h:
2455         * Modules/mediasource/MediaSourceRegistry.cpp:
2456         (WebCore::MediaSourceRegistry::registerURL):
2457         (WebCore::MediaSourceRegistry::unregisterURL):
2458         * Modules/mediasource/MediaSourceRegistry.h:
2459
2460         Remove MediaSourceBase.cpp/h from the project file:
2461         * WebCore.xcodeproj/project.pbxproj:
2462         * GNUmakefile.list.am:
2463
2464 2013-12-06  Eric Carlson  <eric.carlson@apple.com>
2465
2466         r159827 broke plug-in snapshotting
2467         https://bugs.webkit.org/show_bug.cgi?id=125365
2468
2469         Reviewed by Dean Jackson.
2470
2471         No new tests, covered by existing tests.
2472
2473         * html/HTMLPlugInImageElement.cpp:
2474         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Return early if there is NOT
2475             a page, not if there IS a page.
2476
2477 2013-12-06  Roger Fong <roger_fong@apple.com> and Brent Fulgham  <bfulgham@apple.com>
2478
2479         [Win] Support compiling with VS2013
2480         https://bugs.webkit.org/show_bug.cgi?id=125353
2481
2482         Reviewed by Anders Carlsson.
2483
2484         * loader/archive/cf/LegacyWebArchive.cpp:
2485         (WebCore::LegacyWebArchive::create): Use nullptr
2486         (WebCore::LegacyWebArchive::createFromSelection): Ditto
2487
2488 2013-11-15  Jer Noble  <jer.noble@apple.com>
2489
2490         [MSE][Mac] Add a new MSE-compatible MediaPlayerPrivate implementation, MediaPlayerPrivateMediaSourceAVFObjC
2491         https://bugs.webkit.org/show_bug.cgi?id=123378
2492
2493         Reviewed by Eric Carlson.
2494
2495         Add an AVFoundation implementation of MediaPlayerPrivate which creates and uses
2496         MediaSourcePrivate and SourceBufferPrivate subclasses.
2497
2498         Add the new media engine to the list of installed engines:
2499         * platform/MediaSample.h:
2500         * platform/graphics/MediaPlayer.cpp:
2501         (WebCore::installedMediaEngines):
2502         * platform/graphics/MediaPlayer.h:
2503
2504         Add the new files to the project:
2505         * WebCore.xcodeproj/project.pbxproj:
2506
2507         Drive by fix for ports who implement seekDouble():
2508         * platform/graphics/MediaPlayerPrivate.h:
2509         (WebCore::MediaPlayerPrivateInterface::seekWithTolerance):
2510
2511         Add new Video and AudioTrackPrivate types which handle their own enable state:
2512         * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: Added
2513         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
2514         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
2515         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack):
2516         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::assetTrack):
2517         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled):
2518         * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h: Added
2519         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.cpp: Added.
2520         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
2521         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
2522         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack):
2523         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::assetTrack):
2524         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setSelected):
2525         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h: Added.
2526
2527         Add a new MediaPlayerPrivate which can handle MediaSource objects:
2528         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: Added.
2529         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: Added.
2530         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2531         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
2532         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
2533         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create):
2534         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
2535         (WebCore::mimeTypeCache):
2536         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
2537         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
2538         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
2539         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad):
2540         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareToPlay):
2541         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformMedia):
2542         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
2543         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
2544         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
2545         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
2546         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
2547         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
2548         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsScanning):
2549         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
2550         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasVideo):
2551         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAudio):
2552         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVisible):
2553         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
2554         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
2555         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble):
2556         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
2557         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
2558         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
2559         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking):
2560         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble):
2561         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::networkState):
2562         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::readyState):
2563         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
2564         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble):
2565         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable):
2566         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
2567         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::didLoadingProgress):
2568         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setSize):
2569         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
2570         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
2571         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAvailableVideoFrame):
2572         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsAcceleratedRendering):
2573         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
2574         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::movieLoadType):
2575         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareForRendering):
2576         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::engineDescription):
2577         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::languageOfPrimaryAudioTrack):
2578         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::extraMemoryCost):
2579         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
2580         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
2581         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateDuration):
2582         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateStates):
2583         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState):
2584         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNetworkState):
2585         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
2586         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
2587
2588         Add a new MediaSourcePrivate implementation:
2589         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: Added.
2590         (WebCore::MediaSourcePrivateAVFObjC::player):
2591         (WebCore::MediaSourcePrivateAVFObjC::activeSourceBuffers):
2592         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: Added.
2593         (WebCore::MediaSourcePrivateAVFObjC::create):
2594         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC):
2595         (WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC):
2596         (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
2597         (WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer):
2598         (WebCore::MediaSourcePrivateAVFObjC::duration):
2599         (WebCore::MediaSourcePrivateAVFObjC::setDuration):
2600         (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream):
2601         (WebCore::MediaSourcePrivateAVFObjC::unmarkEndOfStream):
2602         (WebCore::MediaSourcePrivateAVFObjC::readyState):
2603         (WebCore::MediaSourcePrivateAVFObjC::setReadyState):
2604         (WebCore::MediaSourcePrivateAVFObjC::sourceBufferPrivateDidChangeActiveState):
2605         (WebCore::MediaSourcePrivateAVFObjCHasAudio):
2606         (WebCore::MediaSourcePrivateAVFObjC::hasAudio):
2607         (WebCore::MediaSourcePrivateAVFObjCHasVideo):
2608         (WebCore::MediaSourcePrivateAVFObjC::hasVideo):
2609         (WebCore::MediaSourcePrivateAVFObjC::seekToTime):
2610
2611         Add a new SourceBufferPrivate implementation:
2612         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: Added.
2613         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Added.
2614         (-[WebAVStreamDataParserListener initWithParser:parent:WebCore::]):
2615         (-[WebAVStreamDataParserListener dealloc]):
2616         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
2617         (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]):
2618         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
2619         (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]):
2620         (WebCore::MediaSampleAVFObjC::create):
2621         (WebCore::MediaSampleAVFObjC::~MediaSampleAVFObjC):
2622         (WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
2623         (WebCore::MediaSampleAVFObjC::platformSample):
2624         (WebCore::CMSampleBufferIsRandomAccess):
2625         (WebCore::MediaSampleAVFObjC::flags):
2626         (WebCore::MediaDescriptionAVFObjC::create):
2627         (WebCore::MediaDescriptionAVFObjC::~MediaDescriptionAVFObjC):
2628         (WebCore::MediaDescriptionAVFObjC::MediaDescriptionAVFObjC):
2629         (WebCore::SourceBufferPrivateAVFObjC::create):
2630         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
2631         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
2632         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
2633         (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
2634         (WebCore::callProcessCodedFrameForEachSample):
2635         (WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
2636         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
2637         (WebCore::SourceBufferPrivateAVFObjC::didReachEndOfTrackWithTrackID):
2638         (WebCore::SourceBufferPrivateAVFObjC::setClient):
2639         (WebCore::SourceBufferPrivateAVFObjC::append):
2640         (WebCore::SourceBufferPrivateAVFObjC::abort):
2641         (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource):
2642         (WebCore::SourceBufferPrivateAVFObjC::readyState):
2643         (WebCore::SourceBufferPrivateAVFObjC::setReadyState):
2644         (WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames):
2645         (WebCore::SourceBufferPrivateAVFObjC::isFull):
2646         (WebCore::SourceBufferPrivateAVFObjC::hasVideo):
2647         (WebCore::SourceBufferPrivateAVFObjC::hasAudio):
2648         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
2649         (WebCore::createNonDisplayingCopy):
2650         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
2651         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
2652         (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
2653         (WebCore::SourceBufferPrivateAVFObjC::setActive):
2654         (WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime):
2655         (WebCore::SourceBufferPrivateAVFObjC::seekToTime):
2656         * platform/mac/PlatformClockCM.h:
2657
2658         Add a SOFT_LINK_CLASS_OPTIONAL macro:
2659         * platform/mac/SoftLinking.h:
2660
2661 2013-12-06  Alexey Proskuryakov  <ap@apple.com>
2662
2663         Remove some duplicate checks from SerializedScriptValue
2664         https://bugs.webkit.org/show_bug.cgi?id=125358
2665
2666         Reviewed by Geoffrey Garen.
2667
2668         There is no need to call inherits() before WebCore's toXXX(JSValue) functions.
2669
2670         Also, the result of toArrayBuffer() is a raw pointer, not a RefPtr (it's confusing
2671         because toArrayBufferView returns a RefPtr).
2672
2673         * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal):
2674
2675 2013-12-06  Tim Horton  <timothy_horton@apple.com>
2676
2677         Remove Image::decodedSize()
2678         https://bugs.webkit.org/show_bug.cgi?id=125327
2679
2680         Reviewed by Simon Fraser.
2681
2682         Missed a comment when removing this code.
2683
2684         * svg/graphics/SVGImage.h:
2685
2686 2013-12-06  Rob Buis  <rob.buis@samsung.com>
2687
2688         [CSS Shapes] ShapeOutsideInfo needs to use the parent's writing mode when calculating offsets
2689         https://bugs.webkit.org/show_bug.cgi?id=124680
2690
2691         Reviewed by Dirk Schulze.
2692
2693         Do not take the writing-mode property on the float into account for shape-outside.
2694         Add a virtual method writingMode() in order to do this for shape-outside but
2695         keep old behavior (element writingMode) for shape-inside.
2696
2697         Change existing test floats/shape-outside-floats-different-writing-modes.html to test the
2698         new behavior.
2699
2700         * rendering/shapes/ShapeInfo.cpp:
2701         (WebCore::::computedShape):
2702         * rendering/shapes/ShapeInfo.h:
2703         (WebCore::ShapeInfo::writingMode):
2704         * rendering/shapes/ShapeOutsideInfo.cpp:
2705         (WebCore::ShapeOutsideInfo::writingMode):
2706         * rendering/shapes/ShapeOutsideInfo.h:
2707
2708 2013-12-06  Joseph Pecoraro  <pecoraro@apple.com>
2709
2710         Web Inspector: Remove Staging Workaround
2711         https://bugs.webkit.org/show_bug.cgi?id=125354
2712
2713         Reviewed by Timothy Hatcher.
2714
2715         * inspector/CodeGeneratorInspector.py:
2716
2717 2013-12-06  Joseph Pecoraro  <pecoraro@apple.com>
2718
2719         Simplify ScriptFunctionCall by removing dead code.
2720         https://bugs.webkit.org/show_bug.cgi?id=125274
2721
2722         Reviewed by Timothy Hatcher.
2723
2724         * bindings/js/ScriptFunctionCall.cpp:
2725         (WebCore::ScriptFunctionCall::call):
2726         * bindings/js/ScriptFunctionCall.h:
2727
2728 2013-12-06  Daniel Bates  <dabates@apple.com>
2729
2730         [iOS] Upstream WebCore/rendering changes
2731         https://bugs.webkit.org/show_bug.cgi?id=125239
2732
2733         Reviewed by Simon Fraser.
2734
2735         * WebCore.xcodeproj/project.pbxproj:
2736         * rendering/InlineBox.cpp:
2737         (WebCore::InlineBox::previousOnLineExists): Added.
2738         * rendering/InlineBox.h:
2739         * rendering/InlineTextBox.cpp:
2740         (WebCore::InlineTextBox::paintCompositionBackground): Modified to query RenderStyle
2741         on iOS for the composition fill color. Added FIXME to make this platform-independent.
2742         (WebCore::InlineTextBox::paintDecoration): Added iOS-specific decoration code.
2743         (WebCore::lineStyleForMarkerType):
2744         (WebCore::InlineTextBox::paintDocumentMarkers): Added iOS-specific code. Also, added
2745         FIXME to make this code platform-independent.
2746         * rendering/RenderBlock.cpp:
2747         (WebCore::RenderBlock::paint): Ditto.
2748         (WebCore::positionForPointRespectingEditingBoundaries): Added iOS-specific code.
2749         * rendering/RenderBlock.h: Changed access control of logical{Left, Right}SelectionOffset()
2750         from private to protected so that these methods can be used from RenderImage::collectSelectionRects().
2751         * rendering/RenderBox.cpp:
2752         (WebCore::RenderBox::borderRadii): Added.
2753         (WebCore::RenderBox::paintBoxDecorations): Added iOS-specific workaround. See <rdar://problem/6209763>
2754         for more details.
2755         (WebCore::RenderBox::computeRectForRepaint): Added iOS-specific code. 
2756         (WebCore::customContainingBlockWidth): Added; guarded by PLATFORM(IOS).
2757         (WebCore::customContainingBlockHeight): Added; guarded by PLATFORM(IOS).
2758         (WebCore::customContainingBlockLogicalWidth): Added; guarded by PLATFORM(IOS).
2759         (WebCore::customContainingBlockLogicalHeight): Added; guarded by PLATFORM(IOS).
2760         (WebCore::customContainingBlockAvailableLogicalHeight): Added; guarded by PLATFORM(IOS).
2761         (WebCore::RenderBox::availableLogicalHeightUsing): Added iOS-specific code; calls customContainingBlockAvailableLogicalHeight().
2762         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Added iOS-specific code; calls customContainingBlockLogicalWidth().
2763         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): Added iOS-specific code; calls customContainingBlockLogicalHeight().
2764         (WebCore::RenderBox::layoutOverflowRectForPropagation): Added iOS-specific code.
2765         * rendering/RenderBox.h:
2766         * rendering/RenderBoxModelObject.cpp:
2767         (WebCore::RenderBoxModelObject::stickyPositionOffset): Use FrameView::customFixedPositionLayoutRect()
2768         instead of FrameView::viewportConstrainedVisibleContentRect().
2769         * rendering/RenderButton.cpp:
2770         (WebCore::RenderButton::layout): Added; iOS-specific. Includes FIXME comment.
2771         See <rdar://problem/7675493> for more details.
2772         * rendering/RenderElement.cpp:
2773         (WebCore::RenderElement::styleWillChange): Added iOS-specific code.
2774         (WebCore::RenderElement::styleDidChange): Modified to only call areCursorsEqual() and
2775         EventHandler::scheduleCursorUpdate() on a non-iOS port.
2776         * rendering/RenderEmbeddedObject.cpp:
2777         (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing): Added iOS-specific code.
2778         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason): This method has an empty implementation for iOS.
2779         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription): Ditto.
2780         * rendering/RenderFileUploadControl.cpp:
2781         (WebCore::nodeHeight):
2782         (WebCore::RenderFileUploadControl::maxFilenameWidth): Added iOS-specific code.
2783         (WebCore::RenderFileUploadControl::paintObject): Ditto.
2784         (WebCore::RenderFileUploadControl::fileTextValue): Ditto.
2785         * rendering/RenderFrameSet.cpp:
2786         (WebCore::RenderFrameSet::positionFrames): Ditto; Also added FIXME comment as this code may not
2787         be specific to iOS.
2788         * rendering/RenderIFrame.h: Added iOS-specific workaround to RenderObject::renderName(). Added
2789         FIXME comment to determine whether this workaround is still applicable.
2790         * rendering/RenderImage.cpp:
2791         (WebCore::RenderImage::collectSelectionRects): Added; guarded by PLATFORM(IOS).
2792         (WebCore::RenderImage::paintAreaElementFocusRing): This method has an empty implementation for iOS.
2793         * rendering/RenderImage.h:
2794         * rendering/RenderInline.cpp:
2795         (WebCore::RenderInline::absoluteQuadsForSelection): Added; guarded by PLATFORM(IOS).
2796         * rendering/RenderInline.h:
2797         * rendering/RenderLayer.cpp:
2798         (WebCore::RenderLayer::RenderLayer): Added iOS-specific member initialization.
2799         (WebCore::RenderLayer::~RenderLayer): Added iOS-specific code.
2800         (WebCore::RenderLayer::willBeDestroyed): Added; iOS-specific.
2801         (WebCore::RenderLayer::hasAcceleratedTouchScrolling): Ditto.
2802         (WebCore::RenderLayer::handleTouchEvent): Ditto.
2803         (WebCore::RenderLayer::registerAsTouchEventListenerForScrolling): Ditto.
2804         (WebCore::RenderLayer::unregisterAsTouchEventListenerForScrolling): Ditto.
2805         (WebCore::RenderLayer::updateNeedsCompositedScrolling): Added iOS-specific code as we use UIKit
2806         to composite our scroll bars.
2807         (WebCore::RenderLayer::scrollTo): Added iOS-specific code.
2808         (WebCore::RenderLayer::scrollRectToVisible): Ditto.
2809         (WebCore::RenderLayer::styleChanged): Modified to make use of the passed StyleDifference on iOS.
2810         (WebCore::RenderLayer::visibleContentRect): Added; iOS-specific.
2811         (WebCore::RenderLayer::didStartScroll): Ditto.
2812         (WebCore::RenderLayer::didEndScroll): Ditto.
2813         (WebCore::RenderLayer::didUpdateScroll): Ditto.
2814         (WebCore::RenderLayer::invalidateScrollbarRect): Added iOS-specific code.
2815         (WebCore::RenderLayer::invalidateScrollCornerRect): Ditto.
2816         (WebCore::RenderLayer::verticalScrollbarWidth): Ditto.
2817         (WebCore::RenderLayer::horizontalScrollbarHeight): Ditto.
2818         (WebCore::RenderLayer::updateScrollableAreaSet): Ditto.
2819         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Add iOS-specific workaround with FIXME. See
2820         <rdar://problem/15579797> for more details.
2821         (WebCore::RenderLayer::paintOverflowControls): Added iOS-specific code.
2822         (WebCore::RenderLayer::calculateClipRects): Ditto.
2823         * rendering/RenderLayer.h:
2824         * rendering/RenderLayerBacking.cpp:
2825         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Modified to not apply page scale on iOS
2826         as we apply a page scale at a different time in the code.
2827         (WebCore::RenderLayerBacking::layerWillBeDestroyed): Added; guarded by PLATFORM(IOS).
2828         (WebCore::layerOrAncestorIsTransformedOrScrolling): Added iOS-specific variant with FIXME comment.
2829         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Added iOS-specific code.
2830         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Ditto.
2831         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Ditto.
2832         (WebCore::RenderLayerBacking::registerScrollingLayers): Ditto.
2833         (WebCore::RenderLayerBacking::updateScrollingLayers): Ditto.
2834         (WebCore::RenderLayerBacking::containsPaintedContent): Call RenderLayer::hasBoxDecorationsOrBackground()
2835         when building on iOS Simulator.
2836         (WebCore::RenderLayerBacking::parentForSublayers): Added iOS-specific code and FIXME comment.
2837         (WebCore::RenderLayerBacking::paintsIntoWindow): Opt-into coordinated graphics code path.
2838         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): Added iOS-specific code.
2839         (WebCore::RenderLayerBacking::paintIntoLayer): Compile-out ASSERT_NOT_REACHED for iOS and added FIXME comment.
2840         * rendering/RenderLayerBacking.h:
2841         * rendering/RenderLayerCompositor.cpp:
2842         (WebCore::RenderLayerCompositor::scheduleLayerFlush): Added iOS-specific code.
2843         (WebCore::RenderLayerCompositor::chromeClient): Added; guarded by PLATFORM(IOS).
2844         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Added iOS-specific code.
2845         (WebCore::scrollbarHasDisplayNone): Added; iOS-specific.
2846         (WebCore::updateScrollingLayerWithClient): Ditto.
2847         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush): Ditto.
2848         (WebCore::RenderLayerCompositor::didFlushChangesForLayer): Added iOS-specific code.
2849         (WebCore::RenderLayerCompositor::didChangeVisibleRect): Ditto.
2850         (WebCore::RenderLayerCompositor::addToOverlapMap): Don't apply page scale factor on iOS. We apply
2851         the page scale factor at a different time in the code. Also, added FIXME comment.
2852         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Added iOS-specific workaround.
2853         See <rdar://problem/8348337> for more details.
2854         (WebCore::RenderLayerCompositor::setIsInWindow): Use non-Mac code path for iOS.
2855         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Added iOS-specific code.
2856         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Ditto.
2857         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Ditto.
2858         (WebCore::RenderLayerCompositor::reasonsForCompositing): Ditto.
2859         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation): Opt-into calling
2860         AnimationController::isRunningAnimationOnRenderer() on iOS.
2861         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling): Added; guarded by PLATFORM(IOS).
2862         (WebCore::isStickyInAcceleratedScrollingLayerOrViewport): Added iOS-specific code.
2863         (WebCore::isViewportConstrainedFixedOrStickyLayer): Ditto.
2864         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Use FrameView::customFixedPositionLayoutRect()
2865         instead of FrameView::viewportConstrainedVisibleContentRect().
2866         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles): Ditto.
2867         (WebCore::RenderLayerCompositor::ensureRootLayer): Ditto.
2868         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints): Use FrameView::customFixedPositionLayoutRect()
2869         instead of FrameView::viewportConstrainedVisibleContentRect().
2870         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints): Ditto.
2871         (WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer): This method has an empty implementation for iOS
2872         as we batch update viewport-constrained layers in the iOS-specific method, RenderLayerCompositor::updateCustomLayersAfterFlush().
2873         (WebCore::RenderLayerCompositor::unregisterViewportConstrainedLayer): Ditto.
2874         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Added; guarded by PLATFORM(IOS).
2875         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Ditto.
2876         (WebCore::RenderLayerCompositor::registerAllScrollingLayers): Ditto.
2877         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Ditto.
2878         (WebCore::RenderLayerCompositor::scrollingLayerAddedOrUpdated): Ditto.
2879         (WebCore::RenderLayerCompositor::scrollingLayerRemoved): Ditto.
2880         (WebCore::RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded): Ditto.
2881         * rendering/RenderLayerCompositor.h:
2882         * rendering/RenderLayerFilterInfo.h: Added iOS-specific Clang workaround to ignore
2883         an unused private field.
2884         * rendering/RenderMenuList.cpp:
2885         (WebCore::selectedOptionCount): Added; guarded by PLATFORM(IOS).
2886         (WebCore::RenderMenuList::RenderMenuList): On iOS we don't make use of RenderMenuList::m_popupIsVisible.
2887         (WebCore::RenderMenuList::~RenderMenuList): On iOS we don't make use of RenderMenuList::m_popup.
2888         (WebCore::RenderMenuList::adjustInnerStyle): Add iOS-specific code.
2889         (RenderMenuList::updateFromElement): On iOS we don't make use of RenderMenuList::m_popup.
2890         (RenderMenuList::setTextFromOption): Add iOS-specific code.
2891         (RenderMenuList::showPopup): Define RenderMenuList::showPopup() to ASSERT_NOT_REACHED() on iOS as
2892         we don't make use of RenderMenuList::m_popup.
2893         (RenderMenuList::hidePopup): This method has an empty implementation for iOS as we don't make use
2894         of RenderMenuList::m_popup.
2895         (RenderMenuList::popupDidHide): This method has an empty implementation for iOS as we don't make use
2896         of RenderMenuList::m_popupIsVisible.
2897         * rendering/RenderMenuList.h:
2898         * rendering/RenderObject.cpp:
2899         (WebCore::RenderObject::columnNumberForOffset): Added; guarded by PLATFORM(IOS). Also, added a FIXME comment to
2900         make this function return an unsigned integer instead of a signed integer.
2901         (WebCore::RenderObject::collectSelectionRects): Added; guarded by PLATFORM(IOS).
2902         (WebCore::RenderObject::destroy): Added iOS-specific code.
2903         (WebCore::RenderObject::innerLineHeight): Added.
2904         (WebCore::RenderObject::willRenderImage): Added iOS-specific code.
2905         * rendering/RenderObject.h: Change the access control of RenderObject::drawLineForBoxSide() from protected to
2906         public so that it can be used from RenderThemeIOS::adjustMenuListButtonStyle().
2907         (WebCore::RenderObject::absoluteQuadsForSelection):
2908         * rendering/RenderScrollbar.h: Change the access control of RenderScrollbar::getScrollbarPseudoStyle() from
2909         private to public so that it can be used from the iOS-specific static function, scrollbarHasDisplayNone,
2910         defined in RenderLayerCompositor.cpp.
2911         * rendering/RenderSearchField.cpp:
2912         (WebCore::RenderSearchField::itemText): Added iOS-specific code.
2913         * rendering/RenderText.cpp:
2914         (WebCore::RenderText::collectSelectionRects): Added; guarded by PLATFORM(IOS).
2915         (WebCore::RenderText::setTextInternal): Added iOS-specific code.
2916         * rendering/RenderText.h:
2917         * rendering/RenderTextControl.cpp:
2918         (WebCore::RenderTextControl::adjustInnerTextStyle): Ditto.
2919         (WebCore::RenderTextControl::canScroll): Added; guarded by PLATFORM(IOS).
2920         (WebCore::RenderTextControl::innerLineHeight): Ditto.
2921         * rendering/RenderTextControl.h:
2922         * rendering/RenderTextControlMultiLine.cpp:
2923         (WebCore::RenderTextControlMultiLine::getAvgCharWidth): Compile-out code when building for iOS.
2924         (WebCore::RenderTextControlMultiLine::createInnerTextStyle): Added iOS-specific code.
2925         * rendering/RenderTextControlSingleLine.cpp:
2926         (WebCore::RenderTextControlSingleLine::layout): Ditto.
2927         (WebCore::RenderTextControlSingleLine::getAvgCharWidth): Compile-out code when building for iOS.
2928         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth): Ditto.
2929         * rendering/RenderTextLineBoxes.cpp:
2930         (WebCore::lineDirectionPointFitsInBox): Ditto.
2931         (WebCore::RenderTextLineBoxes::positionForPoint): Added iOS-specific code.
2932         * rendering/RenderTheme.cpp:
2933         (WebCore::RenderTheme::paintBorderOnly): Ditto.
2934         (WebCore::RenderTheme::paintDecorations): Modified to call the control-specific paint*Decorations().
2935         * rendering/RenderTheme.h:
2936         (WebCore::RenderTheme::paintCheckboxDecorations): Added.
2937         (WebCore::RenderTheme::paintRadioDecorations): Added.
2938         (WebCore::RenderTheme::paintButtonDecorations): Added.
2939         (WebCore::RenderTheme::paintTextFieldDecorations): Added.
2940         (WebCore::RenderTheme::paintTextAreaDecorations): Added.
2941         (WebCore::RenderTheme::paintMenuListDecorations): Added.
2942         (WebCore::RenderTheme::paintPushButtonDecorations): Added.
2943         (WebCore::RenderTheme::paintSquareButtonDecorations): Added.
2944         (WebCore::RenderTheme::paintFileUploadIconDecorations): Added.
2945         (WebCore::RenderTheme::paintSliderThumbDecorations): Added.
2946         (WebCore::RenderTheme::paintSearchFieldDecorations): Added.
2947         * rendering/RenderThemeIOS.h: Added.
2948         * rendering/RenderThemeIOS.mm: Added.
2949         * rendering/RenderThemeMac.h: Don't compile the contents of this file when building for iOS.
2950         * rendering/RenderThemeMac.mm: Ditto.
2951         * rendering/RenderVideo.cpp:
2952         (WebCore::RenderVideo::calculateIntrinsicSize): Compile-out code when building for iOS.
2953         * rendering/RenderView.cpp:
2954         (WebCore::RenderView::availableLogicalHeight): Add iOS-specific workaround. See <rdar://problem/7166808>.
2955         (WebCore::fixedPositionOffset): Added; used in iOS-specific code (e.g. RenderView::mapLocalToContainer()).
2956         (WebCore::RenderView::mapLocalToContainer): Use WebCore::fixedPositionOffset() instead of 
2957         FrameView::scrollOffsetForFixedPosition().
2958         (WebCore::RenderView::pushMappingToContainer): Ditto.
2959         (WebCore::RenderView::mapAbsoluteToLocalPoint): Ditto.
2960         (WebCore::RenderView::repaintViewRectangle): Ditto.
2961         (WebCore::RenderView::computeRectForRepaint): Ditto.
2962         (WebCore::isFixedPositionInViewport): Added; used in RenderView::hasCustomFixedPosition().
2963         (WebCore::RenderView::hasCustomFixedPosition): Added; guarded by PLATFORM(IOS).
2964         * rendering/RenderView.h:
2965         * rendering/RenderWidget.cpp:
2966         (WebCore::RenderWidget::willBeDestroyed): Added iOS-specific code.
2967         * rendering/RootInlineBox.cpp:
2968         (WebCore::RootInlineBox::ascentAndDescentForBox): Ditto.
2969         * rendering/break_lines.cpp: Only include header <CoreServices/CoreServices.h> when building for Mac.
2970
2971 2013-12-06  Zoltan Horvath  <zoltan@webkit.org>
2972
2973         Clean up the includes of RenderBlock.h 
2974         https://bugs.webkit.org/show_bug.cgi?id=125351
2975
2976         Reviewed by Darin Adler.
2977
2978         I turned some header includes into forward declarations. I also removed / 
2979         moved out some includes, which don't belong to RenderBlock.h anymore.
2980
2981         No new tests, no behavior change.
2982
2983         * editing/VisibleUnits.cpp:
2984         * html/HTMLInputElement.cpp:
2985         * html/HTMLTextAreaElement.cpp:
2986         * html/TextFieldInputType.cpp:
2987         * html/TextInputType.cpp:
2988         * rendering/InlineElementBox.cpp:
2989         * rendering/RenderBlock.h:
2990         * rendering/RenderBlockFlow.cpp:
2991         * rendering/line/LineBreaker.h:
2992         * rendering/line/LineWidth.cpp:
2993
2994 2013-12-06  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2995
2996         Define SHA1 hash size in SHA1.h and use it at various places.
2997         https://bugs.webkit.org/show_bug.cgi?id=125345
2998
2999         Reviewed by Darin Adler.
3000
3001         Use SHA1::hashSize instead of local variables.
3002
3003         * Modules/websockets/WebSocketHandshake.cpp:
3004         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
3005         * platform/network/soup/ResourceHandleSoup.cpp:
3006         (WebCore::HostTLSCertificateSet::computeCertificateHash):
3007
3008 2013-12-06  Dan Bernstein  <mitz@apple.com>
3009
3010         [Cocoa] Add load delegate methods for responding to authentication challenges
3011         https://bugs.webkit.org/show_bug.cgi?id=125333
3012
3013         Reviewed by Darin Adler.
3014
3015         * WebCore.exp.in: Exported core(NSURLCredential *).
3016
3017 2013-12-06  Daniel Bates  <dabates@apple.com>
3018
3019         Rename {adjust, paint}SearchFieldDecoration, {adjust, paint}SearchFieldResultsDecoration
3020         https://bugs.webkit.org/show_bug.cgi?id=125191
3021
3022         Reviewed by Joseph Pecoraro.
3023
3024         Towards upstreaming the iOS concept of render theme decorations, we should rename
3025         RenderTheme::{adjust, paint}SearchFieldDecorationStyle and RenderTheme::{adjust, paint}SearchFieldResultsDecoration
3026         to avoid ambiguity with the iOS concept.
3027
3028         * platform/efl/RenderThemeEfl.cpp:
3029         * platform/efl/RenderThemeEfl.h:
3030         * platform/gtk/RenderThemeGtk.cpp:
3031         * platform/gtk/RenderThemeGtk.h:
3032         * rendering/RenderTheme.cpp:
3033         * rendering/RenderTheme.h:
3034         * rendering/RenderThemeMac.h:
3035         * rendering/RenderThemeMac.mm:
3036         * rendering/RenderThemeSafari.cpp:
3037         * rendering/RenderThemeSafari.h:
3038         * rendering/RenderThemeWin.cpp:
3039         * rendering/RenderThemeWin.h:
3040         * rendering/RenderThemeWinCE.cpp:
3041         * rendering/RenderThemeWinCE.h:
3042
3043 2013-12-06  Andreas Kling  <akling@apple.com>
3044
3045         Make remaining CSSValue constructors return PassRef.
3046         <https://webkit.org/b/125337>
3047
3048         Tweak the remaining CSSValue create() helpers to return PassRef
3049         instead of PassRefPtr in the cases where nullptr is never returned.
3050
3051         Reviewed by Anders Carlsson.
3052
3053 2013-12-06  Roger Fong  <roger_fong@apple.com>
3054
3055         Hook into some shader symbol logic following the ANGLE update in r159533.
3056         https://bugs.webkit.org/show_bug.cgi?id=125332.
3057
3058         Reviewed by Brent Fulgham.
3059
3060         No new functionality added.
3061
3062         * html/canvas/WebGLRenderingContext.cpp: Add some error checking for errors related to 
3063             shader symbols that exist across both vertex and fragment shaders.
3064         (WebCore::WebGLRenderingContext::linkProgram):
3065         * platform/graphics/ANGLEWebKitBridge.cpp: Add logic for handling varyings 
3066             and add new fields to the ANGLEShaderSymbol struct.
3067         (WebCore::getSymbolInfo):
3068         * platform/graphics/ANGLEWebKitBridge.h:
3069         * platform/graphics/GraphicsContext3D.h: Add those same fields to the SymbolInfo struct 
3070             as well so that we can access them from our shader source map.
3071             Also add a map of varyings along side the uniforms and attributes.
3072         (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo):
3073         (WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap):
3074         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3075         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
3076         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3077         (WebCore::GraphicsContext3D::areProgramSymbolsValid): Will be filled in later, this method 
3078             will use the shader source map to check for issues with unused varyings and precisions 
3079             mismatches of shader symbols that exist across both the vertex and fragment shaders.
3080
3081 2013-12-06  Lukasz Gajowy  <l.gajowy@samsung.com>
3082
3083         [ATK] Missing aria roles mappings
3084         https://bugs.webkit.org/show_bug.cgi?id=117729
3085
3086         Reviewed by Mario Sanchez Prada.
3087
3088         Added a few mappings from ARIA roles to ATK roles.
3089
3090         Test: accessibility/aria-mappings.html
3091
3092         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3093         (atkRole):
3094
3095 2013-11-11  Philippe Normand  <pnormand@igalia.com>
3096
3097         [GStreamer] webkitwebaudiosrc element needs to emit stream-start, caps and segment events
3098         https://bugs.webkit.org/show_bug.cgi?id=123015
3099
3100         Reviewed by Martin Robinson.
3101
3102         When the source element starts emitting buffers send along various
3103         events to notify downstream elements.
3104
3105         No new tests, change covered by existing webaudio tests.
3106
3107         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
3108         (webkit_web_audio_src_init): Initialize segment.
3109         (webKitWebAudioSrcConstructed): Give an explicit name to each
3110         queue added in front of the interleave element.
3111         (webKitWebAudioSrcLoop): Before sending the first buffers push
3112         stream-start, caps and segment events on each queue's sinkpad.
3113
3114 2013-12-05  Philippe Normand  <pnormand@igalia.com>
3115
3116         [GStreamer] Audio/Video sink management is incoherent
3117         https://bugs.webkit.org/show_bug.cgi?id=125304
3118
3119         Reviewed by Gustavo Noronha Silva.
3120
3121         Allow subclasses of MediaPlayerPrivateGStreamerBase to create
3122         custom audio/video sinks in a coherent manner using
3123         create{Audio,Video}Sink methods. Convenience getters are also
3124         available. Also removed some un-needed member variables in the
3125         playbin-based player.
3126
3127         No new tests, existing media tests cover this change.
3128
3129         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3130         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3131         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
3132         (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
3133         (WebCore::MediaPlayerPrivateGStreamer::audioSink):
3134         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
3135         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3136         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3137         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3138         (WebCore::MediaPlayerPrivateGStreamerBase::createAudioSink):
3139
3140 2013-12-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3141
3142         Introduce IMAGE_TYPE_CASTS, and use it
3143         https://bugs.webkit.org/show_bug.cgi?id=125330
3144
3145         Reviewed by Ryosuke Niwa.
3146
3147         As a step to use TYPE_CASTS_BASE, this cl introduce IMAGE_TYPE_CASTS.
3148         BitmapImage and SVGImage can use it to generate toFoo() type case helper functions.
3149
3150         No new tests, no behavior changes.
3151
3152         * loader/cache/CachedImage.cpp:
3153         (WebCore::CachedImage::imageSizeForRenderer):
3154         (WebCore::CachedImage::resumeAnimatingImagesForLoader):
3155         * platform/graphics/BitmapImage.h:
3156         * platform/graphics/Image.h:
3157         * platform/mac/DragImageMac.mm:
3158         (WebCore::createDragImageFromImage):
3159         * svg/graphics/SVGImage.h:
3160
3161 2013-12-05  Zoltan Horvath  <zoltan@webkit.org>
3162
3163         Clean up the forwarding headers of RenderBlock.h
3164         https://bugs.webkit.org/show_bug.cgi?id=125323
3165
3166         Reviewed by Ryosuke Niwa.
3167
3168         In this patch, I removed the unnecessary forwarding headers from RenderBlock.h, and moved some to RenderBlockFlow.h.
3169
3170         No new tests, no behavior change.
3171
3172         * rendering/RenderBlock.h: Remove unnecessary forwarding headers.
3173         * rendering/RenderBlockFlow.h: Moved some forwarding headers from RenderBlock.h
3174
3175 2013-12-04  Oliver Hunt  <oliver@apple.com>
3176
3177         Refactor static getter function prototype to include thisValue in addition to the base object
3178         https://bugs.webkit.org/show_bug.cgi?id=124461
3179
3180         Reviewed by Geoffrey Garen.
3181
3182         Change bindings codegen to produce static getter functions
3183         with the correct types.  Also update the many custom implementations
3184         to the new type.
3185
3186         No change in behaviour.
3187
3188         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3189         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
3190         (WebCore::cssPropertyGetterCallback):
3191         * bindings/js/JSDOMBinding.cpp:
3192         (WebCore::objectToStringFunctionGetter):
3193         * bindings/js/JSDOMBinding.h:
3194         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
3195         (WebCore::JSDOMMimeTypeArray::nameGetter):
3196         * bindings/js/JSDOMPluginArrayCustom.cpp:
3197         (WebCore::JSDOMPluginArray::nameGetter):
3198         * bindings/js/JSDOMPluginCustom.cpp:
3199         (WebCore::JSDOMPlugin::nameGetter):
3200         * bindings/js/JSDOMStringMapCustom.cpp:
3201         (WebCore::JSDOMStringMap::nameGetter):
3202         * bindings/js/JSDOMWindowCustom.cpp:
3203         (WebCore::nonCachingStaticFunctionGetter):
3204         (WebCore::childFrameGetter):
3205         (WebCore::indexGetter):
3206         (WebCore::namedItemGetter):
3207         * bindings/js/JSHTMLAllCollectionCustom.cpp:
3208         (WebCore::JSHTMLAllCollection::nameGetter):
3209         * bindings/js/JSHTMLCollectionCustom.cpp:
3210         (WebCore::JSHTMLCollection::nameGetter):
3211         * bindings/js/JSHTMLDocumentCustom.cpp:
3212         (WebCore::JSHTMLDocument::nameGetter):
3213         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
3214         (WebCore::JSHTMLFormControlsCollection::nameGetter):
3215         * bindings/js/JSHTMLFormElementCustom.cpp:
3216         (WebCore::JSHTMLFormElement::nameGetter):
3217         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
3218         (WebCore::JSHTMLFrameSetElement::nameGetter):
3219         * bindings/js/JSHistoryCustom.cpp:
3220         (WebCore::nonCachingStaticBackFunctionGetter):
3221         (WebCore::nonCachingStaticForwardFunctionGetter):
3222         (WebCore::nonCachingStaticGoFunctionGetter):
3223         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
3224         (WebCore::JSJavaScriptCallFrame::scopeType):
3225         * bindings/js/JSLocationCustom.cpp:
3226         (WebCore::nonCachingStaticReplaceFunctionGetter):
3227         (WebCore::nonCachingStaticReloadFunctionGetter):
3228         (WebCore::nonCachingStaticAssignFunctionGetter):
3229         * bindings/js/JSNamedNodeMapCustom.cpp:
3230         (WebCore::JSNamedNodeMap::nameGetter):
3231         * bindings/js/JSNodeListCustom.cpp:
3232         (WebCore::JSNodeList::nameGetter):
3233         * bindings/js/JSPluginElementFunctions.cpp:
3234         (WebCore::pluginElementPropertyGetter):
3235         * bindings/js/JSPluginElementFunctions.h:
3236         * bindings/js/JSRTCStatsResponseCustom.cpp:
3237         (WebCore::JSRTCStatsResponse::nameGetter):
3238         * bindings/js/JSStorageCustom.cpp:
3239         (WebCore::JSStorage::nameGetter):
3240         * bindings/js/JSStyleSheetListCustom.cpp:
3241         (WebCore::JSStyleSheetList::nameGetter):
3242         * bindings/scripts/CodeGeneratorJS.pm:
3243         (GenerateHeader):
3244         (GenerateImplementation):
3245         (GenerateParametersCheck):
3246         * bridge/runtime_array.cpp:
3247         (JSC::RuntimeArray::lengthGetter):
3248         (JSC::RuntimeArray::indexGetter):
3249         * bridge/runtime_array.h:
3250         * bridge/runtime_method.cpp:
3251         (JSC::RuntimeMethod::lengthGetter):
3252         * bridge/runtime_method.h:
3253         * bridge/runtime_object.cpp:
3254         (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
3255         (JSC::Bindings::RuntimeObject::fieldGetter):
3256         (JSC::Bindings::RuntimeObject::methodGetter):
3257         * bridge/runtime_object.h:
3258
3259 2013-12-05  Tim Horton  <timothy_horton@apple.com>
3260
3261         Remove Image::decodedSize()
3262         https://bugs.webkit.org/show_bug.cgi?id=125327
3263
3264         Reviewed by Sam Weinig.
3265
3266         No new tests, just removing dead code.
3267
3268         * platform/graphics/BitmapImage.cpp:
3269         (WebCore::BitmapImage::resetAnimation):
3270         * platform/graphics/BitmapImage.h:
3271         * platform/graphics/GeneratedImage.h:
3272         * platform/graphics/Image.h:
3273         * platform/graphics/cg/PDFDocumentImage.cpp:
3274         * platform/graphics/cg/PDFDocumentImage.h:
3275         * svg/graphics/SVGImage.h:
3276         * svg/graphics/SVGImageForContainer.h:
3277
3278 2013-12-05  Commit Queue  <commit-queue@webkit.org>
3279
3280         Unreviewed, rolling out r160133.
3281         http://trac.webkit.org/changeset/160133
3282         https://bugs.webkit.org/show_bug.cgi?id=125325
3283
3284         broke bindings tests on all the bots (Requested by thorton on
3285         #webkit).
3286
3287         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3288         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
3289         (WebCore::cssPropertyGetterCallback):
3290         * bindings/js/JSDOMBinding.cpp:
3291         (WebCore::objectToStringFunctionGetter):
3292         * bindings/js/JSDOMBinding.h:
3293         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
3294         (WebCore::JSDOMMimeTypeArray::nameGetter):
3295         * bindings/js/JSDOMPluginArrayCustom.cpp:
3296         (WebCore::JSDOMPluginArray::nameGetter):
3297         * bindings/js/JSDOMPluginCustom.cpp:
3298         (WebCore::JSDOMPlugin::nameGetter):
3299         * bindings/js/JSDOMStringMapCustom.cpp:
3300         (WebCore::JSDOMStringMap::nameGetter):
3301         * bindings/js/JSDOMWindowCustom.cpp:
3302         (WebCore::nonCachingStaticFunctionGetter):
3303         (WebCore::childFrameGetter):
3304         (WebCore::indexGetter):
3305         (WebCore::namedItemGetter):
3306         * bindings/js/JSHTMLAllCollectionCustom.cpp:
3307         (WebCore::JSHTMLAllCollection::nameGetter):
3308         * bindings/js/JSHTMLCollectionCustom.cpp:
3309         (WebCore::JSHTMLCollection::nameGetter):
3310         * bindings/js/JSHTMLDocumentCustom.cpp:
3311         (WebCore::JSHTMLDocument::nameGetter):
3312         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
3313         (WebCore::JSHTMLFormControlsCollection::nameGetter):
3314         * bindings/js/JSHTMLFormElementCustom.cpp:
3315         (WebCore::JSHTMLFormElement::nameGetter):
3316         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
3317         (WebCore::JSHTMLFrameSetElement::nameGetter):
3318         * bindings/js/JSHistoryCustom.cpp:
3319         (WebCore::nonCachingStaticBackFunctionGetter):
3320         (WebCore::nonCachingStaticForwardFunctionGetter):
3321         (WebCore::nonCachingStaticGoFunctionGetter):
3322         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
3323         (WebCore::JSJavaScriptCallFrame::scopeType):
3324         * bindings/js/JSLocationCustom.cpp:
3325         (WebCore::nonCachingStaticReplaceFunctionGetter):
3326         (WebCore::nonCachingStaticReloadFunctionGetter):
3327         (WebCore::nonCachingStaticAssignFunctionGetter):
3328         * bindings/js/JSNamedNodeMapCustom.cpp:
3329         (WebCore::JSNamedNodeMap::nameGetter):
3330         * bindings/js/JSNodeListCustom.cpp:
3331         (WebCore::JSNodeList::nameGetter):
3332         * bindings/js/JSPluginElementFunctions.cpp:
3333         (WebCore::pluginElementPropertyGetter):
3334         * bindings/js/JSPluginElementFunctions.h:
3335         * bindings/js/JSRTCStatsResponseCustom.cpp:
3336         (WebCore::JSRTCStatsResponse::nameGetter):
3337         * bindings/js/JSStorageCustom.cpp:
3338         (WebCore::JSStorage::nameGetter):
3339         * bindings/js/JSStyleSheetListCustom.cpp:
3340         (WebCore::JSStyleSheetList::nameGetter):
3341         * bindings/scripts/CodeGeneratorJS.pm:
3342         (GenerateHeader):
3343         (GenerateImplementation):
3344         (GenerateParametersCheck):
3345         * bridge/runtime_array.cpp:
3346         (JSC::RuntimeArray::lengthGetter):
3347         (JSC::RuntimeArray::indexGetter):
3348         * bridge/runtime_array.h:
3349         * bridge/runtime_method.cpp:
3350         (JSC::RuntimeMethod::lengthGetter):
3351         * bridge/runtime_method.h:
3352         * bridge/runtime_object.cpp:
3353         (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
3354         (JSC::Bindings::RuntimeObject::fieldGetter):
3355         (JSC::Bindings::RuntimeObject::methodGetter):
3356         * bridge/runtime_object.h:
3357
3358 2013-12-05  Seokju Kwon  <seokju@webkit.org>
3359
3360         Web Inspector: Remove 'cookiesString' output from Page.getCookies
3361         https://bugs.webkit.org/show_bug.cgi?id=125268
3362
3363         Reviewed by Timothy Hatcher.
3364
3365         Remove 'cookiesString' output from Page.getCookies protocol.
3366         It is no longer meaningful because it is an unused parameter.
3367
3368         No new tests, no behavior change.
3369
3370         * inspector/InspectorPageAgent.cpp:
3371         (WebCore::InspectorPageAgent::getCookies):
3372         * inspector/InspectorPageAgent.h:
3373         * inspector/protocol/Page.json:
3374
3375 2013-12-05  Brian J. Burg  <burg@cs.washington.edu>
3376
3377         Web Inspector: expose node and frame snapshot capabilities.
3378         https://bugs.webkit.org/show_bug.cgi?id=124326
3379
3380         Reviewed by Joseph Pecoraro.
3381
3382         This adds snapshotRect() and snapshotNode() to the Page domain.
3383         Both methods create snapshots using FrameSnapshotting APIs
3384         and send images to the inspector frontend as a data URL.
3385
3386         Remove the unimplemented Page.captureScreenshot API.
3387
3388         * inspector/InspectorPageAgent.cpp:
3389         (WebCore::InspectorPageAgent::snapshotNode): Added.
3390         (WebCore::InspectorPageAgent::snapshotRect): Added.
3391         * inspector/InspectorPageAgent.h:
3392         * inspector/protocol/Page.json: Added new protocol APIs.
3393
3394 2013-12-04 Bear Travis <betravis@adobe.com>
3395
3396     [CSS Shapes] Enable CSS Shapes on Windows
3397     https://bugs.webkit.org/show_bug.cgi?id=89957
3398
3399     Reviewed by Brent Fulgham.
3400
3401     * css/CSSPropertyNames.in: Tweak to&