Fix Windows build.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-24  Anders Carlsson  <andersca@apple.com>
2
3         Fix Windows build.
4
5         * WebCore.vcproj/WebCore.vcproj:
6         * WebCore.vcxproj/WebCore.vcxproj:
7         * WebCore.vcxproj/WebCore.vcxproj.filters:
8
9 2013-05-24  Tim Horton  <timothy_horton@apple.com>
10
11         Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
12         https://bugs.webkit.org/show_bug.cgi?id=116744
13         <rdar://problem/13973514>
14
15         Reviewed by Simon Fraser.
16
17         * WebCore.exp.in: Export FrameView::resumeAnimatingImages.
18         * page/FrameView.cpp:
19         (WebCore::FrameView::setIsInWindow):
20         (WebCore::FrameView::resumeAnimatingImages):
21         Factor the code to restart animated images out of frameView::setIsInWindow.
22
23         * page/FrameView.h:
24         (FrameView):
25
26 2013-05-24  Anders Carlsson  <andersca@apple.com>
27
28         Move history property list writer to WebKit
29         https://bugs.webkit.org/show_bug.cgi?id=116746
30
31         Reviewed by Tim Horton.
32
33         Remove files from the Xcode project and remove symbols that now live in WebKit.
34
35         * WebCore.exp.in:
36         * WebCore.xcodeproj/project.pbxproj:
37
38 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
39
40         Global constructors exposed in worker environment have wrong attributes
41         https://bugs.webkit.org/show_bug.cgi?id=116708
42
43         Reviewed by Geoffrey Garen.
44
45         Fix JSC bindings generator so that Global constructors exposed in worker environment
46         have the following attributes:
47         { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
48
49         This is now consistent with global constructors on DOMWindow and with the Web IDL
50         specification:
51         http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
52
53         Test: fast/js/global-constructors-attributes-worker.html
54
55         * bindings/scripts/CodeGeneratorJS.pm:
56         (GenerateAttributesHashTable):
57
58 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
59
60         Remove custom code for webkitAudioContext global constructor getter
61         https://bugs.webkit.org/show_bug.cgi?id=116530
62
63         Reviewed by Geoffrey Garen.
64
65         Get rid of custom code for webkitAudioContext global constructor getter. The
66         global DOMWindow attribute is now automatically generated by leveraging support
67         for [EnabledAtRuntime] extended attribute and the existing methods in
68         RuntimeEnabledFeatures class.
69
70         No new tests, no behavior change.
71
72         * GNUmakefile.list.am: Remove JSDOMWindowWebAudioCustom.*.
73         * Modules/webaudio/AudioContext.idl:
74         Remove [NoInterfaceObject] extended attribute so that the global constructor is
75         automatically generated instead of automatically added. Add [EnabledAtRuntime]
76         extended attribute since this global constructor can be disabled at runtime and
77         so that we can getter rid of the [CustomGetter] for the corresponding global
78         constructor. Use [InterfaceName] extended attribute so that the interface name
79         matches the global constructor on DOMWindow (webkitAudioContext).
80
81         * Target.pri: Remove JSDOMWindowWebAudioCustom.*.
82         * UseJSC.cmake: Remove JSDOMWindowWebAudioCustom.*.
83         * WebCore.exp.in: Export additional symbol.
84         * WebCore.order: Export additional symbol.
85         * WebCore.vcproj/WebCore.vcproj: Remove JSDOMWindowWebAudioCustom.*.
86         * WebCore.vcxproj/WebCore.vcxproj: Remove JSDOMWindowWebAudioCustom.*.
87         * WebCore.vcxproj/WebCore.vcxproj.filters: Remove JSDOMWindowWebAudioCustom.*.
88         * WebCore.xcodeproj/project.pbxproj: Remove JSDOMWindowWebAudioCustom.*.
89         * bindings/generic/RuntimeEnabledFeatures.h:
90         (WebCore::RuntimeEnabledFeatures::setWebAudioEnabled):
91         * bindings/js/JSBindingsAllInOne.cpp: Remove JSDOMWindowWebAudioCustom.*.
92         * bindings/js/JSDOMWindowWebAudioCustom.cpp: Removed. We no longer need any custom code for
93         the WebAudio global constructor getter because we use [EnabledAtRuntime] support in the
94         bindings generator now.
95         * page/DOMWindow.idl: Remove global constructor for AudioContext as it is now automatically
96         generated.
97         * page/Settings.in: Remove webAudioEnabled setting as we use the existing setting
98         in RuntimeEnabledFeatures now.
99
100 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
101
102         [AC] Needs to be guarded by USE(ACCELERATED_COMPOSITING)
103         https://bugs.webkit.org/show_bug.cgi?id=116712
104
105         Reviewed by Andreas Kling.
106
107         renderView is used when ACCELERATED_COMPOSITING is enabled.
108         So, this patch allows it to be guarded by USE(ACCELERATED_COMPOSITING).
109
110         No new tests, no behavior change.
111
112         * page/FrameView.cpp:
113         (WebCore::FrameView::setFrameRect):
114
115 2013-05-24  Thomas Deniau  <deniau@apple.com>
116
117         Add more lines to the context during Dictionary lookups
118         https://bugs.webkit.org/show_bug.cgi?id=115256
119
120         Reviewed by Ryosuke Niwa.
121
122         No new tests - no new functionality.
123
124         * WebCore.exp.in: Export a few methods in VisibleUnits needed to be able
125         to call previousLinePosition(), nextLinePosition(), startOfLine() and
126         endOfLine() in WebPageMac.mm when determining the context while looking
127         up a dictionary definition. These symbols used to be exported for iOS
128         only, export them on the desktop too.
129
130 2013-05-24  Anders Carlsson  <andersca@apple.com>
131
132         Remove PagePopup code
133         https://bugs.webkit.org/show_bug.cgi?id=116732
134
135         Reviewed by Andreas Kling.
136
137         Remove all page popup code.
138
139         * GNUmakefile.list.am:
140         * WebCore.xcodeproj/project.pbxproj:
141         * dom/ContextFeatures.cpp:
142         * dom/ContextFeatures.h:
143         * loader/EmptyClients.h:
144         * page/ChromeClient.h:
145         * page/DOMWindowPagePopup.cpp: Removed.
146         * page/DOMWindowPagePopup.h: Removed.
147         * page/DOMWindowPagePopup.idl: Removed.
148         * page/PagePopup.h: Removed.
149         * page/PagePopupClient.cpp: Removed.
150         * page/PagePopupClient.h: Removed.
151         * page/PagePopupController.cpp: Removed.
152         * page/PagePopupController.h: Removed.
153         * page/PagePopupController.idl: Removed.
154         * page/PagePopupDriver.h: Removed.
155         * testing/Internals.cpp:
156         (WebCore::Internals::resetToConsistentState):
157         (WebCore):
158         * testing/Internals.h:
159         (WebCore):
160         (Internals):
161         * testing/Internals.idl:
162         * testing/MockPagePopupDriver.cpp: Removed.
163         * testing/MockPagePopupDriver.h: Removed.
164
165 2013-05-24  Jer Noble  <jer.noble@apple.com>
166
167         Mac: Set the default audio buffer size to a large value for <video> elements.
168         https://bugs.webkit.org/show_bug.cgi?id=116342
169
170         Reviewed by Eric Carlson.
171         Roll-in rubber stamped by Eric Carlson.
172
173         To enable power savings by waking up the audio hardware less often, set the
174         requested buffer frame size to a large value, such as 4096. Since this results
175         in approximately 100ms worth of buffer, set the buffer size to a much lower
176         value when playing WebAudio, which is much more sensitive to latency than video
177         or audio elements.
178
179         Introduce a new class, AudioSessionManager, as well as a helper class,
180         AudioSessionManagerToken. Audio elements, video elements, and WebAudio destination
181         nodes will create and retain a token, and release the token in their destructor.
182         This allows the AudioSessionManager to track how many of what type of audio-
183         generating objects are in existence.
184
185         This requires implementing AudioSession for Mac platforms. Move the implementation
186         for retrieving the hardware sample rate and setting the buffer duration into
187         AudioSessionMac from AudioDestinationMac, to be shared with AudioSessionManagerMac.
188
189         Change the AudioSession method preferredBufferLength() into preferredBufferSize(),
190         as the callers really want to specify a buffer size, not a buffer duration. On iOS,
191         where the available API requires a duration, perform the conversion from duration to
192         size on behalf of the caller.
193
194         However, since the original version of this patch caused media test
195         failures on the Mac ML and Lion bots, only enable the buffer size
196         change for OS X > ML.
197
198         * html/HTMLMediaElement.h:  Add a AudioSessionManagerToken member.
199         * html/HTMLMediaElement.cpp:
200         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the token.
201         * platform/audio/AudioSession.cpp:
202         (WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
203         (WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength.
204         * platform/audio/AudioSession.h:
205         * platform/audio/AudioSessionManager.cpp:
206         (AudioSessionManagerToken::create): Simple factory method.
207         (AudioSessionManagerToken::AudioSessionManagerToken): Call AudioSessionManager::incrementCount().
208         (AudioSessionManagerToken::~AudioSessionManagerToken): Call AudioSessionManager::decrementCount().
209         (AudioSessionManager::sharedManager): Simple singleton method.
210         (AudioSessionManager::AudioSessionManager): Simple constructor.
211         (AudioSessionManager::has): Return whether the type is present.
212         (AudioSessionManager::incrementCount): Increment, then call updateSessionState()
213         (AudioSessionManager::decrementCount): Decrement, then call updateSessionState()
214         (AudioSessionManager::updateSessionState): Stub, does nothing.
215         * platform/audio/AudioSessionManager.h:
216         * platform/audio/ios/AudioDestinationIOS.cpp:
217         (WebCore::AudioDestinationIOS::configure): Call setPreferredBufferSize() instead of setPreferredBufferLength()
218         * platform/audio/ios/AudioSessionIOS.mm:
219         (WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
220         (WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength
221         * platform/audio/mac/AudioDestinationMac.cpp:
222         (WebCore::AudioDestination::hardwareSampleRate): Call AudioSession::sampleRate().
223         (WebCore::AudioDestinationMac::AudioDestinationMac): Create the AudioSessionManagerToken.
224         (WebCore::AudioDestinationMac::configure): Do not set the buffer size (this is done in AudioSessionManagerMac).
225         * platform/audio/mac/AudioDestinationMac.h:
226         * platform/audio/mac/AudioSessionMac.cpp: Added.
227         (WebCore::defaultDevice): Added, returns the default audio device.
228         (WebCore::AudioSession::AudioSession): Simple constructor.
229         (WebCore::AudioSession::~AudioSession): Simple destructor.
230         (WebCore::AudioSession::category): Stub, unimplemented.
231         (WebCore::AudioSession::setCategory): Ditto.
232         (WebCore::AudioSession::categoryOverride): Ditto.
233         (WebCore::AudioSession::setCategoryOverride): Ditto.
234         (WebCore::AudioSession::numberOfOutputChannels): Ditto.
235         (WebCore::AudioSession::setActive): Ditto.
236         (WebCore::AudioSession::sampleRate): Use the HAL to return the default audio device sample rate.
237         (WebCore::AudioSession::preferredBufferSize): Return the current HAL setting.
238         (WebCore::AudioSession::setPreferredBufferSize): Set the buffer size.
239         * platform/audio/mac/AudioSessionManagerMac.cpp:
240         (AudioSessionManager::updateSessionState): Set the buffer size depending on what audio outputs are present.
241         * WebCore.xcodeproj/project.pbxproj: Add the new files to the project.
242
243 2013-05-24  Alberto Garcia  <agarcia@igalia.com>
244
245         Path: upstream the missing bits from the BlackBerry port
246         https://bugs.webkit.org/show_bug.cgi?id=116658
247
248         Reviewed by Xan Lopez.
249
250         PathBlackBerry was upstreamed a while ago (r144612) but a few bits
251         were missing from the cross-platform code.
252
253         * platform/graphics/Path.cpp:
254         (WebCore::Path::addPathForRoundedRect):
255         * platform/graphics/Path.h:
256         (Graphics):
257         (Path):
258
259 2013-05-24  Noam Rosenthal  <noam@webkit.org>
260
261         WebProcess is crashing on http://achicu.github.io/css-presentation when direct pattern compositing is enabled
262         https://bugs.webkit.org/show_bug.cgi?id=115135
263
264         Reviewed by Antti Koivisto.
265
266         Issue is invoked when there is a visibility:hidden layer with a non-compositable
267         background image (e.g. a radial gradient).
268         The layer is treated as a no-contents layer because of its visibility, however
269         updateDirectlyCompositedBackgroundImage() later mistakenly treats it as a layer
270         with direct background-image compositing.
271
272         Fixed by returning early from updating directly composited contents for layers
273         with hidden contents.
274
275         Test: compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html
276
277         * rendering/RenderLayerBacking.cpp:
278         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
279         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
280         (WebCore::RenderLayerBacking::paintsChildren):
281         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
282
283 2013-05-24  Robert Hogan  <robert@webkit.org>
284
285         Refactor shouldAddBorderPaddingMargin()
286         https://bugs.webkit.org/show_bug.cgi?id=98803
287
288         Reviewed by Ryosuke Niwa.
289
290         Make this helper function less clever-stupid in its misguided sacrifice of intelligibility
291         for the sake of concision.
292
293         No new tests, refactoring.
294
295         * rendering/RenderBlockLineLayout.cpp:
296         (WebCore::shouldAddBorderPaddingMargin):
297         (WebCore::inlineLogicalWidth):
298
299 2013-05-24  Xiaobo Wang  <xiaobwang@blackberry.com>
300
301         [BlackBerry] DRT - crashed on GraphicsContext3D::makeContextCurrent
302         https://bugs.webkit.org/show_bug.cgi?id=116654
303
304         Reviewed by Carlos Garcia Campos.
305
306         PR 331552.
307         Internally reviewed and amended by Arvid Nilsson.
308
309         No new tests, this patch is to fix DRT crashes in fast/canvas/webgl.
310         The instance of GraphicsContext3D has already been destroyed but
311         WebGLLayerWebKitThread is not aware of that. This is because compositor
312         layer of the WebGL graphics context was referenced outside the context.
313         So when destructing GraphicsContext3D the compositing layer was not
314         destructed.
315         Fix by setting m_webGLContext to 0 when destructing GrapthicsContext3D
316         after releasing the compositor layer, so that it won't be de-referenced
317         again later.
318
319         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
320         (WebCore::GraphicsContext3D::~GraphicsContext3D):
321         * platform/graphics/blackberry/WebGLLayerWebKitThread.cpp:
322         (WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread):
323         (WebCore::WebGLLayerWebKitThread::webGLContextDestroyed):
324         (WebCore):
325         * platform/graphics/blackberry/WebGLLayerWebKitThread.h:
326         (WebGLLayerWebKitThread):
327
328 2013-05-24  Andreas Kling  <akling@apple.com>
329
330         Typing in Safari's unified field causes unnecessary web content repaints.
331         <http://webkit.org/b/116703>
332
333         Reviewed by Andy Estes.
334
335         Break out an alternate version of Page::markAllMatchesForText() that only counts the number of times
336         a string occurs in the page, but doesn't try to mark the occurrences.
337         This allows Safari to count matches for the 'Find "foo" on This Page' functionality in the unified
338         location bar without causing tile repaints.
339
340         * WebCore.exp.in:
341         * page/Page.h:
342         * page/Page.cpp:
343         (WebCore::Page::findMatchesForText):
344         (WebCore::Page::markAllMatchesForText):
345         (WebCore::Page::countFindMatches):
346
347             Renamed markAllMatchesForText() to findMatchesForText() and gave it a boolean parameter to control whether
348             matches should be marked or not. countFindMatches() is the new helper that doesn't mark.
349
350 2013-05-23  Beth Dakin  <bdakin@apple.com>
351
352         https://bugs.webkit.org/show_bug.cgi?id=116702
353         REGRESSION (r150399): Scrollbar missing for all overflow scroll
354         -and corresponding-
355         <rdar://problem/13963712>
356
357         Reviewed by Simon Fraser.
358
359         This was a silly copy-paste error.
360         * rendering/RenderLayer.cpp:
361         (WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
362
363 2013-05-23  peavo@outlook.com  <peavo@outlook.com>
364
365         [WinCairo] Build fails to link.
366         https://bugs.webkit.org/show_bug.cgi?id=116671
367
368         Reviewed by Brent Fulgham.
369
370         * page/FrameView.h: Added guard for ACCELERATED_COMPOSITING.
371
372 2013-05-23  Roger Fong  <roger_fong@apple.com>
373
374         Unreviewed. Modify WebCore for AppleWin 2010 production build.
375
376         * WebCore.vcxproj/WebCoreGenerated.make:
377         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
378         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
379
380 2013-05-23  Yongjun Zhang  <yongjun_zhang@apple.com>
381
382         We need to clear main resource when detaching DocumentLoader from the frame.
383         https://bugs.webkit.org/show_bug.cgi?id=116680
384
385         Normally, when we detach the documentLoader in DocumentLoader::detachFromFrame, main resource is also cleared
386         in stopLoading().  There is possibility that main resource not being cleared, and this could cause crash later
387         since docLoader could still receive resource callbacks.  To avoid that, we can remove docLoader from main resource's
388         client set in detachFromFrame.
389
390         Reviewed by Brady Eidson.
391
392         No new tests, this doesn't happen on OS X.
393
394         * loader/DocumentLoader.cpp:
395         (WebCore::DocumentLoader::detachFromFrame):
396         (WebCore::DocumentLoader::clearMainResource):
397         * loader/cache/CachedResource.h: make hasClient accessible publicly.
398         (WebCore::CachedResource::hasClient):
399         (CachedResource):
400
401 2013-05-23  Mihai Maerean  <mmaerean@adobe.com>
402
403         assertion failed: !node || node->isElementNode() in WebCore::RenderBlock::clone
404         https://bugs.webkit.org/show_bug.cgi?id=116614
405
406         Reviewed by David Hyatt.
407
408         Add a test for flow threads so they don't end up being cloned in region based multi columns with columns:1 where
409         the only child has column-span:all.
410
411         Test: fast/multicol/newmulticol/direct-child-column-span-all.html
412
413         * rendering/RenderBlock.cpp:
414         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
415
416 2013-05-23  Anders Carlsson  <andersca@apple.com>
417
418         Crash in convertMainResourceLoadToDownload when downloading file by option-return
419         https://bugs.webkit.org/show_bug.cgi?id=116451
420
421         Reviewed by Andreas Kling.
422
423         Handle MainResourceLoader being null here which will happen when loading a cached main resource.
424
425         * loader/DocumentLoader.cpp:
426         (WebCore::DocumentLoader::continueAfterContentPolicy):
427
428 2013-05-23  Benjamin Poulain  <bpoulain@apple.com>
429
430         KURL::createCFURL() should return a RetainPtr<CFURLRef>
431         https://bugs.webkit.org/show_bug.cgi?id=116644
432
433         Reviewed by Andreas Kling.
434
435         For consistency with the other createCFType() APIs in WebKit, KURL should
436         return a RetainPtr<> instead of raw +1 CFURLRef.
437
438         No leak were discovered while making this change.
439
440         * platform/KURL.h:
441         * platform/cf/KURLCFNet.cpp:
442         (WebCore):
443         (WebCore::createCFURLFromBuffer):
444         (WebCore::KURL::createCFURL):
445         (WebCore::KURL::fileSystemPath):
446         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
447         (WebCore::AVFWrapper::createAssetForURL):
448         * platform/graphics/cg/GraphicsContextCG.cpp:
449         (WebCore::GraphicsContext::setURLForRect):
450         * platform/mac/KURLMac.mm:
451         (WebCore):
452         (WebCore::KURL::operator NSURL *):
453         (WebCore::KURL::createCFURL):
454         * platform/network/cf/CookieJarCFNet.cpp:
455         (WebCore::setCookiesFromDOM):
456         (WebCore::cookiesForDOM):
457         (WebCore::cookieRequestHeaderFieldValue):
458         (WebCore::getRawCookies):
459         (WebCore::deleteCookie):
460         * platform/network/cf/DNSCFNet.cpp:
461         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
462         * platform/network/cf/ProxyServerCFNet.cpp:
463         (WebCore::addProxyServersForURL):
464         * platform/network/cf/ResourceRequestCFNet.cpp:
465         (WebCore::ResourceRequest::doUpdatePlatformRequest):
466         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
467         * platform/network/cf/ResourceResponseCFNet.cpp:
468         (WebCore::ResourceResponse::cfURLResponse):
469         * platform/network/cf/SocketStreamHandleCFNet.cpp:
470         (WebCore::SocketStreamHandle::SocketStreamHandle):
471
472 2013-05-18  Robert Hogan  <robert@webkit.org>
473
474         The ellipsis in a text overflow should not avoid floats
475         https://bugs.webkit.org/show_bug.cgi?id=115746
476
477         Reviewed by David Hyatt.
478
479         When placing an ellipsis for text overflow we shouldn't avoid any floats on the line.
480         That is to say, if there is a float in the box we overflow we should let our no-wrap text,
481         including the ellipsis, render inside the float just as we would if overflow was hidden but
482         a text-overflow rendering had not been specified.
483
484         Test: fast/css/text-overflow-ellipsis-behind-floats.html
485
486         * rendering/RenderBlockLineLayout.cpp:
487         (WebCore::RenderBlock::checkLinesForTextOverflow):
488
489 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
490
491         Unreviewed, rolling out r150586.
492         http://trac.webkit.org/changeset/150586
493         https://bugs.webkit.org/show_bug.cgi?id=116660
494
495         Those constructors should be exposed on the WorkerContext, not
496         the DOMWindow
497
498         * fileapi/FileReaderSync.idl:
499         * workers/WorkerLocation.idl:
500
501 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
502
503         Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation
504         https://bugs.webkit.org/show_bug.cgi?id=116660
505
506         Reviewed by Kentaro Hara.
507
508         Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation to match their
509         respective specifications:
510         - http://dev.w3.org/2006/webapi/FileAPI/#FileReaderSync
511         - http://dev.w3.org/html5/workers/#workerlocation
512
513         No new tests, covered by existing tests.
514
515         * fileapi/FileReaderSync.idl:
516         * workers/WorkerLocation.idl:
517
518 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
519
520         Remove special case for MessagePortArray from bindings generator
521         https://bugs.webkit.org/show_bug.cgi?id=116653
522
523         Reviewed by Kentaro Hara.
524
525         Use MessagePort[] instead of MessagePortArray type in the IDL as MessagePortArray
526         is not defined on IDL side. This allows us to remove the special case for
527         MessagePortArray from the bindings generator.
528
529         No new tests, no behavior change.
530
531         * bindings/js/JSMessageEventCustom.cpp:
532         (WebCore::JSMessageEvent::data):
533         * bindings/scripts/CodeGeneratorJS.pm:
534         (NativeToJSValue): Remove special case for MessagePortArray.
535         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
536         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
537         (WebDOMTestSerializedScriptValueInterface):
538         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
539         (webkit_dom_test_serialized_script_value_interface_get_property):
540         (webkit_dom_test_serialized_script_value_interface_class_init):
541         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
542         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
543         (WebCore::jsTestSerializedScriptValueInterfacePorts):
544         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
545         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
546         * bindings/scripts/test/TestSerializedScriptValueInterface.idl: Replace MessagePortArray
547         by MessagePort[].
548         * dom/MessageEvent.h:
549         (WebCore::MessageEvent::ports): The method should return a Vector, not a Vector*
550         as the array on JavaScript side is not nullable.
551         * dom/MessageEvent.idl: Replace MessagePortArray by MessagePort[].
552
553 2013-05-23  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
554
555         [EFL] Back, Forward and Stop should be hidden in context menu
556         https://bugs.webkit.org/show_bug.cgi?id=116615
557
558         Reviewed by Christophe Dumez.
559
560         Context menu items: Back, Forward, Stop, Reload, should be shown only when
561         they are able to perform action.
562
563         No new tests - no new functionality.
564
565         * page/ContextMenuController.cpp:
566         (WebCore::ContextMenuController::populate):
567
568 2013-05-22  Dean Jackson  <dino@apple.com>
569
570         Rolling out r150555. It borked about 30 media tests.
571
572         * WebCore.xcodeproj/project.pbxproj:
573         * html/HTMLMediaElement.cpp:
574         (WebCore::HTMLMediaElement::HTMLMediaElement):
575         * html/HTMLMediaElement.h:
576         * platform/audio/AudioSession.cpp:
577         (WebCore):
578         (WebCore::AudioSession::AudioSession):
579         (WebCore::AudioSession::preferredBufferDuration):
580         (WebCore::AudioSession::setPreferredBufferDuration):
581         * platform/audio/AudioSession.h:
582         * platform/audio/AudioSessionListener.h:
583         (AudioSessionListener):
584         * platform/audio/AudioSessionManager.cpp: Removed.
585         * platform/audio/AudioSessionManager.h: Removed.
586         * platform/audio/ios/AudioDestinationIOS.cpp:
587         (WebCore::AudioDestinationIOS::configure):
588         * platform/audio/ios/AudioSessionIOS.mm:
589         (WebCore::AudioSession::preferredBufferDuration):
590         (WebCore::AudioSession::setPreferredBufferDuration):
591         * platform/audio/mac/AudioDestinationMac.cpp:
592         (WebCore::AudioDestination::hardwareSampleRate):
593         (WebCore::AudioDestinationMac::AudioDestinationMac):
594         (WebCore::AudioDestinationMac::configure):
595         * platform/audio/mac/AudioDestinationMac.h:
596         (AudioDestinationMac):
597         * platform/audio/mac/AudioSessionMac.cpp: Removed.
598         * platform/audio/mac/AudioSessionManagerMac.cpp: Removed.
599
600 2013-05-20  Jeffrey Pfau  <jpfau@apple.com>
601
602         Active DOM object resumption should match reason for suspending
603         https://bugs.webkit.org/show_bug.cgi?id=116476
604
605         Add a reason to the arguments for resuming active DOM object and
606         scheduled tasks and ensure that it matches the suspend reason before
607         actually resuming the objects.
608
609         Reviewed by Joseph Pecoraro.
610
611         No new tests, no change in functionality.
612
613         * bindings/js/PageScriptDebugServer.cpp:
614         (WebCore::PageScriptDebugServer::setJavaScriptPaused): Add matching resume reason
615         * dom/Document.cpp:
616         (WebCore::Document::resumeActiveDOMObjects): Check for matching resume reason
617         (WebCore::Document::resumeScheduledTasks): Check for matching resume reason
618         * dom/Document.h:
619         (Document):
620         * dom/ScriptExecutionContext.cpp:
621         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): Check for matching resume reason
622         * dom/ScriptExecutionContext.h:
623         (ScriptExecutionContext):
624         (WebCore::ScriptExecutionContext::reasonForSuspendingActiveDOMObjects): Expose suspend reason to subclasses
625         * history/CachedFrame.cpp:
626         (WebCore::CachedFrameBase::restore): Add matching resume reason
627         * page/Frame.cpp:
628         (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): Add matching resume reason
629         * page/PageGroupLoadDeferrer.cpp:
630         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): Add matching resume reason
631
632 2013-05-22  Dean Jackson  <dino@apple.com>
633
634         Don't snapshot plugins that can't be snapshotted
635         https://bugs.webkit.org/show_bug.cgi?id=116490
636
637         Reviewed by Tim Horton.
638
639         Some plugins, such as QuickTime, don't support snapshotting. We're
640         planning on another way to capture snapshots, but in the meantime make
641         sure that they don't fail to initialise because they were told to
642         not use accelerated rendering.
643
644         * WebCore.exp.in: Export restartSnapshottedPlugin so that it can be used from WK2.
645         * html/HTMLPlugInImageElement.cpp:
646         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Don't set the play state before restarting.
647         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Make sure we indicated that this snapshotted plugin was clicked.
648         * html/HTMLPlugInImageElement.h: Move restartSnapshottedPlugin from protected to public.
649         * rendering/RenderSnapshottedPlugIn.cpp:
650         (WebCore::RenderSnapshottedPlugIn::handleEvent): Don't set play state here. Let the restart functions do it.
651
652 2013-05-22  Max Vujovic  <mvujovic@adobe.com>
653
654         [CSS Shaders] valueForCustomFilterTransformParameter should check that renderer is a RenderBox
655         https://bugs.webkit.org/show_bug.cgi?id=116464
656
657         Reviewed by Alexandru Chiculita.
658
659         If the renderer is not a RenderBox, we just use a zero size to compute the transform,
660         like in CSSComputedStyleDeclaration::computedTransform.
661
662         Test: css3/filters/custom/custom-filter-crash-inline-computed-style.html
663
664         * css/CSSComputedStyleDeclaration.cpp:
665         (WebCore::valueForCustomFilterTransformParameter):
666
667 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
668
669         Fix assertion in the getComputedStyle-background-shorthand.html test
670         https://bugs.webkit.org/show_bug.cgi?id=116639
671
672         Reviewed by Ryosuke Niwa.
673
674         getComputedStyle-background-shorthand.html was asserting under the newly added
675         code in willBeRemovedFromTree(). The assertion was caused by too many calls to
676         FrameView::removeSlowRepaintObject(), which happened because we called it for
677         RenderTexts, which share style with their parent renderer.
678         
679         RenderText overrides styleWillChange() to do nothing, so we never
680         call add/removeSlowRepaintObject() for them. Thus we should also skip this
681         work in willBeRemovedFromTree() for RenderTexts.
682
683         * rendering/RenderObject.cpp:
684         (WebCore::RenderObject::willBeRemovedFromTree):
685
686 2013-05-22  Bem Jones-Bey  <bjonesbe@adobe.com>
687
688         Heap-use-after-free in WebCore::RenderLayerModelObject::hasSelfPaintingLayer
689         https://bugs.webkit.org/show_bug.cgi?id=116626
690
691         Reviewed by David Hyatt.
692
693         This is a port of a Blink bug fix by Emil Eklund.
694
695         Account for saturated estimated position in RenderBlock::layoutBlockChild.
696
697         If the estimated top position is saturated the comparison with oldLogicalTop
698         might yield a false negative as adding and removing margins, borders etc from
699         a saturated number might yield incorrect results. If this is the case always
700         mark for layout.
701
702         Minimal test case impractical. See bug for raw fuzzer test case.
703
704         * platform/LayoutUnit.h:
705         (WebCore::LayoutUnit::mightBeSaturated): Add helper method for checking whether
706             a number might be saturated.
707         * rendering/RenderBlock.cpp:
708         (WebCore::RenderBlock::layoutBlockChild): Check if logicalTopEstimate is likely
709             to be saturated and if so mark for layout.
710
711 2013-05-22  Benjamin Poulain  <benjamin@webkit.org>
712
713         Remove CSSPropertySourceData emptyCSSPropertySourceData
714         https://bugs.webkit.org/show_bug.cgi?id=116517
715
716         Reviewed by Darin Adler.
717
718         This was added for chromium and does not seem to be used
719         anywhere anymore.
720
721         * css/CSSParser.cpp:
722         (WebCore::CSSParser::CSSParser):
723         * css/CSSPropertySourceData.cpp:
724         * css/CSSPropertySourceData.h:
725
726 2013-05-22  Csaba Osztrogonác  <ossy@webkit.org>
727
728         Buildfix for !ENABLE(FULLSCREEN_API) platforms.
729
730         Rubber-stamped by Ryosuke Niwa.
731
732         * rendering/RenderInline.cpp: Missing #if guard added.
733         (WebCore::RenderInline::splitInlines):
734
735 2013-05-22  Ryosuke Niwa  <rniwa@webkit.org>
736
737         Fix a typo in 150469.
738
739         * editing/Editor.cpp:
740         (WebCore::dispatchEditableContentChangedEvents):
741
742 2013-05-22  Ryosuke Niwa  <rniwa@webkit.org>
743
744         REGRESSION: ASSERTION FAILED: obj->isRenderInline() || obj == this, Bad cast in WebCore::RenderBlock::createLineBoxes
745         https://bugs.webkit.org/show_bug.cgi?id=110622
746
747         Reviewed by David Hyatt.
748
749         Merge https://chromium.googlesource.com/chromium/blink/+/998ad358eed702b873dd54697b3fa3f952e0feb7
750
751         Inserting an element before the fullscreened element could crash if it caused a containing inline to be split,
752         since the splitting logic doesn't expect the fullscreened element to be wrapped in a RenderFullScreen. This patch changes
753         inline splitting to be aware of RenderFullScreen.
754
755         Test: fullscreen/full-screen-inline-split-crash.html
756
757         * rendering/RenderInline.cpp:
758         (WebCore::RenderInline::splitInlines):
759
760 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
761
762         Fix issues with focus rings on search fields
763         https://bugs.webkit.org/show_bug.cgi?id=116591
764
765         Reviewed by Darin Adler.
766         
767         On a future OS, the rect returned by _focusRingVisibleRect should
768         be in the coordinate system of the that NSView, not the base
769         coordinate system, so fix the code that sets and reads the global
770         focusRingClipRect variable accordingly.
771
772         * platform/graphics/mac/WebLayer.mm:
773         (drawLayerContents):
774         * platform/mac/ThemeMac.mm:
775         (-[WebCoreFlippedView _focusRingVisibleRect]):
776
777 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
778
779         New Flickr doesn't get fast scrolling but should
780         https://bugs.webkit.org/show_bug.cgi?id=116514
781
782         Reviewed by Darin Adler.
783         
784         RenderObject increments and decrements a counter of slow repaint objects on
785         FrameView when it sees style changes related to background-attachment:fixed.
786         However, it omitted to decrement the count when a renderer with a fixed background
787         was destroyed.
788         
789         This caused Flickr to never fall into fast scrolling mode, since it toggled
790         display:none on an element with a fixed background during loading, then removed
791         the fixed background.
792         
793         Did some minor cleanup of #ENABLE(FAST_MOBILE_SCROLLING) crap.
794
795         Tests: platform/mac-wk2/tiled-drawing/slow-scrolling-background-toggle.html
796                platform/mac-wk2/tiled-drawing/slow-scrolling-hidden-background-toggle.html
797                platform/mac-wk2/tiled-drawing/slow-scrolling.html
798
799         * rendering/RenderObject.cpp:
800         (WebCore::shouldRepaintFixedBackgroundsOnScroll):
801         (WebCore::RenderObject::styleWillChange):
802         (WebCore::RenderObject::willBeRemovedFromTree):
803
804 2013-05-22  Robert Hogan  <robert@webkit.org>
805
806         Need to Remove Anonymous Wrappers When All Children Become Inline
807         https://bugs.webkit.org/show_bug.cgi?id=115687
808
809         Reviewed by David Hyatt.
810
811         Remove a simple subset of anonymous wrappers, i.e. anonymous blocks without continuations,
812         when a block becoming float or positioned removes the need for them.
813
814         Test: fast/block/remove-anonymous-wrappers-when-element-changes-to-float-or-positioned.html
815
816         * rendering/RenderBlock.h:
817         (RenderBlock):
818         * rendering/RenderObject.cpp:
819         (WebCore):
820         (WebCore::RenderObject::removeAnonymousWrappersFromLineIfNecessary):
821         (WebCore::RenderObject::styleWillChange):
822         (WebCore::RenderObject::styleDidChange):
823         * rendering/RenderObject.h:
824         (RenderObject):
825
826 2013-05-22  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
827
828         [css] Update ETextDecorations enum to TextDecorations
829         https://bugs.webkit.org/show_bug.cgi?id=116581
830
831         Reviewed by Andreas Kling.
832
833         Currently, ETextDecorations enum uses a C-like coding style for its
834         enumeration values, as well as a 'E' prefix that surely had some meaning
835         in the past, but not nowadays.
836
837         No behavior changes, covered by existing tests.
838
839         * accessibility/AccessibilityRenderObject.cpp:
840         (WebCore::AccessibilityRenderObject::hasPlainText):
841         (WebCore::AccessibilityRenderObject::hasUnderline):
842         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
843         (getAttributeSetForAccessibilityObject):
844         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
845         (AXAttributeStringSetStyle):
846         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
847         (AXAttributeStringSetStyle):
848         * css/CSSComputedStyleDeclaration.cpp:
849         (WebCore::renderTextDecorationFlagsToCSSValue):
850         * css/CSSPrimitiveValueMappings.h:
851         (WebCore::CSSPrimitiveValue::operator TextDecoration):
852         * css/DeprecatedStyleBuilder.cpp:
853         (WebCore::ApplyPropertyTextDecoration::applyValue):
854         (WebCore::ApplyPropertyTextDecoration::createHandler):
855         * editing/mac/EditorMac.mm:
856         (WebCore::Editor::fontAttributesForSelectionStart):
857         * platform/mac/HTMLConverter.mm:
858         (+[WebHTMLConverter editingAttributedStringFromRange:]):
859         * rendering/InlineTextBox.cpp:
860         (WebCore::InlineTextBox::paint):
861         (WebCore::InlineTextBox::paintDecoration):
862         * rendering/InlineTextBox.h:
863         * rendering/RenderObject.cpp:
864         (WebCore::RenderObject::getTextDecorationColors):
865         * rendering/style/RenderStyle.h:
866         * rendering/style/RenderStyleConstants.h:
867         (WebCore::operator|):
868         (WebCore::operator|=):
869         * rendering/style/StyleVisualData.h:
870         (StyleVisualData):
871         * rendering/svg/SVGInlineTextBox.cpp:
872         (WebCore::SVGInlineTextBox::paint):
873         (WebCore::positionOffsetForDecoration):
874         (WebCore::thicknessForDecoration):
875         (WebCore::findRenderObjectDefininingTextDecoration):
876         (WebCore::SVGInlineTextBox::paintDecoration):
877         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
878         * rendering/svg/SVGInlineTextBox.h:
879
880 2013-05-22  Lori Anderson  <lori@rkymtnhi.com>
881
882         [GStreamer] Allow multiple log levels in media player
883         https://bugs.webkit.org/show_bug.cgi?id=116618
884
885         Reviewed by Philippe Normand.
886
887         No new tests, just changing logging.
888
889         * platform/graphics/gstreamer/GStreamerUtilities.h:
890         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
891         (WebCore::MediaPlayerPrivateGStreamer::load):
892         (WebCore::MediaPlayerPrivateGStreamer::pause):
893         (WebCore::MediaPlayerPrivateGStreamer::seek):
894         (WebCore::MediaPlayerPrivateGStreamer::setRate):
895         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
896
897 2013-05-22  Beth Dakin  <bdakin@apple.com>
898
899         The LayoutMilestones didLayout callback sometimes fires with a milestone value of 0
900         https://bugs.webkit.org/show_bug.cgi?id=116623
901
902         Reviewed by Geoffrey Garen.
903
904         Make sure we have actually achieved some milestones before calling didLayout().
905         * page/FrameView.cpp:
906         (WebCore::FrameView::performPostLayoutTasks):
907
908 2013-05-22  Mario Sanchez Prada  <mario.prada@samsung.com>
909
910         [GTK] Reimplement atk_text_get_text_*_offset for CHAR boundary
911         https://bugs.webkit.org/show_bug.cgi?id=114870
912
913         Reviewed by Martin Robinson.
914
915         Re-implement this functions without using GailTextUtil nor Pango.
916
917         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
918         (webkitAccessibleTextGetChar): New function.
919         (webkitAccessibleTextGetTextForOffset): Call the new function for CHAR.
920
921 2013-05-22  Antoine Quint  <graouts@apple.com>
922
923         [Mac] Captions menu isn't internationalized, doesn't use rtl layout for rtl languages
924         https://bugs.webkit.org/show_bug.cgi?id=116605
925
926         Reviewed by Eric Carlson.
927
928         Ensure that rtl languages are properly recognized by the captions menu such that text
929         layout and alignment is natural.
930
931         * css/mediaControls.css:
932         (::-webkit-media-controls):
933         Remove the forced "direction: ltr" property which was forcing all layout to be
934         left-to-right.
935
936         * css/mediaControlsQuickTime.css:
937         (video::-webkit-media-controls-closed-captions-track-list):
938         Remove the forced "text-align: left" property which was forcing all caption
939         titles to be left-aligned.
940
941         (video::-webkit-media-controls-closed-captions-track-list h3):
942         Use "-webkit-margin-start" instead of "padding-left" to position the heading
943         such that it adds the margin on the left for ltr languages and on the right
944         for rtl languages.
945
946         (video::-webkit-media-controls-closed-captions-track-list li):
947         Set "position: relative" such that the ::before pseudo-class can use "position: absolute"
948         to position itself relative to the caption title rather than the list element.
949
950         (video::-webkit-media-controls-closed-captions-track-list li.selected::before):
951         (video::-webkit-media-controls-closed-captions-track-list li.selected:hover::before):
952         Make the checkmarks a ::before pseudo-class rather than a background-image such that
953         we may control its positioning using the internationlization-friendly "-webkit-margin-start"
954         property.
955
956         * html/shadow/MediaControlElements.cpp:
957         (WebCore::MediaControlClosedCaptionsContainerElement::create):
958         Set the "dir" attribute to "auto" such that rtl languages are correctly handled. This
959         means that the first string displayed within the captions container, currently the
960         "Subtitles" <h3> element, defines the direction for the whole container. It is therefore
961         crucial that this string is properly localized in rtl languages as falling back to
962         english would mean the entire caption container is using ltr.
963
964 2013-05-22  Hugo Parente Lima  <hugo.lima@openbossa.org>
965
966         WebCore fails to compile with -Werror=maybe-uninitialized on GCC 4.8.0
967         https://bugs.webkit.org/show_bug.cgi?id=116340
968
969         Reviewed by Christophe Dumez.
970
971         No new tests, just a simple build fix.
972
973         * inspector/InspectorDOMStorageAgent.cpp:
974         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): Init frame variable.
975         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): Init frame variable.
976
977 2013-05-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
978
979         Have IDL interface names match their global constructor
980         https://bugs.webkit.org/show_bug.cgi?id=116520
981
982         Reviewed by Kentaro Hara.
983
984         Have IDL interface names match their global constructor name on DOMWindow.idl
985         using [InterfaceName] extended attribute. This affects in particular webkit
986         prefixed constructors. This is mandated by Web IDL specification:
987         http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
988
989         As a consequence, we can now get rid of [NoInterfaceObject] extended attribute
990         for those interfaces and have their global constructors automatically generated
991         by the bindings generator.
992
993         No new tests, no behavior change for layout tests.
994
995         * Modules/mediasource/MediaSource.idl:
996         * Modules/mediasource/SourceBuffer.idl:
997         * Modules/mediasource/SourceBufferList.idl:
998         * Modules/mediastream/MediaStream.idl:
999         * Modules/mediastream/RTCPeerConnection.idl:
1000         * Modules/speech/SpeechGrammar.idl:
1001         * Modules/speech/SpeechGrammarList.idl:
1002         * Modules/speech/SpeechRecognition.idl:
1003         * Modules/speech/SpeechRecognitionError.idl:
1004         * Modules/speech/SpeechRecognitionEvent.idl:
1005         * Modules/webaudio/OfflineAudioContext.idl:
1006         * Modules/webaudio/PannerNode.idl:
1007         * dom/ShadowRoot.idl:
1008         * page/DOMWindow.idl:
1009
1010 2013-05-21  Mihai Tica  <mitica@adobe.com>
1011         
1012         Update the background blending implementation to match the changes done
1013         in the spec. This implies that background color blending is removed and
1014         the background layers won't blend with the content behind the element
1015         any more.
1016         https://bugs.webkit.org/show_bug.cgi?id=116212
1017
1018         Reviewed by Dean Jackson.
1019
1020         * rendering/RenderBox.cpp:
1021         (WebCore::RenderBox::paintFillLayers):
1022         * rendering/RenderBoxModelObject.cpp:
1023         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1024
1025 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
1026
1027         Use-after-free in DOMSelection::containsNode
1028         https://bugs.webkit.org/show_bug.cgi?id=116468
1029
1030         Reviewed by Andreas Kling.
1031
1032         Retain the node pointer. Also bail out early if the node was not in the document
1033         since Range::compareBoundaryPoints sets ec to WRONG_DOCUMENT_ERR otherwise.
1034
1035         Test: editing/selection/contains-node-crash.html
1036
1037         * page/DOMSelection.cpp:
1038         (WebCore::DOMSelection::containsNode):
1039         * page/DOMSelection.h:
1040         (DOMSelection):
1041
1042 2013-05-21  Joseph Pecoraro  <pecoraro@apple.com>
1043
1044         Web Inspector: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results
1045         https://bugs.webkit.org/show_bug.cgi?id=116569
1046
1047         Merge: https://chromium.googlesource.com/chromium/blink/+/7f1cfecfe34f4dbc6ce1ef0250b13f2058128eeb
1048
1049         Reviewed by Timothy Hatcher.
1050
1051         Test: inspector/load-resource-synchronously-utf8.html
1052
1053         * inspector/InspectorFrontendHost.cpp:
1054         (WebCore::InspectorFrontendHost::loadResourceSynchronously):
1055
1056 2013-05-21  Andy Estes  <aestes@apple.com>
1057
1058         Allow session storage for third-party origins even if third-party data access is blocked.
1059         https://bugs.webkit.org/show_bug.cgi?id=116532
1060
1061         Reviewed by Anders Carlsson.
1062
1063         In http://trac.webkit.org/changeset/149326 we relaxed our policy for
1064         localStorage when third-party data blocking is enabled to create a
1065         transient, session-scoped storage area for the third-party origin
1066         instead of throwing an exception. Since this gives essentially the same
1067         behavior as sessionStorage, we might as well also allow sessionStorage
1068         for third-party origins.
1069
1070         Test: http/tests/security/cross-origin-session-storage-third-party-blocked.html
1071
1072         * WebCore.exp.in: Updated the symbol for
1073         SecurityOrigin::canAccessStorage.
1074         * page/DOMWindow.cpp:
1075         (WebCore::DOMWindow::sessionStorage): Called canAccessSessionStorage()
1076         rather than canAccessLocalStorage().
1077         * page/SecurityOrigin.cpp:
1078         (WebCore::SecurityOrigin::canAccessStorage): Passed in an enum
1079         indicating if access should be allowed from third-party origins.
1080         * page/SecurityOrigin.h:
1081         (WebCore::SecurityOrigin::canAccessSessionStorage): Called
1082         canAccessStorage() with AlwaysAllowFromThirdParty.
1083         (SecurityOrigin):
1084
1085 2013-05-21  Hugo Parente Lima  <hugo.lima@openbossa.org>
1086
1087         [EFL] Add missing #if guards on drag support methods
1088         https://bugs.webkit.org/show_bug.cgi?id=116574
1089
1090         Reviewed by Christophe Dumez.
1091
1092         * platform/efl/PasteboardEfl.cpp:
1093         (WebCore):
1094
1095 2013-05-21  Antti Koivisto  <antti@apple.com>
1096
1097         Remove stub HTMLContentElement
1098         https://bugs.webkit.org/show_bug.cgi?id=116580
1099
1100         Reviewed by Andreas Kling.
1101
1102         Inherit DetailsContentElement and DetailsSummaryElement directly from InsertionPoint instead.
1103
1104         * html/HTMLDetailsElement.cpp:
1105         (WebCore::DetailsContentElement::DetailsContentElement):
1106         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
1107         * html/HTMLSummaryElement.cpp:
1108         (WebCore::SummaryContentElement::SummaryContentElement):
1109         * html/shadow/HTMLContentElement.cpp:
1110         (WebCore::HTMLContentElement::contentTagName):
1111         * html/shadow/HTMLContentElement.h:
1112         (WebCore::isHTMLContentElement):
1113         * html/shadow/InsertionPoint.cpp:
1114         (WebCore::InsertionPoint::setResetStyleInheritance):
1115         * html/shadow/InsertionPoint.h:
1116         
1117             Also remove some leftover selector code.
1118
1119         (WebCore::InsertionPoint::insertionPointType):
1120
1121 2013-05-21  Andreas Kling  <akling@apple.com>
1122
1123         Robustify repaint of previous caret node when moving FrameSelection.
1124         <http://webkit.org/b/116558>
1125
1126         Reviewed by Ryosuke Niwa.
1127
1128         As a follow-up to r150396, also repaint the caret rects if the previous node is contenteditable.
1129
1130         * editing/FrameSelection.cpp:
1131         (WebCore::FrameSelection::recomputeCaretRect):
1132
1133 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
1134
1135         Unreviewed build fix after r150469. We need to bail out here when DOM is mutated by an event listener such that
1136         the split text nodes no longer exist right next to each other.
1137
1138         * editing/InsertParagraphSeparatorCommand.cpp:
1139         (WebCore::InsertParagraphSeparatorCommand::doApply):
1140
1141 2013-05-21  Antti Koivisto  <antti@apple.com>
1142
1143         Remove ScopeContentDistribution
1144         https://bugs.webkit.org/show_bug.cgi?id=116576
1145
1146         Reviewed by Andreas Kling.
1147
1148         With maximum one ShadowRoot per Element this can be smashed into ContentDistributor.
1149
1150         * dom/ShadowRoot.cpp:
1151         (WebCore):
1152         * dom/ShadowRoot.h:
1153         (WebCore):
1154         * html/shadow/ContentDistributor.cpp:
1155         (WebCore::ContentDistributor::ContentDistributor):
1156         (WebCore):
1157         (WebCore::ContentDistributor::~ContentDistributor):
1158         (WebCore::ContentDistributor::invalidateInsertionPointList):
1159         (WebCore::ContentDistributor::ensureInsertionPointList):
1160         (WebCore::ContentDistributor::distribute):
1161         (WebCore::ContentDistributor::invalidate):
1162         * html/shadow/ContentDistributor.h:
1163         (WebCore):
1164         (ContentDistributor):
1165         * html/shadow/InsertionPoint.cpp:
1166         (WebCore::InsertionPoint::InsertionPoint):
1167         (WebCore::InsertionPoint::insertedInto):
1168         (WebCore::InsertionPoint::removedFrom):
1169         
1170             Simplify insertion point list invalidation.
1171
1172         * html/shadow/InsertionPoint.h:
1173
1174 2013-05-21  Zoltan Horvath  <zoltan@webkit.org>
1175
1176         [CSS Regions][CSS Exclusions] Multiple regions with shape-insides should respect positioned shapes and overflow
1177         https://bugs.webkit.org/show_bug.cgi?id=115001
1178
1179         Reviewed by David Hyatt.
1180
1181         In r150375 I implemented the new overflow behavior for shape-inside on regions, but it covered only the simple cases
1182         when you had only one region. This patch adds support for the new overflow behavior for multiple regions with multiple
1183         positioned shape-insides and overflow.
1184
1185         Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
1186                fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-multiple-shapes.html
1187
1188         * rendering/RenderBlockLineLayout.cpp:
1189         (WebCore::RenderBlock::updateLineBoundariesForExclusions): Cover cases when content flows into the next region, update the
1190         line segments for the overflow.
1191         (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): In flow thread case we don't want to adjust the height
1192         in two places.
1193
1194 2013-05-21  Commit Queue  <commit-queue@webkit.org>
1195
1196         Unreviewed, rolling out r150425.
1197         http://trac.webkit.org/changeset/150425
1198         https://bugs.webkit.org/show_bug.cgi?id=116573
1199
1200         Not the right fix for WebKit2 (Requested by rniwa on #webkit).
1201
1202         * testing/Internals.cpp:
1203         (WebCore::Internals::resetToConsistentState):
1204
1205 2013-05-20  Ryosuke Niwa  <rniwa@webkit.org>
1206
1207         dispatchEvent call can execute javascript and blow away endRoot from underneath
1208         https://bugs.webkit.org/show_bug.cgi?id=116483
1209
1210         Reviewed by Andreas Kling.
1211         
1212         Merge https://chromium.googlesource.com/chromium/blink/+/798cba0af9b2aff21e475e2e08ea3ca5e97dfc2c.
1213
1214         Test: editing/undo/undo-after-event-edited.html
1215
1216         * editing/Editor.cpp:
1217         (WebCore::dispatchEditableContentChangedEvents):
1218
1219 2013-05-21  Antti Koivisto  <antti@apple.com>
1220
1221         Remove ContentDistribution
1222         https://bugs.webkit.org/show_bug.cgi?id=116527
1223
1224         Reviewed by Andreas Kling.
1225
1226         Resolving distribution on traversal is simpler.
1227
1228         * WebCore.exp.in:
1229         * dom/ComposedShadowTreeWalker.cpp:
1230         (WebCore::ComposedShadowTreeWalker::traverseNode):
1231         (WebCore::ComposedShadowTreeWalker::traverseDistributedNodes):
1232         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
1233         * html/HTMLDetailsElement.cpp:
1234         * html/shadow/ContentDistributor.cpp:
1235         (WebCore::ContentDistributor::distributeSelectionsTo):
1236         * html/shadow/ContentDistributor.h:
1237         * html/shadow/HTMLContentElement.idl:
1238         
1239             Remove getDistributedNodes().
1240
1241         * html/shadow/InsertionPoint.cpp:
1242         (WebCore::InsertionPoint::InsertionPoint):
1243         (WebCore::InsertionPoint::attach):
1244         (WebCore::InsertionPoint::detach):
1245         (WebCore):
1246         (WebCore::InsertionPoint::firstDistributed):
1247         (WebCore::InsertionPoint::lastDistributed):
1248         (WebCore::InsertionPoint::nextDistributedTo):
1249         (WebCore::InsertionPoint::previousDistributedTo):
1250         
1251             Rename for clarity.
1252
1253         * html/shadow/InsertionPoint.h:
1254         (WebCore::InsertionPoint::hasDistribution):
1255         (WebCore::InsertionPoint::setHasDistribution):
1256         (WebCore::InsertionPoint::clearDistribution):
1257         (WebCore::InsertionPoint::matchTypeFor):
1258         (InsertionPoint):
1259
1260 2013-05-21  Martin Robinson  <mrobinson@igalia.com>
1261
1262         [GTK] [CMake] Add support for building WebKit2
1263         https://bugs.webkit.org/show_bug.cgi?id=116372
1264
1265         Reviewed by Gustavo Noronha Silva.
1266
1267         * PlatformGTK.cmake: Add missing source files, include directories, and WebP properties.
1268
1269 2013-05-21  Jer Noble  <jer.noble@apple.com>
1270
1271         REGRESSION(r101810): Media controls status text missing for live-stream videos.
1272         https://bugs.webkit.org/show_bug.cgi?id=116547
1273
1274         Reviewed by Eric Carlson.
1275
1276         Un-reverse the logic in loadedMetadata() so that the status text isn't
1277         hidden (when it should be shown) for live-stream videos.
1278
1279         * html/shadow/MediaControlsApple.cpp:
1280         (WebCore::MediaControlsApple::loadedMetadata):
1281
1282 2013-05-21  Jer Noble  <jer.noble@apple.com>
1283
1284         Implement overlap-avoidance for in-band text track cues.
1285         https://bugs.webkit.org/show_bug.cgi?id=116540
1286
1287         Reviewed by Eric Carlson.
1288
1289         In-band (or Generic) cues need special casing for certain features
1290         present in in-band tracks, like paint-on and roll-up modes. To avoid
1291         the problem of overlap avoidance forcing a caption meant to appear
1292         below a cue to appear above it when a larger font size is selected,
1293         impose an additional sort ordering for "generic cues". Instead of
1294         cues being ordered by the order they appear in the track, "generic
1295         cues" further sorted by their position within the video area, such
1296         that cues at the bottom of the video area appear first, and later
1297         cues are pushed up to avoid them, preserving the desired apparent
1298         ordering.
1299
1300         * html/HTMLMediaElement.cpp:
1301         (WebCore::compareCueInterval): Added; wrapper around
1302             TextTrackCue::isOrderedBefore.
1303         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
1304             After creating the list of current cues, sort them.
1305         * html/track/TextTrackCue.cpp:
1306         (WebCore::TextTrackCue::isOrderedBefore): Added; implementation moved
1307             from TextTrackCueList::add().
1308         * html/track/TextTrackCue.h:
1309         * html/track/TextTrackCueGeneric.cpp:
1310         (WebCore::TextTrackCueGeneric::isOrderedBefore): Added override;
1311             impose additional oredring on generic cues.
1312         * html/track/TextTrackCueGeneric.h:
1313         * html/track/TextTrackCueList.cpp:
1314         (WebCore::TextTrackCueList::add): Moved ordering test into
1315             isOrderedBefore().
1316         * rendering/RenderTextTrackCue.cpp:
1317         (WebCore::RenderTextTrackCue::repositionGenericCue):
1318             Call repositionCueSnapToLinesNotSet() after positioning the cue.
1319
1320 2013-05-20  Jer Noble  <jer.noble@apple.com>
1321
1322         Implement overlap avoidance for cues with snap-to-lines flag not set
1323         https://bugs.webkit.org/show_bug.cgi?id=84296
1324
1325         Reviewed by Eric Carlson.
1326
1327         Test: media/track/track-cue-overlap-snap-to-lines-not-set.html
1328
1329         Support overlap avoidance for the non-snap-to-lines part of the WebVTT spec.
1330
1331         * rendering/RenderTextTrackCue.cpp:
1332         (WebCore::RenderTextTrackCue::isOutside): Split implementation into rectIsWithinContainer().
1333         (WebCore::RenderTextTrackCue::rectIsWithinContainer): Ditto.
1334         (WebCore::RenderTextTrackCue::isOverlapping): Split into overlappingObject() and overlappingObjectForRect().
1335         (WebCore::RenderTextTrackCue::overlappingObject): Ditto.
1336         (WebCore::RenderTextTrackCue::overlappingObjectForRect): Ditto.
1337         (WebCore::RenderTextTrackCue::moveIfNecessaryToKeepWithinContainer): Added.
1338         (WebCore::RenderTextTrackCue::findNonOverlappingPosition): When an overlapping object is found, move the
1339             cue to just above or below that object and try again.
1340         (WebCore::RenderTextTrackCue::repositionCueSnapToLinesSet): Move implementation into moveIfNecessaryToKeepWithinContainer().
1341         (WebCore::RenderTextTrackCue::repositionCueSnapToLinesNotSet): Add implementanton based on above.
1342         * rendering/RenderTextTrackCue.h:
1343
1344 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
1345
1346         Remove GraphicsLayerClient::contentsVisible()
1347         https://bugs.webkit.org/show_bug.cgi?id=116523
1348
1349         Reviewed by Darin Adler.
1350
1351         This is dead code from the BlackBerry port.
1352
1353         * platform/graphics/GraphicsLayerClient.h:
1354         * rendering/RenderLayerBacking.cpp:
1355
1356 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
1357
1358         PLATFORM(*) macros used in Source/WebCore/loader/archive/ArchiveFactory.cpp
1359         https://bugs.webkit.org/show_bug.cgi?id=116453
1360
1361         Reviewed by Alexey Proskuryakov.
1362
1363         * loader/archive/ArchiveFactory.cpp: Remove a redundant PLATFORM(QT) macro when checking whether
1364         to include the LegacyWebArchive.h header that's specific to the WebArchive support. The Qt port
1365         does not enable the WebArchive feature at all (which is enabled only on AppleMac, AppleWin and iOS
1366         platforms) so there's no reason to additionally condition the header include with building on
1367         non-Qt platforms.
1368
1369 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
1370
1371         Add BlackBerry definition of NativeImagePtr
1372         https://bugs.webkit.org/show_bug.cgi?id=116526
1373
1374         Reviewed by Darin Adler.
1375
1376         * platform/graphics/NativeImagePtr.h:
1377         (Graphics):
1378         (WebCore):
1379
1380 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
1381
1382         [BlackBerry] FontCache::getFontDataForCharacters() returns nullptr
1383         https://bugs.webkit.org/show_bug.cgi?id=116529
1384
1385         Reviewed by Andreas Kling.
1386
1387         This cannot be converted to a PassRefPtr and breaks the build.
1388
1389         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
1390         (WebCore::FontCache::getFontDataForCharacters):
1391
1392 2013-05-21  Iago Toral Quiroga  <itoral@igalia.com>
1393
1394         [GTK] Always use EGL to create the GL context when running on Wayland
1395         https://bugs.webkit.org/show_bug.cgi?id=115721
1396
1397         Reviewed by Martin Robinson.
1398
1399         * platform/graphics/cairo/GLContext.cpp:
1400         (WebCore::GLContext::createContextForWindow):
1401         (WebCore::GLContext::createOffscreenContext): Always use EGL to create the GL context
1402         instead of GLX when running on Wayland and make createOffScreenContext reuse the code
1403         in createContextWindow.
1404
1405 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
1406
1407         Add FloatRect::normalized() for BlackBerry
1408         https://bugs.webkit.org/show_bug.cgi?id=116531
1409
1410         Reviewed by Carlos Garcia Campos.
1411
1412         This was added to FloatRectBlackBerry.cpp in r111072 when the
1413         graphics platform code was upstreamed, but this change was
1414         missing.
1415
1416         * platform/graphics/FloatRect.h:
1417         (FloatRect):
1418
1419 2013-05-21  Balazs Kelemen  <kbalazs@webkit.org>
1420
1421         [GStreamer] cleanup duration query
1422         https://bugs.webkit.org/show_bug.cgi?id=116228
1423
1424         Reviewed by Philippe Normand.
1425
1426         Covered by existing tests.
1427
1428         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1429         (WebCore::MediaPlayerPrivateGStreamer::duration):
1430         We can also cache the duration here if the query succeeds.
1431         (MediaPlayerPrivateGStreamer::updateStates):
1432         Don't query when we are in GST_STATE_READY state because it never succeeds.
1433         Do it instead when we reached a stable state.
1434         (MediaPlayerPrivateGStreamer::cacheDuration): Return early if it is already
1435         cached. Recaching is not necessary and now we call it a lot of times.
1436         Only look into the state if the query failed.
1437         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1438         (MediaPlayerPrivateGStreamer): Made m_mediaDuration mutable to be
1439         able to cache it in duration(). Internal cached values is one of
1440         the sensible uses of mutable.
1441
1442 2013-05-21  Patrick Gansterer  <paroga@webkit.org>
1443
1444         Build fix for !USE(ACCELERATED_COMPOSITING) after r150307.
1445
1446         * rendering/RenderLayerCompositor.h: Added missing #if USE(ACCELERATED_COMPOSITING).
1447
1448 2013-05-20  Antti Koivisto  <antti@apple.com>
1449
1450         Simplify Shadow DOM distribution code
1451         https://bugs.webkit.org/show_bug.cgi?id=116454
1452
1453         Reviewed by Andreas Kling.
1454         
1455         Remove code supporting nested insertion points and distributing to multiple insertion points.
1456     
1457         * html/HTMLDetailsElement.cpp:
1458         (DetailsContentElement):
1459         
1460             Make distribution to <details> and <summary> mutually exclusive.
1461
1462         * html/shadow/ContentDistributor.cpp:
1463         (WebCore):
1464         (WebCore::ContentDistributor::distribute):
1465         (WebCore::ContentDistributor::invalidate):
1466         (WebCore::ContentDistributor::distributeSelectionsTo):
1467         * html/shadow/ContentDistributor.h:
1468         * html/shadow/InsertionPoint.cpp:
1469         (WebCore::resolveReprojection):
1470
1471 2013-05-21  Mihnea Ovidenie  <mihnea@adobe.com>
1472
1473         [CSSRegions] Constrain auto-height region computation in a different way
1474         https://bugs.webkit.org/show_bug.cgi?id=116310
1475
1476         Reviewed by Alexandru Chiculita.
1477
1478         After https://bugs.webkit.org/show_bug.cgi?id=74132, the region is a render block. We can use RenderBox::constrainContentBoxLogicalHeightByMinMax
1479         instead of RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight to better reflect the fact that the region is not a replaced element.
1480         Covered by existing regions tests, since when replaced-based the region had an intrinsic height of 0 and now, block-based, it does not have any children.
1481
1482         * rendering/RenderFlowThread.cpp:
1483         (WebCore::RenderFlowThread::addForcedRegionBreak):
1484
1485 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
1486
1487         REGRESSION(r150393): editing/inserting/typing-at-end-of-line.html fails
1488         https://bugs.webkit.org/show_bug.cgi?id=116516
1489
1490         Reviewed by Antti Koivisto.
1491
1492         The bug was caused by DRT not resetting various auto correction states.
1493         Do that in Internals::resetToConsistentState.
1494
1495         * testing/Internals.cpp:
1496         (WebCore::Internals::resetToConsistentState):
1497
1498 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
1499
1500         [GTK] Fix concatenations of string literals that are not C++11-compliant
1501         https://bugs.webkit.org/show_bug.cgi?id=116449
1502
1503         Reviewed by Martin Robinson.
1504
1505         Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
1506         is simply a matter of separating the string and the string literal that are being concatenated with a space.
1507
1508         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
1509         * platform/gtk/FileSystemGtk.cpp:
1510         (WebCore::sharedResourcesPath):
1511
1512 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
1513
1514         [GTK] Support application/x-mimearchive mimetype for MHTML archives instead of message/rfc822
1515         https://bugs.webkit.org/show_bug.cgi?id=116442
1516
1517         Reviewed by Martin Robinson.
1518
1519         * loader/archive/ArchiveFactory.cpp:
1520         (WebCore::archiveMIMETypes): Like EFL and Qt, register the application/x-mimearchive mime type as a MHTML archive type
1521         and stop propagating the message/rfc822 mime type as such. This also removes a couple of PLATFORM ifdefs.
1522
1523 2013-05-20  Benjamin Poulain  <bpoulain@apple.com>
1524
1525         Minor String fixes in CSS
1526         https://bugs.webkit.org/show_bug.cgi?id=116291
1527
1528         Reviewed by Darin Adler.
1529
1530         Some trival changes to make up for a bad day :)
1531
1532         * css/CSSImageSetValue.cpp:
1533         (WebCore::CSSImageSetValue::customCssText):
1534         * css/CSSImageValue.cpp:
1535         (WebCore::CSSImageValue::customCssText):
1536         * css/CSSImportRule.cpp:
1537         (WebCore::CSSImportRule::cssText):
1538         * css/CSSInheritedValue.cpp:
1539         (WebCore::CSSInheritedValue::customCssText):
1540         * css/CSSInitialValue.cpp:
1541         (WebCore::CSSInitialValue::customCssText):
1542         * css/CSSPrimitiveValue.cpp:
1543         (WebCore::CSSPrimitiveValue::customCssText):
1544         * css/CSSPropertySourceData.cpp:
1545         (WebCore::CSSPropertySourceData::toString):
1546         * css/CSSSelector.cpp:
1547         (WebCore::CSSSelector::selectorText):
1548         * css/CSSStyleRule.cpp:
1549         (WebCore::CSSStyleRule::generateSelectorText):
1550         * css/CSSStyleSheet.h:
1551         (WebCore::CSSStyleSheet::type):
1552         * css/CSSTimingFunctionValue.cpp:
1553         (WebCore::CSSLinearTimingFunctionValue::customCssText):
1554         (WebCore::CSSCubicBezierTimingFunctionValue::customCssText):
1555         * css/CSSValueList.cpp:
1556         (WebCore::CSSValueList::customCssText):
1557         (WebCore::CSSValueList::customSerializeResolvingVariables):
1558         * css/MediaQueryExp.cpp:
1559         (WebCore::MediaQueryExp::serialize):
1560         * css/WebKitCSSFilterValue.cpp:
1561         (WebCore::WebKitCSSFilterValue::customCssText):
1562         * css/WebKitCSSKeyframesRule.cpp:
1563         (WebCore::StyleRuleKeyframes::findKeyframeIndex):
1564         (WebCore::WebKitCSSKeyframesRule::cssText):
1565         * css/WebKitCSSMatFunctionValue.cpp:
1566         (WebCore::WebKitCSSMatFunctionValue::customCssText):
1567         * css/WebKitCSSMixFunctionValue.cpp:
1568         (WebCore::WebKitCSSMixFunctionValue::customCssText):
1569
1570 2013-05-20  Ryosuke Niwa  <rniwa@webkit.org>
1571
1572         Null pointer deference in WebCore::AppendNodeCommand::create
1573         https://bugs.webkit.org/show_bug.cgi?id=116479
1574
1575         Reviewed by Andreas Kling.
1576         
1577         Merge https://chromium.googlesource.com/chromium/blink/+/5cb43002a44f67a60ecf5a7ed76de2d0bcf89eb2
1578
1579         DeleteSelection::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss() make style and link elements
1580         to be the direct children of the editable root. However, these style and link elements are not necessary editable
1581         and WebKit crashes when they are not.
1582
1583         Test: editing/deleting/delete-uneditable-style.html
1584
1585         * editing/DeleteSelectionCommand.cpp:
1586         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
1587
1588 2013-05-20  Beth Dakin  <bdakin@apple.com>
1589
1590         Scrollbars still show sometimes even when WKPageSetSuppressScrollbarAnimations() 
1591         is set
1592         https://bugs.webkit.org/show_bug.cgi?id=116493
1593         -and corresponding-
1594         <rdar://problem/13912871>
1595
1596         Reviewed by Dean Jackson.
1597
1598         We need to be more aggressive with our approach since AppKit may still ask the 
1599         scrollbars to paint here.
1600
1601         scrollbarAnimationsAreSuppressed() will allow us to find out if the setting has 
1602         been set.
1603         * page/FrameView.cpp:
1604         (WebCore::FrameView::scrollbarAnimationsAreSuppressed):
1605         * page/FrameView.h:
1606         * platform/ScrollableArea.h:
1607         (WebCore::ScrollableArea::scrollbarAnimationsAreSuppressed):
1608         * rendering/RenderLayer.cpp:
1609         (WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
1610         * rendering/RenderLayer.h:
1611         (RenderLayer):
1612         * rendering/RenderListBox.cpp:
1613         (WebCore::RenderListBox::scrollbarAnimationsAreSuppressed):
1614         * rendering/RenderListBox.h:
1615
1616         Don’t allow animations if scrollbars are suppressed.
1617         * platform/mac/ScrollAnimatorMac.mm:
1618         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
1619
1620         Call cancelAnimations() to prevent a just-started animation from continuing.
1621         (WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
1622
1623 2013-05-20  Andreas Kling  <akling@apple.com>
1624
1625         Avoid caret repaints if we're not showing carets anyway.
1626         <http://webkit.org/b/116489>
1627
1628         Reviewed by Simon Fraser.
1629
1630         When moving the selection, check if we're inside a contenteditable element (or in caret browsing mode)
1631         before repainting the caret's previous location.
1632
1633         * editing/FrameSelection.cpp:
1634         (WebCore::FrameSelection::recomputeCaretRect):
1635
1636 2013-05-20  Simon Fraser  <simon.fraser@apple.com>
1637
1638         position:sticky should stick for the enclosing overflow ancestor
1639         https://bugs.webkit.org/show_bug.cgi?id=100054
1640
1641         Reviewed by Beth Dakin.
1642         
1643         Make position: -webkit-sticky be constrained by an enclosing ancestor
1644         with non-visible overflow if there is one, rather than being constained
1645         always by the viewport.
1646
1647         Test: fast/css/sticky/sticky-top-overflow.html
1648
1649         * rendering/RenderBoxModelObject.cpp:
1650         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints): Rename
1651         viewportRect to constrainingRect, since it isn't just about the viewport any more.
1652         Fix an issue where just adding stickyLocation to absContainerFrame.location() was
1653         incorrect when the container is scrolled; we also have to take the scroll offset
1654         into account, and that offset is stored in the layer tree.
1655         (WebCore::RenderBoxModelObject::stickyPositionOffset):
1656         Look for an enclosing layer with overflow clipping, and, if found, use it to
1657         compute the sticky constraint rect.
1658         * rendering/RenderLayer.h: Add a helpful IncludeSelfOrNot, and fix several member functions
1659         to use it place of hard-to-read boolean arguments.
1660         Add enclosingOverflowClipLayer(IncludeSelfOrNot).
1661         (WebCore::RenderLayer::ancestorCompositingLayer):
1662         * rendering/RenderLayer.cpp:
1663         (WebCore::RenderLayer::enclosingOverflowClipLayer): New function, finds the enclosing
1664         layer with overflow clip.
1665         (WebCore::RenderLayer::enclosingCompositingLayer): Use IncludeSelfOrNot.
1666         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint): Ditto.
1667         (WebCore::RenderLayer::enclosingFilterLayer): Ditto.
1668         * rendering/RenderLayerCompositor.cpp:
1669         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor): Use IncludeSelfOrNot.
1670         (WebCore::isViewportConstrainedFixedOrStickyLayer): Renamed from isRootmostFixedOrStickyLayer
1671         and moved up so we can use it in requiresCompositingForPosition().
1672         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Only make sticky composited if
1673         it's viewport-constrained.
1674         (WebCore::RenderLayerCompositor::updateViewportConstraintStatus):
1675         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints): Declare StickyPositionViewportConstraints
1676         one line down to just before it gets used.
1677
1678 2013-05-20  Jeff Rogers  <jrogers@blackberry.com>
1679
1680         Remove DISABLE_ROUNDED_CORNER_CLIPPING
1681         https://bugs.webkit.org/show_bug.cgi?id=115531
1682
1683         Reviewed by Andreas Kling.
1684
1685         BlackBerry port is no longer using this.
1686
1687         * rendering/RenderLayer.cpp:
1688         (WebCore::inContainingBlockChain):
1689         (WebCore::RenderLayer::clipToRect):
1690
1691 2013-05-20  Tim Horton  <timothy_horton@apple.com>
1692
1693         Clients should have a way to extend rendering suppression
1694         https://bugs.webkit.org/show_bug.cgi?id=116463
1695         <rdar://problem/13738496>
1696
1697         Reviewed by Andy Estes.
1698
1699         * WebCore.exp.in:
1700         Export FrameView::setVisualUpdatesAllowedByClient.
1701
1702         * dom/Document.cpp:
1703         (WebCore::Document::setVisualUpdatesAllowed):
1704         Move rendering-suppression watchdog into setVisualUpdatesAllowed(bool).
1705         setVisualUpdatesAllowed(ReadyState) should not re-enable visual updates
1706         if the client is itself disabling visual updates.
1707
1708         (WebCore::Document::visualUpdatesSuppressionTimerFired):
1709         If the watchdog fires and the client is still disabling visual
1710         updates, we should not re-enable visual updates, but instead
1711         wait for the client.
1712
1713         (WebCore::Document::setVisualUpdatesAllowedByClient):
1714         Actually re-enable visual updates if we deferred the re-enabling above
1715         (when the page finishes loading, but the client had them disabled).
1716
1717         * dom/Document.h:
1718         (Document): Add setVisualUpdatesAllowedByClient.
1719         * page/FrameView.cpp:
1720         (WebCore::FrameView::FrameView): Visual updates are allowed by default.
1721         (WebCore::FrameView::setVisualUpdatesAllowedByClient):
1722         Forward through to the document, but we also need to persist the state
1723         here in FrameView so that it survives through navigation.
1724
1725         * page/FrameView.h:
1726         (WebCore::FrameView::setVisualUpdatesAllowedByClient): Added.
1727         (WebCore::FrameView::visualUpdatesAllowedByClient): Added.
1728         Added storage for m_visualUpdatesAllowedByClient.
1729
1730 2013-05-20  Hans Muller  <hmuller@adobe.com>
1731
1732         [CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape-outside values
1733         https://bugs.webkit.org/show_bug.cgi?id=116349
1734
1735         Reviewed by Alexandru Chiculita.
1736
1737         Add support for parsing image URI values for the shape-inside and shape-outside CSS properties.
1738         Extended the ExclusionShapeValue class to support tracking the property's StyleImage value.
1739
1740         The ExclusionShapeValue::type enums were changed from all upper case to "Intercase" by order
1741         of the style bot.
1742
1743         The existing CSS parsing tests were extended to check URI values.
1744
1745         * css/CSSComputedStyleDeclaration.cpp:
1746         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1747         * css/CSSParser.cpp:
1748         (WebCore::CSSParser::parseValue):
1749         * css/DeprecatedStyleBuilder.cpp:
1750         (WebCore::ApplyPropertyExclusionShape::applyValue):
1751         * css/StyleResolver.cpp:
1752         (WebCore::StyleResolver::loadPendingImages):
1753         * rendering/style/ExclusionShapeValue.h:
1754         (WebCore::ExclusionShapeValue::createImageValue):
1755         (ExclusionShapeValue):
1756         (WebCore::ExclusionShapeValue::image):
1757         (WebCore::ExclusionShapeValue::setImage):
1758         (WebCore::ExclusionShapeValue::ExclusionShapeValue):
1759
1760 2013-05-20  Radu Stavila  <stavila@adobe.com>
1761
1762         [CSSRegions] Fix offsetLeft / offsetTop for elements inside named flow
1763         https://bugs.webkit.org/show_bug.cgi?id=115899
1764
1765         Reviewed by David Hyatt.
1766
1767         Elements in named flows that have the body as their offsetParent, need to compute their
1768         offsetLeft and offsetTop values relative to the body.
1769
1770         Tests: fast/regions/offsetLeft-offsetTop-in-multiple-regions.html
1771                fast/regions/offsetLeft-offsetTop-in-region-absolute-sticky-fixed.html
1772                fast/regions/offsetLeft-offsetTop-in-region-float-vert-rl.html
1773                fast/regions/offsetLeft-offsetTop-in-region-float.html
1774                fast/regions/offsetLeft-offsetTop-inlines-region-in-element.html
1775
1776         * rendering/RenderBoxModelObject.cpp:
1777         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1778         * rendering/RenderFlowThread.cpp:
1779         (WebCore):
1780         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1781         * rendering/RenderFlowThread.h:
1782
1783 2013-05-20  Zoltan Horvath  <zoltan@webkit.org>
1784
1785         [CSS Regions][CSS Exclusions] shape-inside on regions should respect positioned shapes and overflow
1786         https://bugs.webkit.org/show_bug.cgi?id=116252
1787
1788         Reviewed by David Hyatt.
1789
1790         Regions should respect shape-inside properties which have specified top offset. Since the content which overflows from the
1791         shape should be pushed after the content box (for details check out r148975), I implemented  overflowthe behavior for simple
1792         cases when you have only one region. I'm going to implement it for additional regions in a follow up patch.
1793
1794         Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-basic-overflow-shape-top-offset.html
1795                fast/regions/shape-inside/shape-inside-on-regions-inline-content-basic-overflow-shape-top-offset.html
1796
1797         * rendering/RenderBlockLineLayout.cpp:
1798         (WebCore::RenderBlock::updateLineBoundariesForExclusions): Handle the flow thread case, push the overflowing content after the
1799         content box. Respect existing shape-inside on region tests.
1800         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Set the correct logical top position for the shape-inside in
1801         the case of regions. Respect the region's margins and paddings.
1802
1803 2013-05-20  Darin Adler  <darin@apple.com>
1804
1805         Remove custom binding for the Clipboard clearData function
1806         https://bugs.webkit.org/show_bug.cgi?id=116421
1807
1808         Reviewed by Andreas Kling.
1809
1810         * bindings/js/JSClipboardCustom.cpp: Removed the clearData binding.
1811
1812         * dom/Clipboard.idl: Removed [Custom].
1813
1814         * dom/Clipboard.cpp:
1815         (WebCore::Clipboard::clearData): Renamed from clearAllData.
1816         * dom/Clipboard.h: Rename clearAllData to clearData so we just use
1817         overloading for the one with and without a MIME type.
1818         * platform/ios/ClipboardIOS.h: Rename clearAllData to clearData.
1819         * platform/ios/ClipboardIOS.mm:
1820         (WebCore::ClipboardIOS::clearData): Ditto.
1821         * platform/qt/ClipboardQt.cpp:
1822         (WebCore::ClipboardQt::clearData). Ditto.
1823         * platform/qt/ClipboardQt.h: Ditto.
1824         * platform/win/ClipboardWin.cpp:
1825         (WebCore::ClipboardWin::clearData): Ditto.
1826         * platform/win/ClipboardWin.h: Ditto.
1827
1828 2013-05-20  Eric Carlson  <eric.carlson@apple.com>
1829
1830         [iOS] media/event-queue-crash.html ASSERTs in notifyChildInserted
1831         https://bugs.webkit.org/show_bug.cgi?id=116444
1832
1833         Reviewed by Jer Noble.
1834
1835         No new tests, covered by existing tests.
1836
1837         * html/HTMLMediaElement.cpp:
1838         (WebCore::HTMLMediaElement::configureMediaControls): Only create media controls when the
1839             element is in a Document.
1840
1841 2013-05-20  Antoine Quint  <graouts@apple.com>
1842
1843         [Mac] captions menu should behave more like a menu
1844         https://bugs.webkit.org/show_bug.cgi?id=116436
1845
1846         Reviewed by Eric Carlson.
1847
1848         Let the captions menu behave more like a native Mac menu by hiding it when
1849         clicking anywhere on the page and preventing the page from scrolling when
1850         attempting to scroll the captions menu when it cannot scroll in the requested
1851         direction.
1852
1853         Test: media/video-controls-captions-trackmenu-hide-on-click-outside.html
1854
1855         * dom/EventListener.h:
1856         Add the new MediaControlsAppleEventListenerType.
1857
1858         * html/shadow/MediaControlsApple.cpp:
1859         (WebCore::MediaControlsApple::defaultEventHandler):
1860         (WebCore::MediaControlsApple::hide):
1861         (WebCore::MediaControlsApple::makeTransparent):
1862         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility):
1863         (WebCore::MediaControlsApple::reportedError):
1864         (WebCore::MediaControlsApple::toggleClosedCaptionTrackList):
1865         Use the hideClosedCaptionTrackList() and showClosedCaptionTrackList()
1866         methods to hide and show the captions menu instead of calling hide()
1867         and show() directly on m_closedCaptionsContainer.
1868
1869         (WebCore::MediaControlsApple::showClosedCaptionTrackList):
1870         Show the m_closedCaptionsContainer and register a "mousewheel" event
1871         listener on it as well as a "click" event listener on the entire document.
1872
1873         (WebCore::MediaControlsApple::hideClosedCaptionTrackList):
1874         Hide the m_closedCaptionsContainer and remove the "mousewheel" event
1875         listener on it as well as the "click" event listener on the entire document.
1876
1877         (WebCore::MediaControlsApple::shouldClosedCaptionsContainerPreventPageScrolling):
1878         New private utility to determine whether the m_closedCaptionsContainer can scroll
1879         in the provided scroll direction.
1880
1881         (WebCore::MediaControlsApple::eventListener):
1882         Obtain the event listener used for "mousewheel" and "click" event handlers.
1883
1884         (WebCore::MediaControlsAppleEventListener::handleEvent):
1885         Event handler for the "mousewheel" and "click" events. If we get a "click" event, we
1886         toggle the captions menu visibility and if we get a "mousewheel" event, we call into
1887         shouldClosedCaptionsContainerPreventPageScrolling() to see if we can scroll in the
1888         current scroll direction, and if not prevent the event from resulting in a scroll by
1889         calling preventDefault().
1890
1891         (WebCore::MediaControlsAppleEventListener::operator==):
1892         Required for the successful subclassing of EventListener.
1893
1894         * html/shadow/MediaControlsApple.h:
1895         (MediaControlsAppleEventListener):
1896         (WebCore::MediaControlsAppleEventListener::create):
1897         (WebCore::MediaControlsAppleEventListener::cast):
1898         (WebCore::MediaControlsAppleEventListener::MediaControlsAppleEventListener):
1899         New subclass of EventListener required to provide a custom event listener for the
1900         "mousewheel" and "click" events registered in showClosedCaptionTrackList() and
1901         hideClosedCaptionTrackList().
1902
1903 2013-05-18  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
1904
1905         [Cairo] Canvas-shadow behavior is not being as expected
1906         https://bugs.webkit.org/show_bug.cgi?id=108897
1907
1908         Reviewed by Martin Robinson.
1909
1910         ShadowBlur::endShadowLayer copies the image from shadowContext to cairoContext.
1911         CairoContext-path should be empty for doing this copy. Otherwise, the 
1912         original-image area will also get filled with the shadow.
1913
1914         Test: fast/canvas/canvas-image-shadow.html
1915
1916         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1917         (WebCore::drawPathShadow):
1918
1919 2013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
1920
1921         -webkit-text-underline-position should not be inherited
1922         https://bugs.webkit.org/show_bug.cgi?id=116363
1923
1924         Reviewed by Dean Jackson.
1925
1926         Specification says text-underline-position should not be inherited.
1927
1928         No new tests, this updates existing tests.
1929
1930         * css/CSSProperty.cpp:
1931         (WebCore::CSSProperty::isInheritedProperty): Make
1932         CSSPropertyWebkitTextUnderlinePosition return false.
1933         * rendering/style/RenderStyle.h: Treat TextUnderlinePosition as
1934         non-inherited.
1935         * rendering/style/StyleRareInheritedData.cpp:
1936         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1937         (WebCore::StyleRareInheritedData::operator==): Remove m_textUnderlinePosition.
1938         * rendering/style/StyleRareInheritedData.h:
1939         (StyleRareInheritedData):
1940         * rendering/style/StyleRareNonInheritedData.cpp:
1941         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1942         (WebCore::StyleRareNonInheritedData::operator==): Add m_textUnderlinePosition.
1943         * rendering/style/StyleRareNonInheritedData.h:
1944         (StyleRareNonInheritedData):
1945
1946 2013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
1947
1948         Add compile asserts for the size of RootInlineBox and InlineTextbox
1949         https://bugs.webkit.org/show_bug.cgi?id=116337
1950
1951         Reviewed by Darin Adler.
1952
1953         Add compile asserts to ensure RootInlineBox and InlineTextbox stay small.
1954
1955         * rendering/InlineTextBox.cpp:
1956         (SameSizeAsInlineTextBox):
1957         (WebCore):
1958         * rendering/RootInlineBox.cpp:
1959         (SameSizeAsRootInlineBox):
1960         (WebCore):
1961
1962 2013-05-20  Xan Lopez  <xlopez@igalia.com>
1963
1964         [BlackBerry] LocalizedStringsBlackBerry: add dummy text track strings
1965         https://bugs.webkit.org/show_bug.cgi?id=116300
1966
1967         Reviewed by Rob Buis.
1968
1969         These are dummy implementations necessary to make WebKit link.
1970
1971         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1972         (WebCore::weekFormatInLDML):
1973         (WebCore):
1974         (WebCore::textTrackClosedCaptionsText):
1975         (WebCore::textTrackSubtitlesText):
1976         (WebCore::textTrackOffText):
1977         (WebCore::textTrackNoLabelText):
1978
1979 2013-05-19  Darin Adler  <darin@apple.com>
1980
1981         [Mac] Improve string use in PasteboardMac
1982         https://bugs.webkit.org/show_bug.cgi?id=116418
1983
1984         Reviewed by Sam Weinig.
1985
1986         Did a Ben Poulain all over this file.
1987
1988         * platform/mac/PasteboardMac.mm:
1989         (WebCore::Pasteboard::plainText): Add the newline separately to the string builder.
1990         Prepending it to the string first just does more allocations for no good reason.
1991         (WebCore::Pasteboard::documentFragment): Use emptyString() instead of "" and use
1992         ASCIILiteral where appropriate.
1993         (WebCore::cocoaTypeFromHTMLClipboardType): More ASCIILiteral.
1994         (WebCore::Pasteboard::clear): Use early return instead of a nested if here.
1995         Use emptyString() instead of "".
1996         (WebCore::addHTMLClipboardTypesForCocoaType): More ASCIILiteral.
1997
1998 2013-05-19  Anders Carlsson  <andersca@apple.com>
1999
2000         Remove link prerendering code
2001         https://bugs.webkit.org/show_bug.cgi?id=116415
2002
2003         Reviewed by Darin Adler.
2004
2005         * Configurations/FeatureDefines.xcconfig:
2006         * GNUmakefile.list.am:
2007         * Target.pri:
2008         * WebCore.vcproj/WebCore.vcproj:
2009         * WebCore.vcxproj/WebCore.vcxproj:
2010         * WebCore.vcxproj/WebCore.vcxproj.filters:
2011         * WebCore.xcodeproj/project.pbxproj:
2012         * dom/Document.cpp:
2013         (WebCore::Document::Document):
2014         * dom/Document.h:
2015         (WebCore):
2016         (Document):
2017         * dom/EventNames.h:
2018         (WebCore):
2019         * html/HTMLLinkElement.cpp:
2020         * html/HTMLLinkElement.h:
2021         * html/LinkRelAttribute.cpp:
2022         (WebCore::LinkRelAttribute::LinkRelAttribute):
2023         * html/LinkRelAttribute.h:
2024         (LinkRelAttribute):
2025         * loader/LinkLoader.cpp:
2026         (WebCore::LinkLoader::~LinkLoader):
2027         (WebCore::LinkLoader::loadLink):
2028         (WebCore::LinkLoader::released):
2029         * loader/LinkLoader.h:
2030         (WebCore):
2031         (LinkLoader):
2032         * loader/LinkLoaderClient.h:
2033         (LinkLoaderClient):
2034         * loader/Prerenderer.cpp: Removed.
2035         * loader/Prerenderer.h: Removed.
2036         * loader/PrerendererClient.cpp: Removed.
2037         * loader/PrerendererClient.h: Removed.
2038         * platform/PrerenderClient.h: Removed.
2039         * platform/PrerenderHandle.h: Removed.
2040
2041 2013-05-19  Simon Fraser  <simon.fraser@apple.com>
2042
2043         Change the terminology used by rendering code when painting a given node and its children from "paintingRoot" to "subtreePaintRoot"
2044         https://bugs.webkit.org/show_bug.cgi?id=116417
2045
2046         Reviewed by Sam Weinig.
2047         
2048         PaintInfo and RenderLayer code referred to a "paintingRoot". This is only set when
2049         FrameView::setNodeToDraw() has been called and is used to restrict painting to
2050         some part of the subtree, but it could easily be misinterpreted, and confused with
2051         the "rootLayer" used by RenderLayer (which is usually not the layer associated with
2052         the paintingRoot).
2053         
2054         Change the terminology from "paintingRoot" to "subtreePaintRoot" root to make the
2055         purpose of this variable more obvious.
2056
2057         No behavior change.
2058
2059         * page/FrameView.cpp: Add a comment for setNodeToDraw(); in future this should
2060         be called setSubtreePaintRoot() or something. Not done in this patch to avoid
2061         risk; this function is exported from WebCore.
2062         * rendering/InlineFlowBox.cpp:
2063         (WebCore::InlineFlowBox::paint):
2064         * rendering/PaintInfo.h:
2065         (WebCore::PaintInfo::PaintInfo):
2066         (WebCore::PaintInfo::updateSubtreePaintRootForChildren):
2067         (WebCore::PaintInfo::shouldPaintWithinRoot):
2068         * rendering/RenderBlock.cpp:
2069         (WebCore::RenderBlock::paintContents):
2070         * rendering/RenderBox.cpp:
2071         (WebCore::RenderBox::paint):
2072         * rendering/RenderLayer.cpp:
2073         (WebCore::RenderLayer::paint):
2074         (WebCore::RenderLayer::paintOverlayScrollbars):
2075         (WebCore::RenderLayer::paintLayerContents):
2076         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2077         (WebCore::RenderLayer::paintBackgroundForFragments):
2078         (WebCore::RenderLayer::paintForegroundForFragments):
2079         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
2080         (WebCore::RenderLayer::paintOutlineForFragments):
2081         (WebCore::RenderLayer::paintMaskForFragments):
2082         * rendering/RenderLayer.h:
2083         (WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
2084         * rendering/RenderObject.cpp: Add a comment to recommend changing the name of
2085         paintingRootRect() to refer to a subtree paint. Not done in this patch to avoid
2086         risk; this function is exported from WebCore.
2087         * rendering/RenderSnapshottedPlugIn.cpp:
2088         (WebCore::RenderSnapshottedPlugIn::paint):
2089         * rendering/RenderTable.cpp:
2090         (WebCore::RenderTable::paintObject):
2091         * rendering/svg/RenderSVGContainer.cpp:
2092         (WebCore::RenderSVGContainer::paint):
2093
2094 2013-05-19  Darin Adler  <darin@apple.com>
2095
2096         Use Element instead of Node in DragState, also redo DragState struct
2097         https://bugs.webkit.org/show_bug.cgi?id=116411
2098
2099         Reviewed by Sam Weinig.
2100
2101         The drag source is an element, so use RefPtr<Element> instead of RefPtr<Node>.
2102
2103         Also, the entire drag state is about dragging, so no need for the word "drag" in the
2104         name of its members. Also, it's a struct, so the members don't need m_ prefixes.
2105
2106         * page/DragController.cpp: Removed unneeded include of Node.h since it's included by
2107         Element.h, which is also included.
2108         (WebCore::DragController::draggableElement): Renamed from Node to Element and changed
2109         the types and names of arguments accordingly. Also made this function handle a
2110         startElement of 0 so callers don't need to. Also updated for changes to DragState members.
2111         (WebCore::DragController::startDrag): Updated for changes to DragState members.
2112         Since dragSource can only be an element, was able to get rid of isElementNode checks.
2113
2114         * page/DragController.h: Fixed style of forward declarations of structs. Updated for
2115         change of draggableNode to draggableElement. Also removed declarations of nonexistent
2116         selectionDraggingRect and doDrag functions.
2117
2118         * page/DragState.h: Rewrote practically this whole header. Added an include of Element
2119         instead of Node since that's what we use now. Removed includes that are redundant.
2120         There's no problem copying a DragState, so removed WTF_MAKE_NONCOPYABLE. There's no need
2121         to allocate a DragState on the heap, so removed WTF_MAKE_FAST_ALLOCATED. The event dispatch
2122         boolean is never set to a constant, so there's no need for a policy enum; it can just be
2123         a boolean. Removed the "m_" prefixes from the struct members, since this is a struct with
2124         public members and we don't use the prefix in those cases. Removed the word "drag" from the
2125         struct member names since this entire struct is about dragging and has drag in its name.
2126         Left the comments mostly intact, even though I'm not certain of their value.
2127
2128         * page/EventHandler.cpp:
2129         (WebCore::EventHandler::handleMousePressEvent): Updated for changes to DragState.
2130         (WebCore::EventHandler::eventMayStartDrag):
2131         Use innerElement instead of innerNode to call draggableElement instead of draggableNode.
2132         (WebCore::EventHandler::updateDragAndDrop): Updated for changes to DragState.
2133         (WebCore::EventHandler::cancelDragAndDrop): Ditto.
2134         (WebCore::EventHandler::handleWheelEvent): Added FIXME.
2135         (WebCore::EventHandler::dragHysteresisExceeded): Updated for changes to DragState.
2136         (WebCore::EventHandler::freeClipboard): Updated for changes to DragState. Also re-added
2137         code to release the clipboard object, which is needed here to avoid keeping it around in
2138         memory until the next drag.
2139         (WebCore::EventHandler::dragSourceEndedAt): Updated for changes to DragState.
2140         (WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Ditto.
2141         (WebCore::EventHandler::dispatchDragSrcEvent): Ditto.
2142         (WebCore::EventHandler::handleDrag): Updated for changes to DragState. Use innerElement
2143         instead of innerNode to call draggableElement instead of draggableNode. No longer need to
2144         null check innerElement because draggableElement does that. Removed unneeded else that was
2145         setting m_dragSrc to zero since it's guaranteed to already be zero.
2146
2147 2013-05-19  Anders Carlsson  <andersca@apple.com>
2148
2149         Remove ChromeClient::webView()
2150         https://bugs.webkit.org/show_bug.cgi?id=116054
2151
2152         Reviewed by Darin Adler.
2153
2154         This blatantly horrible layer violation was only used to know if a ChromeClient is an empty
2155         client or not. We already have a (slightly less horrible) way to do that.
2156
2157         * loader/EmptyClients.h:
2158         * page/ChromeClient.h:
2159         (ChromeClient):
2160
2161 2013-05-19  Darin Adler  <darin@apple.com>
2162
2163         Eliminate the Editor::newGeneralClipboard function
2164         https://bugs.webkit.org/show_bug.cgi?id=116410
2165
2166         Reviewed by Andreas Kling.
2167
2168         This is one of the clean-ups made possible by the changes to the DOM clipboard class.
2169         I had been waiting until all the platforms were moved over to it, but it turns out to be
2170         easy to do this now, just with #ifdefs.
2171
2172         * PlatformBlackBerry.cmake: Deleted EditorBlackBerry.cpp.
2173
2174         * editing/Editor.cpp:
2175         (WebCore::Editor::dispatchCPPEvent): Call Clipboard::createForCopyAndPaste directly when
2176         using the new version of the Clipboard class. Also some small style cleanup nearby.
2177
2178         * editing/blackberry/EditorBlackBerry.cpp: Removed. The only function in this file was
2179         newGeneralClipboard.
2180
2181         * editing/mac/EditorMac.mm: Deleted newGeneralClipboard.
2182         * platform/efl/ClipboardEfl.cpp: Ditto.
2183         * platform/gtk/ClipboardGtk.cpp: Ditto.
2184
2185 2013-05-19  Martin Robinson  <mrobinson@igalia.com>
2186
2187         GtkSelectionData length is off by one
2188         https://bugs.webkit.org/show_bug.cgi?id=113962
2189
2190         Reviewed by Anders Carlsson.
2191
2192         No new tests. Since drag data is interpreted as a null-terminated string
2193         this is difficult to test with a C program and we have no infrastructure
2194         built for using GIR tests.
2195
2196         * platform/gtk/PasteboardHelper.cpp:
2197         (WebCore::PasteboardHelper::fillSelectionData): Instead of including the null
2198         character in the paste data length, just include the string. This matches the behavior
2199         of Firefox.
2200
2201 2013-05-18  Simon Fraser  <simon.fraser@apple.com>
2202
2203         Hoist several chunks of code at the top of RenderLayer::paintLayerContents() onto new functions
2204         https://bugs.webkit.org/show_bug.cgi?id=116406
2205
2206         Reviewed by Andreas Kling.
2207         
2208         RenderLayer::paintLayerContents() was getting polluted with code related to filters,
2209         clipping and font subpixel quantization, and hard to follow.
2210         
2211         Move three hunks of code into new functions:
2212         setupFontSubpixelQuantization() now contains the code related to whether we disable
2213         font subpixel quantization on the context.
2214         setupClipPath() now contains code related to clipping to shapes and references.
2215         setupFilters() and applyFilters() contain code related to CSS filters.
2216         
2217         As part of this, the interaction with FilterEffectRendererHelper was simplified.
2218         It was convenient for setupFilters() to return a FilterEffectRendererHelper object
2219         if successful, so we use an OwnPtr<FilterEffectRendererHelper> now. In addition,
2220         the GraphicsContext swapping was moved from FilterEffectRendererHelper code into RenderLayer
2221         to make it easier to follow. FilterEffectRendererHelper no longer holds on to
2222         the old GraphicsContext.
2223
2224         No behavior change.
2225
2226         * rendering/FilterEffectRenderer.cpp:
2227         (WebCore::FilterEffectRendererHelper::filterContext):
2228         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
2229         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
2230         * rendering/FilterEffectRenderer.h:
2231         (WebCore::FilterEffectRendererHelper::FilterEffectRendererHelper):
2232         (WebCore::FilterEffectRendererHelper::hasStartedFilterEffect):
2233         (FilterEffectRendererHelper):
2234         * rendering/RenderLayer.cpp:
2235         (WebCore::RenderLayer::setupFontSubpixelQuantization):
2236         (WebCore::RenderLayer::setupClipPath):
2237         (WebCore::RenderLayer::setupFilters):
2238         (WebCore::RenderLayer::applyFilters):
2239         (WebCore::RenderLayer::paintLayerContents):
2240         * rendering/RenderLayer.h:
2241
2242 2013-05-18  Simon Fraser  <simon.fraser@apple.com>
2243
2244         Refactor RenderStyle::diff()
2245         https://bugs.webkit.org/show_bug.cgi?id=116397
2246
2247         Reviewed by Andreas Kling.
2248         
2249         RenderStyle::diff() was prone to being changed incorrectly, since there was
2250         a poorly documented ordering requirement: style changes that cause layout
2251         have to be detected before those that cause only repainting.
2252         
2253         In addition, the existing code made it impossible to separately ask whether
2254         a given style change requires a repaint, if we've already detected that it
2255         requires a positioned-movement-only layout.
2256         
2257         Fix by factoring the code into member functions that check for each type
2258         of style change.
2259         
2260         No behavior change.
2261
2262         * rendering/style/RenderStyle.cpp:
2263         (WebCore::positionChangeIsMovementOnly):
2264         (WebCore::RenderStyle::changeRequiresLayout):
2265         (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
2266         (WebCore::RenderStyle::changeRequiresLayerRepaint):
2267         (WebCore::RenderStyle::changeRequiresRepaint):
2268         (WebCore::RenderStyle::changeRequiresRepaintIfText):
2269         (WebCore::RenderStyle::changeRequiresRecompositeLayer):
2270         (WebCore::RenderStyle::diff):
2271         * rendering/style/RenderStyle.h:
2272
2273 2013-05-18  Anders Carlsson  <andersca@apple.com>
2274
2275         Simplify the StorageArea setter functions
2276         https://bugs.webkit.org/show_bug.cgi?id=116402
2277
2278         Reviewed by Sam Weinig.
2279
2280         Move more security checking code to Storage so more code can be shared between WebKit1 and WebKit2.
2281
2282         * inspector/InspectorDOMStorageAgent.cpp:
2283         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2284         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2285         * storage/Storage.cpp:
2286         (WebCore::Storage::setItem):
2287         (WebCore::Storage::removeItem):
2288         (WebCore::Storage::clear):
2289         * storage/StorageArea.h:
2290         (StorageArea):
2291         * storage/StorageAreaImpl.cpp:
2292         (WebCore::StorageAreaImpl::setItem):
2293         (WebCore::StorageAreaImpl::removeItem):
2294         (WebCore::StorageAreaImpl::clear):
2295         * storage/StorageAreaImpl.h:
2296         (StorageAreaImpl):
2297
2298 2013-05-18  Anders Carlsson  <andersca@apple.com>
2299
2300         Simplify StorageArea getter functions
2301         https://bugs.webkit.org/show_bug.cgi?id=116399
2302
2303         Reviewed by Sam Weinig.
2304
2305         Move the security and private browsing checks from StorageArea to Storage so we can share
2306         more code between WebKit1 and WebKit2.
2307
2308         * inspector/InspectorDOMStorageAgent.cpp:
2309         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2310         Update to new StorageArea interface. The security checks are unnecessary here anyway because
2311         InspectorDOMStorageAgent::findStorageArea will only return a StorageArea that can be accessed
2312         by the frame's security origin.
2313         
2314         * storage/Storage.cpp:
2315         (WebCore::Storage::key):
2316         (WebCore::Storage::getItem):
2317         (WebCore::Storage::contains):
2318         * storage/StorageArea.h:
2319         (StorageArea):
2320         * storage/StorageAreaImpl.cpp:
2321         (WebCore::StorageAreaImpl::key):
2322         (WebCore::StorageAreaImpl::item):
2323         (WebCore::StorageAreaImpl::contains):
2324         * storage/StorageAreaImpl.h:
2325         (StorageAreaImpl):
2326
2327 2013-05-17  Simon Fraser  <simon.fraser@apple.com>
2328
2329         Garbage on page background while http://canberraballoons.com.au is loading
2330         https://bugs.webkit.org/show_bug.cgi?id=116384
2331         <rdar://problem/13930328>
2332
2333         Reviewed by Dan Bernstein.
2334
2335         This page loads a large JPEG image as the body background.
2336         ImageSource::frameHasAlphaAtIndex() always claims that JPEG images
2337         are opaque, but this isn't true if the frame is only partially loaded.
2338         However, this would cause FillLayer::hasOpaqueImage() to report that the
2339         background image is opaque, so we'd skip painting the background color.
2340         Unpainted content in an opaque layer results in garbage.
2341         
2342         Fix by having ImageSource::frameHasAlphaAtIndex() always return true
2343         for frames that are not complete. When the image load completes, we
2344         recompute metadata and correctly determine that the frame is opaque.
2345
2346         * platform/graphics/cg/ImageSourceCG.cpp:
2347         (WebCore::ImageSource::frameHasAlphaAtIndex):
2348
2349 2013-05-18  Timothy Hatcher  <timothy@apple.com>
2350
2351         Simplify EventLoop::cycle() on Mac.
2352
2353         https://webkit.org/b/116392
2354
2355         Reviewed by Anders Carlsson.
2356
2357         * platform/mac/EventLoopMac.mm:
2358         (WebCore::EventLoop::cycle): Use CFRunLoopRunInMode instead.
2359
2360 2013-05-18  Andreas Kling  <akling@apple.com>
2361
2362         Use CSSParserSelector::appendTagHistory() from CSS grammar.
2363         <http://webkit.org/b/116382>
2364
2365         Reviewed by Antti Koivisto.
2366
2367         CSSParserSelector already knows how to append another component to itself,
2368         no need to duplicate that logic in the grammar.
2369
2370         * css/CSSGrammar.y.in:
2371
2372 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
2373
2374         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
2375         https://bugs.webkit.org/show_bug.cgi?id=114554
2376
2377         Reviewed by Gyuyoung Kim.
2378
2379         Using variables as target names is very uncommon in CMake.
2380         The usual way to specify the name of the resulting binary
2381         is to set the OUTPUT_NAME target property.
2382
2383         * CMakeLists.txt:
2384
2385 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2386
2387         [GTK] Move GTK port off legacy clipboard
2388         https://bugs.webkit.org/show_bug.cgi?id=116221
2389
2390         Reviewed by Martin Robinson.
2391
2392         Merge clipboard methods into PasteboardGtk that now wraps a
2393         DataObjectGtk.
2394
2395         * GNUmakefile.list.am: Remove ClipboardGtk.h.
2396         * dom/Clipboard.h: Remove GTK from the list of ports using legacy
2397         clipboard.
2398         * page/gtk/EventHandlerGtk.cpp:
2399         (WebCore::EventHandler::createDraggingClipboard): Use
2400         Clipboard::createForDragAndDrop().
2401         * platform/Pasteboard.h:
2402         (Pasteboard):
2403         * platform/gtk/ClipboardGtk.cpp:
2404         (WebCore::Editor::newGeneralClipboard): Use
2405         Clipboard::createForCopyAndPaste().
2406         (WebCore::Clipboard::createDragImage):
2407         (WebCore::Clipboard::declareAndWriteDragImage):
2408         * platform/gtk/ClipboardGtk.h: Removed.
2409         * platform/gtk/DragDataGtk.cpp:
2410         * platform/gtk/PasteboardGtk.cpp:
2411         (WebCore::Pasteboard::create): Create a new Pasteboard for a given
2412         GtkClipboard or DataObjectGtk.
2413         (WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard
2414         for the GDK_SELECTION_CLIPBOARD clipboard.
2415         (WebCore::Pasteboard::createPrivate): Create a Pasteboard without
2416         a GtkClipboard associated.
2417         (WebCore::Pasteboard::createForDragAndDrop): Create a Pasteboard
2418         for drag and drop operations.
2419         (WebCore::selectionClipboard): Return a static Pasteboard for the
2420         GDK_SELECTION_CLIPBOARD clipboard.
2421         (WebCore::primaryClipboard): Return a static Pasteboard for the
2422         GDK_SELECTION_PRIMARY clipboard.
2423         (WebCore::Pasteboard::generalPasteboard): Return
2424         selectionClipboard() or primaryClipboard() depending on whether
2425         primary selection clipboard is the active one or not.
2426         (WebCore::Pasteboard::Pasteboard):
2427         (WebCore::Pasteboard::~Pasteboard):
2428         (WebCore::Pasteboard::dataObject): Return the wrapped DataObjectGtk.
2429         (WebCore::dataObjectTypeFromHTMLClipboardType): Copied from
2430         ClipboardGtk.cpp.
2431         (WebCore::Pasteboard::writeString): Adapted to upate the wrapped
2432         DataObjectGtk and the GtkClipboard if needed.
2433         (WebCore::Pasteboard::writeSelection): Ditto.
2434         (WebCore::Pasteboard::writePlainText): Ditto.
2435         (WebCore::Pasteboard::writeURL): Ditto.
2436         (WebCore::Pasteboard::writeImage): Ditto.
2437         (WebCore::Pasteboard::writePasteboard): Copy the wrapped
2438         DataObjectGtk from the DataObjectGtk of the given Pasteboard and
2439         upsate the GtkClipboard if needed.
2440         (WebCore::Pasteboard::clear): Copied from ClipboardGtk.cpp.
2441         (WebCore::Pasteboard::canSmartReplace): Check if current
2442         GtkClipboard supports smart replace.
2443         (WebCore::Pasteboard::setDragImage):
2444         (WebCore::Pasteboard::documentFragment): Adapted to use the
2445         wrapped DataObjectGtk reading from the current GtkClipboard if
2446         present.
2447         (WebCore::Pasteboard::plainText): Ditto.
2448         (WebCore::Pasteboard::hasData): Copied from ClipboardGtk.cpp.
2449         (WebCore::Pasteboard::types): Ditto.
2450         (WebCore::Pasteboard::readString): Ditto.
2451         (WebCore::Pasteboard::readFilenames): Ditto.
2452
2453 2013-05-18  Alberto Garcia  <agarcia@igalia.com>
2454
2455         [GTK] Parallel build fails if gtk-doc is enabled
2456         https://bugs.webkit.org/show_bug.cgi?id=116227
2457
2458         Reviewed by Martin Robinson.
2459
2460         * GNUmakefile.am:
2461         Don't overwrite noinst_DATA, modify its existing value instead.
2462
2463 2013-05-17  Michelangelo De Simone  <michelangelo@webkit.org>
2464
2465         CSSParser parsing of CSSPropertyFontStretch falls into CSSPropertyGeometry
2466         https://bugs.webkit.org/show_bug.cgi?id=116370
2467
2468         CSSPropertyFontStretch mistakenly fell through the shader parsing logic.
2469
2470         Reviewed by Alexandru Chiculita.
2471
2472         No new test possible, the feature is not implemented nor exposed.
2473
2474         * css/CSSParser.cpp:
2475         (WebCore::CSSParser::parseValue):
2476
2477 2013-05-17  Timothy Hatcher  <timothy@apple.com>
2478
2479         Force the script debug server to continue when disabling the debugger.
2480
2481         There might be some cases where the debugger will stay in the nested run loop
2482         which cause weird issues.
2483
2484         Speculative fix for: https://webkit.org/b/111438
2485
2486         Reviewed by Joseph Pecoraro.
2487
2488         * inspector/InspectorDebuggerAgent.cpp:
2489         (WebCore::InspectorDebuggerAgent::disable):
2490
2491 2013-05-16  Darin Adler  <darin@apple.com>
2492
2493         [BlackBerry] Get BlackBerry port off legacy clipboard
2494         https://bugs.webkit.org/show_bug.cgi?id=116287
2495
2496         Reviewed by Rob Buis.
2497
2498         * PlatformBlackBerry.cmake: Removed ClipboardBlackBerry.cpp.
2499
2500         * dom/Clipboard.h: Removed BLACKBERRY from the list of platforms that
2501         use the legacy clipboard.
2502
2503         * editing/blackberry/EditorBlackBerry.cpp:
2504         (WebCore::Editor::newGeneralClipboard): Changed to just create a copy
2505         and paste clipboard.
2506
2507         * page/blackberry/EventHandlerBlackBerry.cpp: Removed a drag-related
2508         function that wasn't doing any good.
2509
2510         * platform/blackberry/ClipboardBlackBerry.cpp: Removed.
2511         * platform/blackberry/ClipboardBlackBerry.h: Removed.
2512
2513         * platform/blackberry/PasteboardBlackBerry.cpp:
2514         (WebCore::Pasteboard::createForCopyAndPaste): Added.
2515         (WebCore::Pasteboard::createPrivate): Added.
2516         (WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardBlackBerry.cpp.
2517         (WebCore::Pasteboard::clear): Ditto.
2518         (WebCore::Pasteboard::readString): Ditto.
2519         (WebCore::Pasteboard::writeString): Ditto.
2520         (WebCore::Pasteboard::types): Ditto.
2521         (WebCore::Pasteboard::readFilenames): Ditto.
2522
2523 2013-05-17  Andreas Kling  <akling@apple.com>
2524
2525         Ads on theverge.com cause repaints when hovered, even though content doesn't visibly change.
2526         <http://webkit.org/b/116344>
2527
2528         Reviewed by Darin Adler.
2529
2530         Teach RenderStyle::diff() to ignore differences in the outline value if both styles have non-visible outlines.
2531
2532         * rendering/style/RenderStyle.cpp:
2533         (WebCore::RenderStyle::diff):
2534         * rendering/style/StyleBackgroundData.cpp:
2535         (WebCore::StyleBackgroundData::isEquivalentForPainting):
2536         * rendering/style/StyleBackgroundData.h:
2537         (StyleBackgroundData):
2538
2539 2013-05-17  Andreas Kling  <akling@apple.com>
2540
2541         Plug leak in CSSSelectorList::deleteSelectors().
2542         <http://webkit.org/b/116371>
2543         <rdar://problem/13930698>
2544
2545         Reviewed by Ryosuke Niwa.
2546
2547         Don't forget to destroy the very last selector in the list.
2548
2549         * css/CSSSelectorList.cpp:
2550         (WebCore::CSSSelectorList::deleteSelectors):
2551
2552 2013-05-17  Anders Carlsson  <andersca@apple.com>
2553
2554         Share code between WebKit1 and WebKit2 StorageArea subclasses
2555         https://bugs.webkit.org/show_bug.cgi?id=116367
2556
2557         Reviewed by Andreas Kling.
2558
2559         * inspector/InspectorDOMStorageAgent.cpp:
2560         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2561         Remove ec parameter.
2562
2563         * inspector/InspectorDOMStorageAgent.h:
2564         Add forward declaration.
2565
2566         * page/DOMWindow.cpp:
2567         (WebCore::DOMWindow::sessionStorage):
2568         (WebCore::DOMWindow::localStorage):
2569         Storage::StorageArea returns a reference now.
2570
2571         * storage/Storage.cpp:
2572         (WebCore::Storage::length):
2573         Check that the storage area can be accessed by the frame, and that it's not disabled by private browsing.
2574         Then call down to the (now simplified) StorageArea::length().
2575
2576         (WebCore::Storage::isDisabledByPrivateBrowsing):
2577         New helper function that's based on StorageAreaImpl::disabledByPrivateBrowsingInFrame, but reordered
2578         to make it easier to follow.
2579
2580         * storage/Storage.h:
2581         (WebCore::Storage::area):
2582         Return a reference.
2583
2584         * storage/StorageAreaImpl.cpp:
2585         (WebCore::StorageAreaImpl::storageType):
2586         Add this new virtual member funciton that's needed by Storage::isDisabledByPrivateBrowsing.
2587
2588         (WebCore::StorageAreaImpl::length):
2589         Remove unneeded code.
2590
2591 2013-05-17  Commit Queue  <commit-queue@webkit.org>
2592
2593         Unreviewed, rolling out r150294.
2594         http://trac.webkit.org/changeset/150294
2595         https://bugs.webkit.org/show_bug.cgi?id=116369
2596
2597         Caused 31 tests to fail (Requested by rniwa on #webkit).
2598
2599         * WebCore.exp.in:
2600         * rendering/InlineFlowBox.h:
2601         * rendering/InlineTextBox.h:
2602         (InlineTextBox):
2603         * rendering/RenderApplet.h:
2604         * rendering/RenderBR.h:
2605         * rendering/RenderBlock.h:
2606         (RenderBlock):
2607         (WebCore::RenderBlock::virtualContinuation):
2608         * rendering/RenderBox.h:
2609         (WebCore::RenderBox::borderBoundingBox):
2610         (RenderBox):
2611         (WebCore::RenderBox::marginLogicalLeft):
2612         (WebCore::RenderBox::marginLogicalRight):
2613         * rendering/RenderBoxModelObject.h:
2614         (WebCore::RenderBoxModelObject::isBoxModelObject):
2615         * rendering/RenderButton.h:
2616         * rendering/RenderCombineText.h:
2617         * rendering/RenderCounter.h:
2618         * rendering/RenderDeprecatedFlexibleBox.h:
2619         * rendering/RenderDetailsMarker.h:
2620         * rendering/RenderEmbeddedObject.h:
2621         (RenderEmbeddedObject):
2622         (WebCore::RenderEmbeddedObject::isEmbeddedObject):
2623         (WebCore::RenderEmbeddedObject::virtualChildren):
2624         * rendering/RenderFieldset.h:
2625         * rendering/RenderFileUploadControl.h:
2626         * rendering/RenderFlexibleBox.h:
2627         * rendering/RenderFlowThread.h:
2628         * rendering/RenderFrame.h:
2629         * rendering/RenderFrameSet.h:
2630         * rendering/RenderFullScreen.cpp:
2631         * rendering/RenderFullScreen.h:
2632         * rendering/RenderGrid.h:
2633         * rendering/RenderHTMLCanvas.h:
2634         * rendering/RenderIFrame.h:
2635         * rendering/RenderImage.h:
2636         (RenderImage):
2637         (WebCore::RenderImage::isRenderImage):
2638         * rendering/RenderInline.h:
2639         (RenderInline):
2640         (WebCore::RenderInline::virtualContinuation):
2641         (WebCore::RenderInline::virtualChildren):
2642         (WebCore::RenderInline::isRenderInline):
2643         (WebCore::RenderInline::layout):
2644         (WebCore::RenderInline::requiresLayer):
2645         (WebCore::RenderInline::offsetWidth):
2646         (WebCore::RenderInline::offsetHeight):
2647         (WebCore::RenderInline::borderBoundingBox):
2648         (WebCore::RenderInline::dirtyLinesFromChangedChild):
2649         * rendering/RenderLayerModelObject.h:
2650         * rendering/RenderListBox.h:
2651         * rendering/RenderListItem.h:
2652         * rendering/RenderListMarker.h:
2653         * rendering/RenderMedia.h:
2654         (WebCore::RenderMedia::virtualChildren):
2655         (WebCore::RenderMedia::canHaveChildren):
2656         (WebCore::RenderMedia::isMedia):
2657         (WebCore::RenderMedia::isImage):
2658         (WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
2659         * rendering/RenderMediaControlElements.h:
2660         * rendering/RenderMenuList.h:
2661         * rendering/RenderMeter.h:
2662         * rendering/RenderMultiColumnBlock.h:
2663         * rendering/RenderMultiColumnFlowThread.h:
2664         * rendering/RenderMultiColumnSet.h:
2665         * rendering/RenderNamedFlowThread.h:
2666         * rendering/RenderPart.h:
2667         (RenderPart):
2668         (WebCore::RenderPart::isRenderPart):
2669         (WebCore::RenderPart::renderName):
2670         * rendering/RenderProgress.h:
2671         * rendering/RenderRegion.h:
2672         (WebCore::RenderRegion::isRenderRegion):
2673         * rendering/RenderRegionSet.h:
2674         * rendering/RenderReplaced.h:
2675         (RenderReplaced):
2676         (WebCore::RenderReplaced::renderName):
2677         * rendering/RenderReplica.h:
2678         * rendering/RenderRuby.h:
2679         * rendering/RenderRubyBase.h:
2680         * rendering/RenderRubyRun.h:
2681         * rendering/RenderRubyText.h:
2682         * rendering/RenderScrollbarPart.h:
2683         * rendering/RenderSearchField.h:
2684         * rendering/RenderSlider.h:
2685         * rendering/RenderSnapshottedPlugIn.h:
2686         (RenderSnapshottedPlugIn):
2687         * rendering/RenderTable.h:
2688         (RenderTable):
2689         (WebCore::RenderTable::renderName):
2690         (WebCore::RenderTable::isTable):
2691         (WebCore::RenderTable::avoidsFloats):
2692         * rendering/RenderTableCaption.h:
2693         * rendering/RenderTableCell.h:
2694         * rendering/RenderTableCol.h:
2695         * rendering/RenderTableRow.h:
2696         * rendering/RenderTableSection.h:
2697         * rendering/RenderText.h:
2698         (RenderText):
2699         (WebCore::RenderText::marginLeft):
2700         (WebCore::RenderText::marginRight):
2701         (WebCore::RenderText::styleWillChange):
2702         (WebCore::RenderText::length):
2703         (WebCore::RenderText::paint):
2704         (WebCore::RenderText::layout):
2705         * rendering/RenderTextControl.h:
2706         (RenderTextControl):
2707         (WebCore::RenderTextControl::renderName):
2708         (WebCore::RenderTextControl::isTextControl):
2709         (WebCore::RenderTextControl::avoidsFloats):
2710         * rendering/RenderTextControlMultiLine.h:
2711         * rendering/RenderTextControlSingleLine.h:
2712         (RenderTextControlSingleLine):
2713         (WebCore::RenderTextControlSingleLine::isTextField):
2714         * rendering/RenderTextFragment.h:
2715         * rendering/RenderTextTrackCue.h:
2716         * rendering/RenderVideo.h:
2717         * rendering/RenderView.h:
2718         * rendering/RenderWidget.h:
2719         (RenderWidget):
2720         (WebCore::RenderWidget::isWidget):
2721         * rendering/RenderWordBreak.h:
2722         * rendering/RootInlineBox.h:
2723         (RootInlineBox):
2724         * rendering/mathml/RenderMathMLBlock.h:
2725         * rendering/svg/RenderSVGBlock.h:
2726         (RenderSVGBlock):
2727         * rendering/svg/RenderSVGContainer.h:
2728         (WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
2729         (WebCore::RenderSVGContainer::virtualChildren):
2730         (WebCore::RenderSVGContainer::isSVGContainer):
2731         (WebCore::RenderSVGContainer::renderName):
2732         (RenderSVGContainer):
2733         (WebCore::RenderSVGContainer::objectBoundingBox):
2734         (WebCore::RenderSVGContainer::strokeBoundingBox):
2735         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
2736         * rendering/svg/RenderSVGEllipse.h:
2737         * rendering/svg/RenderSVGForeignObject.h:
2738         * rendering/svg/RenderSVGGradientStop.h:
2739         * rendering/svg/RenderSVGHiddenContainer.h:
2740         (WebCore::RenderSVGHiddenContainer::renderName):
2741         (RenderSVGHiddenContainer):
2742         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
2743         * rendering/svg/RenderSVGImage.h:
2744         * rendering/svg/RenderSVGInline.h:
2745         (WebCore::RenderSVGInline::renderName):
2746         (WebCore::RenderSVGInline::requiresLayer):
2747         (WebCore::RenderSVGInline::isSVGInline):
2748         (RenderSVGInline):
2749         * rendering/svg/RenderSVGInlineText.h:
2750         * rendering/svg/RenderSVGModelObject.h:
2751         (WebCore::RenderSVGModelObject::requiresLayer):
2752         (RenderSVGModelObject):
2753         * rendering/svg/RenderSVGPath.h:
2754         * rendering/svg/RenderSVGRect.h:
2755         * rendering/svg/RenderSVGResourceClipper.h:
2756         * rendering/svg/RenderSVGResourceContainer.h:
2757         (RenderSVGResourceContainer):
2758         (WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
2759         (WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
2760         * rendering/svg/RenderSVGResourceFilter.h:
2761         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
2762         * rendering/svg/RenderSVGResourceGradient.h:
2763         (RenderSVGResourceGradient):
2764         (WebCore::RenderSVGResourceGradient::resourceBoundingBox):
2765         * rendering/svg/RenderSVGResourceLinearGradient.h:
2766         * rendering/svg/RenderSVGResourceMarker.h:
2767         * rendering/svg/RenderSVGResourceMasker.h:
2768         * rendering/svg/RenderSVGResourcePattern.h:
2769         * rendering/svg/RenderSVGResourceRadialGradient.h:
2770         * rendering/svg/RenderSVGRoot.h:
2771         * rendering/svg/RenderSVGShape.h:
2772         (WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
2773         (WebCore::RenderSVGShape::setNeedsTransformUpdate):
2774         (WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
2775         (WebCore::RenderSVGShape::localToParentTransform):
2776         (WebCore::RenderSVGShape::localTransform):
2777         (WebCore::RenderSVGShape::isSVGShape):
2778         (RenderSVGShape):
2779         (WebCore::RenderSVGShape::objectBoundingBox):
2780         (WebCore::RenderSVGShape::strokeBoundingBox):
2781         * rendering/svg/RenderSVGTSpan.h:
2782         * rendering/svg/RenderSVGText.h:
2783         * rendering/svg/RenderSVGTextPath.h:
2784         * rendering/svg/RenderSVGTransformableContainer.h:
2785         * rendering/svg/RenderSVGViewportContainer.h:
2786
2787 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2788
2789         Get rid of Custom code for Audio global constructor
2790         https://bugs.webkit.org/show_bug.cgi?id=116343
2791
2792         Reviewed by Geoffrey Garen.
2793
2794         Remove custom code for Audio global constructor. It is no longer needed
2795         now that the the bindings generator no longer require custom code for
2796         named constructors and now that [EnabledAtRuntime] extended attribute is
2797         supported for global constructors.
2798
2799         HTMLAudioElement global constructors are now automatically generated.
2800
2801         No new tests, no behavior change for layout tests.
2802
2803         * bindings/js/JSDOMWindowCustom.cpp:
2804         * html/HTMLAudioElement.idl:
2805         * page/DOMWindow.idl:
2806
2807 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2808
2809         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
2810         https://bugs.webkit.org/show_bug.cgi?id=116359
2811
2812         Reviewed by Anders Carlsson.
2813
2814         This feature was already RuntimeEnabled. Call through layers to get the answer from
2815         a platform strategy.
2816
2817         * workers/DefaultSharedWorkerRepository.cpp:
2818         (WebCore::DefaultSharedWorkerRepository::isAvailable):
2819         * workers/DefaultSharedWorkerRepository.h:
2820         * workers/SharedWorkerRepository.cpp:
2821         (WebCore::SharedWorkerRepository::isAvailable):
2822         * workers/SharedWorkerStrategy.h:
2823         (WebCore::SharedWorkerStrategy::isAvailable):
2824
2825 2013-05-17  Anders Carlsson  <andersca@apple.com>
2826
2827         Move Storage member functions out of line
2828         https://bugs.webkit.org/show_bug.cgi?id=116364
2829
2830         Reviewed by Andreas Kling.
2831
2832         This is preparation for sharing more code between the WebKit1 and WebKit2 storage area subclasses.
2833         Also remove unnecessary null checks and make m_storageArea const.
2834
2835         * storage/Storage.cpp:
2836         (WebCore::Storage::length):
2837         (WebCore::Storage::key):
2838         (WebCore::Storage::getItem):
2839         (WebCore::Storage::setItem):
2840         (WebCore::Storage::removeItem):
2841         (WebCore::Storage::clear):
2842         (WebCore::Storage::contains):
2843         * storage/Storage.h:
2844         (WebCore::Storage::area):
2845
2846 2013-05-17  Beth Dakin  <bdakin@apple.com>
2847
2848         Headers and footers will sometimes disappear and re-appear during page loads
2849         https://bugs.webkit.org/show_bug.cgi?id=116336
2850         -and corresponding-
2851         <rdar://problem/13886753>
2852
2853         Reviewed by Simon Fraser.
2854
2855         This patch changes the WebCore-level API that WebKit uses to create a banner. 
2856         Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
2857         and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
2858         layer has been created, it will call back into WK2 via ChromeClient. This will 
2859         allow WebCore to re-create the header/footer layers as needed whenever the 
2860         FrameView/RenderLayerCompositor have been destroyed and recreated.
2861
2862         Remove references to old FrameView functions. Add references to new Page 
2863         functions.
2864         * WebCore.exp.in:
2865
2866         New ChromeClient functions will pass the new layers up to WK2.
2867         * page/ChromeClient.h:
2868         (WebCore::ChromeClient::didAddHeaderLayer):
2869         (WebCore::ChromeClient::didAddFooterLayer):
2870         (ChromeClient):
2871
2872         Remove setWantsLayerForHeader/Footer.
2873         * page/FrameView.cpp:
2874         * page/FrameView.h:
2875         (FrameView):
2876
2877         Page now caches the header and footer height. When the FrameView/RLC have been 
2878         destroyed, and the cached layer/height information on those classes has been lost, 
2879         this data on Page will persist so that we can build the layers back up.
2880         * page/Page.cpp:
2881         (WebCore::Page::Page):
2882         (WebCore::Page::addHeaderWithHeight):
2883         (WebCore::Page::addFooterWithHeight):
2884         * page/Page.h:
2885         (WebCore::Page::headerHeight):
2886         (WebCore::Page::footerHeight):
2887
2888         As soon as the root gets a backing, recreate the header and footer layers if 
2889         needed.
2890         * rendering/RenderLayerCompositor.cpp:
2891         (WebCore::RenderLayerCompositor::updateBacking):
2892
2893         Call into ChromeClient.
2894         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2895         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2896
2897 2013-05-18  Claudio Saavedra  <csaavedra@igalia.com>
2898
2899         [CSS] Minor cleanups in CSS variables handling
2900         https://bugs.webkit.org/show_bug.cgi?id=116318
2901
2902         Reviewed by Ryosuke Niwa.
2903
2904         No new tests, only a cleanup.
2905
2906         * css/CSSParser.cpp:
2907         (WebCore::CSSParserString::substring): Optimize.
2908         (WebCore::CSSParser::createPrimitiveVariableNameValue):
2909         Remove intermediate variable.
2910
2911 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2912
2913         [Mac] Add DOMWindowConstructors.idl to Xcode project file
2914         https://bugs.webkit.org/show_bug.cgi?id=116351
2915
2916         Reviewed by Anders Carlsson.
2917
2918         * WebCore.xcodeproj/project.pbxproj: Added the file, so that Xcode includes it
2919         in searches.
2920
2921 2013-05-17  Ryosuke Niwa  <rniwa@webkit.org>
2922
2923         Remove the declaration of Element::detachAttrNodeAtIndex erroneously added in r150072.
2924
2925         * dom/Element.h:
2926         (Element):
2927
2928 2013-05-17  Anders Carlsson  <andersca@apple.com>
2929
2930         WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
2931         https://bugs.webkit.org/show_bug.cgi?id=116346
2932         <rdar://problem/13852829>
2933
2934         Reviewed by Andreas Kling.
2935
2936         Export the UTF8Encoding symbol.
2937
2938         * WebCore.exp.in:
2939
2940 2013-05-17  Andreas Kling  <akling@apple.com>
2941
2942         Apply FINAL to the RenderObject hierarchy.
2943         <http://webkit.org/b/115977>
2944
2945         Mostly from Blink r148795 by <cevans@chromium.org>
2946         <http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
2947
2948         Re-landing without devirtualization tweaks.
2949
2950         * rendering/: Beat things with the FINAL stick.
2951         * WebCore.exp.in: Export a now-needed symbol.
2952
2953 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2954
2955         Build fix.
2956
2957         * loader/FrameLoader.cpp: (WebCore::FrameLoader::willTransitionToCommitted):
2958         Frame:editor() now returns a reference.
2959
2960 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2961
2962         Get rid of [ConstructorParameters] extended attributes
2963         https://bugs.webkit.org/show_bug.cgi?id=116308
2964
2965         Reviewed by Kentaro Hara.
2966
2967         Get rid of WebKit-specific [ConstructorParameters] IDL extended attribute. Instead,
2968         [CustomConstructor] arguments are now explicitly specified, similarly to [Constructor]
2969         arguments and the constructor object's "length" property is now automatically
2970         computed for custom constructors as well.
2971
2972         This is less error-prone as the value is not hardcoded, more consistent with
2973         [Constructor] extended attribute and gives more information about the custom constructor
2974         in the IDL file. We also get rid of a WebKit-specific IDL attribute which is always
2975         nice.
2976
2977         No new tests, already covered by fast/js/constructor-length.html.
2978
2979         * Modules/mediastream/MediaStream.idl:
2980         * Modules/webaudio/AudioContext.idl:
2981         * Modules/websockets/WebSocket.idl:
2982         * bindings/scripts/CodeGeneratorJS.pm:
2983         (GenerateConstructorHelperMethods):
2984         * bindings/scripts/IDLAttributes.txt:
2985         * bindings/scripts/IDLParser.pm:
2986         (applyTypedefs):
2987         (parseAttributeRest):
2988         (copyExtendedAttributes):
2989         (parseExtendedAttributeRest):
2990         (applyExtendedAttributeList):
2991         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2992         (WebCore::JSFloat64ArrayConstructor::finishCreation):
2993         * bindings/scripts/test/TestTypedArray.idl:
2994         * dom/MutationObserver.idl:
2995         * fileapi/Blob.idl:
2996         * html/DOMFormData.idl:
2997         * html/canvas/ArrayBuffer.idl:
2998         * html/canvas/DataView.idl:
2999         * page/WebKitPoint.idl:
3000         * workers/SharedWorker.idl:
3001         * workers/Worker.idl:
3002
3003 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
3004
3005         Text input is largely broken when there are subframes loading
3006         http://bugs.webkit.org/show_bug.cgi?id=59121
3007         <rdar://problem/9320468>
3008
3009         Reviewed by Darin Adler.
3010
3011         This addresses text input being abandoned when another frame in a page is navigated.
3012
3013         There are still many opportunities for improvement:
3014         - Track other cases where WebCore interferes may want to cancel input without
3015         direct user action (e.g. deleting the whole editable element on a timer).
3016         - Fix how dictionary panel and autocorrection are dismissed (they still have the
3017         same issue, and get dismissed with any frame navigation).
3018
3019         Test: platform/mac/editing/input/unconfirmed-text-navigation-with-page-cache.html
3020
3021         * loader/FrameLoader.h:
3022         * loader/FrameLoader.cpp:
3023         (WebCore::FrameLoader::willTransitionToCommitted): Make sure that we
3024         do not keep an inline session in a frame that's no longer active, as WebKit2 no
3025         longer takes care of this case (and more of the logic should be in WebCore anyway).
3026         (WebCore::FrameLoader::commitProvisionalLoad): Added a hook that gets invoked right
3027         before transitioning to committed state starts. We may want to move more code here
3028         eventually, e.g. from Frame::setView.
3029
3030 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3031
3032         Get rid of [CustomGetter] for global named constructors
3033         https://bugs.webkit.org/show_bug.cgi?id=116116
3034
3035         Reviewed by Geoffrey Garen.
3036
3037         Improve the JSC bindings generator so that global named constructors no longer
3038         require a [CustomGetter] IDL extended attribute. As a consequence, attributes
3039         on the global window object can now be automatically generated for interfaces
3040         that have a [NamedConstructor], namely HTMLOptionElement.
3041
3042         The HTMLAudioElement global constructors are still manually defined because it
3043         requires custom code at the moment to check if the media player is available.
3044
3045         No new tests, no behavior change.
3046
3047         * bindings/js/JSDOMWindowCustom.cpp:
3048         * bindings/scripts/CodeGeneratorJS.pm:
3049         * bindings/scripts/preprocess-idls.pl:
3050         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3051         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3052         * html/HTMLOptionElement.idl:
3053         * page/DOMWindow.idl:
3054
3055 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
3056
3057         Web Inspector: SyntaxError evaluating "1+1; //@ sourceURL=test" in console
3058         https://bugs.webkit.org/show_bug.cgi?id=116292
3059
3060         Add a newline after the expression so a single line comment doesn't
3061         erroneously comment out the closing brace of the with block.
3062
3063         Reviewed by Timothy Hatcher.
3064
3065         Test: inspector/console/console-eval-comment.html
3066
3067         * inspector/InjectedScriptSource.js:
3068
3069 2013-05-17  David Hyatt  <hyatt@apple.com>
3070
3071         fast/flexbox/auto-height-with-flex.html failing only on release builds.
3072         https://bugs.webkit.org/show_bug.cgi?id=116240
3073
3074         Reviewed by Darin Adler.
3075
3076         Fix the mainAxisContentExtent method so no overflow occurs, since it
3077         doesn't work right on release builds.
3078
3079         * rendering/RenderFlexibleBox.cpp:
3080         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
3081
3082 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3083
3084         Add [EnabledAtRuntime] extended attribute support for global constructors
3085         https://bugs.webkit.org/show_bug.cgi?id=116147
3086
3087         Reviewed by Geoffrey Garen.
3088
3089         Add [EnabledAtRuntime] extended attribute support for global constructors.
3090         This patch adds [EnabledAtRuntime] extended attribute to SharedWorker and
3091         WebSocket IDL interfaces so that their global constructors on the global
3092         Window object can now be automatically generated.
3093
3094         The behavior on JavaScript side is unchanged. We simply leverage
3095         RuntimeEnabledFeatures class and the new [EnabledAtRuntime] IDL extended
3096         attribute to generate the code for global constructors getters instead
3097         of using custom code.
3098
3099         No new tests, no behavior change for layout tests.
3100
3101         * GNUmakefile.list.am:
3102         * Modules/websockets/WebSocket.cpp: Enable WebSockets at runtime by default.
3103         * Modules/websockets/WebSocket.idl:
3104         * Target.pri:
3105         * UseJSC.cmake:
3106         * WebCore.vcproj/WebCore.vcproj:
3107         * WebCore.vcxproj/WebCore.vcxproj:
3108         * WebCore.vcxproj/WebCore.vcxproj.filters:
3109         * WebCore.xcodeproj/project.pbxproj:
3110         * bindings/js/JSBindingsAllInOne.cpp:
3111         * bindings/js/JSDOMWindowCustom.cpp:
3112         (WebCore):
3113         * bindings/js/JSDOMWindowWebSocketCustom.cpp: Removed.
3114         * bindings/scripts/CodeGeneratorJS.pm:
3115         (ToMethodName):
3116         (GetRuntimeEnableFunctionName):
3117         (GenerateImplementation):
3118         * bindings/scripts/IDLAttributes.txt:
3119         * page/DOMWindow.idl:
3120         * workers/SharedWorker.idl:
3121
3122 2013-05-17  Darin Adler  <darin@apple.com>
3123
3124         [EFL] Move EFL port off legacy clipboard
3125         https://bugs.webkit.org/show_bug.cgi?id=116181
3126
3127         Reviewed by Anders Carlsson.
3128
3129         * dom/Clipboard.h: Switched EFL away from "legacy" mode for Clipboard.
3130
3131         * page/efl/EventHandlerEfl.cpp:
3132         (WebCore::EventHandler::createDraggingClipboard): Changed to call Clipboard member function.
3133
3134         * platform/efl/ClipboardEfl.cpp: Deleted most of the functions.
3135         (WebCore::Editor::newGeneralClipboard): Changed to call Clipboard member function.
3136         (WebCore::Clipboard::createDragImage): Moved from ClipboardEfl to Clipboard.
3137         (WebCore::Clipboard::declareAndWriteDragImage): Moved from ClipboardEfl to Clipboard.
3138         (WebCore::Clipboard::items): Ditto.
3139
3140         * platform/efl/PasteboardEfl.cpp: A lot of copyright notices for a file that
3141         has no code in it other than notImplemented lines! I didn't add a new one.
3142         (WebCore::Pasteboard::createForCopyAndPaste): Added.
3143         (WebCore::Pasteboard::createPrivate): Added.
3144         (WebCore::Pasteboard::createForDragAndDrop): Added.
3145         (WebCore::Pasteboard::hasData): Added.
3146         (WebCore::Pasteboard::readString): Added.
3147         (WebCore::Pasteboard::writeString): Added.
3148         (WebCore::Pasteboard::types): Added.
3149         (WebCore::Pasteboard::readFilenames): Added.
3150         (WebCore::Pasteboard::setDragImage): Added.
3151         (WebCore::Pasteboard::writePasteboard): Added.
3152
3153 2013-05-17  Frédéric Wang  <fred.wang@free.fr>
3154
3155         Bad spacing inside MathML formulas when text-indent is specified
3156         https://bugs.webkit.org/show_bug.cgi?id=106600
3157
3158         Reviewed by Martin Robinson.
3159
3160         When MathML is used in a HTML page that modifies the CSS text-indent,
3161         large gaps appear inside the mathematical expressions. Resetting it to
3162         0 on the math root (as Gecko does) fixes the issue.
3163
3164         Tests: mathml/presentation/text-indent.html
3165                mathml/presentation/text-indent-expected.html
3166
3167         * css/mathml.css:
3168         (math): reset text-indent to its default value.
3169
3170 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
3171
3172         Fix code that expects Page::chrome() to return a pointer
3173         https://bugs.webkit.org/show_bug.cgi?id=116313
3174
3175         Reviewed by Darin Adler.
3176
3177         Page::chrome() returns a reference after r150214.
3178
3179         * platform/network/blackberry/NetworkManager.cpp:
3180         (WebCore::NetworkManager::startJob):
3181         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
3182         (WebCore::SocketStreamHandle::SocketStreamHandle):
3183         * testing/Internals.cpp:
3184         (WebCore::Internals::resetToConsistentState):
3185         (WebCore::Internals::setEnableMockPagePopup):
3186
3187 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
3188
3189         [BlackBerry] ImageBlackBerry: add missing BlendMode parameter
3190         https://bugs.webkit.org/show_bug.cgi?id=116316
3191
3192         Reviewed by Carlos Garcia Campos.
3193
3194         When the new BitmapImage::draw() method was added in r147110 it
3195         didn't include the BlendMode parameter, which has been there since
3196         r137011.
3197
3198         * platform/graphics/blackberry/ImageBlackBerry.cpp:
3199         (WebCore::BitmapImage::draw):
3200
3201 2013-05-16  Jer Noble  <jer.noble@apple.com>
3202
3203         Some media/track tests fail or assert on Mac
3204         https://bugs.webkit.org/show_bug.cgi?id=97132
3205
3206         Reviewed by Simon Fraser.
3207
3208         Rationalize the font and padding behavior of cues and cue boxes; ::cue pseudo elements cannot have padding
3209         values applied via CSS (due to padding not being included in the whitelist of applicable CSS properties).
3210         Also, the font values were being applied to the box at one level and the cue at another, leading to incorrect
3211         layout in the snapToLines case. Padding has been removed from the cue, and the font settings are now applied
3212         to the box exclusively.
3213
3214         Additionally, a few drive-by changes were made in TextTrackCue to the return values of displayTreeInternal() &
3215         element(), which previously returned a PassRefPtr<> instead of a plain pointer.
3216
3217         * css/mediaControls.css:
3218         (video::-webkit-media-text-track-container): Move the font size to the display selector.
3219         (video::cue): Remove the display:inline and padding:2px declarations.
3220         (video::-webkit-media-text-track-display): Remove the -webkit-line-content now that the ::cue has no padding.
3221         * html/track/TextTrackCue.cpp:
3222         (WebCore::TextTrackCue::TextTrackCue): The background box is now a span, rather than a forced-inline div.
3223         (WebCore::TextTrackCue::displayTreeInternal): Return a plain pointer.
3224         (WebCore::TextTrackCue::getDisplayTree): Ditto.
3225         (WebCore::TextTrackCue::setFontSize): Set the font on the box, not the cue.
3226         * html/track/TextTrackCue.h:
3227         (WebCore::TextTrackCue::element): Return a plain pointer.
3228         * html/track/TextTrackCueGeneric.cpp:
3229         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): The cue element is now a span, not a div.
3230         * page/CaptionUserPreferencesMac.mm:
3231         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Whitespace.
3232         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Do not set padding on the cue.
3233
3234 2013-05-16  Andreas Kling  <akling@apple.com>
3235
3236         Changes in text-only properties shouldn't cause repaints unless there is actually text.
3237         <http://webkit.org/b/116250>
3238
3239         Reviewed by Antti Koivisto.
3240
3241         Add a new StyleDifferenceRepaintIfText value to the repertoire of RenderStyle::diff().
3242         This result means that the renderer only needs to repaint if one of its immediate children contains text.
3243
3244         This lets us avoid repainting the same pixels when hovering over constructs like:
3245
3246             <style>
3247                 a { text-decoration: none; }
3248                 a:hover { text-decoration: underline; }
3249             </style>
3250             <a href="http://is.gd/andersca">
3251                 <img src="cool-hat.jpg">
3252             </a>
3253
3254         Since the change in text-decoration has no effect on the rendering of the <img> element,
3255         we'll now be smart enough to avoid repainting it.
3256
3257         * rendering/style/RenderStyleConstants.h:
3258         * rendering/style/RenderStyle.cpp:
3259         (WebCore::RenderStyle::diff):
3260
3261             Move checking of text-only properties until the very end, and return StyleDifferenceRepaintIfText
3262             in case a difference is found, giving precedence to StyleDifferenceRepaint.
3263
3264         * rendering/RenderObject.h:
3265         * rendering/RenderObject.cpp:
3266         (WebCore::RenderObject::hasImmediateNonWhitespaceTextChild):
3267
3268             Helper to check if a RenderObject has at least one RenderText child containing more than just
3269             collapsible whitespace.
3270
3271         (WebCore::RenderObject::shouldRepaintForStyleDifference):
3272
3273             Helper to check if a StyleDifference is either ...Repaint or ...RepaintIfText and the renderer
3274             has an immediate text child.
3275
3276         (WebCore::RenderObject::styleWillChange):
3277         (WebCore::RenderObject::setStyle):
3278
3279             Don't repaint for StyleDifferenceRepaintIfText unless hasImmediateNonWhitespaceTextChild().
3280
3281         * rendering/RenderBox.cpp:
3282         (WebCore::RenderBox::styleDidChange):
3283         * rendering/svg/SVGResourcesCache.cpp:
3284         (WebCore::SVGResourcesCache::clientStyleChanged):
3285
3286             Tweak for new StyleDifference enum value.
3287
3288         * rendering/RenderText.h:
3289         * rendering/RenderText.cpp:
3290         (WebCore::RenderText::isAllCollapsibleWhitespace):
3291
3292             Made this const.
3293
3294 2013-05-17  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
3295
3296         Improve -webkit-text-underline-position memory usage.
3297         https://bugs.webkit.org/show_bug.cgi?id=116108
3298
3299         Reviewed by Benjamin Poulain.
3300
3301         Remove m_maxLogicalTop private variable from RootInlineBox to reduce
3302         the overall memory used to render RootInlineBoxes (eight bytes per RootInlineBox
3303         instance in a 64-bit machine). RootInline::maxLogicalTop() now computes
3304         the maxLogicalTop value everytime it is called. In a typical page
3305         computeMaxLogicalTop is called less than 10 times for each
3306         InlineTextBox that uses -webkit-text-underline-position. That is a small
3307         price users of -webkit-text-underline-position will pay so that
3308         everybody can benefit from the memory reduction in RootInlineBox.
3309
3310         No new tests, no change in behavior.
3311
3312         * rendering/InlineFlowBox.cpp:
3313         (WebCore::InlineFlowBox::computeMaxLogicalTop): Make it const.
3314         * rendering/InlineFlowBox.h:
3315         * rendering/RootInlineBox.cpp:
3316         (WebCore::RootInlineBox::RootInlineBox): Remove m_maxLogicalTop.
3317         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Remove
3318         computeMaxLogicalTop call and obsolete comment.
3319         (WebCore):
3320         (WebCore::RootInlineBox::maxLogicalTop): Compute maxLogicalTop before
3321         returning its value.
3322         * rendering/RootInlineBox.h:
3323         (RootInlineBox):
3324
3325 2013-05-17  Alexis Menard  <alexis@webkit.org>
3326
3327         Make sure to call release() on our smart pointers when we should.
3328         https://bugs.webkit.org/show_bug.cgi?id=116307
3329
3330         Reviewed by Andreas Kling.
3331
3332         Call release() when we should call it. There is probably more occurence
3333         of this problem on the codebase but this is a first bunch of fixes.
3334
3335         No new tests : existing ones should cover.
3336
3337         * css/CSSComputedStyleDeclaration.cpp:
3338         (WebCore::valueForNinePieceImage):
3339         (WebCore::getBorderRadiusShorthandValue):
3340         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
3341         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3342         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
3343         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForGridShorthand):
3344         * css/CSSParser.cpp:
3345         (WebCore::CSSParser::parseBorderImage):
3346         * html/HTMLBodyElement.cpp:
3347         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
3348
3349 2013-05-17  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3350
3351         Make PNGImageDecoder::rowAvailable auto-vectorizable
3352         https://bugs.webkit.org/show_bug.cgi?id=116151
3353
3354         Reviewed by Benjamin Poulain.
3355
3356         Changed the main loops under PNGImageDecoder::rowAvailable so that they
3357         avoid branches and non-sequential table look ups.
3358
3359         Together with automatic vectorization by the compiler this provides around
3360         4x speed-up with AVX or 2x speed-up on generic x64. Shaving off 12-40% on
3361         PNG decoding in general.
3362
3363         * platform/graphics/Color.cpp:
3364         (WebCore::premultipliedARGBFromColor):
3365         * platform/graphics/Color.h:
3366         (WebCore::fastDivideBy255):
3367         * platform/graphics/filters/FEBlend.cpp:
3368         * platform/image-decoders/png/PNGImageDecoder.cpp:
3369         (WebCore::setPixelRGB):
3370         (WebCore::setPixelRGBA):
3371         (WebCore::setPixelRGBA_Premultiplied):
3372         (WebCore::PNGImageDecoder::rowAvailable):
3373
3374 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
3375
3376         Web Inspector: Allow "//# sourceMappingURL" syntax alongside "//@"
3377         https://bugs.webkit.org/show_bug.cgi?id=116290
3378
3379         Follow an update to the spec and support the new and old syntax.
3380
3381         Reviewed by Timothy Hatcher.
3382
3383         * inspector/ContentSearchUtils.cpp:
3384         (WebCore::ContentSearchUtils::scriptCommentPattern):
3385         (WebCore::ContentSearchUtils::stylesheetCommentPattern):
3386         * inspector/front-end/SASSSourceMapping.js:
3387         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
3388
3389 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3390
3391         Remove custom code for MessageEvent.ports getter
3392         https://bugs.webkit.org/show_bug.cgi?id=116304
3393
3394         Reviewed by Kentaro Hara.
3395
3396         Remove Custom code for the "ports" attribute getter in MessageEvent
3397         IDL interface. The JSC bindings generator already supports attributes
3398         of type MessagePortArray.
3399
3400         No new tests, already covered by existing layout tests and bindings
3401         tests.
3402
3403         * bindings/js/JSMessageEventCustom.cpp: Remove Custom code for ports getter.
3404         * bindings/scripts/CodeGeneratorJS.pm:
3405         (NativeToJSValue): Small tweak to correctly handle the case where impl->ports()
3406         returns NULL and avoid crashing in this case.
3407         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Rebaseline due
3408         to bindings generator tweak.
3409         * dom/MessageEvent.idl: Remove [CustomGetter] extended attribute for 'ports' attribute
3410         and switch to MessagePortArray type.
3411
3412 2013-05-16  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3413
3414         Add stubs for ContextMenu and ContextMenuItem
3415         https://bugs.webkit.org/show_bug.cgi?id=116235
3416
3417         Reviewed by Antonio Gomes.
3418
3419         No new tests needed, only a refactor.
3420
3421         Add ContextMenuNone.cpp and ContextMenuItemNone.cpp
3422         so ports using ENABLE(CROSS_PLATFORM_CONTEXT_MENU) don't
3423         need to replicate these stubs.
3424
3425         * PlatformEfl.cmake:
3426         * Target.pri:
3427         * platform/ContextMenuNone.cpp: Added.
3428         (WebCore):
3429         (WebCore::ContextMenu::ContextMenu):
3430         (WebCore::ContextMenu::getContextMenuItems):
3431         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
3432         (WebCore::ContextMenu::platformContextMenu):
3433         * platform/ContextMenuItemNone.cpp: Added.
3434         (WebCore):
3435         (WebCore::ContextMenuItem::platformContextMenuItem):
3436         * platform/efl/ContextMenuEfl.cpp: Removed.
3437         * platform/efl/ContextMenuItemEfl.cpp: Removed.
3438         * platform/qt/ContextMenuQt.cpp: Removed.
3439         * platform/qt/ContextMenuItemQt.cpp: Removed.
3440
3441 2013-05-16  Alexis Menard  <alexis@webkit.org>
3442
3443         Regression: Event#stopPropagation() does not halt bubbling for webkitTransitionEnd
3444         https://bugs.webkit.org/show_bug.cgi?id=115656
3445
3446         Reviewed by Darin Adler.
3447
3448         If we create a prefixed event to dispatch it (in the case we have only
3449         prefixed event listeners in client's code) then we need to make sure to
3450         keep it in sync with the original unprefixed event after it has been
3451         dispatched. While being dispatched the event can be modified by
3452         client's code and when propagated back to outer elements, attributes were
3453         not updated. This patch changes the old design of creating a separate event
3454         for the prefixed case and now change the type of the event (so the name) before
3455         dispatching it, keeping the attributes if changed and then rename it
3456         back to unprefixed when the dispatching is finished.
3457
3458         Tests: transitions/transition-end-event-prefixed-01.html
3459                transitions/transition-end-event-prefixed-02.html
3460                transitions/transition-end-event-prefixed-03.html
3461
3462         * dom/Event.h:
3463         (WebCore::Event::setType):
3464         * dom/EventTarget.cpp:
3465         (WebCore::EventTarget::fireEventListeners):
3466
3467 2013-05-16  Mike Fenton  <mifenton@rim.com>
3468
3469         [BlackBerry] Strip invoke URLs when writing to the clipboard.
3470         https://bugs.webkit.org/show_bug.cgi?id=116226
3471
3472         Reviewed by Rob Buis.
3473
3474         PR 333516.
3475
3476         Invoke URLs should not be included in the paste data.
3477
3478         Internally Reviewed by Gen Mak.
3479
3480         * platform/blackberry/PasteboardBlackBerry.cpp:
3481         (WebCore::Pasteboard::writeSelection):
3482
3483 2013-05-16  Eduardo Lima Mitev  <elima@igalia.com>
3484
3485         Missing UNUSED_PARAM macro for textPosition argument in WebKitAccessibleInterfaceText
3486         https://bugs.webkit.org/show_bug.cgi?id=116230
3487
3488         Reviewed by Chris Fleizach.
3489
3490         No new functionality, no new tests.
3491
3492         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3493         (webkitAccessibleTextGetTextForOffset): List textPosition argument as
3494         unused parameter for all platforms except GTK.
3495
3496 2013-05-16  Jaehun Lim  <ljaehun.lim@samsung.com>
3497
3498         Frame flattening prevents <HTML> in <OBJECT> from having scrollbars
3499         https://bugs.webkit.org/show_bug.cgi?id=115884
3500         
3501         Reviewed by Antonio Gomes.
3502
3503         Frame flattening should be applied when the frame owner is frame or iframe. But when
3504         the frame owner is object element, frame flattening prevents it from having scrollbars.
3505         In this situation, we can't scroll the html document in object element.
3506
3507         This patch adds two helper functions to verify flattening conditions.
3508         
3509         Test: fast/frames/flattening/scrolling-in-object.html
3510
3511         * page/FrameView.cpp:
3512         (WebCore::frameFlatteningEnabled): Added. Helper to check whether flattening is enabled or not.
3513         (WebCore::supportsFrameFlattening): Added. Helper to check whether the frame owner is <frame> or <iframe>.
3514         (WebCore::FrameView::avoidScrollbarCreation):
3515         (WebCore::FrameView::calculateScrollbarModesForLayout): Use frameFlatteningEnabled().
3516         (WebCore::FrameView::layout): Use frameFlatteningEnabled().
3517         (WebCore::FrameView::isInChildFrameWithFrameFlattening): Use frameFlatteningEnabled().
3518
3519 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
3520
3521         Port functions for pathhandling to Windows CE in FileSystemWin
3522         https://bugs.webkit.org/show_bug.cgi?id=116208
3523
3524         Reviewed by Darin Adler.
3525
3526         This will allow us to remove FileSystemWinCE in a next step.
3527
3528         * platform/win/FileSystemWin.cpp:
3529         (WebCore::pathByAppendingComponent):
3530         (WebCore::pathGetFileName):
3531
3532 2013-05-16  Tim Horton  <timothy_horton@apple.com>
3533
3534         PDFPlugins don't load when plugins are disabled, but they should
3535         https://bugs.webkit.org/show_bug.cgi?id=75790
3536         <rdar://problem/11650197>
3537
3538         Reviewed by Anders Carlsson.
3539
3540         Make it possible to load "application" plug-ins even if settings or the FrameLoaderClient
3541         say that plug-ins should be disabled, providing a mechanism for WebKit* to offer built-in
3542         functionality which happens to use the plug-in infrastructure, and which also doesn't
3543         unexpectedly disappear for users with plug-ins off.
3544
3545         * WebCore.exp.in:
3546         Export SubframeLoader::allowPlugins().
3547         Update signature for PluginData::supportsMimeType to include the AllowedPluginTypes argument.
3548
3549         * dom/DOMImplementation.cpp:
3550         (WebCore::DOMImplementation::createDocument):
3551         Load PluginData even if plug-ins are disabled, but if that is the case, only
3552         create a PluginDocument for application plug-ins.
3553
3554         * html/PluginDocument.cpp:
3555         (WebCore::PluginDocumentParser::appendBytes):
3556         Don't bail if plug-ins are disabled, because we could still be a PluginDocument
3557         for an application plug-in.
3558
3559         * page/Page.cpp:
3560         (WebCore::Page::pluginData):
3561         Allow PluginData to be constructed even if plug-ins are disabled, as there might
3562         be application plug-ins that we want to load anyway.
3563
3564         * platform/mac/MIMETypeRegistryMac.mm:
3565         (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
3566         On Mac, if we have PDFPlugin, we can support PDF and PostScript with a native application plug-in.
3567
3568         * plugins/PluginData.cpp:
3569         (WebCore::PluginData::supportsMimeType):
3570         Add an AllowedPluginTypes argument to supportsMimeType, allowing callers to specify
3571         whether they are looking for any plug-in, or are looking only for application plug-ins.
3572
3573         * plugins/PluginData.h:
3574         (PluginInfo): Added an isApplicationPlugin field, to specify whether this is a "built-in" plug-in.
3575         (PluginData): Add the aforementioned AllowedPluginTypes enum and the argument to supportsMimeType.
3576
3577 2013-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3578
3579         [BlackBerry] Crash due to an assert running test editing/execCommand/indent-paragraphs.html
3580         https://bugs.webkit.org/show_bug.cgi?id=114944
3581
3582         Reviewed by Rob Buis.
3583
3584         It crashes in network platform code when trying to save an
3585         invalid URL in the disk cache. That test contains references to
3586         empty URLs like http://. Those empty URLs, are parsed as http:/ by
3587         KURL and considered valid. BlackBerry network platform uses GURL
3588         which considers those URLs invalid. We needed to check that the
3589         URLs are valid for our platform before starting the network
3590         operation.
3591
3592         Fixes a crash running test
3593         editing/execCommand/indent-paragraphs.html.
3594
3595         * platform/network/blackberry/NetworkManager.cpp:
3596         (WebCore::NetworkManager::startJob): Check if the request URL is
3597         valid from the platform point of view right after creating the
3598         platform network request and return early if the URL is invalid
3599         with StatusErrorInvalidUrl error.
3600
3601 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
3602
3603         Remove unused function safeCreateFile() from WebCore
3604         https://bugs.webkit.org/show_bug.cgi?id=116211
3605
3606         Reviewed by Anders Carlsson.
3607
3608         * platform/FileSystem.h:
3609         * platform/win/FileSystemWin.cpp:
3610
3611 2013-05-16  Peter Gal  <galpeter@inf.u-szeged.hu>
3612
3613         [curl] MIME type should be in lowercase
3614         https://bugs.webkit.org/show_bug.cgi?id=116218
3615
3616         Reviewed by Benjamin Poulain.
3617
3618         Existing testcase: http/tests/mime/uppercase-mime-type.html
3619
3620         * platform/network/curl/ResourceHandleManager.cpp:
3621         (WebCore::headerCallback): Convert the MIME type to lowercase.
3622
3623 2013-05-16  Seokju Kwon  <seokju.kwon@gmail.com>
3624
3625         Web Inspector: Fix optional value of promptText in Inspector.json
3626         https://bugs.webkit.org/show_bug.cgi?id=116203
3627
3628         Reviewed by Joseph Pecoraro.
3629
3630         Merge from https://chromiumcodereview.appspot.com/14672031.
3631
3632         No new tests needed.
3633
3634         * inspector/Inspector.json:
3635
3636 2013-05-16  Mary Wu  <mary.wu@torchmobile.com.cn>
3637
3638         [BlackBerry] Unable to download blob resource
3639         https://bugs.webkit.org/show_bug.cgi?id=115888
3640
3641         Reviewed by Benjamin Poulain.
3642
3643         Add BlobStream to handle over blob data from BlobResourceHandle to download stream.
3644         RIM bug 331086, internally reviewed by Charles Wei and Leo Yang.
3645
3646         * PlatformBlackBerry.cmake:
3647         * platform/network/blackberry/BlobStream.cpp: Added.
3648         (WebCore):
3649         (WebCore::BlobStream::BlobStream):
3650         (WebCore::BlobStream::~BlobStream):
3651         (WebCore::BlobStream::didReceiveData):
3652         (WebCore::BlobStream::didFinishLoading):
3653         (WebCore::BlobStream::didFail):
3654         (WebCore::BlobStream::url):
3655         (WebCore::BlobStream::mimeType):
3656         * platform/network/blackberry/BlobStream.h: Added.
3657         (WebCore):
3658         (BlobStream):
3659
3660 2013-05-16  Anders Carlsson  <andersca@apple.com>
3661
3662         Remove SystemTime header and implementations
3663         https://bugs.webkit.org/show_bug.cgi?id=116200
3664
3665         Reviewed by Alexey Proskuryakov.
3666
3667         SystemTim just had a single function that's not called anymore. Remove it.
3668
3669         * GNUmakefile.list.am:
3670         * PlatformBlackBerry.cmake:
3671         * PlatformEfl.cmake:
3672         * PlatformWinCE.cmake:
3673         * Target.pri:
3674         * WebCore.vcproj/WebCore.vcproj:
3675         * WebCore.vcxproj/WebCore.vcxproj:
3676         * WebCore.vcxproj/WebCore.vcxproj.filters:
3677         * WebCore.xcodeproj/project.pbxproj:
3678         * history/PageCache.cpp:
3679         * platform/SystemTime.h: Removed.
3680         * platform/blackberry/SystemTimeBlackBerry.cpp: Removed.
3681         * platform/efl/SystemTimeEfl.cpp: Removed.
3682         * platform/graphics/ca/GraphicsLayerCA.cpp:
3683         * platform/mac/SystemTimeMac.cpp: Removed.
3684         * platform/qt/TemporaryLinkStubsQt.cpp:
3685         * platform/win/SystemTimeWin.cpp: Removed.
3686
3687 2013-05-16  Glenn Adams  <glenn@skynav.com>
3688
3689         [Inspector] Don't filter syntax error caused by asterisk in CSS Property name.
3690         https://bugs.webkit.org/show_bug.cgi?id=116196
3691
3692         Reviewed by Benjamin Poulain.
3693
3694         * inspector/InspectorConsoleAgent.cpp:
3695         (WebCore::InspectorConsoleAgent::addMessageToConsole):
3696             - Remove questionable IE7 related error filtering
3697
3698 2013-05-16  Andreas Kling  <akling@apple.com>
3699
3700         Page::chrome() should return a reference.
3701         <http://webkit.org/b/116185>
3702
3703         Reviewed by Anders Carlsson.
3704
3705         A Page's chrome() can never be null. Change Page::chrome() to return a reference to reflect this.
3706         Also, make Page::m_chrome a const member variable so nobody will accidentally set it to null.
3707
3708 2013-05-16  Simon Fraser  <simon.fraser@apple.com>
3709
3710         Content disappears when scrolling http://www.childrenscancer.org/zach/
3711         https://bugs.webkit.org/show_bug.cgi?id=116206
3712
3713         Reviewed by Darin Adler.
3714         
3715         When a RenderLayerBacking gains or loses a foregroundLayer or backgroundLayer,
3716         we need to repaint the primary layer, since what paints into that primary
3717         layer will change.
3718         
3719         On the page in question, we gained/lost a foreground layer when scrolling because
3720         the page popped an element into position:fixed.
3721
3722         Test: compositing/repaint/foreground-layer-change.html
3723
3724         * rendering/RenderLayerBacking.cpp:
3725         (WebCore::RenderLayerBacking::updateForegroundLayer):
3726         (WebCore::RenderLayerBacking::updateBackgroundLayer):
3727
3728 2013-05-16  Andy Estes  <aestes@apple.com>
3729
3730         Do not indefinitely cache resources from blob URLs.
3731
3732         Reviewed by Alexey Proskuryakov.
3733
3734         Alexey pointed out after I landed r150169 that blob URLs backed by
3735         files should return an error if the file changed after the URL was
3736         created. By indefinitely caching them in memory, we don't give the
3737         loader a chance to check for modification. Remove "blob" from the list
3738         of schemes that should be indefinitely cached.
3739
3740         * platform/SchemeRegistry.cpp:
3741         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
3742
3743 2013-05-16  Claudio Saavedra  <csaavedra@igalia.com>
3744
3745         [CSS] CSS Variables are case-sensitive
3746         https://bugs.webkit.org/show_bug.cgi?id=116239
3747
3748         Reviewed by Ryosuke Niwa.
3749
3750         The CSS Variables specification states that variables are
3751         case-sensitive, unlike other CSS properties.
3752
3753         Test: fast/css/variables/case-sensitive.html
3754
3755         * css/CSSParser.cpp:
3756         (WebCore::CSSParserString::substring): Replace
3757         the now unnecessary lowerSubstring() with this method.
3758         Also, since the method is only used by the CSS variables
3759         implementation, #ifdef it.
3760         (WebCore::CSSParser::createPrimitiveVariableNameValue):
3761         (WebCore::CSSParser::storeVariableDeclaration):
3762         Do not normalize variable declarations to lowercase.
3763         * css/CSSParserValues.h:
3764         (CSSParserString): Replace the lowerSubstring() declaration
3765         and wrap with #if/#endif.
3766
3767 2013-05-16  Brady Eidson  <beidson@apple.com>
3768
3769         svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
3770         <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
3771
3772         Reviewed by Sam Weinig.
3773
3774         Give WebKit2 the ability to not mis-cast.
3775
3776         * loader/FrameLoaderClient.h:
3777         (WebCore::FrameLoaderClient::isEmptyFrameLoaderClient): Defaults to false, and include a FIXME
3778           to remove it once https://bugs.webkit.org/show_bug.cgi?id=116233 is resolved.
3779
3780         * loader/EmptyClients.h: Make isEmptyFrameLoaderClient() return true, and add a FIXME to remove it.
3781
3782 2013-05-14  Martin Robinson  <mrobinson@igalia.com>
3783
3784         [GTK] Add support for building WebCore to the cmake build
3785         https://bugs.webkit.org/show_bug.cgi?id=116128
3786
3787         Reviewed by Gustavo Noronha Silva.
3788
3789         * PlatformGTK.cmake: Added.
3790         * platform/gtk/GtkVersioning.c: Include "config.h" because we removed
3791         the autotoolsconfig.h include from the header.
3792         * platform/gtk/GtkVersioning.h: Remove autotoolsconfig.h include to support for
3793         non-autotools build systems.
3794
3795 2013-05-15  Ryosuke Niwa  <rniwa@webkit.org>
3796
3797         DocumentOrderedMap doesn't need to have two HashMaps
3798         https://bugs.webkit.org/show_bug.cgi?id=116167
3799
3800         Reviewed by Geoffrey Garen.
3801
3802         Previously, we had two hash maps: m_map and m_duplicateCounts in DocumentOrderedMap to keep track
3803         of the first element and the number of duplicates for a given name. This patch simplifies this structure
3804         by having a single hash map that contains both the pointer and the number of duplicates.
3805
3806         In addition, this patch fixes a regression introduced in r149652 that window and document name maps
3807         were not updated for some elements inside a SVG use element, and makes use of the newly added list of
3808         the matching elements in SelectorQuery.
3809
3810         * dom/DocumentOrderedMap.cpp:
3811         (WebCore::DocumentOrderedMap::clear): Updated to use the new hash map.
3812         (WebCore::DocumentOrderedMap::add): Ditto.
3813         (WebCore::DocumentOrderedMap::remove): Ditto.
3814         (WebCore::DocumentOrderedMap::get): Ditto.
3815         (WebCore::DocumentOrderedMap::getAllElementsById): Added.
3816
3817         * dom/DocumentOrderedMap.h:
3818
3819         (WebCore::DocumentOrderedMap::MapEntry::MapEntry): Added.
3820         (WebCore::DocumentOrderedMap::containsSingle): Updated to use new hash map.
3821         (WebCore::DocumentOrderedMap::contains): Ditto.
3822         (WebCore::DocumentOrderedMap::containsMultiple): Ditto.
3823
3824         * dom/Element.cpp:
3825         (WebCore::Element::insertedInto): This function didn't add this element to window and document's name maps
3826         if the element had already been inserted into a tree scope, and the current call was inserting an ancestor
3827         of the tree scope into the document. We were exiting early per scope != treeScope().
3828
3829         Fixed the bug by splitting updateId into two functions updateIdForTreeScope and updateIdForDocument.
3830         The former is called when this element is inserted into a new tree scope, and the latter is called when
3831         this element is inserted into a HTML document even if it had already been inside some tree scope.
3832
3833         (WebCore::Element::removedFrom): This function didn't remove this element from tree scope's id maps if
3834         the tree scope wasn't a document. Fixed the bug by simply checking that the removal happens beneath the
3835         current tree scope.
3836         (WebCore::Element::updateName):
3837         (WebCore::Element::updateNameForTreeScope): Renamed from updateName.
3838         (WebCore::Element::updateNameForDocument): Extracted from updateName.
3839         (WebCore::Element::updateId):
3840         (WebCore::Element::updateIdForTreeScope): Renamed from updateId.
3841         (WebCore::Element::updateIdForDocument): Extracted from updateId.
3842
3843         * dom/Element.h:
3844
3845         * dom/SelectorQuery.cpp:
3846         (WebCore::SelectorDataList::canUseIdLookup): Refactored to return the id subselector instead of checking if
3847         the first subselector happens to be matching an id.
3848         (WebCore::SelectorDataList::execute): Use the subselector canUseIdLookup returned. Also make use of newly
3849         added getAllElementsById when there are multiple matching elements for a given id.
3850
3851         * dom/SelectorQuery.h:
3852
3853         * dom/TreeScope.cpp:
3854         (WebCore::TreeScope::getAllElementsById): Added.
3855
3856         * dom/TreeScope.h:
3857
3858 2013-05-15  Darin Adler  <darin@apple.com>
3859
3860         [Mac] Make Clipboard::create functions for Mac platform independent by moving Pasteboard creation to Pasteboard functions
3861         https://bugs.webkit.org/show_bug.cgi?id=116179
3862
3863         Reviewed by Andreas Kling.
3864
3865         * dom/Clipboard.cpp:
3866         (WebCore::Clipboard::createForCopyAndPaste): Moved the function here from
3867         ClipboardMac, and have it use Pasteboard functions that are not Mac-specific.
3868         (WebCore::Clipboard::create): Ditto.
3869         (WebCore::Clipboard::createForDragAndDrop): Ditto.
3870
3871         * platform/DragData.h:
3872         (WebCore::DragData::pasteboardName): Made this const.
3873
3874         * platform/Pasteboard.h: Added new create functions, used by the clipboard
3875         create functions above.
3876
3877         * platform/mac/ClipboardMac.mm: Removed the functions that were moved to the
3878         Clipboard.cpp file.
3879
3880         * platform/mac/PasteboardMac.mm:
3881         (WebCore::Pasteboard::createForCopyAndPaste): Added.
3882         (WebCore::Pasteboard::createPrivate): Added.
3883         (WebCore::Pasteboard::createForDragAndDrop): Added.
3884
3885 2013-05-15  Anders Carlsson  <andersca@apple.com>
3886
3887         Fix a thinko.
3888
3889         We want to invalidate the file icon loader if it exists, not create it!
3890
3891         * html/FileInputType.cpp:
3892         (WebCore::FileInputType::requestIcon):
3893
3894 2013-05-15  Darin Adler  <darin@apple.com>
3895
3896         Move drag-specific Clipboard functions inside ENABLE(DRAG_SUPPORT)
3897         https://bugs.webkit.org/show_bug.cgi?id=116176
3898
3899         Reviewed by Andreas Kling.
3900
3901         * dom/Clipboard.cpp:
3902         (WebCore::Clipboard::writeRange):
3903         (WebCore::Clipboard::writePlainText):
3904         (WebCore::Clipboard::writeURL):
3905         Move these three functions inside ENABLE(DRAG_SUPPORT). Even though their names do
3906         not make it obvious, these are here only for use by dragging code. Later we may
3907         refactor them away entirely, but for now it's good not to compile them in on any
3908         platform that does not support dragging.
3909
3910 2013-05-15  Andy Estes  <aestes@apple.com>
3911
3912         Resources from non-HTTP schemes should not be cached indefinitely
3913         https://bugs.webkit.org/show_bug.cgi?id=113626
3914
3915         Reviewed by Ryosuke Niwa.
3916
3917         With the exception of schemes that we know will always return the same
3918         result for a given URL, we should not indefinitely cache non-HTTP
3919         resources when their freshness cannot be verified.
3920
3921         Writing a test for this is blocked on https://webkit.org/b/116199.
3922
3923         The following two existing tests of memory cache behavior were
3924         converted to HTTP tests so that they continue to function as expected:
3925
3926         Tests: http/tests/cache/display-image-unset-allows-cached-image-load.html
3927                http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html
3928
3929         * loader/cache/CachedResource.cpp:
3930         (WebCore::CachedResource::freshnessLifetime): Returned a freshness
3931         lifetime of 0 for non-HTTP schemes that can't be indefinitely cached.
3932         * platform/SchemeRegistry.cpp:
3933         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
3934         Checked whether the scheme is blob:, data:, or applewebdata:.
3935         * platform/SchemeRegistry.h:
3936
3937 2013-05-15  Tim Horton  <timothy_horton@apple.com>
3938
3939         makeRGBAFromNSColor throws an exception if given a color in a greyscale colorspace
3940         https://bugs.webkit.org/show_bug.cgi?id=116198
3941         <rdar://problem/13904395>
3942
3943         Reviewed by Simon Fraser.
3944
3945         Block Objective-C exceptions in makeRGBAFromNSColor.
3946         Remove a comment saying that they're impossible.
3947
3948         Convert the incoming color to the DeviceRGB colorspace to match
3949         existing color sources. Some rare cases (attributed strings that come
3950         from PDFKit) can have DeviceGrayscale color spaces, which would
3951         previously throw an exception here.
3952
3953         * platform/graphics/mac/ColorMac.mm:
3954         (WebCore::makeRGBAFromNSColor):
3955
3956 2013-05-15  David Kilzer  <ddkilzer@apple.com>
3957
3958         BUILD FIX (r150140): Frame::editor() should return a reference for iOS, too
3959
3960         * platform/ios/ClipboardIOS.mm:
3961         (WebCore::ClipboardIOS::ClipboardIOS):
3962         (WebCore::ClipboardIOS::hasData):
3963         (WebCore::ClipboardIOS::clearData):
3964         (WebCore::ClipboardIOS::clearAllData):
3965         (WebCore::ClipboardIOS::getData):
3966         (WebCore::ClipboardIOS::setData):
3967         (WebCore::ClipboardIOS::types):
3968         (WebCore::ClipboardIOS::writeRange):
3969         * platform/ios/PasteboardIOS.mm:
3970         (WebCore::Pasteboard::getStringSelection):
3971         (WebCore::Pasteboard::writeSelection):
3972         (WebCore::Pasteboard::writePlainText):
3973         (WebCore::Pasteboard::writeImage):
3974         (WebCore::Pasteboard::plainText):
3975         (WebCore::documentFragmentWithRTF):
3976         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
3977         (WebCore::Pasteboard::documentFragment):
3978
3979 2013-05-15  Anders Carlsson  <andersca@apple.com>
3980
3981         Stop using the factory pattern in FileIconLoaderClient
3982         https://bugs.webkit.org/show_bug.cgi?id=116197
3983
3984         Reviewed by Andreas Kling.
3985
3986         Move the FileIconLoader member out of FileIconLoaderClient and into FileInputType and remove the factory gunk.
3987
3988         * html/FileInputType.cpp:
3989         (WebCore::FileInputType::~FileInputType):
3990         (WebCore::FileInputType::requestIcon):
3991         * html/FileInputType.h:
3992         (FileInputType):
3993         * platform/FileIconLoader.cpp:
3994         (WebCore::FileIconLoader::invalidate):
3995         * platform/FileIconLoader.h:
3996         (WebCore::FileIconLoaderClient::~FileIconLoaderClient):
3997         (FileIconLoader):
3998
3999 2013-05-15  Anders Carlsson  <andersca@apple.com>
4000
4001         Fix FileChooserClient design
4002         https://bugs.webkit.org/show_bug.cgi?id=116195
4003
4004         Reviewed by Andreas Kling.
4005
4006         FileChooserClient doesn't match the standard WebCore client idiom of only having virtual member functions.
4007         Instead it holds on to its FileChooser and it's even a factory for creating new file choosers(!).
4008
4009         Fix this by making it an abstract class, and moving FileChooser into FileInputType.
4010
4011         * html/FileInputType.cpp:
4012         (WebCore::FileInputType::~FileInputType):
4013         Invalidate the file chooser.
4014
4015         (WebCore::FileInputType::handleDOMActivateEvent):
4016         Apply the file chooser settings.
4017
4018         (WebCore::FileInputType::applyFileChooserSettings):
4019         Recreate the file chooser with new settings.
4020
4021         (WebCore::FileInputType::receiveDropForDirectoryUpload):
4022         Apply the settings.
4023
4024         * platform/FileChooser.cpp:
4025         (WebCore::FileChooser::invalidate):
4026         Set m_client to null.
4027
4028         (WebCore::FileChooser::chooseFiles):
4029         Early return.
4030
4031         * platform/FileChooser.h:
4032
4033 2013-05-15  Gavin Barraclough  <barraclough@apple.com>
4034
4035         ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
4036         https://bugs.webkit.org/show_bug.cgi?id=116193
4037
4038         Reviewed by Darin Adler
4039
4040         * dom/ScriptedAnimationController.cpp:
4041         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
4042         (WebCore::ScriptedAnimationController::setThrottled):
4043         (WebCore::ScriptedAnimationController::scheduleAnimation):
4044         * dom/ScriptedAnimationController.h:
4045         (ScriptedAnimationController):
4046             - Fixes for review comments.
4047
4048 2013-05-15  Anders Carlsson  <andersca@apple.com>
4049
4050         Move HTTPRequest class to WebKit2
4051         https://bugs.webkit.org/show_bug.cgi?id=116192
4052
4053         Reviewed by Darin Adler.