[BlackBerry] WebOverlay: fix access to m_client
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-04-05  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2
3         [Qt] PluginsX11: exposedRect offset is applied twice when painting windowless
4         https://bugs.webkit.org/show_bug.cgi?id=114020
5
6         Reviewed by Simon Hausmann.
7
8         Both XGetImage and QPainter::drawImage would apply the offset.
9         Since the XImage will only contain the exposed rect, no need to specify
10         the source rect to drawImage.
11
12         * plugins/qt/PluginViewQt.cpp:
13         (WebCore::PluginView::paintUsingXPixmap):
14
15 2013-04-05  Seokju Kwon  <seokju.kwon@gmail.com>
16
17         Web Inspector: crash in InspectorDOMAgent::innerHighlightQuad after r147566
18         https://bugs.webkit.org/show_bug.cgi?id=113991
19
20         Reviewed by Joseph Pecoraro.
21
22         * inspector/InspectorDOMAgent.cpp:
23         (WebCore::InspectorDOMAgent::innerHighlightQuad):
24
25 2013-04-05  Carlos Garcia Campos  <cgarcia@igalia.com>
26
27         REGRESSION(r145279): Build fails while linking when MEDIA_STREAM is enabled
28         https://bugs.webkit.org/show_bug.cgi?id=113294
29
30         Reviewed by Xan Lopez.
31
32         In r145279 NamedGetter extended attribute is added to
33         RTCStatsResponse.idl which makes the code generator to add
34         prototypes for JSRTCStatsResponse::nameGetter and
35         JSRTCStatsResponse::canGetItemsForName to the generated
36         JSRTCStatsResponse header, but they are not implemented
37         anywhere. We need to provide a JSRTCStatsResponseCustom file with
38         the implementation of both functions.
39
40         * GNUmakefile.list.am: Add JSRTCStatsResponseCustom.cpp to
41         compilation.
42         * Target.pri: Ditto.
43         * UseJSC.cmake: Ditto.
44         * WebCore.vcproj/WebCore.vcproj: Ditto.
45         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
46         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
47         * bindings/js/JSRTCStatsResponseCustom.cpp: Added.
48         (WebCore):
49         (WebCore::JSRTCStatsResponse::canGetItemsForName):
50         (WebCore::JSRTCStatsResponse::nameGetter):
51
52 2013-04-05  Ryosuke Niwa  <rniwa@webkit.org>
53
54         Remove Chromium code from WebCore/loader
55         https://bugs.webkit.org/show_bug.cgi?id=114011
56
57         Reviewed by Benjamin Poulain.
58
59         Removed.
60
61         * loader/DocumentLoader.cpp:
62         (WebCore::DocumentLoader::responseReceived):
63         * loader/DocumentThreadableLoader.h:
64         * loader/FrameLoader.cpp:
65         (WebCore::FrameLoader::FrameLoader):
66         (WebCore::FrameLoader::defaultObjectContentType):
67         (WebCore):
68         * loader/FrameLoader.h:
69         (FrameLoader):
70         * loader/FrameLoaderClient.h:
71         (FrameLoaderClient):
72         * loader/PingLoader.cpp:
73         (WebCore::PingLoader::loadImage):
74         (WebCore::PingLoader::sendPing):
75         (WebCore::PingLoader::sendViolationReport):
76         * loader/ResourceLoadScheduler.cpp:
77         (WebCore):
78         (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
79         (WebCore::ResourceLoadScheduler::scheduleLoad):
80         * loader/ResourceLoader.h:
81         * loader/SubresourceLoader.h:
82         * loader/ThreadableLoaderClient.h:
83         (ThreadableLoaderClient):
84         * loader/ThreadableLoaderClientWrapper.h:
85         (ThreadableLoaderClientWrapper):
86         * loader/appcache/ApplicationCacheHost.h:
87         (WebCore):
88         (ApplicationCacheHost):
89         * loader/cache/CachedRawResource.h:
90         (CachedRawResource):
91         (WebCore::CachedRawResourceClient::redirectReceived):
92         * loader/cache/CachedResource.cpp:
93         (WebCore):
94         (WebCore::CachedResource::load):
95         * loader/cache/CachedResource.h:
96         (WebCore::CachedResource::didSendData):
97         * loader/cache/CachedResourceLoader.cpp:
98         (WebCore::CachedResourceLoader::requestResource):
99         (WebCore::CachedResourceLoader::preload):
100         * loader/chromium: Removed.
101         * loader/chromium/CachedRawResourceChromium.cpp: Removed.
102         * loader/chromium/DocumentThreadableLoaderChromium.cpp: Removed.
103         * loader/chromium/ResourceLoaderChromium.cpp: Removed.
104         * loader/chromium/SubresourceLoaderChromium.cpp: Removed.
105
106 2013-04-05  Ryosuke Niwa  <rniwa@webkit.org>
107
108         Remove Chromium code from WebCore/editing
109         https://bugs.webkit.org/show_bug.cgi?id=114008
110
111         Reviewed by Benjamin Poulain.
112
113         Removed.
114
115         * editing/EditingBehavior.h:
116         (WebCore::EditingBehavior::shouldAllowSpellingSuggestionsWithoutSelection):
117         * editing/FrameSelection.h:
118         (WebCore):
119         * editing/chromium: Removed.
120         * editing/chromium/EditorChromium.cpp: Removed.
121         * editing/chromium/FrameSelectionChromium.cpp: Removed.
122
123 2013-04-05  Benjamin Poulain  <benjamin@webkit.org>
124
125         Remove the chromium code from the filesystem module
126         https://bugs.webkit.org/show_bug.cgi?id=114002
127
128         Reviewed by Ryosuke Niwa.
129
130         * Modules/filesystem/DOMFileSystemBase.cpp:
131         (WebCore::DOMFileSystemBase::createFileSystemURL):
132         * Modules/filesystem/FileSystemType.h:
133         * Modules/filesystem/LocalFileSystem.cpp:
134         * Modules/filesystem/LocalFileSystem.h:
135         (LocalFileSystem):
136
137 2013-04-05  Ryosuke Niwa  <rniwa@webkit.org>
138
139         Remove Chromium code from Source/WebCore/dom
140         https://bugs.webkit.org/show_bug.cgi?id=114007
141
142         Reviewed by Benjamin Poulain.
143
144         Removed.
145
146         * dom/Document.cpp:
147         (WebCore::Document::recalcStyle):
148         (WebCore::Document::implicitClose):
149         (WebCore::Document::setFocusedNode):
150         * dom/MessagePortChannel.h:
151         (MessagePortChannel):
152         * dom/ShadowRoot.cpp:
153         (WebCore::ShadowRoot::ShadowRoot):
154         * dom/default/chromium: Removed.
155         * dom/default/chromium/PlatformMessagePortChannelChromium.cpp: Removed.
156         * dom/default/chromium/PlatformMessagePortChannelChromium.h: Removed.
157
158 2013-04-05  Benjamin Poulain  <benjamin@webkit.org>
159
160         Remove the chromium directories from WebCore/Modules
161         https://bugs.webkit.org/show_bug.cgi?id=114000
162
163         Reviewed by Ryosuke Niwa.
164
165         First step in cleaning the code: remove the chromium-specific files.
166
167         * Modules/filesystem/chromium/DOMFileSystemChromium.cpp: Removed.
168         * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Removed.
169         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp: Removed.
170         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.h: Removed.
171         * Modules/indexeddb/chromium/IDBFactoryBackendInterfaceChromium.cpp: Removed.
172         * Modules/indexeddb/chromium/IDBFactoryBackendInterfaceChromium.h: Removed.
173         * Modules/speech/chromium/SpeechSynthesisChromium.cpp: Removed.
174         * Modules/webdatabase/chromium/DatabaseObserver.h: Removed.
175         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp: Removed.
176         * Modules/webdatabase/chromium/QuotaTracker.cpp: Removed.
177         * Modules/webdatabase/chromium/QuotaTracker.h: Removed.
178         * Modules/webdatabase/chromium/SQLTransactionClientChromium.cpp: Removed.
179
180 2013-04-04  Ryosuke Niwa  <rniwa@webkit.org>
181
182         Remove Chromium code from WebCore/accessibility
183         https://bugs.webkit.org/show_bug.cgi?id=114001
184
185         Reviewed by Benjamin Poulain.
186
187         Removed.
188
189         * accessibility/AccessibilityObject.cpp:
190         (WebCore::AccessibilityObject::AccessibilityObject):
191         (WebCore::AccessibilityObject::detach):
192         (WebCore::AccessibilityObject::isDetached):
193         * accessibility/AccessibilityObject.h:
194         (AccessibilityObject):
195         * accessibility/chromium: Removed.
196         * accessibility/chromium/AXObjectCacheChromium.cpp: Removed.
197         * accessibility/chromium/AccessibilityObjectChromium.cpp: Removed.
198
199 2013-04-05  Benjamin Poulain  <bpoulain@apple.com>
200
201         Remove WTFURL from WebKit
202         https://bugs.webkit.org/show_bug.cgi?id=113994
203
204         Reviewed by Ryosuke Niwa.
205
206         * GNUmakefile.list.am:
207         * WebCore.exp.in:
208         * WebCore.xcodeproj/project.pbxproj:
209         * platform/KURL.cpp:
210         (WebCore):
211         (WebCore::KURL::reportMemoryUsage):
212         (WebCore::KURL::isSafeToSendToAnotherThread):
213         * platform/KURL.h:
214         (KURL):
215         (WebCore):
216         * platform/KURLWTFURL.cpp: Removed.
217         * platform/KURLWTFURLImpl.h: Removed.
218         * platform/cf/KURLCFNet.cpp:
219         (WebCore::KURL::KURL):
220         (WebCore::KURL::createCFURL):
221         (WebCore):
222         * platform/mac/KURLMac.mm:
223         (WebCore::KURL::KURL):
224         (WebCore::KURL::createCFURL):
225
226 2013-04-04  peavo@outlook.com  <peavo@outlook.com>
227
228         WinCairo build fails to link.
229         https://bugs.webkit.org/show_bug.cgi?id=113873
230
231         Reviewed by Brent Fulgham.
232
233         Removed double guards for USE(ACCELERATED_COMPOSITING),
234         and moved methods out of USE(ACCELERATED_COMPOSITING) guard to fix linker errors. 
235
236         * page/FrameView.cpp:
237         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
238         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
239         (WebCore::FrameView::setWantsLayerForHeader):
240         (WebCore::FrameView::setWantsLayerForFooter):
241         (WebCore::FrameView::setHeaderHeight):
242         (WebCore::FrameView::setFooterHeight):
243
244 2013-04-04  Ryosuke Niwa  <rniwa@webkit.org>
245
246         Remove code for 10.5 and earlier from Source/WebCore
247         https://bugs.webkit.org/show_bug.cgi?id=113754
248
249         Reviewed by Benjamin Poulain.
250
251         Removed the code for 10.5 and removed if-def for 10.6.
252
253         * WebCore.xcodeproj/project.pbxproj:
254         * page/ContextMenuController.cpp:
255         (WebCore::ContextMenuController::populate):
256         * platform/LocalizedStrings.cpp:
257         (WebCore::imageTitle):
258         * platform/graphics/cg/GraphicsContextCG.cpp:
259         (WebCore::GraphicsContext::setAllowsFontSmoothing):
260         * platform/graphics/cg/ImageCG.cpp:
261         (WebCore::Image::drawPattern):
262         * platform/graphics/cg/ImageSourceCG.cpp:
263         (WebCore::ImageSource::clear):
264         * platform/graphics/cg/PathCG.cpp:
265         (WebCore::Path::boundingRect):
266         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
267         (WebCore):
268         (WebCore::FontPlatformData::ctFont):
269         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
270         (WebCore::MediaPlayerPrivateGStreamerBase::supportsFullscreen):
271         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
272         * platform/graphics/mac/FontCacheMac.mm:
273         (WebCore):
274         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
275         (WebCore::FontCache::platformInit):
276         * platform/graphics/mac/FontCustomPlatformData.cpp:
277         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
278         (WebCore::createFontCustomPlatformData):
279         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
280         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
281         (WebCore::MediaPlayerPrivateQTKit::supportsFullscreen):
282         (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
283         (WebCore::MediaPlayerPrivateQTKit::cacheMovieScale):
284         * platform/graphics/mac/SimpleFontDataMac.mm:
285         (WebCore::SimpleFontData::platformInit):
286         * platform/graphics/mac/WebLayer.h:
287         * platform/mac/CursorMac.mm:
288         (WebCore::Cursor::ensurePlatformCursor):
289         * platform/mac/DisplaySleepDisabler.cpp:
290         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
291         (WebCore):
292         * platform/mac/DisplaySleepDisabler.h:
293         (DisplaySleepDisabler):
294         * platform/mac/EmptyProtocolDefinitions.h:
295         * platform/mac/HTMLConverter.h:
296         * platform/mac/HTMLConverter.mm:
297         * platform/mac/PopupMenuMac.mm:
298         (WebCore::PopupMenuMac::populate):
299         * platform/mac/ScrollElasticityController.mm:
300         (systemUptime):
301         * platform/mac/SharedTimerMac.mm:
302         (PowerObserver):
303         (WebCore::PowerObserver::PowerObserver):
304         (WebCore::PowerObserver::~PowerObserver):
305         (WebCore::PowerObserver::didReceiveSystemPowerNotification):
306         * platform/mac/SuddenTermination.mm:
307         * platform/mac/WebCoreFullScreenWindow.mm:
308         (-[WebCoreFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
309         * platform/mac/WebFontCache.mm:
310         (+[WebFontCache getTraits:inFamily:]):
311         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
312         * platform/mac/WebVideoFullscreenController.mm:
313         (SOFT_LINK_POINTER):
314         (-[WebVideoFullscreenController updateMenuAndDockForFullscreen]):
315         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
316         (createControlWithMediaUIControlType):
317         (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
318         * platform/network/Credential.h:
319         * platform/network/cf/DNSCFNet.cpp:
320         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
321         * platform/network/cf/ProxyServerCFNet.cpp:
322         (WebCore):
323         (WebCore::proxyServersForURL):
324         * platform/network/cf/SocketStreamHandleCFNet.cpp:
325         (WebCore::SocketStreamHandle::chooseProxy):
326         * platform/network/mac/AuthenticationMac.mm:
327         (WebCore):
328         * platform/network/mac/WebCoreURLResponse.mm:
329         (WebCore::adjustMIMETypeIfNecessary):
330         * platform/text/TextChecking.h:
331         (WebCore):
332
333 2013-04-04  Ryosuke Niwa  <rniwa@webkit.org>
334
335         Qt build fix attempt after r147684.
336
337         * html/canvas/CanvasRenderingContext.cpp:
338
339 2013-04-04  Benjamin Poulain  <bpoulain@apple.com>
340
341         alternateFamilyName should return a null, not an empty value
342         https://bugs.webkit.org/show_bug.cgi?id=113987
343
344         Reviewed by Anders Carlsson.
345
346         The string object corresponding semantically to "no-value" is
347         a null string, not an empty string.
348
349         Fix alternateFamilyName() accordingly.
350
351         * platform/graphics/FontCache.cpp:
352         (WebCore::alternateFamilyName):
353         (WebCore::FontCache::getCachedFontPlatformData):
354
355 2013-04-04  Anders Carlsson  <andersca@apple.com>
356
357         Work around a bug in the bindings generation script.
358
359         * WebCore.xcodeproj/project.pbxproj:
360
361 2013-04-04  Dean Jackson  <dino@apple.com>
362
363         Don't dispatch delayed click if snapshotted plugin was triggered by a click on the label
364         https://bugs.webkit.org/show_bug.cgi?id=113982
365
366         Reviewed by Tim Horton.
367
368         We regressed the way clicks were sent on to restarted plugins when we moved to a
369         Shadow Root - we were always sending the click. We should only send the click
370         on if the user clicked on the main plugin content, and not send it when you
371         click directly on the label.
372
373         * html/HTMLPlugInImageElement.cpp:
374         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Keep a reference to the container and label.
375         (WebCore::HTMLPlugInImageElement::partOfSnapshotLabel): New method that detects if a Node was part
376             of the snapshot label.
377         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Only record the event if you should forward it on.
378         * html/HTMLPlugInImageElement.h:
379         (HTMLPlugInImageElement): New parameter to userDidClickSnapshot and member variables for shadow content.
380         * rendering/RenderSnapshottedPlugIn.cpp:
381         (WebCore::RenderSnapshottedPlugIn::handleEvent): Ask the plugin if the clicked target was the snapshot label.
382
383 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
384
385         Unreviewed EFL build fix.
386
387         Add missing include for FloatRect.h.
388
389         * platform/efl/PlatformScreenEfl.cpp:
390
391 2013-04-04  Tim Horton  <timothy_horton@apple.com>
392
393         Unreviewed build fix.
394
395         * platform/graphics/GlyphPageTreeNode.cpp:
396
397 2013-04-04  Anders Carlsson  <andersca@apple.com>
398
399         Another build fix.
400
401         * platform/graphics/FontCache.cpp:
402         * platform/graphics/SimpleFontData.cpp:
403
404 2013-04-04  Anders Carlsson  <andersca@apple.com>
405
406         Fix build.
407
408         * WebCore.xcodeproj/project.pbxproj:
409
410 2013-04-04  Geoffrey Garen  <ggaren@apple.com>
411
412         Removed empty files from the build
413         https://bugs.webkit.org/show_bug.cgi?id=113978
414
415         Reviewed by Anders Carlsson.
416
417         Anders made a list of all the empty files that are slowing down the Mac
418         build, and I grepped them away.
419
420         * WebCore.xcodeproj/project.pbxproj:
421
422 2013-04-04  Anders Carlsson  <andersca@apple.com>
423
424         Prune unneeded header #includes
425         https://bugs.webkit.org/show_bug.cgi?id=113973
426
427         Reviewed by Geoffrey Garen.
428
429         Reduce the amount of headers included by other headers by:
430         - Moving implicit and explicit constructors and destructors into .cpp files so member variable constructors/destructors
431           don't have to be declared.
432         - Move CachedResourceClient subclasses out into separate headers so that their respective CachedResource subclasses don't
433           have to be included by the classes that derive from those subclasses.
434         - Remove headers that were never needed in the first place.
435
436         * Modules/webaudio/AudioContext.h:
437         * WebCore.xcodeproj/project.pbxproj:
438         * bindings/js/JSDOMWindowCustom.cpp:
439         * css/CSSFontFaceSource.h:
440         * html/canvas/CanvasPattern.cpp:
441         (WebCore::CanvasPattern::create):
442         (WebCore::CanvasPattern::CanvasPattern):
443         (WebCore::CanvasPattern::~CanvasPattern):
444         * html/canvas/CanvasPattern.h:
445         (WebCore::CanvasPattern::pattern):
446         (WebCore::CanvasPattern::originClean):
447         * html/parser/HTMLScriptRunner.h:
448         * loader/ImageLoader.h:
449         * loader/LinkLoader.h:
450         * loader/TextTrackLoader.h:
451         * loader/cache/CachedFont.cpp:
452         * loader/cache/CachedFont.h:
453         * loader/cache/CachedFontClient.h: Added.
454         (WebCore::CachedFontClient::~CachedFontClient):
455         (WebCore::CachedFontClient::expectedType):
456         (WebCore::CachedFontClient::resourceClientType):
457         (WebCore::CachedFontClient::fontLoaded):
458         * loader/cache/CachedResourceHandle.cpp:
459         (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
460         (WebCore::CachedResourceHandleBase::~CachedResourceHandleBase):
461         (WebCore::CachedResourceHandleBase::setResource):
462         * loader/cache/CachedResourceHandle.h:
463         (WebCore::CachedResourceHandleBase::get):
464         (WebCore::CachedResourceHandleBase::operator!):
465         (WebCore::CachedResourceHandleBase::operator UnspecifiedBoolType):
466         (WebCore::CachedResourceHandleBase::operator=):
467         (WebCore::CachedResourceHandle::CachedResourceHandle):
468         (WebCore::CachedResourceHandle::get):
469         (WebCore::CachedResourceHandle::operator->):
470         (WebCore::CachedResourceHandle::operator=):
471         (WebCore::CachedResourceHandle::operator==):
472         (WebCore::CachedResourceHandle::operator!=):
473         (WebCore::operator==):
474         (WebCore::operator!=):
475         * loader/cache/CachedSVGDocument.h:
476         * loader/cache/CachedSVGDocumentReference.h:
477         * loader/cache/CachedSVGDocumentClient.h: Added.
478         (WebCore::CachedSVGDocumentClient::~CachedSVGDocumentClient):
479         (WebCore::CachedSVGDocumentClient::expectedType):
480         (WebCore::CachedSVGDocumentClient::resourceClientType):
481         * loader/cache/CachedStyleSheetClient.h:
482         * platform/PlatformScreen.h:
483         * platform/audio/HRTFElevation.cpp:
484         * platform/audio/HRTFKernel.cpp:
485         (WebCore::HRTFKernel::fftSize):
486         * platform/audio/HRTFKernel.h:
487         * platform/audio/ReverbConvolverStage.cpp:
488         (WebCore::ReverbConvolverStage::~ReverbConvolverStage):
489         * platform/audio/ReverbConvolverStage.h:
490         * platform/graphics/FontPlatformData.h:
491         * platform/graphics/GraphicsContext3D.h:
492         * platform/graphics/Path.cpp:
493         * platform/graphics/Path.h:
494         * platform/graphics/Pattern.cpp:
495         * platform/graphics/Pattern.h:
496         * platform/graphics/filters/FilterOperation.cpp:
497         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
498         (WebCore::ReferenceFilterOperation::~ReferenceFilterOperation):
499         (WebCore::ReferenceFilterOperation::setCachedSVGDocumentReference):
500         * platform/graphics/filters/FilterOperation.h:
501         * platform/graphics/transforms/AffineTransform.h:
502         * plugins/DOMMimeType.h:
503         * rendering/RenderLayerFilterInfo.h:
504         * rendering/style/StyleCachedShader.h:
505         * svg/SVGFEImageElement.h:
506         * svg/SVGFontFaceUriElement.h:
507         * svg/SVGUseElement.h:
508         * xml/parser/XMLDocumentParser.h:
509
510 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
511
512         [Cairo] Stop passing raw pointers to BitmapImage::create()
513         https://bugs.webkit.org/show_bug.cgi?id=113945
514
515         Reviewed by Martin Robinson.
516
517         BitmapImage::create() was updated in r147643 to take a PassRefPtr<cairo_surface_t>
518         in argument instead of a cairo_surface_t*. This patch updates several call sites
519         so that they now pass in a smart pointer instead of a raw one to avoid silent
520         converting from cairo_surface_t* to PassRefPtr<cairo_surface_t>.
521
522         No new tests, no behavior change.
523
524         * platform/graphics/cairo/ImageBufferCairo.cpp:
525         (WebCore::ImageBufferData::ImageBufferData): Use RefPtr to m_surface to avoid manual
526         memory handling.
527         (WebCore::ImageBuffer::ImageBuffer):
528         (WebCore::ImageBuffer::~ImageBuffer):
529         (WebCore::ImageBuffer::copyImage):
530         (WebCore::ImageBuffer::clip):
531         (WebCore::ImageBuffer::platformTransformColorSpace):
532         (WebCore::getImageData):
533         (WebCore::ImageBuffer::putByteArray):
534         * platform/graphics/cairo/ImageBufferDataCairo.h:
535         (ImageBufferData):
536         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
537         (ImageGStreamer::ImageGStreamer):
538         * platform/graphics/gtk/ImageBufferGtk.cpp:
539         (WebCore::ImageBuffer::toDataURL):
540
541 2013-04-04  Simon Fraser  <simon.fraser@apple.com>
542
543         Page content missing when flipping from an empty layer to a tiled layer
544         https://bugs.webkit.org/show_bug.cgi?id=113977
545         <rdar://problem/13444219>
546
547         Reviewed by Tim Horton.
548         
549         Some articles on USA Today were missing content on load, when a large GraphicsLayer
550         which did not draw content needed to draw content (and become tiled in the process).
551         
552         The bug was an ordering dependency in GraphicsLayerCA::commitLayerChangesBeforeSublayers().
553         swapFromOrToTiledLayer() sets some dirty flags, but for some properties which have
554         already been committed in the current flush cycle.
555         
556         Fix by moving the swapFromOrToTiledLayer() to the top of the commit, which is
557         safe since it only consults GraphicsLayer properties, not CALayer properties.
558
559         Test: compositing/tiling/empty-to-tiled.html
560
561         * platform/graphics/ca/GraphicsLayerCA.cpp:
562         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
563         (WebCore::GraphicsLayerCA::updateGeometry):
564         (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
565         (WebCore::GraphicsLayerCA::updateContentsScale):
566         * platform/graphics/ca/GraphicsLayerCA.h:
567         (GraphicsLayerCA):
568
569 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
570
571         Regression(r147639) Causes assertion hit in HashTable
572         https://bugs.webkit.org/show_bug.cgi?id=113954
573
574         Reviewed by Benjamin Poulain.
575
576         Lookup the key in the hash table again after the recursive call to
577         getCachedFontPlatformData() as it may have altered the hash map and
578         invalidated the previous iterator we had.
579
580         No new tests, covered by existing tests.
581
582         * platform/graphics/FontCache.cpp:
583         (WebCore::FontCache::getCachedFontPlatformData):
584
585 2013-04-04  Eric Carlson  <eric.carlson@apple.com>
586
587         [Mac] add "automatic" text track menu item
588         https://bugs.webkit.org/show_bug.cgi?id=113822
589
590         Reviewed by Jer Noble.
591
592         No new tests, existing tests updated.
593
594         * English.lproj/Localizable.strings: Add new track menu item.
595
596         * html/HTMLMediaElement.cpp: 
597         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_captionDisplayMode.
598         (WebCore::HTMLMediaElement::finishParsingChildren): LoadTextTrackResource -> ConfigureTextTracks.
599         (WebCore::HTMLMediaElement::scheduleDelayedAction): Ditto.
600         (WebCore::HTMLMediaElement::loadTimerFired): Ditto.
601         (WebCore::HTMLMediaElement::loadInternal): Ditto. Flag the caption menu as invalid so it will
602             be rebuilt again.
603         (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): LoadTextTrackResource -> ConfigureTextTracks.
604         (WebCore::HTMLMediaElement::didAddTrack): Ditto.
605         (WebCore::HTMLMediaElement::configureTextTrackGroup): Deal with new track display modes.
606         (WebCore::HTMLMediaElement::HTMLMediaElement::hasClosedCaptions): Minor cleanup.
607         (WebCore::HTMLMediaElement::configureTextTrackGroup): Add some logging.
608         (WebCore::HTMLMediaElement::configureTextTracks): Call updateActiveTextTrackCues so cue display
609             is updated.
610         (WebCore::HTMLMediaElement::captionPreferencesChanged): Deal with new track display modes.
611         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Add some logging.
612         * html/HTMLMediaElement.h: Ditto.
613
614         * html/shadow/MediaControlElementTypes.cpp: Remove trackIndexAttributeName and trackListIndexForElement.
615         * html/shadow/MediaControlElementTypes.h: Ditto.
616
617         * html/shadow/MediaControlElements.cpp:
618         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Don't use track index,
619             everything we need is in the track<->element map now.
620         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Ditto. Always rebuild the 
621             track list because clear the map each time the menu goes away because it refs every track.
622         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Don't set the track
623             index attribute on the menu items, just use the map.
624         * html/shadow/MediaControlElements.h:
625
626         * html/shadow/MediaControlsApple.cpp:
627         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility): resetTrackListMenu is gone.
628         (WebCore::MediaControlsApple::reset): Ditto.
629         (WebCore::MediaControlsApple::closedCaptionTracksChanged): Ditto.
630
631         * html/track/TextTrack.cpp:
632         (WebCore::TextTrack::captionMenuOffItem): New, static TextTrack used for the menu "Off" item.
633         (WebCore::TextTrack::captionMenuAutomaticItem): New, static TextTrack used for the menu "Automatic" item.
634         * html/track/TextTrack.h:
635
636         * page/CaptionUserPreferences.cpp:
637         (WebCore::CaptionUserPreferences::shouldShowCaptions): Removed, we use captionDisplayMode instead.
638         (WebCore::CaptionUserPreferences::captionDisplayMode): New.
639         (WebCore::CaptionUserPreferences::setCaptionDisplayMode): New.
640         (WebCore::CaptionUserPreferences::setPreferredLanguage): Make the parameter a const reference.
641         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Return 0 if the user doesn't want
642             captions or subtitles.
643         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Take language as a parameter
644             instead of assuming that it is always the entire language list.
645         * page/CaptionUserPreferences.h:
646
647         * page/CaptionUserPreferencesMac.h:
648         * page/CaptionUserPreferencesMac.mm:
649         (WebCore::CaptionUserPreferencesMac::shouldShowCaptions): Removed, we use captionDisplayMode instead.
650         (WebCore::CaptionUserPreferencesMac::captionDisplayMode): New.
651         (WebCore::CaptionUserPreferencesMac::setCaptionDisplayMode): New.
652         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Make the parameter a const reference.
653         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Deal with "Automatic" mode.
654             captions or subtitles.
655         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Take language as a parameter
656             instead of assuming that it is always the entire language list.
657         (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Insert "Off" and "Automatic" items.
658
659         * platform/LocalizedStrings.cpp:
660         (WebCore::textTrackAutomaticMenuItemText): New.
661         * platform/LocalizedStrings.h:
662
663         * platform/graphics/MediaPlayer.cpp:
664         (WebCore::MediaPlayer::languageOfPrimaryAudioTrack): New.
665         * platform/graphics/MediaPlayer.h:
666         * platform/graphics/MediaPlayerPrivate.h:
667
668         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
669         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
670         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Return the language
671             of the main audio track.
672
673 2013-04-04  Alexey Proskuryakov  <ap@apple.com>
674
675         REGRESSION (r146580): Assertion using SecurityOrigin::create, URL string is not valid
676         https://bugs.webkit.org/show_bug.cgi?id=113961
677
678         Reviewed by Geoff Garen.
679
680         * page/SecurityOrigin.cpp:
681         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
682         (WebCore::SecurityOrigin::create):
683         Don't use ParsedURLString, because http://host:80/ is normalized to http://host/,
684         so it's not a parsed URL string.
685
686 2013-04-04  Sheriff Bot  <webkit.review.bot@gmail.com>
687
688         Unreviewed, rolling out r147662.
689         http://trac.webkit.org/changeset/147662
690         https://bugs.webkit.org/show_bug.cgi?id=113955
691
692         The change r147662  breaks fast/regions/fixed-pos-elem-in-
693         region.html (Requested by benjaminp on #webkit).
694
695         * rendering/RenderBlockLineLayout.cpp:
696         (WebCore::inlineLogicalWidth):
697
698 2013-04-04  Tim Horton  <timothy_horton@apple.com>
699
700         REGRESSION (r147373): Auto-sizing doesn't always respect minimum width changes
701         https://bugs.webkit.org/show_bug.cgi?id=113947
702         <rdar://problem/13579024>
703
704         Reviewed by Anders Carlsson.
705
706         Reset the FrameView size to the minimum auto-sizing size
707         before performing auto-sizing. We were already resetting the height,
708         but not the width, instead using the FrameView's current width.
709
710         This means that changing the minimum width without also manually
711         resizing the FrameView will never see the width change.
712
713         Auto-sizing tests are not working on Mac yet.
714
715         * page/FrameView.cpp:
716         (WebCore::FrameView::autoSizeIfEnabled):
717
718 2013-04-04  Martin Robinson  <mrobinson@igalia.com>
719
720         [GTK] Remove the gyp build
721         https://bugs.webkit.org/show_bug.cgi?id=113942
722
723         Reviewed by Gustavo Noronha Silva.
724
725         * WebCore.gyp/WebCoreGTK.gyp: Removed.
726
727 2013-04-04  Robert Hogan  <robert@webkit.org>
728
729         REGRESSION(r142152): Text wraps in menu
730         https://bugs.webkit.org/show_bug.cgi?id=113706
731
732         Reviewed by David Hyatt.
733
734         * rendering/RenderBlockLineLayout.cpp:
735         (WebCore::inlineLogicalWidth): Empty inline elements add their inline border/padding/margin to the width of the
736         line when we iterate through them in nextLineBreak(), so no need to add them again here when climbing back up
737         from their first child looking for border/padding/margin to add. (An empty inline element can have floating children.)
738
739 2013-04-04  Ryosuke Niwa  <rniwa@webkit.org>
740
741         Changing typing style with font size delta overrides the previous font size delta
742         https://bugs.webkit.org/show_bug.cgi?id=113923
743
744         Reviewed by Andreas Kling.
745
746         The bug was caused by a new font size delta value overriding the old one as
747         opposed to being added to the old value. Fixed that in overrideWithStyle.
748
749         Also made overrideWithStyle share code with mergeStyle since there is already
750         code to merge text-decorations there.
751
752         Unfortunately, adding a test for this fix proved to be hard because we don't
753         expose any API to directly set typing style.
754
755         * editing/EditingStyle.cpp:
756         (WebCore::EditingStyle::overrideWithStyle): Use mergeStyle.
757         (WebCore::EditingStyle::mergeStyle): Add font size deltas as opposed to simply
758         using the new value.
759
760 2013-04-04  Chris Fleizach  <cfleizach@apple.com>
761
762         AX:File upload button has wrong label
763         https://bugs.webkit.org/show_bug.cgi?id=113924
764
765         Reviewed by David Kilzer.
766
767         Allow the label and value to be returned for file upload controls on iOS.
768         Due to the different AX APIs, we can expose a bit more information on iOS.
769
770         Test: platform/iphone-simulator/accessibility/file-upload-button.html
771
772         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
773         (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
774         (-[WebAccessibilityObjectWrapper fileUploadButtonReturnsValueInTitle]):
775         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
776         (-[WebAccessibilityObjectWrapperBase fileUploadButtonReturnsValueInTitle]):
777         (-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
778
779 2013-04-03  Dean Jackson  <dino@apple.com>
780
781         Expose settings to disable plugin snapshotting autostart and primary detection
782         https://bugs.webkit.org/show_bug.cgi?id=113918
783
784         Reviewed by Tim Horton.
785
786         Three new settings:
787         - snapshotAllPlugIns: Do not apply any heuristics - immediately snapshot a plugin.
788         - primaryPlugInSnapshotDetectionEnabled: Toggle snapshotting the "main" plugin in the page.
789         - autostartOriginPlugInSnapshottingEnabled: Toggle snapshotting based on URL origins.
790
791         * html/HTMLPlugInImageElement.cpp:
792         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Don't tell the host that we've started
793             if the autostartOriginPlugInSnapshottingEnabled is false.
794         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Don't restart a primary
795             plugin if primaryPlugInSnapshotDetectionEnabled is false.
796         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Snapshot immediately if
797             snapshotAllPlugIns is true. Also, don't test for autostart if
798             autostartOriginPlugInSnapshottingEnabled is false.
799         * page/Settings.in: Three new settings values.
800
801 2013-04-04  Carlos Garcia Campos  <cgarcia@igalia.com>
802
803         [BlackBerry] Remove skia code from PluginViewBlackBerry
804         https://bugs.webkit.org/show_bug.cgi?id=113936
805
806         Reviewed by Rob Buis.
807
808         Skia is not used anymore by the BlackBerry port.
809
810         * plugins/blackberry/PluginViewBlackBerry.cpp:
811         (WebCore::PluginView::paint):
812
813 2013-04-04  Emil A Eklund  <eae@chromium.org>
814
815         Change RenderFrameSet::computeEdgeInfo to use m-rows/m_cols directly
816         https://bugs.webkit.org/show_bug.cgi?id=113825
817
818         Reviewed by Eric Seidel.
819
820         Tests: fast/frames/invalid-frameset-compute-edge.html
821
822         * rendering/RenderFrameSet.cpp:
823         (WebCore::RenderFrameSet::computeEdgeInfo):
824
825 2013-04-04  ChangSeok Oh  <changseok.oh@collabora.com>
826
827         [GTK][AC] Invalid clear ClutterContent of ClutterActor
828         https://bugs.webkit.org/show_bug.cgi?id=113758
829
830         Reviewed by Gustavo Noronha Silva.
831
832         Using clutter_actor_set_content(actor, 0) is better to clear ClutterContent of ClutterActor.
833         Actually the ClutterContent referece is cleared in the API if we set 0.
834
835         No new tests since no functionality changed.
836
837         * platform/graphics/clutter/GraphicsLayerActor.cpp:
838         (graphicsLayerActorUpdateTexture):
839
840 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
841
842         [Cairo] Fix canvas drawing of SVG-based patterns and remove NativeImageCairo
843         https://bugs.webkit.org/show_bug.cgi?id=113929
844
845         Reviewed by Martin Robinson.
846
847         Make (Pass)NativeImagePtr typedefs to (Pass)RefPtr<cairo_surface_t> instead
848         of NativeImageCairo*. Now that we switch to using smart pointers,
849         NativeImageCairo is removed as it made no sense to make it ref counted when
850         it merely held a single ref counted member.
851
852         Now that Cairo is using smart pointers for (Pass)NativeImagePtr, this patch
853         also enables the implementation of SVGImage::nativeImageForCurrentFrame()
854         for USE(CAIRO) as well. This effectively fixes canvas drawing of SVG-based
855         patterns for Cairo-based ports.
856
857         No new tests, covered by svg/canvas/canvas-pattern-svg.html.
858
859         * GNUmakefile.list.am: Remove NativeImageCairo.* for GTK.
860
861         * PlatformEfl.cmake: Remove NativeImageCairo.* for EFL.
862
863         * WebCore.vcproj/WebCore.vcproj:
864         * WebCore.vcxproj/WebCore.vcxproj:
865         * WebCore.vcxproj/WebCore.vcxproj.filters:
866         Remove NativeImageCairo.* for Win.
867
868         * platform/graphics/BitmapImage.cpp:
869         (WebCore::FrameData::reportMemoryUsage):
870         Update MemoryClassInfo::addRawBuffer() call now that m_frame is a RefPtr
871         for USE(CAIRO).
872
873         * platform/graphics/BitmapImage.h:
874         (BitmapImage):
875         Remove factory method taking a cairo_surface_t* in argument. This is useless
876         now that PassNativeImagePtr is a typedef to PassRefPtr<cairo_surface_t> and
877         there is already a factory method taking a PassNativeImagePtr in argument.
878
879         * platform/graphics/NativeImagePtr.h:
880         (WebCore):
881         Make PassNativeImagePtr a typedef to PassRefPtr<cairo_surface_t> and
882         NativeImagePtr a typedef to RefPtr<cairo_surface_t>, instead of
883         NativeImageCairo*. Moving to smart pointers is needed to enable implementation
884         of SVGImage::nativeImageForCurrentFrame() for Cairo.
885
886         * platform/graphics/cairo/BitmapImageCairo.cpp:
887         (WebCore::BitmapImage::BitmapImage):
888         (WebCore::BitmapImage::draw):
889         (WebCore::BitmapImage::checkForSolidColor):
890         (WebCore::FrameData::clear):
891         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
892         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
893         * platform/graphics/cairo/ImageCairo.cpp:
894         (WebCore::Image::drawPattern):
895         Update Cairo graphics code to reflect the (Pass)NativeImagePtr type changes.
896
897         * platform/graphics/cairo/NativeImageCairo.cpp: Removed.
898         * platform/graphics/cairo/NativeImageCairo.h: Removed.
899
900         * platform/graphics/cairo/PatternCairo.cpp:
901         (WebCore::Pattern::createPlatformPattern):
902         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
903         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
904         * platform/graphics/efl/ImageEfl.cpp:
905         (WebCore::BitmapImage::getEvasObject):
906         * platform/graphics/gtk/ImageGtk.cpp:
907         (WebCore::BitmapImage::getGdkPixbuf):
908         * platform/graphics/texmap/TextureMapperGL.cpp:
909         (WebCore::BitmapTextureGL::updateContents):
910         * platform/graphics/win/ImageCairoWin.cpp:
911         (WebCore::BitmapImage::create):
912         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
913         * platform/gtk/DragImageGtk.cpp:
914         (WebCore::createDragImageFromImage):
915         * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
916         (WebCore::ImageFrame::asNewNativeImage):
917         * platform/win/DragImageCairoWin.cpp:
918         (WebCore::createDragImageFromImage):
919         Update code to reflect the (Pass)NativeImagePtr type changes.
920
921         * svg/graphics/SVGImage.cpp:
922         (WebCore):
923         * svg/graphics/SVGImage.h:
924         Enable SVGImage::nativeImageForCurrentFrame() for USE(CAIRO).
925
926 2013-04-04  Ed Bartosh  <bartosh@gmail.com>
927
928         [EFL] --minimal build fails with 'error: unused variable'
929         https://bugs.webkit.org/show_bug.cgi?id=113903
930
931         Reviewed by Gustavo Noronha Silva.
932
933         Moved variable definition under #if where it's used
934         * platform/network/soup/ResourceHandleSoup.cpp:
935         (WebCore::restartedCallback):
936
937 2013-04-04  Andreas Kling  <akling@apple.com>
938
939         Global FontPlatformData cache should use OwnPtr.
940         <http://webkit.org/b/111939>
941
942         Reviewed by Anders Carlsson.
943
944         Let the global FontPlatformData use OwnPtr instead of raw pointers + deleteAllValues().
945
946         * platform/graphics/FontCache.cpp:
947         (WebCore::FontCache::getCachedFontPlatformData):
948         (WebCore::FontCache::purgeInactiveFontData):
949         (WebCore::FontCache::invalidate):
950
951             Tweaked code for OwnPtr. Also made getCachedFontPlatformData() do one hash lookup
952             instead of two.
953
954         * platform/graphics/FontCache.h:
955         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
956         (WebCore::FontCache::createFontPlatformData):
957         * platform/graphics/chromium/FontCacheAndroid.cpp:
958         (WebCore::FontCache::createFontPlatformData):
959         * platform/graphics/freetype/FontCacheFreeType.cpp:
960         (WebCore::FontCache::createFontPlatformData):
961         * platform/graphics/mac/FontCacheMac.mm:
962         (WebCore::FontCache::createFontPlatformData):
963         * platform/graphics/qt/FontCacheQt.cpp:
964         (WebCore::FontCache::createFontPlatformData):
965         * platform/graphics/skia/FontCacheSkia.cpp:
966         (WebCore::FontCache::createFontPlatformData):
967         * platform/graphics/win/FontCacheWin.cpp:
968         (WebCore::FontCache::createFontPlatformData):
969         * platform/graphics/wince/FontCacheWinCE.cpp:
970         (WebCore::FontCache::createFontPlatformData):
971         * platform/graphics/wx/FontCacheWx.cpp:
972         (WebCore::FontCache::createFontPlatformData):
973
974             FontCache::createFontPlatformData() now returns a PassOwnPtr.
975
976 2013-04-04  Andreas Kling  <akling@apple.com>
977
978         Render images with low-quality scaling while FrameView is being resized.
979         <http://webkit.org/b/113764>
980         <rdar://problem/13555154>
981
982         Reviewed by Antti Koivisto.
983
984         Have ImageQualityController ask the renderer's containing FrameView if it's currently in live
985         resize, and if so, paint all images with low-quality scaling. A high-quality repaint will happen
986         ~0.5 sec after live resizing ends, piggybacking on the same mechanism we use to do JS-animated
987         resizing with low-quality scaling.
988
989         This reduces CPU time spent generating new tiles during live window resize, especially on Retina
990         systems where a lot of upscaling happens on legacy web content.
991
992         * rendering/RenderBoxModelObject.cpp:
993         (ImageQualityController):
994
995             Added an m_liveResizeOptimizationIsActive flag that tracks whether the ImageQualityController
996             is painting everything in low quality due to live window resize. It gets unset when the HQ
997             repaint timer fires and everything has been repainted properly.
998
999         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
1000
1001             When the HQ repaint timer fires, check if the renderer's containing FrameView is still in
1002             live resize, and if so, abort HQ repaint for now and reschedule the timer.
1003
1004         (WebCore::ImageQualityController::ImageQualityController):
1005         (WebCore::ImageQualityController::objectDestroyed):
1006         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1007
1008 2013-04-04  Seokju Kwon  <seokju.kwon@gmail.com>
1009
1010         Web Inspector: fix closure compiler warnings in IndexedDBModel.js
1011         https://bugs.webkit.org/show_bug.cgi?id=113926
1012
1013         Reviewed by Alexander Pavlov.
1014
1015         No new tests: no change in behaviour.
1016
1017         * inspector/front-end/IndexedDBModel.js:
1018
1019 2013-04-04  Xidorn Quan  <quanxunzhen@gmail.com>
1020
1021         REGRESSION (r145870): Can't get insertion point to appear in some input and textareas on wordpress
1022         https://bugs.webkit.org/show_bug.cgi?id=113591
1023
1024         Reviewed by Simon Fraser.
1025
1026         Since a child node could overflow its ancestor, it is not wise to check
1027         one's radii boundary before checking whether the given point intersects
1028         its children. This patch moves the related code down to fix the bug.
1029
1030         Test: fast/borders/border-radius-child.html
1031
1032         * rendering/RenderBlock.cpp:
1033         (WebCore::RenderBlock::nodeAtPoint):
1034
1035 2013-04-04  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1036
1037         [GStreamer] Virtual modifier for MediaPlayer::simulateAudioInterruption must go
1038         https://bugs.webkit.org/show_bug.cgi?id=113851
1039
1040         Reviewed by Eric Carlson.
1041
1042         * platform/graphics/MediaPlayer.h:
1043         (MediaPlayer): Removed virtual modifier to
1044         simulateAudioInterruption.
1045
1046 2013-04-04  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1047
1048         [Qt] Support -webkit-font-smoothing
1049         https://bugs.webkit.org/show_bug.cgi?id=106009
1050
1051         Reviewed by Jocelyn Turcotte.
1052
1053         Remove false dependency on Qt 5.1 for the -webkit-font-smoothing property.
1054         For now we are still keeping the dependency on Font::shouldUseSmoothing().
1055
1056         * platform/graphics/qt/FontPlatformDataQt.cpp:
1057         (WebCore::FontPlatformData::FontPlatformData):
1058
1059 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1060
1061         Regression(r142765) Broke Custom SVG cursors and SVG canvas drawing for Chromium
1062         https://bugs.webkit.org/show_bug.cgi?id=113420
1063
1064         Reviewed by Stephen White.
1065
1066         Introduce a PassNativeImagePtr typedef that is used in place of NativeImagePtr
1067         for method arguments and return values. This is needed as Skia now maps
1068         NativeImagePtr to RefPtr<NativeImageSkia> and PassNativeImagePtr to
1069         PassRefPtr<NativeImageSkia>. We move towards ref counted smart pointers so that
1070         SVGImage::nativeImageForCurrentFrame() can transfer ownership of the native
1071         image to the caller if needed (e.g. for SVGImage).
1072
1073         Provide nativeImageForCurrentFrame() implementation for SVGImage. SVGImage no
1074         longer holds the native image internally, to save memory. It is therefore created
1075         when nativeImageForCurrentFrame() is called and ownership is passed to the
1076         caller. For now, this implementation is only enabled for Skia as others are using
1077         raw pointers for PassNativeImagePtr.
1078
1079         Test: svg/canvas/canvas-pattern-svg.html
1080
1081         * loader/icon/IconDatabase.cpp:
1082         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
1083         Return a PassNativeImagePtr instead of NativeImagePtr.
1084
1085         * loader/icon/IconDatabase.h:
1086         (IconDatabase):
1087         * loader/icon/IconDatabaseBase.h:
1088         (WebCore::IconDatabaseBase::synchronousNativeIconForPageURL):
1089         Return a PassNativeImagePtr instead of NativeImagePtr.
1090
1091         * platform/chromium/DragImageChromiumSkia.cpp:
1092         (WebCore::createDragImageFromImage):
1093         Store return value of nativeImageForCurrentFrame() in a RefPtr instead of a raw
1094         one.
1095
1096         * platform/chromium/PasteboardChromium.cpp:
1097         (WebCore::Pasteboard::writeImage):
1098         Store return value of nativeImageForCurrentFrame() in a RefPtr<NativeImageSkia>
1099         instead of a NativeImagePtr. While these are equivalent, the former is more
1100         readable in Skia-specific code.
1101
1102         * platform/graphics/BitmapImage.cpp:
1103         (WebCore::BitmapImage::frameAtIndex):
1104         Return a PassNativeImagePtr instead of a NativeImagePtr.
1105
1106         (WebCore::BitmapImage::nativeImageForCurrentFrame):
1107         Return a PassNativeImagePtr instead of a NativeImagePtr.
1108
1109         * platform/graphics/BitmapImage.h:
1110         (WebCore::BitmapImage::create):
1111         Take a PassNativeImagePtr in argument instead of a NativeImagePtr.
1112
1113         (BitmapImage): Ditto.
1114
1115         * platform/graphics/GraphicsContext.h:
1116         (GraphicsContext): Ditto.
1117
1118         * platform/graphics/GraphicsContext3D.h:
1119         (ImageExtractor):
1120         Keep NativeImageSkia in a RefPtr instead of OwnPtr, now that it is refcounted.
1121
1122         * platform/graphics/Image.h:
1123         (WebCore::Image::nativeImageForCurrentFrame):
1124         Return a PassNativeImagePtr instead of a NativeImagePtr.
1125
1126         * platform/graphics/ImageBuffer.h:
1127         (ImageBuffer):
1128         Have copyNativeImage() return a PassNativeImagePtr instead of a NativeImagePtr.
1129
1130         * platform/graphics/ImageSource.cpp:
1131         (WebCore::ImageSource::createFrameAtIndex):
1132         Return a PassNativeImagePtr instead of a NativeImagePtr.
1133
1134         * platform/graphics/ImageSource.h:
1135         Have createFrameAtIndex() return a PassNativeImagePtr instead of a NativeImagePtr.
1136
1137         * platform/graphics/NativeImagePtr.h:
1138         Map NativeImagePtr to a RefPtr<NativeImageSkia> instead of NativeImageSkia* for Skia.
1139         Introduce new PassNativeImagePtr that maps to PassRefPtr<NativeImageSkia> for Skia
1140         and is equivalent to NativeImagePtr for other ports. We now use smart pointers for
1141         the native image so that SVGImage::nativeImageForCurrentFrame() can pass ownership
1142         of the native image to the caller, unlike BitmapImage::nativeImageForCurrentFrame().
1143
1144         * platform/graphics/blackberry/ImageBlackBerry.cpp:
1145         (WebCore::ImageFrame::asNewNativeImage):
1146         Return a PassNativeImagePtr instead of a NativeImagePtr.
1147
1148         (WebCore::BitmapImage::BitmapImage):
1149         Take a PassNativeImagePtr instead of a NativeImagePtr in argument.
1150
1151         * platform/graphics/cg/GraphicsContextCG.cpp:
1152         (WebCore::GraphicsContext::drawNativeImage): Ditto.
1153
1154         * platform/graphics/cg/ImageBufferCG.cpp:
1155         (WebCore::ImageBuffer::copyNativeImage):
1156         Take a PassNativeImagePtr instead of a NativeImagePtr in argument.
1157
1158         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1159         (WebCore::GraphicsLayerChromium::setContentsToImage):
1160         Store return value of nativeImageForCurrentFrame() in a RefPtr instead of a raw one.
1161
1162         * platform/graphics/filters/skia/FEBlendSkia.cpp:
1163         (WebCore::FEBlend::platformApplySkia): Ditto.
1164
1165         * platform/graphics/filters/skia/FEColorMatrixSkia.cpp:
1166         (WebCore::FEColorMatrix::platformApplySkia): Ditto.
1167
1168         * platform/graphics/filters/skia/FEComponentTransferSkia.cpp:
1169         (WebCore::FEComponentTransfer::platformApplySkia): Ditto.
1170
1171         * platform/graphics/filters/skia/FEDisplacementMapSkia.cpp:
1172         (WebCore::FEDisplacementMap::platformApplySkia): Ditto.
1173
1174         * platform/graphics/filters/skia/FELightingSkia.cpp:
1175         (WebCore::FELighting::platformApplySkia): Ditto.
1176
1177         * platform/graphics/qt/ImageDecoderQt.cpp:
1178         (WebCore::ImageFrame::asNewNativeImage):
1179         Return a PassNativeImagePtr instead of a NativeImagePtr.
1180
1181         * platform/graphics/qt/StillImageQt.cpp:
1182         (WebCore::StillImage::nativeImageForCurrentFrame):
1183         Return a PassNativeImagePtr instead of a NativeImagePtr.
1184
1185         * platform/graphics/qt/StillImageQt.h:
1186         (StillImage): Ditto.
1187
1188         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
1189         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1190         No longer need to adopt the return value of asNewNativeImage() now
1191         that it returns a PassRefPtr instead of a raw one.
1192
1193         * platform/graphics/skia/ImageBufferSkia.cpp:
1194         (WebCore::ImageBuffer::copyImage):
1195         (WebCore::ImageBuffer::draw):
1196         (WebCore::ImageBuffer::drawPattern):
1197         Call NativeImageSkia::create() factory method now that the constructor
1198         is private.
1199
1200         * platform/graphics/skia/ImageSkia.cpp:
1201         (WebCore::FrameData::clear):
1202         Just call clear() on m_frame instead of explicitely deleting it now
1203         that it is a RefPtr.
1204
1205         (WebCore::Image::drawPattern):
1206         Store return value of nativeImageForCurrentFrame() in a RefPtr instead
1207         of a raw one.
1208
1209         (WebCore::BitmapImage::BitmapImage):
1210         (WebCore::BitmapImage::checkForSolidColor):
1211         Store return value of frameAtIndex() in a RefPtr instead of a raw one.
1212
1213         (WebCore::BitmapImage::draw):
1214         Store return value of nativeImageForCurrentFrame() in a RefPtr instead
1215         of a raw one.
1216
1217         * platform/graphics/skia/NativeImageSkia.cpp:
1218         Add new constructor taking all members in argument. This is used for
1219         cloning a NativeImageSkia object.
1220
1221         (WebCore::NativeImageSkia::NativeImageSkia):
1222         (WebCore::NativeImageSkia::deepSkBitmapCopy):
1223         Add convenience function to make a deep copy of a SkBitmap.
1224
1225         * platform/graphics/skia/NativeImageSkia.h:
1226         (WebCore):
1227         (WebCore::NativeImageSkia::create):
1228         (NativeImageSkia):
1229         Make NativeImageSkia subclass RefCounted. Make the constructor private
1230         and add a factory method instead that returns a PassRefPtr.
1231
1232         (WebCore::NativeImageSkia::clone):
1233         Add a clone() method now that NativeImageSkia is refcounted and is no
1234         longer copyable.
1235
1236         * platform/graphics/skia/PatternSkia.cpp:
1237         (WebCore::Pattern::platformPattern):
1238         Store return value of nativeImageForCurrentFrame() in a RefPtr instead
1239         of a raw one.
1240
1241         * platform/graphics/wince/ImageWinCE.cpp:
1242         (WebCore::ImageFrame::asNewNativeImage):
1243         Return a PassNativeImagePtr instead of a NativeImagePtr.
1244
1245         * platform/image-decoders/ImageDecoder.h:
1246         (ImageFrame):
1247         Have asNewNativeImage() return a PassNativeImagePtr instead of a
1248         NativeImagePtr.
1249
1250         (WebCore::ImageFrame::getAddr):
1251         (WebCore::ImageFrame::setSkBitmap):
1252         (WebCore::ImageFrame::getSkBitmap):
1253         (WebCore::ImageFrame::width):
1254         (WebCore::ImageFrame::height):
1255         Update use of m_bitmap now that it is a pointer type and call
1256         NativeImageSkia::create() to construct a NativeImageSkia object now
1257         that the constructor is private.
1258
1259         * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
1260         (WebCore::ImageFrame::asNewNativeImage):
1261         Return a PassNativeImagePtr instead of a NativeImagePtr.
1262
1263         * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp:
1264         (WebCore::ImageFrame::asNewNativeImage): Ditto.
1265
1266         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
1267         (WebCore::ImageFrame::ImageFrame):
1268         Initialize m_bitmap in the constructor now that it is a pointer
1269         type and we need NativeImageSkia's default constructor to be
1270         called.
1271
1272         (WebCore::ImageFrame::operator=):
1273         Call NativeImageSkia's new clone() method to copy m_bitmap as
1274         NativeImageSkia is now RefCounted and no longer copyable.
1275
1276         (WebCore::ImageFrame::clearPixelData):
1277         (WebCore::ImageFrame::zeroFillPixelData):
1278         (WebCore::ImageFrame::copyBitmapData):
1279         (WebCore::ImageFrame::setSize):
1280         Update use of m_bitmap now that it is a pointer type.
1281
1282         (WebCore::ImageFrame::asNewNativeImage):
1283         Return a PassNativeImagePtr instead of a NativeImagePtr.
1284         Call NativeImageSkia's clone method now that it is no longer
1285         copyable.
1286
1287         (WebCore::ImageFrame::setHasAlpha):
1288         (WebCore::ImageFrame::setStatus):
1289         Update use of m_bitmap now that it is a pointer type.
1290
1291         * platform/image-decoders/wx/ImageDecoderWx.cpp:
1292         (WebCore::ImageFrame::asNewNativeImage):
1293         Return a PassNativeImagePtr instead of a NativeImagePtr.
1294
1295         * svg/graphics/SVGImage.cpp:
1296         (WebCore):
1297         (WebCore::SVGImage::nativeImageForCurrentFrame):
1298         Add implementation of nativeImageForCurrentFrame() for SVGImage as
1299         it is needed for SVG custom cursor support and Canvas drawing of
1300         patterns containing SVG images. As SVGImage no longer keep the
1301         native image internally to save memory, the implementation creates
1302         the native image when nativeImageForCurrentFrame() and passes
1303         its ownership to the caller.
1304
1305         * svg/graphics/SVGImage.h:
1306         Override Image::nativeImageForCurrentFrame() and remove dummy
1307         implementation of frameAtIndex() as it is not needed / used.
1308
1309         * svg/graphics/SVGImageForContainer.cpp:
1310         (WebCore::SVGImageForContainer::nativeImageForCurrentFrame):
1311         Add implementation of nativeImageForCurrentFrame() which merely
1312         forwards the call to the Image being contained.
1313
1314         * svg/graphics/SVGImageForContainer.h:
1315         Override Image::nativeImageForCurrentFrame().
1316
1317 2013-04-04  Andrei Bucur  <abucur@adobe.com>
1318
1319         [CSSRegions] RenderFlowThread::renderRegionForLine should use a faster search method
1320         https://bugs.webkit.org/show_bug.cgi?id=66921
1321
1322         Reviewed by David Hyatt.
1323
1324         The RenderFlowThread::regionAtBlockOffset() function is a hot path for the code using
1325         flow threads because it translates from block coordinates to regions.
1326         Currently the method is O(n), using a linear search through the regions chain to find the
1327         region where a block offset lands.
1328         The patch improves this search by using an interval tree (PODIntervalTree). Before a flow
1329         thread is laid out, each region is updated to hold the size of the portion of the flow it
1330         will receive. This information is gathered inside the interval tree and used to speedup the
1331         search in RenderFlowThread::regionAtBlockOffset(). The algorithm uses a custom adapter
1332         simplified for looking up offsets inside the interval tree.
1333         For now, the interval tree is cleared every time the flow thread portions list is updated.
1334         The implementation can be improved but induces some cmplexity as we'd have to manually manage
1335         the life cycle of the tree's nodes. The performance gains are good enough as is to make this
1336         only optional.
1337         Another important change is now the flow thread portion rectangles will not overflow when
1338         using auto-height regions (or very large regions). The maximum size of the flow is set to
1339         LayoutUnit::max()/2. Any region forcing a greater size will be capped so the thread
1340         won't overflow.
1341
1342         Performance test results:
1343         /Layout/RegionsAuto:Time            ms 699.95   181.20  74.11% Better
1344         /Layout/RegionsAutoMaxHeight:Time   ms 2083.00  308.55  85.19% Better
1345         /Layout/RegionsFixed:Time           ms 726.10   223.65  69.20% Better
1346         /Layout/RegionsFixedShort:Time      ms 869.60   288.25  66.85% Better
1347
1348         Tests: See PerformanceTests/Layout/Regions*
1349
1350         * rendering/RenderFlowThread.cpp:
1351         (WebCore::RenderFlowThread::regionAtBlockOffset):
1352         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1353         (WebCore::RenderFlowThread::RegionSearchAdapter::collectIfNeeded):
1354         (WebCore):
1355         * rendering/RenderFlowThread.h:
1356         (WebCore):
1357
1358 2013-04-04  Seokju Kwon  <seokju.kwon@gmail.com>
1359
1360         [Qt] WebSocket errors should be logged to console
1361         https://bugs.webkit.org/show_bug.cgi?id=113842
1362
1363         Reviewed by Jocelyn Turcotte.
1364
1365         Pass the reason of a failure to SocketStreamError instance
1366         and notify it via SocketStreamHandleClient::didFailSocketStream().
1367
1368         Test : http/tests/inspector/console-websocket-error.html
1369
1370         * platform/network/qt/SocketStreamError.h:
1371         (WebCore::SocketStreamError::SocketStreamError):
1372         * platform/network/qt/SocketStreamHandleQt.cpp:
1373         (WebCore::SocketStreamHandlePrivate::SocketStreamHandlePrivate):
1374         (WebCore::SocketStreamHandlePrivate::socketErrorCallback):
1375
1376 2013-04-04  Ed Bartosh  <bartosh@gmail.com>
1377
1378         [ATK] build fails when accessibility is turned off
1379         https://bugs.webkit.org/show_bug.cgi?id=113699
1380
1381         Reviewed by Gyuyoung Kim.
1382
1383         * editing/atk/FrameSelectionAtk.cpp: Wrapped accessibility code in #if HAVE(ACCESSIBILITY)
1384
1385 2013-04-04  Seokju Kwon  <seokju.kwon@gmail.com>
1386
1387         Web Inspector: fix closure compiler warnings in the profiler code HeapSnapshotDataGrids.js
1388         https://bugs.webkit.org/show_bug.cgi?id=113922
1389
1390         Reviewed by Yury Semikhatsky.
1391
1392         No new tests: no change in behaviour.
1393
1394         * inspector/front-end/HeapSnapshotDataGrids.js:
1395
1396 2013-04-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1397
1398         [EFL] Add a decoration image to search input field
1399         https://bugs.webkit.org/show_bug.cgi?id=113552
1400
1401         Reviewed by Laszlo Gombos.
1402
1403         Though EFL port has a decoration image for search input field, we didn't use it.
1404         Start to show it.
1405
1406         Tests: fast/forms/search-cancel-button-style-sharing.html
1407                fast/forms/search-rtl.html
1408                fast/css/input-search-padding.html
1409                fast/css/text-input-with-webkit-border-radius.html
1410                fast/css/text-overflow-input.html
1411                fast/forms/box-shadow-override.html
1412                fast/forms/control-restrict-line-height.html
1413                fast/forms/input-appearance-height.html
1414                fast/forms/placeholder-position.html
1415                fast/forms/placeholder-pseudo-style.html
1416                fast/forms/search-styled.html
1417                fast/forms/search-vertical-alignment.html
1418                fast/forms/searchfield-heights.html
1419                fast/repaint/search-field-cancel.html 
1420                fast/replaced/width100percent-searchfield.html
1421
1422         * platform/efl/RenderThemeEfl.cpp:
1423         (WebCore):
1424         (WebCore::RenderThemeEfl::supportsDataListUI):
1425         (WebCore::RenderThemeEfl::adjustSearchFieldDecorationStyle):
1426
1427 2013-04-03  Kent Tamura  <tkent@chromium.org>
1428
1429         Input value/placeholder is not redrawn when the input height grows
1430         https://bugs.webkit.org/show_bug.cgi?id=113845
1431
1432         Reviewed by Ojan Vafai.
1433
1434         Test: fast/forms/text/text-height-grow.html
1435
1436         * rendering/RenderTextControlSingleLine.cpp:
1437         (WebCore::RenderTextControlSingleLine::styleDidChange):
1438         We need relayout of the inner text element.
1439
1440 2013-04-03  Shawn Singh  <shawnsingh@chromium.org>
1441
1442         Add comment to clarify isStackingContext() in RenderLayer.h
1443         https://bugs.webkit.org/show_bug.cgi?id=113909
1444
1445         Reviewed by Simon Fraser.
1446
1447         It was not obvious how the implementation of isStackingContext()
1448         was correct, a comment is appropriate here for anyone who reads
1449         this code in the future.
1450
1451         Just a change in comment, no test needed.
1452
1453         * rendering/RenderLayer.h:
1454
1455 2013-04-03  Hans Muller  <hmuller@adobe.com>
1456
1457         [CSS Exclusions] Removed ExclusionShape dead code
1458         https://bugs.webkit.org/show_bug.cgi?id=113904
1459
1460         Reviewed by Dirk Schulze.
1461
1462         No new tests, just removing dead code.
1463
1464         * rendering/ExclusionShape.cpp:
1465         (WebCore::ExclusionShape::createExclusionShape):
1466         * rendering/ExclusionShape.h:
1467         (ExclusionShape):
1468
1469 2013-04-03  Otto Derek Cheung  <otcheung@rim.com>
1470
1471         [BlackBerry] Switch MediaPlayerPrivateBlackBerry.cpp's timer to use CLOCK_MONOTONIC
1472         https://bugs.webkit.org/show_bug.cgi?id=113900
1473
1474         Reviewed by Rob Buis.
1475         Internally Reviewed by Jeff Rogers.
1476
1477         Timers should use CLOCK_MONOTONIC to avoid undesirable effects when
1478         the user switches the system time.
1479
1480         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1481         (WebCore::MediaPlayerPrivate::drawBufferingAnimation):
1482
1483 2013-04-03  Dave Michael  <dmichael@chromium.org>
1484
1485         Unable to focus on embedded plugins such as Flash via javascript focus()
1486         https://bugs.webkit.org/show_bug.cgi?id=32292
1487
1488         Reviewed by Ryosuke Niwa.
1489
1490         Make embed, object, and applet elements support focus() when
1491         appropriate. Prior to this patch, javascript focus() had no effect on
1492         embed, object, or applet elements unless tabindex or contenteditable is
1493         set. With this patch, focus() will focus the element unless the plugin
1494         content has failed to load (i.e., we are showing either fallback content
1495         or an unavailable plugin indicator).
1496
1497         Test: plugins/focus.html
1498               java/focus.html
1499
1500         * html/HTMLPlugInElement.cpp:
1501         (WebCore::HTMLPlugInElement::supportsFocus):
1502         Overridden to return true except when the plugin content has failed to load.
1503         * html/HTMLPlugInElement.h:
1504         (WebCore::HTMLPlugInElement::useFallbackContent):
1505         Moved up from HTMLPlugInImageElement.
1506         (WebCore::HTMLPlugInElement::supportsFocus):
1507         * html/HTMLPlugInElement.h:
1508         (WebCore::HTMLPlugInImageElement::useFallbackContent):
1509         Removed. Now the implementation is inherited from HTMLPlugInElement.
1510
1511 2013-04-03  Glenn Adams  <glenn@skynav.com>
1512
1513         Element boundaries prevent Japanese line break opportunities
1514         https://bugs.webkit.org/show_bug.cgi?id=105692
1515
1516         Reviewed by Darin Adler.
1517
1518         Introduce use of prior context when using text break iterators
1519         in non-ASCII path through nextBreakablePosition(). This enables
1520         the use of line break context across an element boundary for
1521         the non-ASCII path. Use of this context with the ASCII path was
1522         enabled by https://bugs.webkit.org/show_bug.cgi?id=17427.
1523
1524         Performance tests of line layout and html5 parsing show that this
1525         patch provides an approximately 4% improvement with Japanese and
1526         no statistically significant regression with ASCII path. Parsing
1527         (html5-full-render) performance is not significantly affected.
1528
1529         Tests: fast/text/line-break-between-text-nodes-cjk.html
1530                fast/text/line-break-between-text-nodes-latin1.html
1531
1532         Expect rebaselines will be needed due to different line breaks:
1533                fast/text/international/003.html
1534                fast/text/international/text-combine-image-test-expected.html
1535                fast/text/writing-mode/Kusa-Makura-background-canvas.html
1536
1537         * platform/text/TextBreakIterator.cpp:
1538         (WebCore::acquireLineBreakIterator): Pass prior context to non-ICU path.
1539         * platform/text/TextBreakIterator.h:
1540         (WebCore::LazyLineBreakIterator::priorContextLength): Added.
1541         (WebCore::LazyLineBreakIterator::get): Pass prior context to ICU path.
1542         (WebCore::LazyLineBreakIterator::resetStringAndReleaseIterator): Editorial.
1543         * platform/text/TextBreakIteratorICU.cpp:
1544         Use prior context from line break iterators. Requires
1545         adding new UTF16 (UChar*) text provider and reimplementing
1546         Latin1 (LChar*) text provider. Implementation is optimized
1547         by using generic functionality that applies to both string
1548         sources.
1549         (WebCore::textPinIndex): Added.
1550         (WebCore::textNativeLength): Added.
1551         (WebCore::textFixPointer): Added.
1552         (WebCore::textClone): Added.
1553         (WebCore::textExtract): Added.
1554         (WebCore::textClose): Added.
1555         (WebCore::textGetContext): Added.
1556         (WebCore::textLatin1GetCurrentContext): Added.
1557         (WebCore::textLatin1MoveInPrimaryContext): Added.
1558         (WebCore::textLatin1SwitchToPrimaryContext): Added.
1559         (WebCore::textLatin1MoveInPriorContext): Added.
1560         (WebCore::textLatin1SwitchToPriorContext): Added.
1561         (WebCore::textInChunkOrOutOfRange): Added.
1562         (WebCore::textLatin1Access): Added.
1563         (WebCore::textInit): Added.
1564         (WebCore::textOpenLatin1): Added.
1565         (WebCore::textUTF16GetCurrentContext): Added.
1566         (WebCore::textUTF16MoveInPrimaryContext): Added.
1567         (WebCore::textUTF16SwitchToPrimaryContext): Added.
1568         (WebCore::textUTF16MoveInPriorContext): Added.
1569         (WebCore::textUTF16SwitchToPriorContext): Added.
1570         (WebCore::textUTF16Access): Added.
1571         (WebCore::textOpenUTF16): Added.
1572         (WebCore::acquireLineBreakIterator): Use new text providers with prior context.
1573         * platform/text/wchar/TextBreakIteratorWchar.cpp:
1574         (WebCore::acquireLineBreakIterator): Pass prior context to non-ICU path.
1575         * rendering/break_lines.cpp:
1576         (WebCore::nextBreakablePosition): Use prior context in ICU path.
1577
1578 2013-04-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1579
1580         [Chromium] Bad cast from BitmapImageSingleFrameSkia to BitmapImage
1581         https://bugs.webkit.org/show_bug.cgi?id=113492
1582
1583         Reviewed by Stephen White.
1584
1585         Remove BitmapImageSingleFrameSkia and have ImageBufferSkia construct
1586         BitmapImage objects instead via an intermediate NativeImageSkia.
1587
1588         No new tests, covered by existing tests.
1589
1590         * WebCore.gypi:
1591         * platform/graphics/filters/skia/FEGaussianBlurSkia.cpp: Remove
1592         include for BitmapImageSingleFrameSkia.h header.
1593         * platform/graphics/skia/BitmapImageSingleFrameSkia.cpp: Removed.
1594         * platform/graphics/skia/BitmapImageSingleFrameSkia.h: Removed.
1595         * platform/graphics/skia/ImageBufferSkia.cpp: Construct BitmapImage
1596         objects instead of BitmapImageSingleFrameSkia ones.
1597         (WebCore::ImageBuffer::copyImage):
1598         (WebCore::drawNeedsCopy):
1599         (WebCore::ImageBuffer::draw):
1600         (WebCore::ImageBuffer::drawPattern):
1601         * platform/graphics/skia/ImageSkia.cpp:
1602         (WebCore::BitmapImage::BitmapImage): Implement BitmapImage constructor
1603         that takes an NativeImageSkia* in argument.
1604         (WebCore):
1605         (WebCore::BitmapImage::draw): Remove m_source.initialized() check as
1606         this will return false for BitmapImage objects constructed from a
1607         NativeImageSkia, due to the lack of decoder.
1608         * platform/graphics/skia/NativeImageSkia.cpp:
1609         (WebCore::NativeImageSkia::NativeImageSkia): Add parameter to the
1610         NativeImageSkia constructor so that the caller can request a deep copy
1611         instead of a shallow one. This is needed by the ImageBuffer.
1612         * platform/graphics/skia/NativeImageSkia.h:
1613         * platform/image-decoders/ImageDecoder.h:
1614         (WebCore::ImageFrame::setSkBitmap):
1615
1616 2013-04-03  David Vest  <davve@opera.com>
1617
1618         ASSERTION FAILED: resultAnimationElement->m_animatedType
1619         https://bugs.webkit.org/show_bug.cgi?id=93528
1620
1621         Reviewed by Philip Rogers.
1622
1623         When the order of animation elements change within an animation
1624         group, we can't assume that the resultElement is the same as it
1625         was when the animation was frozen. Make sure to reset the
1626         animation type for the resultElement before updating the
1627         animation.
1628
1629         Test: svg/animations/animation-dependency-crash.html
1630
1631         * svg/animation/SVGSMILElement.cpp:
1632         (WebCore::SVGSMILElement::progress):
1633
1634 2013-04-03  Timothy Hatcher  <timothy@apple.com>
1635
1636         Stop unconditionally enabling JavaScript execution when closing the Web Inspector.
1637
1638         https://webkit.org/b/113889
1639         rdar://problem/12281794
1640
1641         Reviewed by Joseph Pecoraro.
1642
1643         * inspector/InspectorPageAgent.cpp:
1644         (WebCore::InspectorPageAgent::InspectorPageAgent): Initialize m_originalScriptExecutionDisabled.
1645         (WebCore::InspectorPageAgent::enable): Populate m_originalScriptExecutionDisabled based on current setting.
1646         (WebCore::InspectorPageAgent::disable): Restore previous setting.
1647         * inspector/InspectorPageAgent.h:
1648         (InspectorPageAgent): Added m_originalScriptExecutionDisabled.
1649
1650 2013-04-03  Dean Jackson  <dino@apple.com>
1651
1652         Cross fade into restarted plugin
1653         https://bugs.webkit.org/show_bug.cgi?id=113868
1654
1655         Reviewed by Tim Horton.
1656
1657         Allow a restarted plugin to fade in over its snapshot, avoiding the abrupt
1658         flash of empty content. The WebCore part of this patch marks the plugin
1659         element as restarted, and draws the snapshot for a short amount of time
1660         as the plugin is restarting. After the plugin has reappeared, we stop drawing
1661         the snapshot.
1662
1663         There is a little bit of drive-by whitespace removal in HTMLPlugInImageElement.
1664
1665         * html/HTMLPlugInElement.h:
1666         (WebCore::HTMLPlugInElement::restartedPlugin): New method indicating if the plugin has been restarted.
1667         * html/HTMLPlugInImageElement.cpp:
1668         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialise new timer and member variable.
1669         (WebCore::HTMLPlugInImageElement::setDisplayState): If we are moving into a restarting state, make sure
1670             to remember this and also start a timer so that we show the snapshot for while.
1671         (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): No need to draw the snapshot from here on.
1672         * html/HTMLPlugInImageElement.h:
1673         (HTMLPlugInImageElement): Member variable to remember if we've restarted.
1674         * rendering/RenderEmbeddedObject.cpp:
1675         (WebCore::RenderEmbeddedObject::paintContents): Only exit early from the paint if we're not a restarting
1676             plugin, otherwise we do want to draw the snapshot if there is one.
1677         * rendering/RenderLayerBacking.cpp:
1678         (WebCore::isRestartedPlugin): Detects a restarted plugin.
1679         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Don't become a simple container
1680             compositing layer if you're a restarted plugin.
1681
1682 2013-04-03  John Griggs  <jgriggs@blackberry.com>
1683
1684         [BlackBerry] Adjustments to media controls appearance.
1685         https://bugs.webkit.org/show_bug.cgi?id=113816
1686         https://przilla.ott.qnx.com/bugzilla/show_bug.cgi?id=316398
1687         https://przilla.ott.qnx.com/bugzilla/show_bug.cgi?id=316438
1688
1689         Updates to the BlackBerry media controls:
1690          - extend the timeline slider.
1691          - move the volume slider for audio elements up so it does not overlap the main panel.
1692          - upstream some other cosmetic changes to media controls that were not previously upstreamed.
1693
1694         Reviewed by Rob Buis.
1695
1696         BlackBerry-specific, cosmetic change; No new tests required.
1697
1698         * platform/blackberry/RenderThemeBlackBerry.cpp:
1699         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
1700         (WebCore::RenderThemeBlackBerry::paintMediaPlayButton):
1701         (WebCore::RenderThemeBlackBerry::paintMediaMuteButton):
1702         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
1703         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):
1704         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderThumb):
1705
1706 2013-04-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1707
1708         [Gstreamer] Use gst_buffer_extract() in copyGstreamerBuffersToAudioChannel()
1709         https://bugs.webkit.org/show_bug.cgi?id=113880
1710
1711         Reviewed by Philippe Normand.
1712
1713         copyGstreamerBuffersToAudioChannel() was mapping the GstBuffer content to memcpy
1714         it to the AudioChannel buffer. This patch leverages gst_buffer_extract() to
1715         simplify the code as it does exactly what we need: gst_buffer_map, memcpy,
1716         gst_buffer_unmap and error handling.
1717
1718         Also replace GstBuffer NULL check by an assertion as we already make sure they
1719         are not NULL before adding them to the list. Additionally, we now call
1720         audioChannel->mutableData() only once instead of once per iteration. It is
1721         a bit better as the getter does some work internally.
1722
1723         No new tests, no behavior change.
1724
1725         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1726         (WebCore::copyGstreamerBuffersToAudioChannel):
1727
1728 2013-04-03  Antoine Quint  <graouts@apple.com>
1729
1730         Web Inspector: DOM.highlightRect() and DOM.highlightQuad() should allow for page coordinates
1731         https://bugs.webkit.org/show_bug.cgi?id=113869
1732
1733         Add a new "usePageCoordinates" parameter to DOM.highlightRect() and DOM.highlightQuad()
1734         allowing to specify that the rect or quad to highlight should be converted to page
1735         coordinates instead of using the default viewport coordinates.
1736
1737         Reviewed by Timothy Hatcher.
1738
1739         * inspector/Inspector.json:
1740         * inspector/InspectorDOMAgent.cpp:
1741         (WebCore::InspectorDOMAgent::highlightRect):
1742         (WebCore::InspectorDOMAgent::highlightQuad):
1743         (WebCore::InspectorDOMAgent::innerHighlightQuad):
1744         Store the "usePageCoordinates" parameter obtained from the protocol calls onto the
1745         highlight configuration object so that it may be used within the InspectorOverlay.
1746
1747         * inspector/InspectorDOMAgent.h:
1748         (InspectorDOMAgent):
1749         * inspector/InspectorOverlay.cpp:
1750         (WebCore::InspectorOverlay::highlightQuad):
1751         Check the highlight configuration for the "usePageCoordinates" parameter and
1752         apply the inverse of the page's scroll offset to the quad if it's true.
1753
1754         * inspector/InspectorOverlay.h:
1755         (HighlightConfig):
1756         (WebCore::Highlight::setDataFromConfig):
1757         (Highlight):
1758
1759 2013-04-03  Kangil Han  <kangil.han@samsung.com>
1760
1761         Add omitted reference operator of VisiblePosition in AccessibilityObject
1762         https://bugs.webkit.org/show_bug.cgi?id=113879
1763
1764         Reviewed by Darin Adler.
1765
1766         Seems reference operator has been omitted in startOfStyleRange function, so add it.
1767
1768         * accessibility/AccessibilityObject.cpp:
1769         (WebCore::startOfStyleRange):
1770
1771 2013-04-03  Jessie Berlin  <jberlin@apple.com>
1772
1773         Update the localizable strings file.
1774
1775         Rubber-stamped by Michael Saboff.
1776
1777         * English.lproj/Localizable.strings:
1778
1779 2013-04-03  David Kilzer  <ddkilzer@apple.com>
1780
1781         BUILD FIX (r147493): Fix number of arguments to AudioDestinationIOS constructor
1782
1783         Fixes the following build failures:
1784
1785             Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:84:25: error: no matching constructor for initialization of 'WebCore::AudioDestinationIOS'
1786                 return adoptPtr(new AudioDestinationIOS(callback, sampleRate));
1787                                     ^                   ~~~~~~~~~~~~~~~~~~~~
1788             In file included from Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:36:
1789             Source/WebCore/platform/audio/ios/AudioDestinationIOS.h:44:5: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
1790                 AudioDestinationIOS(AudioIOCallback&, unsigned numberOfOutputChannels, double sampleRate);
1791                 ^
1792             Source/WebCore/platform/audio/ios/AudioDestinationIOS.h:42:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
1793             class AudioDestinationIOS : public AudioDestination, public AudioSessionListener {
1794                   ^
1795             Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:101:22: error: out-of-line definition of 'AudioDestinationIOS' does not match any declaration in 'WebCore::AudioDestinationIOS'
1796             AudioDestinationIOS::AudioDestinationIOS(AudioIOCallback& callback, double sampleRate)
1797                                  ^~~~~~~~~~~~~~~~~~~
1798             2 errors generated.
1799
1800         * platform/audio/ios/AudioDestinationIOS.h:
1801         (AudioDestinationIOS): Remove numberOfOutputChannels argument.
1802
1803 2013-04-03  David Kilzer  <ddkilzer@apple.com>
1804
1805         BUILD FIX (r147494): -[AVAudioSession setCategory:error:] takes NSError**
1806
1807         Fixes the following build failure:
1808
1809             Source/WebCore/platform/audio/ios/AudioSessionIOS.mm:151:71: error: cannot initialize a parameter of type 'NSError **' with an lvalue of type 'NSError *'
1810                 [[AVAudioSession sharedInstance] setCategory:categoryString error:error];
1811                                                                                   ^~~~~
1812
1813         * platform/audio/ios/AudioSessionIOS.mm:
1814         (WebCore::AudioSession::setCategory): Add '&' operator.
1815
1816 2013-04-03  Felipe Zimmerle  <felipe@zimmerle.org>
1817
1818         CSP blocks inline style when cloning a node
1819         https://bugs.webkit.org/show_bug.cgi?id=112270
1820
1821         Reviewed by Adam Barth.
1822
1823         Checks if the Element is being cloned, if so, the application of the
1824         style is allowed otherwise it relies on default permission mechanism.
1825
1826         Test: http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html
1827
1828         * dom/Element.cpp:
1829         (WebCore::Element::attributeChanged): Added parameter
1830         AttributeModificationReason to the method signature.
1831         (WebCore::Element::cloneAttributesFromElement): It is now calling 
1832         attributeChanged with AttributeModificationReason parameter. In this scope
1833         it is always set to ModifiedByCloning.
1834         (WebCode::Element::attributeChangedFromParserOrByCloning):
1835         Added parameter AttributeModificationReason.
1836         * dom/Element.h: Added AttributeModificationReason enum. Used to specify
1837         whenever an attribute was set by a cloned oject or directly.
1838         AttributeModificationReason added to attributeChanged with the default
1839         value set to ModifiedDirectly. 
1840         * dom/StyledElement.cpp: 
1841         (WebCore::StyledElement::attributeChanged): Added
1842         AttributeModificationReason to the method signature.
1843         (WebCore::StyledElement::styleAttributeChanged): Now it is checking the
1844         reason of the update, if the reason is ModifiedDirectly check CSP
1845         before set. If ModifiedByCloning set the attribute ignoring the CSP
1846         policy.
1847         * dom/StyledElement.h:
1848         (StyledElement): Added AttributeModificationReason parameter to the methods:
1849         attributeChanged and styleAttributeChanged, attributeChanged has
1850         ModifiedDirectly as default value.
1851         * svg/SVGElement.cpp: 
1852         (WebCore::SVGElement::attributeChanged): Added AttributeModificationReason
1853         parameter to the method signature.
1854         * svg/SVGElement.h: 
1855         (SVGElement): Added AttributeModificationReason parameter to the
1856         attributeChanged signature with the default value set to:
1857         ModifiedDirectly.
1858
1859 2013-04-03  Csaba Osztrogonác  <ossy@webkit.org>
1860
1861         Unreviewed 32bit buildfix after r147542.
1862
1863         * Modules/websockets/WebSocket.cpp:
1864         (WebCore::WebSocket::didReceiveBinaryData):
1865
1866 2013-04-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1867
1868         [Gstreamer] Avoid calls to g_slist_nth_data in webKitWebAudioSrcLoop()
1869         https://bugs.webkit.org/show_bug.cgi?id=113875
1870
1871         Reviewed by Philippe Normand.
1872
1873         webKitWebAudioSrcLoop() was iterating over 2 GSLists by using a counter and then
1874         calling g_slist_nth_data() to get the element of each GSList. This is inefficient
1875         because calling g_slist_nth_data() will iterate the GSList up until index 'n'.
1876
1877         This patch improves this by keeping pointers to the current element of each list
1878         while iterating, so that we can simply use g_slist_next() to iterate instead
1879         of g_slist_nth_data().
1880
1881         No new tests, no behavior change.
1882
1883         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1884         (webKitWebAudioSrcLoop):
1885
1886 2013-04-03  Keishi Hattori  <keishi@webkit.org>
1887
1888         Actions that require user gesture don't work in window.showModalDialog in Chromium
1889         https://bugs.webkit.org/show_bug.cgi?id=113777
1890
1891         Reviewed by Jochen Eisinger.
1892
1893         In Chromium the window for showModalDialog is not modal which causes the
1894         UserGestureIndicator to block actions in the sub window. We introduce a
1895         RAII that saves the UserGestureIndicator and state, then resets it before
1896         runModalDialog, and restore it when it's done.
1897
1898         No new tests. Can't cause user gesture inside modal dialog.
1899
1900         * dom/UserGestureIndicator.cpp:
1901         (WebCore::UserGestureIndicatorDisabler::UserGestureIndicatorDisabler): Saves and resets the topmost indicator and state.
1902         (WebCore):
1903         (WebCore::UserGestureIndicatorDisabler::~UserGestureIndicatorDisabler): Restores topmost indicator and state.
1904         * dom/UserGestureIndicator.h:
1905         (WebCore):
1906         (UserGestureIndicatorDisabler): RAII to temporarily disable UserGestureIndicator.
1907         (UserGestureIndicator): Allow access to UserGestureIndicatorDisabler.
1908         * page/DOMWindow.cpp:
1909         (WebCore::DOMWindow::showModalDialog): Disable UserGestureIndicator while runModalDialog.
1910
1911 2013-04-03  Zeno Albisser  <zeno@webkit.org>
1912
1913         [Qt] Fail gracefully if an OpenGL context could not be created.
1914         https://bugs.webkit.org/show_bug.cgi?id=113784
1915
1916         In case we fail to create or adopt a valid platform OpenGL context
1917         we do not want to provide a GraphicsContext3D instance.
1918         Otherwise we would crash as soon as the instance is being used.
1919
1920         Reviewed by Jocelyn Turcotte.
1921
1922         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1923         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1924         (WebCore::GraphicsContext3D::GraphicsContext3D):
1925
1926 2013-04-03  ChangSeok Oh  <changseok.oh@collabora.com>
1927
1928         [GTK][AC] Implement matrix keyframe animations with clutter ac backend
1929         https://bugs.webkit.org/show_bug.cgi?id=110314
1930
1931         Reviewed by Gustavo Noronha Silva.
1932
1933         Clutter 1.12 doesn't support additive transform animations yet, So clutter ac backend
1934         uses matrix animations for the case. This patch follows changeset 143369, 143343
1935         to support matrix keyframe animations. I believe this change is easy if you understand
1936         above two changesets.
1937
1938         Covered by existing animation tests.
1939
1940         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
1941         (WebCore::PlatformClutterAnimation::setValues):
1942         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
1943         (WebCore):
1944         (WebCore::PlatformClutterAnimation::addTransformTransition):
1945         * platform/graphics/clutter/PlatformClutterAnimation.h:
1946         (PlatformClutterAnimation):
1947
1948 2013-04-03  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1949
1950         Should close select popup when the element loses focus
1951         https://bugs.webkit.org/show_bug.cgi?id=113220
1952
1953         Reviewed by Kent Tamura.
1954
1955         Test: fast/forms/select-popup-closes-on-blur.html
1956
1957         * html/HTMLSelectElement.cpp:
1958         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): handle the blur event, closing
1959         the popup menu if any.
1960         * testing/Internals.cpp:
1961         (WebCore::Internals::isSelectPopupVisible): utility to query the select node renderer to
1962         find out whether the popup is open or closed.
1963         (WebCore):
1964         * testing/Internals.h: add the new method definition.
1965         * testing/Internals.idl: ditto.
1966
1967 2013-03-28  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1968
1969         [Qt] Switch ContextMenu implementation to CROSS_PLATFORM_CONTEXT_MENU
1970         https://bugs.webkit.org/show_bug.cgi?id=113535
1971
1972         Reviewed by Simon Hausmann.
1973
1974         Now Qt uses the CROSS_PLATFORM_CONTEXT_MENUS
1975         USE flag. This flag provides a full cross-platform
1976         representation of a ContextMenu and a ContextMenuItem.
1977         The embedder can then decide how to show this, so neither
1978         WebCore nor WebCore/platform need to know any platform
1979         specifics about menus.
1980
1981         No new tests, no behavior changes.
1982
1983         * Target.pri:
1984         * platform/ContextMenu.h:
1985         (ContextMenu):
1986         * platform/ContextMenuItem.h:
1987         * platform/qt/ContextMenuItemQt.cpp:
1988         (WebCore::ContextMenuItem::platformContextMenuItem):
1989         * platform/qt/ContextMenuQt.cpp:
1990         (WebCore::ContextMenu::ContextMenu):
1991         (WebCore::ContextMenu::getContextMenuItems):
1992         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
1993         (WebCore::ContextMenu::platformContextMenu):
1994
1995 2013-04-03  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1996
1997         [Qt] Monospace font does not render in proper sizes
1998         https://bugs.webkit.org/show_bug.cgi?id=93263
1999
2000         Reviewed by Jocelyn Turcotte.
2001
2002         Remove this patch's artificial dependency on Qt 5.1.
2003
2004         * platform/graphics/qt/FontPlatformDataQt.cpp:
2005         (WebCore::FontPlatformData::FontPlatformData):
2006
2007 2013-04-03  Takeshi Yoshino  <tyoshino@chromium.org>
2008
2009         Refine LOG messages in WebSocket related components
2010         https://bugs.webkit.org/show_bug.cgi?id=113852
2011
2012         Reviewed by Kent Tamura.
2013
2014         Refine LOG messages by
2015         - Make them contain method names to ease identifying where the event occurred.
2016         - For consistency, make all messages print the pointer of the origin instance.
2017         - Quote UTF8 data in LOG messages.
2018         - For overloaded methods, add the type to clarify which one is run
2019
2020         * Modules/websockets/WebSocket.cpp:
2021         (WebCore::WebSocket::connect):
2022         (WebCore::WebSocket::send):
2023         (WebCore::WebSocket::close):
2024         (WebCore::WebSocket::contextDestroyed):
2025         (WebCore::WebSocket::didConnect):
2026         (WebCore::WebSocket::didReceiveMessage):
2027         (WebCore::WebSocket::didReceiveBinaryData):
2028         (WebCore::WebSocket::didReceiveMessageError):
2029         (WebCore::WebSocket::didUpdateBufferedAmount):
2030         (WebCore::WebSocket::didStartClosingHandshake):
2031         (WebCore::WebSocket::didClose):
2032         * Modules/websockets/WebSocketChannel.cpp:
2033         (WebCore::WebSocketChannel::connect):
2034         (WebCore::WebSocketChannel::subprotocol):
2035         (WebCore::WebSocketChannel::extensions):
2036         (WebCore::WebSocketChannel::send):
2037         (WebCore::WebSocketChannel::bufferedAmount):
2038         (WebCore::WebSocketChannel::close):
2039         (WebCore::WebSocketChannel::fail):
2040         (WebCore::WebSocketChannel::disconnect):
2041         (WebCore::WebSocketChannel::willOpenSocketStream):
2042         (WebCore::WebSocketChannel::didOpenSocketStream):
2043         (WebCore::WebSocketChannel::didCloseSocketStream):
2044         (WebCore::WebSocketChannel::didReceiveSocketStreamData):
2045         (WebCore::WebSocketChannel::didFailSocketStream):
2046         (WebCore::WebSocketChannel::didStartLoading):
2047         (WebCore::WebSocketChannel::didReceiveData):
2048         (WebCore::WebSocketChannel::didFinishLoading):
2049         (WebCore::WebSocketChannel::didFail):
2050         (WebCore::WebSocketChannel::appendToBuffer):
2051         (WebCore::WebSocketChannel::processBuffer):
2052         (WebCore::WebSocketChannel::startClosingHandshake):
2053         (WebCore::WebSocketChannel::closingTimerFired):
2054         * Modules/websockets/WebSocketDeflater.cpp:
2055         (WebCore::WebSocketDeflater::~WebSocketDeflater):
2056         (WebCore::WebSocketInflater::~WebSocketInflater):
2057         * Modules/websockets/WebSocketHandshake.cpp:
2058         (WebCore::WebSocketHandshake::readServerHandshake):
2059         * platform/network/chromium/SocketStreamHandle.cpp:
2060         (WebCore::SocketStreamHandleInternal::connect):
2061         (WebCore::SocketStreamHandleInternal::send):
2062         (WebCore::SocketStreamHandleInternal::close):
2063         (WebCore::SocketStreamHandleInternal::didOpenStream):
2064         (WebCore::SocketStreamHandleInternal::didSendData):
2065         (WebCore::SocketStreamHandleInternal::didReceiveData):
2066         (WebCore::SocketStreamHandleInternal::didClose):
2067         (WebCore::SocketStreamHandleInternal::didFail):
2068
2069 2013-04-03  Tor Arne Vestbø  <tor.arne.vestbo@digia.com>
2070
2071         [Qt] Update QMAKE_MAC_SDK check for Qt 5.1
2072
2073         Relies on QMAKE_MAC_SDK_VERSION set in features.prf
2074
2075         Reviewed by Simon Hausmann.
2076
2077         * WebCore.pri:
2078
2079 2013-04-03  Kristof Provost  <kristof@codepro.be>
2080
2081         [Qt] assignToHTMLImageElement no longer exists in Qt5
2082         https://bugs.webkit.org/show_bug.cgi?id=113639
2083
2084         Reviewed by Simon Hausmann.
2085
2086         No new tests: covered by ./Source/WebKit/qt/tests/hybridPixmap/test.html
2087
2088         * bridge/qt/qt_pixmapruntime.cpp:
2089         (JSC::Bindings::QtPixmapRuntime::getClassRef):
2090
2091 2013-04-03  Antoine Quint  <graouts@apple.com>
2092
2093         Web Inspector: crash in WebCore::InspectorLayerTreeAgent::buildObjectForLayer if a layer is created for an anonymous RenderObject (:first-letter)
2094         https://bugs.webkit.org/show_bug.cgi?id=113768
2095
2096         The InspectorLayerTreeAgent now knows how to deal with anonymous RenderObjects
2097         for the :first-letter and :first-line pseudo-elements.
2098
2099         Reviewed by Timothy Hatcher.
2100
2101         Test: inspector-protocol/layers/layers-anonymous.html
2102
2103         * inspector/Inspector.json:
2104         Change the Layer type in the LayerTree domain to have more accurate terminology
2105         (pseudo-element vs. pseudo-class) and a new optional isAnonymous flag for layers
2106         associated to anonymous RenderObjects.
2107
2108         * inspector/InspectorLayerTreeAgent.cpp:
2109         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2110         Check for anonymous RenderObjects and set the parent renderer's node as the node
2111         for this layer since anonymous renderers have the Document as their node and this
2112         would not be satisfactory to show in a front-end. We also check for anonymous
2113         RenderObjects for the :first-letter and :first-line pseudo-elements and set them
2114         in the pseudoElement property of the Layer object created such that a front-end
2115         could correctly identify what type of pseudo-element for the associated node
2116         yielded this layer.
2117
2118         (WebCore::InspectorLayerTreeAgent::idForNode):
2119         Here we fix the actual crash by first checking if the node provided is null and
2120         returning 0 if there's no such node. This ensures that any scenario where there
2121         is no node associated with the RenderObject simply informs of the front-end that
2122         no such node exists and we do not crash.
2123
2124 2013-04-03  Alexander Pavlov  <apavlov@chromium.org>
2125
2126         Web Inspector: [REGRESSION(r147117)][Elements] Copy/paste keyboard shortcuts broken in "Edit as HTML"
2127         https://bugs.webkit.org/show_bug.cgi?id=113798
2128
2129         Reviewed by Yury Semikhatsky.
2130
2131         Stop propagation of "copy" event from the multiline editor's
2132         CodeMirror host element so that it is not handled by
2133         WebInspector.documentCopy().
2134
2135         * inspector/front-end/UIUtils.js:
2136         (.consumeCopy):
2137         (.cleanUpAfterEditing):
2138         * inspector/front-end/inspector.js:
2139         (WebInspector.addMainEventListeners):
2140
2141 2013-04-03  Takashi Sakamoto  <tasak@google.com>
2142
2143         With borders of differing alpha, the corners become squared off
2144         https://bugs.webkit.org/show_bug.cgi?id=113744
2145
2146         Reviewed by Simon Fraser.
2147
2148         paintTranslucentBorderSides should pick up borders with common color
2149         in order: top, bottom, left and right (not top, right, bottom and
2150         left), because willBeOverdrawn depends on the assumption, borders are
2151         drawn in order: top, bottom, left and right.
2152
2153         Test: fast/borders/border-left-right-same-bottom-different-color.html
2154
2155         * rendering/RenderBoxModelObject.cpp:
2156         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
2157
2158 2013-04-03  Mihnea Ovidenie  <mihnea@adobe.com>
2159
2160         [New Multicolumn]Remove assert in RenderMultiColumnFlowThread::createAnonymous
2161         https://bugs.webkit.org/show_bug.cgi?id=113855
2162
2163         Reviewed by Antti Koivisto.
2164
2165         Remove CSSRegions specific assert from new multicolumn implementation.
2166         No change in functionality, no new tests.
2167
2168         * rendering/RenderMultiColumnFlowThread.cpp:
2169         (WebCore::RenderMultiColumnFlowThread::createAnonymous):
2170
2171 2013-04-03  Mike West  <mkwst@chromium.org>
2172
2173         X-Frame-Options: Blocked frames should not inherit their parent's SecurityOrigin.
2174         https://bugs.webkit.org/show_bug.cgi?id=112903
2175
2176         Reviewed by Adam Barth.
2177
2178         This change brings WebKit in line with IE and Gecko's behavior, both of
2179         which treat the blocked frame as being cross-origin for the purposes of
2180         access checks ('[frame].contentWindow.location.href' is inaccessible,
2181         for example).
2182
2183         * dom/Document.cpp:
2184         (WebCore::Document::processHttpEquiv):
2185             Rather than redirecting to 'about:blank', redirect to a URL which
2186             does not inherit the SecurityOrigin of the parent.
2187         * loader/DocumentLoader.cpp:
2188         (WebCore::DocumentLoader::responseReceived):
2189             Before calling cancelMainResourceLoad, ensure that the frame's
2190             document is sandboxed into a unique origin so that it doesn't inherit
2191             the parent's SecurityOrigin.
2192
2193 2013-04-03  Mikhail Naganov  <mnaganov@chromium.org>
2194
2195         [Chromium] Implement target-densityDpi viewport property emulation
2196         https://bugs.webkit.org/show_bug.cgi?id=110835
2197
2198         The value is only used in the Chromium port, when the corresponding
2199         setting is enabled.
2200
2201         This is needed for supporting existing WebView-based applications
2202         that rely on this property.
2203
2204         Reviewed by Adam Barth.
2205
2206         * dom/ViewportArguments.cpp:
2207         (WebCore::findTargetDensityDPIValue):
2208         (WebCore):
2209         (WebCore::setViewportFeature):
2210         * dom/ViewportArguments.h:
2211         (WebCore::ViewportArguments::ViewportArguments):
2212         (ViewportArguments):
2213         (WebCore::ViewportArguments::operator==):
2214
2215 2013-04-03  Mike West  <mkwst@chromium.org>
2216
2217         Extract URL that doesn't inherit a parent's SecurityOrigin out into a constant.
2218         https://bugs.webkit.org/show_bug.cgi?id=113780
2219
2220         Reviewed by Jochen Eisinger.
2221
2222         We're scheduling navigations to 'data:text/html,' in XSSAuditor in
2223         order to end up on a page that doesn't inherit its parent's
2224         SecurityOrigin. We'll be reusing this mechainsm to solve
2225         http://wkbug.com/112903
2226
2227         This patch makes us more explicit about what we're doing and why.
2228         It doesn't change any behavior: XSSAuditor tests should still pass.
2229
2230         * html/parser/XSSAuditorDelegate.cpp:
2231         (WebCore::XSSAuditorDelegate::didBlockScript):
2232             Use SecurityOrigin::urlWithUniqueSecurityOrigin rather than a
2233             literal string to make our intentions clear.
2234         * page/SecurityOrigin.cpp:
2235         (WebCore::SecurityOrigin::urlWithUniqueSecurityOrigin):
2236         * page/SecurityOrigin.h:
2237             Add the new static method.
2238
2239 2013-04-02  Chris Fleizach  <cfleizach@apple.com>
2240
2241         clean up static casts in WebAccessibilityObjectWrapperMac.mm to methods like toAccessibilityList()
2242         https://bugs.webkit.org/show_bug.cgi?id=113828
2243
2244         Reviewed by Tim Horton.
2245
2246         static_cast changed to toAccessibilityList().
2247
2248         * accessibility/AccessibilityList.h:
2249         (WebCore::toAccessibilityList):
2250         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2251         (-[WebAccessibilityObjectWrapper subrole]):
2252         (-[WebAccessibilityObjectWrapper roleDescription]):
2253
2254 2013-04-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2255
2256         Unreviewed, rolling out r147370.
2257         http://trac.webkit.org/changeset/147370
2258         https://bugs.webkit.org/show_bug.cgi?id=113850
2259
2260         This patch is causing crashes in video tests on all Mac bots.
2261         (Requested by jernoble_ on #webkit).
2262
2263         * html/HTMLMediaElement.cpp:
2264         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2265
2266 2013-04-02  James Craig  <james@cookiecrook.com>
2267
2268         AXRoleDescripton for DL is "list"; should be "description list"
2269         https://bugs.webkit.org/show_bug.cgi?id=111665
2270
2271         Reviewed by Chris Fleizach.
2272
2273         Defining the role and description strings, and accessors for DL.
2274         This previously relied on getting the role and description from the platform API.
2275
2276         Updated existing test coverage.
2277
2278         * English.lproj/Localizable.strings:
2279         * accessibility/AccessibilityObject.h:
2280         * accessibility/AccessibilityRenderObject.cpp:
2281         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2282         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2283         (createAccessibilityRoleMap):
2284         (-[WebAccessibilityObjectWrapper subrole]):
2285         (-[WebAccessibilityObjectWrapper roleDescription]):
2286         * platform/LocalizedStrings.cpp:
2287         (WebCore::AXDescriptionListText):
2288         (WebCore):
2289         * platform/LocalizedStrings.h:
2290         (WebCore):
2291         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2292         (WebCore::AXDescriptionListText):
2293         (WebCore):
2294         * platform/chromium/LocalizedStringsChromium.cpp:
2295         (WebCore::AXDescriptionListText):
2296         (WebCore):
2297         * platform/efl/LocalizedStringsEfl.cpp:
2298         (WebCore::AXDescriptionListText):
2299         (WebCore):
2300         * platform/gtk/LocalizedStringsGtk.cpp:
2301         (WebCore::AXDescriptionListText):
2302         (WebCore):
2303         * platform/qt/LocalizedStringsQt.cpp:
2304         (WebCore::AXDescriptionListText):
2305         (WebCore):
2306
2307 2013-04-02  Eugene Klyuchnikov  <eustas@chromium.org>
2308
2309         Web Inspector: [Network] Split business logic and presentation for initiator column.
2310         https://bugs.webkit.org/show_bug.cgi?id=113486
2311
2312         Reviewed by Pavel Feldman.
2313
2314         Currently business logic and presentation are mixed.
2315         This prevents making cell renderer static and applying
2316         viewport rendering, because initiator sorting function
2317         depends on data written when cell is rendered.
2318
2319         * inspector/front-end/NetworkPanel.js:
2320         (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
2321         Removed business logic. Use "initiatorInfo".
2322         (WebInspector.NetworkDataGridNode.InitiatorComparator):
2323         Use "initiatorInfo".
2324         * inspector/front-end/NetworkRequest.js:
2325         (WebInspector.NetworkRequest.prototype.initiatorInfo):
2326         Extracted business logic from "refreshInitiatorCell".
2327
2328 2013-04-02  Ryosuke Niwa  <rniwa@webkit.org>
2329
2330         needsLeopardMailQuirks should be removed
2331         https://bugs.webkit.org/show_bug.cgi?id=113749
2332
2333         Reviewed by Benjamin Poulain.
2334
2335         Removed needsLeopardMailQuirks from settings.in after r147447.
2336
2337         * page/Settings.in:
2338
2339 2013-04-02  Jaehun Lim  <ljaehun.lim@samsung.com>
2340
2341         [css3-text] Rendering -webkit-each-line value for text-indent from css3-text
2342         https://bugs.webkit.org/show_bug.cgi?id=113259
2343
2344         Reviewed by Levi Weintraub.
2345
2346         CSS3 TEXT introduces new value, "each-line" for text-indent.
2347         Indentation affects the first line of the block container as well as each line
2348         after a forced line break, but does not affect lines after a soft wrap break.
2349
2350         This patch is the rendering part to support each-line value for text-indent.
2351         It's prefixed and guarded by CSS3_TEXT flag.
2352
2353         Test: fast/css3-text/css3-text-indent/text-indent-each-line.html
2354
2355         * rendering/RenderBlock.h:
2356         (WebCore::RenderBlock::availableLogicalWidthForLine):
2357         (WebCore::RenderBlock::logicalRightOffsetForLine):
2358         (WebCore::RenderBlock::logicalLeftOffsetForLine):
2359         (WebCore::RenderBlock::startOffsetForLine):
2360         (WebCore::RenderBlock::endOffsetForLine):
2361         (WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine):
2362         (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine):
2363             Rename a parameter from firstLine to shouldIndentText.
2364
2365         * rendering/RenderBlockLineLayout.cpp:
2366         (WebCore::LineWidth::LineWidth):
2367         (WebCore::LineWidth::shouldIndentText): Return boolean according to m_shouldIndentText.
2368         (WebCore::LineWidth::updateAvailableWidth):
2369         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2370         (WebCore::LineWidth::fitBelowFloats):
2371             Add enum IndentTextOrNot and m_shouldIndentText.
2372             Use m_shouldIndentText instead of m_isFirstLine.
2373
2374         (WebCore::requiresIndent): Decide whether text indentation is required.
2375         (WebCore::updateLogicalInlinePositions):
2376         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
2377         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2378
2379 2013-04-02  Glenn Adams  <glenn@skynav.com>
2380
2381         Generalize prior line break context state and names.
2382         https://bugs.webkit.org/show_bug.cgi?id=113823
2383
2384         Reviewed by Darin Adler.
2385
2386         No new tests required due to no behavioral change.
2387
2388         * platform/text/TextBreakIterator.h:
2389         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
2390         (WebCore::LazyLineBreakIterator::lastCharacter):
2391         (WebCore::LazyLineBreakIterator::secondToLastCharacter):
2392         (WebCore::LazyLineBreakIterator::setPriorContext):
2393         (WebCore::LazyLineBreakIterator::updatePriorContext):
2394         (WebCore::LazyLineBreakIterator::resetPriorContext):
2395         (WebCore::LazyLineBreakIterator::resetStringAndReleaseIterator):
2396         Store previous characters as prior context buffer used directly
2397         by line break iterator implementation. Rename members to reflect
2398         somewhat more general usage. Also fix bad indentations.
2399         * rendering/RenderBlockLineLayout.cpp:
2400         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2401         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2402         Use renamed line break iterator methods.
2403
2404 2013-04-02  Emil A Eklund  <eae@chromium.org>
2405
2406         Padding applied twice for empty generated RenderInlines
2407         https://bugs.webkit.org/show_bug.cgi?id=113800
2408
2409         Reviewed by Levi Weintraub.
2410         
2411         The padding for empty generated content render objects is
2412         incorrectly applied twice. Regression from r140693.
2413
2414         Test: fast/css-generated-content/margin-empty-content.html
2415
2416         * rendering/RenderBlockLineLayout.cpp:
2417         (WebCore::inlineLogicalWidth):
2418
2419 2013-04-02  Levi Weintraub  <leviw@chromium.org>
2420
2421         InlineIterator needs to be updated when RenderCombineText shrinks at a line break
2422         https://bugs.webkit.org/show_bug.cgi?id=113733
2423
2424         Reviewed by Emil A Eklund.
2425
2426         Update stale InlineIterators that point beyond the end of a RenderCombineText that's
2427         shrunk when RenderCombineText::combineText() is called.
2428
2429         Test: fast/text/international/combine-at-line-break-crash.html
2430
2431         * rendering/BidiRun.h:
2432         (WebCore::BidiRun::BidiRun): Adding an assertion that runs are created within
2433         the bounds of their associated RenderText.
2434         * rendering/RenderBlockLineLayout.cpp:
2435         (WebCore::iteratorIsBeyondEndOfRenderCombineText): Added.
2436         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Update stale iterators.
2437
2438 2013-04-02  Max Vujovic  <mvujovic@adobe.com>
2439
2440         [CSS Filters] Filter outsets clipped on composited layers when filter is applied after first layout
2441         https://bugs.webkit.org/show_bug.cgi?id=109098
2442
2443         Reviewed by Dean Jackson.
2444
2445         This patch addresses the following issues:
2446         (1) Compositors who can compute their own filter outsets don't need WebKit to inflate the
2447             composited layer bounds. Eventually, all platforms' compositors should be able to
2448             compute their own filter outsets.
2449         (2) When filter outsets change, we need to update composited layer bounds if the filters are
2450             painted in software.
2451         (3) When filter outsets change, we need to recompute the overlap map to promote the correct
2452             layers to composited layers on all platforms.
2453
2454         Tests: css3/filters/composited-layer-bounds-after-sw-blur-animation.html
2455                css3/filters/composited-layer-bounds-with-composited-blur.html
2456                css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html
2457                css3/filters/composited-layer-promotion-after-outset-overlap-change-using-composited-shadow.html
2458                css3/filters/composited-layer-promotion-after-outset-overlap-change-using-sw-shadow.html
2459
2460         * platform/graphics/IntRectExtent.h:
2461         (WebCore::IntRectExtent::isZero):
2462         (IntRectExtent):
2463
2464             Make isZero public on IntRectExtent.
2465
2466         * rendering/RenderLayer.cpp:
2467         (WebCore::hasOrHadFilters):
2468
2469             Helper function used to exit early from filters related code.
2470
2471         (WebCore::RenderLayer::updateFilters):
2472
2473             Move filter updating code from RenderLayer::styleChanged into this new method.
2474
2475             This method calls RenderLayerBacking::updateFilters instead of
2476             RenderLayerBacking::updateGraphicsLayerGeometry. RenderLayerBacking::updateFilters lets
2477             us know whether there was a filter paint mode change (i.e. the filters were painted in
2478             software and are now painted in the compositor, or vice-versa). We need to know this
2479             earlier, in RenderLayer::styleChanged, because we may need to rebuild the compositing
2480             layers due to a filter paint mode change.
2481
2482         (WebCore::RenderLayer::styleChanged):
2483
2484             Add a condition for filters for setCompositingLayersNeedRebuild. If the filter outsets
2485             on a layer changed, we need to rebuild the compositing layers because there could be new
2486             overlap. Likewise, if there are or were filter outsets and the filter paint mode changed
2487             the layer bounds (and child positions) may have changed. In either case, we don't
2488             rebuild the compositing layers if there is an accelerated filter animation running.
2489
2490             Remove old code to detect a filter paint mode change from the end of
2491             RenderLayer::styleChanged because it could never be executed. The old code counted on
2492             RenderLayerBacking::canCompositeFilters to change on its own, but it doesn't change
2493             unless updateFilters gets called. Thus, we could never enter the if statement that
2494             calls setBackingNeedsRepaint.
2495
2496         * rendering/RenderLayerBacking.cpp:
2497         (WebCore::RenderLayerBacking::updateFilters):
2498
2499             Now return true if there was a filter paint mode change, so RenderLayer::styleChanged
2500             can decide if it should rebuild the compositing layers.
2501
2502             Call updateOrRemoveFilterEffectRenderer and setContentsNeedDisplay if there was a
2503             render mode change. We need to either destroy or create the software renderer and we
2504             need to repaint the layer contents if there was a render mode change.
2505
2506         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2507
2508             Don't call updateFilters here. Call it earlier in RenderLayer::styleChanged, for reasons
2509             explained above.
2510
2511         * rendering/RenderLayerBacking.h:
2512         (RenderLayerBacking):
2513
2514             Make updateFilters public so RenderLayer::styleChanged can call it.
2515
2516         * rendering/RenderLayerCompositor.cpp:
2517         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
2518
2519             If the platform's compositor computes filter outsets for its layers internally, do not
2520             inflate WebKit's composited bounds for filter outsets. This results in smaller layers
2521             on Safari. Note that we still need to include filter outsets in layer bounds for other
2522             situations like overlap testing in WebKit and when we're painting filters in software.
2523
2524 2013-04-02  Martin Robinson  <mrobinson@igalia.com>
2525
2526         [GTK] Make libsecret optional
2527         https://bugs.webkit.org/show_bug.cgi?id=113821
2528
2529         Reviewed by Gustavo Noronha Silva.
2530
2531         Don't try to use libsecret if credential storage is disabled.
2532
2533         * platform/gtk/GRefPtrGtk.cpp: Protect libsecret sections.
2534         * platform/gtk/GRefPtrGtk.h: Ditto.
2535         * platform/network/gtk/CredentialBackingStore.cpp: Ditto.
2536
2537 2013-04-02  Bem Jones-Bey  <bjonesbe@adobe.com>
2538
2539         [CSS Exclusions] refactor shape-outside code to use isFloatingWithShapeOutside() helper method
2540         https://bugs.webkit.org/show_bug.cgi?id=113799
2541
2542         Reviewed by Dirk Schulze.
2543
2544         When reviewing my patch for bug 110349, Julien mentioned that the
2545         common test for floating with shape outside should be factored out.
2546         This patch does that.
2547
2548         No new functionality, so no new tests.
2549
2550         * rendering/ExclusionShapeOutsideInfo.cpp:
2551         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Use helper method.
2552         * rendering/RenderBox.h:
2553         (WebCore::RenderBox::exclusionShapeOutsideInfo): Ditto.
2554         * rendering/RenderLayer.cpp:
2555         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
2556         * rendering/RenderObject.h:
2557         (WebCore::RenderObject::hasPaintOffset):  Ditto.
2558         (WebCore::RenderObject::isFloatingWithShapeOutside): Add method to
2559             encapsulate the common test.
2560
2561 2013-04-02  Jer Noble  <jer.noble@apple.com>
2562
2563         Add platform AudioSession and iOS platform-specific code.
2564         https://bugs.webkit.org/show_bug.cgi?id=113813
2565         <rdar://problem/11701792>
2566
2567         Reviewed by Eric Carlson.
2568
2569         Replace the deprecated AudioToolbox AudioSession APIs with the new AVAudioSession API.
2570         To protect against exposing platform specific intrinsics to cross-platform code, add a
2571         platform generic class AudioSession, with port-specific implementations. A default
2572         implementation is provided.
2573
2574         Add a new listener interface to receive interruption notifications:
2575         * platform/audio/AudioSessionListener.h: Added.
2576         (WebCore::AudioSessionListener::AudioSessionListener):
2577         (WebCore::AudioSessionListener::~AudioSessionListener):
2578
2579         Add a platform generic AudioSession class:
2580         * platform/audio/AudioSession.cpp: Added.
2581         (AudioSession::sharedSession): AudioSession is a singleton object, and this is its accessor.
2582         (AudioSession::addListener): Add the parameter to the listeners set.
2583         (AudioSession::removeListener): Remove the parameter from the listers set.
2584         (AudioSession::beganAudioInterruption): Iterate over the parameters.
2585         (AudioSession::endedAudioInterruption): Ditto.
2586         (AudioSession::AudioSession): Empty stub.
2587         (AudioSession::~AudioSession): Ditto.
2588         (AudioSession::setCategory): Ditto.
2589         (AudioSession::category): Ditto.
2590         (AudioSession::sampleRate): Ditto.
2591         (AudioSession::numberOfOutputChannels): Ditto.
2592         (AudioSession::setActive): Ditto.
2593         (AudioSession::preferredBufferDuration): Ditto.
2594         (AudioSession::setPreferredBufferDuration): Ditto.
2595         * platform/audio/AudioSession.h: Added.
2596
2597         Add IOS-specific AudioSession implementation:
2598         * platform/audio/ios/AudioSessionIOS.mm: Added.
2599         (-[WebAudioSessionHelper initWithCallback:WebCore::]): Register for interruption notifications.
2600         (-[WebAudioSessionHelper dealloc]): Unregister for interruption notifications.
2601         (-[WebAudioSessionHelper interruption:]): Pass to AudioSession.
2602         (WebCore::AudioSessionPrivate::AudioSessionPrivate): Private storage for AudioSessionIOS.
2603         (WebCore::AudioSession::AudioSession): Create AudioSessionPrivate and WebAudioSessionHelper.
2604         (WebCore::AudioSession::~AudioSession): Simple destructor.
2605         (WebCore::AudioSession::setCategory): Check the current categoryOverride, and refuse to overwrite
2606             "MediaPlayback" with "AmbientSound".
2607         (WebCore::AudioSession::setCategoryOverride): Simple setter.
2608         (WebCore::AudioSession::categoryOverride): Simple getter.
2609         (WebCore::AudioSession::category): Pass to AVAudioSession.
2610         (WebCore::AudioSession::sampleRate): Ditto.
2611         (WebCore::AudioSession::numberOfOutputChannels): Ditto.
2612         (WebCore::AudioSession::setActive): Ditto.
2613         (WebCore::AudioSession::preferredBufferDuration): Ditto.
2614         (WebCore::AudioSession::setPreferredBufferDuration): Ditto.
2615
2616         Use the new AudioSession class in place of explicit AudioToolbox or AVAudioSession calls:
2617         * platform/audio/ios/AudioDestinationIOS.cpp:
2618         (WebCore::AudioDestination::hardwareSampleRate): Pass to AudioSession.
2619         (WebCore::AudioDestination::maxChannelCount): Ditto.
2620         (WebCore::AudioDestinationIOS::AudioDestinationIOS): Register for listeners and activate.
2621         (WebCore::AudioDestinationIOS::~AudioDestinationIOS): Unregister and deactivate.
2622         (WebCore::AudioDestinationIOS::configure): Use AudioSession to set the buffer length.
2623         * platform/audio/ios/AudioDestinationIOS.h:
2624
2625         Add the new files to the project:
2626         * WebCore.xcodeproj/project.pbxproj:
2627
2628 2013-04-02  Jer Noble  <jer.noble@apple.com>
2629
2630         Upstream AudioDestinationIOS.
2631         https://bugs.webkit.org/show_bug.cgi?id=113806
2632
2633         Reviewed by Eric Carlson.
2634
2635         Upstream AudioDestinationIOS from the iOS repository.
2636
2637         * WebCore.xcodeproj/project.pbxproj:
2638         * platform/audio/ios/AudioDestinationIOS.cpp: Added.
2639         (WebCore::audioDestinations):
2640         (WebCore::AudioDestination::create):
2641         (WebCore::AudioDestination::hardwareSampleRate):
2642         (WebCore::AudioDestination::maxChannelCount):
2643         (WebCore::AudioDestinationIOS::AudioDestinationIOS):
2644         (WebCore::AudioDestinationIOS::~AudioDestinationIOS):
2645         (WebCore::AudioDestinationIOS::configure):
2646         (WebCore::AudioDestinationIOS::audioDestinationInterruptionListener):
2647         (WebCore::AudioDestinationIOS::initializeAudioSession):
2648         (WebCore::AudioDestinationIOS::start):
2649         (WebCore::AudioDestinationIOS::stop):
2650         (WebCore::AudioDestinationIOS::beganAudioInterruption):
2651         (WebCore::AudioDestinationIOS::endedAudioInterruption):
2652         (WebCore::AudioDestinationIOS::render):
2653         (WebCore::AudioDestinationIOS::inputProc):
2654         (WebCore::AudioDestinationIOS::frameSizeChangedProc):
2655         * platform/audio/ios/AudioDestinationIOS.h: Added.
2656         (AudioDestinationIOS):
2657         (WebCore::AudioDestinationIOS::isPlaying):
2658         (WebCore::AudioDestinationIOS::sampleRate):
2659
2660 2013-04-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2661
2662         fast/dom/HTMLImageElement/image-alt-text.html and fast/dom/HTMLInputElement/input-image-alt-text.html are failing
2663         https://bugs.webkit.org/show_bug.cgi?id=94198
2664
2665         Reviewed by Darin Adler.
2666
2667         Fix alt text not being displayed for img elements or input of type
2668         "image" due to insufficient size. imageSizeForError() was adding
2669         padding for the alt text but setImageSizeForAltText() was not. The
2670         issue was occurring in paintReplaced() because the contentWidth() /
2671         contentHeight() would be exactly the same size as the alt text.
2672         However, paintReplaced() first draws an outline rect where the
2673         image should be and then reduces the usable width / height for the
2674         alt text by 2 so that the text does not get printed over the rect
2675         borders. However, after decreasing the usable width / height, there
2676         is no longer enough space to draw the text.
2677
2678         No new tests, already covered by existing tests.
2679
2680         * rendering/RenderImage.cpp:
2681         (WebCore::RenderImage::setImageSizeForAltText): Add padding to the text size
2682         so that the alt text can still be drawn, despite the outline rect
2683         borders. Such padding was already used in imageSizeForError(). Also use
2684         ceilf() for the value returned by Font::width() instead of truncating it.
2685         This is needed because we need to fit the whole text in the image and this
2686         may not be the case if we truncate.
2687         (WebCore::RenderImage::paintReplaced):
2688
2689 2013-04-02  Raymond Toy  <rtoy@google.com>
2690
2691         Add support for using ARM FFT in WebAudio
2692         https://bugs.webkit.org/show_bug.cgi?id=109755
2693
2694         Reviewed by Chris Rogers.
2695
2696         No new tests.
2697
2698         * WebCore.gyp/WebCore.gyp: Add dependency on openmax_dl when use_openmax_dl_fft is enabled.
2699         * WebCore.gypi: Add source FFTFrameOpenMAXDLAndroid.cpp
2700         * platform/audio/AudioArray.h:
2701         (WebCore::AudioArray::allocate): Need 32-byte aligntment with the
2702         OpenMAX DL FFT.
2703         * platform/audio/FFTFrame.h:
2704         (FFTFrame): Support OpenMAX DL FFT
2705         * platform/audio/FFTFrameStub.cpp: Support OpenMAX DL FFT
2706         * platform/audio/chromium/FFTFrameOpenMAXDLAndroid.cpp: Added.  Implements the
2707         necessary interface using the OpenMAX DL FFT routines.
2708         (WebCore):
2709         (WebCore::FFTFrame::FFTFrame):
2710         (WebCore::FFTFrame::initialize):
2711         (WebCore::FFTFrame::cleanup):
2712         (WebCore::FFTFrame::~FFTFrame):
2713         (WebCore::FFTFrame::multiply):
2714         (WebCore::FFTFrame::doFFT):
2715         (WebCore::FFTFrame::doInverseFFT):
2716         (WebCore::FFTFrame::realData):
2717         (WebCore::FFTFrame::imagData):
2718         (WebCore::FFTFrame::contextForSize):
2719
2720 2013-04-02  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
2721
2722         [GStreamer] Memory leaks in MediaPlayerPrivateGStreamer
2723         https://bugs.webkit.org/show_bug.cgi?id=113762
2724
2725         Reviewed by Philippe Normand.
2726
2727         Don't leak strings returned by gst_element_get_name() and
2728         gst_missing_plugin_message_get_installer_detail().
2729
2730         No new tests. No change in behavior.
2731
2732         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2733         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
2734         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2735
2736 2013-04-02  Min Qin  <qinmin@chromium.org>
2737
2738         Fix css style for CC button on android
2739         https://bugs.webkit.org/show_bug.cgi?id=113815
2740
2741         Reviewed by Adam Barth.
2742
2743         The default CC button size is 16px as defined in mediaControls.css. Android should use 35px.
2744         This change fixed that problem.
2745         Also fixed a problem that r142947 does not change the display of fullscreen button to -webkit-flex
2746         Android does not run media layout tests currently. Will fix the test expectations when layout tests are run in content shell.
2747
2748         * css/mediaControlsChromiumAndroid.css:
2749         (video::-webkit-media-controls-fullscreen-button):
2750         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
2751
2752 2013-04-02  Alexey Proskuryakov  <ap@apple.com>
2753
2754         [Mac] Remove WKCreateNSURLConnectionDelegateProxy
2755         https://bugs.webkit.org/show_bug.cgi?id=113810
2756
2757         Reviewed by Anders Carlsson.
2758
2759         This WKSI function is not used any more.
2760
2761         * WebCore.exp.in:
2762         * platform/mac/WebCoreSystemInterface.h:
2763         * platform/mac/WebCoreSystemInterface.mm:
2764
2765 2013-04-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2766
2767         Unreviewed, rolling out r147464.
2768         http://trac.webkit.org/changeset/147464
2769         https://bugs.webkit.org/show_bug.cgi?id=113812
2770
2771         JSSQLResultSet.cpp:131:24: error: implicit conversion loses
2772         integer precision: 'int64_t' (aka 'long long') to 'int'
2773         [-Werror,-Wshorten-64-to-32] (Requested by xenon on #webkit).
2774
2775         * bindings/scripts/CodeGeneratorJS.pm:
2776         (GenerateImplementation):
2777         * bindings/scripts/test/JS/JSTestObj.cpp:
2778         (WebCore::jsTestObjAttrWithGetterException):
2779         (WebCore::jsTestObjStringAttrWithGetterException):
2780         (WebCore::jsTestObjWithScriptStateAttributeRaises):
2781         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
2782         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2783         (WebCore::jsTestObjNullableDoubleAttribute):
2784         (WebCore::jsTestObjNullableLongAttribute):
2785         (WebCore::jsTestObjNullableBooleanAttribute):
2786         (WebCore::jsTestObjNullableStringAttribute):
2787         (WebCore::jsTestObjNullableLongSettableAttribute):
2788         (WebCore::jsTestObjNullableStringValue):
2789         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2790         (WebCore::jsTestTypedefsAttrWithGetterException):
2791         (WebCore::jsTestTypedefsStringAttrWithGetterException):
2792
2793 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
2794
2795         Web Inspector: Make Source Frame & status bar a layout boundary
2796         https://bugs.webkit.org/show_bug.cgi?id=112353
2797
2798         Reviewed by Pavel Feldman.
2799
2800         No new tests: no change in behaviour.
2801
2802         - Add View.markAsLayoutBoundary method to mark a view as a layout
2803         boundary. This will force this view to autoupdate its height to actual
2804         pixel value.
2805         - Mark both CodeMirrorTextEditor and DefaultTextEditor as a layout
2806         boundary.
2807         - Mark main-status-bar element with a layout-boundary class.
2808
2809         * inspector/front-end/CodeMirrorTextEditor.js:
2810         (WebInspector.CodeMirrorTextEditor):
2811         * inspector/front-end/DefaultTextEditor.js:
2812         * inspector/front-end/View.js:
2813         (WebInspector.View.prototype.markAsLayoutBoundary):
2814         (WebInspector.View.prototype._processWillShow):
2815         (WebInspector.View.prototype._processWasShown):
2816         (WebInspector.View.prototype._processOnResize):
2817         * inspector/front-end/inspector.css:
2818         (.layout-boundary):
2819         * inspector/front-end/inspector.html:
2820
2821 2013-04-02  Alexey Proskuryakov  <ap@apple.com>
2822
2823         <rdar://problem/13551119> [WK2] Crashes in NetworkProcess when canceling loads
2824         https://bugs.webkit.org/show_bug.cgi?id=113803
2825
2826         Reviewed by Darin Adler.
2827
2828         Stop using a delegate proxy. It hasn't been needed in years, and the extra layer
2829         just adds bugs.
2830
2831         This specific issue gets fixed because connection retains its delegate is retained,
2832         but a proxy does not.
2833
2834         * WebCore.exp.in:
2835         * platform/network/ResourceHandle.h:
2836         * platform/network/ResourceHandleInternal.h:
2837         * platform/network/mac/ResourceHandleMac.mm:
2838         (WebCore::ResourceHandle::start):
2839         (WebCore::ResourceHandle::releaseDelegate):
2840         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
2841         Removed code that was dealing with delegate proxy.
2842
2843 2013-04-02  John J. Barton  <johnjbarton@chromium.org>
2844
2845         Web Inspector: Encapsulate SetEmbedderData/GetEmbedderData
2846         https://bugs.webkit.org/show_bug.cgi?id=113331
2847
2848         Reviewed by Pavel Feldman.
2849
2850         Refactor to encapsulate uses of V8 Set/GetEmbedderData together
2851         with uses of V8 Set/GetAlignedPointerInEmbedderData since these
2852         functions operate on the same underyling array in V8.
2853
2854         * bindings/v8/ScriptController.cpp:
2855         (WebCore::ScriptController::setContextDebugId):
2856         (WebCore::ScriptController::contextDebugId):
2857         * bindings/v8/V8DOMWindowShell.cpp:
2858         (WebCore::setInjectedScriptContextDebugId):
2859         * bindings/v8/V8PerContextData.cpp:
2860         (WebCore::V8PerContextDebugData::setContextDebugData):
2861         (WebCore):
2862         (WebCore::V8PerContextDebugData::contextDebugId):
2863         (WebCore::V8PerContextDebugData::createDebugData):
2864         (WebCore::V8PerContextDebugData::getDebugData):
2865         (WebCore::V8PerContextDebugData::setDebugData):
2866         * bindings/v8/V8PerContextData.h:
2867         (V8PerContextDebugData):
2868         (WebCore):
2869
2870 2013-04-02  Alexei Filippov  <alph@chromium.org>
2871
2872         Web Inspector: Adjust toolbar labels position
2873         https://bugs.webkit.org/show_bug.cgi?id=113805
2874
2875         Reviewed by Pavel Feldman.
2876
2877         Move the labels 1px up to make them centered.
2878         Also fix font centering in native memory distribution snapshot.
2879
2880         * inspector/front-end/inspector.css:
2881         (.toolbar-label):
2882         * inspector/front-end/nativeMemoryProfiler.css:
2883         (.native-snapshot-view .data-grid td):
2884
2885 2013-04-02  Beth Dakin  <bdakin@apple.com>
2886
2887         Viewport constrained elements should work properly with headers and footers
2888         https://bugs.webkit.org/show_bug.cgi?id=113743
2889
2890         Reviewed by Simon Fraser.
2891
2892         ScrollableArea::constrainScrollPositionForOverhang() needs to take headerHeight 
2893         and footerHeight into account. It also needs to use totalContentsSize() instead of 
2894         contentsSize().
2895
2896         Send totalContentsSize() instead of contentsSize() and also send headerHeight() 
2897         and footerHeight().
2898         * page/FrameView.cpp:
2899         (WebCore::FrameView::scrollOffsetForFixedPosition):
2900         * page/FrameView.h:
2901         (FrameView):
2902
2903         The scrolling tree will also need to know about header and footer heights since it 
2904         will need these values to call 
2905         ScrollableArea::constrainScrollPositionForOverhang().
2906         * page/scrolling/ScrollingStateScrollingNode.cpp:
2907         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2908         (WebCore::ScrollingStateScrollingNode::setHeaderHeight):
2909         (WebCore::ScrollingStateScrollingNode::setFooterHeight):
2910         * page/scrolling/ScrollingStateScrollingNode.h:
2911         (WebCore::ScrollingStateScrollingNode::headerHeight):
2912         (ScrollingStateScrollingNode):
2913         (WebCore::ScrollingStateScrollingNode::footerHeight):
2914         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2915         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
2916         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2917         * page/scrolling/ScrollingTreeScrollingNode.h:
2918         (WebCore::ScrollingTreeScrollingNode::headerHeight):
2919         (WebCore::ScrollingTreeScrollingNode::footerHeight):
2920         (ScrollingTreeScrollingNode):
2921         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2922         (ScrollParameters):
2923         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2924         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2925         (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
2926         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2927         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2928
2929         Use footerHeight when calculating the maxValue and use headerHeight in determining 
2930         what the minimum value is. 
2931         * platform/ScrollableArea.cpp:
2932         (WebCore::constrainedScrollPosition):
2933         (WebCore::ScrollableArea::constrainScrollPositionForOverhang):
2934         * platform/ScrollableArea.h:
2935         (ScrollableArea):
2936
2937 2013-04-02  Stephen White  <senorblanco@chromium.org>
2938
2939         [Skia] Enable GPU-accelerated Skia path for FEComposite filter.
2940         https://bugs.webkit.org/show_bug.cgi?id=113797
2941
2942         Reviewed by Adrienne Walker.
2943
2944         Tests: css3/filters/effect-reference-composite-hw.html
2945                css3/filters/effect-reference-composite.html
2946
2947         * WebCore.gypi:
2948         * platform/graphics/filters/FEComposite.h:
2949         Enable Skia DAG hook for FEComposite.
2950         * platform/graphics/filters/skia/FECompositeSkia.cpp: Added.
2951         (WebCore::FEComposite::createImageFilter):
2952         Implement skia DAG builder for FEComposite, and implement generic
2953         skia version of composite filter.
2954
2955 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
2956
2957         Web Inspector: Avoid using style.display="inline-block"
2958         https://bugs.webkit.org/show_bug.cgi?id=113802
2959
2960         Reviewed by Pavel Feldman.
2961
2962         No new tests.
2963
2964         - Create class "inline-block" which will set "display: inline-block"
2965         style.
2966         - Use this class with DIV elements to get "inline-block" element.
2967
2968         * inspector/front-end/ObjectPopoverHelper.js:
2969         (WebInspector.ObjectPopoverHelper.prototype.):
2970         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
2971         * inspector/front-end/ScriptsPanel.js:
2972         (WebInspector.ScriptsPanel):
2973         * inspector/front-end/inspector.css:
2974         (.inline-block):
2975
2976 2013-04-02  Andrey Kosyakov  <caseq@chromium.org>
2977
2978         Web Inspector: [Timeline] warning markers are not propagated to coalesced records
2979         https://bugs.webkit.org/show_bug.cgi?id=113789
2980
2981         Reviewed by Pavel Feldman.
2982
2983         Test: inspector/timeline/timeline-coalescing.html
2984
2985         * inspector/front-end/TimelinePresentationModel.js: set childHasWarning on coalescing record if the record it replaces had warnings.
2986         (WebInspector.TimelinePresentationModel.prototype._replaceWithCoalescedRecord):
2987
2988 2013-04-02  Yury Semikhatsky  <yurys@chromium.org>
2989
2990         Web Inspector: memory instrumentation for external strings is broken
2991         https://bugs.webkit.org/show_bug.cgi?id=113788
2992
2993         Reviewed by Pavel Feldman.
2994
2995         Native memory snapshot now provides information about JS external strings.
2996
2997         Test: inspector/profiler/memory-instrumentation-external-string.html
2998
2999         * inspector/InspectorMemoryAgent.cpp:
3000
3001 2013-04-02  Yury Semikhatsky  <yurys@chromium.org>
3002
3003         Web Inspector: memory instrumentation for external arrays is broken
3004         https://bugs.webkit.org/show_bug.cgi?id=113790
3005
3006         Report pointers to external arrays as retaining ones to make sure their
3007         size is counted correctly.
3008
3009         Reviewed by Pavel Feldman.
3010
3011         Test: inspector/profiler/memory-instrumentation-external-array.html
3012
3013         * inspector/InspectorMemoryAgent.cpp:
3014
3015 2013-04-02  Peter Beverloo  <peter@chromium.org>
3016
3017         [JSC] Don't create a JSValue if it's not going to be used for nullable attributes
3018         https://bugs.webkit.org/show_bug.cgi?id=112711
3019
3020         Reviewed by Sam Weinig.
3021
3022         When nullable attributes are used, it's possible that we disregard the JSValue
3023         when null should be returned instead. This is a waste, and we should cast the
3024         native type to a JSValue as late as possible.
3025
3026         * bindings/scripts/CodeGeneratorJS.pm:
3027         (GenerateImplementation):
3028         (NativeValueToLocal):
3029         * bindings/scripts/test/JS/JSTestObj.cpp:
3030         (WebCore::jsTestObjAttrWithGetterException):
3031         (WebCore::jsTestObjStringAttrWithGetterException):
3032         (WebCore::jsTestObjWithScriptStateAttributeRaises):
3033         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
3034         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3035         (WebCore::jsTestObjNullableDoubleAttribute):
3036         (WebCore::jsTestObjNullableLongAttribute):
3037         (WebCore::jsTestObjNullableBooleanAttribute):
3038         (WebCore::jsTestObjNullableStringAttribute):
3039         (WebCore::jsTestObjNullableLongSettableAttribute):
3040         (WebCore::jsTestObjNullableStringValue):
3041         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3042         (WebCore::jsTestTypedefsAttrWithGetterException):
3043         (WebCore::jsTestTypedefsStringAttrWithGetterException):
3044
3045 2013-04-02  Bem Jones-Bey  <bjonesbe@adobe.com>
3046
3047         [css exclusions] overflow:hidden undoes shape-outside offsets
3048         https://bugs.webkit.org/show_bug.cgi?id=110349
3049
3050         Reviewed by Julien Chaffraix.
3051
3052         When overflow: hidden was set on a float with shape-outside, the
3053         offset from the shape-outside was being ignored. This was because the
3054         float was being placed in the normal flow, causing the offsets to be
3055         calculated differently. Since floats with shape outside behave like
3056         positioned objects in many places, I have caused them to take the same
3057         behavior as positioned objects in this case as well: the floats with
3058         shape-outside do not get placed in the normal flow when overflow:
3059         hidden is set.
3060
3061         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overflow-hidden.html
3062
3063         * rendering/RenderLayer.cpp:
3064         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Floats that have
3065             shape-outside should not be in the normal flow.
3066
3067 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
3068
3069         Web Inspector: resource preview of html/js/css types should be on a grey background
3070         https://bugs.webkit.org/show_bug.cgi?id=113791
3071
3072         Reviewed by Pavel Feldman.
3073
3074         No new tests.
3075
3076         - Add a css rule to set grey background for SourceFrame in resource view.
3077         - Add "fill" style to SourceFrame element to setup its height.
3078
3079         * inspector/front-end/SourceFrame.js:
3080         (WebInspector.SourceFrame):
3081         * inspector/front-end/resourceView.css:
3082         (.resource-view .script-view):
3083
3084 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
3085
3086         Web Inspector: [CodeMirror] Editor doesn't have yellow background in DivergedFromVM state
3087         https://bugs.webkit.org/show_bug.cgi?id=113783
3088
3089         Reviewed by Pavel Feldman.
3090
3091         No new tests.
3092
3093         Force CodeMirrorTextEditor to have transparent background to inherit
3094         background color from source frame.
3095
3096         * inspector/front-end/cm/cmdevtools.css:
3097         (.CodeMirror):
3098
3099 2013-04-02  Jochen Eisinger  <jochen@chromium.org>
3100
3101         Check whether popups are allowed before creating a new window
3102         https://bugs.webkit.org/show_bug.cgi?id=113782
3103
3104         Reviewed by Adam Barth.
3105
3106         Otherwise, firing a generated mouse event at an anchor is enough to
3107         work around the popup blocker.
3108
3109         Test: fast/loader/url-selected-user-gesture.html
3110
3111         * loader/PolicyChecker.cpp:
3112         (WebCore::PolicyChecker::checkNewWindowPolicy):
3113
3114 2013-04-02  Jochen Eisinger  <jochen@chromium.org>
3115
3116         When computing the percentage of the logical height, use the logical top and bottom
3117         https://bugs.webkit.org/show_bug.cgi?id=113761
3118
3119         Reviewed by Ojan Vafai.
3120
3121         Test: fast/writing-mode/percentage-height-orthogonal-writing-modes.html
3122
3123         * rendering/RenderBox.cpp:
3124         (WebCore::RenderBox::computePercentageLogicalHeight):
3125
3126 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
3127
3128         Web Inspector: [CodeMirror] do not show cursor in read-only mode
3129         https://bugs.webkit.org/show_bug.cgi?id=113793
3130
3131         Reviewed by Alexander Pavlov.
3132
3133         No new tests.
3134
3135         Pass "nocursor" option to CodeMirror's "readonly" setting.
3136
3137         * inspector/front-end/CodeMirrorTextEditor.js:
3138         (WebInspector.CodeMirrorTextEditor.prototype.setReadOnly):
3139
3140 2013-04-02  Nate Chapin  <japhet@chromium.org>
3141
3142         Unreviewed, rolling out r147402.
3143         http://trac.webkit.org/changeset/147402
3144         https://bugs.webkit.org/show_bug.cgi?id=112903
3145
3146         * dom/Document.cpp:
3147         (WebCore::Document::processHttpEquiv):
3148         * loader/DocumentLoader.cpp:
3149         (WebCore::DocumentLoader::responseReceived):
3150
3151 2013-04-02  ChangSeok Oh  <changseok.oh@collabora.com>
3152
3153         [GTK][AC] Support preserves3D css property for clutter ac backend.
3154         https://bugs.webkit.org/show_bug.cgi?id=113318
3155
3156         Reviewed by Gustavo Noronha Silva.
3157
3158         This patch brings preserve-3D css property support to WebKitGtk+ with clutter ac backed.
3159         Most of the code is based on Mac port's implementation. The core concept is that
3160         if a layer has preserve-3d property false, we mark itself and its immediate children
3161         to make them flatten. And then we remove 3D factor in a modelView matrix
3162         when applying it to each actor.
3163
3164         No new tests as this is covered with existing AC tests.
3165
3166         * platform/graphics/clutter/GraphicsLayerActor.cpp:
3167         (_GraphicsLayerActorPrivate):
3168         (graphics_layer_actor_init):
3169         (graphicsLayerActorApplyTransform):
3170         (graphicsLayerActorNew):
3171         (graphicsLayerActorRemoveFromSuperLayer):
3172         (graphicsLayerActorSetDrawsContent):
3173         (graphicsLayerActorSetFlatten):
3174         * platform/graphics/clutter/GraphicsLayerActor.h:
3175         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
3176         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
3177         (WebCore::GraphicsLayerClutter::platformLayer):
3178         (WebCore::GraphicsLayerClutter::moveOrCopyAnimations):
3179         (WebCore):
3180         (WebCore::GraphicsLayerClutter::setPreserves3D):
3181         (WebCore::GraphicsLayerClutter::flushCompositingState):
3182         (WebCore::GraphicsLayerClutter::recursiveCommitChanges):
3183         (WebCore::GraphicsLayerClutter::commitLayerChangesAfterSublayers):
3184         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
3185         (WebCore::GraphicsLayerClutter::updateGeometry):
3186         (WebCore::GraphicsLayerClutter::updateSublayerList):
3187         (WebCore::GraphicsLayerClutter::updateStructuralLayer):
3188         (WebCore::GraphicsLayerClutter::ensureStructuralLayer):
3189         (WebCore::GraphicsLayerClutter::structuralLayerPurpose):
3190         (WebCore::GraphicsLayerClutter::layerForSuperlayer):
3191         * platform/graphics/clutter/GraphicsLayerClutter.h:
3192         (CommitState):
3193         (WebCore::GraphicsLayerClutter::CommitState::CommitState):
3194         (GraphicsLayerClutter):
3195         (WebCore::GraphicsLayerClutter::primaryLayer):
3196
3197 2013-04-02  Adam Klein  <adamk@chromium.org>
3198
3199         HTML parser should consistently inspect the namespace of elements on the stack of open elements
3200         https://bugs.webkit.org/show_bug.cgi?id=113723
3201
3202         Reviewed by Adam Barth.
3203
3204         Added HTMLStackItem::matchesHTMLTag method and use that nearly
3205         everywhere instead of HTMLStackItem::hasLocalName. The most important
3206         of these changes is in HTMLElementStack's inScopeCommon() function,
3207         where the use of matchesHTMLTag means that any of the inXXXScope()
3208         calls now only match HTML tags.
3209
3210         Tests: html5lib/generated/run-namespace-sensitivity-data.html
3211                html5lib/generated/run-namespace-sensitivity-write.html
3212
3213         * html/parser/HTMLConstructionSite.cpp:
3214         (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
3215         * html/parser/HTMLElementStack.cpp:
3216         (WebCore::HTMLElementStack::popUntil):
3217         (WebCore::HTMLElementStack::topmost):
3218         (WebCore::inScopeCommon):
3219         (WebCore::HTMLElementStack::inScope):
3220         (WebCore::HTMLElementStack::inListItemScope):
3221         (WebCore::HTMLElementStack::inTableScope):
3222         (WebCore::HTMLElementStack::inButtonScope):
3223         (WebCore::HTMLElementStack::inSelectScope):
3224         * html/parser/HTMLElementStack.h:
3225         (WebCore::HTMLElementStack::popUntilPopped):
3226         * html/parser/HTMLFormattingElementList.cpp:
3227         (WebCore::HTMLFormattingElementList::closestElementInScopeWithName):
3228         * html/parser/HTMLStackItem.h:
3229         (WebCore::HTMLStackItem::matchesHTMLTag):
3230         (HTMLStackItem):
3231         * html/parser/HTMLTreeBuilder.cpp:
3232         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3233         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
3234         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
3235         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
3236
3237 2013-04-02  Hayato Ito  <hayato@chromium.org>
3238
3239         Report memory usage for ShadowDistributedRules.
3240         https://bugs.webkit.org/show_bug.cgi?id=109882
3241
3242         Reviewed by Dimitri Glazkov.
3243
3244         This is a follow-up patch for r142855.
3245
3246         No new tests, no behavior change for layout tests.
3247
3248         * css/DocumentRuleSets.cpp:
3249         (WebCore):
3250         (WebCore::ShadowDistributedRules::reportMemoryUsage):
3251         (WebCore::DocumentRuleSets::reportMemoryUsage):
3252         * css/DocumentRuleSets.h:
3253         (ShadowDistributedRules):
3254
3255 2013-04-02  Chris Fleizach  <cfleizach@apple.com>
3256
3257         AX: Need to get line thickness from fraction on web
3258         https://bugs.webkit.org/show_bug.cgi?id=113720
3259
3260         Reviewed by David Kilzer.
3261
3262         Expose the line thickness property for fractions, which is needed to
3263         help determine the type of equation.
3264
3265         Test: platform/mac/accessibility/mathml-line-fraction.html
3266
3267         * accessibility/AccessibilityObject.h:
3268         (WebCore::AccessibilityObject::mathLineThickness):
3269         * accessibility/AccessibilityRenderObject.cpp:
3270         (WebCore::AccessibilityRenderObject::mathLineThickness):
3271         (WebCore):
3272         * accessibility/AccessibilityRenderObject.h:
3273         (AccessibilityRenderObject):
3274         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3275         (-[WebAccessibilityObjectWrapper accessibilityMathLineThickness]):
3276         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3277         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3278         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3279
3280 2013-04-02  Alexandre Elias  <aelias@chromium.org>
3281
3282         Unreviewed, rolling out r147389.
3283         http://trac.webkit.org/changeset/147389
3284         https://bugs.webkit.org/show_bug.cgi?id=113738
3285
3286         r147389 was temporary patch for Chromium branch management, needs
3287         revert.
3288
3289         * platform/ScrollView.cpp:
3290         (WebCore::positionScrollbarLayer):
3291         * rendering/RenderLayerBacking.cpp:
3292         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
3293
3294 2013-04-02  David Vest  <davve@opera.com>
3295
3296         Hang when calling setCurrentTime on SVG with cyclic animation dependency chain
3297         https://bugs.webkit.org/show_bug.cgi?id=113485
3298
3299         Reviewed by Stephen Chenney.
3300
3301         If no exact match can be found, approximateBinarySearch may return
3302         either adjacent value to the key. Selecting the lesser value when
3303         there is a greater one may cause interval creation to fail in a
3304         way that causes infinite loops during seeking. Detect and amend
3305         this condition by selecting the greater value when possible.
3306
3307         Test: svg/animations/animation-dependency-hang.html
3308
3309         * svg/animation/SVGSMILElement.cpp:
3310         (WebCore::SVGSMILElement::findInstanceTime):
3311
3312 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
3313
3314         Web Inspector: source location gets frozen after inspector reload
3315         https://bugs.webkit.org/show_bug.cgi?id=113776
3316
3317         Reviewed by Pavel Feldman.
3318
3319         Put statusBarText item in its own container and update its contents in
3320         ScriptsPanel._updateScriptViewStatusBarItems in similar way it's done
3321         for statusBarItems.
3322
3323         No new tests.
3324
3325         * inspector/front-end/ScriptsPanel.js:
3326         (WebInspector.ScriptsPanel):
3327         (WebInspector.ScriptsPanel.prototype.statusBarText):
3328         (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
3329
3330 2013-04-02  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3331
3332         Remove unneeded cpp file from CMake build. Rubber-stamp by Alexis Menard.
3333
3334         * CMakeLists.txt: Remove FFTFrameStub.cpp, since adding this file or not
3335         to your build is a platform decision.
3336
3337 2013-04-01  Andrey Kosyakov  <caseq@chromium.org>
3338
3339         Web Inspector: [Timeline] unify logic for 3 overview modes in Timeline
3340         https://bugs.webkit.org/show_bug.cgi?id=113708
3341
3342         Reviewed by Yury Semikhatsky.
3343
3344         - make TimelineOverviewPane logic independent on overview mode;
3345         - show only one of 3 controls at one time;
3346         - attach overview controls to the same parent.
3347
3348         * inspector/front-end/OverviewGrid.js: remove gridElement() and itemsGraphsElement(), no longer needed.
3349         (WebInspector.OverviewGrid):
3350         * inspector/front-end/TimelineOverviewPane.js:
3351         (WebInspector.TimelineOverviewPane):
3352         (WebInspector.TimelineOverviewPane.prototype.setMode):
3353         (WebInspector.TimelineOverviewPane.prototype._innerSetMode):
3354         (WebInspector.TimelineOverviewPane.prototype._createOverviewControl): 
3355         (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
3356         (WebInspector.TimelineOverviewPane.prototype._update):
3357         (WebInspector.TimelineOverviewPane.prototype.addFrame):
3358         (WebInspector.TimelineOverviewPane.prototype.zoomToFrame):
3359         (WebInspector.TimelineOverviewPane.prototype._reset):
3360         (WebInspector.TimelineOverviewPane.prototype._onWindowChanged):
3361         (WebInspector.TimelineOverviewBase.prototype.update):
3362         (WebInspector.TimelineOverviewBase.prototype.reset):
3363         (WebInspector.TimelineOverviewBase.prototype.categoryVisibilityChanged):
3364         (WebInspector.TimelineOverviewBase.prototype.addFrame):
3365         (WebInspector.TimelineOverviewBase.prototype.getWindowTimes):
3366         (WebInspector.TimelineEventOverview):
3367         (WebInspector.TimelineEventOverview.prototype.categoryVisibilityChanged):
3368         * inspector/front-end/timelinePanel.css:
3369
3370 2013-04-02  Julien Chaffraix  <jchaffraix@webkit.org>
3371
3372         webkit fails IETC grid-column-002
3373         https://bugs.webkit.org/show_bug.cgi?id=83907
3374
3375         Reviewed by Ojan Vafai.
3376
3377         Tests: fast/css-grid-layout/grid-item-column-row-get-set.html
3378                ietestcenter/css3/grid/grid-column-002.htm
3379
3380         * css/CSSParser.cpp:
3381         (WebCore::CSSParser::parseValue):
3382         Don't accept 0 as a valid <integer> position.
3383
3384 2013-04-02  Dmitry Gozman  <dgozman@chromium.org>
3385
3386         Web Inspector: allow referencing of nodes that have not been pushed to the front-end
3387         https://bugs.webkit.org/show_bug.cgi?id=110921
3388
3389         Reviewed by Pavel Feldman.
3390
3391         Nodes not yet pushed to front-end are referenced by BackendNodeId and retained.
3392         One can group nodes when generating BackendNodeIds to release them all together later.
3393
3394         To resolve node references by BackendNodeId, frontend should use new pushNodeByBackendIdToFrontend method.
3395         This will invalidate the generated BackendNodeId.
3396
3397         * inspector/Inspector.json:
3398         * inspector/InspectorDOMAgent.cpp:
3399         (WebCore::InspectorDOMAgent::discardBindings):
3400         (WebCore::InspectorDOMAgent::backendNodeIdForNode):
3401         (WebCore::InspectorDOMAgent::releaseBackendNodeIds):
3402         (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend):
3403         * inspector/InspectorDOMAgent.h:
3404         (WebCore):
3405         (InspectorDOMAgent):
3406
3407 2013-04-02  Andrei Bucur  <abucur@adobe.com>
3408
3409         [CSS Regions] Nested auto-height regions don't layout correctly
3410         https://bugs.webkit.org/show_bug.cgi?id=111969
3411
3412         Reviewed by David Hyatt.
3413
3414         The patch fixes the auto-height regions processing model to work with nested named flows. Currently
3415         this use case doesn't work correctly because the order in which the computed height value is propagated
3416         to the regions is incorrect. For example, in the case of two flows (f1 and f2) and two auto-height
3417         regions (r1 and r2) with r2 a member of f1:
3418         1. the normal layout phase starts
3419         2. r1 is laid out with height = 0
3420         3. f1 is laid out including r2 with height = 0; overrideLogicalHeight for r1 is computed
3421         4. f2 is laid out; overrideLogicalHeight for r2 is computed
3422         5. the constrained layout phase starts
3423         6. r1 is laid out using the overrideLogicalHeight computed in the normal phase
3424         7. f1 is laid out including r2 with its overrideLogicalHeight
3425         8. f2 is laid out
3426
3427         The problem appears at step 6 because the overrideLogicalheight computed during step 3 assumes r2
3428         has a height of 0. The patch changes the algorithm to update the auto-height regions in the reverse
3429         order of their flow threads dependecies. Here is a high level overview of the new algorithm,
3430         considering the named flows are sorted in the order of their dependencies:
3431         1. The flows are laid out from the outer flow to the inner flow. This successfully computes the outer
3432         non-auto-height regions size so the inner flows have the necessary information to correctly fragment
3433         the content.
3434         2. The flows are laid out from the inner flow to the outer flow. After an inner flow is laid out it
3435         goes into the constrained layout phase and marks the auto-height regions they need layout. This
3436         means the outer flows will relayout if they depend on regions with auto-height regions belonging to
3437         inner flows. This step will correctly compute the overrideLogicalHeights for the auto-height regions.
3438         It's possible for non-auto-height regions to relayout if they depend on auto-height regions. This
3439         will invalidate the inner flow threads and mark them as needing layout.
3440         3. The last step is to do one last layout if there are pahtological dependencies between non-auto-height
3441         regions and auto-height regions as detected in the previous step.
3442
3443         The patch also removes the layout phase flag from RenderView and moves it to the flow threads. This
3444         happens because a flow needs to update its auto-height regions overrideLogicalHeight while updating
3445         the logical height of the regions belonging to the inner flows that are laid out by the flow (i.e. the
3446         outer flow is in the normal phase while the inner flows are in the constrained layout phase).
3447
3448         There's also a new flag on the RenderFlowThread that is set when the flow needs the constrained layout
3449         phase. This could have been placed on the flow thread controller but I think it will be useful when doing
3450         content balancing for the new multi-column implementation.