Make more computed style helpers return values by PassRef.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-12-18  Andreas Kling  <akling@apple.com>
2
3         Make more computed style helpers return values by PassRef.
4         <https://webkit.org/b/125923>
5
6         Tighten yet another handful of CSS computed style helper functions
7         to return their CSSValues by PassRef where we never return null.
8
9         Reviewed by Antti Koivisto.
10
11 2013-12-18  Andreas Kling  <akling@apple.com>
12
13         Use range for syntax in Frame and FrameView.
14         <https://webkit.org/b/125922>
15
16         Convert code in Frame and FrameView to use C++11's range for syntax.
17
18         Reviewed by Antti Koivisto.
19
20 2013-12-18  Andreas Kling  <akling@apple.com>
21
22         RenderElement-ize adjustForAbsoluteZoom() and friends.
23         <https://webkit.org/b/125921>
24
25         Make adjustForAbsoluteZoom() take a const RenderElement& instead
26         of a RenderObject* so we can avoid the extra branch in style().
27         All call sites already had RenderElements.
28
29         Reviewed by Antti Koivisto.
30
31 2013-12-18  Chris Fleizach  <cfleizach@apple.com>
32
33         AX: HTML spec change indicates @aria-required should trump @required on any element
34         https://bugs.webkit.org/show_bug.cgi?id=122145
35
36         Reviewed by Mario Sanchez Prada.
37
38         aria-required should win over the native "required" attribute.
39
40         Updated tests: accessibility/aria-required.html
41
42         * accessibility/AccessibilityNodeObject.cpp:
43         (WebCore::AccessibilityNodeObject::isRequired):
44
45 2013-12-18  Carlos Garcia Campos  <cgarcia@igalia.com>
46
47         Unreviewed. Fix make distcheck.
48
49         * GNUmakefile.am:
50         * GNUmakefile.list.am:
51
52 2013-12-18  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
53
54         [soup] Fix unused parameter warnings in ResourceHandleSoup.
55         https://bugs.webkit.org/show_bug.cgi?id=125918
56
57         Reviewed by Martin Robinson.
58
59         Comment out the method parameters to avoid the warnings.
60
61         No tests required.
62
63         * platform/network/soup/ResourceHandleSoup.cpp:
64         (WebCore::WebCoreSynchronousLoader::didReceiveData):
65
66 2013-12-17  Jer Noble  <jer.noble@apple.com>
67
68         [MSE] Periodically monitor source buffers.
69         https://bugs.webkit.org/show_bug.cgi?id=125898
70
71         Reviewed by Eric Carlson.
72
73         Test: media/media-source/media-source-monitor-source-buffers.html
74
75         The MSE spec requires that the SourceBuffer Monitoring step is run
76         periodically during playback. No specific update interval is specified
77         so we will re-use the existing HTMLMediaElement playback progress
78         timer to signal the media source monitoring.
79
80         * html/HTMLMediaElement.cpp:
81         (HTMLMediaElement::playbackProgressTimerFired):
82
83 2013-12-17  Jer Noble  <jer.noble@apple.com>
84
85         [MSE] Add per-track signalling between SourceBuffer and SourceBufferPrivate.
86         https://bugs.webkit.org/show_bug.cgi?id=125899
87
88         Reviewed by Eric Carlson.
89
90         To accommodate the future addition of audio support to MSE in the Mac
91         port, add the concept of trackIDs to the communication between
92         SourceBuffer and SourceBufferPrivate.
93
94         The following virtual methods  now take a trackID parameter:
95         * platform/graphics/SourceBufferPrivate.h:
96         (WebCore::SourceBufferPrivate::isReadyForMoreSamples):
97         (WebCore::SourceBufferPrivate::stopAskingForMoreSamples):
98         (WebCore::SourceBufferPrivate::notifyClientWhenReadyForMoreSamples):
99         * platform/graphics/SourceBufferPrivateClient.h:
100         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateDidBecomeReadyForMoreSamples):
101
102         Update overridden methods in subclasses:
103         * Modules/mediasource/SourceBuffer.cpp:
104         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
105         * Modules/mediasource/SourceBuffer.h:
106         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
107         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
108         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
109         (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
110         * platform/mock/mediasource/MockSourceBufferPrivate.h:
111
112         Change the logic in provideMediaData to update a single TrackBuffer
113         rather than iterating over all of them:
114         * Modules/mediasource/SourceBuffer.cpp:
115         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
116         (WebCore::SourceBuffer::appendBufferTimerFired):
117         (WebCore::SourceBuffer::provideMediaData):
118
119 2013-12-17  Joseph Pecoraro  <pecoraro@apple.com>
120
121         Web Inspector: Remove InspectorAgent::hasFrontend
122         https://bugs.webkit.org/show_bug.cgi?id=125907
123
124         Reviewed by Timothy Hatcher.
125
126         Remove InspectorAgent::hasFrontend only used by
127         InspectorInstrumentation::collectingHTMLParseErrors. However,
128         following the single callers of that, the result is unused
129         in the HTMLDocumentParser and HTMLTreeBuilder. So remove
130         more stale / unused code.
131
132         * html/FTPDirectoryDocument.cpp:
133         (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
134         * html/HTMLDocument.cpp:
135         (WebCore::HTMLDocument::createParser):
136         * html/parser/HTMLDocumentParser.cpp:
137         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
138         * html/parser/HTMLDocumentParser.h:
139         (WebCore::HTMLDocumentParser::create):
140         * html/parser/HTMLTreeBuilder.cpp:
141         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
142         * html/parser/HTMLTreeBuilder.h:
143         (WebCore::HTMLTreeBuilder::create):
144         * html/parser/TextDocumentParser.cpp:
145         (WebCore::TextDocumentParser::TextDocumentParser):
146         * inspector/DOMPatchSupport.cpp:
147         (WebCore::DOMPatchSupport::patchDocument):
148         * inspector/InspectorAgent.h:
149         * inspector/InspectorInstrumentation.cpp:
150         * inspector/InspectorInstrumentation.h:
151
152 2013-12-17  Joseph Pecoraro  <pecoraro@apple.com>
153
154         Web Inspector: Some basic InjectedScriptHost cleanup
155         https://bugs.webkit.org/show_bug.cgi?id=125902
156
157         Reviewed by Timothy Hatcher.
158
159         Remove InjectedScriptHost::scriptDebugServer. Nobody accesses
160         the ScriptDebugServer through the injected script host. This
161         also lets us remove the reference to the DebuggerAgent.
162
163         * inspector/InjectedScriptHost.cpp:
164         * inspector/InjectedScriptHost.h:
165         (WebCore::InjectedScriptHost::init):
166         * inspector/InspectorController.cpp:
167         (WebCore::InspectorController::InspectorController):
168         * inspector/WorkerInspectorController.cpp:
169         (WebCore::WorkerInspectorController::WorkerInspectorController):
170
171 2013-12-17  Joseph Pecoraro  <pecoraro@apple.com>
172
173         Web Inspector: Remove InspectorFrontendHost.setInjectedScriptForOrigin
174         https://bugs.webkit.org/show_bug.cgi?id=125906
175
176         Reviewed by Timothy Hatcher.
177
178         Remove stale code related to a since removed feature,
179         Inspector extensions. This allows us to remove a number
180         of entry points into InspectorAgent.
181
182         * inspector/InspectorAgent.cpp:
183         (WebCore::InspectorAgent::InspectorAgent):
184         (WebCore::InspectorAgent::willDestroyFrontendAndBackend):
185         * inspector/InspectorAgent.h:
186         (WebCore::InspectorAgent::create):
187         Remove setInjectedScriptForOrigin and InjectedScript management.
188
189         * inspector/InspectorController.cpp:
190         (WebCore::InspectorController::InspectorController):
191         * inspector/InspectorController.h:
192         * inspector/InspectorFrontendHost.cpp:
193         * inspector/InspectorFrontendHost.h:
194         * inspector/InspectorFrontendHost.idl:
195         Remove the API and calling through InspectorController.
196
197         * inspector/InspectorInstrumentation.cpp:
198         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
199         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
200         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
201         Remove now unnecessary calls into InspectorAgent.
202
203 2013-12-17  Jer Noble  <jer.noble@apple.com>
204
205         Fix TimeRanges::intersectWith
206         https://bugs.webkit.org/show_bug.cgi?id=118802
207
208         Test: TestWebKitAPI/Tests/WebCore/TimeRanges.cpp.
209
210         Reviewed by Eric Carlson.
211
212         * WebCore.exp.in:
213         * WebCore.xcodeproj/project.pbxproj:
214         * html/TimeRanges.cpp:
215         (TimeRanges::invert):
216         (TimeRanges::intersectWith):
217
218         Merge
219         https://chromium.googlesource.com/chromium/blink/+/f557582b6c6283a8b165514f52d01cfd98130e85        
220
221 2013-12-17  Eric Carlson  <eric.carlson@apple.com>
222
223         ASSERT setting pseudoID with registered DOMSubtreeModified listener
224         https://bugs.webkit.org/show_bug.cgi?id=125900
225
226         Reviewed by Ryosuke Niwa.
227
228         Test: fast/dom/attribute-set-before-element-in-tree.html
229
230         * dom/Node.cpp:
231         (WebCore::Node::dispatchSubtreeModifiedEvent): Return early if the node does not have a
232             parent and does not have a DOMSubtreeModified listener.
233
234 2013-12-17  Ryosuke Niwa  <rniwa@webkit.org>
235
236         Remove dead code for reflected attributes from audio, video, and track elements
237         https://bugs.webkit.org/show_bug.cgi?id=125838
238
239         Reviewed by Eric Carlson.
240
241         Merge https://chromium.googlesource.com/chromium/blink/+/310514e2f0fd934975b841d463bad0cd62e6fd64
242
243         Where [Reflect] is used in the IDL, the getters and setters in C++ are
244         only for internal convenience, and these were unused.
245
246         * html/HTMLMediaElement.cpp:
247         * html/HTMLMediaElement.h:
248         * html/HTMLTrackElement.cpp:
249         * html/HTMLTrackElement.h:
250         * html/HTMLVideoElement.cpp:
251         * html/HTMLVideoElement.h:
252
253 2013-12-17  Simon Fraser  <simon.fraser@apple.com>
254
255         Rename "canRubberBands" to "canRubberBand"
256         https://bugs.webkit.org/show_bug.cgi?id=125897
257
258         Reviewed by Anders Carlsson.
259
260         Rename "canRubberBands" to "canRubberBand" in various places.
261
262         * page/scrolling/ScrollingTree.cpp:
263         (WebCore::ScrollingTree::setCanRubberBandState):
264         * page/scrolling/ScrollingTree.h:
265
266 2013-12-17  Jer Noble  <jer.noble@apple.com>
267
268         [MSE] Update duration after appending samples, per spec.
269         https://bugs.webkit.org/show_bug.cgi?id=125703
270
271         Reviewed by Eric Carlson.
272
273         Test: media/media-source/media-source-duration-after-append.html
274
275         After appending a sample, update the MediaSource duration if the sample's
276         presentation end time is greater than the existing duration.
277
278         * Modules/mediasource/SourceBuffer.cpp:
279         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
280         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
281         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
282         (WebCore::MediaSourcePrivateAVFObjC::setDuration): Notify the MediaPlayer.
283
284 2013-12-17  Jer Noble  <jer.noble@apple.com>
285
286         [MSE][Mac] Null-deref in CMSampleBufferIsRandomAccess().
287         https://bugs.webkit.org/show_bug.cgi?id=125698
288
289         Reviewed by Sam Weinig.
290
291         If a given CMSampleBufferRef does not have a sample attachments array (which is unlikely, but
292         possible), CMSampleBufferGetAttachmentsArray() will return a null value.
293
294         Additionally, the CMSampleBuffer documentation states that "samples are assumed to be sync
295         samples by default", so the absence of an attachment array (or the absense of a
296         kCMSampleAttachmentKey_NotSync entry in any of the attachment dictionaries) indicates the
297         sample is sync.
298
299         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
300         (WebCore::CMSampleBufferIsRandomAccess):
301
302 2013-12-17  Ryosuke Niwa  <rniwa@webkit.org>
303
304         Video element's width and height content attributes should not influence intrinsic width and height
305         https://bugs.webkit.org/show_bug.cgi?id=125822
306
307         Reviewed by Darin Adler.
308
309         Merge https://chromium.googlesource.com/chromium/blink/+/022ce34efb5b70cb964c3ca29f23c8980ffaef05
310
311         The width/height content attributes already influence specified style via
312         HTMLVideoElement::collectStyleForPresentationAttribute, to also influence the intrinsic size has never
313         been part of the spec: http://www.w3.org/TR/2013/WD-html51-20130528/embedded-content-0.html#dom-dim-width
314
315         The test case passes in Firefox Nightly and IE11 Release Preview, but fails in Opera Presto, which has
316         no default intrinsic size.
317
318         Test: media/video-intrinsic-width-height.html
319
320         * rendering/RenderVideo.cpp:
321         (WebCore::RenderVideo::calculateIntrinsicSize):
322
323 2013-12-16  Daniel Bates  <dabates@apple.com>
324
325         [iOS] Upstream WebCore/html changes
326         https://bugs.webkit.org/show_bug.cgi?id=125765
327
328         Reviewed by Darin Adler.
329
330         * WebCore.xcodeproj/project.pbxproj:
331         * html/Autocapitalize.cpp: Added.
332         * html/Autocapitalize.h: Added. Also, added FIXME comment to forward declare AtomicString once we upstream
333         more of the iOS port.
334         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
335         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent): Opt out of code when building for iOS.
336         * html/BaseDateAndTimeInputType.cpp:
337         (WebCore::BaseDateAndTimeInputType::isKeyboardFocusable): Added; iOS-specific.
338         * html/BaseDateAndTimeInputType.h:
339         * html/FileInputType.cpp:
340         (WebCore::FileInputType::FileInputType): Added iOS-specific code.
341         (WebCore::FileInputType::~FileInputType): Opt out of code when building for iOS. Also, added FIXME comment.
342         (WebCore::FileInputType::requestIcon): Ditto.
343         (WebCore::FileInputType::filesChosen): Added; iOS-specific.
344         (WebCore::FileInputType::displayString): Added; iOS-specific.
345         (WebCore::FileInputType::receiveDroppedFiles): Guarded code with ENABLE(DRAG_SUPPORT).
346         * html/FileInputType.h:
347         * html/FormController.cpp:
348         (WebCore::FormController::formElementsCharacterCount): Added.
349         * html/FormController.h:
350         * html/HTMLAppletElement.cpp:
351         (WebCore::HTMLAppletElement::updateWidget): Opt out of code when building for iOS.
352         * html/HTMLAreaElement.cpp:
353         (WebCore::HTMLAreaElement::computePath): Changed argument datatype from RenderElement* to RenderObject*.
354         Also, added FIXME comment to fix this up once we upstream iOS's DOMUIKitExtensions.{h, mm}.
355         (WebCore::HTMLAreaElement::computeRect): Ditto.
356         * html/HTMLAreaElement.h:
357         * html/HTMLAttributeNames.in: Added attributes ongesture{start, change, end}, autocorrect, autocapitalize,
358         data-youtube-id, onwebkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged}, webkit-playsinline,
359         x-webkit-airplay, and x-webkit-wirelessvideoplaybackdisabled.
360         * html/HTMLBodyElement.cpp:
361         (WebCore::HTMLBodyElement::scrollLeft): Added iOS-specific code.
362         (WebCore::HTMLBodyElement::scrollTop): Ditto.
363         * html/HTMLCanvasElement.cpp:
364         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Added iOS-specific code and FIXME comment.
365         (WebCore::HTMLCanvasElement::createImageBuffer): Added iOS-specific code.
366         * html/HTMLCanvasElement.h: Added iOS-specific code and FIXME comment.
367         * html/HTMLDocument.cpp:
368         (WebCore::HTMLDocument::HTMLDocument): Added argument isSynthesized (default to false), which is
369         passed through to Document::Document(), to create a synthesized document.
370         * html/HTMLDocument.h:
371         (WebCore::HTMLDocument::createSynthesizedDocument): Added.
372         * html/HTMLElement.cpp:
373         (WebCore::HTMLElement::collectStyleForPresentationAttribute): Added iOS-specific code.
374         (WebCore::populateEventNameForAttributeLocalNameMap): Ditto.
375         (WebCore::HTMLElement::willRespondToMouseMoveEvents): Added; iOS-specific.
376         (WebCore::HTMLElement::willRespondToMouseWheelEvents): Added; iOS-specific.
377         (WebCore::HTMLElement::willRespondToMouseClickEvents): Added; iOS-specific.
378         * html/HTMLElement.h:
379         * html/HTMLFormControlElement.cpp: Added FIXME comment to share more code with class HTMLFormElement.
380         (WebCore::HTMLFormControlElement::autocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
381         (WebCore::HTMLFormControlElement::setAutocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
382         (WebCore::HTMLFormControlElement::autocapitalizeType): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
383         (WebCore::HTMLFormControlElement::autocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
384         (WebCore::HTMLFormControlElement::setAutocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
385         * html/HTMLFormControlElement.h:
386         * html/HTMLFormElement.cpp: Added FIXME comment to share more code with class HTMLFormControlElement.
387         (WebCore::HTMLFormElement::submitImplicitly): Modified to code to allow implicit submission of multi-input
388         forms only if Settings::allowMultiElementImplicitSubmission() returns true. Such behavior is expected by older
389         iOS apps. Also, changed datatype of variable submissionTriggerCount from int to unsigned because it represents
390         a non-negative value.
391         (WebCore::HTMLFormElement::autocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
392         (WebCore::HTMLFormElement::setAutocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
393         (WebCore::HTMLFormElement::autocapitalizeType): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
394         (WebCore::HTMLFormElement::autocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
395         (WebCore::HTMLFormElement::setAutocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
396         * html/HTMLFormElement.h:
397         * html/HTMLFormElement.idl: Added iOS-specific attributes: autocorrect and autocapitalize.
398         * html/HTMLIFrameElement.h:
399         * html/HTMLInputElement.cpp:
400         (WebCore::HTMLInputElement::displayString): Added; guarded by PLATFORM(IOS).
401         (WebCore::HTMLInputElement::dateType): Added; guarded by PLATFORM(IOS).
402         * html/HTMLInputElement.h:
403         * html/HTMLInputElement.idl: Added iOS-specific attributes: autocorrect and autocapitalize.
404         * html/HTMLLabelElement.cpp:
405         (WebCore::HTMLLabelElement::willRespondToMouseClickEvents): Added iOS-specific code.
406         * html/HTMLMediaElement.cpp:
407         (WebCore::HTMLMediaElement::HTMLMediaElement): Added iOS-specific code and FIXME comment.
408         (WebCore::HTMLMediaElement::~HTMLMediaElement): Added iOS-specific code.
409         (WebCore::HTMLMediaElement::parseMediaPlayerAttribute): Added; iOS-specific.
410         (WebCore::HTMLMediaElement::parseAttribute): Added iOS-specific code.
411         (WebCore::HTMLMediaElement::insertedInto): Ditto.
412         (WebCore::HTMLMediaElement::load): Ditto.
413         (WebCore::HTMLMediaElement::prepareForLoad): Ditto.
414         (WebCore::HTMLMediaElement::autoplay): Ditto.
415         (WebCore::HTMLMediaElement::play): Ditto.
416         (WebCore::HTMLMediaElement::playInternal): Ditto.
417         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
418         (WebCore::HTMLMediaElement::setVolumne): Opt out of code when building for iOS.
419         (WebCore::HTMLMediaElement::setMuted): Ditto.
420         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Added iOS-specific code.
421         (WebCore::HTMLMediaElement::updateVolume): Ditto.
422         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
423         (WebCore::HTMLMediaElement::userCancelledLoad): Added iOS-specific code and FIXME comment.
424         (WebCore::HTMLMediaElement::resume): Added iOS-specific comment. See <rdar://problem/9751303>.
425         (WebCore::HTMLMediaElement::deliverNotification): Added iOS-specific code.
426         (WebCore::HTMLMediaElement::getPluginProxyParams): Added iOS-specific code. Also, changed src() to getNonEmptyURLAttribute()
427         in the non-iOS code as their doesn't exist a method called src in this class or its superclasses.
428         (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Added; guarded by ENABLE(IOS_AIRPLAY).
429         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Added; guarded by ENABLE(IOS_AIRPLAY).
430         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Added; guarded by ENABLE(IOS_AIRPLAY).
431         (WebCore::HTMLMediaElement::mediaPlayerPlaybackTargetAvailabilityChanged): Added; guarded by ENABLE(IOS_AIRPLAY).
432         (WebCore::HTMLMediaElement::addEventListener): Added; guarded by ENABLE(IOS_AIRPLAY).
433         (WebCore::HTMLMediaElement::removeEventListener): Added; guarded by ENABLE(IOS_AIRPLAY).
434         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Added; guarded by ENABLE(IOS_AIRPLAY).
435         (WebCore::HTMLMediaElement::enterFullscreen): Added iOS-specific code.
436         (WebCore::HTMLMediaElement::exitFullscreen): Ditto.
437         (WebCore::HTMLMediaElement::createMediaPlayer): Added ENABLE(IOS_AIRPLAY)-guarded code.
438         (WebCore::HTMLMediaElement::userRequestsMediaLoading): Added; guarded by PLATFORM(IOS).
439         (WebCore::HTMLMediaElement::shouldUseVideoPluginProxy): Use dot operator instead of dereference operator (->)
440         when accessing Document::settings().
441         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added ENABLE(PLUGIN_PROXY_FOR_VIDEO)-guarded code.
442         * html/HTMLMediaElement.h:
443         (WebCore::HTMLMediaElement::userGestureRequiredToShowPlaybackTargetPicker): Added; guarded by ENABLE(IOS_AIRPLAY).
444         * html/HTMLMediaElement.idl: Added ENABLE_IOS_AIRPLAY-guarded attributes and functions:webkitCurrentPlaybackTargetIsWireless,
445         onwebkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged}, and webkitShowPlaybackTargetPicker().
446         * html/HTMLMetaElement.cpp:
447         (WebCore::HTMLMetaElement::process): Added iOS-specific code.
448         * html/HTMLObjectElement.cpp:
449         (WebCore::shouldNotPerformURLAdjustment): Added; iOS-specific.
450         (WebCore::HTMLObjectElement::parametersForPlugin): Modified to call shouldNotPerformURLAdjustment() when
451         building for iOS.
452         * html/HTMLPlugInElement.h:
453         * html/HTMLPlugInImageElement.cpp:
454         (WebCore::HTMLPlugInImageElement::createRenderer): Added iOS-specific code.
455         (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree): Added; iOS-specific.
456         * html/HTMLPlugInImageElement.h:
457         * html/HTMLSelectElement.cpp:
458         (WebCore::HTMLSelectElement::usesMenuList): Added iOS-specific code.
459         (WebCore::HTMLSelectElement::createRenderer): Ditto.
460         (WebCore::HTMLSelectElement::childShouldCreateRenderer): Ditto.
461         (WebCore::HTMLSelectElement::willRespondToMouseClickEvents): Added; iOS-specific.
462         (WebCore::HTMLSelectElement::updateListBoxSelection): Added iOS-specific code.
463         (WebCore::HTMLSelectElement::scrollToSelection): Ditto.
464         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer): Ditto.
465         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Opt out of code when building for iOS.
466         (WebCore::HTMLSelectElement::defaultEventHandler): Added iOS-specific code.
467         * html/HTMLSelectElement.h:
468         * html/HTMLTextAreaElement.cpp:
469         (WebCore::HTMLTextAreaElement::willRespondToMouseClickEvents): Added; iOS-specific.
470         * html/HTMLTextAreaElement.h:
471         * html/HTMLTextAreaElement.idl: Added iOS-specific attributes: autocorrect and autocapitalize.
472         * html/HTMLTextFormControlElement.cpp:
473         (WebCore::HTMLTextFormControlElement::select): Added iOS-specific code and FIXME comment.
474         (WebCore::HTMLTextFormControlElement::setSelectionRange): Opt out of code when building for iOS.
475         (WebCore::HTMLTextFormControlElement::hidePlaceholder): Added; guarded by PLATFORM(IOS).
476         (WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary): Added; guarded by PLATFORM(IOS).
477         * html/HTMLTextFormControlElement.h:
478         * html/HTMLVideoElement.cpp:
479         (WebCore::HTMLVideoElement::createRenderer): Fix up call to HTMLMediaElement::createRenderer().
480         (WebCore::HTMLVideoElement::parseAttribute): Added iOS-specific code.
481         (WebCore::HTMLVideoElement::supportsFullscreen): Ditto.
482         (WebCore::HTMLVideoElement::webkitWirelessVideoPlaybackDisabled): Added; guarded by ENABLE(IOS_AIRPLAY).
483         (WebCore::HTMLVideoElement::setWebkitWirelessVideoPlaybackDisabled): Added; guarded by ENABLE(IOS_AIRPLAY).
484         * html/HTMLVideoElement.h:
485         * html/HTMLVideoElement.idl: Added ENABLE_IOS_AIRPLAY-guarded attribute: webkitWirelessVideoPlaybackDisabled.
486         * html/ImageDocument.cpp:
487         (WebCore::ImageDocument::createDocumentStructure): Added iOS-specific code.
488         (WebCore::ImageDocument::scale): Ditto.
489         (WebCore::ImageDocument::resizeImageToFit): Ditto.
490         (WebCore::ImageDocument::imageClicked): Ditto.
491         (WebCore::ImageDocument::imageFitsInWindow): Ditto.
492         (WebCore::ImageDocument::windowSizeChanged): Ditto.
493         * html/InputType.cpp:
494         (WebCore::InputType::dateType): Added; guarded by PLATFORM(IOS).
495         (WebCore::InputType::isKeyboardFocusable): Added iOS-specific code.
496         (WebCore::InputType::displayString): Added; guarded by PLATFORM(IOS).
497         * html/InputType.h:
498         * html/PluginDocument.cpp:
499         (WebCore::PluginDocumentParser::createDocumentStructure): Added iOS-specific code.
500         * html/RangeInputType.cpp:
501         (WebCore::RangeInputType::handleTouchEvent): Ditto.
502         (WebCore::RangeInputType::disabledAttributeChanged): Added; iOS-specific.
503         * html/RangeInputType.h:
504         * html/SearchInputType.cpp:
505         (WebCore::SearchInputType::addSearchResult): Opt out of code when building for iOS.
506         * html/TextFieldInputType.cpp:
507         (WebCore::TextFieldInputType::isKeyboardFocusable): Added iOS-specific code.
508         * html/TextFieldInputType.h:
509         * html/WebAutocapitalize.h: Added.
510         * html/canvas/CanvasRenderingContext2D.cpp:
511         (WebCore::CanvasRenderingContext2D::createImageData): Added iOS-specific code.
512         (WebCore::CanvasRenderingContext2D::getImageData): Ditto.
513         * html/parser/HTMLConstructionSite.h:
514         (WebCore::HTMLConstructionSite::isTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
515         * html/parser/HTMLParserScheduler.h:
516         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken): Added iOS-specific code.
517         * html/parser/HTMLTreeBuilder.cpp:
518         (WebCore::HTMLTreeBuilder::insertPhoneNumberLink): Added; guarded by PLATFORM(IOS).
519         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers): Added; guarded by PLATFORM(IOS).
520         (WebCore::disallowTelephoneNumberParsing): Added; guarded by PLATFORM(IOS).
521         (WebCore::shouldParseTelephoneNumbersInNode): Added; guarded by PLATFORM(IOS).
522         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody): Added iOS-specific code.
523         * html/parser/HTMLTreeBuilder.h:
524         * html/shadow/MediaControlElements.cpp:
525         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement): Guarded member initialization of m_controls with ENABLE(VIDEO_TRACK). Also added UNUSED_PARAM(event) when building with
526         VIDEO_TRACK disabled.
527         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Added UNUSED_PARAM(event) when
528         building with VIDEO_TRACK disabled.
529         * html/shadow/MediaControls.h:
530         * html/shadow/SliderThumbElement.cpp:
531         (WebCore::SliderThumbElement::SliderThumbElement): Added iOS-specific code.
532         (WebCore::SliderThumbElement::dragFrom): Opt out of code when building for iOS.
533         (WebCore::SliderThumbElement::willDetachRenderers):  Added iOS-specific code.
534         (WebCore::SliderThumbElement::exclusiveTouchIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
535         (WebCore::SliderThumbElement::setExclusiveTouchIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
536         (WebCore::SliderThumbElement::clearExclusiveTouchIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
537         (WebCore::findTouchWithIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
538         (WebCore::SliderThumbElement::handleTouchStart): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
539         (WebCore::SliderThumbElement::handleTouchMove): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
540         (WebCore::SliderThumbElement::handleTouchEndAndCancel): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
541         (WebCore::SliderThumbElement::didAttachRenderers): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
542         (WebCore::SliderThumbElement::handleTouchEvent): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
543         (WebCore::SliderThumbElement::shouldAcceptTouchEvents): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
544         (WebCore::SliderThumbElement::registerForTouchEvents): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
545         (WebCore::SliderThumbElement::unregisterForTouchEvents): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
546         (WebCore::SliderThumbElement::disabledAttributeChanged): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
547         * html/shadow/SliderThumbElement.h:
548         * html/shadow/TextControlInnerElements.cpp:
549         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): Opt out of code when building for iOS.
550         * html/shadow/TextControlInnerElements.h:
551         * page/Settings.in: Added setting allowMultiElementImplicitSubmission to enable/disable multi-input implicit form
552         submission (disabled by default). Also added FIXME comment to rename this setting to allowMultiElementImplicitFormSubmission
553         once we upstream the iOS changes to WebView.mm.
554
555 2013-12-17  Brady Eidson  <beidson@apple.com>
556
557         DatabaseProcess: Pipe through object store IDs and transaction mode for "openTransaction"
558         https://bugs.webkit.org/show_bug.cgi?id=125872
559
560         Reviewed by Alexey Proskuryakov.
561
562         Make these enums into enum classes.
563         Add const maximums for each enum class that might be serialized to allow for conversion later:
564         * Modules/indexeddb/IndexedDB.h:
565
566         Add cross-thread copying for these new enum classes.
567         * platform/CrossThreadCopier.cpp:
568         (WebCore::::copy):
569         * platform/CrossThreadCopier.h:
570
571         Adopt the new enum classes throughout the rest of WebCore:
572         * Modules/indexeddb/IDBCursor.cpp:
573         (WebCore::IDBCursor::continueFunction):
574         (WebCore::IDBCursor::stringToDirection):
575         (WebCore::IDBCursor::directionToString):
576         * Modules/indexeddb/IDBCursor.h:
577         * Modules/indexeddb/IDBCursorBackend.cpp:
578         (WebCore::IDBCursorBackend::deleteFunction):
579         * Modules/indexeddb/IDBCursorBackend.h:
580         (WebCore::IDBCursorBackend::value):
581         * Modules/indexeddb/IDBDatabaseBackend.cpp:
582         (WebCore::IDBDatabaseBackend::createObjectStore):
583         (WebCore::IDBDatabaseBackend::deleteObjectStore):
584         (WebCore::IDBDatabaseBackend::createIndex):
585         (WebCore::IDBDatabaseBackend::deleteIndex):
586         (WebCore::IDBDatabaseBackend::get):
587         (WebCore::IDBDatabaseBackend::put):
588         (WebCore::IDBDatabaseBackend::setIndexKeys):
589         (WebCore::IDBDatabaseBackend::openCursor):
590         (WebCore::IDBDatabaseBackend::deleteRange):
591         (WebCore::IDBDatabaseBackend::clearObjectStore):
592         (WebCore::IDBDatabaseBackend::transactionStarted):
593         (WebCore::IDBDatabaseBackend::transactionFinished):
594         (WebCore::IDBDatabaseBackend::transactionFinishedAndAbortFired):
595         (WebCore::IDBDatabaseBackend::transactionFinishedAndCompleteFired):
596         (WebCore::IDBDatabaseBackend::createTransaction):
597         (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
598         (WebCore::IDBDatabaseBackend::deleteDatabase):
599         * Modules/indexeddb/IDBDatabaseBackend.h:
600         * Modules/indexeddb/IDBFactory.cpp:
601         (WebCore::IDBFactory::open):
602         (WebCore::IDBFactory::openInternal):
603         (WebCore::IDBFactory::deleteDatabase):
604         * Modules/indexeddb/IDBIndex.cpp:
605         (WebCore::IDBIndex::openCursor):
606         (WebCore::IDBIndex::openKeyCursor):
607         * Modules/indexeddb/IDBObjectStore.cpp:
608         (WebCore::IDBObjectStore::openCursor):
609         * Modules/indexeddb/IDBOpenDBRequest.cpp:
610         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
611         * Modules/indexeddb/IDBRequest.cpp:
612         (WebCore::IDBRequest::IDBRequest):
613         (WebCore::IDBRequest::setResultCursor):
614         (WebCore::IDBRequest::onSuccess):
615         * Modules/indexeddb/IDBTransaction.cpp:
616         (WebCore::IDBTransaction::create):
617         (WebCore::IDBTransaction::IDBTransaction):
618         (WebCore::IDBTransaction::stringToMode):
619         (WebCore::IDBTransaction::modeToString):
620         * Modules/indexeddb/IDBTransaction.h:
621         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
622         (WebCore::PutOperation::perform):
623         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
624         (WebCore::IDBTransactionCoordinator::processStartedTransactions):
625         (WebCore::IDBTransactionCoordinator::canRunTransaction):
626         * Modules/indexeddb/IDBVersionChangeEvent.h:
627         (WebCore::IDBVersionChangeEvent::create):
628         (WebCore::IDBVersionChangeEvent::newVersion):
629         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
630         (WebCore::objectStoreCursorOptions):
631         (WebCore::indexCursorOptions):
632         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
633         (WebCore::IDBServerConnectionLevelDB::get):
634         (WebCore::IDBServerConnectionLevelDB::openCursor):
635         (WebCore::IDBServerConnectionLevelDB::count):
636         (WebCore::IDBServerConnectionLevelDB::deleteRange):
637         (WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration):
638
639         * WebCore.exp.in:
640
641 2013-12-17  Gavin Barraclough  <barraclough@apple.com>
642
643         Remove PageVisibilityStateUnloaded
644         https://bugs.webkit.org/show_bug.cgi?id=125869
645
646         Reviewed by Anders Carlsson.
647
648         This is not currently supported by WebKit, remove this enum value.
649         We can always add this back later if/when we add support for this state.
650
651         * page/PageVisibilityState.cpp:
652         (WebCore::pageVisibilityStateString):
653         * page/PageVisibilityState.h:
654             - removed PageVisibilityStateUnloaded
655
656 2013-12-12  Martin Robinson  <mrobinson@igalia.com>
657
658         [GTK] [CMake] Build the plugin process against GTK+ 2
659         https://bugs.webkit.org/show_bug.cgi?id=116374
660
661         Reviewed by Gustavo Noronha Silva.
662
663         * PlatformGTK.cmake: Split off the GTK+-dependent sources into
664         libWebCorePlatformGTK and compile libWebCorePlatformGTK2 when
665         WebKit2 is enabled.
666
667 2013-12-17  Alex Christensen  <achristensen@webkit.org>
668
669         Compile fix for WebGL on Windows without GRAPHICS_SURFACE.
670         https://bugs.webkit.org/show_bug.cgi?id=125867
671
672         Reviewed by Martin Robinson.
673
674         * platform/graphics/opengl/GLPlatformSurface.cpp:
675         (WebCore::GLPlatformSurface::createOffScreenSurface):
676         Protect reference to EGLOffScreenSurface with USE(GRAPHICS_SURFACE).
677
678 2013-12-17  Radu Stavila  <stavila@adobe.com>
679
680         [CSS Regions] Positioned elements in regions get clipped if they fall outside the region
681         https://bugs.webkit.org/show_bug.cgi?id=117120
682
683         Reviewed by Mihnea Ovidenie.
684
685         Fixed the computing of the box decorations clip rect when having statically positioned
686         elements inside positioned elements. The existing algorithm computed the rect in a loop
687         running up the containing block chain and only checked for positioned elements before 
688         starting the loop. If a positioned elements was found in the middle of a loop (as would
689         be the case with a positioned element parenting a non-positioned element), it was not 
690         correctly handled.
691         Also changed it so the clip is only performed in the fragmentation direction as that was 
692         the original purpose of this method.
693
694         Tests: fast/regions/absolute-in-relative-overflow.html
695                fast/regions/static-in-relative-overflow.html
696                fast/regions/sticky-border-overflow.html
697
698         * rendering/RenderFlowThread.cpp:
699         (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
700
701 2013-12-17  Commit Queue  <commit-queue@webkit.org>
702
703         Unreviewed, rolling out r160717.
704         http://trac.webkit.org/changeset/160717
705         https://bugs.webkit.org/show_bug.cgi?id=125863
706
707         New tests are failing, and possibly broke an existing test
708         (Requested by ap on #webkit).
709
710         * rendering/FlowThreadController.cpp:
711         (WebCore::FlowThreadController::collectFixedPositionedLayers):
712         * rendering/RenderLayer.cpp:
713         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
714         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
715
716 2013-12-17  Ryosuke Niwa  <rniwa@webkit.org>
717
718         Invalid dir attributes should resolve to ltr
719         https://bugs.webkit.org/show_bug.cgi?id=125830
720
721         Reviewed by Darin Adler.
722         
723         Merge https://chromium.googlesource.com/chromium/blink/+/2d592d1c998bec9438e421e1ce1ee6caba05a884
724
725         The dir attribute should resolve to direction: ltr by default when the attribute value is
726         "not in a defined state": http://www.w3.org/TR/2013/WD-html51-20130528/dom.html#the-directionality
727
728         Test: fast/dom/HTMLElement/set-and-clear-dir-attribute.html
729
730         * html/HTMLElement.cpp:
731         (WebCore::isLTROrRTLIgnoringCase): Extracted from HTMLElement::directionality.
732         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
733         (WebCore::HTMLElement::directionality):
734
735 2013-12-17  Mihnea Ovidenie  <mihnea@adobe.com>
736
737         [CSSRegions] Incorrect repaint of fixed element with transformed parent
738         https://bugs.webkit.org/show_bug.cgi?id=125756
739
740         Reviewed by Darin Adler.
741
742         When collecting the layers for fixed positioned elements with named flow
743         as a containing block, use layers collection at named flow layer level
744         instead of relying on the positioned elements collection.
745
746         Modified also FlowThreadController::collectFixedPositionedLayers function
747         to always return the layers sorted by z-index, as this operation was always
748         done at the call sites.
749
750         Tests: fast/regions/repaint/fixed-in-named-flow-cb-changed.html
751                fast/regions/repaint/fixed-in-named-flow-cb-changed2.html
752
753         * rendering/FlowThreadController.cpp:
754         (WebCore::compareZIndex):
755         (WebCore::FlowThreadController::collectFixedPositionedLayers):
756         * rendering/RenderLayer.cpp:
757         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
758         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
759
760 2013-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
761
762         REGRESSION(r159166?): fast/block/float/float-with-fractional-height-vertical-lr.html, fast/block/float/float-with-fractional-height.html are failing
763         https://bugs.webkit.org/show_bug.cgi?id=124506
764
765         Reviewed by Dirk Schulze.
766
767         Floor the endpoints of the floating object interval to keep the old
768         behavior until a better fix can be created.
769
770         No new tests, fixes regression in existing tests.
771
772         * rendering/FloatingObjects.cpp:
773         (WebCore::FloatingObjects::intervalForFloatingObject):
774
775 2013-12-17  Alex Christensen  <achristensen@webkit.org>
776
777         [Win] Visual Studio workaround for compiling WebGL.
778         https://bugs.webkit.org/show_bug.cgi?id=125808
779
780         Reviewed by Darin Adler.
781
782         * platform/graphics/GraphicsContext3D.cpp:
783         Don't inline outermost function to prevent Visual Studio crash.
784
785 2013-12-17  Mario Sanchez Prada  <mario.prada@samsung.com>
786
787         [ATK] Expose accessibility objects for <dl>, <dt> and <dd>
788         https://bugs.webkit.org/show_bug.cgi?id=125857
789
790         Reviewed by Chris Fleizach.
791
792         Map description lists to the newly introduced ATK roles
793         ATK_ROLE_DESCRIPTION_LIST, ATK_ROLE_DESCRIPTION_TERM and
794         ATK_ROLE_DESCRIPTION_VALUE, introduced in ATK 2.11.4.
795
796         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
797         (atkRole): Do the right mapping.
798         (webkitAccessibleGetRole): Update call to atkRole, now that it
799         receives an AccessibilityObject* as parameter.
800
801 2013-12-17  Frédéric Wang  <fred.wang@free.fr>
802
803         Ensure inferred mrows for msqrt, mstyle, merror, mphantom and math.
804         https://bugs.webkit.org/show_bug.cgi?id=124841
805
806         Reviewed by Darin Adler.
807
808         Tests: mathml/presentation/inferred-mrow-baseline.html
809                mathml/presentation/inferred-mrow-stretchy.html
810
811         * css/mathml.css: make merror, mphantom and mstyle behave like an mrow.
812         (mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle):
813         (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle):
814         * mathml/MathMLInlineContainerElement.cpp: ditto
815         (WebCore::MathMLInlineContainerElement::createRenderer):
816         * mathml/mathtags.in: ditto
817         * rendering/mathml/RenderMathMLOperator.cpp:
818         (WebCore::RenderMathMLOperator::paint): fix failure in mathml/presentation/phantom.html now that phantom can stretch operators.
819
820 2013-12-17  Simon Pena  <simon.pena@samsung.com>
821
822         [NIX] Enable full debug builds by having ar creating thin archives
823         https://bugs.webkit.org/show_bug.cgi?id=125850
824
825         Reviewed by Csaba Osztrogonác.
826
827         By default, CMake uses ar to generate libWebCore.a with cr parameters
828         (do not warn if the library has to be created, and replace existing
829         files in the archive). That results in a very large file, and ar fails
830         with sizes over 4GB.
831
832         By using thin archives (the T option of ar), the generated
833         libWebCore.a is much smaller, and can be successfully archived. As a
834         result, we can generate a full debug build. This patch is based on Xan
835         López's webkit.org/b/110580.
836
837         * PlatformNix.cmake: Instruct cmake to invoke ar with T option.
838
839 2013-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
840
841         Unreviewed. Update GObject DOM symbols file after r160336.
842
843         * bindings/gobject/webkitdom.symbols: Add new methods exposed for
844         VideoPlaybackQuality.
845
846 2013-12-17  Mihai Maerean  <mmaerean@adobe.com>
847
848         Fix hit testing for divs with a hierarchy of css transformed and non-transformed elements
849         https://bugs.webkit.org/show_bug.cgi?id=124777
850
851         Reviewed by Darin Adler.
852
853         After bug #124647, the hit test will still behave incorrectly for transformed divs with non
854         transformed siblings that are all inside a transformed element (tested by the
855         hover-rotated-with-children-negative-z.html layout test).
856
857         The fix is to not take zOffset into account during hit-testing when child layers are in the
858         same 3D rendering context. Only when preserve3d is true, should hit-testing compute the
859         zOffset of the layers with transformations and, when two layers overlap, to return the layer
860         with the highest zOffset.
861
862         The patch includes the work of a.renevier from https://codereview.chromium.org/79943002/
863
864         Tests: transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html
865                transforms/3d/hit-testing/negative-zoffset-hit-test.html
866                transforms/3d/hit-testing/overlapping-layers-hit-test.html
867
868         * rendering/RenderLayer.cpp:
869         (WebCore::computeZOffset):
870         (WebCore::RenderLayer::hitTestLayer):
871
872 2013-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
873
874         Remove a few more guards mistakenly added in r160367
875
876         Reviewed by Martin Robinson.
877
878         r160367 was too liberal in hiding APIs from the GObject DOM bindings.
879
880         * Modules/battery/NavigatorBattery.idl: Expose NavigatorBattery.
881
882 2013-12-17  Benjamin Poulain  <benjamin@webkit.org>
883
884         Add a simple register allocator to WebCore for x86_64
885         https://bugs.webkit.org/show_bug.cgi?id=125771
886
887         Reviewed by Geoffrey Garen.
888
889         Add a brain dead register allocator to simplify the use of registers
890         when writting code generators.
891
892         RegisterAllocator has two purposes:
893         -make it easy to name registers properly.
894         -make it hard to reuse a register accidentally.
895
896         A helper class LocalRegister is also defined to provide an easy
897         way to work with registers within a C++ scope. For example:
898             LocalRegister elementPointer(allocator);
899             assembler.load(address, elementPointer);
900
901         RegisterAllocator makes no attempt at optimizing register allocations, but it reduces
902         implicit dependencies by returning used register at the end of the queue, making it less
903         likely they will be reused before their last instruction is executed.
904
905         The current implementation only support unix x86_64, it only uses caller saved registers.
906
907         * WebCore.xcodeproj/project.pbxproj:
908         * cssjit/RegisterAllocator.h: Added.
909         (WebCore::RegisterAllocator::allocateRegister): Provides any available register.
910         To restrict runtime exploitation of compiler bugs, the method crashes in release
911         if the register pool is empty.
912
913         (WebCore::RegisterAllocator::reserveRegister): Reserve a particular register.
914         (WebCore::RegisterAllocator::returnRegister): Return a previously allocated or reserved register.
915
916         (WebCore::RegisterAllocator::allocatedRegisters):
917         (WebCore::LocalRegister::LocalRegister):
918         (WebCore::LocalRegister::~LocalRegister):
919         (WebCore::LocalRegister::operator JSC::MacroAssembler::RegisterID):
920         (WebCore::RegisterAllocator::RegisterAllocator):
921
922 2013-12-16  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
923
924         Checking RTCPeerConnection signalingState before setting local/remoteDescription
925         https://bugs.webkit.org/show_bug.cgi?id=125655
926
927         Reviewed by Eric Carlson.
928
929         Before setting a session description RTCPeerConnection must check if it is in valid state for that SDP type.
930
931         New tests: fast/mediastream/RTCPeerConnection-have-local-answer.html
932                fast/mediastream/RTCPeerConnection-have-local-offer.html
933                fast/mediastream/RTCPeerConnection-have-local-pranswer.html
934                fast/mediastream/RTCPeerConnection-have-remote-offer.html
935                fast/mediastream/RTCPeerConnection-have-remote-pranswer.html
936                fast/mediastream/RTCPeerConnection-stable.html
937
938         Modified: fast/mediastream/RTCPeerConnection-remoteDescription.html
939
940         * Modules/mediastream/RTCPeerConnection.cpp:
941         (WebCore::RTCPeerConnection::checkStateForLocalDescription): Checks if the current state of RTCPeerConnection is
942         valid for the local SDP that is being set.
943         (WebCore::RTCPeerConnection::checkStateForRemoteDescription): Checks if the current state of RTCPeerConnection
944         is valid for the remote SDP that is being set.
945         (WebCore::RTCPeerConnection::setLocalDescription): Now calls checkStateForLocalDescription prior to set the
946         local SDP.
947         (WebCore::RTCPeerConnection::setRemoteDescription): Now Calls checkStateForRemoteDescription prior to set the
948         remote SDP.
949         * Modules/mediastream/RTCPeerConnection.h:
950         * platform/mock/RTCNotifiersMock.cpp: Adding new class to notify RTCPeerConnection about a signaling state
951         change: SignalingStateNotifier.
952         (WebCore::SignalingStateNotifier::SignalingStateNotifier):
953         (WebCore::SignalingStateNotifier::fire):
954         * platform/mock/RTCNotifiersMock.h:
955         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
956         (WebCore::RTCPeerConnectionHandlerMock::signalingStateFromSDP): Defines the new state that RTCPeerConnection
957         should be, according the SDP that is being set.
958         (WebCore::RTCPeerConnectionHandlerMock::setLocalDescription): Calls signalingStateFromSDP, in order to get the
959         new signaling state and notify RTCPeerConnection object.
960         (WebCore::RTCPeerConnectionHandlerMock::setRemoteDescription): Ditto.
961         * platform/mock/RTCPeerConnectionHandlerMock.h:
962
963 2013-12-16  Tim Horton  <timothy_horton@apple.com>
964
965         Revert a mysterious and inexplicable part of http://trac.webkit.org/changeset/160685
966
967         * platform/KeyedCoding.h:
968         (WebCore::KeyedEncoder::encodeEnum):
969         (WebCore::KeyedEncoder::encodeObject):
970         (WebCore::KeyedEncoder::encodeConditionalObject):
971         (WebCore::KeyedEncoder::encodeObjects):
972
973 2013-12-16  Anders Carlsson  <andersca@apple.com>
974
975         Remove EnumClass.h from WTF
976         https://bugs.webkit.org/show_bug.cgi?id=125820
977
978         Reviewed by Darin Adler.
979
980         Replace uses of ENUM_CLASS with real enum class declarations.
981
982         * Modules/webdatabase/DatabaseBasicTypes.h:
983         * Modules/webdatabase/DatabaseError.h:
984         * Modules/webdatabase/SQLTransactionState.h:
985         * bindings/js/JSSubtleCryptoCustom.cpp:
986         * bindings/js/SerializedScriptValue.cpp:
987         * crypto/CryptoAlgorithmIdentifier.h:
988         * crypto/CryptoAlgorithmParameters.h:
989         * crypto/CryptoKey.h:
990         * crypto/CryptoKeyData.h:
991         * crypto/CryptoKeyType.h:
992         * crypto/keys/CryptoKeyDataRSAComponents.h:
993         * inspector/InspectorTimelineAgent.h:
994
995 2013-12-16  Tim Horton  <timothy_horton@apple.com>
996
997         WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
998         https://bugs.webkit.org/show_bug.cgi?id=125750
999
1000         Reviewed by Simon Fraser.
1001
1002         * WebCore.exp.in:
1003         Export a few things so WebKit2 can use them.
1004
1005 2013-12-16  Joseph Pecoraro  <pecoraro@apple.com>
1006
1007         Fix some whitespace issues in inspector code
1008         https://bugs.webkit.org/show_bug.cgi?id=125814
1009
1010         Reviewed by Darin Adler.
1011
1012         * inspector/protocol/DOM.json:
1013         * inspector/protocol/DOMStorage.json:
1014         * inspector/protocol/Timeline.json:
1015
1016 2013-12-16  Joseph Pecoraro  <pecoraro@apple.com>
1017
1018         Web Inspector: Use JSC::SourceID and JSC::BreakpointID instead of WebCore dups
1019         https://bugs.webkit.org/show_bug.cgi?id=125818
1020
1021         Reviewed by Mark Lam.
1022
1023         Remove the WebCore typedefs of JSC types. Prefer JSC namespace
1024         prefixed types throughout WebCore's Inspector code.
1025
1026         * GNUmakefile.list.am:
1027         * WebCore.vcxproj/WebCore.vcxproj:
1028         * WebCore.vcxproj/WebCore.vcxproj.filters:
1029         * WebCore.xcodeproj/project.pbxproj:
1030         * bindings/js/BreakpointID.h: Removed.
1031         * bindings/js/ScriptDebugServer.cpp:
1032         (WebCore::ScriptDebugServer::setBreakpoint):
1033         (WebCore::ScriptDebugServer::removeBreakpoint):
1034         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1035         * bindings/js/ScriptDebugServer.h:
1036         * bindings/js/SourceID.h: Removed.
1037         * inspector/InspectorDebuggerAgent.cpp:
1038         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1039         (WebCore::parseLocation):
1040         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1041         (WebCore::InspectorDebuggerAgent::continueToLocation):
1042         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1043         (WebCore::InspectorDebuggerAgent::searchInContent):
1044         (WebCore::InspectorDebuggerAgent::getScriptSource):
1045         (WebCore::InspectorDebuggerAgent::didParseSource):
1046         (WebCore::InspectorDebuggerAgent::didPause):
1047         (WebCore::InspectorDebuggerAgent::clear):
1048         * inspector/InspectorDebuggerAgent.h:
1049         * inspector/ScriptDebugListener.h:
1050
1051 2013-12-16  Daniel Bates  <dabates@apple.com>
1052
1053         [iOS] Upstream WebCore/dom changes
1054         https://bugs.webkit.org/show_bug.cgi?id=125646
1055
1056         Reviewed by David Kilzer.
1057
1058         * WebCore.exp.in: Added symbol __ZN7WebCore8Settings17setLayoutIntervalEi and removed symbol
1059         __ZN7WebCore24cLayoutScheduleThresholdE.
1060         * dom/ActiveDOMObject.h: Add suspension reason DocumentWillBePaused.
1061         * dom/DOMImplementation.cpp:
1062         (WebCore::DOMImplementation::createDocument): Opt-out of ENABLE(VIDEO) logic when
1063         building for iOS.
1064         * dom/DeviceMotionClient.h: Made class non-copyable.
1065         (WebCore::DeviceMotionClient::DeviceMotionClient): Added;
1066         * dom/DeviceMotionController.cpp: Added FIXME comment to reconcile iOS and OpenSource differences.
1067         (WebCore::DeviceMotionController::suspendUpdates): Added; guarded by PLATFORM(IOS).
1068         (WebCore::DeviceMotionController::resumeUpdates): Added; guarded by PLATFORM(IOS).
1069         * dom/DeviceMotionController.h: Added FIXME comment to reconcile iOS and OpenSource differences.
1070         * dom/DeviceOrientationClient.h: Made class non-copyable.
1071         (WebCore::DeviceOrientationClient::DeviceOrientationClient): Added.
1072         * dom/DeviceOrientationController.cpp: Added FIXME comment to reconcile iOS and OpenSource differences.
1073         (WebCore::DeviceOrientationController::DeviceOrientationController):
1074         (WebCore::DeviceOrientationController::suspendUpdates): Added; guarded by PLATFORM(IOS).
1075         (WebCore::DeviceOrientationController::resumeUpdates): Added; guarded by PLATFORM(IOS).
1076         * dom/DeviceOrientationController.h: Added FIXME comment to reconcile iOS and OpenSource differences.
1077         * dom/DeviceOrientationData.cpp:
1078         (WebCore::DeviceOrientationData::create): Added; iOS-specific. Added FIXME comment.
1079         (WebCore::DeviceOrientationData::DeviceOrientationData): Added iOS-specific code.
1080         (WebCore::DeviceOrientationData::compassHeading): Added; guarded by PLATFORM(IOS).
1081         (WebCore::DeviceOrientationData::compassAccuracy): Added; guarded by PLATFORM(IOS).
1082         (WebCore::DeviceOrientationData::canProvideCompassHeading): Added; guarded by PLATFORM(IOS).
1083         (WebCore::DeviceOrientationData::canProvideCompassAccuracy): Added; guarded by PLATFORM(IOS).
1084         * dom/DeviceOrientationData.h:
1085         * dom/DeviceOrientationEvent.idl: Added iOS-specific code.
1086         * dom/Document.cpp: Moved constant cLayoutScheduleThreshold to Settings.cpp and renamed it
1087         layoutScheduleThreshold towards allowing a port to configure the layout interval.
1088         (WebCore::Document::Document): Added optional argument isSynthesized, defaults false.
1089         (WebCore::Document::~Document): Added iOS-specific code to destroy the device motion
1090         and device orientation controllers.
1091         (WebCore::Document::didBecomeCurrentDocumentInFrame): Added iOS-specific code with FIXME comment.
1092         (WebCore::Document::prepareForDestruction): Added iOS-specific touch event code.
1093         (WebCore::Document::removeAllEventListeners): Ditto.
1094         (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Added; compiles to an empty function on
1095         non-iOS port.
1096         (WebCore::Document::suspendActiveDOMObjects): Modified to call platformSuspendOrStopActiveDOMObjects().
1097         (WebCore::Document::resumeActiveDOMObjects): Ditto.
1098         (WebCore::Document::stopActiveDOMObjects): Added.
1099         (WebCore::Document::implicitClose): Modified to query Settings::layoutInterval().
1100         (WebCore::Document::minimumLayoutDelay): Ditto.
1101         (WebCore::Document::processViewport): Added iOS-specific code.
1102         (WebCore::Document::updateViewportArguments): Ditto.
1103         (WebCore::setParserFeature): Added; guarded by PLATFORM(IOS).
1104         (WebCore::Document::processFormatDetection): Added; guarded by PLATFORM(IOS).
1105         (WebCore::Document::processWebAppOrientations): Added; guarded by PLATFORM(IOS).
1106         (WebCore::Document::isTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
1107         (WebCore::Document::setIsTelephoneNumberParsingAllowed): Added; guarded by PLATFORM(IOS).
1108         (WebCore::Document::isTelephoneNumberParsingAllowed): Added; guarded by PLATFORM(IOS).
1109         (WebCore::Document::initSecurityContext): Added iOS-specific code.
1110         (WebCore::Document::suspendScheduledTasks): Added; guarded by PLATFORM(IOS).
1111         (WebCore::Document::deviceMotionController): Added; iOS-specific.
1112         (WebCore::Document::deviceOrientationController): Added; iOS-specific.
1113         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale): Added iOS-specific code.
1114         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale): Added iOS-specific code.
1115         * dom/Document.h: Register gesture events gesture{change, end, start}; guarded by ENABLE(IOS_GESTURE_EVENTS).
1116         (WebCore::Document::isSynthesized): Added.
1117         (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Added.
1118         * dom/Document.idl:
1119         * dom/DocumentMarker.h: Added iOS-specific changes. We should look to reconcile the differences between
1120         iOS and OpenSource. See <rdar://problem/11306422>.
1121         (WebCore::DocumentMarker::AllMarkers::AllMarkers):
1122         (WebCore::DocumentMarker::DocumentMarker): Added; iOS-specific.
1123         (WebCore::DocumentMarker::alternatives): Added; iOS-specific.
1124         (WebCore::DocumentMarker::setAlternative): Added; iOS-specific.
1125         (WebCore::DocumentMarker::metadata): Added; iOS-specific.
1126         (WebCore::DocumentMarker::setMetadata): Added; iOS-specific.
1127         * dom/DocumentMarkerController.cpp:
1128         (WebCore::DocumentMarkerController::addMarker):
1129         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
1130         (WebCore::DocumentMarkerController::addDictationResultMarker):
1131         (WebCore::DocumentMarkerController::shiftMarkers):
1132         * dom/DocumentMarkerController.h:
1133         * dom/Element.cpp:
1134         (WebCore::Element::focus): Add iOS-specific workaround for <rdar://problem/6699741>.
1135         * dom/Element.h: Register gesture events gesture{change, end, start}; guarded by ENABLE(IOS_GESTURE_EVENTS).
1136         * dom/EventContext.cpp: Opt-out of ENABLE(TOUCH_EVENTS)-guarded code when building the iOS port.
1137         * dom/EventContext.h: Ditto.
1138         * dom/EventDispatcher.cpp:
1139         (WebCore::EventRelatedNodeResolver::EventRelatedNodeResolver): Ditto.
1140         (WebCore::EventDispatcher::dispatchEvent): Ditto.
1141         (WebCore::EventPath::EventPath): Ditto.
1142         * dom/EventNames.h: Added events webkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged}
1143         and gesture{change, end, start}.
1144         * dom/EventNames.in: Added event names GestureEvent and WebKitPlaybackTargetAvailabilityEvent conditioned on
1145         the macro defines ENABLE_IOS_GESTURE_EVENTS and ENABLE_IOS_AIRPLAY.
1146         * dom/MouseRelatedEvent.cpp:
1147         (WebCore::contentsScrollOffset): Added iOS-specific code.
1148         (WebCore::MouseRelatedEvent::MouseRelatedEvent): Ditto.
1149         * dom/Node.cpp:
1150         (WebCore::Node::willBeDeletedFrom): Ditto.
1151         (WebCore::Node::isDescendantOf): Fixed style issue in function prototype; moved '*' to the left side.
1152         (WebCore::Node::isDescendantOrShadowDescendantOf): Added.
1153         (WebCore::tryAddEventListener): Added iOS-specific code; also added FIXME comment.
1154         (WebCore::tryRemoveEventListener): Ditto.
1155         (WebCore::Node::dispatchEvent): Opt-out of ENABLE(TOUCH_EVENTS)-guarded code when building the iOS port.
1156         (WebCore::Node::defaultEventHandler): Added iOS-specific code.
1157         (WebCore::Node::willRespondToMouseMoveEvents): Added iOS-specific code; also added FIXME comment.
1158         (WebCore::Node::willRespondToMouseClickEvents): Added iOS-specific code; also added FIXME comment.
1159         (WebCore::Node::willRespondToMouseWheelEvents): Added.
1160         * dom/Node.h:
1161         * dom/Position.h:
1162         (WebCore::operator<): Added.
1163         (WebCore::operator>): Added.
1164         (WebCore::operator>=): Added.
1165         (WebCore::operator<=): Added.
1166         * dom/Range.cpp:
1167         (WebCore::Range::create): Added iOS-specific code; also added FIXME comment.
1168         (WebCore::intervalsSufficientlyOverlap): Added; guarded by PLATFORM(IOS).
1169         (WebCore::printRects): Added; guarded by PLATFORM(IOS).
1170         (WebCore::adjustLineHeightOfSelectionRects): Added; guarded by PLATFORM(IOS).
1171         (WebCore::coalesceSelectionRects): Added; guarded by PLATFORM(IOS).
1172         (WebCore::Range::collectSelectionRects): Added; guarded by PLATFORM(IOS).
1173         * dom/Range.h:
1174         * dom/ScriptExecutionContext.cpp:
1175         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Added iOS-specific code.
1176         (WebCore::ScriptExecutionContext::dispatchErrorEvent): Ditto.
1177         * dom/TreeScope.cpp:
1178         (WebCore::nodeFromPoint): Ditto.
1179         * dom/ViewportArguments.cpp:
1180         (WebCore::computeViewportAttributes): Ditto.
1181         (WebCore::setViewportFeature): Added iOS-specific code.
1182         (WebCore::finalizeViewportArguments): Added; iOS-specific.
1183         * dom/ViewportArguments.h:
1184         * dom/make_names.pl: Added support to find the path to gcc with respect to the environment
1185         variable SDKROOT.
1186         * html/HTMLMediaElement.cpp:
1187         (HTMLMediaElement::suspend):
1188         * page/Settings.cpp:
1189         (WebCore::Settings::Settings): Initialize setting m_layoutInterval to layoutScheduleThreshold.
1190         (WebCore::Settings::setLayoutInterval): Added.
1191         * page/Settings.h:
1192         (WebCore::Settings::layoutInterval): Added.
1193
1194 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
1195
1196         Attempt to fix the Windows build after r160672.
1197         
1198         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1199         (PlatformCALayerWin::PlatformCALayerWin):
1200         * platform/graphics/ca/win/PlatformCALayerWin.h:
1201
1202 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
1203
1204         Apply overhang shadow and linen to UI-side layers
1205         https://bugs.webkit.org/show_bug.cgi?id=125807
1206
1207         Reviewed by Tim Horton.
1208         
1209         With UI-side compositing, we need to apply the overhang shadow and linen
1210         background to layers in the UI process. Achieve this by setting a "custom
1211         appearance" flag on layers that need a shadow or linen background, and
1212         migrating this flag to the UI process. Static functions on ScrollbarThemeMac
1213         are exposed to do the actual setting.
1214
1215         * WebCore.exp.in: Export ScrollbarThemeMac and GraphicsLayerCA functions.
1216         * WebCore.xcodeproj/project.pbxproj: ScrollbarThemeMac.h and ScrollbarThemeComposite.h
1217         need to be Private.
1218         * platform/graphics/GraphicsLayer.cpp: Initialize m_customAppearance.
1219         (WebCore::GraphicsLayer::GraphicsLayer):
1220         * platform/graphics/GraphicsLayer.h: Getter/setter for CustomAppearance.
1221         (WebCore::GraphicsLayer::setCustomAppearance):
1222         (WebCore::GraphicsLayer::customAppearance):
1223         * platform/graphics/ca/GraphicsLayerCA.cpp: Update CustomAppearanceChanged as
1224         we do other properties.
1225         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1226         (WebCore::GraphicsLayerCA::updateCustomAppearance):
1227         (WebCore::GraphicsLayerCA::setCustomAppearance):
1228         * platform/graphics/ca/GraphicsLayerCA.h:
1229         * platform/graphics/ca/PlatformCALayer.h:
1230         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1231         * platform/graphics/ca/mac/PlatformCALayerMac.mm: When we have a custom
1232         appearance, use ScrollbarThemeMac functions to update the layer. Ensure
1233         that if the bounds change, we update the shadow (whose path depends on the bounds).
1234         (PlatformCALayerMac::PlatformCALayerMac):
1235         (PlatformCALayerMac::clone):
1236         (PlatformCALayerMac::setBounds):
1237         (PlatformCALayerMac::requiresCustomAppearanceUpdateOnBoundsChange):
1238         (PlatformCALayerMac::updateCustomAppearance):
1239         * platform/mac/ScrollbarThemeMac.h: Export some static functions.
1240         * platform/mac/ScrollbarThemeMac.mm: Change code to use static functions.
1241         (WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):
1242         (WebCore::ScrollbarThemeMac::removeOverhangAreaBackground):
1243         (WebCore::ScrollbarThemeMac::setUpOverhangAreaShadow):
1244         (WebCore::ScrollbarThemeMac::removeOverhangAreaShadow):
1245         (WebCore::ScrollbarThemeMac::setUpOverhangAreasLayerContents):
1246         (WebCore::ScrollbarThemeMac::setUpContentShadowLayer):
1247         * rendering/RenderLayerCompositor.cpp:
1248         (WebCore::RenderLayerCompositor::updateRootLayerPosition): No need to call
1249         setUpContentShadowLayer() now when size changes; PlatformCALayer takes
1250         care of that.
1251         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Now set
1252         custom appearance via GraphicsLayer.
1253
1254 2013-12-16  Brent Fulgham  <bfulgham@apple.com>
1255
1256         [Win] Remove dead code after converstion to VS2013
1257         https://bugs.webkit.org/show_bug.cgi?id=125795
1258
1259         Reviewed by Darin Adler.
1260
1261         * WebCorePrefix.h: Remove VS2012 include kludge.
1262         * loader/FTPDirectoryParser.cpp: Remove gmtime workaround code.
1263         * page/DOMWindow.cpp: Remove older pointer-based open implementation.
1264         * page/DOMWindow.h: Ditto
1265         * platform/text/TextEncodingRegistry.cpp:
1266         (WebCore::TextEncodingNameHash::equal): Remove optimization bug workaround
1267         * testing/Internals.cpp:
1268         (WebCore::Internals::openDummyInspectorFrontend): Remove compiler workaround
1269
1270 2013-12-16  Daniel Bates  <dabates@apple.com>
1271
1272         [iOS] Upstream WebCore/history changes
1273         https://bugs.webkit.org/show_bug.cgi?id=125769
1274
1275         Reviewed by Darin Adler.
1276
1277         * history/BackForwardClient.h:
1278         * history/BackForwardList.cpp:
1279         (WebCore::BackForwardList::current): Added; guard by PLATFORM(IOS). Also added FIXME comment.
1280         (WebCore::BackForwardList::setCurrent): Added; guard by PLATFORM(IOS). Also added FIXME comment.
1281         (WebCore::BackForwardList::clearAllPageCaches): Added; guarded by PLATFORM(IOS).
1282         * history/BackForwardList.h:
1283         * history/CachedFrame.cpp:
1284         (WebCore::CachedFrameBase::restore): Added iOS-specific code.
1285         (WebCore::CachedFrame::CachedFrame): Ditto.
1286         * history/CachedPage.cpp:
1287         (WebCore::CachedPage::restore): Ditto.
1288         * history/HistoryItem.cpp:
1289         (WebCore::HistoryItem::HistoryItem): Ditto.
1290         * history/HistoryItem.h:
1291         (WebCore::HistoryItem::scale): Added; guarded by PLATFORM(IOS).
1292         (WebCore::HistoryItem::scaleIsInitial): Added; guarded by PLATFORM(IOS).
1293         (WebCore::HistoryItem::setScale): Added; guarded by PLATFORM(IOS).
1294         (WebCore::HistoryItem::viewportArguments): Added; guarded by PLATFORM(IOS).
1295         (WebCore::HistoryItem::setViewportArguments): Added; guarded by PLATFORM(IOS).
1296         (WebCore::HistoryItem::bookmarkID): Added; guarded by PLATFORM(IOS).
1297         (WebCore::HistoryItem::setBookmarkID): Added; guarded by PLATFORM(IOS).
1298         (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS).
1299         (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS).
1300         * history/PageCache.cpp:
1301         (WebCore::logCanCacheFrameDecision): Added iOS-specific code.
1302         (WebCore::logCanCachePageDecision): Ditto.
1303         (WebCore::PageCache::canCachePageContainingThisFrame): Ditto.
1304         (WebCore::PageCache::canCache): Ditto.
1305         (WebCore::PageCache::pruneToCapacityNow): Added.
1306         * history/PageCache.h:
1307
1308 2013-12-16  Daniel Bates  <dabates@apple.com>
1309
1310         [iOS] Upstream WebCore/svg changes
1311         https://bugs.webkit.org/show_bug.cgi?id=125784
1312
1313         Reviewed by Darin Adler.
1314
1315         * svg/SVGAElement.cpp:
1316         (WebCore::SVGAElement::willRespondToMouseClickEvents): Added.
1317         * svg/SVGAElement.h:
1318         * svg/SVGElement.cpp:
1319         (WebCore::SVGElement::parseAttribute): Added attribute listeners for touch{cancel, end, move, start},
1320         and gesture{change, end, start}.
1321
1322 2013-12-13  Jeffrey Pfau  <jpfau@apple.com>
1323
1324         [Mac] Cache partitioning asserts when associated NSURLRequest is nil
1325         https://bugs.webkit.org/show_bug.cgi?id=125716
1326
1327         Reviewed by Darin Adler.
1328
1329         * platform/network/mac/ResourceRequestMac.mm:
1330         (WebCore::ResourceRequest::doUpdateResourceRequest):
1331
1332 2013-12-16  Brady Eidson  <beidson@apple.com>
1333
1334         DatabaseProcess: Fix a few bugs with opening an IDB connection
1335         https://bugs.webkit.org/show_bug.cgi?id=125798
1336
1337         Reviewed by Alexey Proskuryakov.
1338
1339         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1340         (WebCore::IDBDatabaseBackend::processPendingCalls): As the comment says, we should only
1341           early return when there *are* pending delete calls. The logic here was backwards,
1342           preventing the backend from ever getting to processPendingOpenCalls().
1343
1344 2013-12-16  Alex Christensen  <achristensen@webkit.org>
1345
1346         Fixed Win64 build on VS2013.
1347         https://bugs.webkit.org/show_bug.cgi?id=125753
1348
1349         Reviewed by Brent Fulgham.
1350
1351         * WebCore.vcxproj/WebCore.vcxproj:
1352         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
1353         Added correct PlatformToolset for 64-bit builds.
1354
1355 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
1356
1357         Package up some data about scrollability into a struct for use in the scrolling tree
1358         https://bugs.webkit.org/show_bug.cgi?id=125792
1359
1360         Reviewed by Beth Dakin.
1361
1362         Both scrolling state nodes and scrolling nodes share a set of parameters
1363         relating to scrollability and rubberbanding, so package them into a struct
1364         for re-use. Send the struct wholesale to the scrolling thread.
1365
1366         * page/scrolling/ScrollingCoordinator.h:
1367         (WebCore::ScrollableAreaParameters::ScrollableAreaParameters): New struct.
1368         (WebCore::ScrollableAreaParameters::operator==):
1369         * page/scrolling/ScrollingStateScrollingNode.cpp:
1370         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): Reordering.
1371         (WebCore::ScrollingStateScrollingNode::setScrollOrigin): Moved.
1372         (WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters): Set the parameters all at once.
1373         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
1374         * page/scrolling/ScrollingStateScrollingNode.h: Getters access the struct. Reorder member variables.
1375         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1376         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
1377         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
1378         * page/scrolling/ScrollingTreeScrollingNode.h:
1379         (WebCore::ScrollingTreeScrollingNode::scrollOrigin):
1380         (WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity):
1381         (WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity):
1382         (WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar):
1383         (WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar):
1384         (WebCore::ScrollingTreeScrollingNode::canHaveScrollbars):
1385         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1386         * page/scrolling/mac/ScrollingCoordinatorMac.mm: Removed setScrollParametersForNode().
1387         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated): Set the params in this
1388         function. Reordering.
1389
1390 2013-12-16  Sam Weinig  <sam@webkit.org>
1391
1392         CTTE: Convert more of SVG to use references
1393         https://bugs.webkit.org/show_bug.cgi?id=125762
1394
1395         Reviewed by Darin Adler.
1396
1397         * rendering/svg/RenderSVGImage.cpp:
1398         (WebCore::RenderSVGImage::imageChanged):
1399         * rendering/svg/RenderSVGResource.cpp:
1400         (WebCore::removeFromCacheAndInvalidateDependencies):
1401         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
1402         * rendering/svg/RenderSVGResource.h:
1403         * rendering/svg/RenderSVGResourceClipper.cpp:
1404         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
1405         * rendering/svg/RenderSVGResourceClipper.h:
1406         * rendering/svg/RenderSVGResourceContainer.cpp:
1407         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
1408         (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):
1409         (WebCore::RenderSVGResourceContainer::markClientForInvalidation):
1410         (WebCore::RenderSVGResourceContainer::removeClient):
1411         * rendering/svg/RenderSVGResourceContainer.h:
1412         * rendering/svg/RenderSVGResourceFilter.cpp:
1413         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
1414         (WebCore::RenderSVGResourceFilter::postApplyResource):
1415         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
1416         * rendering/svg/RenderSVGResourceFilter.h:
1417         * rendering/svg/RenderSVGResourceGradient.cpp:
1418         (WebCore::RenderSVGResourceGradient::removeClientFromCache):
1419         * rendering/svg/RenderSVGResourceGradient.h:
1420         * rendering/svg/RenderSVGResourceMarker.cpp:
1421         (WebCore::RenderSVGResourceMarker::removeClientFromCache):
1422         * rendering/svg/RenderSVGResourceMarker.h:
1423         * rendering/svg/RenderSVGResourceMasker.cpp:
1424         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
1425         * rendering/svg/RenderSVGResourceMasker.h:
1426         * rendering/svg/RenderSVGResourcePattern.cpp:
1427         (WebCore::RenderSVGResourcePattern::removeClientFromCache):
1428         * rendering/svg/RenderSVGResourcePattern.h:
1429         * rendering/svg/RenderSVGResourceSolidColor.h:
1430         (WebCore::RenderSVGResourceSolidColor::removeClientFromCache):
1431         * rendering/svg/SVGRenderSupport.cpp:
1432         (WebCore::invalidateResourcesOfChildren):
1433         * rendering/svg/SVGResources.cpp:
1434         (WebCore::SVGResources::removeClientFromCache):
1435         * rendering/svg/SVGResources.h:
1436         * rendering/svg/SVGResourcesCache.cpp:
1437         (WebCore::SVGResourcesCache::clientLayoutChanged):
1438         (WebCore::SVGResourcesCache::clientStyleChanged):
1439         (WebCore::SVGResourcesCache::clientWasAddedToTree):
1440         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
1441         (WebCore::SVGResourcesCache::clientDestroyed):
1442         * svg/SVGAnimateMotionElement.cpp:
1443         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
1444         * svg/SVGCircleElement.cpp:
1445         (WebCore::SVGCircleElement::svgAttributeChanged):
1446         * svg/SVGEllipseElement.cpp:
1447         (WebCore::SVGEllipseElement::svgAttributeChanged):
1448         * svg/SVGFEImageElement.cpp:
1449         (WebCore::SVGFEImageElement::notifyFinished):
1450         * svg/SVGFELightElement.cpp:
1451         (WebCore::SVGFELightElement::childrenChanged):
1452         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1453         (WebCore::invalidateFilterPrimitiveParent):
1454         * svg/SVGFilterPrimitiveStandardAttributes.h:
1455         (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate):
1456         (WebCore::SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged):
1457         * svg/SVGForeignObjectElement.cpp:
1458         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
1459         * svg/SVGGElement.cpp:
1460         (WebCore::SVGGElement::svgAttributeChanged):
1461         * svg/SVGGraphicsElement.cpp:
1462         (WebCore::SVGGraphicsElement::svgAttributeChanged):
1463         * svg/SVGImageElement.cpp:
1464         (WebCore::SVGImageElement::svgAttributeChanged):
1465         * svg/SVGLineElement.cpp:
1466         (WebCore::SVGLineElement::svgAttributeChanged):
1467         * svg/SVGPathElement.cpp:
1468         (WebCore::SVGPathElement::svgAttributeChanged):
1469         (WebCore::SVGPathElement::invalidateMPathDependencies):
1470         (WebCore::SVGPathElement::pathSegListChanged):
1471         * svg/SVGPolyElement.cpp:
1472         (WebCore::SVGPolyElement::svgAttributeChanged):
1473         * svg/SVGRectElement.cpp:
1474         (WebCore::SVGRectElement::svgAttributeChanged):
1475         * svg/SVGSVGElement.cpp:
1476         (WebCore::SVGSVGElement::svgAttributeChanged):
1477         (WebCore::SVGSVGElement::setupInitialView):
1478         * svg/SVGStopElement.cpp:
1479         (WebCore::SVGStopElement::svgAttributeChanged):
1480         * svg/SVGTRefElement.cpp:
1481         (WebCore::SVGTRefElement::svgAttributeChanged):
1482         * svg/SVGTextContentElement.cpp:
1483         (WebCore::SVGTextContentElement::svgAttributeChanged):
1484         * svg/SVGTextPathElement.cpp:
1485         (WebCore::SVGTextPathElement::svgAttributeChanged):
1486         * svg/SVGTextPositioningElement.cpp:
1487         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
1488         * svg/SVGUseElement.cpp:
1489         (WebCore::SVGUseElement::svgAttributeChanged):
1490
1491 2013-12-16  Hans Muller  <hmuller@adobe.com>
1492
1493         [CSS Shapes] Add support for the computing the included intervals for a BoxShape
1494         https://bugs.webkit.org/show_bug.cgi?id=124605
1495
1496         Reviewed by Andreas Kling.
1497
1498         Setting shape-inside to content-box now works.
1499
1500         Changed FloatRoundedRect::xInterceptsAtY() to include the bottom edge of
1501         the rectangle and to check for the special cases where any or all of the
1502         corner radii are empty.
1503
1504         Test: fast/shapes/shape-inside/shape-inside-content-box.html
1505
1506         * platform/graphics/FloatRoundedRect.cpp:
1507         (WebCore::FloatRoundedRect::xInterceptsAtY):
1508         * rendering/shapes/BoxShape.cpp:
1509         (WebCore::BoxShape::getIncludedIntervals): Replaced the stub implementation with logic that's similar to getExcludedIntervals().
1510         * rendering/shapes/ShapeInfo.cpp:
1511         (WebCore::::computedShape): Removed a meaningless assert.
1512         * rendering/shapes/ShapeInsideInfo.cpp:
1513         (WebCore::ShapeInsideInfo::isEnabledFor):
1514
1515 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
1516
1517         [ATK] Expose accessibility objects for more WAI-ARIA roles
1518         https://bugs.webkit.org/show_bug.cgi?id=125596
1519
1520         Reviewed by Chris Fleizach.
1521
1522         Exposed accessibility objects with the proper AtkRoles, some of
1523         them to be provided by the next stable release of ATK.
1524
1525         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1526         (atkRole):
1527
1528 2013-12-16  Eric Carlson  <eric.carlson@apple.com>
1529
1530         Fix QuickTime plug-in replacement scripting bugs
1531         https://bugs.webkit.org/show_bug.cgi?id=125717
1532
1533         Reviewed by Sam Weinig.
1534
1535         No new tests, existing test updated.
1536
1537         * Modules/plugins/QuickTimePluginReplacement.js:
1538         (Replacement): Change '' to "" to avoid "Empty character constant" warning when creating
1539             Derived Sources.
1540         (Replacement.prototype.createVideoElement): Handle qtsrc attribute. Remember base url.
1541         (Replacement.prototype.setURL): Resolve urls relative to base.
1542
1543 2013-12-15  Darin Adler  <darin@apple.com>
1544
1545         Catch callers who forget to use initializeStyle
1546         https://bugs.webkit.org/show_bug.cgi?id=125763
1547
1548         Reviewed by Andreas Kling.
1549
1550         A recent fix was because a caller used setStyle first rather than using
1551         initializeStyle. This patch adds an assertion to catch cases where we do
1552         that so we see the mistake right away instead of indirectly later.
1553
1554         * rendering/RenderElement.cpp:
1555         (WebCore::RenderElement::initializeStyle): Simplified an assertion.
1556         (WebCore::RenderElement::setStyle): Added an assertion that m_hasInitializedStyle
1557         is true, with an exception for RenderView, which needs to be created before we
1558         have the correct style computed for it (at least for now). Also broke out an
1559         assertion that was using &&, since we would prefer to know which clause failed,
1560         making separate assertions more useful than a combined assertion.
1561
1562 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
1563
1564         [ATK] Expose accessibility objects with ATK_ROLE_CHECK_MENU_ITEM
1565         https://bugs.webkit.org/show_bug.cgi?id=125594
1566
1567         Reviewed by Chris Fleizach.
1568
1569         Exposed accessibility objects with checkmenuitem role with the
1570         proper AtkRole, to be provided by the next stable release of ATK.
1571
1572         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1573         (atkRole):
1574
1575 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
1576
1577         [ATK] Expose accessibility objects with ATK_ROLE_ARTICLE
1578         https://bugs.webkit.org/show_bug.cgi?id=125587
1579
1580         Reviewed by Chris Fleizach.
1581
1582         Exposed accessibility objects with article role with the proper
1583         AtkRole, to be provided by the next stable release of ATK.
1584
1585         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1586         (atkRole):
1587
1588 2013-11-27  Sergio Villar Senin  <svillar@igalia.com>
1589
1590         [CSS Grid Layout] Fix the preferred logical widths code to work with spanning grid items
1591         https://bugs.webkit.org/show_bug.cgi?id=123994
1592
1593         Reviewed by Andreas Kling.
1594
1595         From Blink r159189 by <jchaffraix@chromium.org>
1596
1597         There was no definition in the specs for the intrinsic / preferred
1598         logical widths on the grid element. The following was proposed to
1599         the WG and later accepted:
1600         - The sum of the grid tracks' UsedBreadth is the minimum logical width
1601         - The sum of the grid tracks' MaxBreadth is the maximum logical width
1602
1603         http://lists.w3.org/Archives/Public/www-style/2013Oct/0054.html
1604         for more information.
1605
1606         * rendering/RenderGrid.cpp:
1607         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1608         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
1609         (WebCore::RenderGrid::minContentForChild):
1610         (WebCore::RenderGrid::maxContentForChild):
1611         * rendering/RenderGrid.h:
1612
1613 2013-12-15  Frédéric Wang  <fred.wang@free.fr>
1614
1615         Add support for maction@toggle
1616         https://bugs.webkit.org/show_bug.cgi?id=120059
1617
1618         Reviewed by Chris Fleizach.
1619
1620         Test: mathml/presentation/maction-toggle.html
1621
1622         * mathml/MathMLSelectElement.cpp:
1623         (WebCore::MathMLSelectElement::getSelectedChildAndIndex):
1624         (WebCore::MathMLSelectElement::updateSelectedChild):
1625         (WebCore::MathMLSelectElement::defaultEventHandler):
1626         (WebCore::MathMLSelectElement::willRespondToMouseClickEvents):
1627         (WebCore::MathMLSelectElement::toggle):
1628         * mathml/MathMLSelectElement.h:
1629
1630 2013-12-15  Darin Adler  <darin@apple.com>
1631
1632         More nullptr in RenderElement
1633         https://bugs.webkit.org/show_bug.cgi?id=125764
1634
1635         Reviewed by Andreas Kling.
1636
1637         * rendering/RenderElement.cpp:
1638         (WebCore::RenderElement::uncachedFirstLineStyle):
1639         (WebCore::RenderElement::updateShapeImage):
1640         (WebCore::RenderElement::destroyLeftoverChildren):
1641         (WebCore::RenderElement::findNextLayer):
1642         Use nullptr in a few more places.
1643
1644 2013-12-15  Ryosuke Niwa  <rniwa@webkit.org>
1645
1646         REGRESSION: 2x regression on Dromaeo DOM query tests
1647         https://bugs.webkit.org/show_bug.cgi?id=125377
1648
1649         Reviewed by Filip Pizlo.
1650
1651         The bug was caused by JSC not JIT'ing property accesses on document because of its having
1652         custom named getter (named properties).  This resulted in resolution of methods on document
1653         such as getElementById to happen inside the interpreter.
1654
1655         Fixed the bug by using the new JSC type info flag which tells JSC to JIT property access on
1656         document, and then notifying JSC whenever a new named property appeared on document.
1657
1658         Tests: js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
1659                js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
1660                js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html
1661                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
1662                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
1663                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html
1664
1665         * bindings/js/JSDOMBinding.cpp:
1666         (WebCore::addImpureProperty): Wraps VM::addImpureProperty.
1667         * bindings/js/JSDOMBinding.h:
1668         * bindings/scripts/CodeGeneratorJS.pm:
1669         (GenerateHeader): Added the support for NewImpurePropertyFiresWatchpoints.
1670         * bindings/scripts/IDLAttributes.txt: Ditto.
1671         * html/HTMLDocument.cpp:
1672         (WebCore::HTMLDocument::addDocumentNamedItem): Calls addImpureProperty.
1673         * html/HTMLDocument.idl: Added NewImpurePropertyFiresWatchpoints.
1674
1675 2013-12-15  Brent Fulgham  <bfulgham@webkit.org>
1676
1677         [WIn] Unreviewed build fix after r160599
1678
1679         * rendering/RenderMediaControls.cpp:
1680         (WebCore::determineState): RenderObject::theme now returns
1681         a reference.
1682
1683 2013-12-15  Brent Fulgham  <bfulgham@webkit.org>
1684
1685         [Win] Unreviewed build fix
1686
1687         The build system continues to attempt to build QTMovieWin, even
1688         though it is excluded from the build solution. I'm actually
1689         removing the project files to prevent this.
1690
1691         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Removed.
1692         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters: Removed.
1693
1694 2013-12-15  Rob Buis  <rob.buis@samsung.com>
1695
1696         [CSS Shapes] shape-outside animation does not handle 'auto' well
1697         https://bugs.webkit.org/show_bug.cgi?id=125700
1698
1699         Reviewed by Dirk Schulze.
1700
1701         Handle the case where we are blending/animating with a null ShapeValue due to 'auto'.
1702
1703         Adapted LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html for testing this.
1704
1705         * page/animation/CSSPropertyAnimation.cpp:
1706         (WebCore::blendFunc):
1707
1708 2013-12-15  Andy Estes  <aestes@apple.com>
1709
1710         [iOS] Upstream changes to FeatureDefines.xcconfig
1711         https://bugs.webkit.org/show_bug.cgi?id=125742
1712
1713         Reviewed by Dan Bernstein.
1714
1715         * Configurations/FeatureDefines.xcconfig:
1716
1717 2013-12-14  Darin Adler  <darin@apple.com>
1718
1719         Crash in CSSImageGeneratorValue and RenderScrollbar
1720         https://bugs.webkit.org/show_bug.cgi?id=125702
1721
1722         Reviewed by Alexey Proskuryakov.
1723
1724         This crash had two causes at two different levels. The crash fixes both.
1725
1726         At the RenderScrollbar level, we were setting up a new renderer, a
1727         RenderScrollbarPart, and never calling initializeStyle. This meant that
1728         we did not do proper style setup, which meant we did not end up calling
1729         CSSImageGeneratorValue::addClient and so had a removeClient that was not
1730         properly balanced by an addClient. This is the primary bug.
1731
1732         At the CSSImageGeneratorValue level, the addClient and removeClient
1733         functions were not properly handling possibly-mismatched calls. It was
1734         easy to fix the functions to work even if the calls are not perfectly
1735         matched up, which makes the consequences of a missed addClient call
1736         much less dire, no longer messing up reference counting. Fixing this
1737         mitigates the risk if we made this same mistake elsewhere, although I
1738         could not find any other places with some quick searches.
1739
1740         Test: fast/css/scrollbar-image-crash.html
1741
1742         * css/CSSImageGeneratorValue.cpp:
1743         (WebCore::CSSImageGeneratorValue::addClient): Only call ref if this will
1744         add the first client.
1745         (WebCore::CSSImageGeneratorValue::removeClient): Only call deref if this
1746         removes the last client. Also added an assertion that can fire if we call
1747         removeClient without first calling addClient, which is illegal. However,
1748         the function handles that case without over-deref'ing itself.
1749
1750         * rendering/RenderScrollbar.cpp:
1751         (WebCore::RenderScrollbar::updateScrollbarPart): Simplify the logic for
1752         needRenderer a bit. Use initializeStyle rather than setStyle when first
1753         creating the RenderScrollbarPart. Also use add and take properly so we
1754         don't do extra hash lookups the old code did with get/set and get/remove.
1755
1756 2013-12-14  Sam Weinig  <sam@webkit.org>
1757
1758         CTTE: SVGResourcesCache::cachedResourcesForRenderObject() should take a reference
1759         https://bugs.webkit.org/show_bug.cgi?id=125743
1760
1761         Reviewed by Dan Bernstein.
1762
1763         * rendering/svg/RenderSVGContainer.cpp:
1764         (WebCore::RenderSVGContainer::selfWillPaint):
1765         * rendering/svg/RenderSVGImage.cpp:
1766         (WebCore::RenderSVGImage::imageChanged):
1767         * rendering/svg/RenderSVGResource.cpp:
1768         (WebCore::requestPaintingResource):
1769         (WebCore::removeFromCacheAndInvalidateDependencies):
1770         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
1771         * rendering/svg/RenderSVGResourceClipper.cpp:
1772         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1773         * rendering/svg/RenderSVGRoot.cpp:
1774         (WebCore::RenderSVGRoot::paintReplaced):
1775         * rendering/svg/RenderSVGShape.cpp:
1776         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
1777         (WebCore::RenderSVGShape::markerRect):
1778         (WebCore::RenderSVGShape::drawMarkers):
1779         * rendering/svg/SVGRenderSupport.cpp:
1780         (WebCore::invalidateResourcesOfChildren):
1781         (WebCore::SVGRenderSupport::layoutChildren):
1782         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
1783         (WebCore::SVGRenderSupport::filtersForceContainerLayout):
1784         (WebCore::SVGRenderSupport::pointInClippingArea):
1785         * rendering/svg/SVGRenderingContext.cpp:
1786         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1787         * rendering/svg/SVGResourcesCache.cpp:
1788         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject):
1789         (WebCore::SVGResourcesCache::clientLayoutChanged):
1790         (WebCore::SVGResourcesCache::clientDestroyed):
1791         * rendering/svg/SVGResourcesCache.h:
1792         * rendering/svg/SVGResourcesCycleSolver.cpp:
1793         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles):
1794
1795 2013-12-14  Dan Bernstein  <mitz@apple.com>
1796
1797         Clean up the project after r160487
1798
1799         * WebCore.xcodeproj/project.pbxproj: Moved reference to Security.framework from the top
1800         level of the project to the Frameworks group, and made it SDK-relative.
1801
1802 2013-12-14  Andreas Kling  <akling@apple.com>
1803
1804         Page::theme() should return a reference.
1805         <https://webkit.org/b/125737>
1806
1807         There's always a RenderTheme, and not a single call site was checking
1808         for null pointers anyway. Updated RenderObject::theme() as well.
1809
1810         Reviewed by Antti Koivisto.
1811
1812 2013-12-13  Sam Weinig  <sam@webkit.org>
1813
1814         CTTE: Convert Element and RenderObject iterator usage to use range-based for loops
1815         https://bugs.webkit.org/show_bug.cgi?id=125731
1816
1817         Reviewed by Andreas Kling.
1818
1819         Perform straight forward conversions. A few stragglers that do odd things remain.
1820
1821 2013-12-14  Joseph Pecoraro  <pecoraro@apple.com>
1822
1823         Small string improvements to JSInjectedScriptHost::type and other bindings
1824         https://bugs.webkit.org/show_bug.cgi?id=125722
1825
1826         Reviewed by Timothy Hatcher.
1827
1828         * bindings/js/JSInjectedScriptHostCustom.cpp:
1829         (WebCore::JSInjectedScriptHost::type):
1830         Use SmallStrings, jsNontrivialString and ASCIILiteral.
1831
1832         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1833         (WebCore::JSJavaScriptCallFrame::type):
1834         Use jsNontrivialString.
1835
1836         * bridge/c/c_instance.cpp:
1837         (JSC::Bindings::CInstance::stringValue):
1838         Use jsNontrivialString and ASCIILiteral.
1839
1840 2013-12-14  Andreas Kling  <akling@apple.com>
1841
1842         Move a couple of inlines from RenderObject to RenderElement.
1843         <https://webkit.org/b/125734>
1844
1845         Take most of the inline functions on RenderObject that call style()
1846         and move them over to RenderElement where style() is branchless.
1847
1848         Reviewed by Antti Koivisto.
1849
1850 2013-12-14  Andreas Kling  <akling@apple.com>
1851
1852         RenderElement::rendererForRootBackground() should return a reference.
1853         <https://webkit.org/b/125735>
1854
1855         This function always finds a renderer to return.
1856
1857         Reviewed by Antti Koivisto.
1858
1859 2013-12-14  Mark Rowe  <mrowe@apple.com>
1860
1861         Build fix after r160557.
1862
1863         * Configurations/WebCore.xcconfig: Find JavaScriptCore.framework below SDKROOT so that we'll pick
1864         up the built version in production builds rather than the system version.
1865
1866 2013-12-14  Brendan Long  <b.long@cablelabs.com>
1867
1868         [GStreamer] Use GMutexLocker instead of g_mutex_lock
1869         https://bugs.webkit.org/show_bug.cgi?id=125588
1870
1871         Reviewed by Philippe Normand.
1872
1873         No new tests because this is just code simplification.
1874
1875         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1876         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
1877         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
1878         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1879         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1880         (webkitVideoSinkTimeoutCallback):
1881         (webkitVideoSinkRender):
1882         (unlockBufferMutex):
1883         (webkitVideoSinkUnlockStop):
1884         (webkitVideoSinkStart):
1885
1886 2013-12-13  Andreas Kling  <akling@apple.com>
1887
1888         Move RenderObject::repaintAfterLayoutIfNeeded() to RenderElement.
1889         <https://webkit.org/b/125712>
1890
1891         This function is only ever called on RenderElements, so move it there.
1892         Removes some RenderObject::style() branchiness.
1893
1894         Reviewed by Darin Adler.
1895
1896 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
1897
1898         Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore
1899         https://bugs.webkit.org/show_bug.cgi?id=125707
1900
1901         Reviewed by Timothy Hatcher.
1902
1903           - Switch TypeBuilder::Page::SearchMatch to TypeBuilder::GenericTypes::SearchMatch
1904             which comes from InspectorJSTypeBuilders.
1905           - Remove domains that moved to JavaScriptCore.
1906
1907         No new tests, this only moves code around. There are no functional changes.
1908
1909         * CMakeLists.txt:
1910         * DerivedSources.make:
1911         * GNUmakefile.am:
1912         Add new files.
1913
1914         * inspector/ContentSearchUtils.cpp:
1915         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
1916         (WebCore::ContentSearchUtils::searchInTextByLines):
1917         * inspector/ContentSearchUtils.h:
1918         * inspector/InspectorAgent.cpp:
1919         * inspector/InspectorAgent.h:
1920         * inspector/InspectorDebuggerAgent.h:
1921         * inspector/InspectorPageAgent.cpp:
1922         (WebCore::InspectorPageAgent::searchInResource):
1923         * inspector/InspectorPageAgent.h:
1924         * inspector/protocol/Page.json:
1925         Update includes and type builder type names.
1926
1927         * inspector/InspectorDebuggerAgent.cpp:
1928         (WebCore::breakpointActionTypeForString):
1929         (WebCore::InspectorDebuggerAgent::searchInContent):
1930         * inspector/InspectorTimelineAgent.cpp:
1931         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1932         Use the new getEnum function names.
1933
1934 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
1935
1936         [Win] Remove pre-VS2013 support code.
1937         https://bugs.webkit.org/show_bug.cgi?id=125693
1938
1939         Reviewed by Darin Adler.
1940
1941         * Modules/webdatabase/DatabaseTracker.cpp:
1942         (WebCore::DatabaseTracker::setQuota): Use C99 format arguments
1943         * loader/FTPDirectoryParser.cpp:
1944         (WebCore::parseOneFTPLine): Ditto
1945         * loader/icon/IconDatabase.cpp:
1946         (WebCore::IconDatabase::pruneUnretainedIcons): Ditto 
1947         * platform/sql/SQLiteDatabase.cpp:
1948         (WebCore::SQLiteDatabase::setMaximumSize): Ditto
1949
1950 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
1951
1952         SVG bindings are improperly being generated with "fastGetAttribute"
1953         https://bugs.webkit.org/show_bug.cgi?id=125670
1954
1955         Reviewed by Darin Adler.
1956
1957         A bug was introduced in r152845 that improperly called the
1958         IsSVGAnimatedType using the $attribute hash, rather than the
1959         expected $attribute->signature->type.
1960
1961         * bindings/scripts/CodeGenerator.pm:
1962         (GetterExpression): Clean up attribute type confusion.
1963
1964 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
1965
1966         [Win] Unreviewed build fix after r160548
1967
1968         * WebCore.vcxproj/WebCore.vcxproj: Exclude MediaPlayerPrivateQuickTimeVisualContext from
1969         Windows build.
1970         * platform/graphics/MediaPlayer.cpp: Don't use QuickTime as the PlatformMediaEngine.
1971
1972 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
1973
1974         [GTK] Remove Warnings in building about duplicate INSPECTOR variables
1975         https://bugs.webkit.org/show_bug.cgi?id=125710
1976
1977         Reviewed by Tim Horton.
1978
1979         * GNUmakefile.am:
1980
1981 2013-12-13  Roger Fong  <roger_fong@apple.com>
1982
1983         [WebGL] Check for global variable precision mismatch between vertex and fragment shaders.
1984         https://bugs.webkit.org/show_bug.cgi?id=125546.
1985         <rdar://problem/15203364>
1986
1987         Reviewed by Brent Fulgham.
1988
1989         Covered Khronos conformances tests:
1990         webgl/1.0.2/glsl/misc/shader-with-global-variable-precision-mismatch.html
1991
1992         * html/canvas/WebGLRenderingContext.cpp:
1993         (WebCore::WebGLRenderingContext::linkProgram):
1994         * platform/graphics/GraphicsContext3D.h: Rename areProgramSymbolsValid since it currently only serves one purpose.
1995         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1996         (WebCore::GraphicsContext3D::precisionsMatch):
1997
1998 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
1999
2000         [Win] Unreviewed build fix after r160548
2001
2002         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Specify that we are
2003         using the vs120_xp build target for Makefile-based projects.
2004
2005 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
2006
2007         Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
2008         https://bugs.webkit.org/show_bug.cgi?id=125595
2009
2010         Reviewed by Timothy Hatcher.
2011
2012           - CodeGeneration changed to output Frontend and Backend dispatchers
2013             in namespace Inspector. So update all the agent's appropriately.
2014           - Update Derived Sources code generation to use the Scripts that had
2015             moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
2016             directly, but others have to use the Scripts exported by JSC
2017             in JavaScriptCore's PrivateHeaders.
2018           - Add ForwardingHeaders for the files generated in JavaScriptCore.
2019           - Update the names of Inspector DerivedSources files, since they
2020             were renamed to InspectorWeb*.
2021
2022         No new tests, this only moves code around. There are no functional changes.
2023
2024         * CMakeLists.txt:
2025         * DerivedSources.make:
2026         * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
2027         * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
2028         * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
2029         * GNUmakefile.am:
2030         * GNUmakefile.list.am:
2031         * WebCore.vcxproj/WebCore.vcxproj:
2032         * WebCore.vcxproj/WebCore.vcxproj.filters:
2033         * WebCore.vcxproj/build-generated-files.sh:
2034         * WebCore.xcodeproj/project.pbxproj:
2035         Remove files, rename files, update code generation.
2036
2037         * make-generated-sources.sh:
2038         Update this standalone developer script to fill in the new InspectorScripts variable.
2039
2040         * inspector/ConsoleMessage.h:
2041         * inspector/InjectedScriptHost.cpp:
2042         * inspector/InspectorAgent.cpp:
2043         * inspector/InspectorAgent.h:
2044         * inspector/InspectorApplicationCacheAgent.cpp:
2045         * inspector/InspectorApplicationCacheAgent.h:
2046         * inspector/InspectorCSSAgent.h:
2047         * inspector/InspectorCanvasAgent.cpp:
2048         * inspector/InspectorCanvasAgent.h:
2049         * inspector/InspectorConsoleAgent.cpp:
2050         * inspector/InspectorConsoleAgent.h:
2051         * inspector/InspectorController.cpp:
2052         * inspector/InspectorDOMAgent.cpp:
2053         * inspector/InspectorDOMAgent.h:
2054         * inspector/InspectorDOMDebuggerAgent.cpp:
2055         * inspector/InspectorDOMDebuggerAgent.h:
2056         * inspector/InspectorDOMStorageAgent.cpp:
2057         * inspector/InspectorDOMStorageAgent.h:
2058         * inspector/InspectorDatabaseAgent.cpp:
2059         * inspector/InspectorDatabaseAgent.h:
2060         * inspector/InspectorDatabaseResource.cpp:
2061         * inspector/InspectorDatabaseResource.h:
2062         * inspector/InspectorDebuggerAgent.cpp:
2063         * inspector/InspectorDebuggerAgent.h:
2064         * inspector/InspectorFrontendClientLocal.cpp:
2065         * inspector/InspectorHeapProfilerAgent.h:
2066         * inspector/InspectorIndexedDBAgent.cpp:
2067         * inspector/InspectorIndexedDBAgent.h:
2068         * inspector/InspectorInputAgent.h:
2069         * inspector/InspectorLayerTreeAgent.cpp:
2070         * inspector/InspectorLayerTreeAgent.h:
2071         * inspector/InspectorMemoryAgent.cpp:
2072         * inspector/InspectorMemoryAgent.h:
2073         * inspector/InspectorPageAgent.cpp:
2074         * inspector/InspectorPageAgent.h:
2075         * inspector/InspectorProfilerAgent.cpp:
2076         * inspector/InspectorProfilerAgent.h:
2077         * inspector/InspectorResourceAgent.cpp:
2078         * inspector/InspectorResourceAgent.h:
2079         * inspector/InspectorRuntimeAgent.h:
2080         * inspector/InspectorTimelineAgent.cpp:
2081         * inspector/InspectorTimelineAgent.h:
2082         * inspector/InspectorWorkerAgent.cpp:
2083         * inspector/InspectorWorkerAgent.h:
2084         * inspector/PageRuntimeAgent.h:
2085         * inspector/ScriptCallFrame.cpp:
2086         * inspector/WorkerInspectorController.cpp:
2087         * inspector/WorkerRuntimeAgent.h:
2088         Updates header names and class namespace changes.
2089
2090 2013-12-13  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2091
2092         Adding RTCPeerConnectionErrorCallback
2093         https://bugs.webkit.org/show_bug.cgi?id=125574
2094
2095         Reviewed by Eric Carlson.
2096
2097         According to the spec there should be a RTCPeerConnectionErrorCallback function type for createOffer/Answer,
2098         setLocal/RemoteDescription and updateIce function calls. This callback must handle a DOMError object.
2099
2100         Existing tests were updated.
2101
2102         * CMakeLists.txt:
2103         * GNUmakefile.list.am:
2104         * Modules/mediastream/RTCPeerConnection.cpp:
2105         (WebCore::RTCPeerConnection::createOffer):
2106         (WebCore::RTCPeerConnection::createAnswer):
2107         (WebCore::RTCPeerConnection::setLocalDescription):
2108         (WebCore::RTCPeerConnection::setRemoteDescription):
2109         (WebCore::RTCPeerConnection::addIceCandidate):
2110         * Modules/mediastream/RTCErrorCallback.h: Removed.
2111         * Modules/mediastream/RTCErrorCallback.idl: Removed.
2112         * Modules/mediastream/RTCPeerConnection.h:
2113         * Modules/mediastream/RTCPeerConnection.idl:
2114         * Modules/mediastream/RTCPeerConnectionErrorCallback.h: Added.
2115         * Modules/mediastream/RTCPeerConnectionErrorCallback.idl: Added.
2116         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
2117         (WebCore::RTCSessionDescriptionRequestImpl::create):
2118         (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
2119         (WebCore::RTCSessionDescriptionRequestImpl::requestFailed):
2120         * Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
2121         * Modules/mediastream/RTCVoidRequestImpl.cpp:
2122         (WebCore::RTCVoidRequestImpl::create):
2123         (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
2124         (WebCore::RTCVoidRequestImpl::requestFailed):
2125         * Modules/mediastream/RTCVoidRequestImpl.h:
2126         * WebCore.xcodeproj/project.pbxproj:
2127         * platform/mediastream/RTCPeerConnectionHandler.cpp:
2128         (WebCore::RTCPeerConnectionHandler::incompatibleConstraintsErrorName):
2129         (WebCore::RTCPeerConnectionHandler::invalidSessionDescriptionErrorName):
2130         (WebCore::RTCPeerConnectionHandler::incompatibleSessionDescriptionErrorName):
2131         (WebCore::RTCPeerConnectionHandler::internalErrorName):
2132         * platform/mediastream/RTCPeerConnectionHandler.h:
2133         * platform/mock/RTCNotifiersMock.cpp:
2134         (WebCore::SessionRequestNotifier::SessionRequestNotifier):
2135         (WebCore::SessionRequestNotifier::fire):
2136         (WebCore::VoidRequestNotifier::VoidRequestNotifier):
2137         (WebCore::VoidRequestNotifier::fire):
2138         * platform/mock/RTCNotifiersMock.h:
2139         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2140         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
2141         (WebCore::RTCPeerConnectionHandlerMock::createAnswer):
2142
2143 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
2144
2145         [Win] Switch WebKit solution to Visual Studio 2013
2146         https://bugs.webkit.org/show_bug.cgi?id=125192
2147
2148         Reviewed by Anders Carlsson.
2149
2150         * WebCore.vcxproj/WebCore.vcxproj: Update for VS2013
2151         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
2152         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto
2153
2154 2013-12-13  Alexey Proskuryakov  <ap@apple.com>
2155
2156         WebCrypto Key.usages should be ordered alphabetically
2157         https://bugs.webkit.org/show_bug.cgi?id=125696
2158
2159         Reviewed by Darin Adler.
2160
2161         * crypto/CryptoKey.cpp: (WebCore::CryptoKey::usages): Do it.
2162
2163 2013-12-13  Darin Adler  <darin@apple.com>
2164
2165         Make some optimizations for DOM bindings involving vectors
2166         https://bugs.webkit.org/show_bug.cgi?id=125680
2167
2168         Reviewed by Andreas Kling.
2169
2170         * bindings/js/JSDOMBinding.h:
2171         (WebCore::toJS): Removed unnecessary copying of vectors when converting them
2172         to JavaScript values.
2173         (WebCore::toRefPtrNativeArray): Use reserveInitialCapacity and uncheckedAppend.
2174         (WebCore::toNativeArray): Ditto.
2175         (WebCore::toNativeArguments): Ditto.
2176
2177 2013-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2178
2179         REGRESSION(r155784): [GTK] Some methods incorrectly removed in r155784 and deprecated in r158662
2180         https://bugs.webkit.org/show_bug.cgi?id=125692
2181
2182         Reviewed by Martin Robinson.
2183
2184         In r155784 the build was fixed by skipping Console::profile() and
2185         Console::profileEnd(), but the patch also skipped other methods
2186         containing the profile method name. Those were incorrectly
2187         deprecated in r158662 thinking that the property had been removed
2188         in the idl.
2189
2190         * bindings/gobject/WebKitDOMDeprecated.cpp: Undeprecate
2191         webkit_dom_html_head_element_get_profile and
2192         webkit_dom_html_head_element_set_profile.
2193         * bindings/gobject/WebKitDOMDeprecated.h: Ditto.
2194         * bindings/gobject/WebKitDOMDeprecated.symbols: Ditto.
2195         * bindings/scripts/CodeGeneratorGObject.pm:
2196         (SkipFunction): Skip webkit_dom_console_profile and
2197         webkit_dom_console_profile_end.
2198
2199 2013-12-13  Rob Buis  <rob.buis@samsung.com>
2200
2201         Clean up SVGScriptElement
2202         https://bugs.webkit.org/show_bug.cgi?id=125527
2203
2204         Reviewed by Darin Adler.
2205
2206         From the Blink port of this bug it becomes clear that svg/dom/SVGScriptElement/script-set-href.svg and
2207         svg/dom/svg-element-attribute-js-null.xhtml still hit an assert in Debug because SVGNames::typeAttr can't
2208         be used with fastGetAttribute in all cases, because it can be animatable. However for SVGScriptElement
2209         it is not animatable, so make isAnimatableAttribute virtual (note Debug only method) and allow typeAttr
2210         in the SVGScriptElement case to be useable for fastGetAttribute.
2211
2212         Test: svg/dom/SVGScriptElement/script-type-attribute.svg
2213
2214         * svg/SVGElement.h:
2215         * svg/SVGScriptElement.cpp:
2216         (WebCore::SVGScriptElement::isAnimatableAttribute):
2217         * svg/SVGScriptElement.h:
2218
2219 2013-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2220
2221         [GTK] Expose also webkit_dom_document_get_url
2222         https://bugs.webkit.org/show_bug.cgi?id=125691
2223
2224         Reviewed by Martin Robinson.
2225
2226         For some reason we expose the URL property, so it can be accessed
2227         with g_object_get(), but we have a special case to not provide a
2228         public getter.
2229
2230         * bindings/gobject/webkitdom.symbols: Add new symbol.
2231         * bindings/scripts/CodeGeneratorGObject.pm:
2232         (GenerateFunctions): Remove the special case of URL property.
2233
2234 2013-12-13  Andreas Kling  <akling@apple.com>
2235
2236         CSSFilterImageValue constructor should require both image and filter.
2237         <https://webkit.org/b/125056>
2238
2239         Make the CSSFilterImageValue::create() helper take both the image and
2240         filter CSSValues by PassRef since they should never be null.
2241
2242         Tweaked ComputedStyleExtractor::valueForFilter() to return a PassRef
2243         for this to work.
2244
2245         Reviewed by Anders Carlsson.
2246
2247 2013-12-12  Andreas Kling  <akling@apple.com>
2248
2249         StyleResolver::adjustRenderStyle() should take RenderStyle references.
2250         <https://webkit.org/b/125623>
2251
2252         This function doesn't handle null styles being passed, so prevent
2253         it at compile time.
2254
2255         Reviewed by Anders Carlsson.
2256
2257 2013-12-13  Darin Adler  <darin@apple.com>
2258
2259         Eliminate awkward virtualComputedStyle construction
2260         https://bugs.webkit.org/show_bug.cgi?id=125681
2261
2262         Reviewed by Andreas Kling.
2263
2264         * dom/Element.cpp:
2265         (WebCore::Element::computedStyle): Tweak coding style a bit.
2266
2267         * dom/Element.h: Marked computedStyle virtual and got rid of virtualComputedStyle.
2268         This fixes a bug that we would not call SVGElement::computedStyle if we called
2269         it through an Element pointer or reference. Not sure how to get test coverage for this.
2270
2271         * dom/Node.cpp:
2272         (WebCore::Node::computedStyle): Use a loop instead of recursive virtual calls.
2273
2274         * dom/Node.h: Made computedStyle virtual and got rid of virtualComputedStyle.
2275
2276         * svg/SVGElement.cpp:
2277         (WebCore::SVGElement::computedStyle): Tweak coding style a bit.
2278
2279         * svg/SVGElement.h: Made computedStyle virtual (and FINAL) and got rid fo
2280         virtualComputedStyle.
2281
2282 2013-12-13  Darin Adler  <darin@apple.com>
2283
2284         Fix a couple stray uses of RefPtr that should release
2285         https://bugs.webkit.org/show_bug.cgi?id=125679
2286
2287         Reviewed by Andreas Kling.
2288
2289         * css/CSSParser.cpp:
2290         (WebCore::CSSParser::parseFilter): Add calls to release, in
2291         one case rearranging the order of operations slightly so we
2292         don't release the pointer before using it.
2293
2294 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
2295
2296         WebCrypto wrapKey operation doesn't check key usage
2297         https://bugs.webkit.org/show_bug.cgi?id=125675
2298
2299         Reviewed by Darin Adler.
2300
2301         Tests: crypto/subtle/unwrapKey-check-usage.html
2302                crypto/subtle/wrapKey-check-usage.html
2303
2304         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::wrapKey):
2305         Added accidentally omitted code. Other operations are fine.
2306
2307 2013-12-12  Darin Adler  <darin@apple.com>
2308
2309         Make some improvements in CSSImageGeneratorValue code
2310         https://bugs.webkit.org/show_bug.cgi?id=125676
2311
2312         Reviewed by Simon Fraser.
2313
2314         * css/CSSCrossfadeValue.cpp:
2315         (WebCore::subimageKnownToBeOpaque): Take a reference to the CSSValue, since
2316         it's known not to be null. Used checked cast.
2317         (WebCore::CSSCrossfadeValue::knownToBeOpaque): Updated to pass a reference.
2318
2319         * css/CSSImageGeneratorValue.cpp:
2320         (WebCore::CSSImageGeneratorValue::saveCachedImageForSize): Use
2321         make_unique instead of adoptPtr.
2322         (WebCore::CSSImageGeneratorValue::subimageIsPending): Use checked cast.
2323         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto, also
2324         use nullptr.
2325
2326         * css/CSSImageGeneratorValue.h: Removed unneeded includes, added some forward
2327         declarations, used unique_ptr instead of OwnPtr, and used CSS_VALUE_TYPE_CASTS
2328         macro to create cast functions.
2329
2330         * css/CSSValue.cpp: Removed unneeded include of CSSImageGeneratorValue.h.
2331
2332         * css/StyleResolver.cpp:
2333         (WebCore::StyleResolver::State::clear): Use nullptr instead of 0.
2334         (WebCore::StyleResolver::applyProperty): Use checked cast and pass references
2335         instead of pointers to StyleGeneratedImage::create.
2336         (WebCore::StyleResolver::styleImage): Use checked cast and pass references
2337         instead of pointers to generatedOrPendingFromValue.
2338         (WebCore::StyleResolver::generatedOrPendingFromValue): Take the value as a
2339         reference instead of a pointer.
2340         (WebCore::StyleResolver::loadPendingImage): Pass a refernece instead of a
2341         pointer to StyleGeneratedImage::create.
2342         (WebCore::StyleResolver::loadPendingImages): Use auto for iteration instead of
2343         a lot type name.
2344
2345         * css/StyleResolver.h: Changed generatedOrPendingFromValue to take the value
2346         as a reference instead of a pointer.
2347
2348         * page/animation/CSSPropertyAnimation.cpp:
2349         (WebCore::blendFilter): Pass a reference insted of a pointer to
2350         StyleGeneratedImage::create.
2351         (WebCore::crossfadeBlend): Ditto.
2352         (WebCore::blendFunc): Ditto. Also use references for local variables.
2353
2354         * rendering/style/StyleGeneratedImage.cpp:
2355         (WebCore::StyleGeneratedImage::StyleGeneratedImage): Use PassRef instead of
2356         PassRefPtr for the argument type.
2357         (WebCore::StyleGeneratedImage::cssValue): Updated since m_imageGeneratorValue
2358         is now a Ref instead of a RefPtr. Sadly this requires a const_cast that we can
2359         come back and get rid of later.
2360         (WebCore::StyleGeneratedImage::imageSize): Ditto.
2361         (WebCore::StyleGeneratedImage::image): Ditto.
2362
2363         * rendering/style/StyleGeneratedImage.h: Changed create function and constructor
2364         to take a PassRef. Made imageValue non-const since it returns a non-const value,
2365         to be consistent with "conceptual const". Changed m_imageGeneratorValue to be a
2366         Ref instead of a RefPtr.
2367
2368         * rendering/style/StyleImage.h: Made WrappedImagePtr be const void*, since it's
2369         a pointer used only for equality checks. Not a great idiom, but fine to use a
2370         const pointer instead of non-const, and avoids the const_cast we'd otherwise
2371         need in StyleGeneratedImage::data.
2372
2373 2013-12-12  KyungTae Kim  <ktf.kim@samsung.com>
2374
2375         Improve the find word boundary performance
2376         https://bugs.webkit.org/show_bug.cgi?id=125619
2377
2378         In endWordBoundary case, the textBreakPrevious call in findWordBoundary is unnecessary.
2379         So use separate function for endWordBoundary can improve the performance.
2380
2381         Reviewed by Darin Adler.
2382
2383         No tests because no operation changes.
2384
2385         * editing/VisibleUnits.cpp: Use findEndWordBoundary in endWordBoundary
2386         (WebCore::endWordBoundary):
2387         * platform/text/TextBoundaries.cpp: Add findEndWordBoundary function
2388         (WebCore::findEndWordBoundary):
2389         * platform/text/TextBoundaries.h:
2390         * platform/text/mac/TextBoundaries.mm: Add findEndWordBoundary function
2391         (WebCore::findEndWordBoundary):
2392
2393 2013-12-12  Benjamin Poulain  <bpoulain@apple.com>
2394
2395         Fix a silly mistake of r160467
2396         https://bugs.webkit.org/show_bug.cgi?id=125657
2397
2398         Reviewed by Alexey Proskuryakov.
2399
2400         Fix a typo. The validity check was missing the logical not.
2401
2402         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
2403         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
2404         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
2405         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
2406         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
2407         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
2408         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
2409         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
2410         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
2411         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
2412         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
2413         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
2414
2415 2013-12-12  Tim Horton  <timothy_horton@apple.com>
2416
2417         [wk2] Handle pinch-to-zoom gesture
2418         https://bugs.webkit.org/show_bug.cgi?id=125604
2419
2420         Reviewed by Simon Fraser.
2421
2422         * WebCore.exp.in:
2423         Export some TransformationMatrix functions.
2424
2425         * WebCore.xcodeproj/project.pbxproj:
2426         Make some headers private so that RenderLayerCompositor/Backing can be used from WebKit2.
2427
2428         * rendering/RenderLayerCompositor.h:
2429         (WebCore::RenderLayerCompositor::layerForContentShadow):
2430         Add a getter for the content shadow layer.
2431
2432 2013-12-12  Brady Eidson  <beidson@apple.com>
2433
2434         DatabaseProcess IndexedDB: Establish a metadata backing store on disk
2435         https://bugs.webkit.org/show_bug.cgi?id=125258
2436
2437         Reviewed by Alexey Proskuryakov, Anders Carlsson, and Tim Horton.
2438
2439         Teach CrossThreadCopier how to handle IDBDatabaseMetadata.
2440
2441         * CMakeLists.txt:
2442         * GNUmakefile.list.am:
2443         * WebCore.exp.in:
2444         * WebCore.xcodeproj/project.pbxproj:
2445
2446         * Modules/indexeddb/IDBDatabaseMetadata.cpp: Added.
2447         (WebCore::IDBDatabaseMetadata::isolatedCopy):
2448         (WebCore::IDBObjectStoreMetadata::isolatedCopy):
2449         (WebCore::IDBIndexMetadata::isolatedCopy):
2450         * Modules/indexeddb/IDBDatabaseMetadata.h:
2451
2452         * Modules/indexeddb/IDBKeyPath.cpp:
2453         (WebCore::IDBKeyPath::isolatedCopy):
2454         * Modules/indexeddb/IDBKeyPath.h:
2455
2456         * platform/CrossThreadCopier.cpp:
2457         (WebCore::::copy): Add an IDBDatabaseMetadata specialization.
2458         * platform/CrossThreadCopier.h:
2459
2460 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
2461
2462         Add support for RSAES-PKCS1-v1_5
2463         https://bugs.webkit.org/show_bug.cgi?id=125647
2464
2465         Build fix.
2466
2467         * crypto/CommonCryptoUtilities.h: Declare a newly used private constant.
2468
2469 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
2470
2471         Add support for RSAES-PKCS1-v1_5
2472         https://bugs.webkit.org/show_bug.cgi?id=125647
2473
2474         Reviewed by Anders Carlsson.
2475
2476         Tests: crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html
2477                crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html
2478
2479         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
2480         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
2481         Removed meaningless parameters arguments from private functions. The base arguments
2482         class is always empty.
2483
2484         * WebCore.xcodeproj/project.pbxproj:
2485         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2486         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
2487         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
2488         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2489         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
2490         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid):
2491         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
2492         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: Added.
2493         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::CryptoAlgorithmRSAES_PKCS1_v1_5):
2494         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::~CryptoAlgorithmRSAES_PKCS1_v1_5):
2495         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::create):
2496         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::identifier):
2497         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches):
2498         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
2499         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
2500         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
2501         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
2502         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h: Added.
2503         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp: Added.
2504         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
2505         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
2506         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
2507         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
2508         Added support for this algorithm.
2509
2510 2013-12-12  Andreas Kling  <akling@apple.com>
2511
2512         [Mac] Stop not caching HTTP resources with "Vary" header in response.
2513         <https://webkit.org/b/125483>
2514         <rdar://problem/11781097>
2515
2516         Remove the workaround preventing resources with the "Vary" header
2517         from going into cache, as the CFNetwork cache has supported this
2518         for quite a while now.
2519
2520         31.5 MB progression on Membuster3, because we can now mmap those
2521         resources from disk once they are in the cache.
2522
2523         We keep the workaround on PLATFORM(WIN) for now.
2524
2525         Reviewed by Antti Koivisto.
2526
2527 2013-12-12  Sam Weinig  <sam@webkit.org>
2528
2529         Replace uses of WTF::BitArray with std::bitset
2530         https://bugs.webkit.org/show_bug.cgi?id=125642
2531
2532         Reviewed by Anders Carlsson.
2533
2534         * css/CSSParser.cpp:
2535         (WebCore::filterProperties):
2536         (WebCore::CSSParser::createStyleProperties):
2537         * css/StyleProperties.cpp:
2538         (WebCore::StyleProperties::asText):
2539
2540 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
2541
2542         Public key in a generated KeyPair should always be extractable
2543         https://bugs.webkit.org/show_bug.cgi?id=125643
2544
2545         Reviewed by Sam Weinig.
2546
2547         The spec doesn't explain how generateKey works with key pairs (there are open bugs
2548         about that). Making public keys non-extractable makes no sense one way or another.
2549
2550         Test: crypto/subtle/rsa-oaep-generate-non-extractable-key.html
2551
2552         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair):
2553
2554 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
2555
2556         Make algorithm.name return registered name, not normalized one
2557         https://bugs.webkit.org/show_bug.cgi?id=125641
2558
2559         Reviewed by Anders Carlsson.
2560
2561         Currently, WebCrypto editor's draft stipulates that algorithm name is lowercased
2562         as part of normalization.
2563
2564         But it makes little sense to register algorithms as mixed (mostly upper) case, yet
2565         return the name lowercased. Other implementations don't bother respecting this,
2566         and signs are that the spec will change.
2567
2568         I'd like to match other implementations here, because sticking to the spec only
2569         makes us fail 3rd party test suites for no good reason.
2570
2571         Updated many existing tests.
2572
2573         * crypto/CryptoAlgorithmRegistry.cpp:
2574         (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
2575         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
2576         * crypto/CryptoAlgorithmRegistry.h:
2577         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2578         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
2579         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2580         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
2581         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
2582         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
2583         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
2584         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
2585         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
2586         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
2587
2588 2013-12-12  Csaba Osztrogonác  <ossy@webkit.org>
2589
2590         Move CertificateInfo to WebCore
2591         https://bugs.webkit.org/show_bug.cgi?id=124720
2592
2593         Reviewed by Darin Adler.
2594
2595         Based on the patch by Kwang Yul Seo <skyul@company100.net>
2596
2597         * GNUmakefile.list.am:
2598         * PlatformEfl.cmake:
2599         * PlatformGTK.cmake:
2600         * WebCore.exp.in:
2601         * WebCore.xcodeproj/project.pbxproj:
2602         * platform/network/mac/CertificateInfo.h: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.h.
2603         (WebCore::CertificateInfo::setCertificateChain): Added, because WebCoreArgumentCoders needs it.
2604         * platform/network/mac/CertificateInfoMac.mm: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.mm.
2605         (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersMac.mm.
2606         * platform/network/soup/CertificateInfo.cpp: Copied from Source/WebKit2/Shared/WebCertificateInfo.h.
2607         (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersSoup.cpp.
2608         * platform/network/soup/CertificateInfo.h: Renamed from Source/WebKit2/Shared/soup/CertificateInfo.h.
2609         (WebCore::CertificateInfo::setCertificate): Added, because WebCoreArgumentCoders needs it.
2610         (WebCore::CertificateInfo::setTLSErrors): Added, because WebCoreArgumentCoders needs it.
2611
2612 2013-12-12  Commit Queue  <commit-queue@webkit.org>
2613
2614         Unreviewed, rolling out r160417.
2615         http://trac.webkit.org/changeset/160417
2616         https://bugs.webkit.org/show_bug.cgi?id=125629
2617
2618         The patch is causing crashes (Requested by zdobersek1 on
2619         #webkit).
2620
2621         * accessibility/AXObjectCache.cpp:
2622         (WebCore::AXObjectCache::~AXObjectCache):
2623         (WebCore::AXObjectCache::remove):
2624         * accessibility/AXObjectCache.h:
2625         (WebCore::AXObjectCache::detachWrapper):
2626         * accessibility/atk/AXObjectCacheAtk.cpp:
2627         (WebCore::AXObjectCache::detachWrapper):
2628         (WebCore::AXObjectCache::attachWrapper):
2629         (WebCore::AXObjectCache::postPlatformNotification):
2630         * accessibility/ios/AXObjectCacheIOS.mm:
2631         (WebCore::AXObjectCache::detachWrapper):
2632         * accessibility/mac/AXObjectCacheMac.mm:
2633         (WebCore::AXObjectCache::detachWrapper):
2634         * accessibility/win/AXObjectCacheWin.cpp:
2635         (WebCore::AXObjectCache::detachWrapper):
2636
2637 2013-12-12  Martin Robinson  <mrobinson@igalia.com>
2638
2639         Remove a few more guards mistakenly added in r160367
2640
2641         Reviewed by Carlos Garcia Campos
2642
2643         r160367 was too liberal in hiding APIs from the GObject DOM bindings.
2644         We should expose the BatteryManager and the text and audio tracks.
2645
2646         * Modules/battery/BatteryManager.idl:
2647         * html/HTMLMediaElement.idl:
2648
2649 2013-12-11  Darin Adler  <darin@apple.com>
2650
2651         StylePendingImage needs to correctly manage the CSSValue pointer lifetime
2652         https://bugs.webkit.org/show_bug.cgi?id=125468
2653
2654         Reviewed by Andreas Kling.
2655
2656         Test: fast/css/pending-image-crash.xhtml
2657
2658         Disconnect the reference counted StylePendingImage from the CSSValue that owns
2659         it when it's not needed any more, otherwise we could end up using a pointer
2660         that might no longer be valid.
2661
2662         * css/CSSCursorImageValue.cpp:
2663         (WebCore::CSSCursorImageValue::detachPendingImage): Added. Calls detachFromCSSValue
2664         on the current image if it is a StylePendingImage.
2665         (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Call detachPendingImage.
2666         (WebCore::CSSCursorImageValue::cachedImage): Call detachPendingImage before changing
2667         m_image to a new value.
2668         (WebCore::CSSCursorImageValue::clearCachedImage): Ditto.
2669         * css/CSSCursorImageValue.h: Added detachPendingImage.
2670
2671         * css/CSSImageSetValue.cpp:
2672         (WebCore::CSSImageSetValue::detachPendingImage): Added. Calls detachFromCSSValue
2673         on the current image set if it is a StylePendingImage.
2674         (WebCore::CSSImageSetValue::~CSSImageSetValue): Call detachPendingImage.
2675         (WebCore::CSSImageSetValue::cachedImageSet): Call detachPendingImage before changing
2676         m_imageSet to a new value.
2677         * css/CSSImageSetValue.h: Added detachPendingImage.
2678
2679         * css/CSSImageValue.cpp:
2680         (WebCore::CSSImageValue::detachPendingImage): Added. Calls detachFromCSSValue on the
2681         current image if it is a StylePendingImage.
2682         (WebCore::CSSImageValue::~CSSImageValue): Call detachPendingImage.
2683         (WebCore::CSSImageValue::cachedImage): Call detachPendingImage before changing m_image
2684         to a new value.
2685         * css/CSSImageValue.h: Added detachPendingImage.
2686
2687         * rendering/style/StylePendingImage.h:
2688         (WebCore::StylePendingImage::cssImageValue): Added a null check.
2689         (WebCore::StylePendingImage::cssImageGeneratorValue): Added a null check.
2690         (WebCore::StylePendingImage::cssCursorImageValue): Added a null check.
2691         (WebCore::StylePendingImage::cssImageSetValue): Added a null check.
2692         (WebCore::StylePendingImage::detachFromCSSValue): Added. Sets m_value to null since
2693         the style is no longer using this StylePendingImage.
2694         (WebCore::StylePendingImage::data): Changed to use the "this" pointer since all we
2695         need is some arbitrary pointer uniquely identifying the image. Before loading the image,
2696         we have no suitable weak identifier, so it suffices to use the unique pointer to each
2697         StylePendingImage object. This function is used only in a limited way; it would be nice
2698         to find a way to make the code less strange long term.
2699
2700 2013-12-11  Darin Adler  <darin@apple.com>
2701
2702         Remove some unneeded code noticed while looking at StylePendingImage
2703         https://bugs.webkit.org/show_bug.cgi?id=125618
2704
2705         Reviewed by Andreas Kling.
2706
2707         * css/StyleResolver.cpp:
2708         (WebCore::StyleResolver::loadPendingImage): Removed redundant function calls.
2709
2710         * rendering/RenderImageResource.cpp: Removed unneeded nullImage and
2711         usesImageContainerSize member functions.
2712         (WebCore::RenderImageResource::image): Use Image::nullImage directly instead of
2713         through RenderImageResourceImage::nullImage.
2714
2715         * rendering/RenderImageResource.h: Removed unneeded usesImageContainerSize
2716         and nullImage functions. Also removed unneeded includes.
2717
2718         * rendering/RenderImageResourceStyleImage.h: Removed unneeded
2719         usesImageContainerSize override. Nobody was calling it.
2720
2721 2013-12-11  Benjamin Poulain  <bpoulain@apple.com>
2722
2723         Add the CFNetwork implementation of the asynchronous ResourceHandle
2724         https://bugs.webkit.org/show_bug.cgi?id=124440
2725
2726         Reviewed by Alexey Proskuryakov.
2727
2728         Add a second subclass of ResourceHandleCFURLConnectionDelegate: ResourceHandleCFURLConnectionDelegateWithOperationQueue.
2729         The difference is those objects handle the network callback on a different queue.
2730
2731         Some common code has been refactored in ResourceHandleCFURLConnectionDelegate to reduce duplicated code.
2732
2733         The initialization of the request and connection is moved to the subclass to clean up initialization.
2734
2735         * WebCore.xcodeproj/project.pbxproj:
2736         * platform/network/ResourceHandle.h:
2737         * platform/network/ResourceHandleClient.cpp:
2738         (WebCore::ResourceHandleClient::willCacheResponseAsync):
2739         * platform/network/ResourceHandleClient.h:
2740         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: Added.
2741         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::ResourceHandleCFURLConnectionDelegateWithOperationQueue):
2742         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::~ResourceHandleCFURLConnectionDelegateWithOperationQueue):
2743         (WebCore::connectionWasCancelled):
2744         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
2745         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupConnectionScheduling):
2746         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
2747         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
2748         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
2749         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
2750         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
2751         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
2752         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
2753         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
2754         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
2755         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
2756         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
2757         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillSendRequest):
2758         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse):
2759         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueShouldUseCredentialStorage):
2760         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillCacheResponse):
2761         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueCanAuthenticateAgainstProtectionSpace):
2762         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h: Copied from Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h.
2763         * platform/network/cf/ResourceHandleCFNet.cpp:
2764         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2765         (WebCore::ResourceHandle::createCFURLConnection):
2766         (WebCore::ResourceHandle::start):
2767         (WebCore::ResourceHandle::shouldUseCredentialStorage):
2768         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
2769         (WebCore::ResourceHandle::continueWillSendRequest):
2770         (WebCore::ResourceHandle::continueDidReceiveResponse):
2771         (WebCore::ResourceHandle::continueShouldUseCredentialStorage):
2772         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
2773         (WebCore::ResourceHandle::continueWillCacheResponse):
2774         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
2775         (WebCore::ResourceHandleCFURLConnectionDelegate::releaseHandle):
2776         (WebCore::ResourceHandleCFURLConnectionDelegate::synthesizeRedirectResponseIfNecessary):
2777         (WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):
2778         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
2779         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
2780         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
2781         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
2782         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
2783         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillSendRequest):
2784         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueDidReceiveResponse):
2785         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueShouldUseCredentialStorage):
2786         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillCacheResponse):
2787         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueCanAuthenticateAgainstProtectionSpace):
2788         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
2789
2790 2013-12-11  David Kilzer  <ddkilzer@apple.com>
2791
2792         Define m_hasBadParent in InlineBox if defined(ADDRESS_SANITIZER)
2793         <http://webkit.org/b/125329>
2794
2795         Reviewed by Darin Adler.
2796
2797         No tests since this is a build fix for:
2798
2799             $ ./Tools/Scripts/build-webkit --release OTHER_CFLAGS="$inherited -DADDRESS_SANITIZER=1"
2800
2801         * rendering/InlineBox.cpp:
2802         * rendering/InlineBox.h:
2803         - Replace ASSERT_DISABLED use with
2804           ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for m_hasBadParent.
2805
2806         * rendering/InlineFlowBox.cpp:
2807         (WebCore::InlineFlowBox::~InlineFlowBox):
2808         - Use !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED instead of
2809           #ifndef NDEBUG since this calls setHasBadParent().
2810         (WebCore::InlineFlowBox::checkConsistency):
2811         - Move ASSERT(!m_hasBadChildList) outside of
2812           #if CHECK_CONSISTENCY and change to
2813           ASSERT_WITH_SECURITY_IMPLICATION(!m_hasBadChildList).
2814
2815         * rendering/InlineFlowBox.h:
2816         (WebCore::InlineFlowBox::InlineFlowBox):
2817         (WebCore::InlineFlowBox::setHasBadChildList):
2818         - Change #ifndef NDEBUG to
2819           #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for code using
2820           m_hasBadChildList.
2821
2822 2013-12-11  Ralph Thomas  <ralpht@gmail.com>
2823
2824         [WebGL] Fix build on GL ES 2.0 targets after r160119
2825         https://bugs.webkit.org/show_bug.cgi?id=125541
2826
2827         Reviewed by Brent Fulgham.
2828
2829         GL ES 2.0 doesn't define GL_HALF_FLOAT_ARB, so pass through HALF_FLOAT_OES (which is defined for GL ES 2.0).
2830         This change also reverts r160324 which incorrectly defined GL_HALF_FLOAT_ARB for the Windows ANGLE target.
2831
2832         No new tests, no change in functionality.
2833
2834         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2835         (WebCore::GraphicsContext3D::texSubImage2D):
2836
2837 2013-12-11  Joseph Pecoraro  <pecoraro@apple.com>
2838
2839         Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore
2840         https://bugs.webkit.org/show_bug.cgi?id=125324
2841
2842         Reviewed by Timothy Hatcher.
2843
2844         Part 1: Push down core inspector classes.
2845
2846           - Move InspectAgentBase, InspectorAgentRegistry, InspectorBackendDispatcher, InspectorValues
2847             down to JavaScriptCore and into the Inspector namespace.
2848           - Add forwarding headers for JavaScriptCore/inspector files.
2849           - Use the Inspector namespace where appropriate.
2850           - Rename InspectorBaseAgent to InspectorAgentBase for clarity.
2851
2852         Part 2: Push Script wrapper classes down into JavaScriptCore/bindings.
2853
2854           - Move ScriptObject and ScriptValue into JavaScriptCore but namespace Deprecated
2855           - Add forwarding headers
2856           - Use Deprecated::ScriptObject and Deprecated::ScriptValue everywhere.
2857
2858         Part 3: Push Down ScriptFunctionCall
2859
2860           - Move ScriptFunctionCall to JavaScriptCore/bindings into namespace Deprecated.
2861           - Give constructor a function to all for a different JSC::call, because
2862             WebCore ScriptFunctionCall's use JSMainThreadExecState when isMainThread.
2863           - Prefer Deprecated::ScriptFunctionCall everywhere it is used in WebCore.
2864
2865         Part 4: Extract InspectorTypeBuilder helper functions
2866
2867           - There is a chunk of InspectorTypeBuilder that never changes. Extract it into
2868             its own file, InspectorTypeBuilder.h in JSC/inspector, Inspector namespace.
2869           - This moves TypeBuilder from namespace WebCore to namespace Inspector
2870           - Rename the WebCore generated InspectorTypeBuilder to InspectorWebTypeBuilders,
2871             eventually the CodeGenerator script will do this for more then TypeBuilders
2872             and there will be "JS" TypeBuilders and "Web" TypeBuilders files.
2873
2874         No new tests. No change in functionality, just moving things around.
2875
2876         * CMakeLists.txt:
2877         * ForwardingHeaders/bindings/ScriptFunctionCall.h: Added.
2878         * ForwardingHeaders/bindings/ScriptObject.h: Added.
2879         * ForwardingHeaders/bindings/ScriptValue.h: Added.
2880         * ForwardingHeaders/inspector/InspectorAgentBase.h: Added.
2881         * ForwardingHeaders/inspector/InspectorAgentRegistry.h: Added.
2882         * ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Added.
2883         * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Added.
2884         * ForwardingHeaders/inspector/InspectorValues.h: Added.
2885         * GNUmakefile.am:
2886         * GNUmakefile.list.am:
2887         * Modules/indexeddb/IDBAny.cpp:
2888         (WebCore::IDBAny::scriptValue):
2889         (WebCore::IDBAny::IDBAny):
2890         * Modules/indexeddb/IDBAny.h:
2891         * Modules/indexeddb/IDBCursor.cpp:
2892         (WebCore::IDBCursor::key):
2893         (WebCore::IDBCursor::primaryKey):
2894         (WebCore::IDBCursor::value):
2895         (WebCore::IDBCursor::update):
2896         (WebCore::IDBCursor::continueFunction):
2897         (WebCore::IDBCursor::setValueReady):
2898         * Modules/indexeddb/IDBCursor.h:
2899         * Modules/indexeddb/IDBFactory.cpp:
2900         (WebCore::IDBFactory::cmp):
2901         * Modules/indexeddb/IDBFactory.h:
2902         * Modules/indexeddb/IDBIndex.cpp:
2903         (WebCore::IDBIndex::openCursor):
2904         (WebCore::IDBIndex::count):
2905         (WebCore::IDBIndex::openKeyCursor):
2906         (WebCore::IDBIndex::get):
2907         (WebCore::IDBIndex::getKey):
2908         * Modules/indexeddb/IDBIndex.h:
2909         (WebCore::IDBIndex::openCursor):
2910         (WebCore::IDBIndex::openKeyCursor):
2911         * Modules/indexeddb/IDBKeyRange.cpp:
2912         (WebCore::IDBKeyRange::lowerValue):
2913         (WebCore::IDBKeyRange::upperValue):
2914         (WebCore::IDBKeyRange::only):
2915         (WebCore::IDBKeyRange::lowerBound):
2916         (WebCore::IDBKeyRange::upperBound):
2917         (WebCore::IDBKeyRange::bound):
2918         * Modules/indexeddb/IDBKeyRange.h:
2919         (WebCore::IDBKeyRange::lowerBound):
2920         (WebCore::IDBKeyRange::upperBound):
2921         (WebCore::IDBKeyRange::bound):
2922         * Modules/indexeddb/IDBObjectStore.cpp:
2923         (WebCore::IDBObjectStore::get):
2924         (WebCore::generateIndexKeysForValue):
2925         (WebCore::IDBObjectStore::add):
2926         (WebCore::IDBObjectStore::put):
2927         (WebCore::IDBObjectStore::deleteFunction):
2928         (WebCore::IDBObjectStore::openCursor):
2929         (WebCore::IDBObjectStore::count):
2930         * Modules/indexeddb/IDBObjectStore.h:
2931         * Modules/indexeddb/IDBRequest.cpp:
2932         (WebCore::IDBRequest::setResultCursor):
2933         (WebCore::IDBRequest::onSuccess):
2934         (WebCore::IDBRequest::onSuccessInternal):
2935         * Modules/indexeddb/IDBRequest.h:
2936         * Modules/mediastream/CapabilityRange.cpp:
2937         (WebCore::scriptValue):
2938         (WebCore::CapabilityRange::min):
2939         (WebCore::CapabilityRange::max):
2940         * Modules/mediastream/CapabilityRange.h:
2941         * Modules/mediastream/MediaTrackConstraint.h:
2942         * Modules/mediastream/RTCIceCandidate.cpp:
2943         * Modules/plugins/QuickTimePluginReplacement.cpp:
2944         * Modules/plugins/QuickTimePluginReplacement.h:
2945         * UseJSC.cmake:
2946         * WebCore.exp.in:
2947         * WebCore.vcxproj/WebCore.vcxproj:
2948         * WebCore.vcxproj/WebCore.vcxproj.filters:
2949         * WebCore.xcodeproj/project.pbxproj:
2950         * bindings/js/Dictionary.h:
2951         (WebCore::Dictionary::getEventListener):
2952         * bindings/js/IDBBindingUtilities.cpp:
2953         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
2954         (WebCore::injectIDBKeyIntoScriptValue):
2955         (WebCore::canInjectIDBKeyIntoScriptValue):
2956         (WebCore::deserializeIDBValue):
2957         (WebCore::deserializeIDBValueBuffer):
2958         (WebCore::idbKeyToScriptValue):
2959         (WebCore::scriptValueToIDBKey):
2960         * bindings/js/IDBBindingUtilities.h:
2961         * bindings/js/JSBindingsAllInOne.cpp:
2962         * bindings/js/JSDictionary.cpp:
2963         (WebCore::JSDictionary::convertValue):
2964         * bindings/js/JSDictionary.h:
2965         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2966         (WebCore::JSHTMLCanvasElement::getContext):
2967         * bindings/js/JSInjectedScriptHostCustom.cpp:
2968         (WebCore::InjectedScriptHost::scriptValueAsNode):
2969         (WebCore::InjectedScriptHost::nodeAsScriptValue):
2970         (WebCore::JSInjectedScriptHost::inspectedObject):
2971         (WebCore::JSInjectedScriptHost::inspect):
2972         * bindings/js/JSInjectedScriptManager.cpp:
2973         (WebCore::InjectedScriptManager::createInjectedScript):
2974         * bindings/js/JSMainThreadExecState.cpp:
2975         (WebCore::functionCallHandlerFromAnyThread):
2976         * bindings/js/JSMainThreadExecState.h:
2977         (WebCore::JSMainThreadExecState::currentState):
2978         * bindings/js/JSMessageEventCustom.cpp:
2979         (WebCore::JSMessageEvent::data):
2980         (WebCore::handleInitMessageEvent):
2981         * bindings/js/ScheduledAction.cpp:
2982         * bindings/js/ScriptCallStackFactory.cpp:
2983         (WebCore::createScriptArguments):
2984         * bindings/js/ScriptController.cpp:
2985         (WebCore::ScriptController::evaluateInWorld):
2986         (WebCore::ScriptController::evaluate):
2987         (WebCore::ScriptController::executeScriptInWorld):
2988         (WebCore::ScriptController::executeScript):
2989         (WebCore::ScriptController::executeIfJavaScriptURL):
2990         * bindings/js/ScriptController.h:
2991         * bindings/js/ScriptDebugServer.cpp:
2992         (WebCore::ScriptDebugServer::setScriptSource):
2993         (WebCore::ScriptDebugServer::updateCallStack):
2994         (WebCore::ScriptDebugServer::dispatchDidPause):
2995         (WebCore::ScriptDebugServer::runScript):
2996         * bindings/js/ScriptDebugServer.h:
2997         * bindings/js/ScriptGlobalObject.cpp: Renamed from Source/WebCore/bindings/js/ScriptObject.cpp.
2998         (WebCore::handleException):
2999         (WebCore::ScriptGlobalObject::set):
3000         (WebCore::ScriptGlobalObject::get):
3001         (WebCore::ScriptGlobalObject::remove):
3002         * bindings/js/ScriptGlobalObject.h: Copied from Source/WebCore/inspector/ScriptCallStack.h.
3003         (WebCore::ScriptGlobalObject::ScriptGlobalObject):
3004         * bindings/js/ScriptObject.h: Removed.
3005         * bindings/js/ScriptProfile.cpp:
3006         (WebCore::buildInspectorObjectFor):
3007         (WebCore::ScriptProfile::buildInspectorObjectForHead):
3008         (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
3009         * bindings/js/ScriptProfile.h:
3010         * bindings/js/ScriptProfiler.cpp:
3011         (WebCore::ScriptProfiler::objectByHeapObjectId):
3012         (WebCore::ScriptProfiler::getHeapObjectId):
3013         * bindings/js/ScriptProfiler.h:
3014         * bindings/js/ScriptState.h:
3015         * bindings/js/SerializedScriptValue.cpp:
3016         (WebCore::SerializedScriptValue::deserializeForInspector):
3017         (WebCore::SerializedScriptValue::serialize):
3018         (WebCore::SerializedScriptValue::deserialize):
3019         * bindings/js/SerializedScriptValue.h:
3020         * bindings/js/WorkerScriptController.cpp:
3021         (WebCore::WorkerScriptController::evaluate):
3022         (WebCore::WorkerScriptController::setException):
3023         * bindings/js/WorkerScriptController.h:
3024         * bindings/scripts/CodeGeneratorJS.pm:
3025         * bindings/scripts/test/JS/JSTestObj.cpp:
3026         (WebCore::setJSTestObjAnyAttribute):
3027         * dom/CustomEvent.cpp:
3028         (WebCore::CustomEvent::initCustomEvent):
3029         * dom/CustomEvent.h:
3030         (WebCore::CustomEvent::detail):
3031         * dom/MessageEvent.cpp:
3032         (WebCore::MessageEvent::MessageEvent):
3033         (WebCore::MessageEvent::initMessageEvent):
3034         * dom/MessageEvent.h:
3035         (WebCore::MessageEvent::create):
3036         (WebCore::MessageEvent::dataAsScriptValue):
3037         * dom/PopStateEvent.h:
3038         (WebCore::PopStateEvent::state):
3039         * dom/ScriptElement.cpp:
3040         * html/HTMLMediaElement.cpp:
3041         * html/parser/XSSAuditor.cpp:
3042         * html/parser/XSSAuditorDelegate.cpp:
3043         * inspector/CodeGeneratorInspector.py:
3044         (RawTypes.BaseType.get_raw_validator_call_text):
3045         (RawTypes.Object.get_array_item_raw_c_type_text):
3046         (RawTypes.Any.get_array_item_raw_c_type_text):
3047         (RawTypes.Array.get_array_item_raw_c_type_text):
3048         (CommandReturnPassModel.OptOutput.get_return_var_type):
3049         (CommandReturnPassModel.OptOutput.get_output_parameter_type):
3050         (TypeModel.ExactlyInt.get_input_param_type_text):
3051         (TypeModel.ExactlyInt.get_opt_output_type_):
3052         (TypeModel.init_class):
3053         (TypeBindings.create_named_type_declaration.Helper):
3054         (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
3055         (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern):
3056         (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder):
3057         (Inspector):
3058         (ArrayBinding.get_array_item_c_type_text):
3059         (Generator.go):
3060         (Generator.process_command):
3061         * inspector/CodeGeneratorInspectorStrings.py:
3062         (void):
3063         (InspectorFrontend_h):
3064         (InspectorBackendDispatchers_h):
3065         * inspector/ConsoleMessage.cpp:
3066         (WebCore::messageSourceValue):
3067         (WebCore::messageTypeValue):
3068         (WebCore::messageLevelValue):
3069         (WebCore::ConsoleMessage::addToFrontend):
3070         * inspector/ConsoleMessage.h:
3071         * inspector/ContentSearchUtils.cpp:
3072         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
3073         (WebCore::ContentSearchUtils::searchInTextByLines):
3074         * inspector/ContentSearchUtils.h:
3075         * inspector/InjectedScript.cpp:
3076         (WebCore::InjectedScript::InjectedScript):
3077         (WebCore::InjectedScript::evaluate):
3078         (WebCore::InjectedScript::callFunctionOn):
3079         (WebCore::InjectedScript::evaluateOnCallFrame):
3080         (WebCore::InjectedScript::getFunctionDetails):
3081         (WebCore::InjectedScript::getProperties):
3082         (WebCore::InjectedScript::getInternalProperties):
3083         (WebCore::InjectedScript::nodeForObjectId):
3084         (WebCore::InjectedScript::releaseObject):
3085         (WebCore::InjectedScript::wrapCallFrames):
3086         (WebCore::InjectedScript::wrapObject):
3087         (WebCore::InjectedScript::wrapTable):
3088         (WebCore::InjectedScript::wrapNode):
3089         (WebCore::InjectedScript::findObjectById):
3090         (WebCore::InjectedScript::inspectNode):
3091         (WebCore::InjectedScript::releaseObjectGroup):
3092         (WebCore::InjectedScript::nodeAsScriptValue):
3093         * inspector/InjectedScript.h:
3094         * inspector/InjectedScriptBase.cpp:
3095         (WebCore::InjectedScriptBase::InjectedScriptBase):
3096         (WebCore::InjectedScriptBase::initialize):
3097         (WebCore::InjectedScriptBase::injectedScriptObject):
3098         (WebCore::InjectedScriptBase::callFunctionWithEvalEnabled):
3099         (WebCore::InjectedScriptBase::makeCall):
3100         (WebCore::InjectedScriptBase::makeEvalCall):
3101         * inspector/InjectedScriptBase.h:
3102         * inspector/InjectedScriptCanvasModule.cpp:
3103         (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
3104         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
3105         (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
3106         (WebCore::InjectedScriptCanvasModule::markFrameEnd):
3107         (WebCore::InjectedScriptCanvasModule::callStartCapturingFunction):
3108         (WebCore::InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument):
3109         (WebCore::InjectedScriptCanvasModule::traceLog):
3110         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
3111         (WebCore::InjectedScriptCanvasModule::resourceInfo):
3112         (WebCore::InjectedScriptCanvasModule::resourceState):
3113         * inspector/InjectedScriptCanvasModule.h:
3114         * inspector/InjectedScriptHost.cpp:
3115         (WebCore::InjectedScriptHost::inspectImpl):
3116         (WebCore::InjectedScriptHost::InspectableObject::get):
3117         * inspector/InjectedScriptHost.h:
3118         * inspector/InjectedScriptManager.cpp:
3119         (WebCore::InjectedScriptManager::injectedScriptFor):
3120         * inspector/InjectedScriptManager.h:
3121         * inspector/InjectedScriptModule.cpp:
3122         (WebCore::InjectedScriptModule::ensureInjected):
3123         * inspector/InspectorAgent.cpp:
3124         (WebCore::InspectorAgent::InspectorAgent):
3125         (WebCore::InspectorAgent::didCreateFrontendAndBackend):
3126         (WebCore::InspectorAgent::inspect):
3127         * inspector/InspectorAgent.h:
3128         * inspector/InspectorAllInOne.cpp:
3129         * inspector/InspectorApplicationCacheAgent.cpp:
3130         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
3131         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
3132         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
3133         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
3134         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
3135         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
3136         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
3137         * inspector/InspectorApplicationCacheAgent.h:
3138         * inspector/InspectorCSSAgent.cpp:
3139         (WebCore::SelectorProfile::toInspectorObject):
3140         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
3141         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
3142         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
3143         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
3144         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
3145         (WebCore::InspectorCSSAgent::getAllStyleSheets):
3146         (WebCore::InspectorCSSAgent::getStyleSheet):
3147         (WebCore::InspectorCSSAgent::setStyleText):
3148         (WebCore::InspectorCSSAgent::setPropertyText):
3149         (WebCore::InspectorCSSAgent::toggleProperty):
3150         (WebCore::InspectorCSSAgent::setRuleSelector):
3151         (WebCore::InspectorCSSAgent::addRule):
3152         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
3153         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
3154         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
3155         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
3156         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
3157         (WebCore::InspectorCSSAgent::collectStyleSheets):
3158         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
3159         (WebCore::InspectorCSSAgent::detectOrigin):
3160         (WebCore::InspectorCSSAgent::buildObjectForRule):
3161         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
3162         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3163         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
3164         (WebCore::InspectorCSSAgent::buildArrayForRegions):
3165         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
3166         * inspector/InspectorCSSAgent.h:
3167         * inspector/InspectorCanvasAgent.cpp:
3168         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
3169         (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
3170         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
3171         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
3172         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
3173         (WebCore::InspectorCanvasAgent::injectedScriptCanvasModule):
3174         * inspector/InspectorCanvasAgent.h:
3175         * inspector/InspectorCanvasInstrumentation.h:
3176         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
3177         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
3178         * inspector/InspectorClient.cpp:
3179         * inspector/InspectorClient.h:
3180         * inspector/InspectorConsoleAgent.cpp:
3181         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
3182         (WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend):
3183         (WebCore::InspectableHeapObject::get):
3184         * inspector/InspectorConsoleAgent.h:
3185         * inspector/InspectorController.cpp:
3186         * inspector/InspectorController.h:
3187         * inspector/InspectorDOMAgent.cpp:
3188         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
3189         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
3190         (WebCore::InspectorDOMAgent::getDocument):
3191         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
3192         (WebCore::InspectorDOMAgent::querySelectorAll):
3193         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
3194         (WebCore::InspectorDOMAgent::getEventListenersForNode):
3195         (WebCore::InspectorDOMAgent::getSearchResults):
3196         (WebCore::InspectorDOMAgent::resolveNode):
3197         (WebCore::InspectorDOMAgent::getAttributes):
3198         (WebCore::InspectorDOMAgent::buildObjectForNode):
3199         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
3200         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
3201         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
3202         (WebCore::InspectorDOMAgent::didCommitLoad):
3203         (WebCore::InspectorDOMAgent::didInsertDOMNode):
3204         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
3205         * inspector/InspectorDOMAgent.h:
3206         * inspector/InspectorDOMDebuggerAgent.cpp:
3207         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
3208         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
3209         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
3210         * inspector/InspectorDOMDebuggerAgent.h:
3211         * inspector/InspectorDOMStorageAgent.cpp:
3212         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
3213         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
3214         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
3215         (WebCore::InspectorDOMStorageAgent::storageId):
3216         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
3217         * inspector/InspectorDOMStorageAgent.h:
3218         * inspector/InspectorDatabaseAgent.cpp:
3219         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
3220         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
3221         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
3222         * inspector/InspectorDatabaseAgent.h:
3223         * inspector/InspectorDatabaseResource.cpp:
3224         (WebCore::InspectorDatabaseResource::bind):
3225         * inspector/InspectorDebuggerAgent.cpp:
3226         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
3227         (WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend):
3228         (WebCore::breakpointActionTypeForString):
3229         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
3230         (WebCore::InspectorDebuggerAgent::setBreakpoint):
3231         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
3232         (WebCore::scriptToInspectorObject):
3233         (WebCore::InspectorDebuggerAgent::searchInContent):
3234         (WebCore::InspectorDebuggerAgent::setScriptSource):
3235         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
3236         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
3237         (WebCore::InspectorDebuggerAgent::compileScript):
3238         (WebCore::InspectorDebuggerAgent::runScript):
3239         (WebCore::InspectorDebuggerAgent::currentCallFrames):
3240         (WebCore::InspectorDebuggerAgent::didParseSource):
3241         (WebCore::InspectorDebuggerAgent::didPause):
3242         (WebCore::InspectorDebuggerAgent::didContinue):
3243         (WebCore::InspectorDebuggerAgent::clear):
3244         * inspector/InspectorDebuggerAgent.h:
3245         * inspector/InspectorForwarding.h:
3246         * inspector/InspectorFrontendClientLocal.cpp:
3247         (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
3248         * inspector/InspectorFrontendHost.cpp:
3249         (WebCore::FrontendMenuProvider::create):
3250         (WebCore::FrontendMenuProvider::disconnect):
3251         (WebCore::FrontendMenuProvider::FrontendMenuProvider):
3252         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
3253         (WebCore::FrontendMenuProvider::contextMenuCleared):
3254         (WebCore::InspectorFrontendHost::showContextMenu):
3255         * inspector/InspectorHeapProfilerAgent.cpp:
3256         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
3257         (WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend):
3258         (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
3259         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
3260         (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
3261         (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
3262         * inspector/InspectorHeapProfilerAgent.h:
3263         * inspector/InspectorIndexedDBAgent.cpp:
3264         (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
3265         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
3266         * inspector/InspectorIndexedDBAgent.h:
3267         * inspector/InspectorInputAgent.cpp:
3268         (WebCore::InspectorInputAgent::InspectorInputAgent):
3269         (WebCore::InspectorInputAgent::didCreateFrontendAndBackend):
3270         * inspector/InspectorInputAgent.h:
3271         * inspector/InspectorInstrumentation.cpp:
3272         * inspector/InspectorInstrumentation.h:
3273         * inspector/InspectorLayerTreeAgent.cpp:
3274         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
3275         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
3276         (WebCore::InspectorLayerTreeAgent::layersForNode):
3277         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
3278         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
3279         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3280         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
3281         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
3282         * inspector/InspectorLayerTreeAgent.h:
3283         * inspector/InspectorMemoryAgent.cpp:
3284         (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
3285         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
3286         * inspector/InspectorMemoryAgent.h:
3287         * inspector/InspectorOverlay.cpp:
3288         * inspector/InspectorOverlay.h:
3289         * inspector/InspectorPageAgent.cpp:
3290         (WebCore::InspectorPageAgent::resourceTypeJson):
3291         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
3292         (WebCore::InspectorPageAgent::InspectorPageAgent):
3293         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
3294         (WebCore::buildObjectForCookie):
3295         (WebCore::buildArrayForCookies):
3296         (WebCore::InspectorPageAgent::getCookies):
3297         (WebCore::InspectorPageAgent::getResourceTree):
3298         (WebCore::InspectorPageAgent::searchInResource):
3299         (WebCore::buildObjectForSearchResult):
3300         (WebCore::InspectorPageAgent::searchInResources):
3301         (WebCore::InspectorPageAgent::buildObjectForFrame):
3302         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
3303         * inspector/InspectorPageAgent.h:
3304         * inspector/InspectorProfilerAgent.cpp:
3305         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
3306         (WebCore::InspectorProfilerAgent::createProfileHeader):
3307         (WebCore::InspectorProfilerAgent::createSnapshotHeader):
3308         (WebCore::InspectorProfilerAgent::getProfileHeaders):
3309         (WebCore::InspectorProfilerAgent::getCPUProfile):
3310         (WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend):
3311         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
3312         (WebCore::InspectorProfilerAgent::getHeapObjectId):
3313         * inspector/InspectorProfilerAgent.h:
3314         * inspector/InspectorResourceAgent.cpp:
3315         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
3316         (WebCore::buildObjectForTiming):
3317         (WebCore::buildObjectForResourceRequest):
3318         (WebCore::buildObjectForResourceResponse):
3319         (WebCore::buildObjectForCachedResource):
3320         (WebCore::InspectorResourceAgent::willSendRequest):
3321         (WebCore::InspectorResourceAgent::didReceiveResponse):
3322         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3323         (WebCore::InspectorResourceAgent::buildInitiatorObject):
3324         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
3325         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
3326         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
3327         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
3328         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
3329         * inspector/InspectorResourceAgent.h:
3330         * inspector/InspectorRuntimeAgent.cpp:
3331         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
3332         (WebCore::buildErrorRangeObject):
3333         (WebCore::InspectorRuntimeAgent::parse):
3334         (WebCore::InspectorRuntimeAgent::evaluate):
3335         (WebCore::InspectorRuntimeAgent::callFunctionOn):
3336         (WebCore::InspectorRuntimeAgent::getProperties):
3337         * inspector/InspectorRuntimeAgent.h:
3338         * inspector/InspectorStyleSheet.cpp:
3339         (WebCore::buildSourceRangeObject):
3340         (WebCore::buildMediaObject):
3341         (WebCore::fillMediaListChain):
3342         (WebCore::InspectorStyle::buildObjectForStyle):
3343         (WebCore::InspectorStyle::buildArrayForComputedStyle):
3344         (WebCore::InspectorStyle::styleWithProperties):
3345         (WebCore::InspectorStyleSheet::create):
3346         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
3347         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
3348         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
3349         (WebCore::selectorsFromSource):
3350         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
3351         (WebCore::InspectorStyleSheet::buildObjectForRule):
3352         (WebCore::InspectorStyleSheet::buildObjectForStyle):
3353         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
3354         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
3355         (WebCore::InspectorStyleSheetForInlineStyle::create):
3356         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
3357         * inspector/InspectorStyleSheet.h:
3358         (WebCore::InspectorCSSId::InspectorCSSId):
3359         (WebCore::InspectorStyleSheet::canBind):
3360         * inspector/InspectorStyleTextEditor.cpp:
3361         * inspector/InspectorTimelineAgent.cpp:
3362         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
3363         (WebCore::toProtocol):
3364         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
3365         (WebCore::InspectorTimelineAgent::setDOMCounters):
3366         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3367         (WebCore::InspectorTimelineAgent::sendEvent):
3368         * inspector/InspectorTimelineAgent.h:
3369         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
3370         * inspector/InspectorWebAgentBase.h: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.h.
3371         (WebCore::InspectorAgentBase::InspectorAgentBase):
3372         * inspector/InspectorWorkerAgent.cpp:
3373         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
3374         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
3375         * inspector/InspectorWorkerAgent.h:
3376         * inspector/InstrumentingAgents.cpp:
3377         * inspector/NetworkResourcesData.cpp:
3378         * inspector/PageConsoleAgent.cpp:
3379         (WebCore::InspectableNode::get):
3380         * inspector/PageDebuggerAgent.cpp:
3381         * inspector/PageDebuggerAgent.h:
3382         * inspector/PageRuntimeAgent.cpp:
3383         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
3384         * inspector/PageRuntimeAgent.h:
3385         * inspector/ScriptArguments.cpp:
3386         (WebCore::ScriptArguments::create):
3387         (WebCore::ScriptArguments::ScriptArguments):
3388         (WebCore::ScriptArguments::argumentAt):
3389         (WebCore::ScriptArguments::getFirstArgumentAsString):
3390         * inspector/ScriptArguments.h:
3391         * inspector/ScriptCallFrame.cpp:
3392         (WebCore::ScriptCallFrame::buildInspectorObject):
3393         * inspector/ScriptCallFrame.h:
3394         * inspector/ScriptCallStack.cpp:
3395         (WebCore::ScriptCallStack::buildInspectorArray):
3396     &nbs