fb4296a67621f13c1fd72ea93157be2e5275365d
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-03  Andreas Kling  <akling@apple.com>
2
3         CSSPrimitiveValue identifier constructors should return PassRef.
4         <https://webkit.org/b/123712>
5
6         Make CSSPrimitiveValue::createIdentifier() and the corresponding
7         CSSValuePool helper return PassRef<CSSPrimitiveValue>.
8
9         Reviewed by Antti Koivisto.
10
11 2013-11-03  Andreas Kling  <akling@apple.com>
12
13         Use RenderChildIterator in two more loops.
14         <https://webkit.org/b/123713>
15
16         Switch two more renderer child traversal loops to childrenOfType.
17
18         Reviewed by Antti Koivisto.
19
20 2013-11-03  Andreas Kling  <akling@apple.com>
21
22         CSSShadowValue constructor should return PassRef.
23         <https://webkit.org/b/123711>
24
25         Make CSSShadowValue::create() return a PassRef since it will never
26         return null.
27
28         Reviewed by Sam Weinig.
29
30 2013-11-03  Andreas Kling  <akling@apple.com>
31
32         CSSLineBoxContainValue constructor should return PassRef.
33         <https://webkit.org/b/123710>
34
35         Make CSSLineBoxContainValue::create() return a PassRef since it
36         will never return null.
37
38         Reviewed by Sam Weinig.
39
40 2013-11-03  Antti Koivisto  <antti@apple.com>
41
42         LiveNodeLists should have non-null ContainerNode as root
43         https://bugs.webkit.org/show_bug.cgi?id=123709
44
45         Reviewed by Andreas Kling.
46
47         After moving ChildNodeList off from LiveNodeList the root is now always at least a ContainerNode.
48
49         * dom/ContainerNode.cpp:
50         (WebCore::ContainerNode::getElementsByTagName):
51         (WebCore::ContainerNode::getElementsByTagNameNS):
52         (WebCore::ContainerNode::getElementsByName):
53         (WebCore::ContainerNode::getElementsByClassName):
54         (WebCore::ContainerNode::radioNodeList):
55         
56             Also these move from Node to ContainerNode to make tighter typing work.
57
58 2013-11-03  Antti Koivisto  <antti@apple.com>
59
60         Switch createContextualFragment to element iterator
61         https://bugs.webkit.org/show_bug.cgi?id=123704
62
63         Reviewed by Andreas Kling.
64
65         * editing/FrameSelection.cpp:
66         (WebCore::scanForForm):
67         
68             Use type helpers instead of hasTagName
69
70         * editing/markup.cpp:
71         (WebCore::collectElementsToRemoveFromFragment):
72         (WebCore::removeElementFromFragmentPreservingChildren):
73         (WebCore::createContextualFragment):
74         * html/HTMLFormElement.cpp:
75         (WebCore::HTMLFormElement::formElementIndex):
76         
77             Use type helpers instead of hasTagName
78
79         * html/HTMLTagNames.in:
80         
81             Generate type helpers for <html>.
82
83 2013-11-03  Antti Koivisto  <antti@apple.com>
84
85         ChildNodeList should not be LiveNodeList
86         https://bugs.webkit.org/show_bug.cgi?id=123708
87
88         Reviewed by Sam Weinig.
89
90         ChildNodeList is a poor fit to be a LiveNodeList. It is heavily special-cased. It is also
91         the only subtype that returns non-Elements thus preventing tightening.
92
93         * bindings/js/JSNodeListCustom.cpp:
94         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
95         
96             Support new types.
97
98         * dom/ChildNodeList.cpp:
99         (WebCore::EmptyNodeList::~EmptyNodeList):
100         (WebCore::ChildNodeList::ChildNodeList):
101         (WebCore::ChildNodeList::~ChildNodeList):
102         (WebCore::ChildNodeList::length):
103         (WebCore::childFromFirst):
104         (WebCore::childFromLast):
105         (WebCore::ChildNodeList::nodeBeforeCached):
106         (WebCore::ChildNodeList::nodeAfterCached):
107         (WebCore::ChildNodeList::item):
108         (WebCore::ChildNodeList::namedItem):
109         (WebCore::ChildNodeList::invalidateCache):
110         
111             Implement the same caching optimizations as LiveNodeList with tighter, less generic code.
112
113         * dom/ChildNodeList.h:
114         
115             Inherit ChildNodeList directly from NodeList.
116
117             Add new EmptyNodeList type. This is only ever used if NodeList is requested for a non-container node.
118             It allows tighter typing in ChildNodeList.
119
120         * dom/LiveNodeList.cpp:
121         (WebCore::LiveNodeList::namedItem):
122         * dom/LiveNodeList.h:
123         (WebCore::LiveNodeListBase::LiveNodeListBase):
124         (WebCore::LiveNodeListBase::~LiveNodeListBase):
125         (WebCore::LiveNodeList::LiveNodeList):
126         
127             Remove ChildNodeList specific code and branches.
128
129         * dom/Node.cpp:
130         (WebCore::Node::childNodes):
131         
132             Return EmptyNodeList for non-containers.
133
134         * dom/NodeList.h:
135         (WebCore::NodeList::~NodeList):
136         (WebCore::NodeList::isLiveNodeList):
137         (WebCore::NodeList::isChildNodeList):
138         (WebCore::NodeList::isEmptyNodeList):
139         
140             For isReachableFromOpaqueRoots.
141
142         * dom/NodeRareData.h:
143         (WebCore::NodeListsNodeData::ensureChildNodeList):
144         (WebCore::NodeListsNodeData::removeChildNodeList):
145         (WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
146         (WebCore::NodeListsNodeData::removeEmptyChildNodeList):
147         (WebCore::NodeListsNodeData::NodeListsNodeData):
148         (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
149         
150             EmptyNodeList support.
151
152         * html/CollectionType.h:
153         * html/HTMLCollection.cpp:
154         (WebCore::shouldOnlyIncludeDirectChildren):
155         (WebCore::rootTypeFromCollectionType):
156         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
157         (WebCore::isMatchingElement):
158         (WebCore::LiveNodeListBase::itemBefore):
159         (WebCore::LiveNodeListBase::traverseLiveNodeListFirstElement):
160         (WebCore::LiveNodeListBase::traverseLiveNodeListForwardToOffset):
161         (WebCore::LiveNodeListBase::item):
162         (WebCore::LiveNodeListBase::itemBeforeOrAfterCachedItem):
163         
164             Remove ChildNodeList specific code and branches.
165
166 2013-11-03  Patrick Gansterer  <paroga@webkit.org>
167
168         [WINCE] Replace OwnPtr with GDIObject
169         https://bugs.webkit.org/show_bug.cgi?id=123670
170
171         Reviewed by Anders Carlsson.
172
173         * page/win/FrameGdiWin.cpp:
174         (WebCore::imageFromRect):
175         * platform/graphics/wince/FontPlatformData.cpp:
176         (WebCore::FixedSizeFontData::create):
177         (WebCore::FontPlatformData::hfont):
178         (WebCore::FontPlatformData::getScaledFontHandle):
179         * platform/graphics/wince/GraphicsContextWinCE.cpp:
180         (WebCore::createPen):
181         (WebCore::createBrush):
182         (WebCore::GraphicsContext::drawRect):
183         (WebCore::GraphicsContext::drawLine):
184         (WebCore::GraphicsContext::drawEllipse):
185         (WebCore::GraphicsContext::drawConvexPolygon):
186         (WebCore::GraphicsContext::fillRect):
187         (WebCore::GraphicsContext::clip):
188         (WebCore::GraphicsContext::strokeRect):
189         (WebCore::GraphicsContext::fillRoundedRect):
190         (WebCore::GraphicsContext::drawRoundCorner):
191         (WebCore::GraphicsContext::fillPath):
192         (WebCore::GraphicsContext::strokePath):
193         (WebCore::GraphicsContext::drawText):
194         * platform/graphics/wince/ImageWinCE.cpp:
195         (WebCore::BitmapImage::getHBITMAPOfSize):
196         * platform/graphics/wince/SharedBitmap.cpp:
197         (WebCore::SharedBitmap::createHandle):
198         (WebCore::SharedBitmap::draw):
199         (WebCore::SharedBitmap::clipBitmap):
200         (WebCore::drawPatternSimple):
201         (WebCore::SharedBitmap::drawPattern):
202         (WebCore::SharedBitmap::DCProvider::getDC):
203         * platform/graphics/wince/SharedBitmap.h:
204
205 2013-11-03  Antti Koivisto  <antti@apple.com>
206
207         Add helpers for partial descendant traversal to element iterators
208         https://bugs.webkit.org/show_bug.cgi?id=123703
209
210         Reviewed by Andreas Kling.
211
212         * dom/ElementAncestorIterator.h:
213         (WebCore::lineageOfType):
214         
215             lineageOfType definition didn't match the declaration.
216
217         * dom/ElementDescendantIterator.h:
218         (WebCore::::find):
219         (WebCore::::from):
220         
221             Add find and from for getting begin iterator for partial traversals.
222
223         * editing/FrameSelection.cpp:
224         (WebCore::scanForForm):
225         (WebCore::FrameSelection::currentForm):
226         * html/HTMLFormElement.cpp:
227         (WebCore::HTMLFormElement::formElementIndex):
228         (WebCore::HTMLFormElement::findClosestFormAncestor):
229         
230             Use them in a few places.
231
232 2013-11-03  Andreas Kling  <akling@apple.com>
233
234         Inline RenderStyle functions for getting/setting pseudo style bits.
235         <https://webkit.org/b/123702>
236
237         hasPseudoStyle() actually shows up on html5-full-render.html,
238         and it's pretty crazy to eat the cost of a function call just
239         to do some basic bit twiddling.
240
241         Reviewed by Antti Koivisto.
242
243 2013-11-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
244
245         Remove HTMLMediaElement.initialTime
246         https://bugs.webkit.org/show_bug.cgi?id=123572
247
248         Reviewed by Eric Carlson.
249
250         Patch based on one by: philipj@opera.com
251         Blink review URL: https://codereview.chromium.org/35033002
252
253         initialTime has been removed from the HTMLMediaElement.
254
255         * bindings/gobject/WebKitDOMCustom.cpp:
256         (webkit_dom_html_media_element_get_initial_time):
257         * bindings/gobject/WebKitDOMCustom.h:
258         * bindings/gobject/WebKitDOMCustom.symbols: Added phony function.
259         * html/HTMLMediaElement.cpp:
260         * html/HTMLMediaElement.h:
261         * html/HTMLMediaElement.idl: Removed HTMLMediaElement::initialTime.
262
263 2013-11-02  Alexey Proskuryakov  <ap@apple.com>
264
265         Implement generateKey for HMAC and AES-CBC
266         https://bugs.webkit.org/show_bug.cgi?id=123669
267
268         Reviewed by Dan Bernstein.
269
270         Tests: crypto/subtle/aes-cbc-generate-key.html
271                crypto/subtle/hmac-generate-key.html
272
273         * WebCore.xcodeproj/project.pbxproj: Added new files.
274
275         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
276         (WebCore::createAesKeyGenParams): Added bindings for AesKeyGenParams.
277         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Handle
278         algorithms that generate AES and HMAC keys.
279
280         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::generateKey): Added.
281
282         * crypto/CryptoAlgorithmAesKeyGenParams.h: Added.
283
284         * crypto/CryptoKey.cpp: (WebCore::CryptoKey::randomData):
285         * crypto/CryptoKey.h:
286         * crypto/CryptoKeyMac.cpp: Added
287         Expose a function that produces random data for symmetric crypto keys. Cross-platform
288         implementation uses ARC4 code from WTF, while Mac uses a system function that
289         provides a FIPS validated random number generator.
290
291         * crypto/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::generate):
292         * crypto/CryptoKeyAES.h:
293         Added a function that creates AES keys.
294
295         * crypto/SubtleCrypto.idl: Added generateKey.
296
297         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
298         (WebCore::CryptoAlgorithmAES_CBC::generateKey): Added.
299
300         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
301         (WebCore::CryptoAlgorithmHMAC::generateKey): Added.
302
303         * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::generate):
304         * crypto/keys/CryptoKeyHMAC.h:
305         Added a function that creates HMAC keys.
306
307         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Removed generateKey stub, the implementation
308         ended up in cross-platform file.
309
310         * crypto/mac/CryptoAlgorithmHMACMac.cpp: Ditto.
311
312 2013-11-02  Christophe Dumez  <ch.dumez@samsung.com>
313
314         EnforceRange doesn't enforce range of a short
315         https://bugs.webkit.org/show_bug.cgi?id=123661
316
317         Reviewed by Alexey Proskuryakov.
318
319         Handle Web IDL short / unsigned short types as per the
320         specification:
321         - http://www.w3.org/TR/WebIDL/#es-short
322         - http://www.w3.org/TR/WebIDL/#es-unsigned-short
323
324         Specifically, we used to treat short / unsigned short as 32bit
325         integers, which was wrong. We now properly handle them as 16bit
326         integers.
327
328         No new tests, added test cases to js/dom/webidl-type-mapping.html.
329
330         * WebCore.exp.in:
331         * bindings/js/JSDOMBinding.cpp:
332         (WebCore::toSmallerInt):
333         (WebCore::toSmallerUInt):
334         (WebCore::toInt8):
335         (WebCore::toUInt8):
336         (WebCore::toInt16):
337         (WebCore::toUInt16):
338         * bindings/js/JSDOMBinding.h:
339         * bindings/scripts/CodeGeneratorJS.pm:
340         (JSValueToNative):
341         * bindings/scripts/test/JS/JSTestObj.cpp:
342         (WebCore::setJSTestObjShortAttr):
343         (WebCore::setJSTestObjUnsignedShortAttr):
344         * testing/TypeConversions.h:
345         (WebCore::TypeConversions::testShort):
346         (WebCore::TypeConversions::setTestShort):
347         (WebCore::TypeConversions::testEnforceRangeShort):
348         (WebCore::TypeConversions::setTestEnforceRangeShort):
349         (WebCore::TypeConversions::testUnsignedShort):
350         (WebCore::TypeConversions::setTestUnsignedShort):
351         (WebCore::TypeConversions::testEnforceRangeUnsignedShort):
352         (WebCore::TypeConversions::setTestEnforceRangeUnsignedShort):
353         * testing/TypeConversions.idl:
354
355 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
356
357         Cleanup OpenTypeUtilities
358         https://bugs.webkit.org/show_bug.cgi?id=123686
359
360         Reviewed by Darin Adler.
361
362         Merge the WinCE specific code into the general Windows code to
363         make the compilation of WinCE port on WinNT easier.
364
365         * platform/graphics/opentype/OpenTypeUtilities.cpp:
366         (WebCore::renameFont):
367         (WebCore::renameAndActivateFont):
368         * platform/graphics/opentype/OpenTypeUtilities.h:
369         * platform/graphics/win/FontCustomPlatformData.cpp:
370         (WebCore::createFontCustomPlatformData):
371         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
372         (WebCore::createFontCustomPlatformData):
373         * platform/graphics/wince/FontCustomPlatformData.cpp:
374         (WebCore::createFontCustomPlatformData):
375
376 2013-11-02  Andreas Kling  <akling@apple.com>
377
378         CSSFontFaceSrcValue constructors should return PassRef.
379         <https://webkit.org/b/123692>
380
381         Make functions that return non-null CSSFontFaceSrcValues return
382         PassRef instead of PassRefPtr. Tweak some call sites to be
383         slightly more efficient.
384
385         Reviewed by Anders Carlsson.
386
387 2013-11-02  Andreas Kling  <akling@apple.com>
388
389         CSSStyleSheet::contents() should return a reference.
390         <https://webkit.org/b/123689>
391
392         Make CSSStyleSheet::contents() return a StyleSheetContents& instead
393         of a pointer. The object was already stored in a Ref.
394
395         Reviewed by Anders Carlsson.
396
397 2013-11-02  Andreas Kling  <akling@apple.com>
398
399         CSSReflectValue constructor should return PassRef.
400         <https://webkit.org/b/123963>
401
402         Make CSSReflectValue::create() return a PassRef. Tweak one call
403         site to be slightly more efficient.
404
405         Reviewed by Anders Carlsson.
406
407 2013-11-02  Andreas Kling  <akling@apple.com>
408
409         CSSFontFeatureValue constructor should return PassRef.
410         <https://webkit.org/b/123691>
411
412         Make CSSFontFeatureValue::create() return PassRef, since it never
413         returns null. Tweak one call site to be slightly more efficient.
414
415         Reviewed by Anders Carlsson.
416
417 2013-11-02  Andreas Kling  <akling@apple.com>
418
419         Tighten typing in SVGResources::buildCachedResources().
420         <https://webkit.org/b/123690>
421
422         Make this function take a RenderElement&/SVGRenderStyle& pair instead
423         of a RenderObject*/SVGRenderStyle* pair. Also tweaked the code a bit,
424         removing ampersands and asserts as appropriate.
425
426         Reviewed by Anders Carlsson.
427
428 2013-11-02  Andreas Kling  <akling@apple.com>
429
430         CSSImageValue constructors should return PassRef.
431         <https://webkit.org/b/123688>
432
433         Make the CSSImageValue::create() helpers return PassRef.
434         Tightened call sites to avoid null checks and destructor calls.
435
436         Reviewed by Anders Carlsson.
437
438 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
439
440         Fix compilation of SynchronousLoaderClient
441         https://bugs.webkit.org/show_bug.cgi?id=123676
442
443         Reviewed by Darin Adler.
444
445         Assign a ResourceRequest varibale an empty ResourceRequest instead of 0.
446         The current solution only works for ports which can create a
447         ResourceRequest from a pointer, which might not be true for all ports.
448
449         * platform/network/SynchronousLoaderClient.cpp:
450         (WebCore::SynchronousLoaderClient::willSendRequest):
451
452 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
453
454         Port LoggingWin.cpp to WinCE
455         https://bugs.webkit.org/show_bug.cgi?id=123678
456
457         Reviewed by Darin Adler.
458
459         This makes it easier to use a common list of files
460         for the different Windows ports later.
461
462         * PlatformWin.cmake:
463         * platform/win/LoggingWin.cpp:
464         (WebCore::logLevelString):
465
466 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
467
468         Fix UnicodeWchar after r157330.
469         https://bugs.webkit.org/show_bug.cgi?id=123668
470
471         Reviewed by Darin Adler.
472
473         * editing/TextIterator.cpp:
474         (WebCore::SearchBuffer::append):
475         * platform/graphics/wince/FontWinCE.cpp:
476         (WebCore::generateComponents):
477         * platform/graphics/wince/GraphicsContextWinCE.cpp:
478         (WebCore::GraphicsContext::drawText):
479         * platform/text/wchar/TextBreakIteratorWchar.cpp:
480         (WebCore::isCharStop):
481         (WebCore::isLineStop):
482         (WebCore::isSentenceStop):
483         (WebCore::WordBreakIterator::next):
484         (WebCore::WordBreakIterator::previous):
485
486 2013-11-02  Andreas Kling  <akling@apple.com>
487
488         Use RenderChildIterator in a couple of places.
489         <https://webkit.org/b/123684>
490
491         Added isRendererOfType() for RenderBox and RenderBlock and switch
492         some loops over to using childrenOfType<>. Also sprinkled const
493         and references on touched code.
494
495         Reviewed by Antti Koivisto.
496
497 2013-11-02  Zan Dobersek  <zdobersek@igalia.com>
498
499         Manage FileReaderLoader through std::unique_ptr
500         https://bugs.webkit.org/show_bug.cgi?id=123666
501
502         Reviewed by Anders Carlsson.
503
504         Construct FileReaderLoader objects through std::make_unique and store them in std::unique_ptr.
505
506         * fileapi/FileReader.cpp:
507         (WebCore::FileReader::readInternal):
508         * fileapi/FileReader.h:
509
510 2013-11-02  Andreas Kling  <akling@apple.com>
511
512         Add a child renderer iterator.
513         <https://webkit.org/b/123662>
514
515         Introduce an ElementIterator-style iterator for renderers and put
516         it to use in a childrenOfType() implementation.
517
518         It's used just like the Element iterators:
519
520         auto sections = childrenOfType<RenderTableSection>(*this);
521         for (auto section = sections.begin(), section = sections.end(); section != sections.end(); ++section)
522             section->thisOrThat();
523
524         Just like the DOM counterpart, it relies on a templatized helper:
525
526             bool isRendererOfType<T>(const RenderObject&)
527
528         This patch puts the iterator to use in a couple of random places.
529
530         Reviewed by Antti Koivisto.
531
532 2013-11-02  Alexey Proskuryakov  <ap@apple.com>
533
534         Implement remaining SHA variations for WebCrypto
535         https://bugs.webkit.org/show_bug.cgi?id=123659
536
537         Reviewed by Anders Carlsson.
538
539         Tests: crypto/subtle/sha-224.html
540                crypto/subtle/sha-256.html
541                crypto/subtle/sha-384.html
542                crypto/subtle/sha-512.html
543
544         * WebCore.xcodeproj/project.pbxproj:
545         * crypto/algorithms/CryptoAlgorithmSHA224.cpp: Added.
546         (WebCore::CryptoAlgorithmSHA224::CryptoAlgorithmSHA224):
547         (WebCore::CryptoAlgorithmSHA224::~CryptoAlgorithmSHA224):
548         (WebCore::CryptoAlgorithmSHA224::create):
549         (WebCore::CryptoAlgorithmSHA224::identifier):
550         * crypto/algorithms/CryptoAlgorithmSHA224.h: Added.
551         * crypto/algorithms/CryptoAlgorithmSHA256.cpp: Added.
552         (WebCore::CryptoAlgorithmSHA256::CryptoAlgorithmSHA256):
553         (WebCore::CryptoAlgorithmSHA256::~CryptoAlgorithmSHA256):
554         (WebCore::CryptoAlgorithmSHA256::create):
555         (WebCore::CryptoAlgorithmSHA256::identifier):
556         * crypto/algorithms/CryptoAlgorithmSHA256.h: Added.
557         * crypto/algorithms/CryptoAlgorithmSHA384.cpp: Added.
558         (WebCore::CryptoAlgorithmSHA384::CryptoAlgorithmSHA384):
559         (WebCore::CryptoAlgorithmSHA384::~CryptoAlgorithmSHA384):
560         (WebCore::CryptoAlgorithmSHA384::create):
561         (WebCore::CryptoAlgorithmSHA384::identifier):
562         * crypto/algorithms/CryptoAlgorithmSHA384.h: Added.
563         * crypto/algorithms/CryptoAlgorithmSHA512.cpp: Added.
564         (WebCore::CryptoAlgorithmSHA512::CryptoAlgorithmSHA512):
565         (WebCore::CryptoAlgorithmSHA512::~CryptoAlgorithmSHA512):
566         (WebCore::CryptoAlgorithmSHA512::create):
567         (WebCore::CryptoAlgorithmSHA512::identifier):
568         * crypto/algorithms/CryptoAlgorithmSHA512.h: Added.
569         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
570         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
571         * crypto/mac/CryptoAlgorithmSHA224Mac.cpp: Added.
572         (WebCore::CryptoAlgorithmSHA224::digest):
573         * crypto/mac/CryptoAlgorithmSHA256Mac.cpp: Added.
574         (WebCore::CryptoAlgorithmSHA256::digest):
575         * crypto/mac/CryptoAlgorithmSHA384Mac.cpp: Added.
576         (WebCore::CryptoAlgorithmSHA384::digest):
577         * crypto/mac/CryptoAlgorithmSHA512Mac.cpp: Added.
578         (WebCore::CryptoAlgorithmSHA512::digest):
579
580 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
581
582         Various small WinCE build fixes
583
584         * editing/TextIterator.cpp:
585         (WebCore::SearchBuffer::append):
586         * platform/graphics/BitmapImage.h:
587         * platform/graphics/wince/ImageWinCE.cpp:
588         (WebCore::BitmapImage::getHBITMAPOfSize):
589         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
590         * platform/graphics/wince/PlatformPathWinCE.h:
591         * platform/win/PopupMenuWin.h:
592         * rendering/RenderThemeWinCE.cpp:
593         (WebCore::RenderThemeWinCE::adjustMenuListButtonStyle):
594
595 2013-11-01  Alexey Proskuryakov  <ap@apple.com>
596
597         Add WebCrypto AES-CBC
598         https://bugs.webkit.org/show_bug.cgi?id=123647
599
600         Reviewed by Anders Carlsson.
601
602         Tests: crypto/subtle/aes-cbc-192-encrypt-decrypt.html
603                crypto/subtle/aes-cbc-256-encrypt-decrypt.html
604                crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html
605                crypto/subtle/aes-cbc-encrypt-decrypt.html
606                crypto/subtle/aes-cbc-invalid-length.html
607                crypto/subtle/aes-cbc-wrong-key-class.html
608
609         * WebCore.xcodeproj/project.pbxproj: Added new files.
610         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
611         (WebCore::getProperty): Factored out a function to get a property as JSValue.
612         (WebCore::getHashAlgorithm): Use it.
613         (WebCore::createAesCbcParams): Added converter for AesCbcParams.
614         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Support AES_CBC.
615         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
616         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Support all
617         algorithms, all the new ones just have trivial dictionaries.
618         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Ditto.
619
620         * bindings/js/JSCryptoOperationData.cpp: Added.
621         (WebCore::sequenceOfCryptoOperationDataFromJSValue):
622         (WebCore::cryptoOperationDataFromJSValue):
623         * bindings/js/JSCryptoOperationData.h: Added.
624         Moved CryptoOperationData bindings out of JSSubtleCryptoCustom.cpp, so that we
625         could use them in JSCryptoAlgorithmDictionary.cpp.
626
627         * bindings/js/JSDOMPromise.h: (WebCore::PromiseWrapper::reject): Added a specialization
628         to reject with null result. The spec doesn't actually say how algorithms fail.
629
630         * bindings/js/JSSubtleCryptoCustom.cpp:
631         (WebCore::JSSubtleCrypto::encrypt): Added.
632         (WebCore::JSSubtleCrypto::decrypt): Ditto.
633         (WebCore::JSSubtleCrypto::sign): Style fix.
634
635         * crypto/CryptoAlgorithmAesCbcParams.h: Added.
636
637         * crypto/CryptoKey.h:
638         (WebCore::CryptoKeyClass):
639         * crypto/keys/CryptoKeyHMAC.h:
640         (WebCore::asCryptoKeyHMAC):
641         Added poor man's RTTI, so that we can safely upcast Keys passed fro JavaScript code.
642
643         * crypto/CryptoKeyAES.cpp: Added.
644         (WebCore::CryptoKeyAES::CryptoKeyAES):
645         (WebCore::CryptoKeyAES::~CryptoKeyAES):
646         (WebCore::CryptoKeyAES::buildAlgorithmDescription):
647         * crypto/CryptoKeyAES.h: Added.
648         (WebCore::asCryptoKeyAES):
649         AES keys are the same for all algorithms, but they still need to remember the algorithm.
650
651         * crypto/SubtleCrypto.idl: Added encrypt/decrypt.
652
653         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: Added.
654         (WebCore::CryptoAlgorithmAES_CBC::CryptoAlgorithmAES_CBC):
655         (WebCore::CryptoAlgorithmAES_CBC::~CryptoAlgorithmAES_CBC):
656         (WebCore::CryptoAlgorithmAES_CBC::create):
657         (WebCore::CryptoAlgorithmAES_CBC::identifier):
658         (WebCore::CryptoAlgorithmAES_CBC::importKey):
659         (WebCore::CryptoAlgorithmAES_CBC::exportKey):
660         * crypto/algorithms/CryptoAlgorithmAES_CBC.h: Added.
661         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Added.
662         (WebCore::transformAES_CBC):
663         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
664         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
665         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
666         Added.
667
668         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
669         (WebCore::CryptoAlgorithmHMAC::sign):
670         (WebCore::CryptoAlgorithmHMAC::verify):
671         Check key class before casting it to CryptoKeyHMAC.
672
673         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
674         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register AES-CBC
675         on Mac, so that it can be used.
676
677 2013-11-01  Andreas Kling  <akling@apple.com>
678
679         SVGRenderStyle accessors should return references.
680         <https://webkit.org/b/123656>
681
682         RenderStyle::svgStyle() and accessSVGStyle() never return null,
683         so make them return references instead.
684         
685         This flushed out a myriad of pointless null checks and assertions.
686
687         Reviewed by Anders Carlsson.
688
689 2013-11-01  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
690
691         Removing MediaStreamTrackVector and MediaStreamSourceVector typedefs
692         https://bugs.webkit.org/show_bug.cgi?id=123648
693
694         Reviewed by Eric Carlson.
695
696         No new tests needed.
697
698         * Modules/mediastream/MediaStream.cpp:
699         (WebCore::MediaStream::create):
700         (WebCore::MediaStream::clone):
701         (WebCore::MediaStream::cloneMediaStreamTrackVector):
702         (WebCore::MediaStream::addTrack):
703         (WebCore::MediaStream::removeTrack):
704         (WebCore::MediaStream::haveTrackWithSource):
705         (WebCore::MediaStream::getTrackById):
706         (WebCore::MediaStream::trackVectorForType):
707         * Modules/mediastream/MediaStream.h:
708         * Modules/mediastream/MediaStreamTrack.h:
709         * Modules/mediastream/UserMediaRequest.cpp:
710         (WebCore::UserMediaRequest::callSuccessHandler):
711         * Modules/webaudio/AudioContext.cpp:
712         (WebCore::AudioContext::createMediaStreamSource):
713         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
714         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
715         * platform/mediastream/MediaStreamDescriptor.cpp:
716         (WebCore::MediaStreamDescriptor::create):
717         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
718         * platform/mediastream/MediaStreamDescriptor.h:
719         * platform/mediastream/MediaStreamSource.h:
720
721 2013-11-01  Andreas Kling  <akling@apple.com>
722
723         createFontFaceValue() should be smarter about overgrown cache.
724         <https://webkit.org/b/123643>
725
726         Instead of clearing the whole font-face value cache when it passes
727         128 entries, just delete one entry at random.
728
729         Reviewed by Geoffrey Garen.
730
731 2013-11-01  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
732
733         Fixing mac code to use new MediaStreamDescriptor create method
734         https://bugs.webkit.org/show_bug.cgi?id=123653
735
736         Reviewed by Eric Carlson.
737
738         No new tests needed.
739
740         * platform/mediastream/mac/MediaStreamCenterMac.cpp:
741         (WebCore::MediaStreamCenterMac::createMediaStream):
742
743 2013-11-01  Andreas Kling  <akling@apple.com>
744
745         Re-use existing RenderStyle local in textWidth().
746         <https://webkit.org/b/123392>
747
748         We already have the RenderStyle cached in a local here, so avoid
749         getting it from RenderText since that has to go via the parent.
750
751         Reviewed by Antti Koivisto.
752
753 2013-11-01  Andreas Kling  <akling@apple.com>
754
755         Neuter WTF_MAKE_FAST_ALLOCATED in GLOBAL_FASTMALLOC_NEW builds.
756         <https://webkit.org/b/123639>
757
758         WebCore::TimerBase really needed to have the new/delete operators
759         overridden, in order for WebCore::SuspendableTimer to be able to
760         choose that "operator new" out of the two it inherits.
761
762         Reviewed by Anders Carlsson.
763
764 2013-11-01  Andreas Kling  <akling@apple.com>
765
766         CSSCanvasValue construction helper should return PassRef.
767         <https://webkit.org/b/123650>
768
769         Return PassRef instead of PassRefPtr from functions that return
770         ownership-passing pointers that are known to be non-null.
771
772         Reviewed by Anders Carlsson.
773
774 2013-11-01  Joseph Pecoraro  <pecoraro@apple.com>
775
776         Move CF/Mac WTF String implementations down into WTF
777         https://bugs.webkit.org/show_bug.cgi?id=123635
778
779         Reviewed by Sam Weinig.
780
781         * WebCore.vcxproj/WebCore.vcxproj:
782         * WebCore.vcxproj/WebCore.vcxproj.filters:
783         * WebCore.xcodeproj/project.pbxproj:
784
785 2013-11-01  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
786
787         Removing unnecessary early returns in addTrack, removeTrack and removeRemoteSource methods
788         https://bugs.webkit.org/show_bug.cgi?id=123644
789
790         Reviewed by Eric Carlson.
791
792         No new tests needed.
793
794         * Modules/mediastream/MediaStream.cpp:
795         (WebCore::MediaStream::addTrack):
796         (WebCore::MediaStream::removeTrack):
797         (WebCore::MediaStream::removeRemoteSource):
798         (WebCore::MediaStream::trackVectorForType):
799         * Modules/mediastream/MediaStream.h:
800
801 2013-11-01  Andreas Kling  <akling@apple.com>
802
803         CSSAspectRatioValue construction helper should return PassRef.
804         <https://webkit.org/b/123645>
805
806         Return PassRef instead of PassRefPtr from functions that return
807         ownership-passing pointers that are known to be non-null.
808
809         Reviewed by Darin Adler.
810
811 2013-11-01  Myles C. Maxfield  <mmaxfield@apple.com>
812
813         Initial implementation of text-decoration-skip ink
814         https://bugs.webkit.org/show_bug.cgi?id=121806
815
816         Reviewed by Darin Adler.
817
818         text-decoration-skip: ink is implemented by the following steps:
819         1. Before drawing any decorations, figure out the bounding box for the decorations that will be drawn
820         2. Create an ImageBuffer with these dimensions
821         3. Draw text into this ImageBuffer with a thicker stroke
822         4. Apply the ImageBuffer as a mask to the context
823         5. Draw decorations like normal
824         6. Clean up
825
826         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink.html
827
828         * platform/graphics/cg/GraphicsContextCG.cpp:
829         (WebCore::computeLineBoundsAndAntialiasingModeForText): Don't call GraphicsContext::roundToDevicePixels
830         when painting is disabled
831         * rendering/InlineTextBox.cpp:
832         (WebCore::InlineTextBox::paint): Pass the TextPainter to paintDecoration
833         (WebCore::computeUnderlineOffset): Small cleanup
834         (WebCore::getWavyStrokeControlPointDistance): Pulling out of strokeWavyTextDecoration()
835         (WebCore::getWavyStrokeStep): Ditto
836         (WebCore::strokeWavyTextDecoration): Use the previous 2 functions
837         (WebCore::getSingleDecorationBoundingBox): Pulling out repeated code into a function
838         (WebCore::getDecorationBoundingBox): Compute the bounding box for an underline which
839         hasn't been drawn yet
840         (WebCore::InlineTextBox::paintDecoration): Construct a mask and apply it to the GraphicsContext
841         * rendering/InlineTextBox.h: paintDecoration needs the TextPainter
842         * rendering/style/RenderStyle.cpp:
843         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Redraw the underline when
844         text-decoration-skip changes
845
846 2013-11-01  Andreas Kling  <akling@apple.com>
847
848         CSS 'initial' and 'inherit' value constructors should return PassRef.
849         <https://webkit.org/b/123641>
850
851         Make the helpers involved in constructing CSS{Initial,Inherited}Value
852         all return PassRef instead of PassRefPtr. This avoids generating
853         pointless null checks at the call sites.
854
855         Reviewed by Darin Adler.
856
857 2013-11-01  Andreas Kling  <akling@apple.com>
858
859         Kill RenderArena.
860         <https://webkit.org/b/123634>
861
862         There are no remaining users of the RenderArena allocator.
863
864         Reviewed by Geoffrey Garen.
865
866 2013-11-01  James Craig  <jcraig@apple.com>
867
868         AX: Regression: media controls are no longer accessible
869         https://bugs.webkit.org/show_bug.cgi?id=121990
870
871         Reviewed by Jer Noble.
872
873         Updated existing test coverage.
874         Added ARIA roles, attrs, and labels to the new media controls shadow DOM.
875         Localization will be handled in http://webkit.org/b/120956
876
877         * Modules/mediacontrols/mediaControlsApple.js:
878         (Controller.prototype.UIString):
879         (Controller.prototype.createControls):
880         (Controller.prototype.handleLoadStart):
881         (Controller.prototype.handleError):
882         (Controller.prototype.handleAbort):
883         (Controller.prototype.handleSuspend):
884         (Controller.prototype.handleStalled):
885         (Controller.prototype.handleWaiting):
886         (Controller.prototype.handleFullscreenChange):
887         (Controller.prototype.handleMuteButtonClicked):
888         (Controller.prototype.handleMinButtonClicked):
889         (Controller.prototype.handleMaxButtonClicked):
890         (Controller.prototype.handleVolumeSliderChange):
891         (Controller.prototype.updatePlaying):
892
893 2013-11-01  Andreas Kling  <akling@apple.com>
894
895         Take BidiRuns out of the arena.
896         <https://webkit.org/b/123630>
897
898         Stop arena-allocating BidiRun objects and use regular new/delete.
899
900         With this, there are no remaining clients of RenderArena.
901         It will be removed in a subsequent patch.
902
903         Reviewed by Anders Carlsson.
904
905 2013-11-01  Afonso R. Costa Jr.  <afonso.costa@samsung.com>
906
907         Expose setApplicationCacheOriginQuota via window.internals
908         https://bugs.webkit.org/show_bug.cgi?id=87838
909
910         Reviewed by Joseph Pecoraro.
911
912         Also reset the default origin quota in resetToConsistentState().
913
914         * testing/Internals.cpp: Add setApplicationCacheOriginQuota.
915         (WebCore::Internals::resetToConsistentState): Reset the default origin
916         quota.
917         (WebCore::Internals::setApplicationCacheOriginQuota): Added.
918         * testing/Internals.h: Add setApplicationCacheOriginQuota.
919         * testing/Internals.idl: Ditto.
920
921 2013-11-01  Nick Diego Yamane  <nick.yamane@openbossa.org>
922
923         Explicitly initialize RefCounted base class in MediaStreamTrack's constructors
924         https://bugs.webkit.org/show_bug.cgi?id=123620
925
926         Reviewed by Andreas Kling.
927
928         No new tests needed.
929
930         * Modules/mediastream/MediaStreamTrack.cpp:
931         (WebCore::MediaStreamTrack::MediaStreamTrack):
932
933 2013-11-01  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
934
935         Adding addRemoteTrack and removeRemoteTrack functions to MediaStreamDescriptor and MediaStream
936         https://bugs.webkit.org/show_bug.cgi?id=123477
937
938         Reviewed by Eric Carlson.
939
940         When the backend report that a remote track has been added or removed by a remote peer, we must be able to add
941         it to its MediaStream
942
943         No new tests needed.
944
945         * Modules/mediastream/MediaStream.cpp:
946         (WebCore::MediaStream::addTrack): Splitted in two parts that can be used by old addTrack and new addRemoteTrack.
947         (WebCore::MediaStream::removeTrack): Splitted in two parts that can be used by old removeTrack and new
948         removeRemoteTrack.
949         (WebCore::MediaStream::addRemoteSource): Reusing code in new addTrack method.
950         (WebCore::MediaStream::removeRemoteSource): Refactored.
951         (WebCore::MediaStream::addRemoteTrack): Added.
952         (WebCore::MediaStream::removeRemoteTrack): Added.
953         (WebCore::MediaStream::getTrackVectorForType): Helper method that returns a vector of tracks according to
954         track's type (Audio or Video).
955
956         * Modules/mediastream/MediaStream.h:
957         * Modules/mediastream/MediaStreamTrack.cpp:
958         (WebCore::MediaStreamTrack::MediaStreamTrack):
959         * platform/mediastream/MediaStreamDescriptor.cpp:
960         (WebCore::MediaStreamDescriptor::addRemoteTrack): Added.
961         (WebCore::MediaStreamDescriptor::removeRemoteTrack): Added.
962         * platform/mediastream/MediaStreamDescriptor.h:
963
964 2013-11-01  Brendan Long  <b.long@cablelabs.com>
965
966         [GStreamer] Support audio and video tracks
967         https://bugs.webkit.org/show_bug.cgi?id=117039
968
969         Reviewed by Philippe Normand.
970
971         Tests: media/track/audio/audio-track-mkv-vorbis-addtrack.html
972                media/track/audio/audio-track-mkv-vorbis-enabled.html
973                media/track/audio/audio-track-mkv-vorbis-language.html
974                media/track/in-band/track-in-band-kate-ogg-addtrack.html
975                media/track/in-band/track-in-band-srt-mkv-addtrack.html
976                media/track/video/video-track-mkv-theora-addtrack.html
977                media/track/video/video-track-mkv-theora-language.html
978                media/track/video/video-track-mkv-theora-selected.html
979
980         * GNUmakefile.list.am: Add audio and video track files.
981         * PlatformEfl.cmake: Same.
982         * html/HTMLMediaElement.cpp:
983         (WebCore::HTMLMediaElement::audioTrackEnabledChanged): Schedule "change" event.
984         (WebCore::HTMLMediaElement::videoTrackSelectedChanged): Same.
985         * html/track/AudioTrack.cpp:
986         (WebCore::AudioTrack::setEnabled): Call m_private->setEnabled
987         (WebCore::AudioTrack::enabledChanged): Added callback.
988         (WebCore::AudioTrack::labelChanged): Same.
989         (WebCore::AudioTrack::languageChanged): Same.
990         (WebCore::AudioTrack::willRemoveAudioTrackPrivate): Use ASSERT_UNUSED for consistence.
991         * html/track/AudioTrack.h: Add new enabled, label and language callbacks.
992         * html/track/VideoTrack.cpp:
993         (WebCore::VideoTrack::setSelected): Call m_private->setEnabled
994         (WebCore::VideoTrack::selectedChanged): Added callback.
995         (WebCore::VideoTrack::labelChanged): Same.
996         (WebCore::VideoTrack::languageChanged): Same.
997         (WebCore::VideoTrack::willRemoveVideoTrackPrivate): Use ASSERT_UNUSED for consistence.
998         * html/track/VideoTrack.h: Add new selected, label and language callbacks.
999         * platform/graphics/AudioTrackPrivate.h:
1000         (WebCore::AudioTrackPrivate::setEnabled): Call m_client->enabledChanged
1001         * platform/graphics/VideoTrackPrivate.h:
1002         (WebCore::VideoTrackPrivate::setSelected): Call m_client->selectedChanged
1003         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
1004         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Add ASSERT(m_pad)
1005         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Look at all tag events instead of just the first one.
1006         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1007         (WebCore::mediaPlayerPrivateVideoSinkCapsChangedCallback): Separated callback when caps change from callback when number of videos change.
1008         (WebCore::mediaPlayerPrivateVideoCapsChangeTimeoutCallback): Same.
1009         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_videoCapsTimerHandler.
1010         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect audio and video tracks and remove callbacks.
1011         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged): Separated callback when caps change from callback when number of videos change.
1012         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Create video tracks for each stream.
1013         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps): Separated callback when caps change from callback when number of videos change.
1014         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Create audio tracks for each stream.
1015         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add audio and video tracks, and a pointer to keep track of the default audio stream.
1016         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: Added.
1017         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Added.
1018         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr<GstTagList>
1019         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: Added, handles tags and "active" property of audio and video tracks.
1020         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Added.
1021         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Added.
1022         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Added.
1023
1024 2013-11-01  Patrick Gansterer  <paroga@webkit.org>
1025
1026         Buildfix for !ENABLE(INSPECTOR) after 157288.
1027
1028         * inspector/InspectorInstrumentation.h:
1029         (WebCore::InspectorInstrumentation::willDispatchEvent):
1030
1031 2013-11-01  Mario Sanchez Prada  <mario.prada@samsung.com>
1032
1033         [ATK] Avoid explicit traversal of text controls and the render tree in AtkText implementation
1034         https://bugs.webkit.org/show_bug.cgi?id=123153
1035
1036         Reviewed by Chris Fleizach.
1037
1038         Remove functions from the AtkText implementation that manually
1039         walk the render tree to compose the text for a exposed objects in
1040         certain cases (e.g. anonymous blocks, text controls).
1041
1042         The reason for this change is that the current implementation
1043         follows an error-prone approach, since by doing things like
1044         manually walking the render tree from here we are not properly
1045         considering all the possible scenarios that might happen when
1046         traversing text. This, however, is a task that is better suited
1047         for the TextIterator, which is already written to consider all
1048         those cases and to emit the proper character in every single
1049         situation: text nodes, replaced objects and so on.
1050
1051         So, by removing all that too specific code (textForObject() and
1052         textForRenderer() mainly) from WebKitAccessibleInterfaceText.cpp
1053         and relying in AccessibilityObject::textUnderElement(), which it
1054         ends up using the TextIterator for certain cases, we have a much
1055         better and robust method of retrieving the text associated with an
1056         instance of AtkObject implementing the AtkText interface.
1057
1058         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1059         (webkitAccessibleTextGetText): Removed call to textForObject(), now that
1060         we have just removed that function, together with textForRenderer().
1061
1062         Make AccessibilityRenderObject::textUnderElement() able to deal with
1063         anonymous blocks directly, by creating a range based in the boundaries
1064         defined by the first and last child renderers for that block. This will
1065         make possible to treat an anonymous block as a whole instead of having
1066         to rely in the concatenation of each of its children, as it does now.
1067
1068         * accessibility/AccessibilityRenderObject.cpp:
1069         (WebCore::AccessibilityRenderObject::textUnderElement): Added a new code
1070         path to deal with anonymous blocks for text renderers, or when including
1071         all the children is explicitly requested.
1072
1073         Modified TextIterator so text for children of replaced objects are
1074         ignored if we are emmiting the special character for those objects.
1075
1076         * editing/TextIterator.cpp:
1077         (WebCore::TextIterator::handleReplacedElement): Make sure no children are
1078         handled a replaced object if m_emitsObjectReplacementCharacters is set.
1079         * editing/TextIterator.h: Updated m_emitsObjectReplacementCharacters
1080         description to reflect the new behavior.
1081
1082 2013-11-01  Alexey Proskuryakov  <ap@apple.com>
1083
1084         Add a Mac WebCrypto implementation of HMAC importKey/sign/verify
1085         https://bugs.webkit.org/show_bug.cgi?id=123598
1086
1087         Reviewed by Anders Carlsson.
1088
1089         Test: crypto/subtle/hmac-sign-verify.html
1090
1091         * WebCore.xcodeproj/project.pbxproj:
1092         * bindings/js/JSSubtleCryptoCustom.cpp: Added property svn:eol-style.
1093         (WebCore::createAlgorithmFromJSValue):
1094         (WebCore::cryptoOperationDataFromJSValue):
1095         (WebCore::cryptoKeyFormatFromJSValue):
1096         (WebCore::cryptoKeyUsagesFromJSValue):
1097         (WebCore::JSSubtleCrypto::sign):
1098         (WebCore::JSSubtleCrypto::verify):
1099         (WebCore::JSSubtleCrypto::digest):
1100         (WebCore::JSSubtleCrypto::importKey):
1101         * crypto/SubtleCrypto.idl:
1102         * crypto/algorithms/CryptoAlgorithmHMAC.cpp: Added.
1103         (WebCore::CryptoAlgorithmHMAC::CryptoAlgorithmHMAC):
1104         (WebCore::CryptoAlgorithmHMAC::~CryptoAlgorithmHMAC):
1105         (WebCore::CryptoAlgorithmHMAC::create):
1106         (WebCore::CryptoAlgorithmHMAC::identifier):
1107         (WebCore::CryptoAlgorithmHMAC::importKey):
1108         (WebCore::CryptoAlgorithmHMAC::exportKey):
1109         * crypto/algorithms/CryptoAlgorithmHMAC.h: Added.
1110         * crypto/keys: Added.
1111         * crypto/keys/CryptoKeyHMAC.cpp: Added.
1112         (WebCore::CryptoKeyHMAC::CryptoKeyHMAC):
1113         (WebCore::CryptoKeyHMAC::~CryptoKeyHMAC):
1114         (WebCore::CryptoKeyHMAC::buildAlgorithmDescription):
1115         * crypto/keys/CryptoKeyHMAC.h: Added.
1116         * crypto/mac/CryptoAlgorithmHMACMac.cpp: Added.
1117         (WebCore::getCommonCryptoAlgorithm):
1118         (WebCore::calculateSignature):
1119         (WebCore::CryptoAlgorithmHMAC::sign):
1120         (WebCore::CryptoAlgorithmHMAC::verify):
1121         (WebCore::CryptoAlgorithmHMAC::generateKey):
1122         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
1123         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
1124
1125 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1126
1127         Web Inspector: Clean up a few Inspector interfaces
1128         https://bugs.webkit.org/show_bug.cgi?id=123594
1129
1130         Reviewed by Timothy Hatcher.
1131
1132         * WebCore.exp.in:
1133         * inspector/InjectedScriptHost.cpp:
1134         * inspector/InspectorBaseAgent.h:
1135         (WebCore::InspectorBaseAgentInterface::name):
1136         * inspector/InspectorConsoleAgent.cpp:
1137         * inspector/InspectorConsoleAgent.h:
1138         (WebCore::InspectorConsoleAgent::enabled):
1139         * inspector/InspectorController.cpp:
1140         (WebCore::InspectorController::profilerEnabled):
1141         * inspector/InspectorController.h:
1142         * inspector/InspectorDebuggerAgent.cpp:
1143         * inspector/InspectorDebuggerAgent.h:
1144         (WebCore::InspectorDebuggerAgent::enabled):
1145         * inspector/InspectorRuntimeAgent.h:
1146         (WebCore::InspectorRuntimeAgent::enabled):
1147
1148 2013-10-31  Tim Horton  <timothy_horton@apple.com>
1149
1150         Remote Layer Tree: Vend layer contents via IOSurfaces
1151         https://bugs.webkit.org/show_bug.cgi?id=123600
1152
1153         Reviewed by Anders Carlsson.
1154
1155         * WebCore.exp.in:
1156         Export sRGBColorSpaceRef.
1157
1158         * WebCore.xcodeproj/project.pbxproj:
1159         Expose GraphicsContextCG.h.
1160
1161 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1162
1163         Remove unused Page::setDebuggerForAllPages
1164         https://bugs.webkit.org/show_bug.cgi?id=123602
1165
1166         Reviewed by Timothy Hatcher.
1167
1168         * page/Page.cpp:
1169         * page/Page.h:
1170
1171 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1172
1173         Web Inspector: Remove InspectorState
1174         https://bugs.webkit.org/show_bug.cgi?id=123547
1175
1176         Reviewed by Timothy Hatcher.
1177
1178         * CMakeLists.txt:
1179         * GNUmakefile.list.am:
1180         * WebCore.vcxproj/WebCore.vcxproj:
1181         * WebCore.vcxproj/WebCore.vcxproj.filters:
1182         * WebCore.xcodeproj/project.pbxproj:
1183         * inspector/InspectorAgent.cpp:
1184         (WebCore::InspectorAgent::InspectorAgent):
1185         * inspector/InspectorAgent.h:
1186         (WebCore::InspectorAgent::create):
1187         * inspector/InspectorAllInOne.cpp:
1188         * inspector/InspectorApplicationCacheAgent.cpp:
1189         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
1190         * inspector/InspectorApplicationCacheAgent.h:
1191         (WebCore::InspectorApplicationCacheAgent::create):
1192         * inspector/InspectorBaseAgent.cpp:
1193         (WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
1194         * inspector/InspectorBaseAgent.h:
1195         (WebCore::InspectorBaseAgent::InspectorBaseAgent):
1196         * inspector/InspectorCSSAgent.cpp:
1197         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
1198         * inspector/InspectorCSSAgent.h:
1199         (WebCore::InspectorCSSAgent::create):
1200         * inspector/InspectorCanvasAgent.cpp:
1201         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
1202         * inspector/InspectorCanvasAgent.h:
1203         (WebCore::InspectorCanvasAgent::create):
1204         * inspector/InspectorClient.h:
1205         * inspector/InspectorConsoleAgent.cpp:
1206         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
1207         * inspector/InspectorConsoleAgent.h:
1208         * inspector/InspectorController.cpp:
1209         (WebCore::InspectorController::InspectorController):
1210         (WebCore::InspectorController::connectFrontend):
1211         (WebCore::InspectorController::disconnectFrontend):
1212         * inspector/InspectorController.h:
1213         * inspector/InspectorDOMAgent.cpp:
1214         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
1215         * inspector/InspectorDOMAgent.h:
1216         (WebCore::InspectorDOMAgent::create):
1217         * inspector/InspectorDOMDebuggerAgent.cpp:
1218         (WebCore::InspectorDOMDebuggerAgent::create):
1219         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
1220         * inspector/InspectorDOMDebuggerAgent.h:
1221         * inspector/InspectorDOMStorageAgent.cpp:
1222         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
1223         * inspector/InspectorDOMStorageAgent.h:
1224         (WebCore::InspectorDOMStorageAgent::create):
1225         * inspector/InspectorDatabaseAgent.cpp:
1226         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
1227         * inspector/InspectorDatabaseAgent.h:
1228         (WebCore::InspectorDatabaseAgent::create):
1229         * inspector/InspectorDebuggerAgent.cpp:
1230         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1231         * inspector/InspectorDebuggerAgent.h:
1232         * inspector/InspectorHeapProfilerAgent.cpp:
1233         (WebCore::InspectorHeapProfilerAgent::create):
1234         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
1235         * inspector/InspectorHeapProfilerAgent.h:
1236         * inspector/InspectorIndexedDBAgent.cpp:
1237         (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
1238         * inspector/InspectorIndexedDBAgent.h:
1239         (WebCore::InspectorIndexedDBAgent::create):
1240         * inspector/InspectorInputAgent.cpp:
1241         (WebCore::InspectorInputAgent::InspectorInputAgent):
1242         * inspector/InspectorInputAgent.h:
1243         (WebCore::InspectorInputAgent::create):
1244         * inspector/InspectorLayerTreeAgent.cpp:
1245         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
1246         * inspector/InspectorLayerTreeAgent.h:
1247         (WebCore::InspectorLayerTreeAgent::create):
1248         * inspector/InspectorMemoryAgent.cpp:
1249         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
1250         (WebCore::InspectorMemoryAgent::create):
1251         * inspector/InspectorMemoryAgent.h:
1252         * inspector/InspectorPageAgent.cpp:
1253         (WebCore::InspectorPageAgent::create):
1254         (WebCore::InspectorPageAgent::InspectorPageAgent):
1255         * inspector/InspectorPageAgent.h:
1256         * inspector/InspectorProfilerAgent.cpp:
1257         (WebCore::PageProfilerAgent::PageProfilerAgent):
1258         (WebCore::InspectorProfilerAgent::create):
1259         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
1260         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1261         * inspector/InspectorProfilerAgent.h:
1262         * inspector/InspectorResourceAgent.cpp:
1263         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
1264         * inspector/InspectorResourceAgent.h:
1265         (WebCore::InspectorResourceAgent::create):
1266         * inspector/InspectorRuntimeAgent.cpp:
1267         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
1268         * inspector/InspectorRuntimeAgent.h:
1269         * inspector/InspectorState.cpp: Removed.
1270         * inspector/InspectorState.h: Removed.
1271         * inspector/InspectorStateClient.h: Removed.
1272         * inspector/InspectorTimelineAgent.cpp:
1273         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1274         * inspector/InspectorTimelineAgent.h:
1275         (WebCore::InspectorTimelineAgent::create):
1276         * inspector/InspectorWorkerAgent.cpp:
1277         (WebCore::InspectorWorkerAgent::create):
1278         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
1279         * inspector/InspectorWorkerAgent.h:
1280         * inspector/PageConsoleAgent.cpp:
1281         (WebCore::PageConsoleAgent::PageConsoleAgent):
1282         * inspector/PageConsoleAgent.h:
1283         (WebCore::PageConsoleAgent::create):
1284         * inspector/PageDebuggerAgent.cpp:
1285         (WebCore::PageDebuggerAgent::create):
1286         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
1287         * inspector/PageDebuggerAgent.h:
1288         * inspector/PageRuntimeAgent.cpp:
1289         (WebCore::PageRuntimeAgent::PageRuntimeAgent):
1290         * inspector/PageRuntimeAgent.h:
1291         (WebCore::PageRuntimeAgent::create):
1292         * inspector/WorkerConsoleAgent.cpp:
1293         (WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
1294         * inspector/WorkerConsoleAgent.h:
1295         (WebCore::WorkerConsoleAgent::create):
1296         * inspector/WorkerDebuggerAgent.cpp:
1297         (WebCore::WorkerDebuggerAgent::create):
1298         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
1299         * inspector/WorkerDebuggerAgent.h:
1300         * inspector/WorkerInspectorController.cpp:
1301         (WebCore::WorkerInspectorController::WorkerInspectorController):
1302         (WebCore::WorkerInspectorController::connectFrontend):
1303         (WebCore::WorkerInspectorController::disconnectFrontend):
1304         * inspector/WorkerInspectorController.h:
1305         * inspector/WorkerRuntimeAgent.cpp:
1306         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
1307         * inspector/WorkerRuntimeAgent.h:
1308         (WebCore::WorkerRuntimeAgent::create):
1309         * workers/DefaultSharedWorkerRepository.cpp:
1310         (WebCore::SharedWorkerProxy::postMessageToPageInspector):
1311         * workers/WorkerMessagingProxy.cpp:
1312         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
1313         * workers/WorkerMessagingProxy.h:
1314         * workers/WorkerReportingProxy.h:
1315
1316 2013-10-31  Brady Eidson  <beidson@apple.com>
1317
1318         Split PendingDeleteCall into its own header
1319         https://bugs.webkit.org/show_bug.cgi?id=123597
1320
1321         Reviewed by Beth “Okay I guess so, bro” Dakin.
1322
1323         * GNUmakefile.list.am:
1324         * WebCore.xcodeproj/project.pbxproj:
1325
1326         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1327         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
1328         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
1329         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1330
1331         * Modules/indexeddb/IDBPendingDeleteCall.h: Added.
1332         (WebCore::IDBPendingDeleteCall::create):
1333         (WebCore::IDBPendingDeleteCall::callbacks):
1334         (WebCore::IDBPendingDeleteCall::IDBPendingDeleteCall):
1335
1336 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1337
1338         Web Inspector: Convert some InspectorObject member variables to HashSet/HashMap
1339         https://bugs.webkit.org/show_bug.cgi?id=123579
1340
1341         Reviewed by Timothy Hatcher.
1342
1343         * inspector/InspectorDOMDebuggerAgent.h:
1344         * inspector/InspectorDOMDebuggerAgent.cpp:
1345         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
1346         (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
1347         (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
1348         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
1349         (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
1350         (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
1351         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
1352         Make m_eventListenerBreakpoints and m_xhrBreakpoints HashSet.
1353
1354         * inspector/InspectorDebuggerAgent.h:
1355         * inspector/InspectorDebuggerAgent.cpp:
1356         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1357         (WebCore::InspectorDebuggerAgent::disable):
1358         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1359         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
1360         (WebCore::InspectorDebuggerAgent::didParseSource):
1361         Make m_javaScriptBreakpoints a HashMap.
1362
1363 2013-10-31  Youenn Fablet  <youennf@gmail.com>
1364
1365         Correct the elapsedTime calculation in SVG animations
1366         https://bugs.webkit.org/show_bug.cgi?id=119289
1367
1368         Reviewed by Brent Fulgham.
1369
1370         Merged from Blink: https://chromium.googlesource.com/chromium/blink/+/338f9badca7fb7880abdb0cecd5f02493c1f7d2e
1371
1372         Test: svg/animations/getCurrentTime-pause-unpause.html
1373
1374         * svg/animation/SMILTimeContainer.cpp:
1375         (WebCore::SMILTimeContainer::SMILTimeContainer):
1376         (WebCore::SMILTimeContainer::elapsed):
1377         (WebCore::SMILTimeContainer::begin):
1378         (WebCore::SMILTimeContainer::pause):
1379         (WebCore::SMILTimeContainer::resume):
1380         (WebCore::SMILTimeContainer::setElapsed):
1381         * svg/animation/SMILTimeContainer.h:
1382
1383 2013-10-31  Andreas Kling  <akling@apple.com>
1384
1385         Manage line-grid RootInlineBox with unique_ptr.
1386         <https://webkit.org/b/123583>
1387
1388         Use smart pointers for the RenderBlockFlow's optional line-grid box
1389         instead of manual new/delete.
1390
1391         Reviewed by Antti Koivisto.
1392
1393 2013-10-31  Alexey Proskuryakov  <ap@apple.com>
1394
1395         Enable WebCrypto on Mac
1396         https://bugs.webkit.org/show_bug.cgi?id=123587
1397
1398         Reviewed by Anders Carlsson.
1399
1400         * Configurations/FeatureDefines.xcconfig: Enable it.
1401
1402         * bindings/js/JSCryptoAlgorithmDictionary.cpp: Build fix.
1403
1404         * crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
1405         Special case empty keys to avoid upsetting HashMap.
1406
1407         * crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::create):
1408         Build fix. Can't use make_unique, because constructor is private.
1409
1410 2013-10-31  Myles C. Maxfield  <mmaxfield@apple.com>
1411
1412         Underline bounds cannot be queried before underline itself is drawn
1413         https://bugs.webkit.org/show_bug.cgi?id=123310
1414
1415         Reviewed by Dean Jackson.
1416
1417         GraphicsContext's drawLineForText function is used to draw underlines,
1418         strikethroughs, and overlines. Before drawing the line, this function
1419         modifies the bounds given to it in order to make underlines crisp. However,
1420         this means that it is impossible to know where an underline will be drawn
1421         before drawing it. This patch pulls out this adjustment computation into
1422         GraphicsContext::computeLineBoundsForText, then passes the result to
1423         drawLineForText
1424
1425         Because there should be no observable difference, no tests need to be updated.
1426
1427         * platform/graphics/GraphicsContext.h: Signature of new computeLineBoundsForText
1428         function
1429         * platform/graphics/blackberry/PathBlackBerry.cpp:
1430         (WebCore::GraphicsContext::computeLineBoundsForText): Implement new function
1431         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1432         (WebCore::GraphicsContext::computeLineBoundsForText): Ditto
1433         (WebCore::GraphicsContext::drawLineForText): Use computeLineBoundsForText
1434         * platform/graphics/cg/GraphicsContextCG.cpp:
1435         (WebCore::computeLineBoundsAndAntialiasingModeForText): Static function that
1436         performs the actual bounds computation
1437         (WebCore::GraphicsContext::computeLineBoundsForText): Calls
1438         computeLineBoundsAndAntialiasingModeForText
1439         (WebCore::GraphicsContext::drawLineForText): Use new function
1440         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1441         (WebCore::GraphicsContext::computeLineBoundsForText): Implement new function
1442
1443 2013-10-31  Beth Dakin  <bdakin@apple.com>
1444
1445         Repro scrolling crash with scrollbars that use setPresentationValue on the 
1446         scrolling thread
1447         https://bugs.webkit.org/show_bug.cgi?id=123549
1448         -and corresponding-
1449         <rdar://problem/15246606>
1450
1451         Reviewed by Brady Eidson.
1452
1453         Here's another speculative fix. If a scrollbar was removed, we would not properly 
1454         inform the scrolling thread. Instead of checking supportsUpdateOnSecondaryThread() 
1455         before calling setScrollbarPaintersFromScrollbars(), check it from within 
1456         setScrollbarPaintersFromScrollbars(), and this will allow the ScrollbarPainter to 
1457         be properly updated.
1458
1459         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1460         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
1461         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
1462         (WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars):
1463
1464 2013-10-31  Csaba Osztrogonác  <ossy@webkit.org>
1465
1466         Unreviewed typo fix after 158386. (buildfix after r158365)
1467
1468         * Modules/mediastream/UserMediaRequest.cpp:
1469         (WebCore::UserMediaRequest::callSuccessHandler):
1470
1471 2013-10-31  Myles C. Maxfield  <mmaxfield@apple.com>
1472
1473         Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION)
1474         https://bugs.webkit.org/show_bug.cgi?id=123541
1475
1476         Reviewed by Tim Horton.
1477
1478         Enabled CSS3 text decoration tests
1479
1480         * css/CSSComputedStyleDeclaration.cpp:
1481         (WebCore::renderTextDecorationStyleFlagsToCSSValue): Mapping internal
1482         representation to a CSSValue
1483         (WebCore::ComputedStyleExtractor::propertyValue): Ditto
1484         * css/CSSParser.cpp: Moving parsing functions behind new flag
1485         (WebCore::isColorPropertyID):
1486         (WebCore::CSSParser::parseValue):
1487         (WebCore::CSSParser::addTextDecorationProperty):
1488         (WebCore::CSSParser::parseTextDecorationSkip):
1489         (WebCore::CSSParser::parseTextUnderlinePosition):
1490         * css/CSSParser.h:
1491         * css/CSSPrimitiveValueMappings.h:
1492         * css/CSSPropertyNames.in: Marking the new properties behind new flag
1493         * css/CSSValueKeywords.in: Marking new values behind new flag
1494         * css/DeprecatedStyleBuilder.cpp:
1495         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1496         * css/StylePropertyShorthand.cpp:
1497         (WebCore::shorthandForProperty): Move text decoration shorthand
1498         (WebCore::matchingShorthandsForLonghand):
1499         * css/StylePropertyShorthand.h:
1500         * css/StyleResolver.cpp:
1501         (WebCore::isValidVisitedLinkProperty):
1502         (WebCore::StyleResolver::applyProperty):
1503         * platform/graphics/GraphicsContext.h:
1504         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1505         (WebCore::GraphicsContext::setPlatformStrokeStyle):
1506         * platform/graphics/cg/GraphicsContextCG.cpp:
1507         (WebCore::GraphicsContext::drawLine):
1508         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1509         (WebCore::createPen):
1510         * rendering/InlineFlowBox.cpp:
1511         * rendering/InlineFlowBox.h:
1512         * rendering/InlineTextBox.cpp:
1513         (WebCore::textDecorationStyleToStrokeStyle):
1514         (WebCore::computeUnderlineOffset):
1515         (WebCore::InlineTextBox::paintDecoration):
1516         * rendering/RenderObject.cpp:
1517         (WebCore::decorationColor):
1518         * rendering/RootInlineBox.cpp:
1519         * rendering/RootInlineBox.h:
1520         * rendering/style/RenderStyle.cpp:
1521         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
1522         (WebCore::RenderStyle::colorIncludingFallback):
1523         (WebCore::RenderStyle::visitedDependentColor):
1524         * rendering/style/RenderStyle.h:
1525         * rendering/style/RenderStyleConstants.h:
1526         * rendering/style/StyleRareInheritedData.cpp:
1527         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1528         (WebCore::StyleRareInheritedData::operator==):
1529         * rendering/style/StyleRareInheritedData.h:
1530         * rendering/style/StyleRareNonInheritedData.cpp:
1531         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1532         (WebCore::StyleRareNonInheritedData::operator==):
1533         * rendering/style/StyleRareNonInheritedData.h:
1534
1535 2013-10-31  Alexey Proskuryakov  <ap@apple.com>
1536
1537         [WebCrypto] Add SHA-1
1538         https://bugs.webkit.org/show_bug.cgi?id=123582
1539
1540         Reviewed by Anders Carlsson.
1541
1542         Tests: security/crypto-subtle-arguments.html
1543                security/crypto-subtle-sha1.html
1544
1545         * WebCore.xcodeproj/project.pbxproj: Added new files.
1546
1547         * bindings/js/JSSubtleCryptoCustom.cpp:
1548         (WebCore::createAlgorithmFromJSValue):
1549         (WebCore::sequenceOfCryptoOperationDataFromJSValue):
1550         (WebCore::JSSubtleCrypto::digest):
1551         * crypto/SubtleCrypto.idl:
1552         Added bindings for crypto.digest.
1553
1554         * crypto/algorithms: Added.
1555         * crypto/algorithms/CryptoAlgorithmSHA1.cpp: Added.
1556         * crypto/algorithms/CryptoAlgorithmSHA1.h: Added.
1557         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
1558         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register SHA-1.
1559
1560         * crypto/mac/CryptoAlgorithmSHA1Mac.cpp: Added.
1561         (WebCore::CryptoAlgorithmSHA1::digest): Performs the work synchronously, because
1562         otherwise we'd have to copy the data first, which is crazy for something as simple
1563         as hashing. We can change to a dispatch queue later if we find that it's actually
1564         better to copy and do the work asynchronously.
1565
1566 2013-10-31  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
1567
1568         REGRESSION(r158348): Breaks Debug build
1569         https://bugs.webkit.org/show_bug.cgi?id=123562
1570
1571         Reviewed by Brady Eidson.
1572
1573         Remove an unnecessary check that cause compilation failure.
1574
1575         No new tests since this just fixes the build failure.
1576
1577         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1578         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
1579
1580 2013-10-31  Csaba Osztrogonác  <ossy@webkit.org>
1581
1582         One more speculative buildfix after r158365.
1583
1584         * Modules/mediastream/UserMediaRequest.cpp:
1585         (WebCore::UserMediaRequest::callSuccessHandler):
1586
1587 2013-10-31  Csaba Osztrogonác  <ossy@webkit.org>
1588
1589         One more speculative buildfix after r158365.
1590
1591         * Modules/mediastream/RTCPeerConnection.cpp:
1592         (WebCore::RTCPeerConnection::didAddRemoteStream):
1593
1594 2013-10-31  Csaba Osztrogonác  <ossy@webkit.org>
1595
1596         Speculative buildfix after r158365.
1597
1598         * Modules/mediastream/VideoStreamTrack.cpp:
1599         (WebCore::VideoStreamTrack::create):
1600         (WebCore::VideoStreamTrack::VideoStreamTrack):
1601         * Modules/mediastream/VideoStreamTrack.h:
1602
1603 2013-10-31  Myles C. Maxfield  <mmaxfield@apple.com>
1604
1605         Decorated text sometimes does not draw its decorations
1606         https://bugs.webkit.org/show_bug.cgi?id=123539
1607
1608         Reviewed by Antti Koivisto.
1609
1610         Decorated text should opt-out of the simple line layout, because
1611         SimpleLineLayout::paintFlow doesn't draw decorations
1612
1613         Fixes fast/css3-text/css3-text-decoration/text-decoration-color.html
1614
1615         * rendering/SimpleLineLayout.cpp:
1616         (WebCore::SimpleLineLayout::canUseFor):
1617
1618 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1619
1620         Web Inspector: Remove last member variable uses of InspectorState from Agents
1621         https://bugs.webkit.org/show_bug.cgi?id=123540
1622
1623         Reviewed by Timothy Hatcher.
1624
1625         * inspector/InspectorDOMDebuggerAgent.h:
1626         * inspector/InspectorDOMDebuggerAgent.cpp:
1627         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
1628         (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
1629         (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
1630         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
1631         (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
1632         (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
1633         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
1634         DOMDebuggerAgentState::eventListenerBreakpoints -> m_eventListenerBreakpoints.
1635         DOMDebuggerAgentState::xhrBreakpoints -> m_xhrBreakpoints.
1636
1637         * inspector/InspectorDebuggerAgent.h:
1638         * inspector/InspectorDebuggerAgent.cpp:
1639         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1640         (WebCore::InspectorDebuggerAgent::disable):
1641         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1642         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
1643         (WebCore::InspectorDebuggerAgent::didParseSource):
1644         DebuggerAgentState::javaScriptBreakpoints -> m_javaScriptBreakpoints.
1645
1646         * inspector/InspectorPageAgent.h:
1647         * inspector/InspectorPageAgent.cpp:
1648         (WebCore::InspectorPageAgent::disable):
1649         (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
1650         (WebCore::InspectorPageAgent::removeScriptToEvaluateOnLoad):
1651         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
1652         PageAgentState::pageAgentScriptsToEvaluateOnLoad -> m_scriptsToEvaluateOnLoad.
1653         This is a lazily created InspectorObject member variable.
1654
1655         * inspector/InspectorResourceAgent.h:
1656         * inspector/InspectorResourceAgent.cpp:
1657         (WebCore::InspectorResourceAgent::willSendRequest):
1658         (WebCore::InspectorResourceAgent::disable):
1659         (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
1660         ResourceAgentState::extraRequestHeaders -> m_extraRequestHeaders.
1661         This is a lazily created InspectorObject member variable.
1662
1663 2013-10-31  Philippe Normand  <pnormand@igalia.com>
1664
1665         Unreviewed, one more build fix after r158365.
1666
1667         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
1668         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
1669
1670 2013-10-31  Beth Dakin  <bdakin@apple.com>
1671
1672         Repro scrolling crash with scrollbars that use setPresentationValue on the 
1673         scrolling thread
1674         https://bugs.webkit.org/show_bug.cgi?id=123549
1675         -and corresponding-
1676         <rdar://problem/15246606>
1677
1678         Reviewed by Darin Adler.
1679
1680         Speculative fix. I think if we retain the ScrollbarPainters, we should avoid this 
1681         crash.
1682
1683         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
1684
1685 2013-10-31  Philippe Normand  <pnormand@igalia.com>
1686
1687         Unreviewed, MediaStream build fix after r158365.
1688
1689         * Modules/mediastream/MediaStream.cpp:
1690         (WebCore::MediaStream::clone):
1691
1692 2013-10-31  Sam Weinig  <sam@webkit.org>
1693
1694         Pass an Element by reference to the PseudoElement constructor
1695         https://bugs.webkit.org/show_bug.cgi?id=123576
1696
1697         Reviewed by Andreas Kling.
1698
1699         * dom/Element.cpp:
1700         (WebCore::Element::createPseudoElementIfNeeded):
1701         * dom/PseudoElement.cpp:
1702         (WebCore::PseudoElement::PseudoElement):
1703         * dom/PseudoElement.h:
1704
1705 2013-10-31  Alexey Proskuryakov  <ap@apple.com>
1706
1707         Fix a mis-merge.
1708
1709         * WebCore.xcodeproj/project.pbxproj: Remove duplicate CryptoAlgorithmRegistryMac.cpp.
1710
1711 2013-10-31  Alexey Proskuryakov  <ap@apple.com>
1712
1713         Add bindings code for crypto algorithm dictionaries
1714         https://bugs.webkit.org/show_bug.cgi?id=123476
1715
1716         Reviewed by Sam Weinig.
1717
1718         JSCryptoAlgorithmDictionary reads the Algorithm, much like JSDictionary does in
1719         simpler cases. We should see about bringing them closer together (perhaps replacing
1720         with autogenerated code).
1721
1722         * crypto/parameters: Added.
1723         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added.
1724         * crypto/parameters/CryptoAlgorithmHmacParams.h: Added.
1725         Added a couple specific dictionaries as an example.
1726
1727         * WebCore.xcodeproj/project.pbxproj: Added JSCryptoAlgorithmDictionary.
1728         * bindings/js/JSCryptoAlgorithmDictionary.cpp: Added.
1729         (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
1730         (WebCore::getHashAlgorithm):
1731         (WebCore::createHmacParams):
1732         (WebCore::createHmacKeyParams):
1733         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
1734         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
1735         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
1736         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
1737         * bindings/js/JSCryptoAlgorithmDictionary.h: Added.
1738
1739 2013-10-31  Sam Weinig  <sam@webkit.org>
1740
1741         Pass ScriptExecutionContext by reference to from the bindings constructors
1742         https://bugs.webkit.org/show_bug.cgi?id=123575
1743
1744         Reviewed by Andreas Kling.
1745
1746         Since we null check the ScriptExecutionContext before creating the c++ class,
1747         we should be passing by reference.
1748
1749 2013-10-31  Zhuang Zhigang  <zhuangzg@cn.fujitsu.com>
1750
1751         Paint the input tag of range type on WinCE port.
1752         https://bugs.webkit.org/show_bug.cgi?id=123199
1753
1754         Reviewed by Brent Fulgham.        
1755
1756         * rendering/RenderThemeWinCE.cpp:
1757         (WebCore::RenderThemeWinCE::paintSliderTrack):
1758         (WebCore::RenderThemeWinCE::paintSliderThumb):
1759
1760 2013-10-31  Alexey Proskuryakov  <ap@apple.com>
1761
1762         Add a crypto algorithm abstraction
1763         https://bugs.webkit.org/show_bug.cgi?id=123474
1764
1765         Reviewed by Sam Weinig.
1766
1767         This works slightly differently than WebCrypto implies. We have separate classes
1768         for algorithm and its parameters, while WebCrypto puts them in the same dictionary.
1769
1770         * WebCore.xcodeproj/project.pbxproj: Added new files.
1771
1772         * crypto/CryptoAlgorithm.cpp: Added. As most algorithms don't implement most
1773         operations, default implementations just raise an exception.
1774         * crypto/CryptoAlgorithm.h: Added.
1775
1776         * crypto/CryptoAlgorithmParameters.h: Added. Base class for numerous future parameter
1777         dictionaries, such as HmacParams or HmacKeyParams.
1778
1779         * crypto/CryptoAlgorithmRegistry.cpp: Added.
1780         * crypto/CryptoAlgorithmRegistry.h: Added.
1781         The registry decouples universal bindings code from algorithms that may or may not
1782         be implemented on each platform.
1783
1784         * crypto/mac: Added.
1785         * crypto/mac/CryptoAlgorithmRegistryMac.cpp: Added.
1786         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Algorithms implemented
1787         on Mac will be registered by this function.
1788
1789 2013-10-31  Alexey Proskuryakov  <ap@apple.com>
1790
1791         REGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and xmlhttprequest-overridemimetype-content-type-header.html are failing
1792         https://bugs.webkit.org/show_bug.cgi?id=123548
1793
1794         Reviewed by Brady Eidson.
1795
1796         We had code that made sure that cached 200 responses weren't used for conditional
1797         requests. But it didn't work the other way - cached 304 responses got reused for
1798         subsequent unconditional requests!
1799
1800         Adding the test uncovered this bug.
1801
1802         * loader/cache/CachedRawResource.cpp: (WebCore::shouldIgnoreHeaderForCacheReuse):
1803         Should never ignore conditional headers. Code in determineRevalidationPolicy
1804         was already undoing this for conditional requests, but we also shouldn't use
1805         WebCore cache if it holds a 304 response to conditional request.
1806
1807         * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1808         Even though the changed code is only for raw resources, I think that we can never
1809         get a conditional request here any more.
1810
1811 2013-10-30  Alexey Proskuryakov  <ap@apple.com>
1812
1813         CryptoAlgorithmDescriptionBuilder should support producing nested algorithms
1814         https://bugs.webkit.org/show_bug.cgi?id=123461
1815
1816         Reviewed by Darin Adler.
1817
1818         To add a nested algorithm, clone a builder with createEmptyClone(), fill it,
1819         and add it using add().
1820
1821         * bindings/js/JSCryptoAlgorithmBuilder.h:
1822         * crypto/CryptoAlgorithmDescriptionBuilder.h:
1823         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
1824         (WebCore::JSCryptoAlgorithmBuilder::createEmptyClone):
1825         (WebCore::JSCryptoAlgorithmBuilder::add): Keep VM in a local variable for marginally
1826         better performance.
1827
1828 2013-10-31  Philippe Normand  <pnormand@igalia.com>
1829
1830         [WK2][GTK] enable-media-stream Setting
1831         https://bugs.webkit.org/show_bug.cgi?id=123145
1832
1833         Reviewed by Anders Carlsson.
1834
1835         * page/Settings.in: new mediaStreamEnabled setting.
1836
1837 2013-10-31  Zan Dobersek  <zdobersek@igalia.com>
1838
1839         Manage SVGPathByteStream through std::unique_ptr
1840         https://bugs.webkit.org/show_bug.cgi?id=123467
1841
1842         Reviewed by Anders Carlsson.
1843
1844         Manage SVGPathByteStream objects through std::unique_ptr. Constructors for the class are made public
1845         so std::make_unique can be used with the class.
1846
1847         * svg/SVGAnimatedPath.cpp:
1848         (WebCore::SVGAnimatedPathAnimator::constructFromString):
1849         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
1850         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
1851         * svg/SVGAnimatedType.cpp:
1852         (WebCore::SVGAnimatedType::createPath):
1853         * svg/SVGAnimatedType.h:
1854         * svg/SVGPathByteStream.h:
1855         (WebCore::SVGPathByteStream::SVGPathByteStream): Takes a const Data object that's then copied.
1856         (WebCore::SVGPathByteStream::copy): Made const.
1857         * svg/SVGPathByteStreamBuilder.cpp: Remove an unnecessary include.
1858         * svg/SVGPathByteStreamBuilder.h: Ditto.
1859         * svg/SVGPathElement.cpp:
1860         (WebCore::SVGPathElement::SVGPathElement):
1861         * svg/SVGPathElement.h:
1862         * svg/SVGPathUtilities.cpp:
1863         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
1864         (WebCore::addToSVGPathByteStream):
1865
1866 2013-10-31  Marcin Bychawski  <m.bychawski@samsung.com>
1867
1868         Removing m_maxDeadCapacity condition in fast path in MemoryCache::prune().
1869         https://bugs.webkit.org/show_bug.cgi?id=115631
1870
1871         Reviewed by Brent Fulgham.
1872
1873         If the m_maxDeadSize and m_deadSize are both 0, the method unnecessairly tries to prune resources.
1874
1875         No new tests, covered by existing ones.
1876
1877         * loader/cache/MemoryCache.cpp:
1878         (WebCore::MemoryCache::prune):
1879
1880 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1881
1882         Web Inspector: Remove stale optional native memory instrumentation protocol params
1883         https://bugs.webkit.org/show_bug.cgi?id=123552
1884
1885         Reviewed by Timothy Hatcher.
1886
1887         * inspector/Inspector.json:
1888         * inspector/InspectorTimelineAgent.cpp:
1889         (WebCore::InspectorTimelineAgent::start):
1890         * inspector/InspectorTimelineAgent.h:
1891
1892 2013-10-31  Zan Dobersek  <zdobersek@igalia.com>
1893
1894         [GTK] Undefined references to RenderObject::style() when disabling video support
1895         https://bugs.webkit.org/show_bug.cgi?id=123492
1896
1897         Reviewed by Carlos Garcia Campos.
1898
1899         * platform/gtk/RenderThemeGtk2.cpp: Disabling video support removes indirect inclusion of the RenderElement.h
1900         header, causing undefined references to RenderObject::style(). The RenderElement.h header should be included
1901         instead of RenderObject.h as the former defines the RenderObject::style() inline and also includes the latter.
1902         * platform/gtk/RenderThemeGtk3.cpp: Ditto.
1903
1904 2013-10-31  Robert Plociennik  <r.plociennik@samsung.com>
1905
1906         [EFL] accessibility/textbox-role-reports-selection.html is failing
1907         https://bugs.webkit.org/show_bug.cgi?id=112017
1908
1909         Reviewed by Mario Sanchez Prada.
1910
1911         getSelectionOffsetsForObject() now returns proper start/end offsets for
1912         selections "touching" the object's front border.
1913
1914         No new tests, covered by existing ones.
1915
1916         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1917         (getSelectionOffsetsForObject):
1918
1919 2013-10-31  Ryuan Choi  <ryuan.choi@samsung.com>
1920
1921         [EFL][GLES] OpenGL should be optional
1922         https://bugs.webkit.org/show_bug.cgi?id=123399
1923
1924         Reviewed by Noam Rosenthal.
1925
1926         * CMakeLists.txt: Make OpenGL dependencies as optional.
1927         * PlatformEfl.cmake:
1928         Move OpenGL macro to OptionsEfl.cmake and make Xcomposite and XRender as optional.
1929         * platform/graphics/OpenGLESShims.h:
1930         Removed GL_COLOR_ATTACHMENT0_EXT because it was added to gl2ext.h since r153064
1931         * platform/graphics/surfaces/GraphicsSurfaceToken.h:
1932         Removed wrong GLX guard.
1933         (WebCore::GraphicsSurfaceToken::GraphicsSurfaceToken):
1934         (WebCore::GraphicsSurfaceToken::operator!=):
1935         (WebCore::GraphicsSurfaceToken::isValid):
1936         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1937         Removed unnecessary OpenGLShims.h
1938
1939 2013-10-30  Santosh Mahto  <santosh.ma@samsung.com>
1940
1941         [webcore/editing] remove extra header includes from cpp files.
1942         https://bugs.webkit.org/show_bug.cgi?id=123524
1943
1944         Reviewed by Ryosuke Niwa.
1945
1946         Removing redundant header files.
1947
1948         * editing/AlternativeTextController.cpp:
1949         * editing/ApplyBlockElementCommand.cpp:
1950         * editing/ApplyStyleCommand.cpp:
1951         * editing/BreakBlockquoteCommand.cpp:
1952         * editing/DeleteButton.cpp:
1953         * editing/DeleteButtonController.cpp:
1954         * editing/DeleteSelectionCommand.cpp:
1955         * editing/DictationCommand.cpp:
1956         * editing/EditCommand.cpp:
1957         * editing/EditingStyle.cpp:
1958         * editing/EditorCommand.cpp:
1959         * editing/FrameSelection.cpp:
1960         * editing/IndentOutdentCommand.cpp:
1961         * editing/InsertLineBreakCommand.cpp:
1962         * editing/InsertParagraphSeparatorCommand.cpp:
1963         * editing/MarkupAccumulator.h:
1964         * editing/RemoveFormatCommand.cpp:
1965         * editing/RenderedPosition.cpp:
1966         * editing/ReplaceSelectionCommand.cpp:
1967         * editing/SpellChecker.cpp:
1968         * editing/SpellingCorrectionCommand.cpp:
1969         * editing/SurroundingText.cpp:
1970         * editing/TextCheckingHelper.cpp:
1971         * editing/TextIterator.cpp:
1972         * editing/TypingCommand.cpp:
1973         * editing/VisibleSelection.cpp:
1974         * editing/VisibleUnits.cpp:
1975         * editing/WrapContentsInDummySpanCommand.cpp:
1976         * editing/htmlediting.cpp:
1977
1978 2013-10-30  Brady Eidson  <beidson@apple.com>
1979
1980         IDB Database versions are uint64_t, not int64_t
1981         https://bugs.webkit.org/show_bug.cgi?id=123556
1982
1983         Reviewed by Alexey Proskuryakov.
1984
1985         * Modules/indexeddb/IDBBackingStoreInterface.h:
1986
1987         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1988         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
1989         (WebCore::IDBDatabaseBackendImpl::openConnection):
1990         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1991
1992         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1993
1994         * Modules/indexeddb/IDBPendingOpenCall.h:
1995         (WebCore::IDBPendingOpenCall::create):
1996         (WebCore::IDBPendingOpenCall::version):
1997         (WebCore::IDBPendingOpenCall::IDBPendingOpenCall):
1998
1999         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2000         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
2001
2002         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2003         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
2004         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2005
2006         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2007         (WebCore::IDBFactoryBackendLevelDB::open):
2008         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2009
2010 2013-10-30  Brendan Long  <b.long@cablelabs.com>
2011
2012         [Gtk] Build is failing after r158317
2013         https://bugs.webkit.org/show_bug.cgi?id=123544
2014
2015         Reviewed by Alexey Proskuryakov.
2016
2017         No new tests since this just fixes the build.
2018
2019         * GNUmakefile.list.am: Add JSCryptoKey.cpp and JSCryptoKey.h
2020
2021 2013-10-30  Andreas Kling  <akling@apple.com>
2022
2023         Manage EllipsisBox objects with unique_ptr.
2024         <https://webkit.org/b/123554>
2025
2026         Use smart pointers to store ellipsis boxes instead of new/delete.
2027
2028         Reviewed by Anders Carlsson.
2029
2030 2013-10-30  Alexey Proskuryakov  <ap@apple.com>
2031
2032         [Gtk] Build is failing after r158317
2033         https://bugs.webkit.org/show_bug.cgi?id=123544
2034
2035         Use a correct style for JSC includes.
2036
2037         * ForwardingHeaders/runtime/JSPromise.h: Added.
2038         * ForwardingHeaders/runtime/JSPromiseResolver.h: Added.
2039         * bindings/js/JSDOMPromise.h:
2040
2041 2013-10-30  Andreas Kling  <akling@apple.com>
2042
2043         Replace InlineBox::destroy() with regular virtual destruction.
2044         <https://webkit.org/b/123550>
2045
2046         Move logic out of destroy() and its overloads into good ol' virtual
2047         destructors instead.
2048
2049         Reviewed by Anders Carlsson.
2050
2051 2013-10-30  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2052
2053         Simplifying MediaStream and MediStreamDescriptor creation
2054         https://bugs.webkit.org/show_bug.cgi?id=123443
2055
2056         Reviewed by Eric Carlson.
2057
2058         The internal process of creating a MediaStream and MediaStreamDescriptor was quite confusing and spread.
2059         We can take advantage of the platform implementation of MediaStreamTrack (aka MediaStreamTrackPrivate)
2060         and simplify the whole process.
2061         A new constructor that receives vectors of MediaStreamTrackPrivate objects were added, then the check
2062         if a source already exists or if the tracks are all ended are now made in MediaStreamDescriptor.
2063
2064         No new tests needed.
2065
2066         * Modules/mediastream/MediaStream.cpp:
2067         (WebCore::MediaStream::create): Removed unnecessary variables in one create method and using new
2068         MediaStreamDescriptor::create method that receives vector of MediaStreamTrackPrivate objects as parameter.
2069
2070         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2071         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): Removed passing flag to
2072         MediaStreamDescriptor create.
2073
2074         * platform/mediastream/MediaStreamDescriptor.cpp:
2075         (WebCore::MediaStreamDescriptor::create): Removed EndedAtCreationFlag parameter, because this is being
2076         handled inside constructor by analyzing the tracks or sources passed.
2077         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Adding new constructor that receives vector of
2078         MediaStreamTrackPrivate as parameter.
2079
2080         (WebCore::MediaStreamDescriptor::addTrack): Changed to store the track's source in the object.
2081
2082         (WebCore::MediaStreamDescriptor::removeTrack):
2083         * platform/mediastream/MediaStreamDescriptor.h:
2084         (WebCore::MediaStreamDescriptor::numberOfAudioTracks):
2085         (WebCore::MediaStreamDescriptor::audioTracks):
2086         (WebCore::MediaStreamDescriptor::numberOfVideoTracks):
2087         (WebCore::MediaStreamDescriptor::videoTracks):
2088         * platform/mock/MockMediaStreamCenter.cpp:
2089         (WebCore::MockMediaStreamCenter::createMediaStream): Removing flag that is being passed to
2090         MediaStreamDescriptor's create method.
2091
2092 2013-10-30  Brent Fulgham  <bfulgham@apple.com>
2093
2094         [Win] Legible Output callbacks should happen on notification queue
2095         https://bugs.webkit.org/show_bug.cgi?id=123545
2096
2097         Reviewed by Eric Carlson.
2098
2099         Modify the callback creation for Legible Output items so that they
2100         are made on our notification queue. The use of the main queue was a
2101         holdover from some temporary code used during earlier development.
2102
2103         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2104         (WebCore::AVFWrapper::AVFWrapper): Assert this happens on the main thread.
2105         (WebCore::AVFWrapper::~AVFWrapper): Ditto.
2106         (WebCore::destroyAVFWrapper): Ditto.
2107         (WebCore::AVFWrapper::createPlayer): Ditto.
2108         (WebCore::AVFWrapper::createPlayerItem): Ditto.
2109         Also, instruct LegibleOutput callbacks to happen on our notification
2110         queue, rather than the main thread.
2111         (WebCore::AVFWrapper::createAVCFVideoLayer): Assert this happens on the main thread.
2112         (WebCore::AVFWrapper::destroyVideoLayer): Ditto.
2113         (WebCore::AVFWrapper::createImageGenerator): Ditto.
2114         (WebCore::AVFWrapper::destroyImageGenerator): Ditto.
2115
2116 2013-10-30  Alexey Proskuryakov  <ap@apple.com>
2117
2118         XHR.response is null when requesting empty file as arraybuffer
2119         https://bugs.webkit.org/show_bug.cgi?id=123457
2120
2121         Reviewed by Sam Weinig.
2122
2123         Test: http/tests/xmlhttprequest/response-empty-arraybuffer.html
2124
2125         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseArrayBuffer): Don't do this.
2126
2127 2013-10-30  Samuel White  <samuel_white@apple.com>
2128
2129         AX: AXFocused not exposed on ARIA menuitems
2130         https://bugs.webkit.org/show_bug.cgi?id=123494
2131
2132         Reviewed by Chris Fleizach.
2133
2134         ARIA menuitems should expose AXFocused accessibility attribute.
2135
2136         Test: platform/mac/accessibility/aria-menuitem-focus.html
2137
2138         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2139         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2140
2141 2013-10-30  Joseph Pecoraro  <pecoraro@apple.com>
2142
2143         Web Inspector: Remove basic uses of InspectorState from agents
2144         https://bugs.webkit.org/show_bug.cgi?id=123534
2145
2146         Reviewed by Timothy Hatcher.
2147
2148         * inspector/InspectorAgent.h:
2149         * inspector/InspectorAgent.cpp:
2150         (WebCore::InspectorAgent::InspectorAgent):
2151         (WebCore::InspectorAgent::enable):
2152         (WebCore::InspectorAgent::disable):
2153         (WebCore::InspectorAgent::evaluateForTestInFrontend):
2154         (WebCore::InspectorAgent::inspect):
2155         InspectorAgentState::inspectorAgentEnabled -> m_enabled.
2156
2157         * inspector/InspectorApplicationCacheAgent.cpp:
2158         (WebCore::InspectorApplicationCacheAgent::enable):
2159         Remove unused state.
2160
2161         * inspector/InspectorCSSAgent.cpp:
2162         (WebCore::InspectorCSSAgent::enable):
2163         (WebCore::InspectorCSSAgent::disable):
2164         (WebCore::InspectorCSSAgent::startSelectorProfiler):
2165         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
2166         Remove unused states. Make CSSAgentState::isSelectorProfiling check profile object exists or not.
2167
2168         * inspector/InspectorCanvasAgent.cpp:
2169         (WebCore::InspectorCanvasAgent::enable):
2170         (WebCore::InspectorCanvasAgent::disable):
2171         Remove unused state, member variable already existed.
2172
2173         * inspector/InspectorConsoleAgent.h:
2174         * inspector/InspectorConsoleAgent.cpp:
2175         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
2176         (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
2177         (WebCore::InspectorConsoleAgent::enable):
2178         (WebCore::InspectorConsoleAgent::disable):
2179         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
2180         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
2181         ConsoleAgentState::consoleMessagesEnabled already had m_enabled.
2182         ConsoleAgentState::monitoringXHR -> m_monitoringXHREnabled.
2183         
2184         * inspector/InspectorDOMAgent.h:
2185         * inspector/InspectorDOMAgent.cpp:
2186         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
2187         (WebCore::InspectorDOMAgent::clearFrontend):
2188         (WebCore::InspectorDOMAgent::setDocument):
2189         (WebCore::InspectorDOMAgent::getDocument):
2190         (WebCore::InspectorDOMAgent::mainFrameDOMContentLoaded):
2191         DOMAgentState::documentRequested -> m_documentRequested.
2192
2193         * inspector/InspectorDOMDebuggerAgent.h:
2194         * inspector/InspectorDOMDebuggerAgent.cpp:
2195         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
2196         (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
2197         (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
2198         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
2199         DOMDebuggerAgentState::pauseOnAllXHRs -> m_pauseOnAllXHRsEnabled.
2200
2201         * inspector/InspectorDOMStorageAgent.h:
2202         * inspector/InspectorDOMStorageAgent.cpp:
2203         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
2204         (WebCore::InspectorDOMStorageAgent::enable):
2205         (WebCore::InspectorDOMStorageAgent::disable):
2206         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
2207         DOMStorageAgentState::domStorageAgentEnabled -> m_enabled.
2208
2209         * inspector/InspectorDatabaseAgent.cpp:
2210         (WebCore::InspectorDatabaseAgent::enable):
2211         (WebCore::InspectorDatabaseAgent::disable):
2212         Remove unused state, m_enabled already existed.
2213
2214         * inspector/InspectorDebuggerAgent.h:
2215         * inspector/InspectorDebuggerAgent.cpp:
2216         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
2217         (WebCore::InspectorDebuggerAgent::enable):
2218         (WebCore::InspectorDebuggerAgent::disable):
2219         (WebCore::InspectorDebuggerAgent::enabled):
2220         (WebCore::InspectorDebuggerAgent::clearFrontend):
2221         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsImpl):
2222         DebuggerAgentState::pauseOnExceptionsState removed, never read.
2223         DebuggerAgentState::debuggerEnabled -> m_enabled.
2224
2225         * inspector/InspectorHeapProfilerAgent.h:
2226         * inspector/InspectorHeapProfilerAgent.cpp:
2227         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
2228         (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
2229         (WebCore::InspectorHeapProfilerAgent::clearFrontend):
2230         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
2231         HeapProfilerAgentState::profileHeadersRequested -> m_profileHeadersRequested.
2232
2233         * inspector/InspectorIndexedDBAgent.cpp:
2234         (WebCore::InspectorIndexedDBAgent::enable):
2235         (WebCore::InspectorIndexedDBAgent::disable):
2236         Remove unused state, never read.
2237
2238         * inspector/InspectorLayerTreeAgent.cpp:
2239         (WebCore::InspectorLayerTreeAgent::enable):
2240         (WebCore::InspectorLayerTreeAgent::disable):
2241         Remove unused state, did not need to be read.
2242
2243         * inspector/InspectorPageAgent.h:
2244         * inspector/InspectorPageAgent.cpp:
2245         (WebCore::InspectorPageAgent::InspectorPageAgent):
2246         (WebCore::InspectorPageAgent::webViewResized):
2247         (WebCore::InspectorPageAgent::enable):
2248         (WebCore::InspectorPageAgent::disable):
2249         (WebCore::InspectorPageAgent::setDeviceMetricsOverride):
2250         (WebCore::InspectorPageAgent::deviceMetricsChanged):
2251         (WebCore::InspectorPageAgent::setShowPaintRects):
2252         (WebCore::InspectorPageAgent::setShowDebugBorders):
2253         (WebCore::InspectorPageAgent::setShowFPSCounter):
2254         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled):
2255         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
2256         (WebCore::InspectorPageAgent::applyScreenWidthOverride):
2257         (WebCore::InspectorPageAgent::applyScreenHeightOverride):
2258         (WebCore::InspectorPageAgent::didPaint):
2259         (WebCore::InspectorPageAgent::didLayout):
2260         (WebCore::InspectorPageAgent::updateTouchEventEmulationInPage):
2261         (WebCore::InspectorPageAgent::setTouchEmulationEnabled):
2262         (WebCore::InspectorPageAgent::setEmulatedMedia):
2263         (WebCore::InspectorPageAgent::applyEmulatedMedia):
2264         PageAgentState::pageAgentScreenWidthOverride -> m_screenWidthOverride.
2265         PageAgentState::pageAgentScreenHeightOverride -> m_screenHeightOverride.
2266         PageAgentState::pageAgentFontScaleFactorOverride -> m_fontScaleFactorOverride.
2267         PageAgentState::pageAgentFitWindow -> m_fitWindowOverride.
2268         PageAgentState::pageAgentShowPaintRects -> m_showPaintRects.
2269         PageAgentState::pageAgentEmulatedMedia -> m_emulatedMedia.
2270         Remove other unused states.
2271
2272         * inspector/InspectorProfilerAgent.h:
2273         * inspector/InspectorProfilerAgent.cpp:
2274         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2275         (WebCore::InspectorProfilerAgent::addProfile):
2276         (WebCore::InspectorProfilerAgent::enable):
2277         (WebCore::InspectorProfilerAgent::disable):
2278         (WebCore::InspectorProfilerAgent::getProfileHeaders):
2279         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
2280         (WebCore::InspectorProfilerAgent::start):
2281         (WebCore::InspectorProfilerAgent::stop):
2282         (WebCore::InspectorProfilerAgent::enabled):
2283         ProfilerAgentState::profileHeadersRequested -> m_profileHeadersRequested.
2284         Remove other unused states.
2285
2286         * inspector/InspectorResourceAgent.h:
2287         * inspector/InspectorResourceAgent.cpp:
2288         (WebCore::InspectorResourceAgent::~InspectorResourceAgent):
2289         (WebCore::InspectorResourceAgent::willSendRequest):
2290         (WebCore::InspectorResourceAgent::applyUserAgentOverride):
2291         (WebCore::InspectorResourceAgent::enable):
2292         (WebCore::InspectorResourceAgent::disable):
2293         (WebCore::InspectorResourceAgent::setUserAgentOverride):
2294         (WebCore::InspectorResourceAgent::setCacheDisabled):
2295         (WebCore::InspectorResourceAgent::mainFrameNavigated):
2296         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
2297         ResourceAgentState::resourceAgentEnabled -> m_enabled.
2298         ResourceAgentState::cacheDisabled -> m_cacheDisabled.
2299         ResourceAgentState::userAgentOverride -> m_userAgentOverride (this already existed and was unused).
2300
2301         * inspector/InspectorTimelineAgent.h:
2302         * inspector/InspectorTimelineAgent.cpp:
2303         (WebCore::InspectorTimelineAgent::start):
2304         (WebCore::InspectorTimelineAgent::stop):
2305         (WebCore::InspectorTimelineAgent::setDOMCounters):
2306         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2307         TimelineAgentState::timelineAgentEnabled -> m_enabled.
2308         TimelineAgentState::includeDomCounters -> m_includeDOMCounters.
2309         Remove other unused states.
2310
2311         * inspector/InspectorWorkerAgent.h:
2312         * inspector/InspectorWorkerAgent.cpp:
2313         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
2314         (WebCore::InspectorWorkerAgent::clearFrontend):
2315         (WebCore::InspectorWorkerAgent::enable):
2316         (WebCore::InspectorWorkerAgent::disable):
2317         (WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
2318         (WebCore::InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart):
2319         (WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
2320         (WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
2321         WorkerAgentState::workerInspectionEnabled -> m_enabled.
2322         WorkerAgentState::autoconnectToWorkers -> m_shouldPauseDedicatedWorkerOnStart.
2323
2324         * inspector/PageRuntimeAgent.cpp:
2325         (WebCore::PageRuntimeAgent::enable):
2326         (WebCore::PageRuntimeAgent::disable):
2327         Remove unused state, not read.
2328
2329 2013-10-30  Ryosuke Niwa  <rniwa@webkit.org>
2330
2331         Remove code for Mac Lion
2332         https://bugs.webkit.org/show_bug.cgi?id=123542
2333
2334         Reviewed by Anders Carlsson.
2335
2336         Removed the code for Mac OS X 10.7.
2337
2338         * platform/graphics/ImageBuffer.h:
2339         * platform/graphics/cg/ImageBufferCG.cpp:
2340         (WebCore::ImageBuffer::ImageBuffer):
2341         (WebCore::ImageBuffer::context):
2342         (WebCore::ImageBuffer::flushContext):
2343         * platform/graphics/cg/ImageBufferDataCG.h:
2344         * platform/graphics/cg/ImageSourceCG.cpp:
2345         (WebCore::imageSourceOptions):
2346         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2347         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2348         * platform/mac/ScrollAnimatorMac.mm:
2349         (WebCore::scrollAnimationEnabledForSystem):
2350         * platform/mac/ScrollElasticityController.mm:
2351         (WebCore::reboundDeltaForElasticDelta):
2352         * platform/mac/ThemeMac.mm:
2353         (WebCore::updateStates):
2354         (WebCore::paintCheckbox):
2355         (WebCore::paintRadio):
2356         (WebCore::paintButton):
2357         * platform/mac/WebCoreNSCellExtras.h:
2358         * platform/mac/WebCoreNSCellExtras.m:
2359         * rendering/RenderThemeMac.mm:
2360         (WebCore::RenderThemeMac::paintTextField):
2361         (WebCore::RenderThemeMac::paintMenuList):
2362         (WebCore::RenderThemeMac::setPopupButtonCellState):
2363         (WebCore::RenderThemeMac::textField):
2364
2365 2013-10-30  Alexey Proskuryakov  <ap@apple.com>
2366
2367         85 inspector tests asserting in DrawingAreaProxyImpl::updateAcceleratedCompositingMode()
2368         when there is a stale WebKitTestRunner preference
2369         https://bugs.webkit.org/show_bug.cgi?id=115115
2370
2371         Reviewed by Darin Adler.
2372
2373         * page/Settings.cpp:
2374         (WebCore::Settings::setMockScrollbarsEnabled):
2375         (WebCore::Settings::setUsesOverlayScrollbars):
2376         Added FIXMEs.
2377
2378 2013-10-30  Andreas Kling  <akling@apple.com>
2379
2380         Take line boxes out of the arena.
2381         <https://webkit.org/b/123533>
2382
2383         Stop arena-allocating line boxes so we can move forward on improving
2384         render tree memory management. This will also allow more rendering
2385         code to take advantage of malloc optimizations.
2386
2387         This will likely regress performance on some micro-benchmarks, but
2388         it's something we want to do sooner rather than later so we have time
2389         to restabilize it. All improvements to the simple line layout's
2390         coverage will help with recouping whatever is regressed.
2391
2392         BiDi runs are the only remaining user of the arena now.
2393
2394         Reviewed by Antti Koivisto
2395
2396 2013-10-30  Joseph Pecoraro  <pecoraro@apple.com>
2397
2398         Web Inspector: Remove InspectorAgent::restore functionality
2399         https://bugs.webkit.org/show_bug.cgi?id=123525
2400
2401         Reviewed by Timothy Hatcher.
2402
2403         Remove unused InspectorAgent restore functionality.
2404
2405         * inspector/InspectorApplicationCacheAgent.cpp:
2406         * inspector/InspectorApplicationCacheAgent.h:
2407         * inspector/InspectorBaseAgent.cpp:
2408         * inspector/InspectorBaseAgent.h:
2409         * inspector/InspectorCSSAgent.cpp:
2410         * inspector/InspectorCSSAgent.h:
2411         * inspector/InspectorCanvasAgent.cpp:
2412         * inspector/InspectorCanvasAgent.h:
2413         * inspector/InspectorConsoleAgent.cpp:
2414         * inspector/InspectorConsoleAgent.h:
2415         * inspector/InspectorController.cpp:
2416         * inspector/InspectorController.h:
2417         * inspector/InspectorDOMAgent.cpp:
2418         * inspector/InspectorDOMAgent.h:
2419         * inspector/InspectorDatabaseAgent.cpp:
2420         * inspector/InspectorDatabaseAgent.h:
2421         * inspector/InspectorDebuggerAgent.cpp:
2422         * inspector/InspectorDebuggerAgent.h:
2423         * inspector/InspectorHeapProfilerAgent.cpp:
2424         * inspector/InspectorHeapProfilerAgent.h:
2425         * inspector/InspectorIndexedDBAgent.cpp:
2426         * inspector/InspectorIndexedDBAgent.h:
2427         * inspector/InspectorLayerTreeAgent.cpp:
2428         * inspector/InspectorLayerTreeAgent.h:
2429         * inspector/InspectorPageAgent.cpp:
2430         * inspector/InspectorPageAgent.h:
2431         * inspector/InspectorProfilerAgent.cpp:
2432         * inspector/InspectorProfilerAgent.h:
2433         * inspector/InspectorResourceAgent.cpp:
2434         * inspector/InspectorResourceAgent.h:
2435         * inspector/InspectorTimelineAgent.cpp:
2436         * inspector/InspectorTimelineAgent.h:
2437         * inspector/InspectorWorkerAgent.cpp:
2438         * inspector/InspectorWorkerAgent.h:
2439         * inspector/PageRuntimeAgent.cpp:
2440         * inspector/PageRuntimeAgent.h:
2441         * inspector/WorkerInspectorController.cpp:
2442         * inspector/WorkerInspectorController.h:
2443
2444 2013-10-30  Jer Noble  <jer.noble@apple.com>
2445
2446         REGRESSION(r158288): media/media-can-play-mpeg4-video.html fails
2447         https://bugs.webkit.org/show_bug.cgi?id=123530
2448
2449         Reviewed by Eric Carlson.
2450
2451         Lower case the mime type before passing it along to MediaPlayer.
2452
2453         * html/HTMLMediaElement.cpp:
2454         (WebCore::HTMLMediaElement::canPlayType):
2455         (WebCore::HTMLMediaElement::selectNextSourceChild):
2456
2457 2013-10-30  Alexey Proskuryakov  <ap@apple.com>
2458
2459         Add a way to fulfill promises from DOM code
2460         https://bugs.webkit.org/show_bug.cgi?id=123466
2461
2462         Reviewed by Sam Weinig.
2463
2464         This is not perfect, as it strongly ties DOM code to JavaScript. In the future, we
2465         can make it better e.g. by subclassing, so that only a base interface would be exposed.
2466
2467         * GNUmakefile.list.am:
2468         * WebCore.vcxproj/WebCore.vcxproj:
2469         * WebCore.vcxproj/WebCore.vcxproj.filters:
2470         * bindings/js/JSBindingsAllInOne.cpp:
2471         * WebCore.xcodeproj/project.pbxproj:
2472         Added JSDOMPromise.
2473
2474         * bindings/js/JSDOMPromise.cpp: Added.
2475
2476         * bindings/js/JSDOMPromise.h: Added.
2477         (WebCore::PromiseWrapper::create):
2478         (WebCore::PromiseWrapper::fulfill): A random set of specializations that I needed
2479         in WebCrypto code so far.
2480         (WebCore::PromiseWrapper::reject): Ditto.
2481
2482 2013-10-30  Santosh Mahto  <santosh.ma@samsung.com>
2483
2484         contentEditable deleting lists when list items are block level
2485         https://bugs.webkit.org/show_bug.cgi?id=122602
2486
2487         Reviewed by Ryosuke Niwa.
2488
2489         When listitems are styled with display:block/float then inserting paragraph
2490         twice at end of listitem delete entire list. Generally when listitem is empty
2491         then we delete the listitem on inserting paragraph. In this issue, on inserting
2492         first paragraph one empty listitem is created, and on inserting second paragraph
2493         we try to delete that empty listitem. but it misbehave becasue of incomplete 
2494         definition of htmlediting::isLisItem() and entire list is deleted.
2495
2496         htmlediting::isListItem() check only render object to decide whether it is 
2497         list or not, so if any LI element is block level then isListItem return false.
2498         Now after this patch if parent of current node is list element then node is
2499         treated as listItem.
2500
2501         Test: editing/execCommand/hit-enter-twice-atendof-block-styled-listitem.html
2502
2503         * editing/htmlediting.cpp:
2504         (WebCore::isListItem): Modified condition to check if parent node is list;
2505
2506 2013-10-30  Jer Noble  <jer.noble@apple.com>
2507
2508         Unreviewed EFL build fix; give MediaEngineSupportParameters struct a default constructor.
2509
2510         * Modules/mediasource/MediaSource.cpp:
2511         (WebCore::MediaSource::isTypeSupported):
2512         * dom/DOMImplementation.cpp:
2513         (WebCore::DOMImplementation::createDocument):
2514         * html/HTMLMediaElement.cpp:
2515         (WebCore::HTMLMediaElement::canPlayType):
2516         (WebCore::HTMLMediaElement::selectNextSourceChild):
2517         * platform/graphics/MediaPlayer.h:
2518         (WebCore::MediaEngineSupportParameters::MediaEngineSupportParameters):
2519
2520 2013-10-30  Andreas Kling  <akling@apple.com>
2521
2522         Let Page::renderTreeSize() be the number of renderers.
2523         <https://webkit.org/b/123518>
2524         <rdar://problem/15348679>
2525
2526         The old metric was "number of bytes allocated in RenderArena" and
2527         that was heading towards obsolescence, fast.
2528
2529         Instead, keep a count of RenderObjects instantiated on RenderView.
2530         While a bit ugly, this lets us move forward with rendering memory
2531         model improvements without breaking features.
2532
2533         Reviewed by Beth Dakin.
2534
2535 2013-10-30  Myles C. Maxfield  <mmaxfield@apple.com>
2536
2537         WebKit/win/WebKitGraphics.h:void WebDrawText(WebTextRenderInfo*); is never called
2538         https://bugs.webkit.org/show_bug.cgi?id=123485
2539
2540         Reviewed by Brent Fulgham.
2541
2542         WebDrawText is the only caller of WebCoreDrawTextAtPoint, so we can
2543         delete that as well.
2544
2545         Because there is no behavior difference, no new tests are necessary.
2546
2547         * platform/win/WebCoreTextRenderer.cpp:
2548         * platform/win/WebCoreTextRenderer.h:
2549
2550 2013-10-30  Csaba Osztrogonác  <ossy@webkit.org>
2551
2552         URTBF after r158289.
2553
2554         * CMakeLists.txt:
2555         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2556         (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
2557
2558 2013-10-30  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2559
2560         Build fails with EGLConfigSelector.cpp when OpenGL ES is not used
2561         https://bugs.webkit.org/show_bug.cgi?id=119037
2562
2563         Reviewed by Brent Fulgham.
2564
2565         Build fix for EGLConfigSelector.cpp
2566
2567         No new tests, no behavior change.
2568
2569         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
2570         (WebCore::EGLConfigSelector::createConfig):
2571
2572 2013-10-30  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2573
2574         Explicitly initialize base class in MediStreamTrackPrivate copy constructor
2575         https://bugs.webkit.org/show_bug.cgi?id=123473
2576
2577         Reviewed by Eric Carlson.
2578
2579         No new tests needed.
2580
2581         Ports that enable -Werror=extra must do that to compile.
2582
2583         * platform/mediastream/MediaStreamTrackPrivate.cpp:
2584         (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
2585
2586 2013-10-30  Ryosuke Niwa  <rniwa@webkit.org>
2587
2588         Mac build fix after r158291.
2589
2590         * html/HTMLMediaElement.cpp:
2591         (WebCore::HTMLMediaElement::canPlayType):
2592
2593 2013-10-30  Commit Queue  <commit-queue@webkit.org>
2594
2595         Unreviewed, rolling out r158243.
2596         http://trac.webkit.org/changeset/158243
2597         https://bugs.webkit.org/show_bug.cgi?id=123520
2598
2599         Change was wrong (Requested by smfr on #webkit).
2600
2601         * platform/graphics/GraphicsContext.h:
2602         * platform/graphics/blackberry/PathBlackBerry.cpp:
2603         (WebCore::GraphicsContext::drawLineForText):
2604         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2605         (WebCore::GraphicsContext::drawLineForText):
2606         * platform/graphics/cg/GraphicsContextCG.cpp:
2607         (WebCore::GraphicsContext::drawLineForText):
2608         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2609         (WebCore::GraphicsContext::drawLineForText):
2610         * platform/win/WebCoreTextRenderer.cpp:
2611         (WebCore::doDrawTextAtPoint):
2612         * rendering/InlineTextBox.cpp:
2613         (WebCore::InlineTextBox::paintDecoration):
2614         (WebCore::InlineTextBox::paintCompositionUnderline):
2615
2616 2013-10-30  peavo@outlook.com  <peavo@outlook.com>
2617
2618         Favicons are flipped in vertical direction in WinCairo builds.
2619         https://bugs.webkit.org/show_bug.cgi?id=102077
2620
2621         Reviewed by Brent Fulgham.
2622
2623         * platform/graphics/win/ImageCairoWin.cpp:
2624         (WebCore::BitmapImage::getHBITMAPOfSize):
2625
2626 2013-10-30  Jer Noble  <jer.noble@apple.com>
2627
2628         [MSE] Add MediaSource compatable loading functions to MediaPlayer
2629         https://bugs.webkit.org/show_bug.cgi?id=123353
2630
2631         Reviewed by Eric Carlson.
2632
2633         Add methods to MediaPlayer to allow it to select the correct MediaPlayerFactory
2634         when attempting to load a MediaSource URL.
2635
2636         * Modules/mediasource/MediaSource.cpp:
2637         (WebCore::MediaSource::addSourceBuffer):
2638         (WebCore::MediaSource::isTypeSupported):
2639         * html/HTMLMediaElement.cpp:
2640         (WebCore::HTMLMediaElement::loadResource):
2641         (WebCore::HTMLMediaElement::canPlayType):
2642         (WebCore::HTMLMediaElement::selectNextSourceChild):
2643         * platform/graphics/MediaPlayer.cpp:
2644         (WebCore::MediaPlayer::load):
2645         (WebCore::MediaPlayer::supportsType):
2646         * platform/graphics/MediaPlayer.h:
2647         * dom/DOMImplementation.cpp:
2648         (WebCore::DOMImplementation::createDocument):
2649
2650         Remove the isSupportedMediaSourceMIMEType() method:
2651         * platform/MIMETypeRegistry.h:
2652         * platform/efl/MIMETypeRegistryEfl.cpp:
2653         * platform/mac/MIMETypeRegistryMac.mm:
2654
2655
2656 2013-10-30  Brady Eidson  <beidson@apple.com>
2657
2658         IDBCursorBackendLevelDB should be made cross-platform
2659         https://bugs.webkit.org/show_bug.cgi?id=123513
2660
2661         Rubberstamped by Andreas Kling.
2662
2663         Because of all the already-done refactoring, this is basically a file-move and global rename.
2664
2665         * CMakeLists.txt:
2666         * GNUmakefile.list.am:
2667         * WebCore.xcodeproj/project.pbxproj:
2668         * WebCore.vcxproj/WebCore.vcxproj:
2669
2670         * Modules/indexeddb/IDBCursorBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp.
2671         * Modules/indexeddb/IDBCursorBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h.
2672
2673         * Modules/indexeddb/IDBCursorBackendInterface.h:
2674
2675         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2676
2677 2013-10-29  Jer Noble  <jer.noble@apple.com>
2678
2679         [MSE] Remove legacy Media Source APIs (WebKitMediaSource, WebKitSourceBuffer, WebKitSourceBufferList)
2680         https://bugs.webkit.org/show_bug.cgi?id=123463
2681
2682         Reviewed by Eric Carlson.
2683
2684         No new tests; updated test results.
2685
2686         Remove all reference to WebKitMediaSource, WebKitSourceBuffer, and WebKitSourceBufferList.
2687
2688         * CMakeLists.txt:
2689         * DerivedSources.cpp:
2690         * DerivedSources.make:
2691         * GNUmakefile.list.am:
2692         * Modules/mediasource/DOMURLMediaSource.idl:
2693         * Modules/mediasource/WebKitMediaSource.cpp: Removed.
2694         * Modules/mediasource/WebKitMediaSource.h: Removed.
2695         * Modules/mediasource/WebKitMediaSource.idl: Removed.
2696         * Modules/mediasource/WebKitSourceBuffer.cpp: Removed.
2697         * Modules/mediasource/WebKitSourceBuffer.h: Removed.
2698         * Modules/mediasource/WebKitSourceBuffer.idl: Removed.
2699         * Modules/mediasource/WebKitSourceBufferList.cpp: Removed.
2700         * Modules/mediasource/WebKitSourceBufferList.h: Removed.
2701         * Modules/mediasource/WebKitSourceBufferList.idl: Removed.
2702         * WebCore.xcodeproj/project.pbxproj:
2703         * dom/EventTargetFactory.in:
2704
2705 2013-10-30  Antti Koivisto  <antti@apple.com>
2706
2707         Unbreak the release build.
2708
2709         * rendering/SimpleLineLayoutFunctions.cpp:
2710
2711 2013-10-30  Liangjun Zeng  <lizeng@blackberry.com>
2712
2713         Fix memory leaks in platform/image-encoders/JPEGImageEncoder.cpp
2714         https://bugs.webkit.org/show_bug.cgi?id=118781
2715
2716         Reviewed by Brent Fulgham.
2717
2718         We can find the function "jpeg_finish_compress" call the function "jpeg_abort" at the end.
2719         And the comments of "jpeg_abort" is "Abort processing of a JPEG compression operation,
2720         but don't destroy the object itself". (We can find these in the "jcapimin.c" of jpeg)
2721         So the compression object destroy need be called.
2722         No new tests because this doesn't change functionality.
2723
2724         * platform/image-encoders/JPEGImageEncoder.cpp:
2725         (WebCore::compressRGBABigEndianToJPEG):
2726
2727 2013-10-30  Antti Koivisto  <antti@apple.com>
2728
2729         Add debug settings for simple line layout
2730         https://bugs.webkit.org/show_bug.cgi?id=123514
2731
2732         Reviewed by Andreas Kling.
2733
2734         * WebCore.exp.in:
2735         * page/Settings.in:
2736         
2737             Add simpleLineLayoutEnabled and simpleLineLayoutDebugBordersEnabled.
2738
2739         * rendering/SimpleLineLayout.cpp:
2740         (WebCore::SimpleLineLayout::canUseFor):
2741         * rendering/SimpleLineLayoutFunctions.cpp:
2742         (WebCore::SimpleLineLayout::paintDebugBorders):
2743         (WebCore::SimpleLineLayout::paintFlow):
2744
2745 2013-10-30  peavo@outlook.com  <peavo@outlook.com>
2746
2747         [Curl] Cookies are sometimes not set in download request.
2748         https://bugs.webkit.org/show_bug.cgi?id=123445
2749
2750         Reviewed by Brent Fulgham.
2751
2752         Sometimes cookies are not set in the download request because the cookie file cannot be opened,
2753         it's already been opened by the ResourceHandleManager for writing.
2754         This can be fixed by getting the cookie list from the share handle in ResourceHandleManager instead.
2755         This will also improve performance, as there is no need to read and parse the cookie file for each download.
2756
2757         * platform/network/curl/CurlDownload.cpp:
2758         (WebCore::CurlDownload::init): Use share handle to get cookie list.
2759
2760 2013-10-30  ChangSeok Oh  <changseok.oh@collabora.com>
2761
2762         Unguard Element::childShouldCreateRenderer
2763         https://bugs.webkit.org/show_bug.cgi?id=123496
2764
2765         Reviewed by Andreas Kling.
2766
2767         Make Element::childShouldCreateRenderer normally accessible. Guarding it with flags
2768         just leaves potential build issues.
2769
2770         No new tests since no functionality changed.
2771
2772         * dom/Element.cpp:
2773         (WebCore::Element::childShouldCreateRenderer):
2774         * dom/Element.h:
2775
2776 2013-10-30  Jer Noble  <jer.noble@apple.com>
2777
2778         [MSE] Make MediaSourcePrivate, SourceBufferPrivate classes RefCounted.
2779         https://bugs.webkit.org/show_bug.cgi?id=123350
2780
2781         Reviewed by Darin Adler.
2782
2783         Make the MediaSourcePrivate and SourceBufferPrivate classes RefCounted so that
2784         they can be referenced both by MediaSource/SourceBuffer, and by the MediaPlayerPrivate
2785         which creates them.
2786
2787         Change OwnPtr -> RefPtr everywhere:
2788         * Modules/mediasource/MediaSource.cpp:
2789         (WebCore::MediaSource::addSourceBuffer):
2790         * Modules/mediasource/MediaSourceBase.cpp:
2791         (WebCore::MediaSourceBase::setPrivateAndOpen):
2792         (WebCore::MediaSourceBase::createSourceBufferPrivate):
2793         * Modules/mediasource/MediaSourceBase.h:
2794         * Modules/mediasource/SourceBuffer.cpp:
2795         (WebCore::SourceBuffer::create):
2796         (WebCore::SourceBuffer::SourceBuffer):
2797         * Modules/mediasource/SourceBuffer.h:
2798         * Modules/mediasource/WebKitMediaSource.cpp:
2799         (WebCore::WebKitMediaSource::addSourceBuffer):
2800         * Modules/mediasource/WebKitSourceBuffer.cpp:
2801         (WebCore::WebKitSourceBuffer::create):
2802         (WebCore::WebKitSourceBuffer::WebKitSourceBuffer):
2803         * Modules/mediasource/WebKitSourceBuffer.h:
2804         * html/HTMLMediaSource.h:
2805         * platform/graphics/MediaSourcePrivate.h:
2806         * platform/graphics/SourceBufferPrivate.h:
2807         (WebCore::SourceBufferPrivate::SourceBufferPrivate):
2808
2809 2013-10-30  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2810
2811         Remove unused runtime enabled
2812         https://bugs.webkit.org/show_bug.cgi?id=123509
2813
2814         Reviewed by Anders Carlsson.
2815
2816         Some of the runtime enabled features were only ever used by the V8 bindings
2817         and can be removed as no WebKit code sets or reads them.
2818
2819         * bindings/generic/RuntimeEnabledFeatures.cpp:
2820         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
2821         * bindings/generic/RuntimeEnabledFeatures.h:
2822
2823 2013-10-30  Antti Koivisto  <antti@apple.com>
2824
2825         Make SimpleLineLayout::Layout a class
2826         https://bugs.webkit.org/show_bug.cgi?id=123508
2827
2828         Reviewed by Mario Sanchez Prada.
2829
2830         Improve encapsulation.
2831
2832 2013-10-30  Antti Koivisto  <antti@apple.com>
2833
2834         REGRESSION(r158214): It made zillion tests crash on GTK and EFL
2835         https://bugs.webkit.org/show_bug.cgi?id=123505
2836
2837         * rendering/SimpleLineLayout.h: Add WTF_MAKE_FAST_ALLOCATED
2838
2839 2013-10-29  Philippe Normand  <pnormand@igalia.com>
2840
2841         [GStreamer] Store video-sink in a bin
2842         https://bugs.webkit.org/show_bug.cgi?id=122831
2843
2844         Reviewed by Gustavo Noronha Silva.
2845
2846         For the upcoming mediastream playback support the player will
2847         handle a non-playbin-based pipeline that will require a slightly
2848         different video rendering chain. This patch generalizes the
2849         encapsulation of the video sink in a bin, just like the audio sink
2850         case.
2851
2852         No new tests, no change in functionality.
2853
2854 2013-10-29  Ryosuke Niwa  <rniwa@webkit.org>
2855
2856         REGRESSION(r154614): Opening and closing a picture on Facebook resets scroll position
2857         https://bugs.webkit.org/show_bug.cgi?id=122882
2858
2859         Reviewed by Anders Carlsson.
2860
2861         scrollLeft and scrollTop have to continue to function in the strict mode for the Web compatiblity.
2862         In particular, www.facebook.com and build.webkit.org depend on this behavior as of October 29th, 2013.
2863
2864         * html/HTMLBodyElement.cpp:
2865         (WebCore::HTMLBodyElement::scrollLeft):
2866         (WebCore::HTMLBodyElement::setScrollLeft):
2867         (WebCore::HTMLBodyElement::scrollTop):
2868         (WebCore::HTMLBodyElement::setScrollTop):
2869
2870 2013-10-29  Brady Eidson  <beidson@apple.com>
2871
2872         IDBTransactionBackend should be cross platform
2873         https://bugs.webkit.org/show_bug.cgi?id=123449
2874
2875         Reviewed by Beth Dakin.
2876
2877         - Rename IDBTransactionBackendLevelDB to IDBTransactionBackendImpl
2878         - Rename IDBTransactionBackendLevelDBOperations to IDBTransactionBackendOperations
2879         - Move their files from the leveldb subdirectory to the indexeddb directory
2880
2881         * CMakeLists.txt:
2882         * GNUmakefile.list.am:
2883         * WebCore.xcodeproj/project.pbxproj:
2884
2885         * Modules/indexeddb/IDBTransactionBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp.
2886         * Modules/indexeddb/IDBTransactionBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h.
2887         * Modules/indexeddb/IDBTransactionBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp.
2888         * Modules/indexeddb/IDBTransactionBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h.
2889
2890         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
2891         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
2892         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2893         (WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend):
2894
2895 2013-10-29  Sam Weinig  <sam@webkit.org>
2896
2897         Modernize DatasetDOMStringMap and ClassList a bit
2898         https://bugs.webkit.org/show_bug.cgi?id=123491
2899
2900         Reviewed by Andreas Kling.
2901
2902         * dom/DatasetDOMStringMap.cpp:
2903         * dom/DatasetDOMStringMap.h:
2904         * dom/Element.cpp:
2905         * dom/ElementRareData.h:
2906         * html/ClassList.cpp:
2907         * html/ClassList.h:
2908         Pass the owner Element by reference and store in a std::unique_ptr.
2909
2910 2013-10-29  Brady Eidson  <beidson@apple.com>
2911
2912         Attempted build-fix after http://trac.webkit.org/changeset/158234
2913
2914         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2915         (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction): Implement this!
2916
2917 2013-10-29  Andreas Kling  <akling@apple.com>
2918
2919         ElementData construction helpers should return PassRef.
2920         <https://webkit.org/b/123487>
2921
2922         Make functions that create new ElementData objects return appropriate
2923         PassRef pointers instead of PassRefPtr.
2924
2925         Reviewed by Anders Carlsson.
2926
2927 2013-10-29  Ryosuke Niwa  <rniwa@webkit.org>
2928
2929         GTK+ build fix attempt after r158220.
2930
2931         * GNUmakefile.list.am:
2932
2933 2013-10-29  Brady Eidson  <beidson@apple.com>
2934
2935         Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface
2936         https://bugs.webkit.org/show_bug.cgi?id=123483
2937
2938         Reviewed by Andreas Kling.
2939
2940         * Modules/indexeddb/IDBCursorBackendInterface.h:
2941         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2942         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2943         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2944         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2945
2946         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
2947         (WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
2948         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
2949         (WebCore::IDBCursorBackendLevelDB::create):
2950
2951         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2952         (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
2953         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2954
2955         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
2956         (WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
2957         (WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
2958         (WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
2959         (WebCore::IDBTransactionBackendLevelDB::createCursorBackend):
2960         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2961
2962         * WebCore.xcodeproj/project.pbxproj: Export a required header.
2963
2964 2013-10-29  Seokju Kwon  <seokju@webkit.org>
2965
2966         Remove mutable keyword from member variables of XMLHttpRequest
2967         https://bugs.webkit.org/show_bug.cgi?id=123481
2968
2969         Reviewed by Andreas Kling.
2970
2971         No new tests, no change in functionality.
2972
2973         * xml/XMLHttpRequest.h: Remove mutable keyword as these are no longer used in const functions.
2974
2975 2013-10-29  Myles C. Maxfield  <mmaxfield@apple.com>
2976
2977         Underline bounds cannot be queried before underline itself is drawn
2978         https://bugs.webkit.org/show_bug.cgi?id=123310
2979
2980         Reviewed by Simon Fraser
2981
2982         GraphicsContext's drawLineForText function is used to draw underlines,
2983         strikethroughs, and overlines. Before drawing the line, this function
2984         modifies the bounds given to it in order to make underlines crisp. However,  
2985         this means that it is impossible to know where an underline will be drawn
2986         before drawing it. This patch pulls out this adjustment computation into 
2987         InlineTextBox, then passes the result to drawLineForText.
2988
2989         Because there should be no observable difference, no tests need to be updated.
2990
2991         * platform/graphics/GraphicsContext.h: Changing the signature of drawLineForText
2992         so it can accept bounds from our helper function
2993         * platform/graphics/blackberry/PathBlackBerry.cpp:
2994         (WebCore::GraphicsContext::drawLineForText): Update to work with new
2995         signature of drawLineForText
2996         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2997         (WebCore::GraphicsContext::drawLineForText): Ditto
2998         * platform/graphics/cg/GraphicsContextCG.cpp:
2999         (WebCore::GraphicsContext::drawLineForText): Ditto
3000         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3001         (WebCore::GraphicsContext::drawLineForText): Ditto
3002         * platform/win/WebCoreTextRenderer.cpp:
3003         (WebCore::doDrawTextAtPoint): Update the last call site of drawLineForText
3004         * rendering/InlineTextBox.cpp:
3005         (WebCore::computeBoundsForUnderline): Pure function that computes the adjusted
3006         bounds of the underline about to be drawn
3007         (WebCore::drawLineForText): calls computeBoundsForUnderline and then
3008         GraphicsContext::drawLineForText
3009         (WebCore::InlineTextBox::paintDecoration): Use new drawLineForText function
3010         (WebCore::InlineTextBox::paintCompositionUnderline): Ditto
3011
3012 2013-10-29  Alexey Proskuryakov  <ap@apple.com>
3013
3014         Beef up CryptoKey
3015         https://bugs.webkit.org/show_bug.cgi?id=123462
3016
3017         Fix a mismerge, remove duplicate CryptoKeyType declaration.
3018
3019         * crypto/CryptoKey.h:
3020
3021 2013-10-29  Alexey Proskuryakov  <ap@apple.com>
3022
3023         Beef up CryptoKey
3024         https://bugs.webkit.org/show_bug.cgi?id=123462
3025
3026         Reviewed by Sam Weinig.
3027
3028         * WebCore.xcodeproj/project.pbxproj: Added new files.
3029
3030         * crypto/CryptoAlgorithmIdentifier.h: Added an enum with all registered algorithms
3031         (they don't have to be all implemented in any port).
3032
3033         * crypto/CryptoKey.cpp:
3034         (WebCore::CryptoKey::CryptoKey): Initialize base class variables.
3035         (WebCore::CryptoKey::type): Convert internal representation for bindings use.
3036         (WebCore::CryptoKey::buildAlgorithmDescription): Ditto. This function is supposed
3037         to be called by derived classes before adding other keyes.
3038         (WebCore::CryptoKey::usages): Convert internal representation for bindings use.
3039
3040         * crypto/CryptoKey.h:
3041         (WebCore::CryptoKey::extractable): Expose for bindings.
3042         (WebCore::CryptoKey::allows): A faster way to check allowed key usage from C++ code.
3043
3044         * crypto/CryptoKey.idl: Added SkipVTableValidation, because validation doesn't work
3045         with derived classes. Corrected "usages" attribute name.
3046
3047         * crypto/CryptoKeyFormat.h: Added. 
3048         * crypto/CryptoKeyType.h: Added.
3049         * crypto/CryptoKeyUsage.h: Added.
3050         Added enums used by CryptoKey.
3051
3052 2013-10-29  Hugo Parente Lima  <hugo.lima@openbossa.org>
3053
3054         Adding Nix files in Source/Platform to trunk
3055         https://bugs.webkit.org/show_bug.cgi?id=118331
3056
3057         Reviewed by Benjamin Poulain.
3058
3059         Add Nix WebAudio implementation that just forward some calls to our API.
3060         This patch is part of the upstream process, tests will be landed by other patches.
3061
3062         * platform/audio/nix/AudioBusNix.cpp: Added.
3063         * platform/audio/nix/AudioDestinationNix.cpp: Added.
3064         * platform/audio/nix/AudioDestinationNix.h: Added.
3065         * platform/audio/nix/FFTFrameNix.cpp: Added.
3066         * platform/nix/support/MultiChannelPCMData.cpp: Added.
3067
3068 2013-10-29  Brady Eidson  <beidson@apple.com>
3069
3070         Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface::Transaction.
3071         https://bugs.webkit.org/show_bug.cgi?id=123475
3072
3073         Reviewed by Tim Horton.
3074
3075         Currently it's using IDBBackingStoreLevelDB::Transaction, which hinders the goal of:
3076         https://bugs.webkit.org/show_bug.cgi?id=123449 - IDBTransactionBackend should be cross platform
3077
3078         * Modules/indexeddb/IDBBackingStoreInterface.h:
3079
3080         * Modules/indexeddb/IDBIndexWriter.cpp:
3081         (WebCore::IDBIndexWriter::writeIndexKeys):
3082         (WebCore::IDBIndexWriter::verifyIndexKeys):
3083         (WebCore::IDBIndexWriter::addingKeyAllowed):
3084         * Modules/indexeddb/IDBIndexWriter.h:
3085
3086         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3087
3088         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3089         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseIntVersion):
3090         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseMetaData):
3091         (WebCore::IDBBackingStoreLevelDB::createObjectStore):
3092         (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
3093         (WebCore::IDBBackingStoreLevelDB::getRecord):
3094         (WebCore::IDBBackingStoreLevelDB::putRecord):
3095         (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
3096         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
3097         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
3098         (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
3099         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
3100         (WebCore::IDBBackingStoreLevelDB::createIndex):
3101         (WebCore::IDBBackingStoreLevelDB::deleteIndex):
3102         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
3103         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
3104         (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
3105         (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
3106         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
3107         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
3108         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
3109         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
3110         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3111
3112         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
3113         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
3114         (WebCore::IDBTransactionBackendLevelDB::abort):
3115         (WebCore::IDBTransactionBackendLevelDB::commit):
3116         (WebCore::IDBTransactionBackendLevelDB::taskTimerFired):
3117         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3118
3119 2013-10-29  Dean Jackson  <dino@apple.com>
3120
3121         Move InlineTextBox's text painting to it's own class
3122         https://bugs.webkit.org/show_bug.cgi?id=123355
3123
3124         Reinstate the LGPL license. I incorrectly told Myles to
3125         use another license on these new files.
3126
3127         * rendering/TextPainter.cpp:
3128         * rendering/TextPainter.h:
3129
3130 2013-10-29  Myles C. Maxfield  <mmaxfield@apple.com>
3131
3132         Move InlineTextBox's text painting to it's own class
3133         https://bugs.webkit.org/show_bug.cgi?id=123355
3134
3135         Reviewed by Dean Jackson.
3136
3137         Implementing text-decoration-skip: ink requires drawing text
3138         twice (once regularly, and once with a thick outline into a mask).
3139         This patch pulls out the relevant text drawing code from
3140         InlineTextBox into a new class, called TextPainter, which can be re-used
3141         to draw text multiple times.
3142
3143         Because there should be no observable difference, no tests need to be updated.
3144
3145         * CMakeLists.txt: Adding new TextPainter class
3146         * GNUmakefile.list.am: Adding new TextPainter class
3147         * WebCore.vcxproj/WebCore.vcxproj: Adding new TextPainter class
3148         * WebCore.vcxproj/WebCore.vcxproj.filters: Adding new TextPainter
3149         class
3150         * WebCore.xcodeproj/project.pbxproj: Adding new TextPainter class
3151         * rendering/InlineTextBox.cpp:
3152         (WebCore::InlineTextBox::paint): Moving text drawing code from
3153         this function
3154         * rendering/RenderingAllInOne.cpp: Adding new TextPainter class
3155         * rendering/TextPainter.cpp: Added.
3156         (WebCore::TextPainter::TextPainter):
3157         (WebCore::drawTextOrEmphasisMarks):
3158         (WebCore::paintTextWithShadows):
3159         (WebCore::rotation):
3160         (WebCore::TextPainter::paintText): New location for text drawing
3161         code
3162         (WebCore::TextPainter::paintTextInContext):
3163         * rendering/TextPainter.h: Added.
3164         (WebCore::SavedDrawingStateForMask::SavedDrawingStateForMask):
3165         (WebCore::TextPainter::boxRect):
3166
3167 2013-10-29  Jer Noble  <jer.noble@apple.com>
3168
3169         [MSE] [Mac] Enable MediaSource on the Mac
3170         https://bugs.webkit.org/show_bug.cgi?id=122484
3171
3172         Reviewed by Darin Adler.
3173
3174         Enable ENABLE_MEDIA_SOURCE.
3175
3176         * Configurations/FeatureDefines.xcconfig:
3177
3178 2013-10-29  Tim Horton  <timothy_horton@apple.com>
3179
3180         Build fix after 158223; make TileController use float for scales.
3181
3182         This matches what we do in other places, and fixes the constant
3183         issue with exporting symbols that include CGFloat.
3184
3185         * WebCore.exp.in:
3186         * platform/graphics/ca/mac/TileController.h:
3187         (WebCore::TileController::scale):
3188         * platform/graphics/ca/mac/TileController.mm:
3189         (WebCore::TileController::setScale):
3190
3191 2013-10-29  Antti Koivisto  <antti@apple.com>
3192
3193         Try to keep MSVC happy.
3194
3195         * rendering/SimpleLineLayout.h:
3196         (WebCore::SimpleLineLayout::Run::Run):
3197
3198 2013-10-29  Tim Horton  <timothy_horton@apple.com>
3199
3200         More correct build fix after 158223.
3201
3202         Only fails in release because it's inline.
3203
3204         * WebCore.exp.in:
3205
3206 2013-10-29  Antti Koivisto  <antti@apple.com>
3207
3208         Use left/right instead of left/width for simple text runs
3209         https://bugs.webkit.org/show_bug.cgi?id=123465
3210
3211         Reviewed by Andreas Kling.
3212
3213         This simplifies the code a bit.
3214
3215         * rendering/SimpleLineLayout.cpp:
3216         (WebCore::SimpleLineLayout::adjustRunOffsets):
3217         (WebCore::SimpleLineLayout::create):
3218         * rendering/SimpleLineLayout.h:
3219         (WebCore::SimpleLineLayout::Run::Run):
3220         * rendering/SimpleLineLayoutResolver.h:
3221         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
3222
3223 2013-10-29  Tim Horton  <timothy_horton@apple.com>
3224
3225         Try fixing the Mac build (though I have no idea why
3226         this wouldn't fail locally)...
3227
3228         * WebCore.exp.in:
3229
3230 2013-10-29  Tim Horton  <timothy_horton@apple.com>
3231
3232         Remote Layer Tree: Support tiled drawing and use it for the main frame
3233         https://bugs.webkit.org/show_bug.cgi?id=123422
3234
3235         Reviewed by Simon Fraser.
3236
3237         * WebCore.exp.in:
3238         * WebCore.xcodeproj/project.pbxproj:
3239
3240 2013-10-29  Eric Carlson  <eric.carlson@apple.com>
3241
3242         [Mac MediaStream] implement AVFoundation backed MediaStreamSource
3243         https://bugs.webkit.org/show_bug.cgi?id=123316
3244
3245         Reviewed by Jer Noble
3246
3247         No new tests, existing tests updated.
3248
3249         * CMakeLists.txt: Add MediaStreamSourceStates.cpp.
3250
3251         * Modules/mediastream/MediaSourceStates.cpp:
3252         (WebCore::MediaSourceStates::MediaSourceStates): m_SourceStates -> m_sourceStates.
3253         (WebCore::MediaSourceStates::sourceType): Ditto.
3254         (WebCore::MediaSourceStates::facingMode): Ditto.
3255         * Modules/mediastream/MediaSourceStates.h: Ditto.
3256         * Modules/mediastream/MediaSourceStates.idl: Mark some attributes as optional.
3257
3258         * Modules/mediastream/MediaStream.cpp:
3259         (WebCore::MediaStream::addTrack):
3260         (WebCore::MediaStream::removeTrack):
3261         (WebCore::MediaStream::addRemoteSource):
3262         (WebCore::MediaStream::removeRemoteSource):
3263
3264         * Modules/mediastream/MediaStreamCapabilities.cpp:
3265         (WebCore::MediaStreamCapabilities::sourceType): MediaSourceStates -> MediaStreamSourceStates
3266         (WebCore::MediaStreamCapabilities::facingMode): Ditto.
3267
3268         * Modules/mediastream/MediaStreamTrack.cpp:
3269         (WebCore::MediaStreamTrack::MediaStreamTrack): Don't observe source changes directly, let the
3270             private track do that. Change private track parameter to ref because it can't be NULL.
3271         (WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.
3272         (WebCore::MediaStreamTrack::setSource): Pass through to private track.
3273         (WebCore::MediaStreamTrack::stopped): Ditto.
3274         (WebCore::MediaStreamTrack::states): Ditto.
3275         (WebCore::MediaStreamTrack::capabilities): Ditto.
3276         (WebCore::MediaStreamTrack::applyConstraints): Ditto.
3277         (WebCore::MediaStreamTrack::stopProducingData): Ditto.
3278         (WebCore::MediaStreamTrack::trackReadyStateChanged): Renamed from sourceStateChanged. Don't
3279             schedule an 'ended' event if called as a side effect of the stop() method having been
3280             called as per spec.
3281         (WebCore::MediaStreamTrack::trackMutedChanged): Renamed from sourceMutedChanged.
3282         (WebCore::MediaStreamTrack::trackEnabledChanged): Renamed from sourceEnabledChanged.
3283         (WebCore::MediaStreamTrack::stop): Pass through to private track.
3284         * Modules/mediastream/MediaStreamTrack.h:
3285         (WebCore::MediaStreamTrack::Observer::~Observer): Add virtual destructor.
3286
3287         * Modules/mediastream/UserMediaRequest.cpp:
3288         (WebCore::UserMediaRequest::callSuccessHandler): Set track, not source, constraints.
3289
3290         * WebCore.xcodeproj/project.pbxproj: Add new files.
3291
3292         * bindings/js/JSMediaSourceStatesCustom.cpp:
3293         (WebCore::JSMediaSourceStates::facingMode): Return jsUndefined when the facing mode
3294             is Unknown.
3295
3296         * platform/mediastream/MediaStreamCenter.h: Remove unused class forward defines and
3297             undefined method prototype.
3298
3299         * platform/mediastream/MediaStreamDescriptor.cpp:
3300         (WebCore::MediaStreamDescriptor::addSource): ASSERT if source is kind None.
3301         (WebCore::MediaStreamDescriptor::removeSource): Ditto.
3302         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
3303
3304         * platform/mediastream/MediaStreamSource.cpp:
3305         (WebCore::MediaStreamSource::setReadyState): Call startProducingData when readyState changes
3306             to Live, stopProducingData when it changes to Ended.
3307         (WebCore::MediaStreamSource::removeObserver): Call stop() when there are no more observers.
3308         (WebCore::MediaStreamSource::setEnabled): If passed false, do nothing unless all observers
3309             are disabled. Call startProducingData/stopProducingData when becoming enabled/disabled.
3310         (WebCore::MediaStreamSource::stop): Don't bother checking to see if other observers have
3311             stopped, the spec says that track.stop() should permanently stop the track's source.
3312         * platform/mediastream/MediaStreamSource.h:
3313         (WebCore::MediaStreamSource::name): Make virtual so derived classes can override.
3314         (WebCore::MediaStreamSource::setName): Ditto.
3315         (WebCore::MediaStreamSource::readyState): Ditto.
3316         (WebCore::MediaStreamSource::enabled): Ditto.
3317         (WebCore::MediaStreamSource::muted): Ditto.
3318         (WebCore::MediaStreamSource::setReadonly): Ditto.
3319         (WebCore::MediaStreamSource::remote): Ditto.
3320         (WebCore::MediaStreamSource::setRemote): Ditto.
3321         (WebCore::MediaStreamSource::startProducingData): Added.
3322         (WebCore::MediaStreamSource::stopProducingData): Added.
3323
3324         * platform/mediastream/MediaStreamSourceCapabilities.h: Move MediaStreamSourceStates to
3325             its own file.
3326
3327         * platform/mediastream/MediaStreamSourceStates.cpp: Added.
3328         (WebCore::MediaStreamSourceStates::facingMode): Moved here from MediaSourceStates so the 
3329             strings are available to platform code.
3330         (WebCore::MediaStreamSourceStates::sourceType): Ditto.
3331         * platform/mediastream/MediaStreamSourceStates.h: Added, moved from MediaStreamSourceCapabilities.h.
3332
3333         * platform/mediastream/MediaStreamTrackPrivate.cpp:
3334         (WebCore::MediaStreamTrackPrivate::create): Pass private track to constructor as PassRefPtr.
3335         (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): Initialize member variables.
3336         (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate): Unregister as source observer.
3337         (WebCore::MediaStreamTrackPrivate::setSource): Unregister/register as source observer.
3338         (WebCore::MediaStreamTrackPrivate::setEnabled): Enable/disable source, call client.
3339         (WebCore::MediaStreamTrackPrivate::stop): New. Set readyState to Ended, optionally stop source.
3340         (WebCore::MediaStreamTrackPrivate::setReadyState): Inline the logic from shouldFireTrackReadyStateChanged.
3341         (WebCore::MediaStreamTrackPrivate::constraints): New, passthrough to the source.
3342         (WebCore::MediaStreamTrackPrivate::states): Ditto.
3343         (WebCore::MediaStreamTrackPrivate::type): Ditto.
3344         (WebCore::MediaStreamTrackPrivate::capabilities): Ditto.
3345         (WebCore::MediaStreamTrackPrivate::applyConstraints): Ditto.
3346         (WebCore::MediaStreamTrackPrivate::sourceReadyStateChanged): React to source changes.
3347         (WebCore::MediaStreamTrackPrivate::sourceMutedChanged): Ditto.
3348         (WebCore::MediaStreamTrackPrivate::sourceEnabledChanged): Ditto.
3349         (WebCore::MediaStreamTrackPrivate::observerIsEnabled): Respond to source query.
3350         (WebCore::MediaStreamTrackPrivate::observerIsStopped): Ditto.
3351         * platform/mediastream/MediaStreamTrackPrivate.h:
3352
3353         * platform/mediastream/mac/AVAudioCaptureSource.h: Added.
3354         * platform/mediastream/mac/AVAudioCaptureSource.mm: Added.
3355
3356         * platform/mediastream/mac/AVCaptureDeviceManager.h: Added.
3357         * platform/mediastream/mac/AVCaptureDeviceManager.mm: Added.
3358
3359         * platform/mediastream/mac/AVMediaCaptureSource.h: Added.
3360         * platform/mediastream/mac/AVMediaCaptureSource.mm: Added.
3361
3362         * platform/mediastream/mac/AVVideoCaptureSource.h: Added.
3363         * platform/mediastream/mac/AVVideoCaptureSource.mm: Added.
3364
3365         * platform/mediastream/mac/MediaStreamCenterMac.cpp:
3366         (WebCore::MediaStreamCenterMac::validateRequestConstraints): Implement.
3367         (WebCore::MediaStreamCenterMac::createMediaStream): Ditto.
3368         (WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Ditto.
3369
3370         * platform/mock/MockMediaStreamCenter.cpp:
3371         (WebCore::initializeMockSources): Update for MediaStreamSourceStates changes.
3372         (WebCore::MockMediaStreamCenter::createMediaStream):
3373
3374 2013-10-29  Zoltan Horvath  <zoltan@webkit.org>
3375
3376         [CSS Regions][CSS Shapes] Layout error when the shape has negative top coordinate and it's applied on the second region
3377         <https://webkit.org/b/123346>
3378
3379         Reviewed by David Hyatt.
3380
3381         We have a layout error when there is a shape applied on the second region, and it has a negative 'top' coordinate.
3382         Since shapeInsideInfo::shapeLogicalTop() can return negative numbers, we need to check for it, when we're positioning
3383         the first line in the region.
3384
3385         Test: fast/regions/shape-inside/shape-inside-on-multiple-regions-with-negative-shape-top.html
3386
3387         * rendering/RenderBlockLineLayout.cpp:
3388         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
3389
3390 2013-10-29  Brady Eidson  <beidson@apple.com>
3391
3392         Get IDBTransactionBackendLevelDBOperations *almost* ready to go cross platform.
3393         https://bugs.webkit.org/show_bug.cgi?id=123451
3394
3395         Reviewed by NOBODY (My bad, non-reviewed, non-building code got in there)
3396
3397         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3398         (WebCore::IDBDatabaseBackendImpl::processPendingCalls): Remove the auto line I was trying from review feedback.
3399
3400 2013-10-29  Brady Eidson  <beidson@apple.com>
3401
3402         Get IDBTransactionBackendLevelDBOperations *almost* ready to go cross platform.
3403         https://bugs.webkit.org/show_bug.cgi?id=123451
3404
3405         Reviewed by Andreas Kling.
3406
3407         This involves:
3408         - Splitting out IDBTransactionBackendLevelDB::Operation into its own header
3409         - Splitting out IDBDatabaseBackendImpl::PendingOpenCall into its own header
3410         - Reworking the LevelDB Operations to handle the base class IDBTransactionBackendInterface
3411         - Adding virtual methods in a few of the *Interface classes to support the above
3412
3413         * GNUmakefile.list.am:
3414         * WebCore.xcodeproj/project.pbxproj:
3415
3416         * Modules/indexeddb/IDBCallbacks.h:
3417
3418         * Modules/indexeddb/IDBCursorBackendInterface.h:
3419
3420         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3421         (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
3422         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
3423         (WebCore::IDBDatabaseBackendImpl::openConnection):
3424         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
3425         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3426         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
3427
3428         * Modules/indexeddb/IDBOperation.h: Added.
3429         (WebCore::IDBOperation::~IDBOperation):
3430
3431         * Modules/indexeddb/IDBPendingOpenCall.h: Added.
3432         (WebCore::IDBPendingOpenCall::create):
3433         (WebCore::IDBPendingOpenCall::callbacks):
3434         (WebCore::IDBPendingOpenCall::databaseCallbacks):
3435         (WebCore::IDBPendingOpenCall::version):
3436         (WebCore::IDBPendingOpenCall::transactionId):
3437         (WebCore::IDBPendingOpenCall::IDBPendingOpenCall):
3438
3439         * Modules/indexeddb/IDBRequest.h:
3440
3441         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3442
3443         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
3444         (WebCore::IDBCursorBackendLevelDB::CursorIterationOperation::create):
3445         (WebCore::IDBCursorBackendLevelDB::CursorAdvanceOperation::create):
3446         (WebCore::IDBCursorBackendLevelDB::CursorPrefetchIterationOperation::create):
3447         (WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
3448         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
3449
3450         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
3451         (WebCore::IDBTransactionBackendLevelDB::scheduleTask):
3452         (WebCore::IDBTransactionBackendLevelDB::abort):
3453         (WebCore::IDBTransactionBackendLevelDB::taskTimerFired):
3454         (WebCore::IDBTransactionBackendLevelDB::schedulePutOperation):
3455         (WebCore::IDBTransactionBackendLevelDB::scheduleOpenCursorOperation):
3456         (WebCore::IDBTransactionBackendLevelDB::scheduleCountOperation):
3457         (WebCore::IDBTransactionBackendLevelDB::scheduleDeleteRangeOperation):
3458         (WebCore::IDBTransactionBackendLevelDB::scheduleClearOperation):
3459         (WebCore::IDBTransactionBackendLevelDB::createCursorBackend):
3460         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3461
3462         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
3463         (WebCore::CreateObjectStoreOperation::perform):
3464         (WebCore::CreateIndexOperation::perform):
3465         (WebCore::CreateIndexAbortOperation::perform):
3466         (WebCore::DeleteIndexOperation::perform):
3467         (WebCore::DeleteIndexAbortOperation::perform):
3468         (WebCore::OpenCursorOperation::perform):
3469         (WebCore::DeleteObjectStoreOperation::perform):
3470         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
3471         (WebCore::CreateObjectStoreAbortOperation::perform):
3472         (WebCore::DeleteObjectStoreAbortOperation::perform):
3473         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
3474         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
3475         (WebCore::CreateObjectStoreOperation::create):
3476         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
3477         (WebCore::DeleteObjectStoreOperation::create):
3478         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
3479         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
3480         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
3481         (WebCore::CreateObjectStoreAbortOperation::create):
3482         (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
3483         (WebCore::DeleteObjectStoreAbortOperation::create):
3484         (WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
3485         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
3486         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::VersionChangeAbortOperation):
3487         (WebCore::CreateIndexOperation::create):
3488         (WebCore::CreateIndexOperation::CreateIndexOperation):
3489         (WebCore::CreateIndexAbortOperation::create):
3490         (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
3491         (WebCore::DeleteIndexOperation::create):
3492         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
3493         (WebCore::DeleteIndexAbortOperation::create):
3494         (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
3495         (WebCore::GetOperation::create):
3496         (WebCore::GetOperation::GetOperation):
3497         (WebCore::PutOperation::create):
3498         (WebCore::PutOperation::PutOperation):
3499         (WebCore::SetIndexesReadyOperation::create):
3500         (WebCore::SetIndexesReadyOperation::SetIndexesReadyOperation):
3501         (WebCore::OpenCursorOperation::create):
3502         (WebCore::OpenCursorOperation::OpenCursorOperation):
3503         (WebCore::CountOperation::create):
3504         (WebCore::CountOperation::CountOperation):
3505         (WebCore::DeleteRangeOperation::create):
3506         (WebCore::DeleteRangeOperation::DeleteRangeOperation):
3507         (WebCore::ClearOperation::create):
3508         (WebCore::ClearOperation::ClearOperation):
3509
3510 2013-10-29  Antti Koivisto  <antti@apple.com>
3511
3512         Make SimpleLineLayout::Layout a variable size object
3513         https://bugs.webkit.org/show_bug.cgi?id=123459
3514
3515         Reviewed by Andreas Kling.
3516
3517         Less memory, less indirection.
3518
3519         * rendering/SimpleLineLayout.cpp:
3520         (WebCore::SimpleLineLayout::canUseFor):
3521         (WebCore::SimpleLineLayout::create):
3522         (WebCore::SimpleLineLayout::Layout::create):
3523         (WebCore::SimpleLineLayout::Layout::Layout):
3524         * rendering/SimpleLineLayout.h:
3525         * rendering/SimpleLineLayoutFunctions.cpp:
3526         (WebCore::SimpleLineLayout::hitTestFlow):
3527         * rendering/SimpleLineLayoutFunctions.h:
3528         (WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
3529         (WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
3530         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
3531         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
3532         (WebCore::SimpleLineLayout::containsTextCaretOffset):
3533         (WebCore::SimpleLineLayout::isTextRendered):
3534         * rendering/SimpleLineLayoutResolver.h:
3535         (WebCore::SimpleLineLayout::RunResolver::end):
3536
3537 2013-10-29  Andreas Kling  <akling@apple.com>
3538
3539         RenderObject::outlineStyleForRepaint() should return a reference.
3540         <https://webkit.org/b/123453>
3541
3542         Kill a FIXME and make outlineStyleForRepaint() return a RenderStyle&.
3543
3544         Reviewed by Antti Koivisto.
3545
3546 2013-10-29  Andreas Kling  <akling@apple.com>
3547
3548         Move more of SVG resources cache to using RenderElement.
3549         <https://webkit.org/b/123452>
3550
3551         Make some more RenderSVGResourcesCache methods take RenderElement&
3552         instead of RenderObject*.
3553
3554         Also removed a double hash lookup in removeResourcesFromRenderer().
3555
3556         Reviewed by Antti Koivisto.
3557
3558 2013-10-29  Joseph Pecoraro  <pecoraro@apple.com>
3559
3560         Web Inspector: Remove old Inspector.json version files and generators
3561         https://bugs.webkit.org/show_bug.cgi?id=123426
3562
3563         Reviewed by Timothy Hatcher.
3564
3565         * CMakeLists.txt:
3566         * DerivedSources.make:
3567         * GNUmakefile.am:
3568         * GNUmakefile.list.am:
3569         * WebCore.xcodeproj/project.pbxproj:
3570         * inspector/Inspector-0.1.json: Removed.
3571         * inspector/Inspector-1.0.json: Removed.
3572         * inspector/generate-inspector-protocol-version: Removed.
3573
3574 2013-10-29  Philippe Normand  <pnormand@igalia.com>
3575
3576         [GTK] DOM bindings documentation errors
3577         https://bugs.webkit.org/show_bug.cgi?id=123448
3578
3579         Reviewed by Carlos Garcia Campos.
3580
3581         * bindings/gobject/WebKitDOMCustom.h: Basic documentation for
3582         return types.
3583         * bindings/scripts/CodeGeneratorGObject.pm:
3584         (GenerateFunction): Generate Returns documentation tag for
3585         non-void return types and provide basic documentation.
3586         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
3587         Reset tests results.
3588         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
3589         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
3590         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
3591         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
3592         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
3593         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3594         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
3595         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
3596         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
3597
3598 2013-10-24  Brent Fulgham  <bfulgham@apple.com>
3599
3600         Invalid cast in WebCore::toRenderMathMLBlock
3601         https://bugs.webkit.org/show_bug.cgi?id=121728
3602         rdar://problem/15046151
3603
3604         Reviewed by Dean Jackson.
3605
3606         Tested by: mathml/arbitrary-markup.html
3607
3608         * dom/Element.h: Expose childShouldCreateRenderer for
3609         MathML as well as SVG builds.
3610         * dom/Node.h: 
3611         (WebCore::Node::isMathMLElement): Added.
3612         * mathml/MathMLElement.cpp:
3613         (WebCore::MathMLElement::create): Create as MathML Element.
3614         (WebCore::MathMLElement::childShouldCreateRenderer):
3615         Only allow the child to emit a renderer if it is a
3616         MathML element.
3617         * mathml/MathMLElement.h:
3618
3619 2013-10-29  Andreas Kling  <akling@apple.com>
3620
3621         SVG: applyStrokeStyleToContext should take a RenderElement&.
3622         <https://webkit.org/b/123447>
3623
3624         ..and a RenderStyle& too, for that matter.
3625
3626         Reviewed by Anders Carlsson.
3627
3628         * rendering/svg/SVGRenderSupport.h:
3629         * rendering/svg/SVGRenderSupport.cpp:
3630         (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
3631
3632             Have this take a RenderElement& and RenderStyle& instead of
3633             raw pointers. Tweaked a silly-looking loop.
3634
3635         * rendering/svg/RenderSVGShape.h:
3636         * rendering/svg/RenderSVGShape.cpp:
3637
3638             Moved BoundingRectStrokeStyleApplier helper class into the
3639             cpp file since it wasn't being used anywhere else.
3640
3641         * rendering/svg/RenderSVGResourceGradient.cpp:
3642         (WebCore::RenderSVGResourceGradient::applyResource):
3643         * rendering/svg/RenderSVGResourcePattern.cpp:
3644         (WebCore::RenderSVGResourcePattern::applyResource):
3645         * rendering/svg/RenderSVGResourceSolidColor.cpp:
3646         (WebCore::RenderSVGResourceSolidColor::applyResource):
3647
3648             Remove ampersands.
3649
3650 2013-10-29  Antti Koivisto  <antti@apple.com>
3651
3652         Multiple runs per line on simple line path
3653         https://bugs.webkit.org/show_bug.cgi?id=123446
3654
3655         Reviewed by Andreas Kling.
3656
3657         By allowing multiple runs per line we can support text flows with consecutive whitespaces in the middle.
3658
3659         * rendering/SimpleLineLayout.cpp:
3660         (WebCore::SimpleLineLayout::canUseFor):
3661         
3662             Remove space test.
3663             The improved test coverage found a few more cases that we need to disallow.
3664
3665         (WebCore::SimpleLineLayout::adjustRunOffsets):
3666             
3667             Round the run positions and widths so they match line boxes.
3668             Adjust for text-align.
3669
3670         (WebCore::SimpleLineLayout::create):
3671         
3672             Split lines with consecutive spaces into runs.
3673
3674         * rendering/SimpleLineLayout.h:
3675         (WebCore::SimpleLineLayout::Run::Run):
3676         * rendering/SimpleLineLayoutFunctions.cpp:
3677         (WebCore::SimpleLineLayout::hitTestFlow):
3678         (WebCore::SimpleLineLayout::collectFlowOverflow):
3679         (WebCore::SimpleLineLayout::computeTextBoundingBox):
3680         * rendering/SimpleLineLayoutResolver.h:
3681         (WebCore::SimpleLineLayout::RunResolver::Iterator::resolver):
3682         (WebCore::SimpleLineLayout::RunResolver::Iterator::lineIndex):
3683         (WebCore::SimpleLineLayout::RunResolver::Run::Run):
3684         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
3685         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
3686         (WebCore::SimpleLineLayout::RunResolver::Run::text):
3687         (WebCore::SimpleLineLayout::RunResolver::Run::lineIndex):
3688         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
3689         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator++):
3690         
3691             Removed unnecessary operators.
3692
3693         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator==):
3694         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator!=):
3695         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator*):
3696         (WebCore::SimpleLineLayout::RunResolver::Iterator::simpleRun):
3697         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
3698         (WebCore::SimpleLineLayout::RunResolver::begin):
3699         (WebCore::SimpleLineLayout::RunResolver::end):
3700         
3701             Resolver -> RunResolver
3702
3703         (WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator):
3704         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator++):
3705         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator==):
3706         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator!=):
3707         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
3708         (WebCore::SimpleLineLayout::LineResolver::LineResolver):
3709         (WebCore::SimpleLineLayout::LineResolver::begin):
3710         (WebCore::SimpleLineLayout::LineResolver::end):
3711         
3712             Add LineResolver around RunResolver. It resolves the line rectangles.
3713
3714         (WebCore::SimpleLineLayout::runResolver):
3715         (WebCore::SimpleLineLayout::lineResolver):
3716
3717 2013-10-29  Chris Fleizach  <cfleizach@apple.com>
3718
3719         AX: elements with explicit tabindex should expose AXFocused as writable, since mouse clicks can focus it
3720         https://bugs.webkit.org/show_bug.cgi?id=121335
3721
3722         Reviewed by Mario Sanchez Prada.
3723
3724         Re-order logic that determines if a <span> should appear as an accessible element. 
3725         The change is that if an element canSetFocus() it should always be in the AX tree.
3726
3727         Test: accessibility/tabindex-elements-are-accessible.html
3728
3729         * accessibility/AccessibilityRenderObject.cpp:
3730         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3731         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3732
3733 2013-10-29  Philippe Normand  <pnormand@igalia.com>
3734
3735         [GTK] enable media-stream in build-webkit
3736         https://bugs.webkit.org/show_bug.cgi?id=123144
3737
3738         Reviewed by Martin Robinson.
3739
3740         * GNUmakefile.list.am: Add new MediaStream files to the GTK port build.
3741
3742 2013-10-28  Chris Fleizach  <cfleizach@apple.com>
3743
3744         AX: Webkit does not expose AXRequired on input type=file
3745         https://bugs.webkit.org/show_bug.cgi?id=123376
3746
3747         Reviewed by Mario Sanchez Prada.
3748
3749         File upload buttons should expose AXRequired, since they take an input state.
3750
3751         * accessibility/AccessibilityNodeObject.cpp:
3752         (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
3753         (WebCore::AccessibilityNodeObject::alternativeText):
3754
3755 2013-10-29  Jinwoo Song  <jinwoo7.song@samsung.com>
3756
3757         Re-enable simple line layout for EFL
3758         https://bugs.webkit.org/show_bug.cgi?id=123402
3759
3760         Reviewed by Antti Koivisto.
3761
3762         * rendering/SimpleLineLayout.cpp:
3763         (WebCore::SimpleLineLayout::canUseFor): 8-bit TextRun support is now enabled for EFL port, so the port
3764         can use the simple line layout.
3765
3766 2013-10-29  Zan Dobersek  <zdobersek@igalia.com>
3767
3768         Unreviewed, follow-up to r158185. Export the required symbol.
3769         This should fix the Mac debug build.
3770
3771         * WebCore.exp.in:
3772
3773 2013-10-29  Santosh Mahto  <santosh.ma@samsung.com>
3774
3775         Text selected with double-click gets unselected after DOM modification
3776         https://bugs.webkit.org/show_bug.cgi?id=114227
3777
3778         Reviewed by Ryosuke Niwa.
3779
3780         Before this patch when selection is done by double-click (start and base remain
3781         same) and DOM is modified then selection gets vanished. This does not
3782         happen when selection is done by dragging mouse. This happens because
3783         on double-click base and extent remain the same and on DOM
3784         modification we update the selection with base and extent, so we loose
3785         the selection. Since in double-click case start/end contain the
3786         correct selection, same should be used after dom modification to
3787         update selection.
3788
3789         Test: editing/selection/double-click-selection-with-dom-mutation.html
3790
3791         * editing/FrameSelection.cpp:
3792         (WebCore::FrameSelection::textWasReplaced): use start/end to update
3793         selection in case double click selection. Added a check for base !=
3794         extent, if base != extent use base/extent to update the selection
3795         otherwise use start/end with directionality check.
3796
3797 2013-10-29  Mihnea Ovidenie  <mihnea@adobe.com>
3798
3799         [CSSRegions] Display anonymous regions in DRT
3800         https://bugs.webkit.org/show_bug.cgi?id=122963
3801
3802         Reviewed by Alexandru Chiculita.
3803
3804         After https://bugs.webkit.org/show_bug.cgi?id=119135, css regions are modelled using an anonymous
3805         RenderNamedFlowFragment object inside the block having a valid -webkit-flow-from.
3806         This patch changes the way elements | pseudo-elements with -webkit-flow-from are displayed
3807         in test dumps.
3808
3809         Before:
3810             RenderRegion {DIV} at (200,200) size 52x52 [border: (1px solid #000000)]
3811         After:
3812             RenderBlock (positioned) {DIV} at (200,200) size 52x52 [border: (1px solid #000000)]
3813                 RenderNamedFlowFragment at (1,1) size 50x50
3814
3815         Before:
3816             Flow Threads
3817                 Thread with flow-name 'article'
3818                 Regions for flow 'article'
3819                     RenderRegion {DIV} #region_1
3820                     RenderRegion {DIV} #region_2
3821         After:
3822             Named flows
3823                 Named flow 'article'
3824                 Regions for named flow 'article'
3825                     RenderNamedFlowFragment (anonymous child of {DIV::before} #region_1)
3826                     RenderNamedFlowFragment (anonymous child of {DIV} #region_2)
3827
3828         Changed existing tests based on the new dumps.
3829
3830         * rendering/RenderBlock.cpp:
3831         (WebCore::RenderBlock::renderName):
3832         * rendering/RenderNamedFlowFragment.h: Add a comment explaining the purpose of the class.
3833         * rendering/RenderRegion.h:
3834         * rendering/RenderTreeAsText.cpp:
3835         (WebCore::write):
3836         (WebCore::writeRenderRegionList): Adjust function to display info for anonymous regions too.
3837         (WebCore::writeRenderNamedFlowThreads): Separate dump of valid and invalid regions for a named flow.
3838
3839 2013-10-29  Zan Dobersek  <zdobersek@igalia.com>
3840
3841         Move writeIndent, overloaded << operators from RenderTreeAsText to TextStream
3842         https://bugs.webkit.org/show_bug.cgi?id=116012
3843
3844         Reviewed by Simon Fraser.
3845
3846         The writeIndent method and overloaded << operators for writing out vectors and points and rectangles
3847         of various types are not specific to the render tree nor do they depend on any rendering-specific interface.
3848
3849         * page/scrolling/ScrollingStateNode.cpp:
3850         * page/scrolling/ScrollingStateNode.h:
3851         (ScrollingStateNode): Remove the writeIndent declaration, it's functionally the same as the TextStream method.
3852         * platform/graphics/GraphicsLayer.cpp:
3853         * platform/graphics/GraphicsLayer.h:
3854         (GraphicsLayer): Ditto.
3855         * platform/graphics/filters/DistantLightSource.cpp: Remove the RenderTreeAsText.h inclusion or replace it with
3856         the inclusion of the TextStream.h header where required. The writeIndent method is now declared there.
3857         * platform/graphics/filters/FEBlend.cpp: Ditto.
3858         * platform/graphics/filters/FEColorMatrix.cpp: Ditto.
3859         * platform/graphics/filters/FEComponentTransfer.cpp: Ditto.
3860         * platform/graphics/filters/FEComposite.cpp: Ditto.
3861         * platform/graphics/filters/FEConvolveMatrix.cpp: Ditto.
3862         * platform/graphics/filters/FECustomFilter.cpp: Ditto.
3863         * platform/graphics/filters/FEDiffuseLighting.cpp: Ditto.
3864         * platform/graphics/filters/FEDisplacementMap.cpp: Ditto.
3865         * platform/graphics/filters/FEDropShadow.cpp: Ditto.
3866         * platform/graphics/filters/FEFlood.cpp: Ditto.
3867         * platform/graphics/filters/FEGaussianBlur.cpp: Ditto.
3868         * platform/graphics/filters/FEMerge.cpp: Ditto.
3869         * platform/graphics/filters/FEMorphology.cpp: Ditto.
3870         * platform/graphics/filters/FEOffset.cpp: Ditto.
3871         * platform/graphics/filters/FESpecularLighting.cpp: Ditto.
3872         * platform/graphics/filters/FETurbulence.cpp: Ditto.
3873         * platform/graphics/filters/SourceAlpha.cpp: Ditto.
3874         * platform/graphics/filters/SourceGraphic.cpp: Ditto.
3875         * platform/text/TextStream.cpp: Move the writeIndent and operators' definitions here.
3876         (WebCore::operator<<):
3877         (WebCore):
3878         (WebCore::writeIndent):
3879         * platform/text/TextStream.h: Move the writeIndent and operators' declarations here.
3880         (WebCore):
3881         (TextStream):
3882         (WebCore::TextStream::operator<<):
3883         * rendering/RenderTreeAsText.cpp: Move the writeIndent and operators' definitions into TextStream.
3884         (WebCore):
3885         * rendering/RenderTreeAsText.h: Move the writeIndent and operators' declarations into TextStream.
3886         (WebCore):
3887
3888 2013-10-28  Zan Dobersek  <zdobersek@igalia.com>
3889
3890         Clean up ScopedEventQueue
3891         https://bugs.webkit.org/show_bug.cgi?id=123408
3892
3893         Reviewed by Darin Adler.
3894
3895         Clean up the ScopedEventQueue implementation. ScopedEventQueue::instance() should return a reference to a
3896         NeverDestroyed<ScopedEventQueue> object. The static ScopedEventQueue::s_instance pointer is removed.
3897
3898         The ScopedEventQueue destructor, the dispatchAllEvents method and the scope level incrementation/decrementation
3899         methods are made private. NeverDestroyed<ScopedEventQueue> and EventQueueScope are made friends of the
3900         ScopedEventQueue class so they can access the constructor and the incrementation/decrementation methods, respectively.
3901
3902         ScopedEventQueue method definitions are reordered to follow the order of their declarations in the header file.
3903         ScopedEventQueue::dispatchAllEvents() now uses std::move to efficiently dispatch and clear all currently queued events.
3904
3905         * dom/EventDispatcher.cpp:
3906         (WebCore::EventDispatcher::dispatchScopedEvent):
3907         * dom/ScopedEventQueue.cpp:
3908         (WebCore::ScopedEventQueue::instance):
3909         (WebCore::ScopedEventQueue::dispatchAllEvents):
3910         * dom/ScopedEventQueue.h:
3911         (WebCore::EventQueueScope::EventQueueScope):
3912         (WebCore::EventQueueScope::~EventQueueScope):
3913
3914 2013-10-28  Andreas Kling  <akling@apple.com>
3915
3916         applyTextTransform() should take a const RenderStyle&.
3917         <https://webkit.org/b/123434>
3918
3919         This function is always called with an existing RenderStyle object.
3920
3921         Reviewed by Anders Carlsson.
3922
3923 2013-10-28  Andreas Kling  <akling@apple.com>
3924
3925         RenderSVGResource::applyResource() should take a const RenderStyle&.
3926         <https://webkit.org/b/123433>
3927
3928         These functions are always called with an existing RenderStyle object
3929         so let them take a const reference instead of a raw pointer.
3930         Also sprinkled some missing OVERRIDEs.
3931
3932         Reviewed by Anders Carlsson.
3933
3934 2013-10-28  Andreas Kling  <akling@apple.com>
3935
3936         Remove unused RenderTextControl::textBaseStyle().
3937         <https://webkit.org/b/123432>
3938
3939         Reviewed by Anders Carlsson.
3940
3941 2013-10-28  Zan Dobersek  <zdobersek@igalia.com>
3942
3943         HTML input type objects should be managed through std::unique_ptr
3944         https://bugs.webkit.org/show_bug.cgi?id=123160
3945
3946         Reviewed by Darin Adler.
3947
3948         Make the constructors of the InputType subclasses public. This makes it possible to use std::make_unique on these classes
3949         and makes the T::create() helpers redundant. New instances of these classes are now managed through std::unique_ptr.
3950
3951         InputType::create() now uses a NeverDestroyed InputTypeFactoryMap that maps type names to InputTypeFactoryFunctions and
3952         gets populated when the method is first called and the map is still empty. Certain types are not added to the factory map
3953         if they're disabled at runtime.
3954
3955         The factory is used to create the new InputType object if the requested type was found in the map, and TextInputType is used otherwise.
3956
3957         * html/ButtonInputType.cpp:
3958         * html/ButtonInputType.h:
3959         (WebCore::ButtonInputType::ButtonInputType):
3960         * html/CheckboxInputType.cpp:
3961         * html/CheckboxInputType.h:
3962         (WebCore::CheckboxInputType::CheckboxInputType):
3963         * html/ColorInputType.cpp:
3964         * html/ColorInputType.h:
3965         (WebCore::ColorInputType::ColorInputType):
3966         * html/DateInputType.cpp:
3967         * html/DateInputType.h:
3968         * html/DateTimeInputType.cpp:
3969         * html/DateTimeInputType.h:
3970         (WebCore::DateTimeInputType::DateTimeInputType):
3971         * html/DateTimeLocalInputType.cpp:
3972         * html/DateTimeLocalInputType.h:
3973         (WebCore::DateTimeLocalInputType::DateTimeLocalInputType):
3974         * html/EmailInputType.cpp:
3975         * html/EmailInputType.h:
3976         (WebCore::EmailInputType::EmailInputType):
3977         * html/FileInputType.cpp:
3978         * html/FileInputType.h:
3979         * html/HTMLInputElement.cpp:
3980         (WebCore::HTMLInputElement::updateType):
3981         * html/HTMLInputElement.h:
3982         * html/HiddenInputType.cpp:
3983         * html/HiddenInputType.h:
3984         (WebCore::HiddenInputType::HiddenInputType):
3985         * html/ImageInputType.cpp:
3986         (WebCore::ImageInputType::ImageInputType):
3987         * html/ImageInputType.h:
3988         * html/InputType.cpp:
3989         (WebCore::createInputType): A templated helper that constructs a new InputType subclass object through std::make_unique.
3990         (WebCore::populateInputTypeFactoryMap): Populates the passed-in map with type-createInputType<T> pairs.
3991         (WebCore::InputType::create): Get the InputTypeFactoryFunction for the specified type, or fall back to TextInputType.
3992         (WebCore::InputType::createText):
3993         * html/InputType.h:
3994         * html/MonthInputType.cpp:
3995         * html/MonthInputType.h:
3996         (WebCore::MonthInputType::MonthInputType):
3997         * html/NumberInputType.cpp:
3998         * html/NumberInputType.h:
3999         (WebCore::NumberInputType::NumberInputType):
4000         * html/PasswordInputType.cpp:
4001         * html/PasswordInputType.h:
4002         (WebCore::PasswordInputType::PasswordInputType):
4003         * html/RadioInputType.cpp:
4004         * html/RadioInputType.h:
4005         (WebCore::RadioInputType::RadioInputType):
4006         * html/RangeInputType.cpp:
4007         * html/RangeInputType.h:
4008         * html/ResetInputType.cpp:
4009         * html/ResetInputType.h:
4010         (WebCore::ResetInputType::ResetInputType):
4011         * html/SearchInputType.cpp:
4012         (WebCore::SearchInputType::SearchInputType):
4013         * html/SearchInputType.h:
4014         * html/SubmitInputType.cpp:
4015         * html/SubmitInputType.h:
4016         (WebCore::SubmitInputType::SubmitInputType):
4017         * html/TelephoneInputType.cpp:
4018         * html/TelephoneInputType.h:
4019         (WebCore::TelephoneInputType::TelephoneInputType):
4020         * html/TextInputType.cpp:
4021         * html/TextInputType.h:
4022         (WebCore::TextInputType::TextInputType):
4023         * html/TimeInputType.cpp:
4024         * html/TimeInputType.h:
4025         * html/URLInputType.cpp:
4026         * html/URLInputType.h:
4027         (WebCore::URLInputType::URLInputType):
4028         * html/WeekInputType.cpp:
4029         * html/WeekInputType.h:
4030         (WebCore::WeekInputType::WeekInputType):
4031
4032 2013-10-28  Brady Eidson  <beidson@apple.com>
4033
4034         Refactor IDB factory creation.
4035         https://bugs.webkit.org/show_bug.cgi?id=123347
4036
4037         Reviewed by Andreas Kling.
4038
4039         - Rework how database directory location is passed around.
4040         - Make (some) SecurityOrigin arguments be references instead of pointers.
4041         - Add two SecurityOrigin arguments to opening databases for future use.
4042
4043         * Modules/indexeddb/IDBFactory.cpp:
4044         (WebCore::IDBFactory::openInternal):
4045
4046         * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
4047         (WebCore::IDBFactoryBackendInterface::create):
4048         * Modules/indexeddb/IDBFactoryBackendInterface.h:
4049
4050         * Modules/indexeddb/PageGroupIndexedDatabase.cpp:
4051         (WebCore::PageGroupIndexedDatabase::PageGroupIndexedDatabase):
4052         (WebCore::PageGroupIndexedDatabase::from):
4053         (WebCore::PageGroupIndexedDatabase::factoryBackend):
4054         * Modules/indexeddb/PageGroupIndexedDatabase.h:
4055
4056         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
4057         (WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
4058         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
4059         (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
4060         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
4061
4062         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
4063         (WebCore::IDBBackingStoreLevelDB::open):
4064         (WebCore::IDBBackingStoreLevelDB::openInMemory):
4065         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
4066
4067         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
4068         (WebCore::computeFileIdentifier):
4069         (WebCore::computeUniqueIdentifier):
4070         (WebCore::IDBFactoryBackendLevelDB::IDBFactoryBackendLevelDB):
4071         (WebCore::IDBFactoryBackendLevelDB::getDatabaseNames):
4072         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
4073         (WebCore::IDBFactoryBackendLevelDB::openBackingStore):
4074         (WebCore::IDBFactoryBackendLevelDB::open):
4075         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
4076         (WebCore::IDBFactoryBackendLevelDB::create):
4077
4078         * WebCore.exp.in:
4079
4080         * platform/DatabaseStrategy.cpp:
4081         (WebCore::DatabaseStrategy::createIDBFactoryBackend):
4082         * platform/DatabaseStrategy.h:
4083
4084 2013-10-28  Andreas Kling  <akling@apple.com>
4085
4086         RenderElement::style() should return a reference.
4087         <https://webkit.org/b/123414>
4088
4089         Now that renderers always have style, go ahead and make style()
4090         return a RenderStyle&.
4091
4092         There are countless opportunities for further cleanup enabled by
4093         this change. I'm simply passing &style() in many cases where we
4094         can really do something nicer instead.
4095
4096         Reviewed by Anders Carlsson.
4097
4098 2013-10-28  Tim Horton  <timothy_horton@apple.com>
4099
4100         Make TileController create the appropriate PlatformCALayer subclasses
4101         https://bugs.webkit.org/show_bug.cgi?id=123418
4102
4103         Reviewed by Simon Fraser.
4104
4105         Add PlatformCALayer::createCompatibleLayer, which is overridden in
4106         each of the subclasses to create a PlatformCALayer instance of the same
4107         subclass. This is used in TileController to make bare PlatformCALayers
4108         of the correct type (Mac, Win, or Remote).
4109
4110         * platform/graphics/ca/PlatformCALayer.h:
4111         * platform/graphics/ca/mac/PlatformCALayerMac.h:
4112     &n