Remove unused method and de-virtualize others in Element.h
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-08  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Remove unused method and de-virtualize others in Element.h
4         https://bugs.webkit.org/show_bug.cgi?id=115770
5
6         Reviewed by Andreas Kling.
7
8         Merge https://chromium.googlesource.com/chromium/blink/+/c2c2ff9cb69f46f5cc9d289b2bfbdb8ab5bd3e49
9
10         The de-virtualization possibilities were noted whilst "FINALizing" the Node
11         hierarchy. If a method is successfully marked FINAL but then fails when marked
12         OVERRIDE as well, the method by definition does not need to be virtual.
13
14         * WebCore.exp.in:
15         * dom/Element.h:
16         (WebCore::Element::hasAuthorShadowRoot):
17
18 2013-05-06  Darin Adler  <darin@apple.com>
19
20         Use adoptCF and adoptNS in more places
21         https://bugs.webkit.org/show_bug.cgi?id=115657
22
23         Reviewed by Sam Weinig.
24
25         This is similar to my last set of changes, but covers code that I missed with
26         global replace using the Safari Xcode workspace.
27
28         * platform/cf/win/CertificateCFWin.cpp:
29         (WebCore::copyCertificateToData):
30         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
31         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
32         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
33         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
34         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
35         (WebCore::MediaPlayerPrivateAVFoundationCF::totalBytes):
36         (WebCore::mimeTypeCache):
37         (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged):
38         (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged):
39         (WebCore::AVFWrapper::createAssetForURL):
40         (WebCore::AVFWrapper::createPlayer):
41         (WebCore::AVFWrapper::createPlayerItem):
42         (WebCore::AVFWrapper::setAsset):
43         (WebCore::AVFWrapper::platformLayer):
44         (WebCore::AVFWrapper::createAVCFVideoLayer):
45         (WebCore::AVFWrapper::createImageGenerator):
46         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
47         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::language):
48         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
49         (toCACFTimingFunction):
50         (PlatformCAAnimation::PlatformCAAnimation):
51         (PlatformCAAnimation::setFromValue):
52         (PlatformCAAnimation::setToValue):
53         (PlatformCAAnimation::setValues):
54         (PlatformCAAnimation::setKeyTimes):
55         (PlatformCAAnimation::setTimingFunctions):
56         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
57         (PlatformCALayer::PlatformCALayer):
58         (PlatformCALayer::setBackgroundColor):
59         (PlatformCALayer::setBorderColor):
60         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
61         (PlatformCALayerWinInternal::PlatformCALayerWinInternal):
62         (PlatformCALayerWinInternal::addTile):
63         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
64         (WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost):
65         * platform/graphics/gstreamer/PlatformVideoWindowMac.mm:
66         (PlatformVideoWindow::PlatformVideoWindow):
67         * platform/graphics/win/FontCustomPlatformData.cpp:
68         (WebCore::FontCustomPlatformData::fontPlatformData):
69         * platform/graphics/win/FontPlatformDataCGWin.cpp:
70         (WebCore::getPostScriptName):
71         (WebCore::FontPlatformData::platformDataInit):
72         * platform/graphics/win/GraphicsContextCGWin.cpp:
73         (WebCore::GraphicsContext::drawWindowsBitmap):
74         * platform/graphics/win/ImageCGWin.cpp:
75         (WebCore::BitmapImage::create):
76         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
77         (WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
78         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
79         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::rfc2616DateStringFromTime):
80         (WebCore::QTCFDictionaryCreateWithDataCallback):
81         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
82         * platform/graphics/win/WKCAImageQueue.cpp:
83         (WebCore::WKCAImageQueue::WKCAImageQueue):
84         * platform/image-decoders/ImageDecoder.h:
85         (WebCore::ImageDecoder::qcmsOutputDeviceProfile):
86         * platform/network/cf/AuthenticationCF.cpp:
87         (WebCore::core):
88         * platform/network/cf/CookieJarCFNet.cpp:
89         (WebCore::cookieDomain):
90         (WebCore::cookieName):
91         (WebCore::cookiePath):
92         (WebCore::cookieValue):
93         (WebCore::filterCookies):
94         (WebCore::setCookiesFromDOM):
95         (WebCore::cookiesForDOM):
96         (WebCore::cookieRequestHeaderFieldValue):
97         (WebCore::getRawCookies):
98         (WebCore::deleteCookie):
99         (WebCore::getHostnamesWithCookies):
100         (WebCore::deleteCookiesForHostname):
101         * platform/network/curl/ResourceHandleManager.cpp:
102         (WebCore::certificatePath):
103         * platform/win/ClipboardUtilitiesWin.cpp:
104         (WebCore::urlFromPath):
105         (WebCore::getURL):
106         * platform/win/LocalizedStringsWin.cpp:
107         (WebCore::createWebKitBundle):
108         (WebCore::localizedString):
109         * platform/win/SearchPopupMenuWin.cpp:
110         (WebCore::SearchPopupMenuWin::saveRecentSearches):
111         (WebCore::SearchPopupMenuWin::loadRecentSearches):
112         * plugins/mac/PluginPackageMac.cpp:
113         (WebCore::stringListFromResourceId):
114         (WebCore::PluginPackage::fetchInfo):
115         (WebCore::PluginPackage::load):
116         * plugins/mac/PluginViewMac.mm:
117         (WebCore::PluginView::platformStart):
118         * rendering/RenderThemeSafari.cpp:
119         (WebCore::RenderThemeSafari::platformFocusRingColor):
120         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
121         (WebCore::RenderThemeSafari::paintSliderTrack):
122         Use adoptCF and adoptNS throughout.
123
124 2013-05-07  Benjamin Poulain  <bpoulain@apple.com>
125
126         Make CanvasStyle's CMYKAValues allocated on the heap and move the pointer in the union.
127         https://bugs.webkit.org/show_bug.cgi?id=115764
128
129         Reviewed by Andreas Kling.
130
131         CMYKA input is uncommon enough that we should not pay the price for
132         every CanvasStyle.
133         Make those values heap allocated and put the pointer in the union. Since
134         the RGBA32 values are needed for CMYKA, a RGBA32 value is added to the structure.
135
136         * html/canvas/CanvasStyle.cpp:
137         (WebCore::CanvasStyle::CanvasStyle):
138         (WebCore::CanvasStyle::~CanvasStyle):
139         (WebCore::CanvasStyle::isEquivalentColor):
140         (WebCore::CanvasStyle::isEquivalentCMYKA):
141         (WebCore::CanvasStyle::applyStrokeColor):
142         (WebCore::CanvasStyle::applyFillColor):
143         * html/canvas/CanvasStyle.h:
144         (CanvasStyle):
145         (CMYKAValues):
146         (WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
147         (WebCore::CanvasStyle::color):
148         (WebCore):
149
150 2013-05-07  Darin Adler  <darin@apple.com>
151
152         Use OwnPtr instead of deleteAllValues for requests in PluginView
153         https://bugs.webkit.org/show_bug.cgi?id=115731
154
155         Reviewed by Sam Weinig.
156
157         * plugins/PluginView.cpp:
158         (WebCore::PluginView::~PluginView): Removed the call to deleteAllValues.
159         (WebCore::PluginView::requestTimerFired): Use release to remove an OwnPtr
160         from m_requests rather than an explicit delete. Also use !isEmpty instead
161         of size > 0.
162         (WebCore::PluginView::scheduleRequest): Changed argument type to PassOwnPtr.
163         (WebCore::PluginView::load): Use adoptPtr to call scheduleRequest.
164
165         * plugins/PluginView.h: Changed argument type of scheduleRequest to
166         PassOwnPtr, and m_requests to a Vector<OwnPtr>.
167
168 2013-05-07  Antti Koivisto  <antti@apple.com>
169
170         Remove SelectRuleFeatureSet
171         https://bugs.webkit.org/show_bug.cgi?id=115757
172
173         Reviewed by Benjamin Poulain.
174
175         This is dead code.
176
177         * CMakeLists.txt:
178         * GNUmakefile.list.am:
179         * Target.pri:
180         * WebCore.exp.in:
181         * WebCore.vcproj/WebCore.vcproj:
182         * WebCore.xcodeproj/project.pbxproj:
183         * dom/Element.cpp:
184         (WebCore::Element::attributeChanged):
185         (WebCore):
186         (WebCore::Element::didAffectSelector):
187         * dom/Element.h:
188         (Element):
189         * dom/ElementShadow.h:
190         (WebCore::ElementShadow::invalidateDistribution):
191         * html/shadow/ContentDistributor.cpp:
192         (WebCore::ContentDistributor::ContentDistributor):
193         (WebCore):
194         * html/shadow/ContentDistributor.h:
195         (ContentDistributor):
196         * html/shadow/InsertionPoint.cpp:
197         (WebCore::InsertionPoint::insertedInto):
198         (WebCore::InsertionPoint::removedFrom):
199         * html/shadow/InsertionPoint.h:
200         (InsertionPoint):
201         * html/shadow/SelectRuleFeatureSet.cpp: Removed.
202         * html/shadow/SelectRuleFeatureSet.h: Removed.
203         * testing/Internals.cpp:
204         (WebCore):
205         * testing/Internals.idl:
206
207 2013-05-07  Anders Carlsson  <andersca@apple.com>
208
209         Store the quotes in the same allocation as the QuotesData object
210         https://bugs.webkit.org/show_bug.cgi?id=115768
211
212         Reviewed by Andreas Kling.
213
214         Since the QuotesData object is immutable we don't need a Vector to store the quote pairs,
215         they can just be stored after the class data.
216
217         * rendering/style/QuotesData.cpp:
218         (WebCore::sizeForQuotesDataWithQuoteCount):
219         Helper function for computing the allocation size.
220
221         (WebCore::QuotesData::create):
222         Use fastMalloc + placement new.
223
224         (WebCore::QuotesData::QuotesData):
225         Use placement new to allocate the quote pairs.
226
227         (WebCore::QuotesData::~QuotesData):
228         Destroy the quote pairs.
229
230         (WebCore::QuotesData::openQuote):
231         Stop using Vector.
232
233         (WebCore::QuotesData::closeQuote):
234         Ditto.
235
236         (WebCore::operator==):
237         Ditto.
238
239         * rendering/style/QuotesData.h:
240
241 2013-05-07  Benjamin Poulain  <bpoulain@apple.com>
242
243         We should not ref() the RefPtr twice in CanvasStyle
244
245         Reviewed by Darin Adler.
246
247         * html/canvas/CanvasStyle.cpp:
248         (WebCore::CanvasStyle::CanvasStyle):
249         We leak the ref of PassRefPtr, we should not ref() it a second time.
250
251 2013-05-07  Ryosuke Niwa  <rniwa@webkit.org>
252
253         Devirtualize Document class type checking
254         https://bugs.webkit.org/show_bug.cgi?id=115755
255
256         Reviewed by Benjamin Poulain.
257
258         Merge https://chromium.googlesource.com/chromium/blink/+/dae5adc768d5ce6bff301df6515745da8ea24950
259
260         Document has a bunch of virtual bool is*Document() methods on it, but it also has
261         two bools for XHTML and HTML documents which is silly. We can merge them all
262         together into an enum of values and devirtualize the type checking methods.
263
264         * dom/Document.cpp:
265         (WebCore::Document::Document):
266         (WebCore::Document::createElement):
267         * dom/Document.h:
268         (WebCore::Document::create):
269         (WebCore::Document::createXHTML):
270         (WebCore::Document::isHTMLDocument):
271         (WebCore::Document::isXHTMLDocument):
272         (WebCore::Document::isImageDocument):
273         (WebCore::Document::isSVGDocument):
274         (WebCore::Document::isPluginDocument):
275         (WebCore::Document::isMediaDocument):
276         (WebCore::Document):
277         * html/HTMLDocument.cpp:
278         (WebCore::HTMLDocument::HTMLDocument):
279         * html/HTMLDocument.h:
280         (WebCore::HTMLDocument):
281         * html/ImageDocument.cpp:
282         (WebCore::ImageDocument::ImageDocument):
283         * html/ImageDocument.h:
284         (WebCore::ImageDocument):
285         * html/MediaDocument.cpp:
286         (WebCore::MediaDocument::MediaDocument):
287         * html/MediaDocument.h:
288         (WebCore::MediaDocument):
289         * html/PluginDocument.cpp:
290         (WebCore::PluginDocument::PluginDocument):
291         * html/PluginDocument.h:
292         (WebCore::PluginDocument):
293         * loader/PlaceholderDocument.h:
294         (WebCore::PlaceholderDocument::PlaceholderDocument):
295         * svg/SVGDocument.cpp:
296         (WebCore::SVGDocument::SVGDocument):
297         * svg/SVGDocument.h:
298         (WebCore::SVGDocument):
299
300 2013-05-07  Anders Carlsson  <andersca@apple.com>
301
302         Begin unraveling the mess that is QuotesData
303         https://bugs.webkit.org/show_bug.cgi?id=115765
304
305         Reviewed by Andreas Kling.
306
307         Change QuotesData to be an immutable object and fix other things that are broken.
308
309         * css/StyleResolver.cpp:
310         (WebCore::StyleResolver::applyProperty):
311         QuotesData::addPair is gone. Instead, create the Vector up front and pass it to QuotesData.
312
313         * rendering/RenderQuote.cpp:
314         (WebCore::RenderQuote::originalText):
315         Update for renames.
316
317         * rendering/style/QuotesData.cpp:
318         (WebCore::QuotesData::create):
319         Remove the create overload that wasn't used. Add a new create overload that takes a Vector.
320
321         (WebCore::QuotesData::openQuote):
322         Rename this from getOpenQuote and clean it up.
323
324         (WebCore::QuotesData::closeQuote):
325         Rename this from getCloseQuote and clean it up.
326
327         (WebCore::operator==):
328         Replace the equals member function with a proper equality operator.
329
330         * rendering/style/RenderStyle.cpp:
331         (WebCore::RenderStyle::diff):
332         Stop calling QuotesData::equals. Use the same idiom as used for other properties.
333
334         (WebCore::RenderStyle::setQuotes):
335         * rendering/style/StyleRareInheritedData.cpp:
336         Use operator==.
337
338         (WebCore::quotesDataEquivalent):
339         Add helper function.
340
341         (WebCore::StyleRareInheritedData::operator==):
342         Call quotesDataEquivalent.
343
344 2013-05-06  Enrica Casucci  <enrica@apple.com>
345
346         Support -webkit-system-font on OS X.
347         https://bugs.webkit.org/show_bug.cgi?id=115758
348         <rdar://problem/13433854>
349
350         Reviewed by Dean Jackson.
351
352         Test: platform/mac/fast/text/systemFont.html
353
354         * platform/mac/WebFontCache.mm:
355         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
356
357 2013-05-07  Benjamin Poulain  <bpoulain@apple.com>
358
359         Move CanvasGradient and CanvasPattern in the union of CanvasStyle
360         https://bugs.webkit.org/show_bug.cgi?id=115759
361
362         Reviewed by Andreas Kling.
363
364         The Gradient and Pattern are exclusive with the other values, but they
365         were left out of the union because they are ref-counted.
366
367         This patch moves them in the union, and simply does the ref-counting manually.
368
369         * html/canvas/CanvasStyle.cpp:
370         (WebCore::CanvasStyle::CanvasStyle):
371         (WebCore::CanvasStyle::~CanvasStyle):
372         * html/canvas/CanvasStyle.h:
373         (CanvasStyle):
374         (WebCore::CanvasStyle::canvasGradient):
375         (WebCore::CanvasStyle::canvasPattern):
376
377 2013-05-07  Anders Carlsson  <andersca@apple.com>
378
379         Remove custom allocator support from PODArena
380         https://bugs.webkit.org/show_bug.cgi?id=115762
381
382         Reviewed by Andreas Kling.
383
384         Nobody uses PODArena with a custom allocator, so just get rid of it and always use fastMalloc/fastFree.
385
386         * platform/PODArena.h:
387         (WebCore::PODArena::PODArena):
388         (WebCore::PODArena::allocateBase):
389         (WebCore::PODArena::Chunk::Chunk):
390         (WebCore::PODArena::Chunk::~Chunk):
391         (Chunk):
392         * platform/PODFreeListArena.h:
393         (WebCore::PODFreeListArena::allocate):
394         (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
395
396 2013-05-07  Anders Carlsson  <andersca@apple.com>
397
398         Clean up KeyframeValueList and related classes
399         https://bugs.webkit.org/show_bug.cgi?id=115738
400
401         Reviewed by Simon Fraser.
402
403         Add static create() functions to the AnimationValue subclasses, and change a bunch of parameters
404         and return values that can never be null from pointer types to reference types to better indicate this.
405
406         * platform/graphics/GraphicsLayer.cpp:
407         (WebCore::filterOperationsAt):
408         (WebCore::GraphicsLayer::validateFilterOperations):
409         (WebCore::operationsAt):
410         (WebCore::GraphicsLayer::validateTransformOperations):
411         * platform/graphics/GraphicsLayer.h:
412         (AnimationValue):
413         (WebCore::AnimationValue::AnimationValue):
414         (WebCore::FloatAnimationValue::create):
415         (FloatAnimationValue):
416         (WebCore::FloatAnimationValue::FloatAnimationValue):
417         (WebCore::TransformAnimationValue::create):
418         (TransformAnimationValue):
419         (WebCore::TransformAnimationValue::value):
420         (WebCore::TransformAnimationValue::TransformAnimationValue):
421         (WebCore::FilterAnimationValue::create):
422         (WebCore::FilterAnimationValue::value):
423         (WebCore::FilterAnimationValue::FilterAnimationValue):
424         (FilterAnimationValue):
425         (WebCore::KeyframeValueList::~KeyframeValueList):
426         (KeyframeValueList):
427         (WebCore::KeyframeValueList::at):
428         * platform/graphics/ca/GraphicsLayerCA.cpp:
429         (WebCore::animationHasStepsTimingFunction):
430         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
431         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
432         (WebCore::GraphicsLayerCA::timingFunctionForAnimationValue):
433         (WebCore::GraphicsLayerCA::setAnimationEndpoints):
434         (WebCore::GraphicsLayerCA::setAnimationKeyframes):
435         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
436         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
437         (WebCore::GraphicsLayerCA::setFilterAnimationEndpoints):
438         (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
439         * platform/graphics/ca/GraphicsLayerCA.h:
440         (GraphicsLayerCA):
441         * rendering/RenderLayerBacking.cpp:
442         (WebCore::RenderLayerBacking::startAnimation):
443         (WebCore::RenderLayerBacking::startTransition):
444
445 2013-05-07  Anders Carlsson  <andersca@apple.com>
446
447         Add and remove databases and origins from the database tracker
448         https://bugs.webkit.org/show_bug.cgi?id=115752
449
450         Reviewed by Andreas Kling.
451
452         Add symbols needed by WebKit2.
453
454         * WebCore.exp.in:
455
456 2013-05-07  Beth Dakin  <bdakin@apple.com>
457
458         Still possible to fire paint-related LayoutMilestones before CA has committed the 
459         changes
460         https://bugs.webkit.org/show_bug.cgi?id=115753
461         -and corresponding-
462         <rdar://problem/13822315>
463
464         Reviewed by Simon Fraser.
465
466         To ensure we wait for the CA commit, we should wait until the end of the runloop 
467         with a zero-delay timer.
468
469         * rendering/RenderLayerCompositor.cpp:
470         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
471         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
472         (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
473         (WebCore):
474         * rendering/RenderLayerCompositor.h:
475         (RenderLayerCompositor):
476
477 2013-05-07  Chris Fleizach  <cfleizach@apple.com>
478
479         Bug 115694 - Fix bad cast to RenderHTMLCanvas
480         https://bugs.webkit.org/show_bug.cgi?id=115694
481
482         Reviewed by Ryosuke Niwa.
483
484         Don't cast to RenderHTML until we check what kind of object it is.
485
486         * accessibility/AccessibilityRenderObject.cpp:
487         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
488
489 2013-05-07  Anders Carlsson  <andersca@apple.com>
490
491         The storage database tracker should know when databases come and go
492         https://bugs.webkit.org/show_bug.cgi?id=115748
493
494         Reviewed by Andreas Kling.
495
496         Export symbol needed by WebKit2.
497
498         * WebCore.exp.in:
499
500 2013-05-07  Darin Adler  <darin@apple.com>
501
502         Use OwnPtr instead of deleteAllValues in SVGResourcesCache
503         https://bugs.webkit.org/show_bug.cgi?id=115729
504
505         Reviewed by Benjamin Poulain.
506
507         * rendering/svg/SVGResourcesCache.cpp:
508         (WebCore::SVGResourcesCache::~SVGResourcesCache): Removed call to deleteAllValues.
509         (WebCore::SVGResourcesCache::addResourcesFromRenderObject): Use adoptPtr and release
510         to create new SVGResources object.
511         (WebCore::SVGResourcesCache::removeResourcesFromRenderObject): Use take to remove
512         the SVGResources from the map rather than a get combined with delete/take.
513         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Removed unneeded
514         call to contains, since get already returns 0 if there is no item in the map.
515         (WebCore::SVGResourcesCache::resourceDestroyed): Use typedef for the map type so
516         we don't have to repeat the type.
517
518         * rendering/svg/SVGResourcesCache.h: Added typedef CacheMap, and changed value
519         type to OwnPtr.
520
521 2013-05-07  Anders Carlsson  <andersca@apple.com>
522
523         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
524         https://bugs.webkit.org/show_bug.cgi?id=115711
525
526         Reviewed by Andreas Kling.
527
528         Export SQLiteDatabase::close.
529
530         * WebCore.exp.in:
531
532 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
533
534         Add an 'isReadOnly' member to IDL parse tree structure
535         https://bugs.webkit.org/show_bug.cgi?id=115704
536
537         Reviewed by Kentaro Hara.
538
539         Add an 'isReadOnly' member to IDL parse tree structure by merging
540         https://chromium.googlesource.com/chromium/blink/+/d6add80ecd08bcd88a6ae0e1698d929830b3bd8b
541         and update Objective-C, C++, and GObject binding generators to use isReadOnly.
542
543         * bindings/scripts/CodeGeneratorCPP.pm:
544         (GenerateHeader):
545         (GenerateImplementation):
546         * bindings/scripts/CodeGeneratorGObject.pm:
547         (GetWriteableProperties):
548         (GenerateProperty):
549         (GenerateFunctions):
550         * bindings/scripts/CodeGeneratorJS.pm:
551         (IsReadonly):
552         * bindings/scripts/CodeGeneratorObjC.pm:
553         (GenerateHeader):
554         (GenerateImplementation):
555         * bindings/scripts/IDLParser.pm:
556         (parseAttributeRest):
557         (parseExceptionField):
558         (parseAttributeRestOld):
559
560 2013-05-07  Darin Adler  <darin@apple.com>
561
562         Use OwnPtr instead of deleteAllValues in SMILTimeContainer
563         https://bugs.webkit.org/show_bug.cgi?id=115730
564
565         Reviewed by Geoffrey Garen.
566
567         * svg/animation/SMILTimeContainer.cpp:
568         (WebCore::SMILTimeContainer::~SMILTimeContainer): Removed call to deleteAllValues.
569         (WebCore::SMILTimeContainer::schedule): Use add instead of get/set to put a new
570         AnimationsVector into the map as needed.
571         (WebCore::SMILTimeContainer::setElapsed): Added get since values are OwnPtr now.
572         (WebCore::SMILTimeContainer::updateAnimations): Ditto.
573
574         * svg/animation/SMILTimeContainer.h: Changed value type of GroupedAnimationsMap
575         to OwnPtr instead of raw pointer.
576
577 2013-05-07  Anders Carlsson  <andersca@apple.com>
578
579         Remove AlwaysInline.h from WTF
580         https://bugs.webkit.org/show_bug.cgi?id=115727
581
582         Reviewed by Brent Fulgham.
583
584         The macro that used to be in AlwaysInline.h is now in Compiler.h so there's no reason
585         to keep AlwaysInline.h around anymore.
586
587         * WebCore.vcproj/WebCore.vcproj:
588         * bindings/js/JSDOMWindowCustom.h:
589         * bindings/scripts/CodeGeneratorJS.pm:
590         (GenerateHeader):
591         * platform/graphics/filters/FEConvolveMatrix.h:
592         * rendering/InlineIterator.h:
593         * rendering/InlineTextBox.cpp:
594         * rendering/RenderBlockLineLayout.cpp:
595         * rendering/RenderText.cpp:
596
597 2013-05-07  peavo@outlook.com  <peavo@outlook.com>
598
599         [Curl] POST requests sometimes fail.
600         https://bugs.webkit.org/show_bug.cgi?id=111844
601
602         Reviewed by Brent Fulgham.
603
604         Curl adds the header 'Expect: 100-Continue' when sending a POST request.
605         When we receive the header 'HTTP/1.1 100 Continue', we should not call
606         ResourceHandleClient::didReceiveResponse(), as this will cancel the request,
607         because the MIME type is empty in this case, causing the POST request to fail.
608         This header is only sent as an info header, or provisional response.
609         
610         In addition, this patch changes the classification of http code 304 (Not modified).
611         It is not reported as a redirect anymore, but as a response
612         (ResourceHandleClient::didReceiveResponse() is called.
613
614         * platform/network/curl/ResourceHandleManager.cpp:
615         (WebCore::isHttpInfo): Added helper method to determine if http code is http info.
616         (WebCore::isHttpRedirect): Added helper method to determine if http code is http redirect.
617         (WebCore::headerCallback): Just return when receiving the header'HTTP/1.1 100 Continue'.
618
619 2013-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
620
621         [X11][BlackBerry] Check if MOZ_X11 is defined instead of XP_UNIX npruntime_internal.h
622         https://bugs.webkit.org/show_bug.cgi?id=113687
623
624         Reviewed by Anders Carlsson.
625
626         It's assumed that all UNIX platforms use X11 for plugins, which is
627         not the case of BlackBerry.
628
629         * bridge/npruntime_internal.h: Use MOZ_X11 instead of XP_UNIX.
630
631 2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
632
633         HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
634         https://bugs.webkit.org/show_bug.cgi?id=115646
635
636         Reviewed by Darin Adler.
637
638         No new tests, no new functionality.
639
640         * accessibility/AXObjectCache.cpp:
641         (WebCore::AXObjectCache::get):
642         (WebCore::AXObjectCache::remove):
643         * accessibility/AXObjectCache.h:
644         (WebCore::AXObjectCache::objectFromAXID):
645         * css/CSSImageGeneratorValue.cpp:
646         (WebCore::CSSImageGeneratorValue::getImage):
647         * css/InspectorCSSOMWrappers.cpp:
648         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
649         * css/StyleResolver.cpp:
650         (WebCore::StyleResolver::loadPendingSVGDocuments):
651         * html/HTMLAnchorElement.cpp:
652         (WebCore::HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown):
653         * html/HTMLFormElement.cpp:
654         (WebCore::HTMLFormElement::elementForAlias):
655         * html/shadow/ContentDistributor.cpp:
656         (WebCore::ContentDistributor::findInsertionPointFor):
657         * loader/appcache/ApplicationCache.cpp:
658         (WebCore::ApplicationCache::resourceForURL):
659         * loader/archive/ArchiveResourceCollection.cpp:
660         (WebCore::ArchiveResourceCollection::archiveResourceForURL):
661         * page/PageGroup.cpp:
662         (WebCore::PageGroup::transientLocalStorage):
663         * page/animation/CompositeAnimation.cpp:
664         (WebCore::CompositeAnimation::updateTransitions):
665         (WebCore::CompositeAnimation::pauseTransitionAtTime):
666         * platform/graphics/ca/GraphicsLayerCA.cpp:
667         (WebCore::GraphicsLayerCA::updateMaskLayer):
668         * platform/network/BlobRegistryImpl.cpp:
669         (WebCore::BlobRegistryImpl::getBlobDataFromURL):
670         * plugins/PluginDatabase.cpp:
671         (WebCore::PluginDatabase::pluginForMIMEType):
672         (WebCore::PluginDatabase::MIMETypeForExtension):
673         * rendering/RenderCounter.cpp:
674         (WebCore::makeCounterNode):
675         (showCounterRendererTree):
676         * svg/graphics/filters/SVGFilterBuilder.cpp:
677         (WebCore::SVGFilterBuilder::getEffectById):
678             Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
679
680 2013-05-06  Darin Adler  <darin@apple.com>
681
682         Use OwnPtr instead of deleteAllValues in KeyframeValueList
683         https://bugs.webkit.org/show_bug.cgi?id=115652
684
685         Reviewed by Simon Fraser.
686
687         Also made a few related style fixes in the functions touched.
688
689         * platform/graphics/GraphicsLayer.cpp:
690         (WebCore::KeyframeValueList::insert): Change argument type to PassOwnPtr
691         and update use of m_values since it has OwnPtr now instead of raw pointer.
692
693         * platform/graphics/GraphicsLayer.h: Move conditional includes to a
694         separate paragraph, removed an unneeded forward class declaration.
695         (WebCore::AnimationValue::AnimationValue): Marked this constructor explicit
696         and removed an unneeded if statement.
697         (WebCore::AnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
698         (WebCore::FloatAnimationValue::clone): Changed this to return a PassOwnPtr.
699         (WebCore::TransformAnimationValue::TransformAnimationValue): Marked explicit.
700         (WebCore::TransformAnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
701         (WebCore::FilterAnimationValue::FilterAnimationValue): Marked explicit.
702         (WebCore::FilterAnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
703         (WebCore::KeyframeValueList::KeyframeValueList): Marked explicit.
704         (WebCore::KeyframeValueList::~KeyframeValueList): Removed, since the default
705         destructor works without an explicit deleteAllValues call.
706         (WebCore::KeyframeValueList::at): Added call to get needed since the vector
707         contains OwnPtr now.
708         (WebCore::KeyframeValueList::insert): Changed to take PassOwnPtr and then
709         removed now-redundant comment saying "takes ownership of the pointer".
710         (WebCore::KeyframeValueList::m_values): Changed type to Vector<OwnPtr>.
711
712         * rendering/RenderLayerBacking.cpp:
713         (WebCore::RenderLayerBacking::startAnimation): Added adoptPtr next to the
714         all the places new was done before calling KeyframeValueList::insert. Also
715         simplified the booleans and #if in this function.
716         (WebCore::RenderLayerBacking::startTransition): Ditto.
717
718 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
719
720         [Replaceable] attributes must be readonly
721         https://bugs.webkit.org/show_bug.cgi?id=115692
722
723         Reviewed by Kentaro Hara.
724
725         Merge https://chromium.googlesource.com/chromium/blink/+/ac61fbfe875d3c3c37d529683139ceb0ad4330bb.
726
727         Web IDL specification says [Replaceable] attributes are readonly:
728         http://www.w3.org/TR/2012/CR-WebIDL-20120419/#Replaceable
729
730         Update the two instances of [Replaceable] in WebCore that didn't have readonly modifier to match
731         the specifcation and the rest of WebCore. There should be no behavioral changes as the code generator
732         already assumed [Replaceable] attributes are readonly.
733
734         * html/HTMLDocument.idl:
735         * page/DOMWindow.idl:
736
737 2013-05-06  Darin Adler  <darin@apple.com>
738
739         Use OwnPtr instead of deleteAllValues in DocumentMarkerController
740         https://bugs.webkit.org/show_bug.cgi?id=115655
741
742         Reviewed by Andreas Kling.
743
744         * dom/DocumentMarkerController.cpp:
745         (WebCore::DocumentMarkerController::~DocumentMarkerController): Added here
746         so the destructor isn't implicitly inline.
747         (WebCore::DocumentMarkerController::detach): Removed now-unneeded code to
748         call deleteAllValues. Also moved code to set m_possiblyExistingMarkerTypes
749         to after clearing m_markers to be consistent with how other functions do it.
750         (WebCore::DocumentMarkerController::addMarker): Changed code to use the
751         add idiom to avoid double hash table lookup. Changed to use adoptPtr since
752         the map now contains OwnPtr.
753         (WebCore::DocumentMarkerController::removeMarkers): Removed explicit calls
754         to delete list since removing the entry from the map now deletes the list.
755         Moved the code to check if m_markers has become empty so it's only called
756         when we actually remove something from m_markers.
757         (WebCore::DocumentMarkerController::markerContainingPoint): Added get().
758         (WebCore::DocumentMarkerController::renderedRectsForMarkers): Added get().
759         (WebCore::DocumentMarkerController::removeMarkers): Changed to use a new
760         interface to removeMarkersFromList. This eliminated the need to copy the
761         entire map when removing markers; instead we can just copy the keys.
762         (WebCore::DocumentMarkerController::removeMarkersFromList): Changed to use
763         an iterator instead of being passed the key/value pair from the map. Also
764         rearranged the logic so there is less repeated code and removed some now-
765         unneeded comments.
766         (WebCore::DocumentMarkerController::repaintMarkers): Added get().
767         (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
768         Added get().
769         (WebCore::DocumentMarkerController::showMarkers): Added get().
770
771         * dom/DocumentMarkerController.h: Removed implementation of the destructor
772         that called the detach function; that was just sharing the now-unneeded
773         call to deleteAllValues. Changed the type of the map to use an OwnPtr for
774         the value. Changed the interface of removeMarkersFromList to take a map
775         iterator instead of a key/value pair.
776
777 2013-05-06  Beth Dakin  <bdakin@apple.com>
778
779         Reproducible crash in RenderBoxModelObject::adjustedPositionRelativeToOffsetParent()
780         https://bugs.webkit.org/show_bug.cgi?id=115685
781         -and corresponding-
782         <rdar://problem/13700734>
783
784         Reviewed by Sam Weinig.
785
786         This fix here is just to rollout the change that caused this regression, which is 
787         http://trac.webkit.org/changeset/147395 . That change was not intended to cause any 
788         behavioral differences. The change made it so RenderObject::offsetParent() returned 
789         an Element* instead of a RenderBoxModelObject*. However, can muddle things when the 
790         object we are returning is a continuation. Multiple RenderObjects have the same 
791         Element in a continuation, so this new code can lead to a crash in 
792         adjustedPositionRelativeToOffsetParent() when we expect to walk the RenderObject 
793         chain and find the offsetParent in the Element’s parent chain. But we might crash in 
794         some complicated continuation scenarios because we lost this disambiguation of which 
795         RenderObject to start with.
796
797         Roll out.
798         * dom/Element.cpp:
799         (WebCore::Element::offsetParent):
800         * rendering/RenderBoxModelObject.cpp:
801         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
802         * rendering/RenderObject.cpp:
803         (WebCore::RenderObject::offsetParent):
804         * rendering/RenderObject.h:
805         (RenderObject):
806
807 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
808
809         Unify ways to cache named item in HTMLCollections
810         https://bugs.webkit.org/show_bug.cgi?id=115584
811
812         Reviewed by Antti Koivisto.
813
814         Refactor the code to share the same infrastructure for both id and name attributes maps.
815
816         Also get rid of shouldRegisterAsNamedItem and shouldRegisterAsExtraNamedItem from various Element subclasses
817         as these member functions were duplicating the information in HTMLNameCollection.cpp. Nevertheless, HTMLImageElement
818         and HTMLObjectElement still update HTMLDocument's window and document name getter maps when their presence as named
819         item changes due to an attribute change and children changes respectively.
820
821         * bindings/js/JSDOMWindowCustom.cpp:
822         (WebCore::namedItemGetter): Use windowNamedItemMap().containsSingle() instead of collection->hasExactlyOneItem() to
823         avoid instantiating HTMLCollection until we know for sure we're returning multiple items.
824         (WebCore::JSDOMWindow::getOwnPropertySlot): Call windowNamedItemMap().contains() instead of document->hasNamedItem()
825         since the latter has been removed.
826         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Ditto.
827         (WebCore::JSDOMWindow::getOwnPropertyDescriptor): Ditto.
828
829         * bindings/js/JSHTMLDocumentCustom.cpp:
830         (WebCore::JSHTMLDocument::canGetItemsForName): Call documentNamedItemMap().contains() instead of
831         document->hasExtraNamedItem() since the latter has been removed.
832         (WebCore::JSHTMLDocument::nameGetter): Use documentNamedItemMap().containsSingle() instead of
833         collection->hasExactlyOneItem() to avoid instantiating HTMLCollection when we're returning the first item.
834
835         * dom/Document.cpp:
836         (WebCore::Document::windowNamedItems): Instantiate WindowNameCollection, which is a subclass of HTMLNameCollection,
837         instead of HTMLNameCollection since the latter class no longer has a public constructor.
838         (WebCore::Document::documentNamedItems): Ditto; instantiate DocumentNameCollection.
839
840         * dom/DocumentOrderedMap.cpp:
841         (WebCore::keyMatchesName): Added for name attribute.
842         (WebCore::keyMatchesWindowNamedItem): Added for window name getter.
843         (WebCore::keyMatchesDocumentNamedItem): Added for document name getter.
844         (WebCore::DocumentOrderedMap::getElementByName): Added for name attribute.
845         (WebCore::DocumentOrderedMap::getElementByWindowNamedItem): Added for window name getter.
846         (WebCore::DocumentOrderedMap::getElementByDocumentNamedItem): Added for document name getter.
847
848         * dom/DocumentOrderedMap.h:
849         (WebCore::DocumentOrderedMap::containsSingle): Added.
850         (WebCore::DocumentOrderedMap::containsMultiple): Fixed the bug that containsMultiple returns true even when
851         the duplicate count has been reduced to 1. Unfortunately this behavior change is not testable because the old code
852         worked properly (though less efficient) even if this function returned a wrong value.
853
854         * dom/Element.cpp:
855         (WebCore::Element::insertedInto):
856         (WebCore::Element::removedFrom):
857         (WebCore::Element::updateName): Added. Updates TreeScope's name attribute map as well as HTMLDocument's window name
858         and document name maps.
859         (WebCore::Element::updateId): Added the code to update HTMLDocument's window name and document name maps.
860
861         * dom/Element.h:
862         (Element): Removed shouldRegisterAsNamedItem, shouldRegisterAsExtraNamedItem, updateNamedItemRegistration, and
863         updateExtraNamedItemRegistration as they're no longer used.
864
865         * dom/TreeScope.cpp:
866         (SameSizeAsTreeScope):
867         (WebCore::TreeScope::getElementByName): Added.
868         (WebCore::TreeScope::addElementByName): Added.
869         (WebCore::TreeScope::removeElementByName): Added.
870
871         * dom/TreeScope.h:
872         (WebCore::TreeScope::hasElementWithName): Added.
873         (WebCore::TreeScope::containsMultipleElementsWithName): Added.
874
875         * html/HTMLAppletElement.h:
876         (HTMLAppletElement):
877
878         * html/HTMLCollection.cpp:
879         (WebCore::isMatchingElement): Use HTMLNameCollection subclasses' nodeMatches.
880         (WebCore::HTMLCollection::namedItem): Added a fast path for named item.
881         (WebCore::HTMLCollection::hasNamedItem): Use namedItem to avoid the work in the fast path.
882
883         * html/HTMLCollection.h:
884         (HTMLCollection): Removed checkForNameMatch.
885         * html/HTMLDocument.cpp:
886         (WebCore): Removed various member functions related to m_namedItemCounts and m_extraNamedItemCounts.
887
888         * html/HTMLDocument.h:
889         (WebCore::HTMLDocument::documentNamedItemMap): Added.
890         (WebCore::HTMLDocument::windowNamedItemMap): Added.
891         (HTMLDocument): Replaced m_namedItemCounts and m_extraNamedItemCounts by m_documentNamedItem and m_windowNamedItem.
892         Note that they're not one to one.
893
894         * html/HTMLEmbedElement.h:
895         (HTMLEmbedElement):
896
897         * html/HTMLFormElement.h:
898         (HTMLFormElement):
899
900         * html/HTMLIFrameElement.cpp: Removed the code to track the element's name since we already do this in Element.
901         (WebCore::HTMLIFrameElement::parseAttribute):
902
903         * html/HTMLIFrameElement.h:
904         (HTMLIFrameElement):
905
906         * html/HTMLImageElement.cpp:
907         (WebCore::HTMLImageElement::parseAttribute): Update the HTMLDocument's maps when the name attribute's existence
908         changes its presence on window and document name getters in turn. This behavior change, again, appears to be
909         untestable due to the old being more graceful when DocumentOrderedMap returned a wrong value.
910
911         * html/HTMLImageElement.h:
912
913         * html/HTMLNameCollection.cpp:
914         (WebCore::HTMLNameCollection::HTMLNameCollection): No longer overrides itemAfter. This enables backwards traversals
915         of the tree along with other optimizations in HTMLCollection.
916
917         (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Added. Used in Element::updateName to determine
918         whether add() or remove() should be called on HTMLDocument's maps.
919         (WebCore::WindowNameCollection::nodeMatches): Added.
920
921         (WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Added. Used in Element::updateName to determine
922         whether add() or remove() should be called on HTMLDocument's maps.
923         (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Ditto.
924         (WebCore::DocumentNameCollection::nodeMatches): Added.
925
926         * html/HTMLNameCollection.h:
927         (HTMLNameCollection): Removed create since this class shouldn't be instantiated on its own.
928
929         (WebCore::WindowNameCollection): Added.
930         (WebCore::WindowNameCollection::create): Added.
931         (WebCore::WindowNameCollection::nodeMatches): Added.
932         (WebCore::WindowNameCollection::nodeMatchesIfIdAttributeMatch): Added.
933         (WebCore::WindowNameCollection::WindowNameCollection): Added.
934         (WebCore::DocumentNameCollection): Added.
935         (WebCore::DocumentNameCollection::create): Added.
936         (WebCore::DocumentNameCollection::nodeMatches): Added.
937         (WebCore::DocumentNameCollection::DocumentNameCollection): Added.
938
939         * html/HTMLObjectElement.cpp:
940         (WebCore::HTMLObjectElement::updateDocNamedItem): Update both window and document getter maps of HTMLDocument when
941         the visibility of this element changes due to the DOM mutations in the subtree.
942
943         * html/HTMLObjectElement.h:
944         (WebCore::HTMLObjectElement):
945         (WebCore::toHTMLObjectElement): Added.
946
947 2013-05-06  Andreas Kling  <akling@apple.com>
948
949         Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
950         <http://webkit.org/b/115674>
951
952         Reviewed by Alexey Proskuryakov.
953
954         Don't cache the Document::renderer() in a local since layout may blow it away.
955
956         * dom/Document.cpp:
957         (WebCore::Document::implicitClose):
958
959 2013-05-06  Anders Carlsson  <andersca@apple.com>
960
961         More work on LocalStorageDatabaseTracker
962         https://bugs.webkit.org/show_bug.cgi?id=115680
963
964         Reviewed by Andreas Kling.
965
966         Export symbols needed by WebKit2.
967
968         * WebCore.exp.in:
969
970 2013-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
971
972         [GTK] Add webkit_uri_scheme_request_finish_error
973         https://bugs.webkit.org/show_bug.cgi?id=94316
974
975         Reviewed by Anders Carlsson.
976
977         No behaviour change, covered by existing tests.
978
979         * platform/network/soup/ResourceError.h:
980         (ResourceError): Rename genericIOError() to genericGError().
981         * platform/network/soup/ResourceErrorSoup.cpp:
982         (WebCore::ResourceError::httpError): Use genercicGError() instead of
983         genericIOError().
984         (WebCore::ResourceError::genericGError): Use error domain instead of
985         always return a G_IO_ERROR.
986         * platform/network/soup/ResourceHandleSoup.cpp: Use genericGError()
987         instead of genericIOError().
988         (WebCore::redirectSkipCallback):
989         (WebCore::readCallback):
990
991 2013-05-06  Bem Jones-Bey  <bjonesbe@adobe.com>
992
993         Heap-use-after-free in WebCore::InlineFlowBox::deleteLine
994         https://bugs.webkit.org/show_bug.cgi?id=114772
995
996         Reviewed by David Hyatt.
997
998         Fix the new use after free issues in Ruby.
999
1000         Test: fast/ruby/ruby-svg-crash.html
1001
1002         * rendering/RenderRubyRun.cpp:
1003         (WebCore::RenderRubyRun::removeChild):
1004
1005 2013-05-06  Robert Hogan  <robert@webkit.org>
1006
1007         REGRESSION(r140024): child of fixed div inside of absolute div does not get resized when window is resized
1008         https://bugs.webkit.org/show_bug.cgi?id=115379
1009
1010         Reviewed by David Hyatt.
1011
1012         When detecting whether a fixed pos object needed to move with an absolute ancestor we checked
1013         whether the logical width of the fixed pos object had changed. This check prevented the fixed pos
1014         object from detecting later on that it needed to relayout its children in layoutBlock(). So recompute the width
1015         for our check instead of updating it.
1016
1017         Test: fast/block/positioning/child-of-fixed-pos-after-movement.html
1018
1019         * rendering/RenderBlock.cpp:
1020         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
1021
1022 2013-05-06  Mike Lattanzio  <mlattanzio@blackberry.com>
1023
1024         [BlackBerry] Enable and Expose Text Autosizing through BlackBerry::WebKit::WebSettings
1025         https://bugs.webkit.org/show_bug.cgi?id=113808
1026
1027         Reviewed by Rob Buis.
1028
1029         Added TextAutosizer.cpp to the BlackBerry build.
1030
1031         * PlatformBlackBerry.cmake:
1032
1033 2013-05-06  Darin Adler  <darin@apple.com>
1034
1035         Use OwnPtr instead of deleteAllValues in SVGAttributeToPropertyMap
1036         https://bugs.webkit.org/show_bug.cgi?id=115653
1037
1038         Reviewed by Andreas Kling.
1039
1040         Also made a few style fixes to the code at the same time.
1041
1042         * svg/properties/SVGAttributeToPropertyMap.cpp:
1043         (WebCore::SVGAttributeToPropertyMap::addProperties): Changed argument to
1044         const because there was no reason for it to be non-const. Added calls to
1045         get() since the items in the map are now OwnPtr. Added a couple FIXMEs
1046         about performance mistakes.
1047         (WebCore::SVGAttributeToPropertyMap::addProperty): Added a FIXME about
1048         a small performance mistake, and updated to use OwnPtr instead of raw
1049         pointers.
1050         (WebCore::SVGAttributeToPropertyMap::synchronizeProperties): Added a call
1051         to get().
1052
1053         * svg/properties/SVGAttributeToPropertyMap.h: Removed now-unneeded
1054         constructor and destructor definitions. Changed the type for the
1055         addProperties to be const&. Added a comment about incorrect function
1056         naming. Changed the type of the map data member to use OwnPtr.
1057
1058 2013-05-06  Antti Koivisto  <antti@apple.com>
1059
1060         Remove more code that was only needed for younger/older shadow trees
1061         https://bugs.webkit.org/show_bug.cgi?id=115662
1062
1063         Reviewed by Andreas Kling.
1064
1065         This is dead code.
1066
1067         * WebCore.exp.in:
1068         * dom/ComposedShadowTreeWalker.cpp:
1069         (WebCore::nodeCanBeDistributed):
1070         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
1071         * dom/EventPathWalker.cpp:
1072         (WebCore::EventPathWalker::moveToParent):
1073         * html/shadow/ContentDistributor.cpp:
1074         (WebCore::ScopeContentDistribution::ScopeContentDistribution):
1075         (WebCore::ScopeContentDistribution::registerInsertionPoint):
1076         (WebCore::ScopeContentDistribution::unregisterInsertionPoint):
1077         (WebCore):
1078         (WebCore::ScopeContentDistribution::hasInsertionPoint):
1079         (WebCore::ContentDistributor::invalidate):
1080         * html/shadow/ContentDistributor.h:
1081         (ScopeContentDistribution):
1082         * html/shadow/InsertionPoint.cpp:
1083         (WebCore::InsertionPoint::contains):
1084         (WebCore::resolveReprojection):
1085         (WebCore::collectInsertionPointsWhereNodeIsDistributed):
1086         * html/shadow/InsertionPoint.h:
1087         * testing/Internals.cpp:
1088         (WebCore):
1089         * testing/Internals.h:
1090         (Internals):
1091         * testing/Internals.idl:
1092
1093 2013-05-06  Tiancheng Jiang  <tijiang@rim.com>
1094
1095         [BlackBerry] Update HTML5 progress bar UX.
1096         https://bugs.webkit.org/show_bug.cgi?id=115284.
1097
1098         Reviewed by Rob Buis.
1099
1100         BlackBerry PR 331729.
1101         Internally Reviewed by Jeff Rogers.
1102
1103         Use GL render to paint progress bar to meet UX specs.
1104         Also change the slider range to GL render.
1105
1106         * platform/blackberry/RenderThemeBlackBerry.cpp:
1107         (WebCore):
1108         (WebCore::RenderThemeBlackBerry::paintSliderTrack):
1109         (WebCore::RenderThemeBlackBerry::paintProgressTrackRect):
1110         (WebCore::drawProgressTexture):
1111         (WebCore::RenderThemeBlackBerry::paintProgressBar):
1112         * platform/blackberry/RenderThemeBlackBerry.h:
1113         (RenderThemeBlackBerry):
1114
1115 2013-05-06  Bem Jones-Bey  <bjonesbe@adobe.com>
1116
1117         [CSS Exclusions] remove unused -webkit-wrap property
1118         https://bugs.webkit.org/show_bug.cgi?id=102105
1119
1120         Reviewed by Darin Adler.
1121
1122         Remove -webkit-wrap property and all mentions. This property doesn't
1123         exist in the spec anymore, and was never implemented more than just
1124         parsing the property.
1125
1126         * WebCore.order:
1127         * css/CSSComputedStyleDeclaration.cpp:
1128         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1129         * css/CSSParser.cpp:
1130         (WebCore::CSSParser::parseValue):
1131         * css/CSSProperty.cpp:
1132         (WebCore::CSSProperty::isInheritedProperty):
1133         * css/CSSPropertyNames.in:
1134         * css/StylePropertySet.cpp:
1135         (WebCore::StylePropertySet::getPropertyValue):
1136         (WebCore::StylePropertySet::asText):
1137         * css/StylePropertyShorthand.cpp:
1138         (WebCore::shorthandForProperty):
1139         * css/StylePropertyShorthand.h:
1140         (WebCore):
1141         * css/StyleResolver.cpp:
1142         (WebCore::StyleResolver::applyProperty):
1143
1144 2013-05-06  Anders Carlsson  <andersca@apple.com>
1145
1146         Write storage changes to disk
1147         https://bugs.webkit.org/show_bug.cgi?id=115660
1148
1149         Reviewed by Andreas Kling.
1150
1151         Export symbols needed by WebKit2.
1152
1153         * WebCore.exp.in:
1154
1155 2013-05-06  Tiancheng Jiang  <tijiang@rim.com>
1156
1157         [BlackBerry] Update HTML5 progress bar UX.
1158         https://bugs.webkit.org/show_bug.cgi?id=115284.
1159
1160         Reviewed by Rob Buis.
1161
1162         BlackBerry PR 331729.
1163         Internally Reviewed by Jeff Rogers.
1164
1165         * platform/blackberry/RenderThemeBlackBerry.cpp:
1166         (WebCore):
1167         (WebCore::createLinearGradient):
1168         (WebCore::RenderThemeBlackBerry::paintSliderTrack):
1169         (WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
1170         (WebCore::RenderThemeBlackBerry::paintProgressBar):
1171         * platform/blackberry/RenderThemeBlackBerry.h:
1172         (RenderThemeBlackBerry):
1173
1174 2013-05-06  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1175
1176         [texmap] draw content if graphics layer displays a video
1177         https://bugs.webkit.org/show_bug.cgi?id=114742
1178
1179         Reviewed by Noam Rosenthal.
1180
1181         Bug #86410 focuses on having composited/accelerated video using the
1182         TextureMapper. But the video is not rendered fast by using the
1183         repaint() method. In the case of the TextureMapper it is required to
1184         call a content display as fast as possible.
1185
1186         This patch adds the class TextureMapperPlatformLayer::Client with the
1187         method setLayerNeedsDisplay(). The GraphicsLayerTextureMapper
1188         implements this new class and the new method calls
1189         setContentsNeedsDisplay(), causing a faster content display when
1190         requested.
1191
1192         No new tests. Covered by existing tests.
1193
1194         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1195         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia): sets itself
1196         as the TextureMapperPlatformLayer's client
1197         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1198         (WebCore::GraphicsLayerTextureMapper::setLayerNeedsDisplay):
1199         TextureMapperPlatformLayer::Client::setLayerNeedsDisplay implementation
1200         (GraphicsLayerTextureMapper):
1201         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
1202         (Client): New class
1203         (WebCore::TextureMapperPlatformLayer::TextureMapperPlatformLayer):
1204         (WebCore::TextureMapperPlatformLayer::setClient): client setter
1205         (WebCore::TextureMapperPlatformLayer::setLayerNeedsDisplay): facade
1206         for client's method
1207
1208 2013-05-02  David Hyatt  <hyatt@apple.com>
1209
1210         Improve the performance of RenderDeprecatedFlexibleBox.
1211         https://bugs.webkit.org/show_bug.cgi?id=115543.
1212
1213         Optimize deprecated flexible box layout to be much faster. This patch implements
1214         the following optimizations in the deprecated flexible box:
1215         
1216         (1) Defer repainting of children until they have been placed into their final
1217         positions. This is done by collecting all of the old frame rects into a Vector
1218         and then doing a walk after layout is finished to repaint any of the children if
1219         they moved from that position. This code matches the new RenderFlexibleBox's system
1220         for repainting moved children.
1221         
1222         (2) Implement support for layout deltas. We keep a Vector of layout deltas for each
1223         child as we shift them around, and every time we lay a child out again, we apply that
1224         child's current layout delta to avoid repainting at the new position. RenderFlexibleBox
1225         does not have support for layout deltas yet, so we'll need to implement this in the
1226         new flexbox code as well.
1227         
1228         (3) Optimize flexible objects to avoid laying them out unflexed. When laying out
1229         horizontal and vertical boxes now, we lay out the inflexible items first. We then
1230         check to see if the inflexible extent of all those children has changed.
1231         
1232         If this extent didn't change, and the flexible items either don't need layout or there
1233         is only one flexing item, then we avoid laying out the item in an unflexed state
1234         and simply lay out one time with the flex applied instead. The new RenderFlexibleBox
1235         does not have these optimizations and would benefit from them in the block-direction box
1236         case (it uses preferred logical widths in the inline-direction box case, and so avoided
1237         layouts in that direction already).
1238         
1239         Reviewed by Beth Dakin.
1240
1241         * rendering/RenderDeprecatedFlexibleBox.cpp:
1242         (WebCore::appendChildFrameRects):
1243         Cache all of the old child frame rects so that we can compare them with the final
1244         positions for repaintDuringLayoutIfMoved. This collection is identical to what the
1245         new flexbox code does.
1246         
1247         (WebCore::appendChildLayoutDeltas):
1248         Build up a vector that tracks layout deltas. We apply these layout deltas every
1249         time we lay out a child so that any repainting done during layout ignores our shifted
1250         position and just keeps using the old position. The new flexbox does not have this
1251         code yet.
1252
1253         (WebCore::repaintChildrenDuringLayoutIfMoved):
1254         After final placement of children, we do a single pass over all of the children and
1255         repaint them if they shifted their positions. This matches how the new flexbox works.
1256         
1257         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
1258         Collect the frame rects and layout deltas, and defer repainting of children to the
1259         end of layout.
1260         
1261         (WebCore::gatherFlexChildrenInfo):
1262         Don't clear flex overrides when gathering flex information. Add additional information
1263         such as the number of flexing items so that we can use it to optimize flex layout.
1264         
1265         (WebCore::layoutChildIfNeededApplyingDelta):
1266         A helper for applying your current layout delta for a child when laying that child out.
1267         
1268         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1269         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1270         Both methods are patched to aggregate layout deltas as children move around during
1271         the multiple passes. In addition we now optimize layout in a couple of cases, such
1272         as when the inflexible space stays the same (thus giving a flexible object the
1273         same amount of available space, avoiding a need to lay out unflexed first).
1274         
1275         (WebCore::RenderDeprecatedFlexibleBox::placeChild):
1276         Patched to add to our cached layout delta for that child when we do a movement.
1277
1278         * rendering/RenderDeprecatedFlexibleBox.h:
1279         Changes to method signatures.
1280
1281 2013-05-04  Andy Estes  <aestes@apple.com>
1282
1283         REGRESSION (r125592): Reproducible crash in DOMWindow::open when a delegate closes the new window in decidePolicyForNavigationAction
1284         https://bugs.webkit.org/show_bug.cgi?id=115609
1285
1286         Reviewed by Oliver Hunt.
1287
1288         When a window created by window.open() is navigated, the embedder might
1289         close it in decidePolicyForNavigationAction. If this happens, we end up
1290         with a pointer to a deleted Frame.
1291
1292         Fix this by keeping a strong reference to the Frame created by
1293         createWindow(). We can later determine if the window was closed by
1294         checking if the new Frame has a detached Page.
1295
1296         Added an API test: WebKit1.CloseNewWindowInNavigationPolicyDelegate.
1297
1298         * page/DOMWindow.cpp:
1299         (WebCore::DOMWindow::createWindow):
1300
1301 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
1302
1303         [GTK] Move GeolocationProviderGeoclue into libPlatform
1304         https://bugs.webkit.org/show_bug.cgi?id=115591
1305
1306         Reviewed by Martin Robinson.
1307
1308         No new tests - no new functionality.
1309
1310         * GNUmakefile.am: Remove the Source/WebCore/platform/geoclue directory from the webkitgtk_cppflags list.
1311         * GNUmakefile.list.am: Move the GeolocationProviderGeoclue(Client) sources under platform_sources.
1312
1313 2013-05-06  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1314
1315         [Qt][Win] Unreviewed buildfix after r149579.
1316
1317         * plugins/win/PluginDatabaseWin.cpp:
1318         (WebCore::addQtWebKitPluginPath):
1319
1320 2013-05-06  Antoine Quint  <graouts@apple.com>
1321
1322         Manage the presentation of the snapshotted plug-in using JavaScript
1323         https://bugs.webkit.org/show_bug.cgi?id=115548
1324
1325         Reviewed by Dean Jackson.
1326
1327         * Resources/plugIns.js:
1328         (createOverlay):
1329         Implement the createOverlay(shadowRoot, titleText, subtitleText) method
1330         that is called from WebCore (HTMLPlugInImageElement::didAddUserAgentShadowRoot)
1331         to allow the injected script to customize the shadow root for a snapshotted
1332         plug-in. This is a default implementation, clients are expected to customize
1333         this by providing their own JS file with enhanced behavior.
1334
1335         * css/CSSDefaultStyleSheets.cpp:
1336         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
1337         Since we no longer have a default shadow tree generated in C++, it makes little
1338         sense for clients to extend the default snapshotted plug-in stylesheet, so we
1339         only insert it if no custom one is provided by the chrome client.
1340
1341         * css/plugIns.css:
1342         Better styling of the default snapshotted plug-in overlay look by using CSS
1343         flex boxes. Also using more explicit selector as an optimization.
1344
1345         * dom/Document.cpp:
1346         (WebCore::Document::ensurePlugInsInjectedScript):
1347         Expose a new method to allow HTMLPlugInImageElement instances to ensure that
1348         the JavaScript code required to customize the snapshotted plug-in's shadow root
1349         is indeed injected in the current document. The actual injection would only
1350         happen once per document so all snapshotted plug-ins share the same scripting
1351         context.
1352
1353         * dom/Document.h:
1354         Expose the new ensurePlugInsInjectedScript method and the m_hasInjectedPlugInsScript
1355         property used to ensure injection happens only once per document.
1356
1357         * html/HTMLPlugInImageElement.cpp:
1358         (WebCore::titleText):
1359         (WebCore::subtitleText):
1360         Store the localized strings for each mime-type in a static hash map as it can be
1361         costly to retrieve them each time from the client. It is expected the chrome client
1362         will want to provide localized strings taking into account the snapshotted plug-in's
1363         mime-type, so we're adding this as a parameter.
1364         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
1365         Dispatch a "resize" event to the shadow root to notify the injected script that the
1366         snapshotted plug-in's metrics have changed and to allow the overlay to update itself
1367         as a result.
1368         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
1369         Remove all the DOM generation code in favor of an approach where we create a shared
1370         DOM scripting world in which we inject JavaScript code that will perform the same
1371         task but will additionally be provided by the client in order to provide a completely
1372         custom overlay for the snapshotted plug-in. The sole contract is for the JavaScript
1373         to implement a createOverlay(shadowRoot, titleText, subtitleText) method.
1374         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
1375         Renamed method to be generic to the overlay as opposed to text labels and use the
1376         element with CSS class name "snapshot-overlay" as the comparison node.
1377
1378         * html/HTMLPlugInImageElement.h:
1379         (HTMLPlugInImageElement):
1380         Removing a couple of unused members since we no longer generate the shadow DOM from C++
1381         and rename the partOfSnapshotLabel method to partOfSnapshotOverlay.
1382
1383         * page/ChromeClient.h:
1384         (WebCore::ChromeClient::plugInStartLabelTitle):
1385         (WebCore::ChromeClient::plugInStartLabelSubtitle):
1386         (WebCore::ChromeClient::plugInExtraScript):
1387         Pass in the mime-type to plugInStartLabelTitle and plugInStartLabelSubtitle and expose
1388         a new plugInExtraScript method to allow the chrome client to provide a custom JS file
1389         for the management of the shadow root.
1390
1391         * rendering/RenderSnapshottedPlugIn.cpp:
1392         (WebCore::RenderSnapshottedPlugIn::handleEvent):
1393         Update the terminology from "label" to "overlay" per the changes made in HTMLPlugInImageElement.
1394
1395 2013-05-06  Robert Hogan  <robert@webkit.org>
1396
1397         REGRESSION(r140907) - Backport blink r149612 to fix vertical-align and rowspan issue
1398         https://bugs.webkit.org/show_bug.cgi?id=115611
1399
1400         Patch by Julien Chaffraix.
1401         Reviewed by Benjamin Poulain.
1402
1403         Backport phttps://src.chromium.org/viewvc/blink?view=rev&revision=149612 from 
1404         https://chromiumcodereview.appspot.com/14105010
1405         
1406         Fix the rows' height computation with vertical-align: baseline and rowspan.
1407         r140907 was careful in avoiding updating the baseline descent for
1408         spanning cells. However it still added the non-spanning cells baseline
1409         descent to the spanning cells' row height computation.
1410         This change avoids the previous issue by not adding the baseline
1411         descent in this case.
1412
1413         Test: fast/table/baseline-align-rowspan.html
1414
1415         * rendering/RenderTableSection.cpp:
1416         (WebCore::RenderTableSection::calcRowLogicalHeight):
1417
1418 2013-05-05  Anders Carlsson  <andersca@apple.com>
1419
1420         Remove Vector::prepend
1421         https://bugs.webkit.org/show_bug.cgi?id=115618
1422
1423         Reviewed by Geoffrey Garen.
1424
1425         Replace calls to Vector::prepend with either Vector::insert,
1426         or a combination of Vector::append and Vector::reverse.
1427
1428         * accessibility/AccessibilityObject.cpp:
1429         (WebCore::AccessibilityObject::scrollToGlobalPoint):
1430         * css/CSSGradientValue.cpp:
1431         (WebCore::CSSGradientValue::addStops):
1432         * css/CSSValueList.h:
1433         (WebCore::CSSValueList::prepend):
1434         * dom/Document.cpp:
1435         (WebCore::Document::iconURLs):
1436         * editing/TextIterator.cpp:
1437         (WebCore::SearchBuffer::prependContext):
1438         * editing/VisibleUnits.cpp:
1439         (WebCore::previousBoundary):
1440         (WebCore::nextBoundary):
1441         * history/HistoryItem.cpp:
1442         (WebCore::HistoryItem::padDailyCountsForNewVisit):
1443         (WebCore::HistoryItem::collapseDailyVisitsToWeekly):
1444         * inspector/InjectedScriptHost.cpp:
1445         (WebCore::InjectedScriptHost::addInspectedObject):
1446         * platform/graphics/SVGGlyph.cpp:
1447         (WebCore::charactersWithArabicForm):
1448
1449 2013-05-05  Sam Weinig  <sam@webkit.org>
1450
1451         Remove empty function SQLiteFileSystem::registerSQLiteVFS() and its callers
1452         https://bugs.webkit.org/show_bug.cgi?id=115619
1453
1454         Reviewed by Dan Bernstein.
1455
1456         * Modules/webdatabase/DatabaseTracker.cpp:
1457         * platform/sql/SQLiteFileSystem.cpp:
1458         * platform/sql/SQLiteFileSystem.h:
1459         * storage/StorageTracker.cpp:
1460
1461 2013-05-05  Chris Fleizach  <cfleizach@apple.com>
1462
1463         AX: aria-checked not exposed correctly on menuitemcheckbox or menuitemradio roles
1464         https://bugs.webkit.org/show_bug.cgi?id=115499
1465
1466         Reviewed by Tim Horton.
1467
1468         Expose isChecked() for menu item objects.
1469         Return the Mac-platform specific value that you find on menu items for "checked" menu items.
1470
1471         Test: platform/mac/accessibility/aria-menuitem-checked-value.html
1472
1473         * accessibility/AccessibilityNodeObject.cpp:
1474         (WebCore::AccessibilityNodeObject::isChecked):
1475         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1476         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1477
1478 2013-05-05  Tim Horton  <timothy_horton@apple.com>
1479
1480         [wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
1481         https://bugs.webkit.org/show_bug.cgi?id=115577
1482         <rdar://problem/13762583>
1483
1484         Reviewed by Darin Adler.
1485
1486         * WebCore.exp.in:
1487         Export GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants
1488
1489 2013-05-05  Anders Carlsson  <andersca@apple.com>
1490
1491         Remove the Vector::append overload that takes a Vector
1492         https://bugs.webkit.org/show_bug.cgi?id=115535
1493
1494         Reviewed by Andreas Kling.
1495
1496         Use Vector::appendVector instead.
1497
1498         * Modules/indexeddb/IDBBackingStore.cpp:
1499         (WebCore::IDBBackingStore::putRecord):
1500         (WebCore::IDBBackingStore::putIndexDataForRecord):
1501         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1502         (WebCore::IDBLevelDBCoding::encodeStringWithLength):
1503         (WebCore::IDBLevelDBCoding::encodeIDBKey):
1504         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
1505         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
1506         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
1507         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
1508         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
1509         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
1510         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
1511         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
1512         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
1513         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
1514         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
1515         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
1516         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
1517         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
1518         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
1519         (WebCore::IDBLevelDBCoding::IndexDataKey::encode):
1520         * Modules/webaudio/AudioContext.cpp:
1521         (WebCore::AudioContext::clear):
1522         (WebCore::AudioContext::scheduleNodeDeletion):
1523         * accessibility/AccessibilityARIAGrid.cpp:
1524         (WebCore::AccessibilityARIAGrid::addTableCellChild):
1525         * accessibility/AccessibilityTable.cpp:
1526         (WebCore::AccessibilityTable::cells):
1527         * css/RuleFeature.cpp:
1528         (WebCore::RuleFeatureSet::add):
1529         * css/StyleResolver.cpp:
1530         (WebCore::StyleResolver::addToMatchedPropertiesCache):
1531         * dom/DocumentStyleSheetCollection.cpp:
1532         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
1533         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1534         * dom/Range.cpp:
1535         (WebCore::Range::getBorderAndTextQuads):
1536         * html/FormController.cpp:
1537         (WebCore::FormController::getReferencedFilePaths):
1538         * html/canvas/CanvasRenderingContext2D.cpp:
1539         (WebCore::CanvasRenderingContext2D::setLineDash):
1540         * html/parser/HTMLFormattingElementList.cpp:
1541         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
1542         * html/track/WebVTTToken.h:
1543         (WebCore::WebVTTToken::addNewClass):
1544         (WebCore::WebVTTToken::addNewAnnotation):
1545         * page/CaptionUserPreferencesMac.mm:
1546         (WebCore::CaptionUserPreferencesMac::preferredLanguages):
1547         * platform/FileChooser.cpp:
1548         (WebCore::FileChooserSettings::acceptTypes):
1549         * platform/SharedBufferChunkReader.cpp:
1550         (WebCore::SharedBufferChunkReader::nextChunk):
1551         * platform/graphics/MediaPlayer.cpp:
1552         (WebCore::MediaPlayer::getSitesInMediaCache):
1553         * platform/graphics/ca/GraphicsLayerCA.cpp:
1554         (WebCore::GraphicsLayerCA::updateSublayerList):
1555         * platform/mac/PasteboardMac.mm:
1556         (WebCore::createWritableTypesForImage):
1557         (WebCore::writableTypesForImage):
1558         (WebCore::Pasteboard::writeSelectionForTypes):
1559         * platform/network/FormDataBuilder.cpp:
1560         (WebCore::FormDataBuilder::generateUniqueBoundaryString):
1561         * plugins/PluginDatabase.cpp:
1562         (WebCore::PluginDatabase::defaultPluginDirectories):
1563         * rendering/RenderBlockLineLayout.cpp:
1564         (WebCore::constructBidiRunsForSegment):
1565         * rendering/RenderLayerCompositor.cpp:
1566         (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
1567         * rendering/RenderTableSection.cpp:
1568         (WebCore::RenderTableSection::splitColumn):
1569         * svg/SVGGlyphMap.h:
1570         (WebCore::SVGGlyphMap::collectGlyphsForString):
1571         * xml/XPathNodeSet.h:
1572         (WebCore::XPath::NodeSet::append):
1573
1574 2013-05-05  Anders Carlsson  <andersca@apple.com>
1575
1576         Try to fix the Windows build.
1577
1578         Make plugIns.js have a non-zero length.
1579
1580         * Resources/plugIns.js:
1581
1582 2013-05-04  Dean Jackson  <dino@apple.com>
1583
1584         Animations and Transitions should not start when globally suspended
1585         https://bugs.webkit.org/show_bug.cgi?id=114915
1586
1587         Reviewed by Sam Weinig.
1588
1589         When the Document's AnimationController was suspended, we still
1590         started new transitions and animations. Change this so that
1591         animations enter a paused-but-new state, where they are frozen
1592         until the AnimationController resumes. At that time, it is as
1593         if they had just appeared: any delay counts down before
1594         the animation starts.
1595
1596         For transitions, the change in value must still happen, but
1597         it does so immediately. No transitionend event should be fired.
1598         This produces a slightly confusing behaviour, because any
1599         in-progress transitions are suspended, but any new style changes
1600         happen instantly. This might sound contradictory, but in general
1601         suspending the document is a rare (and dangerous) thing to do.
1602
1603         Previously, the Document would call resumeAnimations as it loaded,
1604         effectively starting all the animations. This meant if you suspended
1605         animations before loading a document, it was ignored as soon as the
1606         load finished. Now there is a separate method startAnimationsIfNotSuspended
1607         which checks to see if the document is suspended as it loads.
1608
1609         In order to handle this case, I added a new state to the Animation
1610         machinery: AnimationStatePausedNew. This is an animation that was created
1611         in the suspended state.
1612
1613         Tests: animations/added-while-suspended.html
1614                transitions/started-while-suspended.html
1615
1616         * WebCore.exp.in: Export AnimationController::isSuspended().
1617
1618         * dom/Document.cpp:
1619         (WebCore::Document::implicitClose):
1620             resumeAnimationsForDocument() -> startAnimationsIfNotSuspended()
1621
1622         * page/animation/AnimationBase.cpp:
1623         (WebCore::nameForState): New name for AnimationStatePausedNew.
1624         (WebCore::AnimationBase::updateStateMachine): Handle new state AnimationStatePausedNew. The
1625             most important change is that when go from PausedNew to Running, we jump back into
1626             the New state and continue from there.
1627         (WebCore::AnimationBase::updatePlayState): suspended -> isSuspended
1628         * page/animation/AnimationBase.h: New state: AnimationStatePausedNew
1629         (WebCore::AnimationBase::waitingToStart): Add AnimationStatePausedNew.
1630         (WebCore::AnimationBase::paused): Add AnimationStatePausedNew.
1631         (WebCore::AnimationBase::isNew): Add AnimationStatePausedNew.
1632
1633         * page/animation/AnimationController.cpp:
1634         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialise m_suspended.
1635         (WebCore::AnimationControllerPrivate::clear): suspended -> isSuspended
1636         (WebCore::AnimationControllerPrivate::updateAnimations): Ditto.
1637         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer): Ditto.
1638         (WebCore::AnimationControllerPrivate::suspendAnimations): Update m_suspended.
1639         (WebCore::AnimationControllerPrivate::resumeAnimations): Ditto.
1640         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
1641         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
1642         (WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): New method that will
1643             only resume animations if we were not globally suspended.
1644         (WebCore::AnimationController::isSuspended): New method.
1645         (WebCore::AnimationController::suspendAnimations): Add logging.
1646         (WebCore::AnimationController::resumeAnimations): Add logging.
1647         (WebCore::AnimationController::suspendAnimationsForDocument): Add logging.
1648         (WebCore::AnimationController::resumeAnimationsForDocument): Add logging.
1649         (WebCore::AnimationController::startAnimationsIfNotSuspended): Calls private method.
1650         * page/animation/AnimationController.h:
1651         (AnimationController): Add isSuspended() and animationsForDocumentMayStart().
1652         * page/animation/AnimationControllerPrivate.h:
1653         (WebCore::AnimationControllerPrivate::isSuspended): New method.
1654         (AnimationControllerPrivate): Add m_isSuspended member.
1655
1656         * page/animation/CompositeAnimation.cpp:
1657         (WebCore::CompositeAnimation::CompositeAnimation): Moved from header - initialise m_isSuspended.
1658         (WebCore::CompositeAnimation::updateTransitions): Do not create ImplicitAnimation if suspended.
1659         (WebCore::CompositeAnimation::updateKeyframeAnimations): Move to AnimationStatePausedNew if suspended.
1660         (WebCore::CompositeAnimation::suspendAnimations): m_suspended -> m_isSuspended
1661         (WebCore::CompositeAnimation::resumeAnimations): Ditto.
1662         * page/animation/CompositeAnimation.h:
1663         (WebCore::CompositeAnimation::isSuspended): Renamed from suspended()
1664
1665         * page/animation/KeyframeAnimation.cpp:
1666         (WebCore::KeyframeAnimation::animate): If we're in the AnimationStatePausedNew state, then
1667             we need to go to the first frame (to handle fill mode).
1668
1669         * testing/Internals.cpp:
1670         (WebCore::Internals::animationsAreSuspended): New exposed method to reflect AnimationController.
1671         * testing/Internals.h: Add animationsAreSuspended.
1672         * testing/Internals.idl: Ditto.
1673
1674 2013-05-04  Sam Weinig  <sam@webkit.org>
1675
1676         Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac
1677         matching where they are in WebKit2.
1678
1679         Reviewed by Anders Carlsson.
1680
1681         * WebCore.exp.in:
1682         * WebCore.xcodeproj/project.pbxproj:
1683         * platform/mac/PopupMenuMac.h: Removed.
1684         * platform/mac/PopupMenuMac.mm: Removed.
1685         * platform/mac/SearchPopupMenuMac.h: Removed.
1686         * platform/mac/SearchPopupMenuMac.mm: Removed.
1687
1688 2013-05-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1689
1690         Get rid of special cases in AddIncludesForTypeInImpl
1691         https://bugs.webkit.org/show_bug.cgi?id=115602
1692
1693         Reviewed by Benjamin Poulain.
1694
1695         Get rid of the special cases in AddIncludesForTypeInImpl subroutine in the
1696         JS bindings generator. Those are no longer needed and special cases should
1697         be avoided in the generator.
1698
1699         No new tests, no behavior change.
1700
1701         * bindings/scripts/CodeGeneratorJS.pm:
1702         (AddIncludesForTypeInImpl):
1703
1704 2013-05-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1705
1706         Get rid of AddIncludesForSVGAnimatedType in bindings generator
1707         https://bugs.webkit.org/show_bug.cgi?id=115603
1708
1709         Reviewed by Benjamin Poulain.
1710
1711         Remove AddIncludesForSVGAnimatedType subroutine from the bindings generator
1712         as it is a special case which is no longer needed.
1713
1714         No new tests, no behavior change.
1715
1716         * bindings/scripts/CodeGeneratorJS.pm:
1717         (GenerateImplementation):
1718
1719 2013-05-04  Antoine Quint  <graouts@apple.com>
1720
1721         Update code generators to handle a new JavaScript file for snapshotted plug-ins
1722         https://bugs.webkit.org/show_bug.cgi?id=115596
1723
1724         Reviewed by Dean Jackson.
1725
1726         In preparation for https://webkit.org/b/115548, adding a new JS file at
1727         Resources/plugIns.js that we will use to provide presentation for the
1728         snapshotted plug-ins overlay.
1729
1730         * CMakeLists.txt:
1731         * DerivedSources.cpp:
1732         * DerivedSources.make:
1733         * DerivedSources.pri:
1734         * GNUmakefile.am:
1735         * GNUmakefile.list.am:
1736         * Resources/plugIns.js: Added.
1737         * WebCore.vcproj/WebCore.vcproj:
1738         * WebCore.vcxproj/WebCore.vcxproj:
1739         * WebCore.vcxproj/WebCore.vcxproj.filters:
1740         * WebCore.xcodeproj/project.pbxproj:
1741
1742 2013-05-04  Andreas Kling  <akling@apple.com>
1743
1744         REGRESSION(r142647): Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
1745         <http://webkit.org/b/115322>
1746         <rdar://problem/13810719>
1747
1748         Reviewed by Anders Carlsson.
1749
1750         Don't cache the FrameView::renderView() in a local since updating Widgets may blow it away.
1751
1752         * page/FrameView.cpp:
1753         (WebCore::FrameView::performPostLayoutTasks):
1754
1755 2013-05-04  Andreas Kling  <akling@apple.com>
1756
1757         Remove GraphicsContext::strokeArc(), which is unused.
1758
1759         From Blink r149608 by <jbroman@chromium.org>
1760         <http://src.chromium.org/viewvc/blink?view=revision&revision=149608>
1761
1762         This is no longer used since almost a year ago, when HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) was inlined.
1763
1764         * platform/graphics/GraphicsContext.h:
1765         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
1766         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1767         * platform/graphics/cg/GraphicsContextCG.cpp:
1768         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1769
1770 2013-05-04  Andreas Kling  <akling@apple.com>
1771
1772         Remove unused CSSSelector::isCustomPseudoType().
1773
1774         From Blink r149574 by <dominicc@chromium.org>
1775         <http://src.chromium.org/viewvc/blink?view=revision&revision=149574>
1776
1777         * css/CSSSelector.h:
1778         * css/CSSSelector.cpp:
1779
1780 2013-05-04  Andreas Kling  <akling@apple.com>
1781
1782         Remove ShadowRoot's previous/next ShadowRoot pointers.
1783         <http://webkit.org/b/115588>
1784
1785         Reviewed by Anders Carlsson.
1786
1787         ShadowRoot no longer inherits from DoublyLinkedListNode<ShadowRoot> because that code wasn't
1788         doing anything anymore. Shrinks ShadowRoot by two pointers.
1789
1790         * dom/ElementShadow.h:
1791         * dom/ShadowRoot.cpp:
1792         (SameSizeAsShadowRoot):
1793         (WebCore::ShadowRoot::ShadowRoot):
1794         (WebCore::ShadowRoot::~ShadowRoot):
1795         * dom/ShadowRoot.h:
1796
1797 2013-05-04  Andreas Kling  <akling@apple.com>
1798
1799         RenderObject: don't change GraphicsContext state when not drawing dashed/dotted lines.
1800
1801         From Blink r149546 by <jbroman@chromium.org>
1802         <http://src.chromium.org/viewvc/blink?view=revision&revision=149546>
1803
1804         Previously, there was asymmetry between changing and restoring state (certain state
1805         would be restored only if thickness was positive, i.e. a line was actually drawn.)
1806
1807         * rendering/RenderObject.cpp:
1808         (WebCore::RenderObject::drawLineForBoxSide):
1809
1810 2013-05-03  Andreas Kling  <akling@apple.com>
1811
1812         Remove CSS selector profiler branches from ElementRuleCollector loop.
1813         <http://webkit.org/b/115581>
1814
1815         Reviewed by Antti Koivisto.
1816
1817         Templatize the method so we don't have to check for active inspector frontends on every
1818         pass through the loop.
1819
1820         Time spent in this loop goes down from 0.5% to 0.2% on iTunes Store, WebCore binary size
1821         goes up 480 bytes (sorry Benjamin, I'll make it up to you.)
1822
1823         * css/ElementRuleCollector.h:
1824         * css/ElementRuleCollector.cpp:
1825         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1826         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
1827
1828 2013-04-30  Robert Hogan  <robert@webkit.org>
1829
1830         REGRESSION(r140907): Incorrect baseline on cells after updating vertical-align
1831         https://bugs.webkit.org/show_bug.cgi?id=115432
1832
1833         Reviewed by Julien Chaffraix.
1834
1835         If a cell changes vertical-align any intrinsic padding it has is now redundant. It
1836         needs to calculate its new height from RenderTableRow::layout() and then find its
1837         new intrinsic padding in RenderTableSection::layoutRows().
1838
1839         Test: fast/table/correct-baseline-after-style-change.html
1840
1841         * rendering/RenderTableCell.cpp:
1842         (WebCore::RenderTableCell::styleDidChange):
1843
1844 2013-05-03  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1845
1846         incorrect repainting when a table has a transform
1847         https://bugs.webkit.org/show_bug.cgi?id=109867
1848
1849         Reviewed by Simon Fraser.
1850
1851         Disable LayoutState when table, tableRow or tableSection render
1852         objects have transforms or reflections.
1853
1854         Tests: fast/repaint/reflection-table-layout.html
1855                fast/repaint/transform-table-layout.html
1856
1857         * rendering/RenderTable.cpp:
1858         (WebCore::RenderTable::layout):
1859         * rendering/RenderTableRow.cpp:
1860         (WebCore::RenderTableRow::layout):
1861         * rendering/RenderTableSection.cpp:
1862         (WebCore::RenderTableSection::layout):
1863         (WebCore::RenderTableSection::layoutRows):
1864
1865 2013-05-03  Antti Koivisto  <antti@apple.com>
1866
1867         Remove concept of younger and older shadow trees
1868         https://bugs.webkit.org/show_bug.cgi?id=115570
1869
1870         Reviewed by Andreas Kling.
1871
1872         Younger and older shadow trees are an obscure corner of the Shadow DOM spec.
1873         
1874         Support only one shadow tree per element. This simplifies many things. 
1875
1876         * dom/ComposedShadowTreeWalker.cpp:
1877         (WebCore::ComposedShadowTreeWalker::traverseChild):
1878         (WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree):
1879         (WebCore):
1880         (WebCore::ComposedShadowTreeWalker::traverseParent):
1881         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
1882         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
1883         * dom/ComposedShadowTreeWalker.h:
1884         (WebCore::ComposedShadowTreeWalker::assertPrecondition):
1885         (ComposedShadowTreeWalker):
1886         * dom/ContainerNodeAlgorithms.cpp:
1887         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
1888         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
1889         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
1890         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
1891         (WebCore::ChildFrameDisconnector::collectFrameOwners):
1892         (WebCore::assertConnectedSubrameCountIsConsistent):
1893         * dom/Document.cpp:
1894         (WebCore::Document::buildAccessKeyMap):
1895         * dom/Element.cpp:
1896         (WebCore::Element::authorShadowRoot):
1897         (WebCore::Element::userAgentShadowRoot):
1898         (WebCore::Element::ensureUserAgentShadowRoot):
1899         * dom/Element.h:
1900         (Element):
1901         (WebCore::Element::hasAuthorShadowRoot):
1902         * dom/Element.idl:
1903         * dom/ElementShadow.cpp:
1904         (WebCore::ElementShadow::addShadowRoot):
1905         
1906         Allow only one ShadowRoot per ElementShadow. Remove linked list handling.
1907         
1908         (WebCore::ElementShadow::removeAllShadowRoots):
1909         (WebCore::ElementShadow::attach):
1910         (WebCore::ElementShadow::detach):
1911         (WebCore::ElementShadow::childNeedsStyleRecalc):
1912         (WebCore::ElementShadow::needsStyleRecalc):
1913         (WebCore::ElementShadow::recalcStyle):
1914         (WebCore::ElementShadow::removeAllEventListeners):
1915         * dom/ElementShadow.h:
1916         (WebCore::ElementShadow::shadowRoot):
1917         (ElementShadow):
1918         (WebCore::ElementShadow::host):
1919         (WebCore::Node::shadowRoot):
1920         (WebCore):
1921         * dom/Node.cpp:
1922         (WebCore):
1923         (WebCore::Node::showNodePathForThis):
1924         (WebCore::traverseTreeAndMark):
1925         (WebCore::showSubTreeAcrossFrame):
1926         * dom/Node.h:
1927         (Node):
1928         * dom/ShadowRoot.cpp:
1929         (WebCore::ShadowRoot::insertedInto):
1930         * dom/ShadowRoot.h:
1931         (ShadowRoot):
1932         
1933             Remove LinkedList base.
1934         
1935         * dom/TreeScopeAdopter.cpp:
1936         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1937         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
1938         * html/shadow/ContentDistributor.cpp:
1939         (WebCore::ContentDistributor::distribute):
1940         (WebCore::ContentDistributor::invalidate):
1941         (WebCore::ContentDistributor::ensureSelectFeatureSet):
1942         * inspector/InspectorDOMAgent.cpp:
1943         (WebCore::InspectorDOMAgent::unbind):
1944         (WebCore::InspectorDOMAgent::buildObjectForNode):
1945         * page/FocusController.cpp:
1946         (WebCore::FocusNavigationScope::FocusNavigationScope):
1947         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
1948         * rendering/RenderFileUploadControl.cpp:
1949         (WebCore::RenderFileUploadControl::uploadButton):
1950         * svg/SVGTRefElement.cpp:
1951         (WebCore::SVGTRefElement::updateReferencedText):
1952         (WebCore::SVGTRefElement::detachTarget):
1953         * svg/SVGUseElement.cpp:
1954         (WebCore::SVGUseElement::clearResourceReferences):
1955         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
1956         (WebCore::SVGUseElement::buildShadowTree):
1957         * testing/Internals.cpp:
1958         (WebCore::Internals::ensureShadowRoot):
1959         (WebCore::Internals::shadowRoot):
1960         (WebCore):
1961         * testing/Internals.h:
1962         (Internals):
1963         * testing/Internals.idl:
1964
1965 2013-05-03  Martin Robinson  <mrobinson@igalia.com>
1966
1967         Simplify the #ifdefs in GraphicsContext3D.h
1968         https://bugs.webkit.org/show_bug.cgi?id=115568
1969
1970         Reviewed by Daniel Bates.
1971
1972         * platform/graphics/GraphicsContext3D.h:
1973         (GraphicsContext3D): Combine #ifdefs paths that have a common
1974         implementation. This reduces the #ifdef paths from many to just three.
1975         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1976         (WebCore::GraphicsContext3D::platformTexture): Move the implementation
1977         here to simplify the header.
1978         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1979         (WebCore::GraphicsContext3D::platformTexture): Ditto.
1980         (WebCore):
1981
1982 2013-05-03  Brendan Long  <b.long@cablelabs.com>
1983
1984         [Qt] Build with --video-track fails because String(AtomicString) is ambiguous
1985         https://bugs.webkit.org/show_bug.cgi?id=115551
1986
1987         Reviewed by Benjamin Poulain.
1988
1989         * html/HTMLMediaElement.cpp:
1990         (WebCore::HTMLMediaElement::configureTextTrackGroup):
1991         Change String(textTrack->kind()) to textTrack->kind().string(), and same thing with language.
1992
1993 2013-05-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1994
1995         [GStreamer] GStreamer log crashes in MediaPlayerPrivateGStreamerBase because of uninitialized category
1996         https://bugs.webkit.org/show_bug.cgi?id=115575
1997
1998         Reviewed by Philippe Normand.
1999
2000         No new tests needed.
2001
2002         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2003         Using extern debug category.
2004         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2005         Declaring debug category as not static.
2006
2007 2013-05-03  Brent Fulgham  <bfulgham@webkit.org>
2008
2009         [WinCairo] Unreviewed VS2010 Build Correction.
2010
2011         * WebCore.vcxproj/WebCore.vcxproj: Exclude CG-only
2012         SubimageCacheWithTimer.cpp from WinCairo build.
2013
2014 2013-05-03  Viatcheslav Ostapenko  <viatchslav.o@samsung.com>
2015
2016         [Cairo] Anti-aliasing should not be always disabled for lines
2017         https://bugs.webkit.org/show_bug.cgi?id=109535
2018
2019         Reviewed by Martin Robinson.
2020
2021         Don't disable antialiasing for text lines because it produces ugly picture if
2022         page is scaled.
2023
2024         Test: fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html
2025
2026         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2027         (WebCore::drawLineOnCairoContext):
2028
2029 2013-05-03  Daniel Bates  <dbates@webkit.org>
2030
2031         Remove unnecessary include HTMLNames.h from RenderThemeGtk.cpp
2032         https://bugs.webkit.org/show_bug.cgi?id=115571
2033
2034         Reviewed by Martin Robinson.
2035
2036         * platform/gtk/RenderThemeGtk.cpp:
2037
2038 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
2039
2040         [Mac] setMetadataURL incorrectly treats path bytes as Latin-1
2041         https://bugs.webkit.org/show_bug.cgi?id=115557
2042
2043         Reviewed by Sam Weinig.
2044
2045         * platform/mac/FileSystemMac.mm: (WebCore::setMetaData): Use the correct constructor.
2046
2047 2013-05-03  Andrei Bucur  <abucur@adobe.com>
2048
2049         Move pixelSnappedLayoutOverflowRect and maxLayoutOverflow from RenderBox
2050         https://bugs.webkit.org/show_bug.cgi?id=115550
2051
2052         Reviewed by Simon Fraser.
2053
2054         The patch moves pixelSnappedLayoutOverflowRect and maxLayoutOverflow out
2055         of RenderBox somewhere logically closer to their usage place.
2056
2057         pixelSnappedLayoutOverflowRect - moved to RenderView because it's called only
2058         for RenderView at this moment.
2059         There are other places when the overflow rect is pixel snapped but only after
2060         the rect is adjusted for writing modes or inflated.
2061
2062         maxLayoutOverflow - moved to RenderTreeAsText.cpp as a static function because
2063         it's used only there.
2064
2065         Tests: no new functional change.
2066
2067         * rendering/RenderBox.h: The functions declarations are removed.
2068         * rendering/RenderTreeAsText.cpp:
2069         (WebCore::maxLayoutOverflow): 
2070         * rendering/RenderView.h:
2071         (WebCore::RenderView::pixelSnappedLayoutOverflowRect):
2072
2073 2013-05-03  Andreas Kling  <akling@apple.com>
2074
2075         StyleResolver: Have "list of matched rules" API vend internal types instead of CSSOM wrappers.
2076         <http://webkit.org/b/115563>
2077
2078         Reviewed by Antti Koivisto.
2079
2080         Change styleRulesForElement() and pseudoStyleRulesForElement() to return Vectors of StyleRuleBase
2081         instead of CSSRuleLists. This defers instantiating CSSOM wrappers until they're actually needed
2082         for exposure to web API.
2083
2084         * page/DOMWindow.cpp:
2085         (WebCore::DOMWindow::getMatchedCSSRules):
2086
2087             Create a StaticCSSRuleList and populate it with CSSOM wrappers for the matched rules.
2088             This is the one place where we expose this functionality to the web.
2089
2090         * css/ElementRuleCollector.h:
2091         * css/ElementRuleCollector.cpp:
2092         (WebCore::ElementRuleCollector::matchedRuleList):
2093         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
2094
2095             Collect internal StyleRuleBase pointers here instead of creating wrappers.
2096
2097         * css/StyleResolver.h:
2098         * css/StyleResolver.cpp:
2099         (WebCore::StyleResolver::styleRulesForElement):
2100         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2101
2102             Vend said pointers.
2103
2104         * editing/EditingStyle.cpp:
2105         (WebCore::styleFromMatchedRulesForElement):
2106
2107             Dodge CSSOM wrapper instantiation (Woop woop!)
2108
2109         * inspector/InspectorCSSAgent.h:
2110         * inspector/InspectorCSSAgent.cpp:
2111         (WebCore::InspectorCSSAgent::buildObjectForRule):
2112
2113             Split buildObjectForRule() into two versions, one for CSSStyleRule and one for StyleRule.
2114             The CSSStyleRule one doesn't need a special path for parent-less rules, since those always
2115             come in through the StyleRule interface instead. This factoring can be improved further
2116             after this change.
2117
2118         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
2119         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
2120         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2121
2122             Tweaked for changes in StyleResolver API.
2123
2124 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
2125
2126         REGRESSION (r145042): Downloading a file sometimes results in could not create
2127         a sandbox extension Console message and file stays as a .download file
2128         https://bugs.webkit.org/show_bug.cgi?id=115559
2129         <rdar://problem/13785101>
2130
2131         Reviewed by Sam Weinig.
2132
2133         CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
2134         creates a string with maximum possible buffer size. This was confusing resolveSymlinksInPath().
2135
2136         * platform/cf/FileSystemCF.cpp: (WebCore::fileSystemRepresentation):
2137         Change fileSystemRepresentation to be less surprising. Really, we should rip apart
2138         CString and update callers to use better defined semantics, but this is the one function
2139         that repeatedly causes problems in practice.
2140
2141 2013-05-03  Andreas Kling  <akling@apple.com>
2142
2143         CSSRule style declarations getters shouldn't be const.
2144         <http://webkit.org/b/115572>
2145
2146         Reviewed by Antti Koivisto.
2147
2148         Accessing the CSSStyleDeclaration for a CSSRule is a potentially mutating operation,
2149         and should not be const.
2150
2151         * css/CSSFontFaceRule.cpp:
2152         (WebCore::CSSFontFaceRule::style):
2153         * css/CSSFontFaceRule.h:
2154         * css/CSSPageRule.cpp:
2155         (WebCore::CSSPageRule::style):
2156         * css/CSSPageRule.h:
2157         * css/CSSStyleRule.cpp:
2158         (WebCore::CSSStyleRule::style):
2159         * css/CSSStyleRule.h:
2160         (CSSStyleRule):
2161         * css/WebKitCSSFilterRule.cpp:
2162         (WebCore::WebKitCSSFilterRule::style):
2163         * css/WebKitCSSFilterRule.h:
2164         * css/WebKitCSSKeyframeRule.cpp:
2165         (WebCore::WebKitCSSKeyframeRule::style):
2166         * css/WebKitCSSKeyframeRule.h:
2167         (WebKitCSSKeyframeRule):
2168         * css/WebKitCSSViewportRule.cpp:
2169         (WebCore::WebKitCSSViewportRule::style):
2170         * css/WebKitCSSViewportRule.h:
2171
2172 2013-05-03  Andreas Kling  <akling@apple.com>
2173
2174         Use NotNull tag for placement new in WebCore.
2175         <http://webkit.org/b/115569>
2176
2177         Reviewed by Antti Koivisto.
2178
2179         Avoid emitting null checks where we use placement new to construct objects into safe locations.
2180
2181         * css/StylePropertySet.cpp:
2182         (WebCore::ImmutableStylePropertySet::create):
2183         * dom/Element.cpp:
2184         (WebCore::ShareableElementData::createWithAttributes):
2185         (WebCore::ShareableElementData::ShareableElementData):
2186         (WebCore::UniqueElementData::makeShareableCopy):
2187         * dom/QualifiedName.cpp:
2188         (WebCore::QualifiedName::init):
2189         (WebCore::createQualifiedName):
2190         * dom/make_names.pl:
2191         (printNamesCppFile):
2192         * platform/ThreadGlobalData.h:
2193         (WebCore::threadGlobalData):
2194         * platform/graphics/GlyphPage.h:
2195         (WebCore::GlyphPage::createForMixedFontData):
2196
2197 2013-01-11  Andreas Kling  <akling@apple.com>
2198
2199         Simplify CSSSelectorList creation/adoption.
2200         <http://webkit.org/b/106649>
2201
2202         Reviewed by Antti Koivisto.
2203
2204         Remove the optimization that special-cased construction of CSSSelectorLists with a single entry.
2205         This is in preparation for changing the way we store the selector lists on style rules.
2206
2207         * css/CSSParser.h:
2208         * css/CSSSelector.h:
2209
2210             Remove move(PassOwnPtr<CSSSelector> from, CSSSelector* to), inlining it into
2211             CSSSelectorList::adoptSelectorVector instead.
2212
2213         * css/CSSSelectorList.cpp:
2214         (WebCore::CSSSelectorList::CSSSelectorList):
2215         (WebCore::CSSSelectorList::deleteSelectors):
2216
2217             Handle all selector list lengths the same way.
2218
2219         (WebCore::CSSSelectorList::adoptSelectorVector):
2220
2221             Merge move() from CSSSelector.h into this code since it was the only call site.
2222             Also some minor readability cleanups.
2223
2224 2013-05-03  Antti Koivisto  <antti@apple.com>
2225
2226         Remove HTMLShadowElement
2227         https://bugs.webkit.org/show_bug.cgi?id=115555
2228
2229         Reviewed by Andreas Kling.
2230
2231         This is not used internally.
2232
2233         * CMakeLists.txt:
2234         * DerivedSources.cpp:
2235         * DerivedSources.make:
2236         * DerivedSources.pri:
2237         * GNUmakefile.list.am:
2238         * Target.pri:
2239         * WebCore.vcproj/WebCore.vcproj:
2240         * WebCore.vcxproj/WebCore.vcxproj:
2241         * WebCore.vcxproj/WebCore.vcxproj.filters:
2242         * WebCore.xcodeproj/project.pbxproj:
2243         * dom/ComposedShadowTreeWalker.cpp:
2244         * dom/NodeRenderingContext.cpp:
2245         * html/HTMLElementsAllInOne.cpp:
2246         * html/HTMLTagNames.in:
2247         * html/InputType.cpp:
2248         (WebCore::InputType::destroyShadowSubtree):
2249         * html/shadow/ContentDistributor.cpp:
2250         (WebCore::ContentDistributor::distribute):
2251         * html/shadow/HTMLShadowElement.cpp: Removed.
2252         * html/shadow/HTMLShadowElement.h: Removed.
2253         * html/shadow/HTMLShadowElement.idl: Removed.
2254         * page/DOMWindow.idl:
2255
2256 2013-05-03  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2257
2258         Remove WTF::ListRefPtr class
2259         https://bugs.webkit.org/show_bug.cgi?id=115516
2260
2261         Reviewed by Anders Carlsson.
2262
2263         ListRefPtr was used only by FontFamily class, besides it strongly depended
2264         on FontFamily class semantics which made it non-generic and inappropriate
2265         for being present inside WTF.
2266
2267         This patch removes WTF::ListRefPtr class and moves its the functionality
2268         into FontFamily class.
2269
2270         No new tests, no change in the behavior.
2271
2272         * page/FrameTree.h:
2273         (FrameTree):
2274         * platform/graphics/FontFamily.h:
2275         (FontFamily):
2276         (WebCore::FontFamily::~FontFamily):
2277         (WebCore):
2278
2279 2013-05-03  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2280
2281         Crash when calling QWebFrame::evaluateJavaScript
2282         https://bugs.webkit.org/show_bug.cgi?id=113434
2283
2284         Reviewed by Simon Hausmann.
2285
2286         We must take the JS API lock before accessing internal JS methods.
2287
2288         * bridge/qt/qt_runtime.cpp:
2289         (JSC::Bindings::unwrapBoxedPrimitive):
2290         (JSC::Bindings::getGregorianDateTimeUTC):
2291         (JSC::Bindings::convertQVariantToValue):
2292
2293 2013-05-02  Xan Lopez  <xlopez@igalia.com>
2294
2295         [GTK] Fine tune dependencies for glslang generated files
2296         https://bugs.webkit.org/show_bug.cgi?id=115537
2297
2298         Reviewed by Martin Robinson.
2299
2300         Make glslang.* explictly depend on glslang_tab.*, since the
2301         dependency does exist. Otherwise Make might decide to compile
2302         things ahead of time and fail.
2303
2304         * GNUmakefile.am:
2305
2306 2013-05-02  KyungTae Kim  <ktf.kim@samsung.com>
2307
2308         Fix build warnings on ResourceHandleClient.h
2309         https://bugs.webkit.org/show_bug.cgi?id=115540
2310
2311         Reviewed by Alexey Proskuryakov.
2312
2313         Comment out the parameter names for 'getOrCreateReadBuffer' to fix -Wunused-parameter build warnings.
2314
2315         * platform/network/ResourceHandleClient.h:
2316         (WebCore::ResourceHandleClient::getOrCreateReadBuffer):
2317
2318 2013-05-02  Roger Fong  <roger_fong@apple.com>
2319
2320         Following r149463, set Path for WebCore makefile as well.
2321
2322         * WebCore.vcxproj/WebCore.make:
2323
2324 2013-05-02  Eric Carlson  <eric.carlson@apple.com>
2325
2326         Unreviewed fix for Mac Lion build after r149503.
2327
2328         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:
2329         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2330
2331 2013-05-02  David Kilzer  <ddkilzer@apple.com>
2332
2333         BUILD FIX: Move Mac-only symbols into the shared symbol list
2334
2335         * WebCore.exp.in: Move symbols.
2336
2337 2013-05-02  Antti Koivisto  <antti@apple.com>
2338
2339         Shadow DOM removal: Get rid of ContentSelectorQuery
2340         https://bugs.webkit.org/show_bug.cgi?id=115533
2341
2342         Reviewed by Anders Carlsson.
2343
2344         This is only used for Shadow DOM distribution. <details> element works fine without it.
2345
2346         * CMakeLists.txt:
2347         * GNUmakefile.list.am:
2348         * Target.pri:
2349         * WebCore.vcproj/WebCore.vcproj:
2350         * WebCore.vcxproj/WebCore.vcxproj:
2351         * WebCore.vcxproj/WebCore.vcxproj.filters:
2352         * WebCore.xcodeproj/project.pbxproj:
2353         * html/shadow/ContentDistributor.cpp:
2354         (WebCore::ContentDistributor::distributeSelectionsTo):
2355         * html/shadow/ContentSelectorQuery.cpp: Removed.
2356         * html/shadow/ContentSelectorQuery.h: Removed.
2357         * html/shadow/HTMLContentElement.cpp:
2358
2359 2013-05-02  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2360
2361         border-radius clipping a canvas does not always clip
2362         https://bugs.webkit.org/show_bug.cgi?id=113343
2363
2364         Reviewed by Simon Fraser.
2365
2366         clipToRect method clip context to clipRect, and then clip to rounded
2367         rect if clipRect has a radius. But currently, clipToRect exit early if
2368         clipToRect is equal to paintDirtyRect.
2369
2370         This patch allows clipping to rounded corner ever if clipToRect is
2371         equal to paintDirtyRect.
2372
2373         Test: fast/overflow/border-radius-clipping-2.html
2374
2375         * rendering/RenderLayer.cpp:
2376         (WebCore::RenderLayer::clipToRect):
2377
2378 2013-05-02  Eric Carlson  <eric.carlson@apple.com>
2379
2380         Caption menu does not include in-band captions
2381         https://bugs.webkit.org/show_bug.cgi?id=111934
2382
2383         Reviewed by Dean Jackson.
2384
2385         No new tests, upated existing tests for these changes.
2386
2387         * WebCore.xcodeproj/project.pbxproj: Add new files.
2388
2389         * html/HTMLMediaElement.cpp:
2390         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_legacyWebKitClosedCaptionsVisible.
2391         (WebCore::HTMLMediaElement::loadInternal): Clear the LoadMediaResource from m_pendingActionFlags
2392             in case there is a pending async load.
2393         (WebCore::HTMLMediaElement::configureTextTrackGroup): Always log the track score.
2394         (WebCore::HTMLMediaElement::configureTextTracks): Call configureTextTrackDisplay so 
2395             m_legacyWebKitClosedCaptionsVisible is always updated immediately.
2396         (WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Use m_legacyWebKitClosedCaptionsVisible.
2397         (WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Ditto.
2398         * html/HTMLMediaElement.h:
2399
2400         * page/CaptionUserPreferences.cpp:
2401         (WebCore::CaptionUserPreferences::CaptionUserPreferences): Initialize m_displayMode to ForcedOnly
2402             because it is no longer used for testing only.
2403         (WebCore::CaptionUserPreferences::notify): Post notifications when not in testing-only mode.
2404
2405         * page/CaptionUserPreferencesMac.h:
2406         * page/CaptionUserPreferencesMac.mm:
2407         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate a track score when
2408             webkitClosedCaptionsVisible has been set.
2409         (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Don't filter track list when we
2410             don't have the media accessibility framework. Make logging more informative.
2411         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2412
2413         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2414
2415         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
2416         (WebCore::InbandTextTrackPrivateAVFObjC::create): Take a AVFInbandTrackParent instead of a
2417             MediaPlayerPrivateAVFoundationObjC.
2418         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2419         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
2420
2421         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Added.
2422         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm: Added.
2423
2424         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2425         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2426         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): We only have legible output when
2427             HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT is defined.
2428         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
2429         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
2430         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Create a legacy CC track if
2431             there are no media selection options and there is a CC AVAssetTrack.
2432         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyCCTracks): New, process CC tracks.
2433         (WebCore::MediaPlayerPrivateAVFoundationObjC::processNewAndRemovedTextTracks): New, refactored
2434             common setup/cleanup code from processMediaSelectionOptions.
2435         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Renamed from 
2436             processTextTracks. Move common setup/cleanup code to processNewAndRemovedTextTracks.
2437         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deal with legacy CC tracks.
2438
2439 2013-05-02  Eric Carlson  <eric.carlson@apple.com>
2440
2441         [Mac] caption track menu includes "easy to read" in-band tracks twice
2442         https://bugs.webkit.org/show_bug.cgi?id=115529
2443
2444         Reviewed by Dean Jackson.
2445
2446         * page/CaptionUserPreferencesMac.mm:
2447         (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Check to see if a track is
2448              easy-to-read after checking if it is forced only.
2449
2450 2013-05-02  Antti Koivisto  <antti@apple.com>
2451
2452         Remove SiblingTraversalStrategies.h
2453         https://bugs.webkit.org/show_bug.cgi?id=115532
2454
2455         Reviewed by Andreas Kling.
2456
2457         * GNUmakefile.list.am:
2458         * Target.pri:
2459         * WebCore.vcproj/WebCore.vcproj:
2460         * WebCore.vcxproj/WebCore.vcxproj:
2461         * WebCore.vcxproj/WebCore.vcxproj.filters:
2462         * WebCore.xcodeproj/project.pbxproj:
2463         * css/SiblingTraversalStrategies.h: Removed.
2464
2465 2013-05-02  Antti Koivisto  <antti@apple.com>
2466
2467         Shadow DOM removal: Make SelectorChecker non-generic
2468         https://bugs.webkit.org/show_bug.cgi?id=115526
2469
2470         Reviewed by Andreas Kling.
2471
2472         Without Shadow DOM distribution we don't need SiblingTraversalStrategies anymore.
2473
2474         * css/ElementRuleCollector.cpp:
2475         (WebCore::ElementRuleCollector::ruleMatches):
2476         * css/SelectorChecker.cpp:
2477         (WebCore):
2478         (WebCore::isFirstChildElement):
2479         (WebCore::isLastChildElement):
2480         (WebCore::isFirstOfType):
2481         (WebCore::isLastOfType):
2482         (WebCore::countElementsBefore):
2483         (WebCore::countElementsOfTypeBefore):
2484         (WebCore::countElementsAfter):
2485         (WebCore::countElementsOfTypeAfter):
2486         (WebCore::SelectorChecker::match):
2487         (WebCore::SelectorChecker::checkOne):
2488         * css/SelectorChecker.h:
2489         (SelectorChecker):
2490         * css/SiblingTraversalStrategies.h:
2491         * css/StyleResolver.h:
2492         (WebCore::checkRegionSelector):
2493         * dom/SelectorQuery.cpp:
2494         (WebCore::SelectorDataList::selectorMatches):
2495         * html/shadow/ContentSelectorQuery.cpp:
2496         (WebCore::ContentSelectorDataList::checkContentSelector):
2497
2498 2013-05-02  Anders Carlsson  <andersca@apple.com>
2499
2500         Simplify WebCoreObjCExtras by using WTF::bind
2501         https://bugs.webkit.org/show_bug.cgi?id=115524
2502
2503         Reviewed by Andreas Kling.
2504
2505         * platform/mac/WebCoreObjCExtras.mm:
2506         (deallocCallback):
2507         (WebCoreObjCScheduleDeallocateOnMainThread):
2508
2509 2013-05-02  Alexey Proskuryakov  <ap@apple.com>
2510
2511         <rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
2512         https://bugs.webkit.org/show_bug.cgi?id=115520
2513
2514         Reviewed by Darin Adler.
2515
2516         Covered by existing tests when using NetworkProcess.
2517
2518         * WebCore.exp.in:
2519         * platform/network/ResourceRequestBase.h:
2520         (WebCore::ResourceRequestBase::responseContentDispositionEncodingFallbackArray):
2521         Added a getter for encoding fallback array.
2522
2523         * platform/network/mac/ResourceRequestMac.mm:
2524         (WebCore::ResourceRequest::doUpdateResourceRequest):
2525         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2526         Removed obsolete checks for presence of fallback array methods, they were available
2527         since 10.6.8.
2528
2529 2013-05-01  Enrica Casucci  <enrica@apple.com>
2530
2531         text-combine: horizontal does not work properly for some fonts.
2532         https://bugs.webkit.org/show_bug.cgi?id=115503.
2533
2534         Reviewed by Dave Hyatt.
2535
2536         For some fonts that don't have width variants, we fail to combine glyphs
2537         because we believe they don't fit. That decision is made comparing the run width
2538         with the font computed size multiplied by a margin factor.
2539         I've increased the margin from 10% to 15%.
2540          
2541         Test: fast/text/text-combine-different-fonts.html
2542
2543         * rendering/RenderCombineText.cpp:
2544
2545 2013-05-01  Joseph Pecoraro  <pecoraro@apple.com>
2546
2547         Null check plugInClient earlier in snapshotting path
2548         https://bugs.webkit.org/show_bug.cgi?id=115498
2549
2550         Reviewed by Darin Adler.
2551
2552         * html/HTMLPlugInImageElement.cpp:
2553         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
2554
2555 2013-05-01  Seokju Kwon  <seokju.kwon@gmail.com>
2556
2557         Web Inspector: Fix check-inspector-strings script and fix localized strings
2558         https://bugs.webkit.org/show_bug.cgi?id=115495
2559
2560         Reviewed by Joseph Pecoraro.
2561
2562         No new tests, because there is no change in behavior.
2563
2564         * English.lproj/localizedStrings.js:
2565
2566 2013-05-01  Tim Horton  <timothy_horton@apple.com>
2567
2568         <object data="<some data URL>"> MIME types aren't case-insensitive
2569         https://bugs.webkit.org/show_bug.cgi?id=115494
2570
2571         Reviewed by Darin Adler.
2572
2573         Test: fast/images/object-data-url-case-insensitivity.html
2574
2575         MIME types are defined to be case-insensitive, but many places in WebCore
2576         only compare them against lower-case strings. Most entry points for MIME
2577         types lower-case them, but mimeTypeFromDataURL doesn't, causing, for example,
2578         data:image/png;... to work, but data:iMaGe/PNG;... to fail.
2579
2580         To fix this, lower-case the string returned from mimeTypeFromDataURL.
2581
2582         * platform/KURL.cpp:
2583         (WebCore::mimeTypeFromDataURL):
2584
2585 2013-05-01  Ryosuke Niwa  <rniwa@webkit.org>
2586
2587         [Mac] Text replacement should use correction indicator
2588         https://bugs.webkit.org/show_bug.cgi?id=115471
2589
2590         Reviewed by Darin Adler.
2591
2592         Support autocorrection panel for text replacements by making AlternativeTextTypeCorrection
2593         handle text replacements as well as automatic spelling correction.
2594
2595         No new tests. Unfortunately this feature is not testable as is. We need to provide some
2596         internals or testRunner methods to make this feature testable in the long term.
2597
2598         * editing/AlternativeTextController.cpp:
2599         (WebCore::AlternativeTextController::timerFired): Trigger both TextCheckingTypeReplacement
2600         and TextCheckingTypeShowCorrectionPanel.
2601
2602         * editing/Editor.cpp:
2603         (WebCore::Editor::markAndReplaceFor): Autocorrection panel maybe used for both
2604         TextCheckingTypeReplacement and TextCheckingTypeShowCorrectionPanel.
2605
2606 2013-05-01  Tim Horton  <timothy_horton@apple.com>
2607
2608         Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
2609         https://bugs.webkit.org/show_bug.cgi?id=115487
2610
2611         Reviewed by Darin Adler.
2612
2613         No new tests, just a refactoring.
2614
2615         * WebCore.exp.in:
2616         Export newly-added isPDFOrPostScriptMIMEType and getPDFAndPostScriptMIMETypes.
2617
2618         * dom/DOMImplementation.cpp:
2619         (WebCore::DOMImplementation::createDocument):
2620         Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType instead of duplicating
2621         the list of MIME types. The previous list did not include PostScript, but
2622         it seems reasonable to put plugins ahead of built-in support for it in addition to PDF.
2623
2624         * platform/MIMETypeRegistry.cpp:
2625         (WebCore::initializePDFAndPostScriptMIMETypes): Added.
2626         (WebCore::initializeMIMETypeRegistry): Call initializePDFAndPostScriptMIMETypes.
2627         (WebCore::MIMETypeRegistry::isPDFOrPostScriptMIMEType):
2628         Consult our new HashSet to see if the given MIME type is one of those used for PDF or PS.
2629
2630         (WebCore::MIMETypeRegistry::getPDFAndPostScriptMIMETypes): Added.
2631         * platform/MIMETypeRegistry.h:
2632         (MIMETypeRegistry): Add isPDFOrPostScriptMIMEType and getPDFAndPostScriptMIMETypes.
2633
2634 2013-05-01  Anders Carlsson  <andersca@apple.com>
2635
2636         Implement LocalStorageDatabase::importItems
2637         https://bugs.webkit.org/show_bug.cgi?id=115493
2638
2639         Reviewed by Andreas Kling.
2640
2641         Export symbols needed by WebKit2.
2642
2643         * WebCore.exp.in:
2644
2645 2013-05-01  Anders Carlsson  <andersca@apple.com>
2646
2647         Begin work on loading items from the local storage database
2648         https://bugs.webkit.org/show_bug.cgi?id=115489
2649
2650         Reviewed by Andreas Kling.
2651
2652         Export symbols and SQLite headers needed.
2653
2654         * WebCore.exp.in:
2655         * WebCore.xcodeproj/project.pbxproj:
2656
2657 2013-05-01  Hans Muller  <hmuller@adobe.com>
2658         [CSS Exclusions] Programmatic layout tests fail when subpixel layout is disabled
2659         https://bugs.webkit.org/show_bug.cgi?id=115455
2660
2661         First round of changes to restore platform/mac exclusion tests that started failing when
2662         subpixel layout was turned off.
2663
2664         Reviewed by Dirk Schulze.
2665
2666         * rendering/ExclusionPolygon.cpp:
2667         (WebCore::appendArc): Ensure that the 3rd of 5 added vertices is in the center of the arc.
2668         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Use ceiledLayoutUnit() for downwards-snapping first fit location.
2669         * rendering/ExclusionRectangle.cpp:
2670         (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): Ditto.
2671
2672 2013-05-01  Enrica Casucci  <enrica@apple.com>
2673
2674         Incorrect layout for blocks containing ideographs with -webkit-linebox-contain: glyphs, font, inline-box.
2675         https://bugs.webkit.org/show_bug.cgi?id=115478.
2676
2677         Reviewed by Dave Hyatt.
2678
2679         Test: fast/block/lineboxcontain/block-with-ideographs.xhtml
2680
2681         When computing ascent and descent we need to take into account
2682         the baseline type. RootInlineBox::ascentAndDescentForBox failed
2683         to do that in few cases.
2684
2685         * rendering/RootInlineBox.cpp:
2686         (WebCore::RootInlineBox::ascentAndDescentForBox):
2687
2688 2013-05-01  Anders Carlsson  <andersca@apple.com>
2689
2690         Add LocalStorageDatabase class
2691         https://bugs.webkit.org/show_bug.cgi?id=115486
2692
2693         Reviewed by Sam Weinig.
2694
2695         Export symbols needed by WebKit2.
2696
2697         * WebCore.exp.in:
2698
2699 2013-05-01  Eric Carlson  <eric.carlson@apple.com>
2700
2701         [Mac Lion] Assertion failure in MediaControlTextTrackContainerElement::updateDisplay()
2702         https://bugs.webkit.org/show_bug.cgi?id=115289
2703
2704         Reviewed by Jer Noble.
2705
2706         No new tests, this is a speculative fix for an infrequent assertion.
2707
2708         * html/HTMLMediaElement.cpp:
2709         (WebCore::HTMLMediaElement::textTrackRemoveCue): Mark the cue as inactive when it is removed
2710             from the active set.
2711
2712 2013-05-01  Joseph Pecoraro  <pecoraro@apple.com>
2713
2714         TextTrackMenu crashes in ports where MediaElement players are lazily created
2715         https://bugs.webkit.org/show_bug.cgi?id=115485
2716
2717         Null check the player for ports, like iOS, that lazily create the player.
2718
2719         Reviewed by Eric Carlson.
2720
2721         * html/HTMLMediaElement.cpp:
2722         (WebCore::HTMLMediaElement::platformTextTrackMenu):
2723         (WebCore::HTMLMediaElement::closeCaptionTracksChanged):
2724
2725 2013-05-01  Anders Carlsson  <andersca@apple.com>
2726
2727         Add FunctionDispatcher class and make RunLoop derive from it
2728         https://bugs.webkit.org/show_bug.cgi?id=115480
2729
2730         Reviewed by Sam Weinig.
2731
2732         Change RunLoop to be a subclass of FunctionDispatcher.
2733
2734         * platform/RunLoop.h:
2735         (RunLoop):
2736
2737 2013-05-01  Eric Carlson  <eric.carlson@apple.com>
2738
2739         HTMLMediaElement::updateActiveTextTrackCues can do unnecessary work
2740         https://bugs.webkit.org/show_bug.cgi?id=81856
2741
2742         Reviewed by Jer Noble.
2743
2744         No new tests, covered by existing tests.
2745
2746         * html/HTMLMediaElement.h:
2747         (WebCore::HTMLMediaElement::ignoreTrackDisplayUpdateRequests): Add an early return when there
2748             is obviously no work to be done.
2749
2750 2013-04-30  Jer Noble  <jer.noble@apple.com>
2751
2752         Closed caption lines overlap
2753         https://bugs.webkit.org/show_bug.cgi?id=115438
2754         <rdar://problem/13351747>
2755
2756         Reviewed by Eric Carlson.
2757
2758         Take the line-box padding into account when determining line hight by setting
2759         the -webkit-line-box-contain property to include 'inline-box'.
2760
2761         * css/mediaControls.css:
2762         (video::-webkit-media-text-track-container):
2763
2764 2013-05-01  David Kilzer  <ddkilzer@apple.com>
2765
2766         BUILD FIX (r149410): CFRunLoopStop() doesn't know what to do with a RetainPtr<CFRunLoopRef>
2767
2768         Fixes the following build failure:
2769
2770             WebCore/platform/cf/RunLoopCF.cpp:82:5: error: no matching function for call to 'CFRunLoopStop'
2771                 CFRunLoopStop(m_runLoop);
2772                 ^~~~~~~~~~~~~
2773
2774         * platform/cf/RunLoopCF.cpp:
2775         (WebCore::RunLoop::stop): Call RetainPtr::get().
2776
2777 2013-05-01  Per-Erik Brodin  <per-erik.brodin@ericsson.com>
2778
2779         EventSource: Loss of reconnect time precision due to integer division
2780         https://bugs.webkit.org/show_bug.cgi?id=115358
2781
2782         Make sure precision is not lost when converting the reconnect time from milliseconds to seconds.
2783
2784         Reviewed by Alexey Proskuryakov.
2785
2786         Test: http/tests/eventsource/eventsource-retry-precision.html
2787
2788         * page/EventSource.cpp:
2789         (WebCore::EventSource::scheduleReconnect):
2790
2791 2013-05-01  Andreas Kling  <akling@apple.com>
2792
2793         REGRESSION(r149287): Assertion failure in fast/frames/flattening/iframe-flattening-crash.html
2794         <http://webkit.org/b/115386>
2795         <rdar://problem/13769995>
2796
2797         Reviewed by Antti Koivisto.
2798
2799         Only send synchronous resize events for the main frame. Subframes change size during layout,
2800         so it never really makes sense for them to use synchronous dispatch anyway.
2801
2802         * page/FrameView.cpp:
2803         (WebCore::FrameView::dispatchResizeEvent):
2804
2805 2013-05-01  Csaba Osztrogonác  <ossy@webkit.org>
2806
2807         Unreviewed trivial buildfix after r149432.
2808
2809         * testing/Internals.cpp:
2810         (WebCore):
2811
2812 2013-05-01  Sergio Villar Senin  <svillar@igalia.com>
2813
2814         Show a block cursor in overtype mode
2815         https://bugs.webkit.org/show_bug.cgi?id=114819
2816
2817         Reviewed by Ryosuke Niwa.
2818
2819         Test: editing/selection/block-cursor-overtype-mode.html
2820
2821         Overtype mode will use block cursor instead of a caret to
2822         highlight the next character to be replaced. It will fully cover
2823         the next character to be replaced (except at the end of a line
2824         where the usual blinking caret will be shown).
2825
2826         This new block cursor is internally implemented as a selection
2827         (not exposed to JavaScript) because the selection code knows how
2828         to deal with bidi text.
2829
2830         * WebCore.exp.in: Export symbols for testing purposes.
2831         * WebCore.order: Ditto.
2832         * editing/Editor.cpp:
2833         (WebCore::Editor::toggleOverwriteModeEnabled): Added a call to
2834         FrameLoader::setShouldShowBlockCursor.
2835         (WebCore):
2836         * editing/Editor.h:
2837         (Editor):
2838         * editing/FrameSelection.cpp:
2839         (WebCore::FrameSelection::FrameSelection):
2840         (WebCore::FrameSelection::updateAppearance): Use a 1-character
2841         long selection to paint the cursor in overtype mode.
2842         (WebCore::FrameSelection::setShouldShowBlockCursor):
2843         (WebCore):
2844         * editing/FrameSelection.h:
2845         (WebCore::FrameSelection::shouldShowBlockCursor):
2846         (FrameSelection):
2847         * testing/Internals.cpp:
2848         (WebCore):
2849         (WebCore::Internals::selectionBounds): Added a new method which
2850         returns the IntRect issued by FrameSelection::bounds().
2851         * testing/Internals.h: Ditto.
2852         * testing/Internals.idl: Ditto.
2853
2854 2013-04-30  Darin Adler  <darin@apple.com>
2855
2856         [Mac] Remove adoptNS/retain pairs, since the two cancel each other out
2857         https://bugs.webkit.org/show_bug.cgi?id=115426
2858
2859         Reviewed by Anders Carlsson.
2860
2861         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2862         (PlatformCAAnimation::PlatformCAAnimation):
2863         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2864         (PlatformCAFilters::filterValueForOperation):
2865         * platform/network/mac/ResourceResponseMac.mm:
2866         (WebCore::ResourceResponse::nsURLResponse):
2867         Remove adoptNS and release from code that is doing both.
2868
2869 2013-04-29  Sam Weinig  <sam@webkit.org>
2870
2871         Add API to allow WebKit2 banners to get mouse events
2872         https://bugs.webkit.org/show_bug.cgi?id=115395
2873
2874         Reviewed by Beth Dakin.
2875
2876         * WebCore.exp.in:
2877         * platform/ScrollView.cpp:
2878         (WebCore::ScrollView::rootViewToTotalContents):
2879         * platform/ScrollView.h:
2880         Add and expose rootViewToTotalContents().
2881
2882 2013-04-30  Anders Carlsson  <andersca@apple.com>
2883
2884         Make RunLoop ref-counted
2885         https://bugs.webkit.org/show_bug.cgi?id=115384
2886
2887         Reviewed by Benjamin Poulain.
2888
2889         Add a RunLoop::Holder class which creates and holds the ref-counted RunLoop object.
2890
2891         * platform/RunLoop.cpp:
2892         (RunLoop::Holder):
2893         (WebCore::RunLoop::Holder::Holder):
2894         (WebCore::RunLoop::Holder::runLoop):
2895         (WebCore::RunLoop::current):
2896         * platform/RunLoop.h:
2897
2898 2013-04-30  Anders Carlsson  <andersca@apple.com>
2899
2900         Clean up RunLoop code
2901         https://bugs.webkit.org/show_bug.cgi?id=115454
2902
2903         Reviewed by Andreas Kling.
2904
2905         Delete a couple of functions from RunLoopCF.cpp and just use the generic ones in RunLoop.cpp,
2906         use RetainPtr instead of manual retain/release. Always use an AutoreleasePool when calling performWork or timers.
2907
2908         * platform/RunLoop.cpp:
2909         (WebCore::RunLoop::setUseApplicationRunLoopOnMainRunLoop):
2910         (WebCore):
2911         * platform/RunLoop.h:
2912         (TimerBase):
2913         (RunLoop):
2914         * platform/cf/RunLoopCF.cpp:
2915         (WebCore::RunLoop::performWork):
2916         (WebCore::RunLoop::RunLoop):
2917         (WebCore::RunLoop::~RunLoop):
2918         (WebCore::RunLoop::wakeUp):
2919         (WebCore::RunLoop::TimerBase::timerFired):
2920         (WebCore::RunLoop::TimerBase::TimerBase):
2921         (WebCore::RunLoop::TimerBase::start):
2922         (WebCore::RunLoop::TimerBase::stop):
2923         (WebCore::RunLoop::TimerBase::isActive):
2924         * platform/mac/RunLoopMac.mm:
2925         (WebCore::RunLoop::run):
2926         (WebCore::RunLoop::stop):
2927
2928 2013-04-30  David Hyatt  <hyatt@apple.com>
2929
2930         <button> ignores margin-bottom.
2931         https://bugs.webkit.org/show_bug.cgi?id=114940
2932         
2933         Reviewed by Beth Dakin.
2934
2935         Make sure that the inner block inside the <button> (flexbox) acts like it
2936         establishes a block formatting context, i.e., it should refuse to collapse
2937         its margins with its children. This causes margins to stay inside the <button>
2938         and be honored, adding to the button's overall height.
2939         
2940         Basically we have to remove the restriction that anonymous blocks can't be
2941         BFCs on the bottom margin.
2942
2943         Added fast/forms/content-with-margins-inside-button.html
2944
2945         * rendering/RenderBlock.cpp:
2946         (WebCore::RenderBlock::handleAfterSideOfBlock):
2947
2948 2013-04-30  Andrei Bucur  <abucur@adobe.com>
2949
2950         Cleanup HTMLOListElement<->RenderListItem bridge
2951         https://bugs.webkit.org/show_bug.cgi?id=115434
2952
2953         Reviewed by Darin Adler.
2954
2955         Refactor the way HTMLOListElement is accessing its list items. Instead
2956         of exposing the nextListItem function, wrap the desiredfunctionality
2957         in static methods on RenderListItem. This should make the code more readable.
2958         I've also added more constness to some functions in RenderListItem.
2959
2960         Tests: No new tests, just refactoring.
2961
2962         * html/HTMLOListElement.cpp:
2963         (WebCore::HTMLOListElement::updateItemValues): Use updateItemValuesForOrderedList.
2964         (WebCore::HTMLOListElement::recalculateItemCount): Use itemCountForOrderedList.
2965         * rendering/RenderListItem.cpp:
2966         (WebCore::isList): Add more constness.
2967         (WebCore::nextListItem): Make local to the CPP and add constness.
2968         (WebCore::previousListItem): Add constness.
2969         (WebCore::RenderListItem::updateItemValuesForOrderedList): Called by OL elements.
2970         (WebCore::RenderListItem::itemCountForOrderedList): Called by OL elements.
2971         (WebCore::previousOrNextItem):
2972         * rendering/RenderListItem.h: Add updateItemValuesForOrderedList and itemCountForOrderedList.
2973
2974 2013-04-30  Anders Carlsson  <andersca@apple.com>
2975
2976         More StorageTracker cleanup
2977         https://bugs.webkit.org/show_bug.cgi?id=115435
2978
2979         Reviewed by Andreas Kling.
2980
2981         Use bind instead of "onMainThread" helper functions.
2982
2983         * storage/StorageAreaSync.cpp:
2984         (WebCore::StorageAreaSync::deleteEmptyDatabase):
2985         * storage/StorageTracker.cpp:
2986         (WebCore::StorageTracker::syncImportOriginIdentifiers):
2987         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
2988         (WebCore::StorageTracker::deleteOriginWithIdentifier):
2989         * storage/StorageTracker.h:
2990         (StorageTracker):
2991
2992 2013-04-30  Geoffrey Garen  <ggaren@apple.com>
2993
2994         Objective-C JavaScriptCore API should publicly support bridging to C
2995         https://bugs.webkit.org/show_bug.cgi?id=115447
2996
2997         Reviewed by Mark Hahnenberg.
2998
2999         * bindings/js/ScriptControllerMac.mm:
3000         (WebCore::ScriptController::javaScriptContext):
3001         * bindings/objc/WebScriptObject.mm:
3002         (-[WebScriptObject JSValue]):
3003
3004 2013-04-30  Simon Fraser  <simon.fraser@apple.com>
3005
3006         Fix an issue with JSPerformance.cpp in the WebCore.xcodeproj where
3007         it was being recognized as a diretory rather than a file, introduced
3008         in r149359.
3009         
3010         * WebCore.xcodeproj/project.pbxproj:
3011
3012 2013-04-30  Beth Dakin  <bdakin@apple.com>
3013
3014         Page::pageCount() is inaccurate when we allow the first paint in App Mode
3015         https://bugs.webkit.org/show_bug.cgi?id=115442
3016         -and corresponding-
3017         <rdar://problem/13758445>
3018
3019         Reviewed by Dave Hyatt.
3020
3021         We should set the height here all the time, even if it is the first layout.
3022         * rendering/RenderBlock.cpp:
3023         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
3024
3025 2013-04-30  Andreas Kling  <akling@apple.com>
3026
3027         Don't create StyleResolvers just to invalidate them.
3028         <http://webkit.org/b/115436>
3029
3030         Reviewed by Geoffrey Garen.
3031
3032         Renamed Document::styleResolver() to ensureStyleResolver() so it's clear that it never returns null.
3033         Removed a bunch of unnecessary null-checks I spotted while doing this.
3034
3035         Also fixed Element::willModifyAttribute() and FrameView::setFrameRect() to not create a StyleResolver
3036         and immediately invalidate it in some cases.
3037
3038         * css/FontLoader.cpp:
3039         (WebCore::FontLoader::loadFont):
3040         (WebCore::FontLoader::checkFont):
3041         (WebCore::FontLoader::resolveFontStyle):
3042         * css/MediaQueryMatcher.cpp:
3043         (WebCore::MediaQueryMatcher::prepareEvaluator):
3044         * css/StyleMedia.cpp:
3045         (WebCore::StyleMedia::matchMedium):
3046         * dom/Document.cpp:
3047         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
3048         (WebCore::Document::styleForPage):
3049         * dom/Document.h:
3050         (WebCore::Document::ensureStyleResolver):
3051         * dom/DocumentStyleSheetCollection.cpp:
3052         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
3053         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
3054         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3055         * dom/Element.cpp:
3056         (WebCore::StyleResolverParentPusher::push):
3057         (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
3058         (WebCore::Element::styleForRenderer):
3059         (WebCore::Element::recalcStyle):
3060         (WebCore::Element::willModifyAttribute):
3061         * dom/NodeRenderingContext.cpp:
3062         (WebCore::NodeRenderingContext::createRendererForTextIfNeeded):
3063         * dom/ShadowRoot.cpp:
3064         (WebCore::ShadowRoot::recalcStyle):
3065         (WebCore::ShadowRoot::attach):
3066         * dom/Text.cpp:
3067         (WebCore::Text::recalcTextStyle):
3068         * editing/EditingStyle.cpp:
3069         (WebCore::styleFromMatchedRulesForElement):
3070         * html/HTMLCanvasElement.cpp:
3071         * html/HTMLCanvasElement.h:
3072         * html/HTMLInputElement.cpp:
3073         (WebCore::HTMLInputElement::customStyleForRenderer):
3074         * html/HTMLOptGroupElement.cpp:
3075         (WebCore::HTMLOptGroupElement::updateNonRenderStyle):
3076         * html/HTMLOptionElement.cpp:
3077         (WebCore::HTMLOptionElement::updateNonRenderStyle):
3078         * html/HTMLPlugInImageElement.cpp:
3079         (WebCore::HTMLPlugInImageElement::customStyleForRenderer):
3080         * html/canvas/CanvasRenderingContext2D.cpp:
3081         (WebCore::CanvasRenderingContext2D::setFont):
3082         * html/shadow/DateTimeEditElement.cpp:
3083         (WebCore::DateTimeEditElement::customStyleForRenderer):
3084         * inspector/InspectorCSSAgent.cpp:
3085         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
3086         * page/DOMWindow.cpp:
3087         (WebCore::DOMWindow::getMatchedCSSRules):
3088         * page/FrameView.cpp:
3089         (WebCore::FrameView::setFrameRect):
3090         * page/animation/KeyframeAnimation.cpp:
3091         (WebCore::KeyframeAnimation::KeyframeAnimation):
3092         * rendering/RenderListBox.cpp:
3093         (WebCore::RenderListBox::updateFromElement):
3094         (WebCore::RenderListBox::paintItemForeground):
3095         * rendering/RenderMenuList.cpp:
3096         (WebCore::RenderMenuList::fontSelector):
3097         * rendering/RenderObject.cpp:
3098         (WebCore::RenderObject::getUncachedPseudoStyle):
3099         * rendering/RenderRegion.cpp:
3100         (WebCore::RenderRegion::checkRegionStyle):
3101         (WebCore::RenderRegion::computeStyleInRegion):
3102         * rendering/RenderSearchField.cpp:
3103         (WebCore::RenderSearchField::fontSelector):
3104         * rendering/svg/RenderSVGInlineText.cpp:
3105         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
3106         * svg/SVGElement.cpp:
3107         (WebCore::SVGElement::customStyleForRenderer):
3108         * svg/SVGElementRareData.h:
3109         (WebCore::SVGElementRareData::overrideComputedStyle):
3110
3111 2013-04-30  Simon Fraser  <simon.fraser@apple.com>
3112
3113         Cap max CALayer tree depth to avoid crashes
3114         https://bugs.webkit.org/show_bug.cgi?id=115431
3115         <rdar://problem/13401861>
3116
3117         Reviewed by Tim Horton.
3118         
3119         Core Animation can crash if fed deeply nested layer trees.
3120         Avoid this by capping CALayer tree depth at some empirically-determined
3121         level.
3122
3123         Test: compositing/layer-creation/deep-tree.html
3124
3125         * platform/graphics/ca/GraphicsLayerCA.h:
3126         (WebCore::GraphicsLayerCA::CommitState::CommitState): Add treeDepth to the CommitState.
3127         * platform/graphics/ca/GraphicsLayerCA.cpp: Set cMaxLayerTreeDepth to 250
3128         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): We need a dummy CommitState
3129         here. It is not expected that flushCompositingStateForThisLayerOnly() will be called for
3130         a layer in the middle of the hierarchy, only for custom-managed leaf layers, so we don't try
3131         to compute the correct tree depth.
3132         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Pass in the commitState. Since this is
3133         copied for each frame, no need to decrement commitState.treeDepth.
3134         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Increment treeDepth once or
3135         twice. If we've reached max, be sure to set the ChildrenChanged flag. We delay tree truncation
3136         until commitLayerChangesAfterSublayers() since ChildrenChanged can be set again when children
3137         are being processed.
3138         (WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
3139         (WebCore::GraphicsLayerCA::updateSublayerList): If we've hit max depth, just set
3140         empty sublayers.
3141
3142 2013-04-30  Darin Adler  <darin@apple.com>
3143
3144         Formatting tweaks
3145         https://bugs.webkit.org/show_bug.cgi?id=115427
3146
3147         Reviewed by Andreas Kling.
3148
3149         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3150         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Fixed indenting to match
3151         normal WebKit style.
3152
3153         * platform/mac/ScrollAnimatorMac.mm:
3154         (WebCore::ScrollAnimatorMac::pinnedInDirection): Removed an excess "+" that is harmless
3155         but strange.
3156
3157         * platform/mac/SharedBufferMac.mm: Tweaked blank lines for better paragraphing.
3158
3159 2013-04-30  Ryosuke Niwa  <rniwa@webkit.org>
3160
3161         Simplify ContainerNode::removeChildren
3162         https://bugs.webkit.org/show_bug.cgi?id=115398
3163
3164         Reviewed by Andreas Kling.
3165
3166         Back port https://chromium.googlesource.com/chromium/blink/+/b981f01cd065236b5ff7e3a8446d15b384c1b557
3167         by Andrei Bucur, which includes both this and his r148754.
3168
3169         * dom/ContainerNode.cpp:
3170         (WebCore::ContainerNode::removeChildren):
3171
3172 2013-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3173
3174         [SOUP] Move default buffer handling from ResourceHandleClient to ResourceHandlesoup
3175         https://bugs.webkit.org/show_bug.cgi?id=115364
3176
3177         Reviewed by Martin Robinson.
3178
3179         ResourceHandleClient that is cross-platform file is not the right
3180         place for the default ResourceHandle read buffer. We can make
3181         getBuffer return 0 by default and handle it in ResourceHandleSoup,
3182         creating a default buffer when the client doesn't provide one.
3183
3184         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3185         (StreamingClient::getOrCreateReadBuffer): Adapt to API change.
3186         * platform/network/ResourceHandle.h:
3187         (ResourceHandle): Add ensureReadBuffer().
3188         * platform/network/ResourceHandleClient.cpp:
3189         (WebCore::ResourceHandleClient::~ResourceHandleClient): Remove
3190         soup specific code.
3191         * platform/network/ResourceHandleClient.h:
3192         (WebCore::ResourceHandleClient::getOrCreateReadBuffer): Rename
3193         getBuffer() as getOrCreateReadBuffer() and use a reference for the
3194         out parameter instead of a pointer.
3195         (ResourceHandleClient): Remove soup specific code.
3196         * platform/network/ResourceHandleInternal.h:
3197         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Rename
3198         m_buffer and m_bufferSize as m_readBufferPtr and m_readBufferSize
3199         and add m_readBuffer to be used as default read buffer.
3200         * platform/network/soup/ResourceHandleSoup.cpp:
3201         (WebCore::ResourceHandle::ensureReadBuffer): Helper function to
3202         make usre we have a read buffer before a read operation. It first
3203         checks if the client provides a buffer and if it doesn't it
3204         creates or reuses the default buffer.
3205         (WebCore::redirectSkipCallback): Call ensureReadBuffer() and adapt
3206         to variable name changes.
3207         (WebCore::cleanupSoupRequestOperation): Adapt to variable name
3208         changes.
3209         (WebCore::nextMultipartResponsePartCallback): Call
3210         ensureReadBuffer() and adapt to variable name changes.
3211         (WebCore::sendRequestCallback): Ditto.
3212         (WebCore::readCallback): Ditto.
3213
3214 2013-04-30  Andreas Kling  <akling@apple.com>
3215
3216         REGRESSION(r149287): Assertion failure in fast/frames/flattening/iframe-flattening-crash.html
3217         <http://webkit.org/b/115386>
3218         <rdar://problem/13769995>
3219
3220         Reviewed by Darin Adler.
3221
3222         Put the resize event on the Document's event queue if it happens while layout is in progress.
3223         This avoids re-entering layout while laying out flattened subframes.
3224
3225         Also move the little logic for the resize event from EventHandler to FrameView (the only client.)
3226
3227         * page/EventHandler.cpp:
3228         * page/EventHandler.h:
3229         * page/FrameView.cpp:
3230         (WebCore::FrameView::dispatchResizeEvent):
3231
3232 2013-04-30  Anders Carlsson  <andersca@apple.com>
3233
3234         Fix build.
3235
3236         * WebCore.exp.in:
3237         * storage/StorageTracker.h:
3238         (StorageTracker):
3239
3240 2013-04-30  Anders Carlsson  <andersca@apple.com>
3241
3242         More StorageTracker cleanup
3243         https://bugs.webkit.org/show_bug.cgi?id=115429
3244
3245         Reviewed by Andreas Kling.
3246
3247         Make a bunch of member functions private, and remove StorageTracker::syncLocalStorage.
3248
3249         * WebCore.exp.in:
3250         * storage/StorageTracker.cpp:
3251         * storage/StorageTracker.h:
3252         (StorageTracker):
3253
3254 2013-04-30  Andreas Kling  <akling@apple.com>
3255
3256         REGRESSION(r149313) Crash at WebCore::FrameView::setFrameRect() when navigating back to previous page while find banner is displayed.
3257         <http://webkit.org/b/115421>
3258         <rdar://problem/13765739>
3259
3260         Reviewed by Antti Koivisto.
3261
3262         Add missing null-checks for Document and StyleResolver when re-evaluating media queries due to viewport changes.
3263
3264         No layout test, since we can't show the find banner from WebCore, and I can't think of another way to
3265         trigger a back navigation to a Document-less Frame that would also change the FrameView's size.
3266
3267         * page/FrameView.cpp:
3268         (WebCore::FrameView::setFrameRect):
3269
3270 2013-04-30  Glenn Adams  <glenn@skynav.com>
3271
3272         The bison grammar for @supports should return 0 in case of an error
3273         https://bugs.webkit.org/show_bug.cgi?id=115402
3274
3275         Reviewed by Darin Adler.
3276
3277         Back ported from https://chromium.googlesource.com/chromium/blink/+/74399c27c8b93286bae03a1d6371735935b34d85.
3278
3279         Test: css3/supports-crash.html
3280
3281         * css/CSSGrammar.y.in:
3282
3283 2013-04-30  Darin Adler  <darin@apple.com>
3284
3285         [CG] Over-release in MIME type registry code
3286         https://bugs.webkit.org/show_bug.cgi?id=115423
3287
3288         Reviewed by Eric Carlson.
3289
3290         Sam Weinig spotted these by code inspection. I don't know how to make a test demonstrating
3291         the problem, but this is clearly an over-release.
3292
3293         * platform/MIMETypeRegistry.cpp:
3294         (WebCore::initializeSupportedImageMIMETypes): Removed incorrect adoptCF call on a string we
3295         are getting from a CFArray.
3296         (WebCore::initializeSupportedImageMIMETypesForEncoding): Ditto.
3297
3298 2013-04-30  Mike Lattanzio  <mlattanzio@blackberry.com>
3299
3300         [BlackBerry] ImageBuffer::copyImage leaking memory
3301         https://bugs.webkit.org/show_bug.cgi?id=115359
3302
3303         Reviewed by George Staikos.
3304
3305         Use a WebCore::Vector to ensure the temporary data is destroyed.
3306         The TiledImage does not take ownership of the data.
3307
3308         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
3309         (WebCore::ImageBuffer::copyImage):
3310
3311 2013-04-30  Noam Rosenthal  <noam@webkit.org>
3312
3313         [Texmap] Avoid using overlap/non-overlap region in cases where the overhead is bigger than the gain
3314         https://bugs.webkit.org/show_bug.cgi?id=115226
3315
3316         Reviewed by Allan Sandfeld Jensen.
3317
3318         When there are several fragmeneted overlap regions, or when the overlap region is bigger than the
3319         non-overlap region, it's more efficient to have a single intermediate surface rather than split
3320         the rendering to overlap/non-overlap.
3321
3322         Covered by tests in compositing/overlap-blending.
3323
3324         * platform/graphics/texmap/TextureMapperLayer.cpp:
3325         (WebCore::TextureMapperLayer::shouldBlend):
3326             Readability fix.
3327
3328         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
3329             Consolidate to one overlap rect when one of the following occurs:
3330             - The overlap region's area is larger than the non-overlap region area.
3331             - There are many fragmented overlap regions and no non-overlap regions.
3332
3333 2013-04-30  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3334
3335         Stop using "in" keyword in IDL files
3336         https://bugs.webkit.org/show_bug.cgi?id=115418
3337
3338         Reviewed by Kentaro Hara.
3339
3340         Stop using "in" keyword in IDL files as this is no longer part of the
3341         Web IDL specification and it brings no additional information.
3342
3343         For now, the IDL parser will still accept the "in" keyword for operation
3344         argument to not break anything. However, we should remove support for it
3345         later on.
3346
3347         No new tests, no behavior change.
3348
3349         * Modules/battery/BatteryManager.idl:
3350         * Modules/encryptedmedia/MediaKeySession.idl:
3351         * Modules/encryptedmedia/MediaKeys.idl:
3352         * Modules/filesystem/DOMWindowFileSystem.idl:
3353         * Modules/filesystem/DirectoryEntry.idl:
3354         * Modules/filesystem/DirectoryEntrySync.idl:
3355         * Modules/filesystem/DirectoryReader.idl:
3356         * Modules/filesystem/EntriesCallback.idl:
3357         * Modules/filesystem/Entry.idl:
3358         * Modules/filesystem/EntryArray.idl:
3359         * Modules/filesystem/EntryArraySync.idl:
3360         * Modules/filesystem/EntryCallback.idl:
3361         * Modules/filesystem/EntrySync.idl:
3362         * Modules/filesystem/ErrorCallback.idl:
3363         * Modules/filesystem/FileCallback.idl:
3364         * Modules/filesystem/FileEntry.idl:
3365         * Modules/filesystem/FileSystemCallback.idl:
3366         * Modules/filesystem/FileWriter.idl:
3367         * Modules/filesystem/FileWriterCallback.idl:
3368         * Modules/filesystem/FileWriterSync.idl:
3369         * Modules/filesystem/MetadataCallback.idl:
3370         * Modules/filesystem/WorkerContextFileSystem.idl:
3371         * Modules/gamepad/GamepadList.idl:
3372         * Modules/geolocation/Geolocation.idl:
3373         * Modules/geolocation/PositionCallback.idl:
3374         * Modules/geolocation/PositionErrorCallback.idl:
3375         * Modules/indexeddb/IDBCursor.idl:
3376         * Modules/indexeddb/IDBDatabase.idl:
3377         * Modules/indexeddb/IDBFactory.idl:
3378         * Modules/indexeddb/IDBIndex.idl:
3379         * Modules/indexeddb/IDBKeyRange.idl:
3380         * Modules/indexeddb/IDBObjectStore.idl:
3381         * Modules/indexeddb/IDBRequest.idl:
3382         * Modules/indexeddb/IDBTransaction.idl:
3383         * Modules/mediasource/MediaSource.idl:
3384         * Modules/mediasource/SourceBuffer.idl:
3385         * Modules/mediasource/SourceBufferList.idl:
3386         * Modules/mediastream/MediaStream.idl:
3387         * Modules/mediastream/MediaStreamTrack.idl:
3388         * Modules/mediastream/NavigatorMediaStream.idl:
3389         * Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
3390         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
3391         * Modules/mediastream/RTCDTMFSender.idl:
3392         * Modules/mediastream/RTCDataChannel.idl:
3393         * Modules/mediastream/RTCErrorCallback.idl:
3394         * Modules/mediastream/RTCIceCandidate.idl:
3395         * Modules/mediastream/RTCPeerConnection.idl:
3396         * Modules/mediastream/RTCSessionDescription.idl:
3397         * Modules/mediastream/RTCSessionDescriptionCallback.idl:
3398         * Modules/mediastream/RTCStatsCallback.idl:
3399         * Modules/mediastream/RTCStatsReport.idl:
3400         * Modules/mediastream/RTCStatsResponse.idl:
3401         * Modules/navigatorcontentutils/NavigatorContentUtils.idl:
3402         * Modules/networkinfo/NetworkInfoConnection.idl:
3403         * Modules/notifications/Notification.idl:
3404         * Modules/notifications/NotificationCenter.idl:
3405         * Modules/notifications/NotificationPermissionCallback.idl:
3406         * Modules/quota/StorageErrorCallback.idl:
3407         * Modules/quota/StorageInfo.idl:
3408         * Modules/quota/StorageQuota.idl:
3409         * Modules/quota/StorageQuotaCallback.idl:
3410         * Modules/quota/StorageUsageCallback.idl:
3411         * Modules/speech/SpeechGrammarList.idl:
3412         * Modules/speech/SpeechRecognition.idl:
3413         * Modules/speech/SpeechRecognitionResult.idl:
3414         * Modules/speech/SpeechRecognitionResultList.idl:
3415         * Modules/speech/SpeechSynthesisUtterance.idl:
3416         * Modules/vibration/NavigatorVibration.idl:
3417         * Modules/webaudio/AnalyserNode.idl:
3418         * Modules/webaudio/AudioBuffer.idl:
3419         * Modules/webaudio/AudioBufferCallback.idl:
3420         * Modules/webaudio/AudioBufferSourceNode.idl:
3421         * Modules/webaudio/AudioContext.idl:
3422         * Modules/webaudio/AudioListener.idl:
3423         * Modules/webaudio/AudioNode.idl:
3424         * Modules/webaudio/AudioParam.idl:
3425         * Modules/webaudio/BiquadFilterNode.idl:
3426         * Modules/webaudio/OfflineAudioContext.idl:
3427         * Modules/webaudio/OscillatorNode.idl:
3428         * Modules/webaudio/PannerNode.idl:
3429         * Modules/webdatabase/DOMWindowWebDatabase.idl:
3430         * Modules/webdatabase/Database.idl:
3431         * Modules/webdatabase/DatabaseCallback.idl:
3432         * Modules/webdatabase/DatabaseSync.idl:
3433         * Modules/webdatabase/SQLResultSetRowList.idl:
3434         * Modules/webdatabase/SQLStatementCallback.idl:
3435         * Modules/webdatabase/SQLStatementErrorCallback.idl:
3436         * Modules/webdatabase/SQLTransaction.idl:
3437         * Modules/webdatabase/SQLTransactionCallback.idl:
3438         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
3439         * Modules/webdatabase/SQLTransactionSync.idl:
3440         * Modules/webdatabase/SQLTransactionSyncCallback.idl:
3441         * Modules/webdatabase/WorkerContextWebDatabase.idl:
3442         * Modules/websockets/WebSocket.idl:
3443         * bindings/scripts/test/TestCallback.idl:
3444         * bindings/scripts/test/TestCustomNamedGetter.idl:
3445         * bindings/scripts/test/TestDomainSecurity.idl:
3446         * bindings/scripts/test/TestEventTarget.idl:
3447         * bindings/scripts/test/TestInterface.idl:
3448         * bindings/scripts/test/TestMediaQueryListListener.idl:
3449         * bindings/scripts/test/TestNamedConstructor.idl:
3450         * bindings/scripts/test/TestObj.idl:
3451         * bindings/scripts/test/TestOverloadedConstructors.idl:
3452         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
3453         * bindings/scripts/test/TestSupplemental.idl:
3454         * bindings/scripts/test/TestTypedArray.idl:
3455         * bindings/scripts/test/TestTypedefs.idl:
3456         * css/CSSHostRule.idl:
3457         * css/CSSMediaRule.idl:
3458         * css/CSSPrimitiveValue.idl:
3459         * css/CSSRuleList.idl:
3460         * css/CSSStyleDeclaration.idl:
3461         * css/CSSStyleSheet.idl:
3462         * css/CSSSupportsRule.idl:
3463         * css/CSSValueList.idl:
3464         * css/FontLoader.idl:
3465         * css/MediaList.idl:
3466         * css/MediaQueryList.idl:
3467         * css/MediaQueryListListener.idl:
3468         * css/StyleMedia.idl:
3469         * css/StyleSheetList.idl:
3470         * css/WebKitCSSKeyframesRule.idl:
3471         * css/WebKitCSSMatrix.idl:
3472         * dom/CharacterData.idl:
3473         * dom/ClientRectList.idl:
3474         * dom/Clipboard.idl:
3475         * dom/CompositionEvent.idl:
3476         * dom/CustomEvent.idl:
3477         * dom/DOMImplementation.idl:
3478         * dom/DOMNamedFlowCollection.idl:
3479         * dom/DOMStringList.idl:
3480         * dom/DataTransferItem.idl:
3481         * dom/DataTransferItemList.idl:
3482         * dom/DeviceMotionEvent.idl:
3483         * dom/DeviceOrientationEvent.idl:
3484         * dom/Document.idl:
3485         * dom/DocumentFragment.idl:
3486         * dom/Element.idl:
3487         * dom/Event.idl:
3488