68122e8663e2cab3b42787e8db310ebfe78b140b
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2
3         Unreviewed. Fix the ENABLE(SHARED_WORKERS) build after r149864.
4
5         * workers/SharedWorkerThread.cpp: include "SecurityOrigin.h"
6
7 2013-05-10  Claudio Saavedra  <csaavedra@igalia.com>
8
9         Fix build after r149864.
10
11         Unreviewed build fix.
12
13         * loader/ThreadableLoader.h: include <wtf/text/AtomicString.h>
14         when building with RESOURCE_TIMING enabled.
15
16 2013-05-10  Anders Carlsson  <andersca@apple.com>
17
18         Fix build.
19
20         * bindings/js/ScriptController.cpp:
21
22 2013-05-10  Anders Carlsson  <andersca@apple.com>
23
24         Remove ScriptInstance.h
25         https://bugs.webkit.org/show_bug.cgi?id=115900
26
27         Reviewed by Andreas Kling.
28
29         Remove yet another abstraction now that we don't support V8.
30
31         * GNUmakefile.list.am:
32         * WebCore.vcproj/WebCore.vcproj:
33         * WebCore.vcxproj/WebCore.vcxproj:
34         * WebCore.vcxproj/WebCore.vcxproj.filters:
35         * WebCore.xcodeproj/project.pbxproj:
36         * bindings/js/ScriptController.h:
37         (Bindings):
38         (ScriptController):
39         * bindings/js/ScriptControllerMac.mm:
40         (WebCore::ScriptController::createScriptInstanceForWidget):
41         * bindings/js/ScriptInstance.h: Removed.
42         * html/HTMLPlugInElement.cpp:
43         (WebCore::HTMLPlugInElement::getInstance):
44         * html/HTMLPlugInElement.h:
45         (Bindings):
46         (HTMLPlugInElement):
47         * platform/graphics/wince/MediaPlayerProxy.h:
48         (WebMediaPlayerProxy):
49         * rendering/RenderEmbeddedObject.cpp:
50         * rendering/RenderSnapshottedPlugIn.cpp:
51
52 2013-05-10  Anders Carlsson  <andersca@apple.com>
53
54         Unreviewed, rolling out r149866.
55         http://trac.webkit.org/changeset/149866
56         https://bugs.webkit.org/show_bug.cgi?id=115898
57
58         Broke tests
59
60         * dom/Document.cpp:
61         (WebCore::Document::setDomain):
62         (WebCore::Document::initSecurityContext):
63         * page/SecurityOrigin.cpp:
64         (WebCore::SecurityOrigin::SecurityOrigin):
65         (WebCore::SecurityOrigin::isolatedCopy):
66         (WebCore::SecurityOrigin::setDomainFromDOM):
67         (WebCore::SecurityOrigin::grantUniversalAccess):
68         * page/SecurityOrigin.h:
69         (SecurityOrigin):
70
71 2013-05-10  Andrei Bucur  <abucur@adobe.com>
72
73         Remove overflow dead code
74         https://bugs.webkit.org/show_bug.cgi?id=115893
75
76         Reviewed by Antti Koivisto.
77
78         The patch removes unused public overflow accesor functions from RenderOverflow and InlineFlowBox.
79
80         Tests: no tests, code cleanup.
81
82         * rendering/InlineFlowBox.h: Removed logicalLeftLayoutOverflow and logicalRightLayoutOverflow.
83         * rendering/RenderOverflow.h: Removed setMinYLayoutOverflow, setMaxYLayoutOverflow,
84             setMinXLayoutOverflow, setMaxXLayoutOverflow, setMinYVisualOverflow, setMaxYVisualOverflow,
85             setMinXVisualOverflow and setMaxXVisualOverflow.
86
87 2013-05-10  Anders Carlsson  <andersca@apple.com>
88
89         Begin making SecurityOrigin immutable
90         https://bugs.webkit.org/show_bug.cgi?id=115898
91
92         Reviewed by Andreas Kling.
93
94         Replace SecurityOrigin::setDomainFromDOM and SecurityOrigin::grantUniversalAccess with
95         member functions that return new SecurityOrigin objects.
96
97         * dom/Document.cpp:
98         (WebCore::Document::setDomain):
99         Update the security origin to one returned by copyWithDomainSetFromDOM.
100     
101         (WebCore::Document::initSecurityContext):
102         Set the security origin to one returned by copyWithUniversalAccessGranted().
103
104         * page/SecurityOrigin.cpp:
105         (WebCore::SecurityOrigin::SecurityOrigin):
106         Add a new constructor that takes all the member variables as parameters. This is a little unwieldy at the moment,
107         but all the boolean parameters could be replaced by a bitmask of flags.
108
109         (WebCore::SecurityOrigin::isolatedCopy):
110         Call the new constructor.
111
112         (WebCore::SecurityOrigin::copyWithDomainSetFromDOM):
113         Return a new security origin with m_domainWasSetInDOM set to true and the domain updated.
114
115         (WebCore::SecurityOrigin::copyWithUniversalAccessGranted):
116         Return a new security origin with m_universalAccess set to true.
117
118 2013-05-10  Anders Carlsson  <andersca@apple.com>
119
120         Remove ScriptController::updateSecurityOrigin
121         https://bugs.webkit.org/show_bug.cgi?id=115895
122
123         Reviewed by Antti Koivisto.
124
125         ScriptController::updateSecurityOrigin is just dead code now that the V8 bindings are gone.
126
127         * bindings/js/ScriptController.cpp:
128         * bindings/js/ScriptController.h:
129         * dom/Document.cpp:
130         (WebCore::Document::setIsViewSource):
131         (WebCore::Document::setDomain):
132         * dom/Document.h:
133         (Document):
134         * dom/SecurityContext.cpp:
135         (WebCore::SecurityContext::enforceSandboxFlags):
136         * dom/SecurityContext.h:
137         (SecurityContext):
138
139 2013-05-10  Anders Carlsson  <andersca@apple.com>
140
141         Stop including SecurityOrigin.h where unnecessary
142         https://bugs.webkit.org/show_bug.cgi?id=115897
143
144         Reviewed by Antti Koivisto.
145
146         Move rarely called functions out of line so headers don't have to include SecurityOrigin.h
147
148         * Modules/indexeddb/IDBFactoryBackendImpl.h:
149         * Modules/webdatabase/DatabaseBackendBase.cpp:
150         (WebCore::DatabaseBackendBase::databaseDebugName):
151         * Modules/webdatabase/DatabaseBackendBase.h:
152         (DatabaseBackendBase):
153         * Modules/webdatabase/DatabaseSync.h:
154         * bindings/js/JSDOMWindowCustom.h:
155         * html/parser/XSSAuditor.cpp:
156         * loader/ThreadableLoader.cpp:
157         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
158         (WebCore::ThreadableLoaderOptions::~ThreadableLoaderOptions):
159         (WebCore::ThreadableLoader::create):
160         * loader/ThreadableLoader.h:
161         (ThreadableLoaderOptions):
162         * loader/WorkerThreadableLoader.cpp:
163         * workers/DedicatedWorkerContext.cpp:
164         * workers/DedicatedWorkerThread.cpp:
165         * workers/SharedWorkerContext.cpp:
166         * workers/WorkerThread.cpp:
167         * workers/WorkerThread.h:
168
169 2013-05-10  Carlos Garcia Campos  <cgarcia@igalia.com>
170
171         Unreviewed. Fix GTK+ build after r149839.
172
173         * platform/gtk/RenderThemeGtk3.cpp:
174         (WebCore::gtkStyleChangedCallback):
175
176 2013-05-09  Chris Fleizach  <cfleizach@apple.com>
177
178         AX: VoiceOver is no longer seeing items in poorly formed tables
179         https://bugs.webkit.org/show_bug.cgi?id=115837
180
181         Reviewed by Darin Adler.
182
183         In case the author didn't include the rows of a table as the 
184         direct children, a table needs to dive down its descendant chain
185         until the rows are found. 
186
187         I also took the opportunity to clean up a bit around what the different
188         meanings of table are in the accessibility classes.
189
190         Test: accessibility/poorly-formed-aria-table.html
191
192         * accessibility/AccessibilityARIAGrid.cpp:
193         (WebCore::AccessibilityARIAGrid::addRowDescendant):
194         (WebCore::AccessibilityARIAGrid::addChildren):
195         * accessibility/AccessibilityARIAGrid.h:
196         (AccessibilityARIAGrid):
197         * accessibility/AccessibilityARIAGridRow.cpp:
198         (WebCore::AccessibilityARIAGridRow::parentTable):
199         (WebCore):
200         * accessibility/AccessibilityARIAGridRow.h:
201         (AccessibilityARIAGridRow):
202         * accessibility/AccessibilityObject.h:
203         (WebCore::AccessibilityObject::isTable):
204         * accessibility/AccessibilityTable.h:
205         (AccessibilityTable):
206         (WebCore::AccessibilityTable::isTable):
207         (WebCore::toAccessibilityTable):
208         * accessibility/AccessibilityTableRow.cpp:
209         (WebCore::AccessibilityTableRow::parentTable):
210
211 2013-05-09  Yael Aharon  <yael.aharon@intel.com>
212
213         REGRESSION: Disabled multiline select element now responds to (certain) clicks
214         https://bugs.webkit.org/show_bug.cgi?id=115710
215
216         Reviewed by Kent Tamura.
217
218         After http://trac.webkit.org/changeset/140286, select elements can scroll whether they
219         are disabled or not. While they scroll, they also change the selected item.
220         This patch allows the select element to scroll, but does not change the selection
221         if the select element is disabled.        
222
223         Test: fast/forms/select/listbox-disabled-scroll-no-onchange.html
224         Test: fast/forms/select/listbox-disabled-no-autoscroll.html
225
226         * rendering/RenderListBox.cpp:
227         (WebCore::RenderListBox::autoscroll):
228         * rendering/RenderListBox.cpp:
229         (WebCore::RenderListBox::stopAutoscroll):
230
231 2013-05-09  Anders Carlsson  <andersca@apple.com>
232
233         Clean up SecurityOrigin::databaseIdentifier
234         https://bugs.webkit.org/show_bug.cgi?id=115882
235
236         Reviewed by Beth Dakin.
237
238         Remove m_encodedHost and just call encodeHost from databaseIdentifier().
239         Also, use a StringBuilder when constructing the database identifier to avoid allocating
240         temporary String objects over and over.
241
242         * page/SecurityOrigin.cpp:
243         (WebCore::SecurityOrigin::SecurityOrigin):
244         (WebCore):
245         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
246         (WebCore::SecurityOrigin::databaseIdentifier):
247         * page/SecurityOrigin.h:
248         (SecurityOrigin):
249
250 2013-05-09  Anders Carlsson  <andersca@apple.com>
251
252         Remove m_securityOrigin from XMLHttpRequest
253         https://bugs.webkit.org/show_bug.cgi?id=115881
254
255         Reviewed by Alexey Proskuryakov.
256
257         The security origin passed to XMLHttpRequest::create was always null, so just get rid of the member variable completely.
258
259         * xml/XMLHttpRequest.cpp:
260         (WebCore::XMLHttpRequest::create):
261         (WebCore::XMLHttpRequest::XMLHttpRequest):
262         (WebCore::XMLHttpRequest::securityOrigin):
263         * xml/XMLHttpRequest.h:
264         (XMLHttpRequest):
265
266 2013-05-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
267
268         [NoInterfaceObject] extended attribute should be removed for several interfaces
269         https://bugs.webkit.org/show_bug.cgi?id=115852
270
271         Reviewed by Benjamin Poulain.
272
273         Remove [NoInterfaceObject] extended attribute from the following Web IDL
274         interfaces: SecurityPolicy, History, Location, Navigator, Performance,
275         PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceNavigation,
276         PerformanceResourceTiming, PerformanceTiming and Screen.
277
278         These interfaces should not have the [NoInterfaceObject] extended attribute
279         according to their respective specifications:
280         - http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-history-interface
281         - http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-location-interface
282         - https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#securitypolicy
283         - http://www.w3.org/html/wg/drafts/html/master/webappapis.html#the-navigator-object
284         - http://www.w3.org/TR/navigation-timing/#performance
285         - https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html#sec-PerformanceEntry-interface
286         - http://www.w3.org/TR/navigation-timing/#performancenavigation
287         - http://www.w3.org/TR/navigation-timing/#performancetiming
288         - http://www.w3.org/TR/user-timing/#performancemark
289         - http://www.w3.org/TR/user-timing/#performancemeasure
290         - http://www.w3c-test.org/webperf/specs/ResourceTiming/#performanceresourcetiming
291         - http://dev.w3.org/csswg/cssom-view/#the-screen-interface
292
293         The new behavior is consistent with the specifications, Firefox and soon Blink.
294
295         No new tests, already covered by existing tests.
296
297         * page/DOMSecurityPolicy.idl:
298         * page/History.idl:
299         * page/Location.idl:
300         * page/Navigator.idl:
301         * page/Performance.idl:
302         * page/PerformanceEntry.idl:
303         * page/PerformanceMark.idl:
304         * page/PerformanceMeasure.idl:
305         * page/PerformanceNavigation.idl:
306         * page/PerformanceResourceTiming.idl:
307         * page/PerformanceTiming.idl:
308         * page/Screen.idl:
309
310 2013-05-09  Robert Hogan  <robert@webkit.org>
311
312         REGRESSION (Safari 3-Safari 4): Replaced element with percent height in table has incorrect height
313         https://bugs.webkit.org/show_bug.cgi?id=26394
314
315         Reviewed by David Hyatt.
316
317         Text controls or any object that has scrollable content should not flex inside a table cell. 
318         This makes our behaviour the same as IE, FF and Opera (Presto).
319
320         * rendering/RenderTableSection.cpp:
321         (WebCore::RenderTableSection::layoutRows):
322
323 2013-05-09  Anders Carlsson  <andersca@apple.com>
324
325         Build fix.
326
327         * WebCore.exp.in:
328
329 2013-05-09  Anders Carlsson  <andersca@apple.com>
330
331         Add a StorageStrategy hook for creating transient local storage namespaces
332         https://bugs.webkit.org/show_bug.cgi?id=115870
333
334         Reviewed by Geoffrey Garen.
335
336         * WebCore.exp.in:
337         Export symbol needed by WebKit2.
338         
339         * dom/Document.cpp:
340         (WebCore::Document::topOrigin):
341         * dom/Document.h:
342         * dom/ScriptExecutionContext.h:
343         * workers/WorkerContext.h:
344         Remove const qualifier from topOrigin() to avoid ugly const_casts when assigning into a RefPtr<SecurityOrigin> variable.
345
346         * page/PageGroup.cpp:
347         (WebCore::PageGroup::transientLocalStorage):
348         Do a single hash lookup instead of three and use the SecurityOrigin itself as the hash key instead of a string representation of it.
349
350         * page/PageGroup.h:
351         Update HashMap declaration.
352
353         * storage/StorageNamespace.cpp:
354         (WebCore::StorageNamespace::transientLocalStorageNamespace):
355         Add new implementation that will optionally call out to the storage strategy.
356
357         * storage/StorageNamespaceImpl.cpp:
358         (WebCore::StorageNamespaceImpl::transientLocalStorageNamespace):
359         Move the default implementation here from PageGroup.
360         
361         * storage/StorageStrategy.cpp:
362         (WebCore::StorageStrategy::transientLocalStorageNamespace):
363         Call the default implementation.
364
365 2013-05-09  Enrica Casucci  <enrica@apple.com>
366
367         A change in system environment should force all CSS properties to be recomputed.
368         https://bugs.webkit.org/show_bug.cgi?id=115872
369         <rdar://problem/13781171>
370
371         Reviewed by Antti Koivisto.
372
373         When a change in the global environment occurs, for example system colors,
374         we need to make sure all the CSS properties are recomputed and not fetched
375         from the cache. For this reason we invalidate the properties cache.
376         I've also renamed the function to give it a more meaningful name.
377         
378         * page/Page.cpp:
379         (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
380         * page/Page.h:
381         * rendering/RenderTheme.cpp:
382         (WebCore::RenderTheme::platformColorsDidChange):
383
384 2013-05-09  Antti Koivisto  <antti@apple.com>
385
386         Reoptimize free-standing :focus/link/visited/-webkit-any-link selectors.
387         <http://webkit.org/b/115590>
388
389         Reviewed by Darin Adler.
390
391         Common pseudo selectors should go into their respective rule buckets instead of ending up in the universal one.
392
393         * css/RuleSet.cpp:
394         (WebCore::RuleSet::findBestRuleSetAndAdd):
395         
396             Check tag selectors with * local name (usually created for namespace) for a suitable narrower bucket too.
397
398 2013-05-09  Darin Adler  <darin@apple.com>
399
400         RenderQuote has giant function for language to quotes map
401         https://bugs.webkit.org/show_bug.cgi?id=115807
402
403         Reviewed by Anders Carlsson.
404
405         * rendering/RenderQuote.cpp:
406         (WebCore::RenderQuote::RenderQuote): Updated for m_isAttached name change.
407         (WebCore::RenderQuote::~RenderQuote): Updated for name change, and also split
408         assertion with && in it into two separate assertions.
409         (WebCore::checkNumberOfDistinctQuoteCharacters): Added. Helper function that is used
410         to check that the number of distinct quote characters is small enough to fit into
411         our fixed size array below.
412         (WebCore::quotesForLanguage): Replaces the old quotesDataLanguageMap function.
413         Returns a pointer to a struct that contains the four quote characters. This new
414         function doesn't have the massive amount of code that the old one did. We use the
415         standard library bsearch function to do a binary search.
416         (WebCore::stringForQuoteCharacter): Added. This returns a string for a given quote
417         character; one string for any given character.
418         (WebCore::quotationMarkString): Added. Returns the string for the quotation mark.
419         (WebCore::apostropheStringImpl): Added. Returns the string for the apostrophe.
420         (WebCore::RenderQuote::originalText): Rewrote this to include all the logic that
421         used to be in the quotesData function.
422         (WebCore::RenderQuote::attachQuote): Tweak assertions as above. Removed unneeded
423         special case for the first quote in a RenderView; sharing the code is better and
424         there is no significant performance difference. Also use m_isAttached directly
425         when looking at predecessores so there is no need for an isAttached function.
426         (WebCore::RenderQuote::detachQuote): Updated assertions and for name change.
427         (WebCore::RenderQuote::updateDepth): Ditto.
428
429         * rendering/RenderQuote.h: Removed unneeded includes. Marked the class FINAL since
430         we call the originalText function in the class and we don't want to do a virtual
431         function dispatch for that. Removed uneeded const from an argument. Removed a
432         stray semicolon. Removed the quotesData and isAttached functions, since they are no
433         longer needed. Renamed m_attached to m_isAttached.
434
435         * rendering/style/QuotesData.cpp: Removed the overload of QuotesData::create that
436         takes four quote strings. This was only used to build up the quotes table.
437         * rendering/style/QuotesData.h: Ditto.
438
439 2013-05-09  Max Feil  <mfeil@rim.com>
440
441         shouldUsePluginDocument() needs to be respected when a document is created
442         https://bugs.webkit.org/show_bug.cgi?id=110308
443
444         Reviewed by Rob Buis.
445
446         In DOMImplementation::createDocument() we should create
447         a PluginDocument for mime types that return "true" for
448         shouldAlwaysUsePluginDocument(), even if there is no pluginData
449         for them. This lets a client choose plugins for which the "missing
450         plugin" text or icon should appear more consistently. Otherwise
451         plugins referenced by iFrames will be treated as an HTMLDocument,
452         possibly resulting in binary files rendered as gibberish text.
453
454         Layout test platform/blackberry/plugins/swf-as-src-of-iframe.html
455
456         * dom/DOMImplementation.cpp:
457         (WebCore::DOMImplementation::createDocument):
458
459 2013-05-09  Timothy Hatcher  <timothy@apple.com>
460
461         Fix an exception when hovering native functions while paused in the debugger.
462
463         https://webkit.org/b/115866
464         rdar://problem/13681982
465
466         Reviewed by Darin Adler and Joseph Pecoraro.
467
468         * inspector/InjectedScriptSource.js:
469         (InjectedScript.prototype.getFunctionDetails): Return an error if the details
470         is null or undefined.
471
472 2013-05-09  Darin Adler  <darin@apple.com>
473
474         [Mac] CFError leak under Objective-C garbage collection
475         https://bugs.webkit.org/show_bug.cgi?id=115862
476
477         Reviewed by Benjamin Poulain.
478
479         * platform/network/mac/ResourceErrorMac.mm:
480         (WebCore::ResourceError::nsError): Use adoptCF instead of adoptNS since
481         the CFError needs a CFRelease, not an -[NSObject release].
482
483 2013-05-09  Alberto Garcia  <agarcia@igalia.com>
484
485         BlackBerry: fix call to PluginLayerWebKitThread::setHolePunchRect()
486         https://bugs.webkit.org/show_bug.cgi?id=114953
487
488         Reviewed by Rob Buis.
489
490         data->layer needs a cast in order to call setHolePunchRect().
491
492         * plugins/blackberry/NPCallbacksBlackBerry.cpp:
493         (WebCore::npSetHolePunchHandler):
494
495 2013-05-09  Mike Fenton  <mifenton@rim.com>
496
497         [BlackBerry] Style updates required based on new check-webkit-style
498         https://bugs.webkit.org/show_bug.cgi?id=115857
499
500         Reviewed by Rob Buis.
501
502         Update WebCore/platform/graphics BlackBerry sources
503         to match check-webkit-style updates.
504
505         Internally reviewed by Jakob Petsovits.
506
507         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
508         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
509         (WebCore::GraphicsContext3D::readPixelsIMG):
510         (WebCore::GraphicsContext3D::paintToCanvas):
511         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
512         (WebCore::GraphicsLayerBlackBerry::updateLayerPosition):
513         * platform/graphics/blackberry/IntRectBlackBerry.cpp:
514         (WebCore::IntRect::IntRect):
515         * platform/graphics/blackberry/LayerCompositingThread.h:
516         (WTF::::deref):
517         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
518         (WebCore::LayerFilterRenderer::initializeSharedGLObjects):
519         (WebCore::LayerFilterRenderer::actionsForOperations):
520         (WebCore::LayerFilterRenderer::applyActions):
521         * platform/graphics/blackberry/LayerRenderer.cpp:
522         (WebCore::LayerRenderer::setViewport):
523         (WebCore::LayerRenderer::compositeBuffer):
524         (WebCore::LayerRenderer::drawColor):
525         (WebCore::LayerRenderer::compositeLayersRecursive):
526         * platform/graphics/blackberry/LayerWebKitThread.cpp:
527         (WebCore::LayerWebKitThread::setFrame):
528         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
529         (WebCore::MediaPlayerPrivate::play):
530         (WebCore::MediaPlayerPrivate::waitMetadataTimerFired):
531         * platform/image-decoders/blackberry/JPEGImageDecoder.cpp:
532         (WebCore::JPEGImageDecoder::JPEGImageDecoder):
533
534 2013-05-09  Mike Fenton  <mifenton@rim.com>
535
536         [BlackBerry] Style updates required based on new check-webkit-style
537         https://bugs.webkit.org/show_bug.cgi?id=115857
538
539         Reviewed by Rob Buis.
540
541         Update WebCore/platform/network/blackberry
542         to match check-webkit-style updates.
543
544         * platform/network/blackberry/NetworkJob.cpp:
545         (WebCore::NetworkJob::initialize):
546         (WebCore::NetworkJob::handleSetCookieHeader):
547         (WebCore::NetworkJob::sendResponseIfNeeded):
548         (WebCore::NetworkJob::shouldSendClientData):
549         * platform/network/blackberry/NetworkJob.h:
550         (NetworkJob):
551         * platform/network/blackberry/NetworkManager.cpp:
552         (WebCore::NetworkManager::startJob):
553         * platform/network/blackberry/rss/RSSFilterStream.cpp:
554         (WebCore::isRSSContent):
555         (WebCore::transcode):
556
557 2013-05-09  Mike Fenton  <mifenton@rim.com>
558
559         [BlackBerry] Style updates required based on new check-webkit-style
560         https://bugs.webkit.org/show_bug.cgi?id=115857
561
562         Reviewed by Rob Buis.
563
564         Update WebCore/platform/blackberry to match check-webkit-style updates.
565
566         No functional changes.
567
568         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
569         * platform/blackberry/CookieManager.cpp:
570         (WebCore::CookieManager::getRawCookies):
571         * platform/blackberry/CookieMap.h:
572         (WebCore::CookieMap::count):
573         * platform/blackberry/CookieParser.cpp:
574         (WebCore::CookieParser::parseOneCookie):
575         * platform/blackberry/LoggingBlackBerry.cpp:
576         * platform/blackberry/PageClientBlackBerry.h:
577         (Platform):
578         (Graphics):
579         (WebCore):
580         * platform/blackberry/ParsedCookie.cpp:
581         (WebCore::ParsedCookie::appendWebCoreCookie):
582         * platform/blackberry/RenderThemeBlackBerry.cpp:
583         (WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
584         (WebCore::RenderThemeBlackBerry::paintButton):
585         (WebCore::RenderThemeBlackBerry::paintSliderThumb):
586         * platform/blackberry/SSLKeyGeneratorBlackBerry.cpp:
587         (WebCore::signedPublicKeyAndChallengeString):
588         * platform/blackberry/ScrollAnimatorBlackBerry.h:
589
590 2013-05-09  Chris Rogers  <crogers@google.com>
591
592         Require use of AudioBus::create() to avoid ref-counting issues
593         https://bugs.webkit.org/show_bug.cgi?id=115836
594
595         Reviewed by Andreas Kling.
596
597         There were a couple of places still embedding raw AudioBus objects as
598         member variables or local variables causing ref-counting problems
599         now that AudioBus is ref-counted.  Make AudioBus constructor private
600         to enforce use of AudioBus::create().
601
602         Adapted from Blink patch:
603         https://chromiumcodereview.appspot.com/14628008/
604
605         * Modules/webaudio/AudioDestinationNode.h:
606         (WebCore::AudioDestinationNode::LocalAudioInputProvider::LocalAudioInputProvider):
607         (WebCore::AudioDestinationNode::LocalAudioInputProvider::set):
608         (WebCore::AudioDestinationNode::LocalAudioInputProvider::provideInput):
609         (LocalAudioInputProvider):
610         * Modules/webaudio/AudioNodeInput.cpp:
611         (WebCore::AudioNodeInput::AudioNodeInput):
612         (WebCore::AudioNodeInput::updateInternalBus):
613         * Modules/webaudio/AudioNodeOutput.cpp:
614         (WebCore::AudioNodeOutput::AudioNodeOutput):
615         (WebCore::AudioNodeOutput::updateInternalBus):
616         * Modules/webaudio/AudioParam.cpp:
617         (WebCore::AudioParam::calculateFinalValues):
618         * Modules/webaudio/ConvolverNode.cpp:
619         (WebCore::ConvolverNode::setBuffer):
620         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
621         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
622         (WebCore::MediaStreamAudioDestinationNode::process):
623         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
624         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
625         (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
626         * Modules/webaudio/ScriptProcessorNode.cpp:
627         (WebCore::ScriptProcessorNode::ScriptProcessorNode):
628         (WebCore::ScriptProcessorNode::process):
629         * Modules/webaudio/ScriptProcessorNode.h:
630         (ScriptProcessorNode):
631         * platform/audio/AudioBus.cpp:
632         (WebCore::AudioBus::create):
633         (WebCore):
634         (WebCore::AudioBus::AudioBus):
635         (WebCore::AudioBus::createBufferFromRange):
636         (WebCore::AudioBus::createBySampleRateConverting):
637         (WebCore::AudioBus::createByMixingToMono):
638         * platform/audio/AudioBus.h:
639         (AudioBus):
640         * platform/audio/AudioFIFO.cpp:
641         (WebCore::AudioFIFO::AudioFIFO):
642         (WebCore::AudioFIFO::consume):
643         (WebCore::AudioFIFO::push):
644         * platform/audio/AudioFIFO.h:
645         (AudioFIFO):
646         * platform/audio/AudioPullFIFO.cpp:
647         (WebCore::AudioPullFIFO::AudioPullFIFO):
648         (WebCore::AudioPullFIFO::fillBuffer):
649         * platform/audio/AudioPullFIFO.h:
650         (AudioPullFIFO):
651         * platform/audio/AudioResampler.cpp:
652         (WebCore::AudioResampler::AudioResampler):
653         (WebCore::AudioResampler::configureChannels):
654         * platform/audio/MultiChannelResampler.cpp:
655         * platform/audio/Reverb.cpp:
656         (WebCore::Reverb::initialize):
657         * platform/audio/SincResampler.cpp:
658         (WebCore::SincResampler::consumeSource):
659         (WebCore):
660         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
661         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
662         * platform/audio/gstreamer/AudioDestinationGStreamer.h:
663         (AudioDestinationGStreamer):
664         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
665         (WebCore::AudioFileReader::createBus):
666         * platform/audio/ios/AudioDestinationIOS.cpp:
667         (WebCore::AudioDestinationIOS::AudioDestinationIOS):
668         (WebCore::AudioDestinationIOS::render):
669         * platform/audio/ios/AudioDestinationIOS.h:
670         (AudioDestinationIOS):
671         * platform/audio/mac/AudioDestinationMac.cpp:
672         (WebCore::AudioDestinationMac::AudioDestinationMac):
673         (WebCore::AudioDestinationMac::render):
674         * platform/audio/mac/AudioDestinationMac.h:
675         (AudioDestinationMac):
676         * platform/audio/mac/AudioFileReaderMac.cpp:
677         (WebCore::AudioFileReader::createBus):
678
679 2013-05-09  Alberto Garcia  <agarcia@igalia.com>
680
681         [BlackBerry] Upstream the input popups
682         https://bugs.webkit.org/show_bug.cgi?id=114608
683
684         Reviewed by Rob Buis.
685
686         This patch contains contributions from many members of the
687         BlackBerry WebKit team, including:
688
689         Chris Hutten-Czapski
690         David Hoon
691         Jessica Cao
692         Rob Buis
693         Tiancheng Jiang
694
695         * Resources/blackberry/colorControlBlackBerry.css: Added.
696         (.color-picker-popup-area):
697         (.color-picker-content):
698         (.color-picker-block):
699         (#color-picker-swatch-block):
700         (.color-picker-switcher):
701         (.color-picker-check-mark):
702         (.color-picker-option):
703         (.color-picker-button):
704         (.color-picker-highlight):
705         (input):
706         (.color-picker-sharp):
707         (.color-picker-off):
708         (.color-picker-inactive-font):
709         (.color-picker-row):
710         (.color-picker-hex-style):
711         (.color-picker-input):
712         (.color-picker-well):
713         (.color-picker-input .color-picker-well):
714         (.color-picker-slider):
715         (.color-picker-slider-output):
716         (.color-picker-range):
717         (.color-picker-range::-webkit-slider-thumb):
718         (.color-picker-range::-webkit-slider-thumb:active):
719         (.red-ranger-bg):
720         (.green-ranger-bg):
721         (.blue-ranger-bg):
722         (@media only screen and (height: 768px)):
723         (@media only screen and (height: 720px)):
724         * Resources/blackberry/colorControlBlackBerry.js: Added.
725         (.):
726         * Resources/blackberry/popupControlBlackBerry.css:
727         (body):
728         (.popup-area):
729         (.popup-header):
730         (.popup-content):
731         (.popup-buttons):
732         (.popup-button):
733         (@media only screen and (width: 720px) and (height: 720px)):
734         * Resources/blackberry/selectControlBlackBerry.css:
735         (.popup-content):
736         (@media (min-height: 918px)):
737         (.option):
738         (@media only screen and (width: 720px) and (height: 720px)):
739         (.contents):
740         (.option:active):
741         (.selected):
742         (.selected .contents::after):
743         (.text):
744         (.disabled):
745         (.optgroup):
746         (.optgroup-option):
747         * Resources/blackberry/selectControlBlackBerry.js:
748         (.):
749         * Resources/blackberry/timeControlBlackBerry.css: Added.
750         (#popup-content-time):
751         (.column):
752         (.column:not(:last-child)):
753         (.cell):
754         (.yearmonthdate .cell div:last-child):
755         (.row-highlight-container):
756         (.row-highlight-filler):
757         (.row-highlight):
758         (.tall-bit):
759         (@media only screen and (width: 720px) and (height: 720px)):
760         * Resources/blackberry/timeControlBlackBerry.js: Added.
761         (.):
762
763 2013-05-09  Rob Buis  <rbuis@rim.com>
764
765         [BlackBerry] texmap code generates warnings
766         https://bugs.webkit.org/show_bug.cgi?id=115815
767
768         Reviewed by Benjamin Poulain.
769
770         Add USE(TEXTURE_MAPPER) guards since Source/WebCore/CMakeLists.txt includes
771         these files unconditionally.
772
773         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
774         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
775         * platform/graphics/texmap/TextureMapper.h:
776         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
777         * platform/graphics/texmap/TextureMapperBackingStore.h:
778         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
779         * platform/graphics/texmap/TextureMapperFPSCounter.h:
780         * platform/graphics/texmap/TextureMapperGL.cpp:
781         * platform/graphics/texmap/TextureMapperGL.h:
782         * platform/graphics/texmap/TextureMapperLayer.cpp:
783         * platform/graphics/texmap/TextureMapperLayer.h:
784         * platform/graphics/texmap/TextureMapperTile.cpp:
785         * platform/graphics/texmap/TextureMapperTile.h:
786         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
787         * platform/graphics/texmap/TextureMapperTiledBackingStore.h:
788
789 2013-05-09  Alberto Garcia  <agarcia@igalia.com>
790
791         PluginDatabase: add plugin directory for the BlackBerry port.
792         https://bugs.webkit.org/show_bug.cgi?id=114943
793
794         Reviewed by Rob Buis.
795
796         XP_UNIX is defined for the BlackBerry port, but we don't want to
797         share the same code here.
798
799         * plugins/PluginDatabase.cpp:
800         (WebCore::PluginDatabase::defaultPluginDirectories):
801         (WebCore::PluginDatabase::isPreferredPluginDirectory):
802
803 2013-05-09  Seokju Kwon  <seokju.kwon@gmail.com>
804
805         Web Inspector: Remove Memory Distribution and Memory Snapshots Panels
806         https://bugs.webkit.org/show_bug.cgi?id=115850
807
808         Reviewed by Andreas Kling.
809
810         Removed the Memory Instrumentation Code after r148921.
811
812         No new tests, no behavior change.
813
814         * inspector/compile-front-end.py:
815         * inspector/front-end/NativeMemorySnapshotView.js: Removed.
816         * inspector/front-end/ProfilesPanel.js:
817         (WebInspector.ProfilesPanel):
818         * inspector/front-end/Settings.js:
819         (WebInspector.Settings):
820         (WebInspector.ExperimentsSettings):
821         * inspector/front-end/SettingsScreen.js:
822         * inspector/front-end/WebKit.qrc:
823         * inspector/front-end/inspector.css:
824         * inspector/front-end/inspector.js:
825         (WebInspector._panelDescriptors):
826         * inspector/front-end/nativeMemoryProfiler.css: Removed.
827
828 2013-05-09  Zan Dobersek  <zdobersek@igalia.com>
829
830         Unreviewed GTK build fix after r149796.
831
832         * GNUmakefile.am: Add a phony target for the window constructors file and include it among
833         the dependencies for the non-generated code.
834
835 2013-05-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
836
837         Unreviewed build fix for Qt minimal build.
838
839         r149796 broke builds that have WEB_SOCKETS flag disabled.
840
841         * page/DOMWindow.idl:
842
843 2013-05-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
844
845         Add support for [NoInterfaceObject] Web IDL extended attribute
846         https://bugs.webkit.org/show_bug.cgi?id=115714
847
848         Reviewed by Kentaro Hara.
849
850         *Constructor attributes on the global DOMWindow object are now automatically
851         generated for each non-callback interface that is not declared with the
852         [NoInterfaceObject] extended attribute. It is thus no longer needed for
853         developers to manually add *Constructor attributes for their new interfaces
854         unless they wish to register an "extra" constructor for their interface.
855
856         This patch does not modify at all the behavior on JS side. To achieve this,
857         [NoInterfaceObject] extended attribute is added to interfaces that should
858         not have it according to specification (e.g. History, Location, ...).
859         This can be improved later as the behavior should not change with this
860         patch.
861
862         No new tests, no behavior change.
863
864         * CMakeLists.txt:
865         * DerivedSources.make:
866         * DerivedSources.pri:
867         * GNUmakefile.am:
868         * GNUmakefile.list.am:
869         * Modules/battery/BatteryManager.idl:
870         * Modules/encryptedmedia/MediaKeyMessageEvent.idl:
871         * Modules/encryptedmedia/MediaKeyNeededEvent.idl:
872         * Modules/encryptedmedia/MediaKeySession.idl:
873         * Modules/encryptedmedia/MediaKeys.idl:
874         * Modules/filesystem/DOMFileSystem.idl:
875         * Modules/filesystem/DOMFileSystemSync.idl:
876         * Modules/filesystem/DirectoryEntry.idl:
877         * Modules/filesystem/DirectoryEntrySync.idl:
878         * Modules/filesystem/DirectoryReader.idl:
879         * Modules/filesystem/DirectoryReaderSync.idl:
880         * Modules/filesystem/Entry.idl:
881         * Modules/filesystem/EntryArray.idl:
882         * Modules/filesystem/EntryArraySync.idl:
883         * Modules/filesystem/EntrySync.idl:
884         * Modules/filesystem/FileEntry.idl:
885         * Modules/filesystem/FileEntrySync.idl:
886         * Modules/filesystem/FileWriter.idl:
887         * Modules/filesystem/FileWriterSync.idl:
888         * Modules/filesystem/Metadata.idl:
889         * Modules/gamepad/Gamepad.idl:
890         * Modules/gamepad/GamepadList.idl:
891         * Modules/geolocation/Coordinates.idl:
892         * Modules/geolocation/Geolocation.idl:
893         * Modules/geolocation/Geoposition.idl:
894         * Modules/geolocation/PositionError.idl:
895         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
896         * Modules/indexeddb/IDBAny.idl:
897         * Modules/mediasource/MediaSource.idl:
898         * Modules/mediasource/SourceBuffer.idl:
899         * Modules/mediasource/SourceBufferList.idl:
900         * Modules/mediastream/DOMWindowMediaStream.idl: Removed.
901         * Modules/mediastream/MediaStream.idl:
902         * Modules/mediastream/MediaStreamTrack.idl:
903         * Modules/mediastream/MediaStreamTrackEvent.idl:
904         * Modules/mediastream/NavigatorUserMediaError.idl:
905         * Modules/mediastream/RTCDTMFSender.idl:
906         * Modules/mediastream/RTCDTMFToneChangeEvent.idl:
907         * Modules/mediastream/RTCDataChannel.idl:
908         * Modules/mediastream/RTCDataChannelEvent.idl:
909         * Modules/mediastream/RTCIceCandidateEvent.idl:
910         * Modules/mediastream/RTCPeerConnection.idl:
911         * Modules/mediastream/RTCStatsReport.idl:
912         * Modules/mediastream/RTCStatsResponse.idl:
913         * Modules/networkinfo/NetworkInfoConnection.idl:
914         * Modules/notifications/DOMWindowNotifications.idl:
915         * Modules/notifications/NotificationCenter.idl:
916         * Modules/quota/StorageInfo.idl:
917         * Modules/quota/StorageQuota.idl:
918         * Modules/speech/DOMWindowSpeech.idl: Removed.
919         * Modules/speech/DOMWindowSpeechSynthesis.idl:
920         * Modules/speech/SpeechGrammar.idl:
921         * Modules/speech/SpeechGrammarList.idl:
922         * Modules/speech/SpeechRecognition.idl:
923         * Modules/speech/SpeechRecognitionAlternative.idl:
924         * Modules/speech/SpeechRecognitionError.idl:
925         * Modules/speech/SpeechRecognitionEvent.idl:
926         * Modules/speech/SpeechRecognitionResult.idl:
927         * Modules/speech/SpeechRecognitionResultList.idl:
928         * Modules/speech/SpeechSynthesis.idl:
929         * Modules/speech/SpeechSynthesisVoice.idl:
930         * Modules/webaudio/AnalyserNode.idl:
931         * Modules/webaudio/AudioBuffer.idl:
932         * Modules/webaudio/AudioBufferSourceNode.idl:
933         * Modules/webaudio/AudioContext.idl:
934         * Modules/webaudio/AudioDestinationNode.idl:
935         * Modules/webaudio/AudioListener.idl:
936         * Modules/webaudio/AudioNode.idl:
937         * Modules/webaudio/AudioParam.idl:
938         * Modules/webaudio/AudioSourceNode.idl:
939         * Modules/webaudio/BiquadFilterNode.idl:
940         * Modules/webaudio/ChannelMergerNode.idl:
941         * Modules/webaudio/ChannelSplitterNode.idl:
942         * Modules/webaudio/ConvolverNode.idl:
943         * Modules/webaudio/DOMWindowWebAudio.idl: Removed.
944         * Modules/webaudio/DelayNode.idl:
945         * Modules/webaudio/DynamicsCompressorNode.idl:
946         * Modules/webaudio/GainNode.idl:
947         * Modules/webaudio/MediaElementAudioSourceNode.idl:
948         * Modules/webaudio/MediaStreamAudioDestinationNode.idl:
949         * Modules/webaudio/MediaStreamAudioSourceNode.idl:
950         * Modules/webaudio/OfflineAudioContext.idl:
951         * Modules/webaudio/OscillatorNode.idl:
952         * Modules/webaudio/PannerNode.idl:
953         * Modules/webaudio/ScriptProcessorNode.idl:
954         * Modules/webaudio/WaveShaperNode.idl:
955         * Modules/webaudio/WaveTable.idl:
956         * Modules/webdatabase/DOMWindowWebDatabase.idl:
957         * Modules/webdatabase/Database.idl:
958         * Modules/webdatabase/DatabaseSync.idl:
959         * Modules/webdatabase/SQLError.idl:
960         * Modules/webdatabase/SQLResultSet.idl:
961         * Modules/webdatabase/SQLResultSetRowList.idl:
962         * Modules/webdatabase/SQLTransaction.idl:
963         * Modules/webdatabase/SQLTransactionSync.idl:
964         * Modules/websockets/DOMWindowWebSocket.idl: Removed.
965         * Modules/websockets/WebSocket.idl:
966         * PlatformBlackBerry.cmake:
967         * UseJSC.cmake:
968         * WebCore.xcodeproj/project.pbxproj:
969         * bindings/scripts/IDLAttributes.txt:
970         * bindings/scripts/IDLParser.pm:
971         (parseTypedef):
972         * bindings/scripts/preprocess-idls.pl:
973         (GenerateConstructorAttribute):
974         (getFileContents):
975         (getPartialInterfaceNameFromIDL):
976         (isCallbackInterfaceFromIDL):
977         (trim):
978         (getInterfaceExtendedAttributesFromIDL):
979         * css/CSSFontFaceLoadEvent.idl:
980         * css/CSSFontFaceRule.idl:
981         * css/CSSSupportsRule.idl:
982         * css/CSSUnknownRule.idl:
983         * css/DOMWindowCSS.idl:
984         * css/FontLoader.idl:
985         * css/MediaQueryList.idl:
986         * css/MediaQueryListListener.idl:
987         * css/StyleMedia.idl:
988         * dom/CustomElementConstructor.idl:
989         * dom/DOMError.idl:
990         * dom/DOMNamedFlowCollection.idl:
991         * dom/DataTransferItem.idl:
992         * dom/DataTransferItemList.idl:
993         * dom/EventListener.idl:
994         * dom/EventTarget.idl:
995         * dom/NodeIterator.idl:
996         * dom/ShadowRoot.idl:
997         * dom/TreeWalker.idl:
998         * dom/WebKitNamedFlow.idl:
999         * fileapi/FileException.idl:
1000         * fileapi/FileReaderSync.idl:
1001         * html/HTMLAudioElement.idl:
1002         * html/HTMLDetailsElement.idl:
1003         * html/HTMLOptionElement.idl:
1004         * html/MediaError.idl:
1005         * html/MediaKeyError.idl:
1006         * html/MicroDataItemValue.idl:
1007         * html/RadioNodeList.idl:
1008         * html/ValidityState.idl:
1009         * html/canvas/CanvasRenderingContext.idl:
1010         * html/canvas/DOMPath.idl:
1011         * html/canvas/EXTDrawBuffers.idl:
1012         * html/canvas/EXTTextureFilterAnisotropic.idl:
1013         * html/canvas/OESElementIndexUint.idl:
1014         * html/canvas/OESStandardDerivatives.idl:
1015         * html/canvas/OESTextureFloat.idl:
1016         * html/canvas/OESTextureHalfFloat.idl:
1017         * html/canvas/OESVertexArrayObject.idl:
1018         * html/canvas/WebGLCompressedTextureATC.idl:
1019         * html/canvas/WebGLCompressedTexturePVRTC.idl:
1020         * html/canvas/WebGLCompressedTextureS3TC.idl:
1021         * html/canvas/WebGLContextAttributes.idl:
1022         * html/canvas/WebGLDebugRendererInfo.idl:
1023         * html/canvas/WebGLDebugShaders.idl:
1024         * html/canvas/WebGLDepthTexture.idl:
1025         * html/canvas/WebGLLoseContext.idl:
1026         * html/canvas/WebGLVertexArrayObjectOES.idl:
1027         * html/track/AudioTrack.idl:
1028         * html/track/AudioTrackList.idl:
1029         * html/track/TextTrackRegionList.idl:
1030         * html/track/VideoTrack.idl:
1031         * html/track/VideoTrackList.idl:
1032         * inspector/InjectedScriptHost.idl:
1033         * inspector/InspectorFrontendHost.idl:
1034         * inspector/JavaScriptCallFrame.idl:
1035         * inspector/ScriptProfile.idl:
1036         * inspector/ScriptProfileNode.idl:
1037         * loader/appcache/DOMApplicationCache.idl:
1038         * page/AbstractView.idl:
1039         * page/BarInfo.idl:
1040         * page/Console.idl:
1041         * page/Crypto.idl:
1042         * page/DOMSecurityPolicy.idl:
1043         * page/DOMWindow.idl:
1044         * page/History.idl:
1045         * page/Location.idl:
1046         * page/MemoryInfo.idl:
1047         * page/Navigator.idl:
1048         * page/PagePopupController.idl:
1049         * page/Performance.idl:
1050         * page/PerformanceEntry.idl:
1051         * page/PerformanceEntryList.idl:
1052         * page/PerformanceMark.idl:
1053         * page/PerformanceMeasure.idl:
1054         * page/PerformanceNavigation.idl:
1055         * page/PerformanceResourceTiming.idl:
1056         * page/PerformanceTiming.idl:
1057         * page/Screen.idl:
1058         * page/SpeechInputResult.idl:
1059         * page/SpeechInputResultList.idl:
1060         * page/WorkerNavigator.idl:
1061         * page/make_settings.pl:
1062         (generateInternalSettingsIdlFile):
1063         * svg/ElementTimeControl.idl:
1064         * svg/SVGAnimationElement.idl:
1065         * svg/SVGExternalResourcesRequired.idl:
1066         * svg/SVGFilterPrimitiveStandardAttributes.idl:
1067         * svg/SVGFitToViewBox.idl:
1068         * svg/SVGLangSpace.idl:
1069         * svg/SVGLocatable.idl:
1070         * svg/SVGStyledElement.idl:
1071         * svg/SVGTests.idl:
1072         * svg/SVGTransformable.idl:
1073         * svg/SVGURIReference.idl:
1074         * testing/InternalSettings.idl:
1075         * testing/Internals.idl:
1076         * testing/MallocStatistics.idl:
1077         * testing/TypeConversions.idl:
1078         * workers/AbstractWorker.idl:
1079         * workers/DedicatedWorkerContext.idl:
1080         * workers/SharedWorker.idl:
1081         * workers/SharedWorkerContext.idl:
1082         * workers/WorkerContext.idl:
1083         * workers/WorkerLocation.idl:
1084         * xml/XPathExpression.idl:
1085         * xml/XPathNSResolver.idl:
1086
1087 2013-05-09  ChangSeok Oh  <changseok.oh@collabora.com>
1088
1089         [GTK][AC] Buildfix after r149694
1090         https://bugs.webkit.org/show_bug.cgi?id=115797
1091
1092         Reviewed by Gustavo Noronha Silva.
1093
1094         Some interfaces, such as a return value and parameters of functions are changed.
1095
1096         No new tests since no functionality changed.
1097
1098         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1099         (WebCore::animationHasStepsTimingFunction):
1100         (WebCore::GraphicsLayerClutter::timingFunctionForAnimationValue):
1101         (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
1102         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
1103         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
1104         (WebCore::GraphicsLayerClutter::setAnimationEndpoints):
1105         (WebCore::GraphicsLayerClutter::setAnimationKeyframes):
1106         * platform/graphics/clutter/GraphicsLayerClutter.h:
1107         (GraphicsLayerClutter):
1108
1109 2013-05-08  Rob Buis  <rbuis@rim.com>
1110
1111         Fix some compiler warnings (miscellaneous)
1112         https://bugs.webkit.org/show_bug.cgi?id=80790
1113
1114         Reviewed by Brent Fulgham.
1115
1116         Get rid of the following warning for BlackBerry:
1117
1118         NavigatorContentUtils.cpp:60:78: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
1119
1120         by not compiling any of the code to add protocols to the protocol whitelist.
1121
1122         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1123         (WebCore::initProtocolHandlerWhitelist):
1124
1125 2013-05-08  peavo@outlook.com  <peavo@outlook.com>
1126
1127         [Windows] The function seekFile() is not implemented.
1128         https://bugs.webkit.org/show_bug.cgi?id=115246
1129
1130         Reviewed by Brent Fulgham.
1131
1132         Implemented seekFile() function for Windows.
1133
1134         * platform/win/FileSystemWin.cpp:
1135         (WebCore::seekFile):
1136
1137 2013-05-08  Seokju Kwon  <seokju.kwon@gmail.com>
1138
1139         Web Inspector: Fix a typo in Settings.js
1140         https://bugs.webkit.org/show_bug.cgi?id=115849
1141
1142         Reviewed by Joseph Pecoraro.
1143
1144         No new tests, no behavior change.
1145
1146         * inspector/front-end/Settings.js:
1147         (WebInspector.Settings):
1148
1149 2013-05-08  Ryosuke Niwa  <rniwa@webkit.org>
1150
1151         SecurityOrigin doesn’t need to forward declare or include Document
1152         https://bugs.webkit.org/show_bug.cgi?id=115847
1153
1154         Reviewed by Alexey Proskuryakov.
1155
1156         Merge https://chromium.googlesource.com/chromium/blink/+/fc7a88caa9c41f3471d8994a530643e5225f82fc.
1157
1158         Removed unused Document forward declaration+include from SecurityOrigin.
1159
1160         * page/SecurityOrigin.cpp:
1161         * page/SecurityOrigin.h:
1162
1163 2013-05-08  David Kilzer  <ddkilzer@apple.com>
1164
1165         BUILD FIX: Don't use adoptCF() with NSDictionary * object
1166
1167         Fixes the following build failure:
1168
1169             In file included from Source/WebCore/platform/network/mac/ResourceErrorMac.mm:27:
1170             In file included from Source/WebCore/platform/network/cf/ResourceError.h:31:
1171             /usr/local/include/wtf/RetainPtr.h:81:13: error: static_assert failed "Don't use adoptCF with Objective-C pointer types, use adoptNS."
1172                         static_assert(!std::is_convertible<T, id>::value, "Don't use adoptCF with Objective-C pointer types, use adoptNS.");
1173                         ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1174             /usr/local/include/wtf/RetainPtr.h:274:16: note: in instantiation of member function 'WTF::RetainPtr<NSDictionary *>::RetainPtr' requested here
1175                     return RetainPtr<T>(AdoptCF, o);
1176                            ^
1177             Source/WebCore/platform/network/mac/ResourceErrorMac.mm:214:44: note: in instantiation of function template specialization 'WTF::adoptCF<NSDictionary *>' requested here
1178                     RetainPtr<NSDictionary> userInfo = adoptCF((NSDictionary *) CFErrorCopyUserInfo(error));
1179                                                        ^
1180             1 error generated.
1181
1182         * platform/network/mac/ResourceErrorMac.mm:
1183         (WebCore::ResourceError::nsError): Switch from adoptCF() to
1184         adoptNS().  This is in USE(CFNETWORK) code, so it's not
1185         exercised on the Mac.
1186
1187 2013-05-08  Ryosuke Niwa  <rniwa@webkit.org>
1188
1189         Remove Editor::setSelectionOffsets
1190         https://bugs.webkit.org/show_bug.cgi?id=115831
1191
1192         Reviewed by Andreas Kling.
1193
1194         Removed the function added in r120985 for Chromium Android port.
1195
1196         * editing/Editor.cpp:
1197         * editing/Editor.h:
1198
1199 2013-05-07  Ryosuke Niwa  <rniwa@webkit.org>
1200
1201         Potential use-after-free of Frame
1202         https://bugs.webkit.org/show_bug.cgi?id=115774
1203
1204         Reviewed by Simon Fraser.
1205
1206         Merge https://chromium.googlesource.com/chromium/blink/+/c5b4a6db82e8280c7fc55ee3dc3a84c6b026e66e.
1207
1208         * page/Frame.cpp:
1209         (WebCore::Frame::setPrinting):
1210         (WebCore::Frame::setPageAndTextZoomFactors):
1211         (WebCore::Frame::deviceOrPageScaleFactorChanged):
1212
1213 2013-05-08  Roger Fong  <roger_fong@apple.com>
1214
1215         Unreviewed build fix, AppleWin port.
1216
1217         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1218         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
1219         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1220         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
1221         (WebCore::MediaPlayerPrivateAVFoundation::seek):
1222         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
1223         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1224         (WebCore):
1225         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1226         (MediaPlayerPrivateAVFoundation):
1227
1228 2013-05-08  Xingnan Wang  <xingnan.wang@intel.com>
1229
1230         Heap-use-after-free in WebCore::AudioNodeOutput::pull
1231         https://bugs.webkit.org/show_bug.cgi?id=111362
1232
1233         Reviewed by Chris Rogers.
1234
1235         * Modules/webaudio/AudioBuffer.cpp:
1236         (WebCore::AudioBuffer::createFromAudioFileData):
1237         * Modules/webaudio/AudioNodeInput.cpp:
1238         (WebCore::AudioNodeInput::AudioNodeInput):
1239         (WebCore::AudioNodeInput::updateInternalBus):
1240         * Modules/webaudio/AudioNodeInput.h:
1241         (AudioNodeInput):
1242         * Modules/webaudio/AudioNodeOutput.cpp:
1243         (WebCore::AudioNodeOutput::AudioNodeOutput):
1244         (WebCore::AudioNodeOutput::updateInternalBus):
1245         (WebCore::AudioNodeOutput::pull):
1246         (WebCore::AudioNodeOutput::bus):
1247         * Modules/webaudio/AudioNodeOutput.h:
1248         (AudioNodeOutput):
1249         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
1250         (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
1251         * Modules/webaudio/OfflineAudioDestinationNode.h:
1252         (OfflineAudioDestinationNode):
1253         * platform/audio/AudioBus.cpp:
1254         (WebCore::AudioBus::createBufferFromRange):
1255         (WebCore::AudioBus::createBySampleRateConverting):
1256         (WebCore::AudioBus::createByMixingToMono):
1257         * platform/audio/AudioBus.h:
1258         (AudioBus):
1259         * platform/audio/AudioFileReader.h:
1260         (WebCore):
1261         * platform/audio/AudioResampler.cpp:
1262         (WebCore::AudioResampler::AudioResampler):
1263         (WebCore::AudioResampler::configureChannels):
1264         * platform/audio/AudioResampler.h:
1265         (AudioResampler):
1266         * platform/audio/HRTFElevation.cpp:
1267         (WebCore::getConcatenatedImpulseResponsesForSubject):
1268         (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
1269         * platform/audio/MultiChannelResampler.cpp:
1270         * platform/audio/Reverb.cpp:
1271         (WebCore::Reverb::initialize):
1272         * platform/audio/Reverb.h:
1273         (Reverb):
1274         * platform/audio/efl/AudioBusEfl.cpp:
1275         (WebCore::AudioBus::loadPlatformResource):
1276         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1277         (AudioFileReader):
1278         (WebCore::AudioFileReader::createBus):
1279         (WebCore::createBusFromAudioFile):
1280         (WebCore::createBusFromInMemoryAudioFile):
1281         * platform/audio/gtk/AudioBusGtk.cpp:
1282         (WebCore::AudioBus::loadPlatformResource):
1283         * platform/audio/mac/AudioBusMac.mm:
1284         (WebCore::AudioBus::loadPlatformResource):
1285         * platform/audio/mac/AudioFileReaderMac.cpp:
1286         (WebCore::AudioFileReader::createBus):
1287         (WebCore::createBusFromAudioFile):
1288         (WebCore::createBusFromInMemoryAudioFile):
1289         * platform/audio/mac/AudioFileReaderMac.h:
1290         (AudioFileReader):
1291         * platform/audio/qt/AudioBusQt.cpp:
1292         (WebCore::AudioBus::loadPlatformResource):
1293
1294 2013-05-08  Eli Fidler  <efidler@blackberry.com>
1295
1296         [BlackBerry] Fix usage of BlackBerry::Platform::String
1297         https://bugs.webkit.org/show_bug.cgi?id=115781
1298
1299         Reviewed by Rob Buis.
1300
1301         BlackBerry PRs 304193 and 327181
1302         Internally Reviewed by Mike Lattanzio, Arvid Nilsson, Joe Mason, Jeff Rogers, and George Staikos
1303
1304         We currently have a problem where we're passing UTF-8 encoded data into
1305         the char* constructors of BlackBerry::Platform::String. This means the string
1306         thinks its data is not UTF-8.
1307
1308         * platform/blackberry/ClipboardBlackBerry.cpp:
1309         (WebCore::ClipboardBlackBerry::setData):
1310         (WebCore::ClipboardBlackBerry::writeURL):
1311         (WebCore::ClipboardBlackBerry::writePlainText):
1312         * platform/blackberry/CookieManager.cpp:
1313         (WebCore::CookieManager::getRawCookies):
1314         (WebCore::CookieManager::getBackingStoreCookies):
1315         * platform/blackberry/CookieParser.cpp:
1316         (WebCore::CookieParser::CookieParser):
1317         (WebCore::CookieParser::parseOneCookie):
1318         * platform/blackberry/CursorBlackBerry.cpp:
1319         (WebCore::Cursor::Cursor):
1320         * platform/blackberry/PlatformBlob.cpp:
1321         (WebCore::PlatformBlob::nextDataItem):
1322         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp:
1323         (WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystemOnMainThread):
1324         (WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystemOnMainThread):
1325         (WebCore::WorkerAsyncFileSystemBlackBerry::moveOnMainThread):
1326         (WebCore::WorkerAsyncFileSystemBlackBerry::copyOnMainThread):
1327         (WebCore::WorkerAsyncFileSystemBlackBerry::removeOnMainThread):
1328         (WebCore::WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread):
1329         (WebCore::WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread):
1330         (WebCore::WorkerAsyncFileSystemBlackBerry::createFileOnMainThread):
1331         (WebCore::WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread):
1332         (WebCore::WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread):
1333         (WebCore::WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread):
1334         (WebCore::WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread):
1335         (WebCore::WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread):
1336         (WebCore::WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread):
1337         * platform/graphics/blackberry/ImageBlackBerry.cpp:
1338         (WebCore::Image::loadPlatformResource):
1339         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1340         (WebCore::MediaPlayerPrivate::load):
1341         (WebCore::MediaPlayerPrivate::notifyChallengeResult):
1342         (WebCore::toWebMediaStreamSource):
1343         (WebCore::toWebMediaStreamDescriptor):
1344         * platform/network/blackberry/NetworkManager.cpp:
1345         (WebCore::NetworkManager::startJob):
1346         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
1347         (WebCore::SocketStreamHandle::SocketStreamHandle):
1348         * platform/network/blackberry/rss/RSSFilterStream.cpp:
1349         (WebCore::RSSFilterStream::notifyStatusReceived):
1350         (WebCore::RSSFilterStream::notifyHeadersReceived):
1351         (WebCore::RSSFilterStream::convertContentToHtml):
1352         (WebCore::RSSFilterStream::charset):
1353         (WebCore::RSSFilterStream::removeHeader):
1354         (WebCore::RSSFilterStream::updateHeader):
1355         (WebCore::RSSFilterStream::updateRSSHeaders):
1356         * platform/network/blackberry/rss/RSSFilterStream.h:
1357         * platform/text/blackberry/StringBlackBerry.cpp:
1358         (WTF::String::operator BlackBerry::Platform::String):
1359
1360 2013-05-08  Anders Carlsson  <andersca@apple.com>
1361
1362         Assert at compile time that we don't pass Objective-C object pointers to adoptCF
1363         https://bugs.webkit.org/show_bug.cgi?id=115823
1364
1365         Reviewed by Geoffrey Garen.
1366
1367         * platform/graphics/ca/mac/TileController.mm:
1368         (WebCore::TileController::TileController):
1369         Use adoptNS for CALayer.
1370
1371 2013-05-08  Eric Carlson  <eric.carlson@apple.com>
1372
1373         TextTrackCue should support empty content
1374         https://bugs.webkit.org/show_bug.cgi?id=115821
1375
1376         Reviewed by Jer Noble.
1377
1378         Test: media/track/track-cue-empty-text-crash.html
1379
1380         * html/shadow/MediaControlElements.cpp:
1381         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Don't bother trying to render
1382             cues with no content.
1383
1384         * html/track/TextTrackCue.cpp:
1385         (WebCore::TextTrackCue::getCueAsHTML): Return early if there isn't a node tree.
1386         (WebCore::TextTrackCue::createCueRenderingTree): Ditto.
1387         (WebCore::TextTrackCue::determineTextDirection): Ditto.
1388         (WebCore::TextTrackCue::updateDisplayTree): Return early if there isn't a cue rendering tree.
1389
1390 2013-05-08  Roger Fong  <roger_fong@apple.com>
1391
1392         Unreviewed AppleWin build fix.
1393
1394         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1395         (MediaPlayerPrivateAVFoundationCF):
1396         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack):
1397
1398 2013-05-08  José Dapena Paz  <jdapena@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
1399
1400         [GTK] Plumb the Automake build system for the Battery Status API feature
1401         https://bugs.webkit.org/show_bug.cgi?id=115718
1402
1403         Reviewed by Martin Robinson.
1404
1405         No new tests - no new functionality. The feature is not enabled yet, though all the relevant tests
1406         pass when it is.
1407
1408         * GNUmakefile.am: Add the Modules/battery directory to the list of search paths for header inclusions.
1409         Include the same directory under the IDL_PATH variable so the IDL files it contains are processed.
1410         List these IDL files using a wildcard under the EXTRA_DIST list.
1411         * GNUmakefile.list.am: Add the build targets for the module source files, IDLs and resulting JS bindings.
1412         * bindings/gobject/GNUmakefile.am: Add the build targets for the GObject DOM bindings.
1413
1414 2013-05-08  Roger Fong  <roger_fong@apple.com>
1415
1416         Unreviewed. AppleWin VS2010 build fix.
1417
1418         * WebCore.vcxproj/WebCore.vcxproj:
1419         * WebCore.vcxproj/WebCore.vcxproj.filters:
1420
1421 2013-05-08  Darin Adler  <darin@apple.com>
1422
1423         REGRESSION(r149700): fast/css-generated-content/close-quote-negative-depth.html
1424         https://bugs.webkit.org/show_bug.cgi?id=115776
1425
1426         Reviewed by Anders Carlsson.
1427
1428         I changed depth to more closely match what is in the CSS3 specification.
1429         There may be a more optimal way to make it work, but this seems the most straightforward.
1430
1431         * rendering/RenderQuote.cpp:
1432         (WebCore::RenderQuote::RenderQuote): Initialize m_depth to -1 because that depth
1433         is consistent with the empty string that is the initial value of the text. The
1434         real depth will be calculated when the node is attached.
1435         (WebCore::RenderQuote::originalText): Removed the "depth - 1" logic that
1436         used to be done for close quotes. Instead, the updateDepth function now correctly
1437         subtracts one for the close quote itself, not just afterward. Also added an early
1438         exit when the depth is negative; these changes together fix the bug.
1439         (WebCore::RenderQuote::attachQuote): Added a call to updateDepth even for the render
1440         quote head, we now need that to set the depth either to 0 or to -1.
1441         (WebCore::RenderQuote::detachQuote): Removed code to set m_depth to 0;  if we are not
1442         resetting the text then m_depth should be left matching the text, otherwise updateDepth
1443         might not do its job correctly if the quote is later re-attached. What matters is that
1444         m_depth and the text are in sync.
1445         (WebCore::RenderQuote::updateDepth): Changed updating logic in two ways. First,
1446         compute the depth in a local variable rather than computing it in a data member
1447         after first saving off the old value of the data member. That's clearer style.
1448         Second, add the code to change negative depths to zero when propagating to the
1449         next quote in the chain, which matches how the standard is written, and decrement
1450         the depth of the close quote itself, not the quote after the close quote.
1451
1452 2013-05-08  Eric Carlson  <eric.carlson@apple.com>
1453
1454         Prevent crash when track is deleted during video element deletion.
1455         https://bugs.webkit.org/show_bug.cgi?id=106183
1456
1457         Reviewed by Dean Jackson.
1458
1459         Test: media/track/track-remove-crash.html
1460
1461         * html/HTMLMediaElement.cpp:
1462         (WebCore::HTMLMediaElement::removedFrom): Set m_inActiveDocument to false so we
1463             do not process text track cues or dispatch related events.
1464
1465 2013-05-08  Eric Carlson  <eric.carlson@apple.com>
1466
1467         [Mac] Unreviewed buildfix after r149741.
1468
1469         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1470         (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible):
1471
1472 2013-05-08  Eric Carlson  <eric.carlson@apple.com>
1473
1474         [Mac] Inband text tracks are not in track menu on Lion
1475         https://bugs.webkit.org/show_bug.cgi?id=115740
1476
1477         Reviewed by Dean Jackson.
1478
1479         No new tests, covered by existing tests.
1480
1481         * html/HTMLMediaElement.cpp:
1482         (WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_legacyWebKitClosedCaptionsVisible.
1483         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Set m_closedCaptionsVisible
1484             to false immediately, it will be reset to the appropriate value if necessary.
1485         (WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Remove m_legacyWebKitClosedCaptionsVisible.
1486         (WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Remove m_legacyWebKitClosedCaptionsVisible.
1487         * html/HTMLMediaElement.h:
1488
1489         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Remove 
1490             HAVE(AVFOUNDATION_TEXT_TRACK_SUPPORT) requirement. AVFOUNDATION_TEXT_TRACK_SUPPORT ->
1491             AVFOUNDATION_MEDIA_SELECTION_GROUP
1492         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Ditto.
1493
1494         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: 
1495         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Ditto.
1496         (WebCore::MediaPlayerPrivateAVFoundation::seek): Ditto.
1497         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
1498         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Ditto.
1499         (WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged): Ditto.
1500         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:  Ditto.
1501
1502         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:  Ditto.
1503         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
1504         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::kind): Don't look at media characteristics, 
1505             a legacy CC track is always Captions.
1506         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::isClosedCaptions): Ditto.
1507         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::containsOnlyForcedSubtitles): Ditto.
1508         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::isMainProgramContent): Ditto.
1509         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::isEasyToRead): Ditto.
1510         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label): Use different AVFoundation API on 10.7.
1511         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1512
1513         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1514         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): AVFOUNDATION_TEXT_TRACK_SUPPORT ->
1515             AVFOUNDATION_MEDIA_SELECTION_GROUP.
1516         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
1517         (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Do nothing. AVFOUNDATION_TEXT_TRACK_SUPPORT ->
1518             AVFOUNDATION_MEDIA_SELECTION_GROUP.
1519         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Support legacy CC tracks
1520             only on 10.8. AVFOUNDATION_TEXT_TRACK_SUPPORT -> AVFOUNDATION_MEDIA_SELECTION_GROUP
1521         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Ditto.
1522         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Ditto.
1523         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): AVFOUNDATION_TEXT_TRACK_SUPPORT -> 
1524             AVFOUNDATION_MEDIA_SELECTION_GROUP
1525
1526 2013-05-08  Sergio Villar Senin  <svillar@igalia.com>
1527
1528         Allow blank spaces before colon (:) on CSS variable definition
1529         https://bugs.webkit.org/show_bug.cgi?id=115802
1530
1531         Reviewed by Darin Adler.
1532
1533         Test: css3/css-variable-definition.html
1534
1535         Modified the grammar to allow blank spaces before the colon on CSS
1536         variable definitions.
1537
1538         * css/CSSGrammar.y.in:
1539
1540 2013-05-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1541
1542         [GStreamer] Does memory buffering even with preload set to none
1543         https://bugs.webkit.org/show_bug.cgi?id=115754
1544
1545         Reviewed by Philippe Normand.
1546
1547         Covered by existing tests.
1548
1549         Revision 148840 fixed on-disk buffering being done when preload is set to none,
1550         but memory buffering is still being done. That is because setting the state to
1551         paused causes GStreamer to start loading the media, to gather information. Only
1552         doing that when committing the load avoids that while maintaining the tested
1553         behaviour unchanged.
1554
1555         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1556         (WebCore::MediaPlayerPrivateGStreamer::load): move setting pause state to commitLoad.
1557         (WebCore::MediaPlayerPrivateGStreamer::commitLoad): see above.
1558
1559 2013-05-08  Andreas Kling  <akling@apple.com>
1560
1561         SVGStyledElement::getPresentationAttribute() does not need to be virtual.
1562
1563         From Blink r149888 by <cevans@chromium.org>
1564         <http://src.chromium.org/viewvc/blink?view=revision&revision=149888>
1565
1566         * svg/SVGStyledElement.h:
1567
1568 2013-05-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1569
1570         Crash when loading link to audio file
1571         https://bugs.webkit.org/show_bug.cgi?id=115794
1572
1573         Reviewed by Jocelyn Turcotte.
1574
1575         Do not access a null pointer frame.
1576
1577         * loader/appcache/ApplicationCacheHost.cpp:
1578         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
1579
1580 2013-05-08  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1581
1582         Remove unused [TransferList] extended attribute
1583         https://bugs.webkit.org/show_bug.cgi?id=115788
1584
1585         Reviewed by Kentaro Hara.
1586
1587         Remove [TransferList] extended attribute and corresponding tests as it has no
1588         effect on the generated JSC bindings.
1589
1590         No new tests, no behavior change.
1591
1592         * bindings/scripts/IDLAttributes.txt:
1593         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
1594         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
1595         (WebDOMTestSerializedScriptValueInterface):
1596         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
1597         * bindings/scripts/test/CPP/WebDOMTestTypedefs.h:
1598         (WebDOMTestTypedefs):
1599         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1600         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
1601         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
1602         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
1603         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1604         (WebCore):
1605         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
1606         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1607         (JSTestSerializedScriptValueInterfacePrototype):
1608         (JSTestSerializedScriptValueInterfaceConstructor):
1609         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1610         (WebCore):
1611         * bindings/scripts/test/JS/JSTestTypedefs.h:
1612         (WebCore):
1613         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
1614         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
1615         * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
1616         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
1617         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
1618         * bindings/scripts/test/TestTypedefs.idl:
1619
1620 2013-05-08  Dongseong Hwang  <dongseong.hwang@intel.com>
1621
1622         Make optional arguments in CanvasRenderingContext2D match the spec.
1623         https://bugs.webkit.org/show_bug.cgi?id=115723
1624
1625         Reviewed by Dean Jackson.
1626
1627         WebKit r98985 set many arguments optional although the canvas spec[1] does not
1628         indicate. So this patch corrects CanvasRenderingContext2D.idl to match the spec.
1629
1630         [1] http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/
1631
1632         Covered by existing tests:
1633           canvas/philip/tests/2d.missingargs.html
1634           fast/canvas/canvas-overloads-strokeRect.html
1635           inspector/profiler/canvas2d/canvas2d-profiler-capturing-basics.html
1636
1637         * html/canvas/CanvasRenderingContext2D.idl:
1638
1639 2013-05-08  Ryosuke Niwa  <rniwa@webkit.org>
1640
1641         Remove unused method and de-virtualize others in Element.h
1642         https://bugs.webkit.org/show_bug.cgi?id=115770
1643
1644         Reviewed by Andreas Kling.
1645
1646         Merge https://chromium.googlesource.com/chromium/blink/+/c2c2ff9cb69f46f5cc9d289b2bfbdb8ab5bd3e49
1647
1648         The de-virtualization possibilities were noted whilst "FINALizing" the Node
1649         hierarchy. If a method is successfully marked FINAL but then fails when marked
1650         OVERRIDE as well, the method by definition does not need to be virtual.
1651
1652         * WebCore.exp.in:
1653         * dom/Element.h:
1654         (WebCore::Element::hasAuthorShadowRoot):
1655
1656 2013-05-06  Darin Adler  <darin@apple.com>
1657
1658         Use adoptCF and adoptNS in more places
1659         https://bugs.webkit.org/show_bug.cgi?id=115657
1660
1661         Reviewed by Sam Weinig.
1662
1663         This is similar to my last set of changes, but covers code that I missed with
1664         global replace using the Safari Xcode workspace.
1665
1666         * platform/cf/win/CertificateCFWin.cpp:
1667         (WebCore::copyCertificateToData):
1668         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1669         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
1670         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
1671         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
1672         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
1673         (WebCore::MediaPlayerPrivateAVFoundationCF::totalBytes):
1674         (WebCore::mimeTypeCache):
1675         (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged):
1676         (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged):
1677         (WebCore::AVFWrapper::createAssetForURL):
1678         (WebCore::AVFWrapper::createPlayer):
1679         (WebCore::AVFWrapper::createPlayerItem):
1680         (WebCore::AVFWrapper::setAsset):
1681         (WebCore::AVFWrapper::platformLayer):
1682         (WebCore::AVFWrapper::createAVCFVideoLayer):
1683         (WebCore::AVFWrapper::createImageGenerator):
1684         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
1685         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::language):
1686         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
1687         (toCACFTimingFunction):
1688         (PlatformCAAnimation::PlatformCAAnimation):
1689         (PlatformCAAnimation::setFromValue):
1690         (PlatformCAAnimation::setToValue):
1691         (PlatformCAAnimation::setValues):
1692         (PlatformCAAnimation::setKeyTimes):
1693         (PlatformCAAnimation::setTimingFunctions):
1694         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1695         (PlatformCALayer::PlatformCALayer):
1696         (PlatformCALayer::setBackgroundColor):
1697         (PlatformCALayer::setBorderColor):
1698         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1699         (PlatformCALayerWinInternal::PlatformCALayerWinInternal):
1700         (PlatformCALayerWinInternal::addTile):
1701         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
1702         (WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost):
1703         * platform/graphics/gstreamer/PlatformVideoWindowMac.mm:
1704         (PlatformVideoWindow::PlatformVideoWindow):
1705         * platform/graphics/win/FontCustomPlatformData.cpp:
1706         (WebCore::FontCustomPlatformData::fontPlatformData):
1707         * platform/graphics/win/FontPlatformDataCGWin.cpp:
1708         (WebCore::getPostScriptName):
1709         (WebCore::FontPlatformData::platformDataInit):
1710         * platform/graphics/win/GraphicsContextCGWin.cpp:
1711         (WebCore::GraphicsContext::drawWindowsBitmap):
1712         * platform/graphics/win/ImageCGWin.cpp:
1713         (WebCore::BitmapImage::create):
1714         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
1715         (WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
1716         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1717         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::rfc2616DateStringFromTime):
1718         (WebCore::QTCFDictionaryCreateWithDataCallback):
1719         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
1720         * platform/graphics/win/WKCAImageQueue.cpp:
1721         (WebCore::WKCAImageQueue::WKCAImageQueue):
1722         * platform/image-decoders/ImageDecoder.h:
1723         (WebCore::ImageDecoder::qcmsOutputDeviceProfile):
1724         * platform/network/cf/AuthenticationCF.cpp:
1725         (WebCore::core):
1726         * platform/network/cf/CookieJarCFNet.cpp:
1727         (WebCore::cookieDomain):
1728         (WebCore::cookieName):
1729         (WebCore::cookiePath):
1730         (WebCore::cookieValue):
1731         (WebCore::filterCookies):
1732         (WebCore::setCookiesFromDOM):
1733         (WebCore::cookiesForDOM):
1734         (WebCore::cookieRequestHeaderFieldValue):
1735         (WebCore::getRawCookies):
1736         (WebCore::deleteCookie):
1737         (WebCore::getHostnamesWithCookies):
1738         (WebCore::deleteCookiesForHostname):
1739         * platform/network/curl/ResourceHandleManager.cpp:
1740         (WebCore::certificatePath):
1741         * platform/win/ClipboardUtilitiesWin.cpp:
1742         (WebCore::urlFromPath):
1743         (WebCore::getURL):
1744         * platform/win/LocalizedStringsWin.cpp:
1745         (WebCore::createWebKitBundle):
1746         (WebCore::localizedString):
1747         * platform/win/SearchPopupMenuWin.cpp:
1748         (WebCore::SearchPopupMenuWin::saveRecentSearches):
1749         (WebCore::SearchPopupMenuWin::loadRecentSearches):
1750         * plugins/mac/PluginPackageMac.cpp:
1751         (WebCore::stringListFromResourceId):
1752         (WebCore::PluginPackage::fetchInfo):
1753         (WebCore::PluginPackage::load):
1754         * plugins/mac/PluginViewMac.mm:
1755         (WebCore::PluginView::platformStart):
1756         * rendering/RenderThemeSafari.cpp:
1757         (WebCore::RenderThemeSafari::platformFocusRingColor):
1758         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
1759         (WebCore::RenderThemeSafari::paintSliderTrack):
1760         Use adoptCF and adoptNS throughout.
1761
1762 2013-05-07  Benjamin Poulain  <bpoulain@apple.com>
1763
1764         Make CanvasStyle's CMYKAValues allocated on the heap and move the pointer in the union.
1765         https://bugs.webkit.org/show_bug.cgi?id=115764
1766
1767         Reviewed by Andreas Kling.
1768
1769         CMYKA input is uncommon enough that we should not pay the price for
1770         every CanvasStyle.
1771         Make those values heap allocated and put the pointer in the union. Since
1772         the RGBA32 values are needed for CMYKA, a RGBA32 value is added to the structure.
1773
1774         * html/canvas/CanvasStyle.cpp:
1775         (WebCore::CanvasStyle::CanvasStyle):
1776         (WebCore::CanvasStyle::~CanvasStyle):
1777         (WebCore::CanvasStyle::isEquivalentColor):
1778         (WebCore::CanvasStyle::isEquivalentCMYKA):
1779         (WebCore::CanvasStyle::applyStrokeColor):
1780         (WebCore::CanvasStyle::applyFillColor):
1781         * html/canvas/CanvasStyle.h:
1782         (CanvasStyle):
1783         (CMYKAValues):
1784         (WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
1785         (WebCore::CanvasStyle::color):
1786         (WebCore):
1787
1788 2013-05-07  Darin Adler  <darin@apple.com>
1789
1790         Use OwnPtr instead of deleteAllValues for requests in PluginView
1791         https://bugs.webkit.org/show_bug.cgi?id=115731
1792
1793         Reviewed by Sam Weinig.
1794
1795         * plugins/PluginView.cpp:
1796         (WebCore::PluginView::~PluginView): Removed the call to deleteAllValues.
1797         (WebCore::PluginView::requestTimerFired): Use release to remove an OwnPtr
1798         from m_requests rather than an explicit delete. Also use !isEmpty instead
1799         of size > 0.
1800         (WebCore::PluginView::scheduleRequest): Changed argument type to PassOwnPtr.
1801         (WebCore::PluginView::load): Use adoptPtr to call scheduleRequest.
1802
1803         * plugins/PluginView.h: Changed argument type of scheduleRequest to
1804         PassOwnPtr, and m_requests to a Vector<OwnPtr>.
1805
1806 2013-05-07  Antti Koivisto  <antti@apple.com>
1807
1808         Remove SelectRuleFeatureSet
1809         https://bugs.webkit.org/show_bug.cgi?id=115757
1810
1811         Reviewed by Benjamin Poulain.
1812
1813         This is dead code.
1814
1815         * CMakeLists.txt:
1816         * GNUmakefile.list.am:
1817         * Target.pri:
1818         * WebCore.exp.in:
1819         * WebCore.vcproj/WebCore.vcproj:
1820         * WebCore.xcodeproj/project.pbxproj:
1821         * dom/Element.cpp:
1822         (WebCore::Element::attributeChanged):
1823         (WebCore):
1824         (WebCore::Element::didAffectSelector):
1825         * dom/Element.h:
1826         (Element):
1827         * dom/ElementShadow.h:
1828         (WebCore::ElementShadow::invalidateDistribution):
1829         * html/shadow/ContentDistributor.cpp:
1830         (WebCore::ContentDistributor::ContentDistributor):
1831         (WebCore):
1832         * html/shadow/ContentDistributor.h:
1833         (ContentDistributor):
1834         * html/shadow/InsertionPoint.cpp:
1835         (WebCore::InsertionPoint::insertedInto):
1836         (WebCore::InsertionPoint::removedFrom):
1837         * html/shadow/InsertionPoint.h:
1838         (InsertionPoint):
1839         * html/shadow/SelectRuleFeatureSet.cpp: Removed.
1840         * html/shadow/SelectRuleFeatureSet.h: Removed.
1841         * testing/Internals.cpp:
1842         (WebCore):
1843         * testing/Internals.idl:
1844
1845 2013-05-07  Anders Carlsson  <andersca@apple.com>
1846
1847         Store the quotes in the same allocation as the QuotesData object
1848         https://bugs.webkit.org/show_bug.cgi?id=115768
1849
1850         Reviewed by Andreas Kling.
1851
1852         Since the QuotesData object is immutable we don't need a Vector to store the quote pairs,
1853         they can just be stored after the class data.
1854
1855         * rendering/style/QuotesData.cpp:
1856         (WebCore::sizeForQuotesDataWithQuoteCount):
1857         Helper function for computing the allocation size.
1858
1859         (WebCore::QuotesData::create):
1860         Use fastMalloc + placement new.
1861
1862         (WebCore::QuotesData::QuotesData):
1863         Use placement new to allocate the quote pairs.
1864
1865         (WebCore::QuotesData::~QuotesData):
1866         Destroy the quote pairs.
1867
1868         (WebCore::QuotesData::openQuote):
1869         Stop using Vector.
1870
1871         (WebCore::QuotesData::closeQuote):
1872         Ditto.
1873
1874         (WebCore::operator==):
1875         Ditto.
1876
1877         * rendering/style/QuotesData.h:
1878
1879 2013-05-07  Benjamin Poulain  <bpoulain@apple.com>
1880
1881         We should not ref() the RefPtr twice in CanvasStyle
1882
1883         Reviewed by Darin Adler.
1884
1885         * html/canvas/CanvasStyle.cpp:
1886         (WebCore::CanvasStyle::CanvasStyle):
1887         We leak the ref of PassRefPtr, we should not ref() it a second time.
1888
1889 2013-05-07  Ryosuke Niwa  <rniwa@webkit.org>
1890
1891         Devirtualize Document class type checking
1892         https://bugs.webkit.org/show_bug.cgi?id=115755
1893
1894         Reviewed by Benjamin Poulain.
1895
1896         Merge https://chromium.googlesource.com/chromium/blink/+/dae5adc768d5ce6bff301df6515745da8ea24950
1897
1898         Document has a bunch of virtual bool is*Document() methods on it, but it also has
1899         two bools for XHTML and HTML documents which is silly. We can merge them all
1900         together into an enum of values and devirtualize the type checking methods.
1901
1902         * dom/Document.cpp:
1903         (WebCore::Document::Document):
1904         (WebCore::Document::createElement):
1905         * dom/Document.h:
1906         (WebCore::Document::create):
1907         (WebCore::Document::createXHTML):
1908         (WebCore::Document::isHTMLDocument):
1909         (WebCore::Document::isXHTMLDocument):
1910         (WebCore::Document::isImageDocument):
1911         (WebCore::Document::isSVGDocument):
1912         (WebCore::Document::isPluginDocument):
1913         (WebCore::Document::isMediaDocument):
1914         (WebCore::Document):
1915         * html/HTMLDocument.cpp:
1916         (WebCore::HTMLDocument::HTMLDocument):
1917         * html/HTMLDocument.h:
1918         (WebCore::HTMLDocument):
1919         * html/ImageDocument.cpp:
1920         (WebCore::ImageDocument::ImageDocument):
1921         * html/ImageDocument.h:
1922         (WebCore::ImageDocument):
1923         * html/MediaDocument.cpp:
1924         (WebCore::MediaDocument::MediaDocument):
1925         * html/MediaDocument.h:
1926         (WebCore::MediaDocument):
1927         * html/PluginDocument.cpp:
1928         (WebCore::PluginDocument::PluginDocument):
1929         * html/PluginDocument.h:
1930         (WebCore::PluginDocument):
1931         * loader/PlaceholderDocument.h:
1932         (WebCore::PlaceholderDocument::PlaceholderDocument):
1933         * svg/SVGDocument.cpp:
1934         (WebCore::SVGDocument::SVGDocument):
1935         * svg/SVGDocument.h:
1936         (WebCore::SVGDocument):
1937
1938 2013-05-07  Anders Carlsson  <andersca@apple.com>
1939
1940         Begin unraveling the mess that is QuotesData
1941         https://bugs.webkit.org/show_bug.cgi?id=115765
1942
1943         Reviewed by Andreas Kling.
1944
1945         Change QuotesData to be an immutable object and fix other things that are broken.
1946
1947         * css/StyleResolver.cpp:
1948         (WebCore::StyleResolver::applyProperty):
1949         QuotesData::addPair is gone. Instead, create the Vector up front and pass it to QuotesData.
1950
1951         * rendering/RenderQuote.cpp:
1952         (WebCore::RenderQuote::originalText):
1953         Update for renames.
1954
1955         * rendering/style/QuotesData.cpp:
1956         (WebCore::QuotesData::create):
1957         Remove the create overload that wasn't used. Add a new create overload that takes a Vector.
1958
1959         (WebCore::QuotesData::openQuote):
1960         Rename this from getOpenQuote and clean it up.
1961
1962         (WebCore::QuotesData::closeQuote):
1963         Rename this from getCloseQuote and clean it up.
1964
1965         (WebCore::operator==):
1966         Replace the equals member function with a proper equality operator.
1967
1968         * rendering/style/RenderStyle.cpp:
1969         (WebCore::RenderStyle::diff):
1970         Stop calling QuotesData::equals. Use the same idiom as used for other properties.
1971
1972         (WebCore::RenderStyle::setQuotes):
1973         * rendering/style/StyleRareInheritedData.cpp:
1974         Use operator==.
1975
1976         (WebCore::quotesDataEquivalent):
1977         Add helper function.
1978
1979         (WebCore::StyleRareInheritedData::operator==):
1980         Call quotesDataEquivalent.
1981
1982 2013-05-06  Enrica Casucci  <enrica@apple.com>
1983
1984         Support -webkit-system-font on OS X.
1985         https://bugs.webkit.org/show_bug.cgi?id=115758
1986         <rdar://problem/13433854>
1987
1988         Reviewed by Dean Jackson.
1989
1990         Test: platform/mac/fast/text/systemFont.html
1991
1992         * platform/mac/WebFontCache.mm:
1993         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
1994
1995 2013-05-07  Benjamin Poulain  <bpoulain@apple.com>
1996
1997         Move CanvasGradient and CanvasPattern in the union of CanvasStyle
1998         https://bugs.webkit.org/show_bug.cgi?id=115759
1999
2000         Reviewed by Andreas Kling.
2001
2002         The Gradient and Pattern are exclusive with the other values, but they
2003         were left out of the union because they are ref-counted.
2004
2005         This patch moves them in the union, and simply does the ref-counting manually.
2006
2007         * html/canvas/CanvasStyle.cpp:
2008         (WebCore::CanvasStyle::CanvasStyle):
2009         (WebCore::CanvasStyle::~CanvasStyle):
2010         * html/canvas/CanvasStyle.h:
2011         (CanvasStyle):
2012         (WebCore::CanvasStyle::canvasGradient):
2013         (WebCore::CanvasStyle::canvasPattern):
2014
2015 2013-05-07  Anders Carlsson  <andersca@apple.com>
2016
2017         Remove custom allocator support from PODArena
2018         https://bugs.webkit.org/show_bug.cgi?id=115762
2019
2020         Reviewed by Andreas Kling.
2021
2022         Nobody uses PODArena with a custom allocator, so just get rid of it and always use fastMalloc/fastFree.
2023
2024         * platform/PODArena.h:
2025         (WebCore::PODArena::PODArena):
2026         (WebCore::PODArena::allocateBase):
2027         (WebCore::PODArena::Chunk::Chunk):
2028         (WebCore::PODArena::Chunk::~Chunk):
2029         (Chunk):
2030         * platform/PODFreeListArena.h:
2031         (WebCore::PODFreeListArena::allocate):
2032         (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
2033
2034 2013-05-07  Anders Carlsson  <andersca@apple.com>
2035
2036         Clean up KeyframeValueList and related classes
2037         https://bugs.webkit.org/show_bug.cgi?id=115738
2038
2039         Reviewed by Simon Fraser.
2040
2041         Add static create() functions to the AnimationValue subclasses, and change a bunch of parameters
2042         and return values that can never be null from pointer types to reference types to better indicate this.
2043
2044         * platform/graphics/GraphicsLayer.cpp:
2045         (WebCore::filterOperationsAt):
2046         (WebCore::GraphicsLayer::validateFilterOperations):
2047         (WebCore::operationsAt):
2048         (WebCore::GraphicsLayer::validateTransformOperations):
2049         * platform/graphics/GraphicsLayer.h:
2050         (AnimationValue):
2051         (WebCore::AnimationValue::AnimationValue):
2052         (WebCore::FloatAnimationValue::create):
2053         (FloatAnimationValue):
2054         (WebCore::FloatAnimationValue::FloatAnimationValue):
2055         (WebCore::TransformAnimationValue::create):
2056         (TransformAnimationValue):
2057         (WebCore::TransformAnimationValue::value):
2058         (WebCore::TransformAnimationValue::TransformAnimationValue):
2059         (WebCore::FilterAnimationValue::create):
2060         (WebCore::FilterAnimationValue::value):
2061         (WebCore::FilterAnimationValue::FilterAnimationValue):
2062         (FilterAnimationValue):
2063         (WebCore::KeyframeValueList::~KeyframeValueList):
2064         (KeyframeValueList):
2065         (WebCore::KeyframeValueList::at):
2066         * platform/graphics/ca/GraphicsLayerCA.cpp:
2067         (WebCore::animationHasStepsTimingFunction):
2068         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2069         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
2070         (WebCore::GraphicsLayerCA::timingFunctionForAnimationValue):
2071         (WebCore::GraphicsLayerCA::setAnimationEndpoints):
2072         (WebCore::GraphicsLayerCA::setAnimationKeyframes):
2073         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
2074         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
2075         (WebCore::GraphicsLayerCA::setFilterAnimationEndpoints):
2076         (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
2077         * platform/graphics/ca/GraphicsLayerCA.h:
2078         (GraphicsLayerCA):
2079         * rendering/RenderLayerBacking.cpp:
2080         (WebCore::RenderLayerBacking::startAnimation):
2081         (WebCore::RenderLayerBacking::startTransition):
2082
2083 2013-05-07  Anders Carlsson  <andersca@apple.com>
2084
2085         Add and remove databases and origins from the database tracker
2086         https://bugs.webkit.org/show_bug.cgi?id=115752
2087
2088         Reviewed by Andreas Kling.
2089
2090         Add symbols needed by WebKit2.
2091
2092         * WebCore.exp.in:
2093
2094 2013-05-07  Beth Dakin  <bdakin@apple.com>
2095
2096         Still possible to fire paint-related LayoutMilestones before CA has committed the 
2097         changes
2098         https://bugs.webkit.org/show_bug.cgi?id=115753
2099         -and corresponding-
2100         <rdar://problem/13822315>
2101
2102         Reviewed by Simon Fraser.
2103
2104         To ensure we wait for the CA commit, we should wait until the end of the runloop 
2105         with a zero-delay timer.
2106
2107         * rendering/RenderLayerCompositor.cpp:
2108         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2109         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2110         (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
2111         (WebCore):
2112         * rendering/RenderLayerCompositor.h:
2113         (RenderLayerCompositor):
2114
2115 2013-05-07  Chris Fleizach  <cfleizach@apple.com>
2116
2117         Bug 115694 - Fix bad cast to RenderHTMLCanvas
2118         https://bugs.webkit.org/show_bug.cgi?id=115694
2119
2120         Reviewed by Ryosuke Niwa.
2121
2122         Don't cast to RenderHTML until we check what kind of object it is.
2123
2124         * accessibility/AccessibilityRenderObject.cpp:
2125         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2126
2127 2013-05-07  Anders Carlsson  <andersca@apple.com>
2128
2129         The storage database tracker should know when databases come and go
2130         https://bugs.webkit.org/show_bug.cgi?id=115748
2131
2132         Reviewed by Andreas Kling.
2133
2134         Export symbol needed by WebKit2.
2135
2136         * WebCore.exp.in:
2137
2138 2013-05-07  Darin Adler  <darin@apple.com>
2139
2140         Use OwnPtr instead of deleteAllValues in SVGResourcesCache
2141         https://bugs.webkit.org/show_bug.cgi?id=115729
2142
2143         Reviewed by Benjamin Poulain.
2144
2145         * rendering/svg/SVGResourcesCache.cpp:
2146         (WebCore::SVGResourcesCache::~SVGResourcesCache): Removed call to deleteAllValues.
2147         (WebCore::SVGResourcesCache::addResourcesFromRenderObject): Use adoptPtr and release
2148         to create new SVGResources object.
2149         (WebCore::SVGResourcesCache::removeResourcesFromRenderObject): Use take to remove
2150         the SVGResources from the map rather than a get combined with delete/take.
2151         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Removed unneeded
2152         call to contains, since get already returns 0 if there is no item in the map.
2153         (WebCore::SVGResourcesCache::resourceDestroyed): Use typedef for the map type so
2154         we don't have to repeat the type.
2155
2156         * rendering/svg/SVGResourcesCache.h: Added typedef CacheMap, and changed value
2157         type to OwnPtr.
2158
2159 2013-05-07  Anders Carlsson  <andersca@apple.com>
2160
2161         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
2162         https://bugs.webkit.org/show_bug.cgi?id=115711
2163
2164         Reviewed by Andreas Kling.
2165
2166         Export SQLiteDatabase::close.
2167
2168         * WebCore.exp.in:
2169
2170 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
2171
2172         Add an 'isReadOnly' member to IDL parse tree structure
2173         https://bugs.webkit.org/show_bug.cgi?id=115704
2174
2175         Reviewed by Kentaro Hara.
2176
2177         Add an 'isReadOnly' member to IDL parse tree structure by merging
2178         https://chromium.googlesource.com/chromium/blink/+/d6add80ecd08bcd88a6ae0e1698d929830b3bd8b
2179         and update Objective-C, C++, and GObject binding generators to use isReadOnly.
2180
2181         * bindings/scripts/CodeGeneratorCPP.pm:
2182         (GenerateHeader):
2183         (GenerateImplementation):
2184         * bindings/scripts/CodeGeneratorGObject.pm:
2185         (GetWriteableProperties):
2186         (GenerateProperty):
2187         (GenerateFunctions):
2188         * bindings/scripts/CodeGeneratorJS.pm:
2189         (IsReadonly):
2190         * bindings/scripts/CodeGeneratorObjC.pm:
2191         (GenerateHeader):
2192         (GenerateImplementation):
2193         * bindings/scripts/IDLParser.pm:
2194         (parseAttributeRest):
2195         (parseExceptionField):
2196         (parseAttributeRestOld):
2197
2198 2013-05-07  Darin Adler  <darin@apple.com>
2199
2200         Use OwnPtr instead of deleteAllValues in SMILTimeContainer
2201         https://bugs.webkit.org/show_bug.cgi?id=115730
2202
2203         Reviewed by Geoffrey Garen.
2204
2205         * svg/animation/SMILTimeContainer.cpp:
2206         (WebCore::SMILTimeContainer::~SMILTimeContainer): Removed call to deleteAllValues.
2207         (WebCore::SMILTimeContainer::schedule): Use add instead of get/set to put a new
2208         AnimationsVector into the map as needed.
2209         (WebCore::SMILTimeContainer::setElapsed): Added get since values are OwnPtr now.
2210         (WebCore::SMILTimeContainer::updateAnimations): Ditto.
2211
2212         * svg/animation/SMILTimeContainer.h: Changed value type of GroupedAnimationsMap
2213         to OwnPtr instead of raw pointer.
2214
2215 2013-05-07  Anders Carlsson  <andersca@apple.com>
2216
2217         Remove AlwaysInline.h from WTF
2218         https://bugs.webkit.org/show_bug.cgi?id=115727
2219
2220         Reviewed by Brent Fulgham.
2221
2222         The macro that used to be in AlwaysInline.h is now in Compiler.h so there's no reason
2223         to keep AlwaysInline.h around anymore.
2224
2225         * WebCore.vcproj/WebCore.vcproj:
2226         * bindings/js/JSDOMWindowCustom.h:
2227         * bindings/scripts/CodeGeneratorJS.pm:
2228         (GenerateHeader):
2229         * platform/graphics/filters/FEConvolveMatrix.h:
2230         * rendering/InlineIterator.h:
2231         * rendering/InlineTextBox.cpp:
2232         * rendering/RenderBlockLineLayout.cpp:
2233         * rendering/RenderText.cpp:
2234
2235 2013-05-07  peavo@outlook.com  <peavo@outlook.com>
2236
2237         [Curl] POST requests sometimes fail.
2238         https://bugs.webkit.org/show_bug.cgi?id=111844
2239
2240         Reviewed by Brent Fulgham.
2241
2242         Curl adds the header 'Expect: 100-Continue' when sending a POST request.
2243         When we receive the header 'HTTP/1.1 100 Continue', we should not call
2244         ResourceHandleClient::didReceiveResponse(), as this will cancel the request,
2245         because the MIME type is empty in this case, causing the POST request to fail.
2246         This header is only sent as an info header, or provisional response.
2247         
2248         In addition, this patch changes the classification of http code 304 (Not modified).
2249         It is not reported as a redirect anymore, but as a response
2250         (ResourceHandleClient::didReceiveResponse() is called.
2251
2252         * platform/network/curl/ResourceHandleManager.cpp:
2253         (WebCore::isHttpInfo): Added helper method to determine if http code is http info.
2254         (WebCore::isHttpRedirect): Added helper method to determine if http code is http redirect.
2255         (WebCore::headerCallback): Just return when receiving the header'HTTP/1.1 100 Continue'.
2256
2257 2013-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2258
2259         [X11][BlackBerry] Check if MOZ_X11 is defined instead of XP_UNIX npruntime_internal.h
2260         https://bugs.webkit.org/show_bug.cgi?id=113687
2261
2262         Reviewed by Anders Carlsson.
2263
2264         It's assumed that all UNIX platforms use X11 for plugins, which is
2265         not the case of BlackBerry.
2266
2267         * bridge/npruntime_internal.h: Use MOZ_X11 instead of XP_UNIX.
2268
2269 2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2270
2271         HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
2272         https://bugs.webkit.org/show_bug.cgi?id=115646
2273
2274         Reviewed by Darin Adler.
2275
2276         No new tests, no new functionality.
2277
2278         * accessibility/AXObjectCache.cpp:
2279         (WebCore::AXObjectCache::get):
2280         (WebCore::AXObjectCache::remove):
2281         * accessibility/AXObjectCache.h:
2282         (WebCore::AXObjectCache::objectFromAXID):
2283         * css/CSSImageGeneratorValue.cpp:
2284         (WebCore::CSSImageGeneratorValue::getImage):
2285         * css/InspectorCSSOMWrappers.cpp:
2286         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
2287         * css/StyleResolver.cpp:
2288         (WebCore::StyleResolver::loadPendingSVGDocuments):
2289         * html/HTMLAnchorElement.cpp:
2290         (WebCore::HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown):
2291         * html/HTMLFormElement.cpp:
2292         (WebCore::HTMLFormElement::elementForAlias):
2293         * html/shadow/ContentDistributor.cpp:
2294         (WebCore::ContentDistributor::findInsertionPointFor):
2295         * loader/appcache/ApplicationCache.cpp:
2296         (WebCore::ApplicationCache::resourceForURL):
2297         * loader/archive/ArchiveResourceCollection.cpp:
2298         (WebCore::ArchiveResourceCollection::archiveResourceForURL):
2299         * page/PageGroup.cpp:
2300         (WebCore::PageGroup::transientLocalStorage):
2301         * page/animation/CompositeAnimation.cpp:
2302         (WebCore::CompositeAnimation::updateTransitions):
2303         (WebCore::CompositeAnimation::pauseTransitionAtTime):
2304         * platform/graphics/ca/GraphicsLayerCA.cpp:
2305         (WebCore::GraphicsLayerCA::updateMaskLayer):
2306         * platform/network/BlobRegistryImpl.cpp:
2307         (WebCore::BlobRegistryImpl::getBlobDataFromURL):
2308         * plugins/PluginDatabase.cpp:
2309         (WebCore::PluginDatabase::pluginForMIMEType):
2310         (WebCore::PluginDatabase::MIMETypeForExtension):
2311         * rendering/RenderCounter.cpp:
2312         (WebCore::makeCounterNode):
2313         (showCounterRendererTree):
2314         * svg/graphics/filters/SVGFilterBuilder.cpp:
2315         (WebCore::SVGFilterBuilder::getEffectById):
2316             Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
2317
2318 2013-05-06  Darin Adler  <darin@apple.com>
2319
2320         Use OwnPtr instead of deleteAllValues in KeyframeValueList
2321         https://bugs.webkit.org/show_bug.cgi?id=115652
2322
2323         Reviewed by Simon Fraser.
2324
2325         Also made a few related style fixes in the functions touched.
2326
2327         * platform/graphics/GraphicsLayer.cpp:
2328         (WebCore::KeyframeValueList::insert): Change argument type to PassOwnPtr
2329         and update use of m_values since it has OwnPtr now instead of raw pointer.
2330
2331         * platform/graphics/GraphicsLayer.h: Move conditional includes to a
2332         separate paragraph, removed an unneeded forward class declaration.
2333         (WebCore::AnimationValue::AnimationValue): Marked this constructor explicit
2334         and removed an unneeded if statement.
2335         (WebCore::AnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
2336         (WebCore::FloatAnimationValue::clone): Changed this to return a PassOwnPtr.
2337         (WebCore::TransformAnimationValue::TransformAnimationValue): Marked explicit.
2338         (WebCore::TransformAnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
2339         (WebCore::FilterAnimationValue::FilterAnimationValue): Marked explicit.
2340         (WebCore::FilterAnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
2341         (WebCore::KeyframeValueList::KeyframeValueList): Marked explicit.
2342         (WebCore::KeyframeValueList::~KeyframeValueList): Removed, since the default
2343         destructor works without an explicit deleteAllValues call.
2344         (WebCore::KeyframeValueList::at): Added call to get needed since the vector
2345         contains OwnPtr now.
2346         (WebCore::KeyframeValueList::insert): Changed to take PassOwnPtr and then
2347         removed now-redundant comment saying "takes ownership of the pointer".
2348         (WebCore::KeyframeValueList::m_values): Changed type to Vector<OwnPtr>.
2349
2350         * rendering/RenderLayerBacking.cpp:
2351         (WebCore::RenderLayerBacking::startAnimation): Added adoptPtr next to the
2352         all the places new was done before calling KeyframeValueList::insert. Also
2353         simplified the booleans and #if in this function.
2354         (WebCore::RenderLayerBacking::startTransition): Ditto.
2355
2356 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
2357
2358         [Replaceable] attributes must be readonly
2359         https://bugs.webkit.org/show_bug.cgi?id=115692
2360
2361         Reviewed by Kentaro Hara.
2362
2363         Merge https://chromium.googlesource.com/chromium/blink/+/ac61fbfe875d3c3c37d529683139ceb0ad4330bb.
2364
2365         Web IDL specification says [Replaceable] attributes are readonly:
2366         http://www.w3.org/TR/2012/CR-WebIDL-20120419/#Replaceable
2367
2368         Update the two instances of [Replaceable] in WebCore that didn't have readonly modifier to match
2369         the specifcation and the rest of WebCore. There should be no behavioral changes as the code generator
2370         already assumed [Replaceable] attributes are readonly.
2371
2372         * html/HTMLDocument.idl:
2373         * page/DOMWindow.idl:
2374
2375 2013-05-06  Darin Adler  <darin@apple.com>
2376
2377         Use OwnPtr instead of deleteAllValues in DocumentMarkerController
2378         https://bugs.webkit.org/show_bug.cgi?id=115655
2379
2380         Reviewed by Andreas Kling.
2381
2382         * dom/DocumentMarkerController.cpp:
2383         (WebCore::DocumentMarkerController::~DocumentMarkerController): Added here
2384         so the destructor isn't implicitly inline.
2385         (WebCore::DocumentMarkerController::detach): Removed now-unneeded code to
2386         call deleteAllValues. Also moved code to set m_possiblyExistingMarkerTypes
2387         to after clearing m_markers to be consistent with how other functions do it.
2388         (WebCore::DocumentMarkerController::addMarker): Changed code to use the
2389         add idiom to avoid double hash table lookup. Changed to use adoptPtr since
2390         the map now contains OwnPtr.
2391         (WebCore::DocumentMarkerController::removeMarkers): Removed explicit calls
2392         to delete list since removing the entry from the map now deletes the list.
2393         Moved the code to check if m_markers has become empty so it's only called
2394         when we actually remove something from m_markers.
2395         (WebCore::DocumentMarkerController::markerContainingPoint): Added get().
2396         (WebCore::DocumentMarkerController::renderedRectsForMarkers): Added get().
2397         (WebCore::DocumentMarkerController::removeMarkers): Changed to use a new
2398         interface to removeMarkersFromList. This eliminated the need to copy the
2399         entire map when removing markers; instead we can just copy the keys.
2400         (WebCore::DocumentMarkerController::removeMarkersFromList): Changed to use
2401         an iterator instead of being passed the key/value pair from the map. Also
2402         rearranged the logic so there is less repeated code and removed some now-
2403         unneeded comments.
2404         (WebCore::DocumentMarkerController::repaintMarkers): Added get().
2405         (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
2406         Added get().
2407         (WebCore::DocumentMarkerController::showMarkers): Added get().
2408
2409         * dom/DocumentMarkerController.h: Removed implementation of the destructor
2410         that called the detach function; that was just sharing the now-unneeded
2411         call to deleteAllValues. Changed the type of the map to use an OwnPtr for
2412         the value. Changed the interface of removeMarkersFromList to take a map
2413         iterator instead of a key/value pair.
2414
2415 2013-05-06  Beth Dakin  <bdakin@apple.com>
2416
2417         Reproducible crash in RenderBoxModelObject::adjustedPositionRelativeToOffsetParent()
2418         https://bugs.webkit.org/show_bug.cgi?id=115685
2419         -and corresponding-
2420         <rdar://problem/13700734>
2421
2422         Reviewed by Sam Weinig.
2423
2424         This fix here is just to rollout the change that caused this regression, which is 
2425         http://trac.webkit.org/changeset/147395 . That change was not intended to cause any 
2426         behavioral differences. The change made it so RenderObject::offsetParent() returned 
2427         an Element* instead of a RenderBoxModelObject*. However, can muddle things when the 
2428         object we are returning is a continuation. Multiple RenderObjects have the same 
2429         Element in a continuation, so this new code can lead to a crash in 
2430         adjustedPositionRelativeToOffsetParent() when we expect to walk the RenderObject 
2431         chain and find the offsetParent in the Element’s parent chain. But we might crash in 
2432         some complicated continuation scenarios because we lost this disambiguation of which 
2433         RenderObject to start with.
2434
2435         Roll out.
2436         * dom/Element.cpp:
2437         (WebCore::Element::offsetParent):
2438         * rendering/RenderBoxModelObject.cpp:
2439         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
2440         * rendering/RenderObject.cpp:
2441         (WebCore::RenderObject::offsetParent):
2442         * rendering/RenderObject.h:
2443         (RenderObject):
2444
2445 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
2446
2447         Unify ways to cache named item in HTMLCollections
2448         https://bugs.webkit.org/show_bug.cgi?id=115584
2449
2450         Reviewed by Antti Koivisto.
2451
2452         Refactor the code to share the same infrastructure for both id and name attributes maps.
2453
2454         Also get rid of shouldRegisterAsNamedItem and shouldRegisterAsExtraNamedItem from various Element subclasses
2455         as these member functions were duplicating the information in HTMLNameCollection.cpp. Nevertheless, HTMLImageElement
2456         and HTMLObjectElement still update HTMLDocument's window and document name getter maps when their presence as named
2457         item changes due to an attribute change and children changes respectively.
2458
2459         * bindings/js/JSDOMWindowCustom.cpp:
2460         (WebCore::namedItemGetter): Use windowNamedItemMap().containsSingle() instead of collection->hasExactlyOneItem() to
2461         avoid instantiating HTMLCollection until we know for sure we're returning multiple items.
2462         (WebCore::JSDOMWindow::getOwnPropertySlot): Call windowNamedItemMap().contains() instead of document->hasNamedItem()
2463         since the latter has been removed.
2464         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Ditto.
2465         (WebCore::JSDOMWindow::getOwnPropertyDescriptor): Ditto.
2466
2467         * bindings/js/JSHTMLDocumentCustom.cpp:
2468         (WebCore::JSHTMLDocument::canGetItemsForName): Call documentNamedItemMap().contains() instead of
2469         document->hasExtraNamedItem() since the latter has been removed.
2470         (WebCore::JSHTMLDocument::nameGetter): Use documentNamedItemMap().containsSingle() instead of
2471         collection->hasExactlyOneItem() to avoid instantiating HTMLCollection when we're returning the first item.
2472
2473         * dom/Document.cpp:
2474         (WebCore::Document::windowNamedItems): Instantiate WindowNameCollection, which is a subclass of HTMLNameCollection,
2475         instead of HTMLNameCollection since the latter class no longer has a public constructor.
2476         (WebCore::Document::documentNamedItems): Ditto; instantiate DocumentNameCollection.
2477
2478         * dom/DocumentOrderedMap.cpp:
2479         (WebCore::keyMatchesName): Added for name attribute.
2480         (WebCore::keyMatchesWindowNamedItem): Added for window name getter.
2481         (WebCore::keyMatchesDocumentNamedItem): Added for document name getter.
2482         (WebCore::DocumentOrderedMap::getElementByName): Added for name attribute.
2483         (WebCore::DocumentOrderedMap::getElementByWindowNamedItem): Added for window name getter.
2484         (WebCore::DocumentOrderedMap::getElementByDocumentNamedItem): Added for document name getter.
2485
2486         * dom/DocumentOrderedMap.h:
2487         (WebCore::DocumentOrderedMap::containsSingle): Added.
2488         (WebCore::DocumentOrderedMap::containsMultiple): Fixed the bug that containsMultiple returns true even when
2489         the duplicate count has been reduced to 1. Unfortunately this behavior change is not testable because the old code
2490         worked properly (though less efficient) even if this function returned a wrong value.
2491
2492         * dom/Element.cpp:
2493         (WebCore::Element::insertedInto):
2494         (WebCore::Element::removedFrom):
2495         (WebCore::Element::updateName): Added. Updates TreeScope's name attribute map as well as HTMLDocument's window name
2496         and document name maps.
2497         (WebCore::Element::updateId): Added the code to update HTMLDocument's window name and document name maps.
2498
2499         * dom/Element.h:
2500         (Element): Removed shouldRegisterAsNamedItem, shouldRegisterAsExtraNamedItem, updateNamedItemRegistration, and
2501         updateExtraNamedItemRegistration as they're no longer used.
2502
2503         * dom/TreeScope.cpp:
2504         (SameSizeAsTreeScope):
2505         (WebCore::TreeScope::getElementByName): Added.
2506         (WebCore::TreeScope::addElementByName): Added.
2507         (WebCore::TreeScope::removeElementByName): Added.
2508
2509         * dom/TreeScope.h:
2510         (WebCore::TreeScope::hasElementWithName): Added.
2511         (WebCore::TreeScope::containsMultipleElementsWithName): Added.
2512
2513         * html/HTMLAppletElement.h:
2514         (HTMLAppletElement):
2515
2516         * html/HTMLCollection.cpp:
2517         (WebCore::isMatchingElement): Use HTMLNameCollection subclasses' nodeMatches.
2518         (WebCore::HTMLCollection::namedItem): Added a fast path for named item.
2519         (WebCore::HTMLCollection::hasNamedItem): Use namedItem to avoid the work in the fast path.
2520
2521         * html/HTMLCollection.h:
2522         (HTMLCollection): Removed checkForNameMatch.
2523         * html/HTMLDocument.cpp:
2524         (WebCore): Removed various member functions related to m_namedItemCounts and m_extraNamedItemCounts.
2525
2526         * html/HTMLDocument.h:
2527         (WebCore::HTMLDocument::documentNamedItemMap): Added.
2528         (WebCore::HTMLDocument::windowNamedItemMap): Added.
2529         (HTMLDocument): Replaced m_namedItemCounts and m_extraNamedItemCounts by m_documentNamedItem and m_windowNamedItem.
2530         Note that they're not one to one.
2531
2532         * html/HTMLEmbedElement.h:
2533         (HTMLEmbedElement):
2534
2535         * html/HTMLFormElement.h:
2536         (HTMLFormElement):
2537
2538         * html/HTMLIFrameElement.cpp: Removed the code to track the element's name since we already do this in Element.
2539         (WebCore::HTMLIFrameElement::parseAttribute):
2540
2541         * html/HTMLIFrameElement.h:
2542         (HTMLIFrameElement):
2543
2544         * html/HTMLImageElement.cpp:
2545         (WebCore::HTMLImageElement::parseAttribute): Update the HTMLDocument's maps when the name attribute's existence
2546         changes its presence on window and document name getters in turn. This behavior change, again, appears to be
2547         untestable due to the old being more graceful when DocumentOrderedMap returned a wrong value.
2548
2549         * html/HTMLImageElement.h:
2550
2551         * html/HTMLNameCollection.cpp:
2552         (WebCore::HTMLNameCollection::HTMLNameCollection): No longer overrides itemAfter. This enables backwards traversals
2553         of the tree along with other optimizations in HTMLCollection.
2554
2555         (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Added. Used in Element::updateName to determine
2556         whether add() or remove() should be called on HTMLDocument's maps.
2557         (WebCore::WindowNameCollection::nodeMatches): Added.
2558
2559         (WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Added. Used in Element::updateName to determine
2560         whether add() or remove() should be called on HTMLDocument's maps.
2561         (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Ditto.
2562         (WebCore::DocumentNameCollection::nodeMatches): Added.
2563
2564         * html/HTMLNameCollection.h:
2565         (HTMLNameCollection): Removed create since this class shouldn't be instantiated on its own.
2566
2567         (WebCore::WindowNameCollection): Added.
2568         (WebCore::WindowNameCollection::create): Added.
2569         (WebCore::WindowNameCollection::nodeMatches): Added.
2570         (WebCore::WindowNameCollection::nodeMatchesIfIdAttributeMatch): Added.
2571         (WebCore::WindowNameCollection::WindowNameCollection): Added.
2572         (WebCore::DocumentNameCollection): Added.
2573         (WebCore::DocumentNameCollection::create): Added.
2574         (WebCore::DocumentNameCollection::nodeMatches): Added.
2575         (WebCore::DocumentNameCollection::DocumentNameCollection): Added.
2576
2577         * html/HTMLObjectElement.cpp:
2578         (WebCore::HTMLObjectElement::updateDocNamedItem): Update both window and document getter maps of HTMLDocument when
2579         the visibility of this element changes due to the DOM mutations in the subtree.
2580
2581         * html/HTMLObjectElement.h:
2582         (WebCore::HTMLObjectElement):
2583         (WebCore::toHTMLObjectElement): Added.
2584
2585 2013-05-06  Andreas Kling  <akling@apple.com>
2586
2587         Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
2588         <http://webkit.org/b/115674>
2589
2590         Reviewed by Alexey Proskuryakov.
2591
2592         Don't cache the Document::renderer() in a local since layout may blow it away.
2593
2594         * dom/Document.cpp:
2595         (WebCore::Document::implicitClose):
2596
2597 2013-05-06  Anders Carlsson  <andersca@apple.com>
2598
2599         More work on LocalStorageDatabaseTracker
2600         https://bugs.webkit.org/show_bug.cgi?id=115680
2601
2602         Reviewed by Andreas Kling.
2603
2604         Export symbols needed by WebKit2.
2605
2606         * WebCore.exp.in:
2607
2608 2013-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
2609
2610         [GTK] Add webkit_uri_scheme_request_finish_error
2611         https://bugs.webkit.org/show_bug.cgi?id=94316
2612
2613         Reviewed by Anders Carlsson.
2614
2615         No behaviour change, covered by existing tests.
2616
2617         * platform/network/soup/ResourceError.h:
2618         (ResourceError): Rename genericIOError() to genericGError().
2619         * platform/network/soup/ResourceErrorSoup.cpp:
2620         (WebCore::ResourceError::httpError): Use genercicGError() instead of
2621         genericIOError().
2622         (WebCore::ResourceError::genericGError): Use error domain instead of
2623         always return a G_IO_ERROR.
2624         * platform/network/soup/ResourceHandleSoup.cpp: Use genericGError()
2625         instead of genericIOError().
2626         (WebCore::redirectSkipCallback):
2627         (WebCore::readCallback):
2628
2629 2013-05-06  Bem Jones-Bey  <bjonesbe@adobe.com>
2630
2631         Heap-use-after-free in WebCore::InlineFlowBox::deleteLine
2632         https://bugs.webkit.org/show_bug.cgi?id=114772
2633
2634         Reviewed by David Hyatt.
2635
2636         Fix the new use after free issues in Ruby.
2637
2638         Test: fast/ruby/ruby-svg-crash.html
2639
2640         * rendering/RenderRubyRun.cpp:
2641         (WebCore::RenderRubyRun::removeChild):
2642
2643 2013-05-06  Robert Hogan  <robert@webkit.org>
2644
2645         REGRESSION(r140024): child of fixed div inside of absolute div does not get resized when window is resized
2646         https://bugs.webkit.org/show_bug.cgi?id=115379
2647
2648         Reviewed by David Hyatt.
2649
2650         When detecting whether a fixed pos object needed to move with an absolute ancestor we checked
2651         whether the logical width of the fixed pos object had changed. This check prevented the fixed pos
2652         object from detecting later on that it needed to relayout its children in layoutBlock(). So recompute the width
2653         for our check instead of updating it.
2654
2655         Test: fast/block/positioning/child-of-fixed-pos-after-movement.html
2656
2657         * rendering/RenderBlock.cpp:
2658         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
2659
2660 2013-05-06  Mike Lattanzio  <mlattanzio@blackberry.com>
2661
2662         [BlackBerry] Enable and Expose Text Autosizing through BlackBerry::WebKit::WebSettings
2663         https://bugs.webkit.org/show_bug.cgi?id=113808
2664
2665         Reviewed by Rob Buis.
2666
2667         Added TextAutosizer.cpp to the BlackBerry build.
2668
2669         * PlatformBlackBerry.cmake:
2670
2671 2013-05-06  Darin Adler  <darin@apple.com>
2672
2673         Use OwnPtr instead of deleteAllValues in SVGAttributeToPropertyMap
2674         https://bugs.webkit.org/show_bug.cgi?id=115653
2675
2676         Reviewed by Andreas Kling.
2677
2678         Also made a few style fixes to the code at the same time.
2679
2680         * svg/properties/SVGAttributeToPropertyMap.cpp:
2681         (WebCore::SVGAttributeToPropertyMap::addProperties): Changed argument to
2682         const because there was no reason for it to be non-const. Added calls to
2683         get() since the items in the map are now OwnPtr. Added a couple FIXMEs
2684         about performance mistakes.
2685         (WebCore::SVGAttributeToPropertyMap::addProperty): Added a FIXME about
2686         a small performance mistake, and updated to use OwnPtr instead of raw
2687         pointers.
2688         (WebCore::SVGAttributeToPropertyMap::synchronizeProperties): Added a call
2689         to get().
2690
2691         * svg/properties/SVGAttributeToPropertyMap.h: Removed now-unneeded
2692         constructor and destructor definitions. Changed the type for the
2693         addProperties to be const&. Added a comment about incorrect function
2694         naming. Changed the type of the map data member to use OwnPtr.
2695
2696 2013-05-06  Antti Koivisto  <antti@apple.com>
2697
2698         Remove more code that was only needed for younger/older shadow trees
2699         https://bugs.webkit.org/show_bug.cgi?id=115662
2700
2701         Reviewed by Andreas Kling.
2702
2703         This is dead code.
2704
2705         * WebCore.exp.in:
2706         * dom/ComposedShadowTreeWalker.cpp:
2707         (WebCore::nodeCanBeDistributed):
2708         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
2709         * dom/EventPathWalker.cpp:
2710         (WebCore::EventPathWalker::moveToParent):
2711         * html/shadow/ContentDistributor.cpp:
2712         (WebCore::ScopeContentDistribution::ScopeContentDistribution):
2713         (WebCore::ScopeContentDistribution::registerInsertionPoint):
2714         (WebCore::ScopeContentDistribution::unregisterInsertionPoint):
2715         (WebCore):
2716         (WebCore::ScopeContentDistribution::hasInsertionPoint):
2717         (WebCore::ContentDistributor::invalidate):
2718         * html/shadow/ContentDistributor.h:
2719         (ScopeContentDistribution):
2720         * html/shadow/InsertionPoint.cpp:
2721         (WebCore::InsertionPoint::contains):
2722         (WebCore::resolveReprojection):
2723         (WebCore::collectInsertionPointsWhereNodeIsDistributed):
2724         * html/shadow/InsertionPoint.h:
2725         * testing/Internals.cpp:
2726         (WebCore):
2727         * testing/Internals.h:
2728         (Internals):
2729         * testing/Internals.idl:
2730
2731 2013-05-06  Tiancheng Jiang  <tijiang@rim.com>
2732
2733         [BlackBerry] Update HTML5 progress bar UX.
2734         https://bugs.webkit.org/show_bug.cgi?id=115284.
2735
2736         Reviewed by Rob Buis.
2737
2738         BlackBerry PR 331729.
2739         Internally Reviewed by Jeff Rogers.
2740
2741         Use GL render to paint progress bar to meet UX specs.
2742         Also change the slider range to GL render.
2743
2744         * platform/blackberry/RenderThemeBlackBerry.cpp:
2745         (WebCore):
2746         (WebCore::RenderThemeBlackBerry::paintSliderTrack):
2747         (WebCore::RenderThemeBlackBerry::paintProgressTrackRect):
2748         (WebCore::drawProgressTexture):
2749         (WebCore::RenderThemeBlackBerry::paintProgressBar):
2750         * platform/blackberry/RenderThemeBlackBerry.h:
2751         (RenderThemeBlackBerry):
2752
2753 2013-05-06  Bem Jones-Bey  <bjonesbe@adobe.com>
2754
2755         [CSS Exclusions] remove unused -webkit-wrap property
2756         https://bugs.webkit.org/show_bug.cgi?id=102105
2757
2758         Reviewed by Darin Adler.
2759
2760         Remove -webkit-wrap property and all mentions. This property doesn't
2761         exist in the spec anymore, and was never implemented more than just
2762         parsing the property.
2763
2764         * WebCore.order:
2765         * css/CSSComputedStyleDeclaration.cpp:
2766         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2767         * css/CSSParser.cpp:
2768         (WebCore::CSSParser::parseValue):
2769         * css/CSSProperty.cpp:
2770         (WebCore::CSSProperty::isInheritedProperty):
2771         * css/CSSPropertyNames.in:
2772         * css/StylePropertySet.cpp:
2773         (WebCore::StylePropertySet::getPropertyValue):
2774         (WebCore::StylePropertySet::asText):
2775         * css/StylePropertyShorthand.cpp:
2776         (WebCore::shorthandForProperty):
2777         * css/StylePropertyShorthand.h:
2778         (WebCore):
2779         * css/StyleResolver.cpp:
2780         (WebCore::StyleResolver::applyProperty):
2781
2782 2013-05-06  Anders Carlsson  <andersca@apple.com>
2783
2784         Write storage changes to disk
2785         https://bugs.webkit.org/show_bug.cgi?id=115660
2786
2787         Reviewed by Andreas Kling.
2788
2789         Export symbols needed by WebKit2.
2790
2791         * WebCore.exp.in:
2792
2793 2013-05-06  Tiancheng Jiang  <tijiang@rim.com>
2794
2795         [BlackBerry] Update HTML5 progress bar UX.
2796         https://bugs.webkit.org/show_bug.cgi?id=115284.
2797
2798         Reviewed by Rob Buis.
2799
2800         BlackBerry PR 331729.
2801         Internally Reviewed by Jeff Rogers.
2802
2803         * platform/blackberry/RenderThemeBlackBerry.cpp:
2804         (WebCore):
2805         (WebCore::createLinearGradient):
2806         (WebCore::RenderThemeBlackBerry::paintSliderTrack):
2807         (WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
2808         (WebCore::RenderThemeBlackBerry::paintProgressBar):
2809         * platform/blackberry/RenderThemeBlackBerry.h:
2810         (RenderThemeBlackBerry):
2811
2812 2013-05-06  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2813
2814         [texmap] draw content if graphics layer displays a video
2815         https://bugs.webkit.org/show_bug.cgi?id=114742
2816
2817         Reviewed by Noam Rosenthal.
2818
2819         Bug #86410 focuses on having composited/accelerated video using the
2820         TextureMapper. But the video is not rendered fast by using the
2821         repaint() method. In the case of the TextureMapper it is required to
2822         call a content display as fast as possible.
2823
2824         This patch adds the class TextureMapperPlatformLayer::Client with the
2825         method setLayerNeedsDisplay(). The GraphicsLayerTextureMapper
2826         implements this new class and the new method calls
2827         setContentsNeedsDisplay(), causing a faster content display when
2828         requested.
2829
2830         No new tests. Covered by existing tests.
2831
2832         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2833         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia): sets itself
2834         as the TextureMapperPlatformLayer's client
2835         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2836         (WebCore::GraphicsLayerTextureMapper::setLayerNeedsDisplay):
2837         TextureMapperPlatformLayer::Client::setLayerNeedsDisplay implementation
2838         (GraphicsLayerTextureMapper):
2839         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
2840         (Client): New class
2841         (WebCore::TextureMapperPlatformLayer::TextureMapperPlatformLayer):
2842         (WebCore::TextureMapperPlatformLayer::setClient): client setter
2843         (WebCore::TextureMapperPlatformLayer::setLayerNeedsDisplay): facade
2844         for client's method
2845
2846 2013-05-02  David Hyatt  <hyatt@apple.com>
2847
2848         Improve the performance of RenderDeprecatedFlexibleBox.
2849         https://bugs.webkit.org/show_bug.cgi?id=115543.
2850
2851         Optimize deprecated flexible box layout to be much faster. This patch implements
2852         the following optimizations in the deprecated flexible box:
2853         
2854         (1) Defer repainting of children until they have been placed into their final
2855         positions. This is done by collecting all of the old frame rects into a Vector
2856         and then doing a walk after layout is finished to repaint any of the children if
2857         they moved from that position. This code matches the new RenderFlexibleBox's system
2858         for repainting moved children.
2859         
2860         (2) Implement support for layout deltas. We keep a Vector of layout deltas for each
2861         child as we shift them around, and every time we lay a child out again, we apply that
2862         child's current layout delta to avoid repainting at the new position. RenderFlexibleBox
2863         does not have support for layout deltas yet, so we'll need to implement this in the
2864         new flexbox code as well.
2865         
2866         (3) Optimize flexible objects to avoid laying them out unflexed. When laying out
2867         horizontal and vertical boxes now, we lay out the inflexible items first. We then
2868         check to see if the inflexible extent of all those children has changed.
2869         
2870         If this extent didn't change, and the flexible items either don't need layout or there
2871         is only one flexing item, then we avoid laying out the item in an unflexed state
2872         and simply lay out one time with the flex applied instead. The new RenderFlexibleBox
2873         does not have these optimizations and would benefit from them in the block-direction box
2874         case (it uses preferred logical widths in the inline-direction box case, and so avoided
2875         layouts in that direction already).
2876         
2877         Reviewed by Beth Dakin.
2878
2879         * rendering/RenderDeprecatedFlexibleBox.cpp:
2880         (WebCore::appendChildFrameRects):
2881         Cache all of the old child frame rects so that we can compare them with the final
2882         positions for repaintDuringLayoutIfMoved. This collection is identical to what the
2883         new flexbox code does.
2884         
2885         (WebCore::appendChildLayoutDeltas):
2886         Build up a vector that tracks layout deltas. We apply these layout deltas every
2887         time we lay out a child so that any repainting done during layout ignores our shifted
2888         position and just keeps using the old position. The new flexbox does not have this
2889         code yet.
2890
2891         (WebCore::repaintChildrenDuringLayoutIfMoved):
2892         After final placement of children, we do a single pass over all of the children and
2893         repaint them if they shifted their positions. This matches how the new flexbox works.
2894         
2895         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2896         Collect the frame rects and layout deltas, and defer repainting of children to the
2897         end of layout.
2898         
2899         (WebCore::gatherFlexChildrenInfo):
2900         Don't clear flex overrides when gathering flex information. Add additional information
2901         such as the number of flexing items so that we can use it to optimize flex layout.
2902         
2903         (WebCore::layoutChildIfNeededApplyingDelta):
2904         A helper for applying your current layout delta for a child when laying that child out.
2905         
2906         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2907         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2908         Both methods are patched to aggregate layout deltas as children move around during
2909         the multiple passes. In addition we now optimize layout in a couple of cases, such
2910         as when the inflexible space stays the same (thus giving a flexible object the
2911         same amount of available space, avoiding a need to lay out unflexed first).
2912         
2913         (WebCore::RenderDeprecatedFlexibleBox::placeChild):
2914         Patched to add to our cached layout delta for that child when we do a movement.
2915
2916         * rendering/RenderDeprecatedFlexibleBox.h:
2917         Changes to method signatures.
2918
2919 2013-05-04  Andy Estes  <aestes@apple.com>
2920
2921         REGRESSION (r125592): Reproducible crash in DOMWindow::open when a delegate closes the new window in decidePolicyForNavigationAction
2922         https://bugs.webkit.org/show_bug.cgi?id=115609
2923
2924         Reviewed by Oliver Hunt.
2925
2926         When a window created by window.open() is navigated, the embedder might
2927         close it in decidePolicyForNavigationAction. If this happens, we end up
2928         with a pointer to a deleted Frame.
2929
2930         Fix this by keeping a strong reference to the Frame created by
2931         createWindow(). We can later determine if the window was closed by
2932         checking if the new Frame has a detached Page.
2933
2934         Added an API test: WebKit1.CloseNewWindowInNavigationPolicyDelegate.
2935
2936         * page/DOMWindow.cpp:
2937         (WebCore::DOMWindow::createWindow):
2938
2939 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
2940
2941         [GTK] Move GeolocationProviderGeoclue into libPlatform
2942         https://bugs.webkit.org/show_bug.cgi?id=115591
2943
2944         Reviewed by Martin Robinson.
2945
2946         No new tests - no new functionality.
2947
2948         * GNUmakefile.am: Remove the Source/WebCore/platform/geoclue directory from the webkitgtk_cppflags list.
2949         * GNUmakefile.list.am: Move the GeolocationProviderGeoclue(Client) sources under platform_sources.
2950
2951 2013-05-06  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2952
2953         [Qt][Win] Unreviewed buildfix after r149579.
2954
2955         * plugins/win/PluginDatabaseWin.cpp:
2956         (WebCore::addQtWebKitPluginPath):
2957
2958 2013-05-06  Antoine Quint  <graouts@apple.com>
2959
2960         Manage the presentation of the snapshotted plug-in using JavaScript
2961         https://bugs.webkit.org/show_bug.cgi?id=115548
2962
2963         Reviewed by Dean Jackson.
2964
2965         * Resources/plugIns.js:
2966         (createOverlay):
2967         Implement the createOverlay(shadowRoot, titleText, subtitleText) method
2968         that is called from WebCore (HTMLPlugInImageElement::didAddUserAgentShadowRoot)
2969         to allow the injected script to customize the shadow root for a snapshotted
2970         plug-in. This is a default implementation, clients are expected to customize
2971         this by providing their own JS file with enhanced behavior.
2972
2973         * css/CSSDefaultStyleSheets.cpp:
2974         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2975         Since we no longer have a default shadow tree generated in C++, it makes little
2976         sense for clients to extend the default snapshotted plug-in stylesheet, so we
2977         only insert it if no custom one is provided by the chrome client.
2978
2979         * css/plugIns.css:
2980         Better styling of the default snapshotted plug-in overlay look by using CSS
2981         flex boxes. Also using more explicit selector as an optimization.
2982
2983         * dom/Document.cpp:
2984         (WebCore::Document::ensurePlugInsInjectedScript):
2985         Expose a new method to allow HTMLPlugInImageElement instances to ensure that
2986         the JavaScript code required to customize the snapshotted plug-in's shadow root
2987         is indeed injected in the current document. The actual injection would only
2988         happen once per document so all snapshotted plug-ins share the same scripting
2989         context.
2990
2991         * dom/Document.h:
2992         Expose the new ensurePlugInsInjectedScript method and the m_hasInjectedPlugInsScript
2993         property used to ensure injection happens only once per document.
2994
2995         * html/HTMLPlugInImageElement.cpp:
2996         (WebCore::titleText):
2997         (WebCore::subtitleText):
2998         Store the localized strings for each mime-type in a static hash map as it can be
2999         costly to retrieve them each time from the client. It is expected the chrome client
3000         will want to provide localized strings taking into account the snapshotted plug-in's
3001         mime-type, so we're adding this as a parameter.
3002         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
3003         Dispatch a "resize" event to the shadow root to notify the injected script that the
3004         snapshotted plug-in's metrics have changed and to allow the overlay to update itself
3005         as a result.
3006         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
3007         Remove all the DOM generation code in favor of an approach where we create a shared
3008         DOM scripting world in which we inject JavaScript code that will perform the same
3009         task but will additionally be provided by the client in order to provide a completely
3010         custom overlay for the snapshotted plug-in. The sole contract is for the JavaScript
3011         to implement a createOverlay(shadowRoot, titleText, subtitleText) method.
3012         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
3013         Renamed method to be generic to the overlay as opposed to text labels and use the
3014         element with CSS class name "snapshot-overlay" as the comparison node.
3015
3016         * html/HTMLPlugInImageElement.h:
3017         (HTMLPlugInImageElement):
3018         Removing a couple of unused members since we no longer generate the shadow DOM from C++
3019         and rename the partOfSnapshotLabel method to partOfSnapshotOverlay.
3020
3021         * page/ChromeClient.h:
3022         (WebCore::ChromeClient::plugInStartLabelTitle):
3023         (WebCore::ChromeClient::plugInStartLabelSubtitle):
3024         (WebCore::ChromeClient::plugInExtraScript):
3025         Pass in the mime-type to plugInStartLabelTitle and plugInStartLabelSubtitle and expose
3026         a new plugInExtraScript method to allow the chrome client to provide a custom JS file
3027         for the management of the shadow root.
3028
3029         * rendering/RenderSnapshottedPlugIn.cpp:
3030         (WebCore::RenderSnapshottedPlugIn::handleEvent):
3031         Update the terminology from "label" to "overlay" per the changes made in HTMLPlugInImageElement.
3032
3033 2013-05-06  Robert Hogan  <robert@webkit.org>
3034
3035         REGRESSION(r140907) - Backport blink r149612 to fix vertical-align and rowspan issue
3036         https://bugs.webkit.org/show_bug.cgi?id=115611
3037
3038         Patch by Julien Chaffraix.
3039         Reviewed by Benjamin Poulain.
3040
3041         Backport phttps://src.chromium.org/viewvc/blink?view=rev&revision=149612 from 
3042         https://chromiumcodereview.appspot.com/14105010
3043         
3044         Fix the rows' height computation with vertical-align: baseline and rowspan.
3045         r140907 was careful in avoiding updating the baseline descent for
3046         spanning cells. However it still added the non-spanning cells baseline
3047         descent to the spanning cells' row height computation.
3048         This change avoids the previous issue by not adding the baseline
3049         descent in this case.
3050
3051         Test: fast/table/baseline-align-rowspan.html
3052
3053         * rendering/RenderTableSection.cpp:
3054         (WebCore::RenderTableSection::calcRowLogicalHeight):
3055
3056 2013-05-05  Anders Carlsson  <andersca@apple.com>
3057
3058         Remove Vector::prepend
3059         https://bugs.webkit.org/show_bug.cgi?id=115618
3060
3061         Reviewed by Geoffrey Garen.
3062
3063         Replace calls to Vector::prepend with either Vector::insert,
3064         or a combination of Vector::append and Vector::reverse.
3065
3066         * accessibility/AccessibilityObject.cpp:
3067         (WebCore::AccessibilityObject::scrollToGlobalPoint):
3068         * css/CSSGradientValue.cpp:
3069         (WebCore::CSSGradientValue::addStops):
3070         * css/CSSValueList.h:
3071         (WebCore::CSSValueList::prepend):
3072         * dom/Document.cpp:
3073         (WebCore::Document::iconURLs):
3074         * editing/TextIterator.cpp:
3075         (WebCore::SearchBuffer::prependContext):
3076         * editing/VisibleUnits.cpp:
3077         (WebCore::previousBoundary):
3078         (WebCore::nextBoundary):
3079         * history/HistoryItem.cpp:
3080         (WebCore::HistoryItem::padDailyCountsForNewVisit):
3081         (WebCore::HistoryItem::collapseDailyVisitsToWeekly):
3082         * inspector/InjectedScriptHost.cpp:
3083         (WebCore::InjectedScriptHost::addInspectedObject):
3084         * platform/graphics/SVGGlyph.cpp:
3085         (WebCore::charactersWithArabicForm):
3086
3087 2013-05-05  Sam Weinig  <sam@webkit.org>
3088
3089         Remove empty function SQLiteFileSystem::registerSQLiteVFS() and its callers
3090         https://bugs.webkit.org/show_bug.cgi?id=115619
3091
3092         Reviewed by Dan Bernstein.
3093
3094         * Modules/webdatabase/DatabaseTracker.cpp:
3095         * platform/sql/SQLiteFileSystem.cpp:
3096         * platform/sql/SQLiteFileSystem.h:
3097         * storage/StorageTracker.cpp:
3098
3099 2013-05-05  Chris Fleizach  <cfleizach@apple.com>
3100
3101         AX: aria-checked not exposed correctly on menuitemcheckbox or menuitemradio roles
3102         https://bugs.webkit.org/show_bug.cgi?id=115499
3103
3104         Reviewed by Tim Horton.
3105
3106         Expose isChecked() for menu item objects.
3107         Return the Mac-platform specific value that you find on menu items for "checked" menu items.
3108
3109         Test: platform/mac/accessibility/aria-menuitem-checked-value.html
3110
3111         * accessibility/AccessibilityNodeObject.cpp:
3112         (WebCore::AccessibilityNodeObject::isChecked):
3113         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3114         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3115
3116 2013-05-05  Tim Horton  <timothy_horton@apple.com>
3117
3118         [wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
3119         https://bugs.webkit.org/show_bug.cgi?id=115577
3120         <rdar://problem/13762583>
3121
3122         Reviewed by Darin Adler.
3123
3124         * WebCore.exp.in:
3125         Export GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants
3126
3127 2013-05-05  Anders Carlsson  <andersca@apple.com>
3128
3129         Remove the Vector::append overload that takes a Vector
3130         https://bugs.webkit.org/show_bug.cgi?id=115535
3131
3132         Reviewed by Andreas Kling.
3133
3134         Use Vector::appendVector instead.
3135
3136         * Modules/indexeddb/IDBBackingStore.cpp:
3137         (WebCore::IDBBackingStore::putRecord):
3138         (WebCore::IDBBackingStore::putIndexDataForRecord):
3139         * Modules/indexeddb/IDBLevelDBCoding.cpp:
3140         (WebCore::IDBLevelDBCoding::encodeStringWithLength):
3141         (WebCore::IDBLevelDBCoding::encodeIDBKey):
3142         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
3143         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
3144         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
3145         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
3146         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
3147         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
3148         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
3149         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
3150         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
3151         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
3152         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
3153         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
3154         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
3155         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
3156         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
3157         (WebCore::IDBLevelDBCoding::IndexDataKey::encode):
3158         * Modules/webaudio/AudioContext.cpp:
3159         (WebCore::AudioContext::clear):
3160         (WebCore::AudioContext::scheduleNodeDeletion):
3161         * accessibility/AccessibilityARIAGrid.cpp:
3162         (WebCore::AccessibilityARIAGrid::addTableCellChild):
3163         * accessibility/AccessibilityTable.cpp:
3164         (WebCore::AccessibilityTable::cells):
3165         * css/RuleFeature.cpp:
3166         (WebCore::RuleFeatureSet::add):
3167         * css/StyleResolver.cpp:
3168         (WebCore::StyleResolver::addToMatchedPropertiesCache):
3169         * dom/DocumentStyleSheetCollection.cpp:
3170         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
3171         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3172         * dom/Range.cpp:
3173         (WebCore::Range::getBorderAndTextQuads):
3174         * html/FormController.cpp:
3175         (WebCore::FormController::getReferencedFilePaths):
3176         * html/canvas/CanvasRenderingContext2D.cpp:
3177         (WebCore::CanvasRenderingContext2D::setLineDash):
3178         * html/parser/HTMLFormattingElementList.cpp:
3179         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
3180         * html/track/WebVTTToken.h:
3181         (WebCore::WebVTTToken::addNewClass):
3182         (WebCore::WebVTTToken::addNewAnnotation):
3183         * page/CaptionUserPreferencesMac.mm:
3184         (WebCore::CaptionUserPreferencesMac::preferredLanguages):
3185         * platform/FileChooser.cpp:
3186         (WebCore::FileChooserSettings::acceptTypes):
3187         * platform/SharedBufferChunkReader.cpp:
3188         (WebCore::SharedBufferChunkReader::nextChunk):
3189         * platform/graphics/MediaPlayer.cpp:
3190         (WebCore::MediaPlayer::getSitesInMediaCache):
3191         * platform/graphics/ca/GraphicsLayerCA.cpp:
3192         (WebCore::GraphicsLayerCA::updateSublayerList):
3193         * platform/mac/PasteboardMac.mm:
3194         (WebCore::createWritableTypesForImage):
3195         (WebCore::writableTypesForImage):
3196         (WebCore::Pasteboard::writeSelectionForTypes):
3197         * platform/network/FormDataBuilder.cpp:
3198         (WebCore::FormDataBuilder::generateUniqueBoundaryString):
3199         * plugins/PluginDatabase.cpp:
3200         (WebCore::PluginDatabase::defaultPluginDirectories):
3201         * rendering/RenderBlockLineLayout.cpp:
3202         (WebCore::constructBidiRunsForSegment):
3203         * rendering/RenderLayerCompositor.cpp:
3204         (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
3205         * rendering/RenderTableSection.cpp:
3206         (WebCore::RenderTableSection::splitColumn):
3207         * svg/SVGGlyphMap.h:
3208         (WebCore::SVGGlyphMap::collectGlyphsForString):
3209         * xml/XPathNodeSet.h:
3210         (WebCore::XPath::NodeSet::append):
3211
3212 2013-05-05  Anders Carlsson  <andersca@apple.com>
3213
3214         Try to fix the Windows build.
3215
3216         Make plugIns.js have a non-zero length.
3217
3218         * Resources/plugIns.js:
3219
3220 2013-05-04  Dean Jackson  <dino@apple.com>
3221
3222         Animations and Transitions should not start when globally suspended
3223         https://bugs.webkit.org/show_bug.cgi?id=114915
3224
3225         Reviewed by Sam Weinig.
3226
3227         When the Document's AnimationController was suspended, we still
3228         started new transitions and animations. Change this so that
3229         animations enter a paused-but-new state, where they are frozen
3230         until the AnimationController resumes. At that time, it is as
3231         if they had just appeared: any delay counts down before
3232         the animation starts.
3233
3234         For transitions, the change in value must still happen, but
3235         it does so immediately. No transitionend event should be fired.
3236         This produces a slightly confusing behaviour, because any
3237         in-progress transitions are suspended, but any new style changes
3238         happen instantly. This might sound contradictory, but in general
3239         suspending the document is a rare (and dangerous) thing to do.
3240
3241         Previously, the Document would call resumeAnimations as it loaded,
3242         effectively starting all the animations. This meant if you suspended
3243         animations before loading a document, it was ignored as soon as the
3244         load finished. Now there is a separate method startAnimationsIfNotSuspended
3245         which checks to see if the document is suspended as it loads.
3246
3247         In order to handle this case, I added a new state to the Animation
3248         machinery: AnimationStatePausedNew. This is an animation that was created
3249         in the suspended state.
3250
3251         Tests: animations/added-while-suspended.html
3252                transitions/started-while-suspended.html
3253
3254         * WebCore.exp.in: Export AnimationController::isSuspended().
3255
3256         * dom/Document.cpp:
3257         (WebCore::Document::implicitClose):
3258             resumeAnimationsForDocument() -> startAnimationsIfNotSuspended()
3259
3260         * page/animation/AnimationBase.cpp:
3261         (WebCore::nameForState): New name for AnimationStatePausedNew.
3262         (WebCore::AnimationBase::updateStateMachine): Handle new state AnimationStatePausedNew. The
3263             most important change is that when go from PausedNew to Running, we jump back into
3264             the New state and continue from there.
3265         (WebCore::AnimationBase::updatePlayState): suspended -> isSuspended
3266         * page/animation/AnimationBase.h: New state: AnimationStatePausedNew
3267         (WebCore::AnimationBase::waitingToStart): Add AnimationStatePausedNew.
3268         (WebCore::AnimationBase::paused): Add AnimationStatePausedNew.
3269         (WebCore::AnimationBase::isNew): Add AnimationStatePausedNew.
3270
3271         * page/animation/AnimationController.cpp:
3272         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialise m_suspended.
3273         (WebCore::AnimationControllerPrivate::clear): suspended -> isSuspended
3274         (WebCore::AnimationControllerPrivate::updateAnimations): Ditto.
3275         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer): Ditto.
3276         (WebCore::AnimationControllerPrivate::suspendAnimations): Update m_suspended.
3277         (WebCore::AnimationControllerPrivate::resumeAnimations): Ditto.
3278         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
3279         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
3280         (WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): New method that will
3281             only resume animations if we were not globally suspended.
3282         (WebCore::AnimationController::isSuspended): New method.
3283         (WebCore::AnimationController::suspendAnimations): Add logging.
3284         (WebCore::AnimationController::resumeAnimations): Add logging.
3285         (WebCore::AnimationController::suspendAnimationsForDocument): Add logging.
3286         (WebCore::AnimationController::resumeAnimationsForDocument): Add logging.
3287         (WebCore::AnimationController::startAnimationsIfNotSuspended): Calls private method.
3288         * page/animation/AnimationController.h:
3289         (AnimationController): Add isSuspended() and animationsForDocumentMayStart().
3290         * page/animation/AnimationControllerPrivate.h:
3291         (WebCore::AnimationControllerPrivate::isSuspended): New method.
3292         (AnimationControllerPrivate): Add m_isSuspended member.
3293
3294         * page/animation/CompositeAnimation.cpp:
3295         (WebCore::CompositeAnimation::CompositeAnimation): Moved from header - initialise m_isSuspended.
3296         (WebCore::CompositeAnimation::updateTransitions): Do not create ImplicitAnimation if suspended.
3297         (WebCore::CompositeAnimation::updateKeyframeAnimations): Move to AnimationStatePausedNew if suspended.
3298         (WebCore::CompositeAnimation::suspendAnimations): m_suspended -> m_isSuspended
3299         (WebCore::CompositeAnimation::resumeAnimations): Ditto.
3300         * page/animation/CompositeAnimation.h:
3301         (WebCore::CompositeAnimation::isSuspended): Renamed from suspended()
3302
3303         * page/animation/KeyframeAnimation.cpp:
3304         (WebCore::KeyframeAnimation::animate): If we're in the AnimationStatePausedNew state, then
3305             we need to go to the first frame (to handle fill mode).
3306
3307         * testing/Internals.cpp:
3308         (WebCore::Internals::animationsAreSuspended): New exposed method to reflect AnimationController.
3309         * testing/Internals.h: Add animationsAreSuspended.
3310         * testing/Internals.idl: Ditto.
3311
3312 2013-05-04  Sam Weinig  <sam@webkit.org>
3313
3314         Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac
3315         matching where they are in WebKit2.
3316
3317         Reviewed by Anders Carlsson.
3318
3319         * WebCore.exp.in:
3320         * WebCore.xcodeproj/project.pbxproj:
3321         * platform/mac/PopupMenuMac.h: Removed.
3322         * platform/mac/PopupMenuMac.mm: Removed.
3323         * platform/mac/SearchPopupMenuMac.h: Removed.
3324         * platform/mac/SearchPopupMenuMac.mm: Removed.
3325
3326 2013-05-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3327
3328         Get rid of special cases in AddIncludesForTypeInImpl
3329         https://bugs.webkit.org/show_bug.cgi?id=115602
3330
3331         Reviewed by Benjamin Poulain.
3332
3333         Get rid of the special cases in AddIncludesForTypeInImpl subroutine in the
3334         JS bindings generator. Those are no longer needed and special cases should
3335         be avoided in the generator.
3336
3337         No new tests, no behavior change.
3338
3339         * bindings/scripts/CodeGeneratorJS.pm:
3340         (AddIncludesForTypeInImpl):
3341
3342 2013-05-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3343
3344         Get rid of AddIncludesForSVGAnimatedType in bindings generator
3345         https://bugs.webkit.org/show_bug.cgi?id=115603
3346
3347         Reviewed by Benjamin Poulain.
3348
3349         Remove AddIncludesForSVGAnimatedType subroutine from the bindings generator
3350         as it is a special case which is no longer needed.
3351
3352         No new tests, no behavior change.
3353
3354         * bindings/scripts/CodeGeneratorJS.pm:
3355         (GenerateImplementation):
3356
3357 2013-05-04  Antoine Quint  <graouts@apple.com>
3358
3359         Update code generators to handle a new JavaScript file for snapshotted plug-ins
3360         https://bugs.webkit.org/show_bug.cgi?id=115596
3361
3362         Reviewed by Dean Jackson.
3363
3364         In preparation for https://webkit.org/b/115548, adding a new JS file at
3365         Resources/plugIns.js that we will use to provide presentation for the
3366         snapshotted plug-ins overlay.
3367
3368         * CMakeLists.txt:
3369         * DerivedSources.cpp:
3370         * DerivedSources.make:
3371         * DerivedSources.pri:
3372         * GNUmakefile.am:
3373         * GNUmakefile.list.am:
3374         * Resources/plugIns.js: Added.
3375         * WebCore.vcproj/WebCore.vcproj:
3376         * WebCore.vcxproj/WebCore.vcxproj:
3377         * WebCore.vcxproj/WebCore.vcxproj.filters:
3378         * WebCore.xcodeproj/project.pbxproj:
3379
3380 2013-05-04  Andreas Kling  <akling@apple.com>
3381
3382         REGRESSION(r142647): Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
3383         <http://webkit.org/b/115322>
3384         <rdar://problem/13810719>
3385
3386         Reviewed by Anders Carlsson.
3387
3388         Don't cache the FrameView::renderView() in a local since updating Widgets may blow it away.
3389
3390         * page/FrameView.cpp:
3391         (WebCore::FrameView::performPostLayoutTasks):
3392
3393 2013-05-04  Andreas Kling  <akling@apple.com>
3394
3395         Remove GraphicsContext::strokeArc(), which is unused.
3396
3397         From Blink r149608 by <jbroman@chromium.org>
3398         <http://src.chromium.org/viewvc/blink?view=revision&revision=149608>
3399
3400         This is no longer used since almost a year ago, when HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) was inlined.
3401
3402         * platform/graphics/GraphicsContext.h:
3403         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
3404         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3405         * platform/graphics/cg/GraphicsContextCG.cpp:
3406         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3407
3408 2013-05-04  Andreas Kling  <akling@apple.com>
3409
3410         Remove unused CSSSelector::isCustomPseudoType().
3411
3412         From Blink r149574 by <dominicc@chromium.org>
3413         <http://src.chromium.org/viewvc/blink?view=revision&revision=149574>
3414
3415         * css/CSSSelector.h:
3416         * css/CSSSelector.cpp:
3417
3418 2013-05-04  Andreas Kling  <akling@apple.com>
3419
3420         Remove ShadowRoot's previous/next ShadowRoot pointers.
3421         <http://webkit.org/b/115588>
3422
3423         Reviewed by Anders Carlsson.
3424
3425         ShadowRoot no longer inherits from DoublyLinkedListNode<ShadowRoot> because that code wasn't
3426         doing anything anymore. Shrinks ShadowRoot by two pointers.
3427
3428         * dom/ElementShadow.h:
3429         * dom/ShadowRoot.cpp:
3430         (SameSizeAsShadowRoot):
3431         (WebCore::ShadowRoot::ShadowRoot):
3432         (WebCore::ShadowRoot::~ShadowRoot):
3433         * dom/ShadowRoot.h:
3434
3435 2013-05-04  Andreas Kling  <akling@apple.com>
3436
3437         RenderObject: don't change GraphicsContext state when not drawing dashed/dotted lines.
3438
3439         From Blink r149546 by <jbroman@chromium.org>
3440         <http://src.chromium.org/viewvc/blink?view=revision&revision=149546>
3441
3442         Previously, there was asymmetry between changing and restoring state (certain state
3443         would be restored only if thickness was positive, i.e. a line was actually drawn.)
3444
3445         * rendering/RenderObject.cpp:
3446         (WebCore::RenderObject::drawLineForBoxSide):
3447
3448 2013-05-03  Andreas Kling  <akling@apple.com>
3449
3450         Remove CSS selector profiler branches from ElementRuleCollector loop.
3451         <http://webkit.org/b/115581>
3452
3453         Reviewed by Antti Koivisto.
3454
3455         Templatize the method so we don't have to check for active inspector frontends on every
3456         pass through the loop.
3457
3458         Time spent in this loop goes down from 0.5% to 0.2% on iTunes Store, WebCore binary size
3459         goes up 480 bytes (sorry Benjamin, I'll make it up to you.)
3460
3461         * css/ElementRuleCollector.h:
3462         * css/ElementRuleCollector.cpp:
3463         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3464         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
3465
3466 2013-04-30  Robert Hogan  <robert@webkit.org>
3467
3468         REGRESSION(r140907): Incorrect baseline on cells after updating vertical-align
3469         https://bugs.webkit.org/show_bug.cgi?id=115432
3470
3471         Reviewed by Julien Chaffraix.
3472
3473         If a cell changes vertical-align any intrinsic padding it has is now redundant. It
3474         needs to calculate its new height from RenderTableRow::layout() and then find its
3475         new intrinsic padding in RenderTableSection::layoutRows().
3476
3477         Test: fast/table/correct-baseline-after-style-change.html
3478
3479         * rendering/RenderTableCell.cpp:
3480         (WebCore::RenderTableCell::styleDidChange):
3481
3482 2013-05-03  Arnaud Renevier  <a.renevier@sisa.samsung.com>
3483
3484         incorrect repainting when a table has a transform
3485         https://bugs.webkit.org/show_bug.cgi?id=109867
3486
3487         Reviewed by Simon Fraser.
3488
3489         Disable LayoutState when table, tableRow or tableSection render
3490         objects have transforms or reflections.
3491
3492         Tests: fast/repaint/reflection-table-layout.html
3493                fast/repaint/transform-table-layout.html
3494
3495         * rendering/RenderTable.cpp:
3496         (WebCore::RenderTable::layout):
3497         * rendering/RenderTableRow.cpp:
3498         (WebCore::RenderTableRow::layout):
3499         * rendering/RenderTableSection.cpp:
3500         (WebCore::RenderTableSection::layout):
3501         (WebCore::RenderTableSection::layoutRows):
3502
3503 2013-05-03  Antti Koivisto  <antti@apple.com>
3504
3505         Remove concept of younger and older shadow trees
3506         https://bugs.webkit.org/show_bug.cgi?id=115570
3507
3508         Reviewed by Andreas Kling.
3509
3510         Younger and older shadow trees are an obscure corner of the Shadow DOM spec.
3511         
3512         Support only one shadow tree per element. This simplifies many things. 
3513
3514         * dom/ComposedShadowTreeWalker.cpp:
3515         (WebCore::ComposedShadowTreeWalker::traverseChild):
3516         (WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree):
3517         (WebCore):
3518         (WebCore::ComposedShadowTreeWalker::traverseParent):
3519         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
3520         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
3521         * dom/ComposedShadowTreeWalker.h:
3522         (WebCore::ComposedShadowTreeWalker::assertPrecondition):
3523         (ComposedShadowTreeWalker):
3524         * dom/ContainerNodeAlgorithms.cpp:
3525         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
3526         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
3527         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
3528         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
3529         (WebCore::ChildFrameDisconnector::collectFrameOwners):
3530         (WebCore::assertConnectedSubrameCountIsConsistent):
3531         * dom/Document.cpp:
3532         (WebCore::Document::buildAccessKeyMap):
3533         * dom/Element.cpp:
3534         (WebCore::Element::authorShadowRoot):
3535         (WebCore::Element::userAgentShadowRoot):
3536         (WebCore::Element::ensureUserAgentShadowRoot):
3537         * dom/Element.h:
3538         (Element):
3539         (WebCore::Element::hasAuthorShadowRoot):
3540         * dom/Element.idl:
3541         * dom/ElementShadow.cpp:
3542         (WebCore::ElementShadow::addShadowRoot):
3543         
3544         Allow only one ShadowRoot per ElementShadow. Remove linked list handling.
3545         
3546         (WebCore::ElementShadow::removeAllShadowRoots):
3547         (WebCore::ElementShadow::attach):
3548         (WebCore::ElementShadow::detach):
3549         (WebCore::ElementShadow::childNeedsStyleRecalc):
3550         (WebCore::ElementShadow::needsStyleRecalc):
3551         (WebCore::ElementShadow::recalcStyle):
3552         (WebCore::ElementShadow::removeAllEventListeners):
3553         * dom/ElementShadow.h:
3554         (WebCore::ElementShadow::shadowRoot):
3555         (ElementShadow):
3556         (WebCore::ElementShadow::host):
3557         (WebCore::Node::shadowRoot):
3558         (WebCore):
3559         * dom/Node.cpp:
3560         (WebCore):
3561         (WebCore::Node::showNodePathForThis):
3562         (WebCore::traverseTreeAndMark):
3563         (WebCore::showSubTreeAcrossFrame):
3564         * dom/Node.h:
3565         (Node):
3566         * dom/ShadowRoot.cpp:
3567         (WebCore::ShadowRoot::insertedInto):
3568         * dom/ShadowRoot.h:
3569         (ShadowRoot):
3570         
3571             Remove LinkedList base.
3572         
3573         * dom/TreeScopeAdopter.cpp:
3574         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3575         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
3576         * html/shadow/ContentDistributor.cpp:
3577         (WebCore::ContentDistributor::distribute):
3578         (WebCore::ContentDistributor::invalidate):
3579         (WebCore::ContentDistributor::ensureSelectFeatureSet):
3580         * inspector/InspectorDOMAgent.cpp:
3581         (WebCore::InspectorDOMAgent::unbind):
3582         (WebCore::InspectorDOMAgent::buildObjectForNode):
3583         * page/FocusController.cpp:
3584         (WebCore::FocusNavigationScope::FocusNavigationScope):
3585         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
3586         * rendering/RenderFileUploadControl.cpp:
3587         (WebCore::RenderFileUploadControl::uploadButton):
3588         * svg/SVGTRefElement.cpp:
3589         (WebCore::SVGTRefElement::updateReferencedText):
3590         (WebCore::SVGTRefElement::detachTarget):
3591         * svg/SVGUseElement.cpp:
3592         (WebCore::SVGUseElement::clearResourceReferences):
3593         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
3594         (WebCore::SVGUseElement::buildShadowTree):
3595         * testing/Internals.cpp:
3596         (WebCore::Internals::ensureShadowRoot):
3597         (WebCore::Internals::shadowRoot):
3598         (WebCore):
3599         * testing/Internals.h:
3600         (Internals):
3601         * testing/Internals.idl:
3602
3603 2013-05-03  Martin Robinson  <mrobinson@igalia.com>
3604
3605         Simplify the #ifdefs in GraphicsContext3D.h
3606         https://bugs.webkit.org/show_bug.cgi?id=115568
3607
3608         Reviewed by Daniel Bates.
3609
3610         * platform/graphics/GraphicsContext3D.h:
3611         (GraphicsContext3D): Combine #ifdefs paths that have a common
3612         implementation. This reduces the #ifdef paths from many to just three.
3613         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3614         (WebCore::GraphicsContext3D::platformTexture): Move the implementation
3615         here to simplify the header.
3616         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3617         (WebCore::GraphicsContext3D::platformTexture): Ditto.
3618         (WebCore):
3619
3620 2013-05-03  Brendan Long  <b.long@cablelabs.com>
3621
3622         [Qt] Build with --video-track fails because String(AtomicString) is ambiguous
3623         https://bugs.webkit.org/show_bug.cgi?id=115551
3624
3625         Reviewed by Benjamin Poulain.
3626
3627         * html/HTMLMediaElement.cpp:
3628         (WebCore::HTMLMediaElement::configureTextTrackGroup):
3629         Change String(textTrack->kind()) to textTrack->kind().string(), and same thing with language.
3630
3631 2013-05-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3632
3633         [GStreamer] GStreamer log crashes in MediaPlayerPrivateGStreamerBase because of uninitialized category
3634         https://bugs.webkit.org/show_bug.cgi?id=115575
3635
3636         Reviewed by Philippe Normand.
3637
3638         No new tests needed.
3639
3640         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3641         Using extern debug category.
3642         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3643         Declaring debug category as not static.
3644
3645 2013-05-03  Brent Fulgham  <bfulgham@webkit.org>
3646
3647         [WinCairo] Unreviewed VS2010 Build Correction.
3648
3649         * WebCore.vcxproj/WebCore.vcxproj: Exclude CG-only
3650         SubimageCacheWithTimer.cpp from WinCairo build.
3651
3652 2013-05-03  Viatcheslav Ostapenko  <viatchslav.o@samsung.com>
3653
3654         [Cairo] Anti-aliasing should not be always disabled for lines
3655         https://bugs.webkit.org/show_bug.cgi?id=109535
3656
3657         Reviewed by Martin Robinson.
3658
3659         Don't disable antialiasing for text lines because it produces ugly picture if
3660         page is scaled.
3661
3662         Test: fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html
3663
3664         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3665         (WebCore::drawLineOnCairoContext):
3666
3667 2013-05-03  Daniel Bates  <dbates@webkit.org>
3668
3669         Remove unnecessary include HTMLNames.h from RenderThemeGtk.cpp
3670         https://bugs.webkit.org/show_bug.cgi?id=115571
3671
3672         Reviewed by Martin Robinson.
3673
3674         * platform/gtk/RenderThemeGtk.cpp:
3675
3676 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
3677
3678         [Mac] setMetadataURL incorrectly treats path bytes as Latin-1
3679         https://bugs.webkit.org/show_bug.cgi?id=115557
3680
3681         Reviewed by Sam Weinig.
3682
3683         * platform/mac/FileSystemMac.mm: (WebCore::setMetaData): Use the correct constructor.
3684
3685 2013-05-03  Andrei Bucur  <abucur@adobe.com>
3686
3687         Move pixelSnappedLayoutOverflowRect and maxLayoutOverflow from RenderBox
3688         https://bugs.webkit.org/show_bug.cgi?id=115550
3689
3690         Reviewed by Simon Fraser.
3691
3692         The patch moves pixelSnappedLayoutOverflowRect and maxLayoutOverflow out
3693         of RenderBox somewhere logically closer to their usage place.
3694
3695         pixelSnappedLayoutOverflowRect - moved to RenderView because it's called only
3696         for RenderView at this moment.
3697         There are other places when the overflow rect is pixel snapped but only after
3698         the rect is adjusted for writing modes or inflated.
3699
3700         maxLayoutOverflow - moved to RenderTreeAsText.cpp as a static function because
3701         it's used only there.
3702
3703         Tests: no new functional change.
3704
3705         * rendering/RenderBox.h: The functions declarations are removed.
3706         * rendering/RenderTreeAsText.cpp:
3707         (WebCore::maxLayoutOverflow): 
3708         * rendering/RenderView.h:
3709         (WebCore::RenderView::pixelSnappedLayoutOverflowRect):
3710
3711 2013-05-03  Andreas Kling  <akling@apple.com>
3712
3713         StyleResolver: Have "list of matched rules" API vend internal types instead of CSSOM wrappers.
3714         <http://webkit.org/b/115563>
3715
3716         Reviewed by Antti Koivisto.
3717
3718         Change styleRulesForElement() and pseudoStyleRulesForElement() to return Vectors of StyleRuleBase
3719         instead of CSSRuleLists. This defers instantiating CSSOM wrappers until they're actually needed
3720         for exposure to web API.
3721
3722         * page/DOMWindow.cpp:
3723         (WebCore::DOMWindow::getMatchedCSSRules):
3724
3725             Create a StaticCSSRuleList and populate it with CSSOM wrappers for the matched rules.
3726             This is the one place where we expose this functionality to the web.
3727
3728         * css/ElementRuleCollector.h:
3729         * css/ElementRuleCollector.cpp:
3730         (WebCore::ElementRuleCollector::matchedRuleList):
3731         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
3732
3733             Collect internal StyleRuleBase pointers here instead of creating wrappers.
3734
3735         * css/StyleResolver.h:
3736         * css/StyleResolver.cpp:
3737         (WebCore::StyleResolver::styleRulesForElement):
3738         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3739
3740             Vend said pointers.
3741
3742         * editing/EditingStyle.cpp:
3743         (WebCore::styleFromMatchedRulesForElement):
3744
3745             Dodge CSSOM wrapper instantiation (Woop woop!)
3746
3747         * inspector/InspectorCSSAgent.h:
3748         * inspector/InspectorCSSAgent.cpp:
3749         (WebCore::InspectorCSSAgent::buildObjectForRule):
3750
3751             Split buildObjectForRule() into two versions, one for CSSStyleRule and one for StyleRule.
3752             The CSSStyleRule one doesn't need a special path for parent-less rules, since those always
3753             come in through the StyleRule interface instead. This factoring can be improved further
3754             after this change.
3755
3756         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
3757         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
3758         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3759
3760             Tweaked for changes in StyleResolver API.
3761
3762 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
3763
3764         REGRESSION (r145042): Downloading a file sometimes results in could not create
3765         a sandbox extension Console message and file stays as a .download file
3766         https://bugs.webkit.org/show_bug.cgi?id=115559
3767         <rdar://problem/13785101>
3768
3769         Reviewed by Sam Weinig.
3770
3771         CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
3772         creates a string with maximum possible buffer size. This was confusing resolveSymlinksInPath().
3773
3774         * platform/cf/FileSystemCF.cpp: (WebCore::fileSystemRepresentation):
3775         Change fileSystemRepresentation to be less surprising. Really, we should rip apart
3776         CString and update callers to use better defined semantics, but this is the one function
3777         that repeatedly causes problems in practice.
3778
3779 2013-05-03  Andreas Kling  <akling@apple.com>
3780
3781         CSSRule style declarations getters shouldn't be const.
3782         <http://webkit.org/b/115572>
3783
3784         Reviewed by Antti Koivisto.
3785
3786         Accessing the CSSStyleDeclaration for a CSSRule is a potentially mutating operation,
3787         and should not be const.
3788
3789         * css/CSSFontFaceRule.cpp:
3790         (WebCore::CSSFontFaceRule::style):
3791         * css/CSSFontFaceRule.h:
3792         * css/CSSPageRule.cpp:
3793         (WebCore::CSSPageRule::style):
3794         * css/CSSPageRule.h:
3795         * css/CSSStyleRule.cpp:
3796         (WebCore::CSSStyleRule::style):
3797         * css/CSSStyleRule.h:
3798         (CSSStyleRule):
3799         * css/WebKitCSSFilterRule.cpp:
3800         (WebCore::WebKitCSSFilterRule::style):
3801         * css/WebKitCSSFilterRule.h:
3802         * css/WebKitCSSKeyframeRule.cpp:
3803         (WebCore::WebKitCSSKeyframeRule::style):
3804         * css/WebKitCSSKeyframeRule.h:
3805         (WebKitCSSKeyframeRule):
3806         * css/WebKitCSSViewportRule.cpp:
3807         (WebCore::WebKitCSSViewportRule::style):
3808         * css/WebKitCSSViewportRule.h:
3809
3810 2013-05-03  Andreas Kling  <akling@apple.com>
3811
3812         Use NotNull tag for placement new in WebCore.
3813         <http://webkit.org/b/115569>
3814
3815         Reviewed by Antti Koivisto.
3816
3817         Avoid emitting null checks where we use placement new to construct objects into safe locations.
3818
3819         * css/StylePropertySet.cpp:
3820         (WebCore::ImmutableStylePropertySet::create):
3821         * dom/Element.cpp:
3822         (WebCore::ShareableElementData::createWithAttributes):
3823         (WebCore::ShareableElementData::ShareableElementData):
3824         (WebCore::UniqueElementData::makeShareableCopy):
3825         * dom/QualifiedName.cpp:
3826         (WebCore::QualifiedName::init):
3827         (WebCore::createQualifiedName):
3828         * dom/make_names.pl:
3829         (printNamesCppFile):
3830         * platform/ThreadGlobalData.h:
3831         (WebCore::threadGlobalData):
3832         * platform/graphics/GlyphPage.h:
3833         (WebCore::GlyphPage::createForMixedFontData):
3834
3835 2013-01-11  Andreas Kling  <akling@apple.com>
3836
3837         Simplify CSSSelectorList creation/adoption.
3838         <http://webkit.org/b/106649>
3839
3840         Reviewed by Antti Koivisto.
3841
3842         Remove the optimization that special-cased construction of CSSSelectorLists with a single entry.
3843         This is in preparation for changing the way we store the selector lists on style rules.
3844
3845         * css/CSSParser.h:
3846         * css/CSSSelector.h:
3847
3848             Remove move(PassOwnPtr<CSSSelector> from, CSSSelector* to), inlining it into
3849             CSSSelectorList::adoptSelectorVector instead.
3850
3851         * css/CSSSelectorList.cpp:
3852         (WebCore::CSSSelectorList::CSSSelectorList):
3853         (WebCore::CSSSelectorList::deleteSelectors):
3854
3855             Handle all selector list lengths the same way.
3856
3857         (WebCore::CSSSelectorList::adoptSelectorVector):
3858
3859             Merge move() from CSSSelector.h into this code since it was the only call site.
3860             Also some minor readability cleanups.
3861
3862 2013-05-03  Antti Koivisto  <antti@apple.com>
3863
3864         Remove HTMLShadowElement
3865         https://bugs.webkit.org/show_bug.cgi?id=115555
3866
3867         Reviewed by Andreas Kling.
3868
3869         This is not used internally.
3870
3871         * CMakeLists.txt:
3872         * DerivedSources.cpp:
3873         * DerivedSources.make:
3874         * DerivedSources.pri:
3875         * GNUmakefile.list.am:
3876         * Target.pri:
3877         * WebCore.vcproj/WebCore.vcproj:
3878         * WebCore.vcxproj/WebCore.vcxproj:
3879         * WebCore.vcxproj/WebCore.vcxproj.filters:
3880         * WebCore.xcodeproj/project.pbxproj:
3881         * dom/ComposedShadowTreeWalker.cpp:
3882         * dom/NodeRenderingContext.cpp:
3883         * html/HTMLElementsAllInOne.cpp:
3884         * html/HTMLTagNames.in:
3885         * html/InputType.cpp:
3886         (WebCore::InputType::destroyShadowSubtree):
3887         * html/shadow/ContentDistributor.cpp:
3888         (WebCore::ContentDistributor::distribute):
3889         * html/shadow/HTMLShadowElement.cpp: Removed.
3890         * html/shadow/HTMLShadowElement.h: Removed.
3891         * html/shadow/HTMLShadowElement.idl: Removed.
3892         * page/DOMWindow.idl:
3893
3894 2013-05-03  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3895
3896         Remove WTF::ListRefPtr class
3897         https://bugs.webkit.org/show_bug.cgi?id=115516
3898
3899         Reviewed by Anders Carlsson.
3900
3901         ListRefPtr was used only by FontFamily class, besides it strongly depended
3902         on FontFamily class semantics which made it non-generic and inappropriate
3903         for being present inside WTF.
3904
3905         This patch removes WTF::ListRefPtr class and moves its the functionality
3906         into FontFamily class.
3907
3908         No new tests, no change in the behavior.
3909
3910         * page/FrameTree.h:
3911         (FrameTree):
3912         * platform/graphics/FontFamily.h:
3913         (FontFamily):
3914         (WebCore::FontFamily::~FontFamily):
3915         (WebCore):
3916
3917 2013-05-03  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3918
3919         Crash when calling QWebFrame::evaluateJavaScript
3920         https://bugs.webkit.org/show_bug.cgi?id=113434
3921
3922         Reviewed by Simon Hausmann.
3923
3924         We must take the JS API lock before accessing internal JS methods.
3925
3926         * bridge/qt/qt_runtime.cpp:
3927         (JSC::Bindings::unwrapBoxedPrimitive):
3928         (JSC::Bindings::getGregorianDateTimeUTC):
3929         (JSC::Bindings::convertQVariantToValue):
3930
3931 2013-05-02  Xan Lopez  <xlopez@igalia.com>
3932
3933         [GTK] Fine tune dependencies for glslang generated files
3934         https://bugs.webkit.org/show_bug.cgi?id=115537
3935
3936         Reviewed by Martin Robinson.
3937
3938         Make glslang.* explictly depend on glslang_tab.*, since the
3939         dependency does exist. Otherwise Make might decide to compile
3940         things ahead of time and fail.
3941
3942         * GNUmakefile.am:
3943
3944 2013-05-02  KyungTae Kim  <ktf.kim@samsung.com>
3945
3946         Fix build warnings on ResourceHandleClient.h
3947         https://bugs.webkit.org/show_bug.cgi?id=115540
3948
3949         Reviewed by Alexey Proskuryakov.
3950
3951         Comment out the parameter names for 'getOrCreateReadBuffer' to fix -Wunused-parameter build warnings.
3952
3953         * platform/network/ResourceHandleClient.h:
3954         (WebCore::ResourceHandleClient::getOrCreateReadBuffer):
3955
3956 2013-05-02  Roger Fong  <roger_fong@apple.com>
3957
3958         Following r149463, set Path for WebCore makefile as well.
3959
3960         * WebCore.vcxproj/WebCore.make:
3961
3962 2013-05-02  Eric Carlson  <eric.carlson@apple.com>
3963
3964         Unreviewed fix for Mac Lion build after r149503.
3965
3966         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:
3967         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
3968
3969 2013-05-02  David Kilzer  <ddkilzer@apple.com>
3970
3971         BUILD FIX: Move Mac-only symbols into the shared symbol list
3972
3973         * WebCore.exp.in: Move symbols.
3974
3975 2013-05-02  Antti Koivisto  <antti@apple.com>
3976
3977         Shadow DOM removal: Get rid of ContentSelectorQuery
3978         https://bugs.webkit.org/show_bug.cgi?id=115533
3979
3980         Reviewed by Anders Carlsson.
3981
3982         This is only used for Shadow DOM distribution. <details> element works fine without it.
3983
3984         * CMakeLists.txt:
3985         * GNUmakefile.list.am:
3986         * Target.pri:
3987         * WebCore.vcproj/WebCore.vcproj:
3988         * WebCore.vcxproj/WebCore.vcxproj:
3989         * WebCore.vcxproj/WebCore.vcxproj.filters:
3990         * WebCore.xcodeproj/project.pbxproj:
3991         * html/shadow/ContentDistributor.cpp:
3992         (WebCore::ContentDistributor::distributeSelectionsTo):
3993         * html/shadow/ContentSelectorQuery.cpp: Removed.
3994         * html/shadow/ContentSelectorQuery.h: Removed.
3995         * html/shadow/HTMLContentElement.cpp:
3996
3997 2013-05-02  Arnaud Renevier  <a.renevier@sisa.samsung.com>
3998
3999         border-radius clipping a canvas does not always clip
4000         https://bugs.webkit.org/show_bug.cgi?id=113343
4001
4002         Reviewed by Simon Fraser.
4003
4004         clipToRect method clip context to clipRect, and then clip to rounded
4005         rect if clipRect has a radius. But currently, clipToRect exit early if
4006         clipToRect is equal to paintDirtyRect.
4007
4008         This patch allows clipping to rounded corner ever if clipToRect is
4009         equal to paintDirtyRect.
4010
4011         Test: fast/overflow/border-radius-clipping-2.html
4012
4013         * rendering/RenderLayer.cpp:
4014         (WebCore::RenderLayer::clipToRect):
4015
4016 2013-05-02  Eric Carlson  <eric.carlson@apple.com>
4017
4018         Caption menu does not include in-band captions
4019         https://bugs.webkit.org/show_bug.cgi?id=111934
4020
4021         Reviewed by Dean Jackson.
4022
4023         No new tests, upated existing tests for these changes.
4024
4025         * WebCore.xcodeproj/project.pbxproj: Add new files.
4026
4027         * html/HTMLMediaElement.cpp:
4028         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_legacyWebKitClosedCaptionsVisible.
4029         (WebCore::HTMLMediaElement::loadInternal): Clear the LoadMediaResource from m_pendingActionFlags
4030             in case there is a pending async load.
4031         (WebCore::HTMLMediaElement::configureTextTrackGroup): Always log the track score.
4032         (WebCore::HTMLMediaElement::configureTextTracks): Call configureTextTrackDisplay so 
4033             m_legacyWebKitClosedCaptionsVisible is always updated immediately.
4034         (WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Use m_legacyWebKitClosedCaptionsVisible.
4035         (WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Ditto.
4036         * html/HTMLMediaElement.h:
4037
4038         * page/CaptionUserPreferences.cpp:
4039         (WebCore::CaptionUserPreferences::CaptionUserPreferences): Initialize m_displayMode to ForcedOnly
4040             because it is no longer used for testing only.
4041         (WebCore::CaptionUserPreferences::notify): Post notifications when not in testing-only mode.
4042
4043         * page/CaptionUserPreferencesMac.h:
4044         * page/CaptionUserPreferencesMac.mm:
4045         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate a track score when
4046             webkitClosedCaptionsVisible has been set.
4047         (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Don't filter track list when we
4048             don't have the media accessibility framework. Make logging more informative.
4049         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
4050
4051         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
4052
4053         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
4054         (WebCore::InbandTextTrackPrivateAVFObjC::create): Take a AVFInbandTrackParent instead of a
4055             MediaPlayerPrivateAVFoundationObjC.
4056         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
4057         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
4058
4059         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Added.
4060         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm: Added.
4061
4062         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
4063         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
4064         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): We only have legible output when
4065             HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT is defined.
4066         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
4067         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
4068         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Create a legacy CC track if
4069             there are no media selection options and there is a CC AVAssetTrack.
4070         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyCCTracks): New, process CC tracks.
4071         (WebCore::MediaPlayerPrivateAVFoundationObjC::processNewAndRemovedTextTracks): New, refactored
4072             common setup/cleanup code from processMediaSelectionOptions.
4073         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Renamed from