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