[Mac] process raw VTT in-band captions
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-06-23  Eric Carlson  <eric.carlson@apple.com>
2
3         [Mac] process raw VTT in-band captions
4         https://bugs.webkit.org/show_bug.cgi?id=134178
5
6         Reviewed by Jer Noble.
7
8         * CMakeLists.txt: Add ISOVTTCue.cpp|h.
9         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
10         * WebCore.xcodeproj/project.pbxproj: Ditto.
11
12         * html/track/BufferedLineReader.h:
13         (WebCore::BufferedLineReader::reset): New, empty the input buffer.
14
15         Make it possible to process WebVTT captions. 
16         * html/track/InbandGenericTextTrack.cpp:
17         (WebCore::InbandGenericTextTrack::parser): Allocate, if necessary, and return a WebVTT parser.
18         (WebCore::InbandGenericTextTrack::parseWebVTTCueData): Pass a cue to the parser.
19         (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Pass a VTT file header to the parser.
20         (WebCore::InbandGenericTextTrack::newCuesParsed): Parser callback.
21         (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
22         (WebCore::InbandGenericTextTrack::fileFailedToParse): Ditto.
23         * html/track/InbandGenericTextTrack.h:
24
25         * html/track/InbandTextTrack.h:
26
27         * html/track/InbandWebVTTTextTrack.cpp:
28         (WebCore::InbandWebVTTTextTrack::parser): New, parser accessor.
29         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): New, parse VTT data in an ISOWebVTTCue
30             object.
31         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Cleanup.
32         (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Implement.
33         (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Change the error message.
34         * html/track/InbandWebVTTTextTrack.h:
35
36         * html/track/TextTrackCueGeneric.cpp:
37         (WebCore::TextTrackCueGenericBoxElement::TextTrackCueGenericBoxElement): Change cue parameter
38             from a pointer to a reference.
39         (WebCore::TextTrackCueGeneric::createDisplayTree): Ditto.
40
41         * html/track/VTTCue.cpp:
42         (WebCore::VTTCueBox::create): Change cue parameter from a pointer to a reference.
43         (WebCore::VTTCueBox::VTTCueBox): Ditto.
44         (WebCore::VTTCueBox::getCue): Return a reference.
45         (WebCore::VTTCueBox::applyCSSProperties): m_cue is a reference, not a pointer.
46         (WebCore::VTTCue::create): New, create a VTTCue from WebVTTCueData.
47         (WebCore::VTTCue::VTTCue): New, internal constructor that takes a WebVTTCueData.
48         (WebCore::VTTCue::initialize): New, shared constructor initialization.
49         (WebCore::VTTCue::createDisplayTree): m_cue is a reference, not a pointer.
50         (WebCore::VTTCue::markFutureAndPastNodes): Ditto.
51         (WebCore::VTTCue::setCueSettings): Ditto.
52         * html/track/VTTCue.h:
53         (WebCore::VTTCueBox::create): Deleted.
54         (WebCore::VTTCue::create): Deleted.
55
56         * html/track/WebVTTParser.cpp:
57         (WebCore::WebVTTParser::parseFileHeader): New. Reset the line reader buffer and parser state, 
58             call the parser.
59         (WebCore::WebVTTParser::parseCueData): Create a cue from ISOWebVTTCue.
60         (WebCore::WebVTTParser::collectTimingsAndSettings): Return immediately if the string is empty.
61         (WebCore::WebVTTParser::collectTimeStamp): Ditto.
62         * html/track/WebVTTParser.h:
63         (WebCore::WebVTTCueData::originalStartTime): New.
64         (WebCore::WebVTTCueData::setOriginalStartTime): New.
65         (WebCore::WebVTTCueData::WebVTTCueData):
66
67         * loader/TextTrackLoader.cpp:
68         (WebCore::TextTrackLoader::getNewCues): Cleanup, use the new VTTCue::create.
69
70         * platform/graphics/InbandTextTrackPrivateClient.h:
71         (WebCore::InbandTextTrackPrivateClient::parseWebVTTFileHeader): New.
72
73         Parse ISO WebVTT cue boxes.
74         * platform/graphics/ISOVTTCue.cpp: Added.
75         (WebCore::ISOBox::ISOBox):
76         (WebCore::ISOBox::peekType):
77         (WebCore::ISOBox::peekLength):
78         (WebCore::ISOBox::peekString):
79         (WebCore::vttCueBoxType):
80         (WebCore::vttIdBoxType):
81         (WebCore::vttSettingsBoxType):
82         (WebCore::vttPayloadBoxType):
83         (WebCore::vttCurrentTimeBoxType):
84         (WebCore::vttCueSourceIDBoxType):
85         (WebCore::ISOWebVTTCue::boxType):
86         (WebCore::ISOWebVTTCue::ISOWebVTTCue):
87         * platform/graphics/ISOVTTCue.h: Added.
88         (WebCore::ISOBox::boxHeaderSize):
89         (WebCore::ISOBox::length):
90         (WebCore::ISOBox::type):
91         (WebCore::ISOWebVTTCue::presentationTime):
92         (WebCore::ISOWebVTTCue::duration):
93         (WebCore::ISOWebVTTCue::sourceID):
94         (WebCore::ISOWebVTTCue::id):
95         (WebCore::ISOWebVTTCue::originalStartTime):
96         (WebCore::ISOWebVTTCue::settings):
97         (WebCore::ISOWebVTTCue::cueText):
98
99         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
100         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Add a cue format parameter.
101         (WebCore::InbandTextTrackPrivateAVF::processCue): Call processNativeSamples.
102         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Add logging. Minor cleanup.
103         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): New, process an array of 
104             CMSampleBuffers, create ISOWebVTTCue from the sample data.
105         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
106
107         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
108         (WebCore::InbandTextTrackPrivateAVFObjC::create): Add a cue format parameter.
109         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
110         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
111
112         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
113         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
114         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Improve logging.
115         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't leak an NSDictionary.
116         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't process media selection
117             options until we have tracks.
118         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): 
119         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass native samples as well as 
120             attributed strings to track.
121         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
122         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
123         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
124
125         * platform/graphics/avfoundation/InbandTextTrackPrivateLegacyAVFObjC.cpp:
126         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC): Pass cue
127             format to base class.
128
129         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
130         (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF): Ditto.
131         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
132
133 2014-06-23  Jer Noble  <jer.noble@apple.com>
134
135         [MSE][Mac] Crash in SourceBuffer::sourceBufferPrivateDidReceiveRenderingError()
136         https://bugs.webkit.org/show_bug.cgi?id=134211
137
138         Reviewed by Eric Carlson.
139
140         Null-check m_source before dereferencing, as the SourceBuffer may have been removed
141         from its MediaSource before this error was received.
142
143         * Modules/mediasource/SourceBuffer.cpp:
144         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
145
146 2014-06-23  Joseph Pecoraro  <pecoraro@apple.com>
147
148         Reduce synchronous layout triggered by JavaScript-based media controls
149         https://bugs.webkit.org/show_bug.cgi?id=134208
150
151         Reviewed by Eric Carlson.
152
153         Avoid always querying the offsetWidth and offsetHeight of the timeline
154         by only calculating these values when the timeline may change size.
155         Also avoid doing work in a few cases where properties did not
156         actually change.
157
158         * Modules/mediacontrols/mediaControlsApple.js:
159         (Controller):
160
161         (Controller.prototype.setNeedsTimelineMetricsUpdate):
162         (Controller.prototype.updateTimelineMetricsIfNeeded):
163         Only update the timeline metrics when they may have changed.
164
165         (Controller.prototype.updateControls):
166         (Controller.prototype.handleTimelineMouseMove):
167         (Controller.prototype.progressFillStyle):
168         (Controller.prototype.showControls):
169         (Controller.prototype.addControls):
170         Mark timeline metrics need update based on various UI changes.
171
172         (Controller.prototype.setStatusHidden):
173         Only do work if the hidden status changed.
174         Mark timeline metrics need update if the timeline is changed.
175
176         (Controller.prototype.updateProgress):
177         Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.
178
179         * Modules/mediacontrols/mediaControlsiOS.js:
180         (ControllerIOS):
181         (ControllerIOS.prototype.updateControls):
182
183         (ControllerIOS.prototype.updateProgress):
184         Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.
185
186         (ControllerIOS.prototype.handleWirelessPlaybackChange):
187         Mark timeline metrics need update as button may have changed.
188
189         (ControllerIOS.prototype.handleWirelessTargetAvailableChange):
190         Only do work if the availability changed.
191         Mark timeline metrics need update as a new button may have appeared.
192
193         (ControllerIOS.prototype.set pageScaleFactor):
194         Only do work if the page scale factor changed.
195
196 2014-06-23  Brady Eidson  <beidson@apple.com>
197
198         Add skeleton code for updated Gamepad API
199         https://bugs.webkit.org/show_bug.cgi?id=134165
200
201         Unreviewed - Forgotten review feedback from http://trac.webkit.org/changeset/170309
202
203         * Modules/gamepad/GamepadButton.idl: Forgot to commit the removal of NoInterfaceObject here.
204
205 2014-06-23  Brady Eidson  <beidson@apple.com>
206
207         Add skeleton code for updated Gamepad API
208         https://bugs.webkit.org/show_bug.cgi?id=134165
209
210         Reviewed by Dean Jackson.
211
212         No new tests (No change in behavior for any tested configuration)
213
214         Interface and dummy implementation for the Gamepad object:
215         * Modules/gamepad/Gamepad.cpp: Added.
216         (WebCore::Gamepad::Gamepad):
217         (WebCore::Gamepad::~Gamepad):
218         (WebCore::Gamepad::axes):
219         (WebCore::Gamepad::buttons):
220         * Modules/gamepad/Gamepad.h: Added.
221         * Modules/gamepad/Gamepad.idl: Added.
222
223         Interface and dummy implementation for the GamepadButton object:
224         * Modules/gamepad/GamepadButton.cpp: Added.
225         (WebCore::GamepadButton::GamepadButton):
226         (WebCore::GamepadButton::pressed):
227         * Modules/gamepad/GamepadButton.h: Added.
228         (WebCore::GamepadButton::create):
229         (WebCore::GamepadButton::value):
230         (WebCore::GamepadButton::setValue):
231         * Modules/gamepad/GamepadButton.idl: Added.
232
233         Interface and dummy implementation for the GamepadEvent object:
234         * Modules/gamepad/GamepadEvent.cpp: Added.
235         (WebCore::GamepadEvent::GamepadEvent):
236         * Modules/gamepad/GamepadEvent.h: Added.
237         (WebCore::GamepadEventInit::GamepadEventInit):
238         (WebCore::GamepadEvent::~GamepadEvent):
239         (WebCore::GamepadEvent::create):
240         (WebCore::GamepadEvent::gamepad):
241         * Modules/gamepad/GamepadEvent.idl: Added.
242         * dom/EventNames.in:
243
244         Interface and dummy implementation for additions to the Navigator object:
245         * Modules/gamepad/NavigatorGamepad.cpp: Added.
246         (WebCore::NavigatorGamepad::NavigatorGamepad):
247         (WebCore::NavigatorGamepad::supplementName):
248         (WebCore::NavigatorGamepad::from):
249         (WebCore::NavigatorGamepad::getGamepads):
250         (WebCore::NavigatorGamepad::gamepads):
251         * Modules/gamepad/NavigatorGamepad.h: Added.
252         * Modules/gamepad/NavigatorGamepad.idl: Added.
253
254         Bindings additions necessary for these new interfaces:
255         * bindings/js/JSDOMBinding.h:
256         (WebCore::JSValueTraits<double>::arrayJSValue):
257         * bindings/js/JSDictionary.cpp:
258         (WebCore::JSDictionary::convertValue):
259         * bindings/js/JSDictionary.h:
260
261         Project file stuff:
262         * CMakeLists.txt:
263         * WebCore.vcxproj/WebCore.vcxproj:
264         * WebCore.vcxproj/WebCoreCommon.props:
265         * WebCore.vcxproj/copyForwardingHeaders.cmd:
266         * WebCore.xcodeproj/project.pbxproj:
267         * DerivedSources.make:
268
269 2014-06-23  Simon Fraser  <simon.fraser@apple.com>
270
271         Catch Obj-C exceptions thrown by _linenPatternImage
272         https://bugs.webkit.org/show_bug.cgi?id=134202
273
274         Reviewed by Geoffrey Garen.
275
276         Catch Objective-C exceptions thrown by _linenPatternImage and
277         -[NSImage CGImageForProposedRect:context:hints:].
278
279         * platform/mac/ScrollbarThemeMac.mm:
280         (WebCore::linenBackgroundColor):
281
282 2014-06-23  Simon Fraser  <simon.fraser@apple.com>
283
284         CSS clip property should make layers non-opaque
285         https://bugs.webkit.org/show_bug.cgi?id=134147
286         <rdar://problem/17324579>
287
288         Reviewed by Tim Horton.
289         
290         https://www.fairphone.com has position:fixed elements with clip: rect(...)
291         but we were making those layers opaque, resulting in garbage pixels
292         in areas outside the clip rect.
293         
294         Fix by checking for the clip property in RenderBox::backgroundIsKnownToBeOpaqueInRect().
295
296         Test: compositing/contents-opaque/opaque-with-clip.html
297
298         * rendering/RenderBox.cpp:
299         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
300
301 2014-06-23  Simon Fraser  <simon.fraser@apple.com>
302
303         Adding a mask on a simple color compositing layer removes the content
304         https://bugs.webkit.org/show_bug.cgi?id=134127
305
306         Reviewed by Dean Jackson.
307         
308         In r169053 I moved some updateDrawsContent() into updateAfterDescendents(),
309         but this isn't called when a composited layer gains or loses a mask (which
310         doesn't cause a layout). This caused us to fail to allocate backing store
311         when gaining a mask, resulting in missing content.
312         
313         Fix by calling updateAfterDescendents() from RenderLayer::styleChange()
314         when the layer config isn't changing.
315         
316         Also remove a condition in isSimpleContainerCompositingLayer() that caused us
317         to fall off the simple layer path for masked layers, since this works just
318         fine.
319
320         Test: compositing/masks/solid-color-masked.html
321
322         * rendering/RenderLayer.cpp:
323         (WebCore::RenderLayer::calculateClipRects):
324         * rendering/RenderLayerBacking.cpp:
325         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
326
327 2014-06-23  David Hyatt  <hyatt@apple.com>
328
329         [New Multicolumn] Writing mode changes on the <html> and RenderView need to
330         be propagated to column sets and flow thread children of those renderers.
331         https://bugs.webkit.org/show_bug.cgi?id=134121
332         <rdar://problem/16884527>
333
334         Reviewed by Dean Jackson.
335
336         Added fast/multicol/pagination/RightToLeft-rl-dynamic.html
337
338         * rendering/RenderBlockFlow.cpp:
339         (WebCore::RenderBlockFlow::styleDidChange):
340         Refactor the propagation code for column sets and flow thread styles into a helper
341         function that is called here.
342
343         (WebCore::RenderBlockFlow::updateStylesForColumnChildren):
344         * rendering/RenderBlockFlow.h:
345         Add a new helper function for recalculating the styles of the column sets and
346         flow thread in response to changes.
347
348         * rendering/RenderBox.cpp:
349         (WebCore::RenderBox::styleDidChange):
350         When the style is changed for a root element or the RenderView in response to
351         writing mode and direction changes, make sure that style gets propagated to
352         the column children by calling the new helper function.
353
354 2014-06-23  Jer Noble  <jer.noble@apple.com>
355
356         [Mac] Uncaught exception crash when destroying MediaPlayerPrivateAVFoundationObjC
357         https://bugs.webkit.org/show_bug.cgi?id=134198
358
359         Reviewed by Eric Carlson.
360
361         Now that we always create an AVPlayerLayer when creating an AVPlayer, but we don't
362         return that layer from platformLayer() unless we've been asked to, we no longer are
363         asked to destroy our video layer from MediaPlayerPrivateAVFoundation::tearDownVideoRendering().
364
365         Instead, explicitly destroy our video layer (and remove the KVO-observer which is
366         causing this exception) in the MediaPlayerPrivateAVFoundationObjC destructor.
367
368         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
369         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
370
371 2014-06-23  Andreas Kling  <akling@apple.com>
372
373         Remove unused FrameView::setUseCustomFixedPositionLayoutRect().
374         <https://webkit.org/b/134194>
375
376         Reviewed by Anders Carlsson.
377
378         * WebCore.exp.in:
379         * page/FrameView.cpp:
380         (WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Deleted.
381         * page/FrameView.h:
382
383 2014-06-23  Antti Koivisto  <antti@apple.com>
384
385         REGRESSION (r160908): Unable to unset bold while entering text
386         https://bugs.webkit.org/show_bug.cgi?id=134196
387         <rdar://problem/17051653>
388
389         Reviewed by Andreas Kling.
390         
391         No test, this code path is used by some WK1 API clients only.
392
393         * editing/Editor.cpp:
394         (WebCore::Editor::styleForSelectionStart):
395         
396             This needs to update the style before requesting the renderer.
397
398         * editing/Editor.h:
399         * editing/ios/EditorIOS.mm:
400         (WebCore::styleForSelectionStart): Deleted.
401         * editing/mac/EditorMac.mm:
402         (WebCore::styleForSelectionStart): Deleted.
403         
404             Removed the duplicated functions, moved to Editor.cpp.
405
406 2014-06-23  Alex Christensen  <achristensen@webkit.org>
407
408         [iOS] Fix video in WebGL.
409         https://bugs.webkit.org/show_bug.cgi?id=133511
410
411         Reviewed by Jer Noble.
412
413         * WebCore.exp.in:
414         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
415         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
416         (WebCore::wkAVAssetResolvedURL): Deleted.
417         * platform/mac/WebCoreSystemInterface.h:
418         * platform/mac/WebCoreSystemInterface.mm:
419         Declare and use resolvedURL on AVURLAsset instead of using wkAVAssetResolvedURL through WebKitSystemInterface.
420
421 2014-06-23  Radu Stavila  <stavila@adobe.com>
422
423         REGRESSION (r168046): Incorrect handling of object information in WebCore::RenderFlowThread::removeLineRegionInfo
424         https://bugs.webkit.org/show_bug.cgi?id=133587
425
426         Reviewed by Antti Koivisto.
427
428         When an object flowed in multicol is moved from in-flow positioning to out-of-flow positioning,
429         its information must be removed from the flowthread prior to the change being made. 
430         Otherwise, the flow thread will no longer be its containing block and a reference to it
431         will not be possible to obtain.
432
433         No new tests can be added because the code still hits in an unrelated assertion followed by a null dereference.
434         The issue was discussed with Antti Koivisto and we decided its better to fix this problem first and
435         handle the following issue in a separate bug.
436
437         * rendering/RenderBlockFlow.cpp:
438         (WebCore::RenderBlockFlow::styleWillChange):
439         * rendering/RenderObject.h:
440         (WebCore::RenderObject::flowThreadContainingBlock):
441
442 2014-06-23  Krzysztof Czech  <k.czech@samsung.com>
443
444         [EFL] Platform support for WebSpeech feature.
445         https://bugs.webkit.org/show_bug.cgi?id=116438
446
447         Reviewed by Csaba Osztrogonác.
448
449         It's a first step of adding support for Speech Synthesis in EFL port.
450         Just stub out required API and support for compilation.
451
452         * CMakeLists.txt:
453         * PlatformEfl.cmake:
454         * PlatformGTK.cmake: Added some idls to not break GTK build.
455         * platform/PlatformSpeechSynthesizer.h:
456         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Added.
457         (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
458         (WebCore::PlatformSpeechSynthesisProviderEfl::~PlatformSpeechSynthesisProviderEfl):
459         (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
460         (WebCore::PlatformSpeechSynthesisProviderEfl::pause):
461         (WebCore::PlatformSpeechSynthesisProviderEfl::resume):
462         (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
463         (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
464         * platform/efl/PlatformSpeechSynthesisProviderEfl.h: Added.
465         * platform/efl/PlatformSpeechSynthesizerEfl.cpp: Added.
466         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
467         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
468         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
469         (WebCore::PlatformSpeechSynthesizer::pause):
470         (WebCore::PlatformSpeechSynthesizer::resume):
471         (WebCore::PlatformSpeechSynthesizer::speak):
472         (WebCore::PlatformSpeechSynthesizer::cancel):
473
474 2014-06-23  Jeongeun Kim  <je_julie.kim@samsung.com>
475
476         Make it clear to get m_svgExtensions using svgExtensions().
477         https://bugs.webkit.org/show_bug.cgi?id=134186.
478
479         Reviewed by Dirk Schulze.
480
481         This patch makes sure that the purpose of code is to get m_svgExtensions 
482         as changing accessSVGExtensions() to svgExtensions(). 
483         svgExtensions() is a getter API and accessSVGExtensions() checks 
484         the presence of m_svgExtensions and create m_svgExtensions if it does not exist. 
485
486         No new tests, no behavior change.
487
488         * dom/ContainerNode.cpp:
489         (WebCore::ContainerNode::removeChild):
490         (WebCore::ContainerNode::removeChildren):
491         * dom/Document.cpp:
492         (WebCore::Document::commonTeardown):
493         (WebCore::Document::implicitClose):
494         * history/CachedFrame.cpp:
495         (WebCore::CachedFrameBase::restore):
496         * svg/SVGDocumentExtensions.cpp:
497         (WebCore::SVGDocumentExtensions::startAnimations):
498         (WebCore::SVGDocumentExtensions::pauseAnimations):
499         (WebCore::SVGDocumentExtensions::unpauseAnimations):
500         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
501         (WebCore::SVGDocumentExtensions::rebuildElements):
502         * svg/SVGDocumentExtensions.h:
503
504 2014-06-23  Dean Jackson  <dino@apple.com>
505
506         [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
507         https://bugs.webkit.org/show_bug.cgi?id=134183
508
509         Follow-up review from Sam Weinig.
510
511         * platform/graphics/GraphicsContext3D.h: Merge another bit of MAC and IOS
512         code.
513         * ChangeLog: Actually read his review comments this time.
514
515 2014-06-23  Dean Jackson  <dino@apple.com>
516
517         [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
518         https://bugs.webkit.org/show_bug.cgi?id=134183
519
520         Reviewed by Sam Weinig.
521
522         GraphicsContext3D has a reference to a WebGLLayer that was
523         hidden behind a PlatformLayer. This meant we had to cast it
524         to use a WebGLLayer method.
525
526         * platform/graphics/GraphicsContext3D.h: Replace RetainPtr<PlatformLayer>
527         with RetainPtr<WebGLLayer>.
528         * platform/graphics/mac/GraphicsContext3DMac.mm:
529         (WebCore::GraphicsContext3D::~GraphicsContext3D): No need to cast.
530
531 2014-06-22  Zalan Bujtas  <zalan@apple.com>
532
533         Make offset from ancestor computation explicit by moving it to the callers.
534         https://bugs.webkit.org/show_bug.cgi?id=134168.
535
536         Reviewed by Simon Fraser.
537         
538         Explicit offset computation helps code reading and less error-prone than passing
539         the offset pointer and compute it locally when it is null.
540
541         No change in functionality.
542
543         * rendering/RenderLayer.cpp:
544         (WebCore::transparencyClipBox):
545         (WebCore::performOverlapTests):
546         (WebCore::RenderLayer::setupClipPath):
547         (WebCore::RenderLayer::setupFilters):
548         (WebCore::RenderLayer::paintLayerContents):
549         (WebCore::RenderLayer::collectFragments):
550         (WebCore::RenderLayer::updatePaintingInfoForFragments):
551         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
552         (WebCore::RenderLayer::hitTestLayer):
553         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
554         (WebCore::RenderLayer::calculateClipRects):
555         * rendering/RenderLayer.h:
556         * rendering/RenderLayerCompositor.cpp:
557         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
558         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
559         * rendering/RenderTreeAsText.cpp:
560         (WebCore::writeLayers):
561
562 2014-06-22  Zalan Bujtas  <zalan@apple.com>
563
564         Transition layer offsets from LayoutPoint to LayoutSize.
565         https://bugs.webkit.org/show_bug.cgi?id=134156
566
567         Reviewed by Simon Fraser.
568
569         Use better representation for offset values.
570
571         No change in functionality.
572
573         * platform/graphics/LayoutSize.h:
574         (WebCore::roundedForPainting):
575         * rendering/RenderFlowThread.cpp:
576         (WebCore::RenderFlowThread::fragmentsBoundingBox):
577         * rendering/RenderLayer.cpp:
578         (WebCore::expandClipRectForDescendantsAndReflection):
579         (WebCore::RenderLayer::convertToLayerCoords):
580         (WebCore::computeReferenceBox):
581         (WebCore::RenderLayer::setupClipPath):
582         (WebCore::RenderLayer::setupFilters):
583         (WebCore::RenderLayer::paintLayerContents):
584         (WebCore::RenderLayer::paintLayerByApplyingTransform):
585         (WebCore::RenderLayer::collectFragments):
586         (WebCore::RenderLayer::updatePaintingInfoForFragments):
587         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
588         (WebCore::RenderLayer::createLocalTransformState):
589         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
590         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
591         (WebCore::RenderLayer::calculateClipRects):
592         * rendering/RenderLayer.h:
593         * rendering/RenderMultiColumnSet.cpp:
594         (WebCore::RenderMultiColumnSet::collectLayerFragments):
595
596 2014-06-22  Dean Jackson  <dino@apple.com>
597
598         Attempted iOS build fix.
599
600         * platform/graphics/mac/GraphicsContext3DMac.mm:
601         (WebCore::GraphicsContext3D::~GraphicsContext3D): Cast to WebGLLayer.
602
603 2014-06-22  Dean Jackson  <dino@apple.com>
604
605         [Apple] WebGL layer may use GC3D after free with remote layer hosting
606         https://bugs.webkit.org/show_bug.cgi?id=134179
607         <rdar://problem/17412931>
608
609         Reviewed by Tim Horton.
610
611         With remote layer hosting, a WebGLLayer may attempt to draw after
612         the GraphicsContext3D has been destroyed. We need to make sure
613         the GC3D tells the WebGLLayer that it is no longer valid.
614
615         While here, I changed some return 0 to return nullptr, the
616         name of the ObjC property member from m_context to _context,
617         and removed some unnecessary .get() calls.
618
619         This is tested by run-webkit-tests with the --remote-layer-tree
620         option.
621
622         * platform/graphics/mac/GraphicsContext3DMac.mm:
623         (WebCore::GraphicsContext3D::GraphicsContext3D): No need for .get().
624         (WebCore::GraphicsContext3D::~GraphicsContext3D): Set the context reference on WebGLLayer
625         to be null.
626         (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): No need for .get().
627         * platform/graphics/mac/WebGLLayer.h: Set the context reference on WebGLLayer
628         to be null.
629         * platform/graphics/mac/WebGLLayer.mm:
630         (-[WebGLLayer initWithGraphicsContext3D:]): Rename m_context to _context.
631         (-[WebGLLayer copyCGLPixelFormatForDisplayMask:]): Check for null.
632         (-[WebGLLayer copyCGLContextForPixelFormat:]): Rename to _context.
633         (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Check for null.
634         (-[WebGLLayer copyImageSnapshotWithColorSpace:]): Ditto.
635         (-[WebGLLayer display]): Ditto.
636
637 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
638
639         [WK2] Frameset frames are not scrollable after loading (and should be)
640         https://bugs.webkit.org/show_bug.cgi?id=134151
641         <rdar://problem/17403365>
642
643         Reviewed by Dan Bates.
644         
645         When loading a <frameset>, we could end up with an empty non-fast-scrollable
646         region for the main frame, because after the initial frameset document layout,
647         nothing updated the non-fast scrollable region as the subframes added their
648         scrollable areas to the the main frame's scrollable area set.
649         
650         Fix by having addScrollableArea() and removeScrollableArea() trigger an update
651         of the non-fast scrollable region.
652
653         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-frame-scrollability.html
654
655         * page/FrameView.cpp:
656         (WebCore::FrameView::addScrollableArea):
657         (WebCore::FrameView::removeScrollableArea):
658         (WebCore::FrameView::scrollableAreaSetChanged):
659         * page/FrameView.h:
660
661 2014-06-22  Commit Queue  <commit-queue@webkit.org>
662
663         Unreviewed, rolling out r170265.
664         https://bugs.webkit.org/show_bug.cgi?id=134174
665
666         Broke editing tests (Requested by litherum on #webkit).
667
668         Reverted changeset:
669
670         "Use unsigneds instead of ints for indexes into a string in
671         text layout code"
672         https://bugs.webkit.org/show_bug.cgi?id=133592
673         http://trac.webkit.org/changeset/170265
674
675 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
676
677         Have scrollingTreeAsText() dump the non-fast-scrollable region
678         https://bugs.webkit.org/show_bug.cgi?id=134149
679
680         Reviewed by Sam Weinig.
681
682         Dump the non-fast-scrollable region (as an array of rects).
683
684         * WebCore.exp.in:
685         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
686         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
687
688 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
689
690         Use unsigneds instead of ints for indexes into a string in text layout code
691         https://bugs.webkit.org/show_bug.cgi?id=133592
692
693         Reviewed by Zalan Bujtas.
694
695         Migrate much of the text-handling code to use unsigneds for indexes into a string.
696
697         No new tests because there is no behavior change.
698
699         * WebCore.exp.in:
700         * platform/graphics/Font.cpp:
701         (WebCore::Font::drawText):
702         (WebCore::Font::drawEmphasisMarks):
703         (WebCore::Font::adjustSelectionRectForText):
704         (WebCore::computeUnderlineType):
705         * platform/graphics/Font.h:
706         * platform/graphics/FontFastPath.cpp:
707         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
708         (WebCore::Font::drawSimpleText):
709         (WebCore::Font::drawEmphasisMarksForSimpleText):
710         (WebCore::Font::drawGlyphBuffer):
711         (WebCore::Font::drawEmphasisMarks):
712         (WebCore::Font::adjustSelectionRectForSimpleText):
713         * platform/graphics/GlyphBuffer.h:
714         (WebCore::GlyphBuffer::size):
715         (WebCore::GlyphBuffer::glyphs):
716         (WebCore::GlyphBuffer::advances):
717         (WebCore::GlyphBuffer::fontDataAt):
718         (WebCore::GlyphBuffer::advanceAt):
719         (WebCore::GlyphBuffer::offsetAt):
720         (WebCore::GlyphBuffer::reverse):
721         (WebCore::GlyphBuffer::offsetInString):
722         (WebCore::GlyphBuffer::swap):
723         * platform/graphics/GraphicsContext.cpp:
724         (WebCore::TextRunIterator::atEnd):
725         * platform/graphics/Latin1TextIterator.h:
726         (WebCore::Latin1TextIterator::Latin1TextIterator):
727         (WebCore::Latin1TextIterator::currentCharacter):
728         * platform/graphics/SimpleFontData.h:
729         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
730         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
731         * platform/graphics/SurrogatePairAwareTextIterator.h:
732         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
733         * platform/graphics/TextRun.h:
734         (WebCore::TextRun::length):
735         (WebCore::TextRun::charactersLength):
736         * platform/graphics/WidthIterator.cpp:
737         (WebCore::WidthIterator::glyphDataForCharacter):
738         (WebCore::applyFontTransforms):
739         (WebCore::WidthIterator::advanceInternal):
740         (WebCore::WidthIterator::advance):
741         (WebCore::WidthIterator::advanceOneCharacter):
742         * platform/graphics/WidthIterator.h:
743         * platform/graphics/cairo/FontCairo.cpp:
744         (WebCore::Font::drawGlyphs):
745         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
746         (WebCore::Font::drawComplexText):
747         (WebCore::Font::drawEmphasisMarksForComplexText):
748         (WebCore::Font::adjustSelectionRectForComplexText):
749         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
750         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
751         * platform/graphics/mac/FontComplexTextMac.cpp:
752         (WebCore::Font::adjustSelectionRectForComplexText):
753         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
754         (WebCore::Font::drawComplexText):
755         (WebCore::Font::drawEmphasisMarksForComplexText):
756         * platform/graphics/mac/FontMac.mm:
757         (WebCore::Font::drawGlyphs):
758         * platform/graphics/win/FontCGWin.cpp:
759         (WebCore::Font::drawGlyphs):
760         * platform/graphics/win/FontWin.cpp:
761         (WebCore::Font::adjustSelectionRectForComplexText):
762         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
763         (WebCore::Font::drawComplexText):
764         (WebCore::Font::drawEmphasisMarksForComplexText):
765         * platform/graphics/wince/FontWinCE.cpp:
766         (WebCore::Font::drawGlyphs):
767         (WebCore::Font::drawComplexText):
768         (WebCore::Font::drawEmphasisMarksForComplexText):
769         (WebCore::Font::selectionRectForComplexText):
770         * rendering/InlineTextBox.cpp:
771         (WebCore::InlineTextBox::isSelected):
772         (WebCore::InlineTextBox::selectionState):
773         (WebCore::adjustCharactersAndLengthForHyphen):
774         (WebCore::InlineTextBox::localSelectionRect):
775         (WebCore::InlineTextBox::paint):
776         (WebCore::InlineTextBox::selectionStartEnd):
777         (WebCore::InlineTextBox::paintSelection):
778         (WebCore::InlineTextBox::paintCompositionBackground):
779         (WebCore::InlineTextBox::paintDocumentMarker):
780         (WebCore::InlineTextBox::paintTextMatchMarker):
781         (WebCore::InlineTextBox::computeRectForReplacementMarker):
782         (WebCore::InlineTextBox::paintCompositionUnderline):
783         (WebCore::InlineTextBox::positionForOffset):
784         (WebCore::InlineTextBox::constructTextRun):
785         * rendering/InlineTextBox.h:
786         * rendering/RenderCombineText.cpp:
787         (WebCore::RenderCombineText::getStringToRender):
788         * rendering/RenderCombineText.h:
789         * rendering/svg/SVGInlineFlowBox.cpp:
790         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
791         * rendering/svg/SVGInlineTextBox.cpp:
792         (WebCore::SVGInlineTextBox::positionForOffset):
793         (WebCore::SVGInlineTextBox::localSelectionRect):
794         (WebCore::SVGInlineTextBox::paintSelectionBackground):
795         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
796         (WebCore::SVGInlineTextBox::paintText):
797         * rendering/svg/SVGInlineTextBox.h:
798         * rendering/svg/SVGTextMetricsBuilder.cpp:
799         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
800         (WebCore::SVGTextMetricsBuilder::advance):
801         * rendering/svg/SVGTextQuery.cpp:
802         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
803         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
804         (WebCore::SVGTextQuery::subStringLengthCallback):
805         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
806         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
807         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
808         (WebCore::SVGTextQuery::extentOfCharacterCallback):
809         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
810         * rendering/svg/SVGTextQuery.h:
811         * rendering/svg/SVGTextRunRenderingContext.cpp:
812         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
813         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
814         * rendering/svg/SVGTextRunRenderingContext.h:
815         * svg/SVGFontData.cpp:
816         (WebCore::SVGFontData::applySVGGlyphSelection):
817         * svg/SVGFontData.h:
818
819 2014-06-21  Zan Dobersek  <zdobersek@igalia.com>
820
821         createCairoGLSurface should take in a FloatSize reference as its first parameter
822         https://bugs.webkit.org/show_bug.cgi?id=134159
823
824         Reviewed by Martin Robinson.
825
826         The ImageBuffer constructor operates with a FloatSize reference, which is also
827         passed to createCairoGLSurface when accelerated 2D canvas support is enabled.
828         That function should take in a reference to the same type.
829
830         * platform/graphics/cairo/ImageBufferCairo.cpp:
831         (WebCore::createCairoGLSurface):
832
833 2014-06-21  Dean Jackson  <dino@apple.com>
834
835         [Mac] Margins for new form controls need tweaking
836         https://bugs.webkit.org/show_bug.cgi?id=134135
837         <rdar://problem/17262164>
838
839         Reviewed by Sam Weinig.
840
841         Take 2 of this patch. Only the mac-mountainlion LayoutTest
842         results are different from the first attempt.
843
844         With the newer animated controls in OS X Yosemite, we need
845         to tweak the fudge-factor margins for positioning. In a recent
846         patch I added another fudge, which I'm removing with this. I'm
847         not sure where the older values came from, but I've checked with
848         the latest AppKit sources and am using the sizes they implement
849         for the controls.
850
851         This will rebaseline a lot of tests, since I've made small tweaks
852         to the form layout.
853
854         * platform/mac/ThemeMac.mm:
855         (WebCore::checkboxMargins): New margin amounts.
856         (WebCore::radioSizes): New sizes.
857         (WebCore::radioMargins): New margin amounts.
858         (WebCore::paintToggleButton): No need to call the positioning fudge any more.
859         (WebCore::checkboxOffsets): Deleted.
860         (WebCore::radioOffsets): Deleted.
861
862 2014-06-20  Sam Weinig  <sam@webkit.org>
863
864         Remove static tables for bindings that use eager reification
865         https://bugs.webkit.org/show_bug.cgi?id=134126
866
867         Reviewed by Oliver Hunt.
868
869         This shaves about 1MB off of WebCore's .o files.
870
871         * bindings/scripts/CodeGeneratorJS.pm:
872         (GenerateHeader):
873         (GenerateImplementation):
874         (GenerateConstructorHelperMethods):
875         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
876         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
877         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
878         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
879         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
880         * bindings/scripts/test/JS/JSTestEventConstructor.h:
881         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
882         * bindings/scripts/test/JS/JSTestEventTarget.h:
883         * bindings/scripts/test/JS/JSTestException.cpp:
884         * bindings/scripts/test/JS/JSTestException.h:
885         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
886         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
887         * bindings/scripts/test/JS/JSTestInterface.cpp:
888         * bindings/scripts/test/JS/JSTestInterface.h:
889         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
890         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
891         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
892         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
893         * bindings/scripts/test/JS/JSTestNode.cpp:
894         * bindings/scripts/test/JS/JSTestNode.h:
895         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
896         * bindings/scripts/test/JS/JSTestNondeterministic.h:
897         * bindings/scripts/test/JS/JSTestObj.cpp:
898         * bindings/scripts/test/JS/JSTestObj.h:
899         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
900         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
901         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
902         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
903         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
904         * bindings/scripts/test/JS/JSTestTypedefs.h:
905         * bindings/scripts/test/JS/JSattribute.cpp:
906         * bindings/scripts/test/JS/JSattribute.h:
907         * bindings/scripts/test/JS/JSreadonly.cpp:
908         * bindings/scripts/test/JS/JSreadonly.h:
909
910 2014-06-21  Brady Eidson  <beidson@apple.com>
911
912         Gamepad API - Deprecate the existing implementation
913         https://bugs.webkit.org/show_bug.cgi?id=134108
914
915         Reviewed by Timothy Hatcher.
916
917         -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
918         -Move some implementation files into a "deprecated" subdirectory.
919
920         * CMakeLists.txt:
921         * Configurations/FeatureDefines.xcconfig:
922         * PlatformGTK.cmake:
923
924         * Modules/gamepad/deprecated/Gamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
925         * Modules/gamepad/deprecated/Gamepad.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
926         * Modules/gamepad/deprecated/Gamepad.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.
927         * Modules/gamepad/deprecated/GamepadList.cpp: Renamed from Source/WebCore/Modules/gamepad/GamepadList.cpp.
928         * Modules/gamepad/deprecated/GamepadList.h: Renamed from Source/WebCore/Modules/gamepad/GamepadList.h.
929         * Modules/gamepad/deprecated/GamepadList.idl: Renamed from Source/WebCore/Modules/gamepad/GamepadList.idl.
930         * Modules/gamepad/deprecated/NavigatorGamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
931         * Modules/gamepad/deprecated/NavigatorGamepad.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
932         * Modules/gamepad/deprecated/NavigatorGamepad.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.
933
934         * platform/Gamepads.h:
935         * platform/efl/GamepadsEfl.cpp:
936         * platform/gtk/GamepadsGtk.cpp:
937         * platform/linux/GamepadDeviceLinux.cpp:
938         * platform/linux/GamepadDeviceLinux.h:
939
940 2014-06-21  Myles C. Maxfield  <mmaxfield@apple.com>
941
942         Mark TextRun's constructors as explicit
943         https://bugs.webkit.org/show_bug.cgi?id=134124
944
945         Reviewed by Sam Weinig.
946
947         After r170072, nobody is implicitly converting a string to a TextRun. Therefore,
948         we can make the constructors explicit.
949
950         No new tests because there is no behavior change.
951
952         * platform/graphics/TextRun.h:
953         (WebCore::TextRun::TextRun):
954
955 2014-06-21  Commit Queue  <commit-queue@webkit.org>
956
957         Unreviewed, rolling out r170244.
958         https://bugs.webkit.org/show_bug.cgi?id=134157
959
960         GTK/EFL bindings generator works differently, making this
961         patch not work there.  Will fix entire patch after a rollout.
962         (Requested by bradee-oh on #webkit).
963
964         Reverted changeset:
965
966         "Gamepad API - Deprecate the existing implementation"
967         https://bugs.webkit.org/show_bug.cgi?id=134108
968         http://trac.webkit.org/changeset/170244
969
970 2014-06-21  Zan Dobersek  <zdobersek@igalia.com>
971
972         Fix the mismatched header build guards in WebKitDOMNodeFilterPrivate.h
973         which are throwing compilation warnings when building with Clang.
974
975         * bindings/gobject/WebKitDOMNodeFilterPrivate.h:
976
977 2014-06-21  Brady Eidson  <beidson@apple.com>
978
979         Gamepad API - Deprecate the existing implementation
980         https://bugs.webkit.org/show_bug.cgi?id=134108
981
982         Reviewed by Timothy Hatcher.
983
984         -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
985         -Add the "Deprecated" suffix to some implementation files
986
987         * CMakeLists.txt:
988         * PlatformGTK.cmake:
989         * Configurations/FeatureDefines.xcconfig:
990         
991         * Modules/gamepad/GamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
992         * Modules/gamepad/GamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
993         * Modules/gamepad/GamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.
994
995         * Modules/gamepad/GamepadList.cpp:
996         * Modules/gamepad/GamepadList.h:
997         * Modules/gamepad/GamepadList.idl:
998
999         * Modules/gamepad/NavigatorGamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
1000         * Modules/gamepad/NavigatorGamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
1001         * Modules/gamepad/NavigatorGamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.
1002
1003         * platform/Gamepads.h:
1004         * platform/efl/GamepadsEfl.cpp:
1005         * platform/gtk/GamepadsGtk.cpp:
1006         * platform/linux/GamepadDeviceLinux.cpp:
1007         * platform/linux/GamepadDeviceLinux.h:
1008
1009 2014-06-21  Commit Queue  <commit-queue@webkit.org>
1010
1011         Unreviewed, rolling out r170228.
1012         https://bugs.webkit.org/show_bug.cgi?id=134155
1013
1014         Caused 9 layout test failures on Mountain Lion
1015         http://build.webkit.org/builders/Apple%20MountainLion%20Release%20WK2%20(Tests)/builds/19216
1016         (Requested by bradee-oh on #webkit).
1017
1018         Reverted changeset:
1019
1020         "[Mac] Margins for new form controls need tweaking"
1021         https://bugs.webkit.org/show_bug.cgi?id=134135
1022         http://trac.webkit.org/changeset/170228
1023
1024 2014-06-21  Jer Noble  <jer.noble@apple.com>
1025
1026         [Mac] Create and attach the AVPlayerLayer to the AVPlayer immediately if the media element is <video>.
1027         https://bugs.webkit.org/show_bug.cgi?id=134131
1028
1029         Reviewed by Eric Carlson.
1030
1031         The AVPlayer uses the presence of an AVPlayerLayer to decide which alternate to display in the case of
1032         HLS streams with audio-only alternates. To give the AVPlayer the most information with which to make its
1033         decision, always create and attach an AVPlayerLayer before attaching an AVPlayerItem to the AVPlayerLayer.
1034         In addition, retrieve the <video> element bounds and create an AVPlayerLayer with a matching size, so that
1035         the AVPlayer can choose an alternate with the correct dimensions.
1036
1037         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1038         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1039         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
1040         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasLayerRenderer):
1041         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
1042         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1043         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1044         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
1045
1046 2014-06-21  Jeremy Jones  <jeremyj@apple.com>
1047
1048         Implement ios -[WAKWindow convertBaseToScreen:]
1049         https://bugs.webkit.org/show_bug.cgi?id=134053
1050
1051         Reviewed by Eric Carlson.
1052
1053         * platform/ios/wak/WAKWindow.mm:
1054         (-[WAKWindow convertBaseToScreen:]):
1055         Traverse layer hierarchy and convert point.
1056
1057         (-[WAKWindow convertScreenToBase:]):
1058         Traverse layer hierarchy and convert point.
1059
1060 2014-06-21  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1061
1062         Removing PAGE_VISIBILITY_API compile guard.
1063         https://bugs.webkit.org/show_bug.cgi?id=133844
1064
1065         Reviewed by Gavin Barraclough.
1066
1067         No new tests because no functional changes.
1068
1069         * Configurations/FeatureDefines.xcconfig:
1070         * Modules/vibration/NavigatorVibration.cpp:
1071         (WebCore::NavigatorVibration::vibrate):
1072         * dom/Document.cpp:
1073         (WebCore::Document::hidden):
1074         * dom/Document.h:
1075         * dom/Document.idl:
1076         * dom/Element.h:
1077         * html/HTMLMediaElement.cpp:
1078         (WebCore::HTMLMediaElement::HTMLMediaElement):
1079         (WebCore::HTMLMediaElement::registerWithDocument):
1080         (WebCore::HTMLMediaElement::unregisterWithDocument):
1081         (WebCore::HTMLMediaElement::parseAttribute):
1082         * html/HTMLMediaElement.h:
1083         * page/Page.cpp:
1084         (WebCore::Page::setIsVisibleInternal):
1085         (WebCore::Page::visibilityState):
1086         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
1087         * page/Page.h:
1088         * page/PageVisibilityState.cpp:
1089         * page/PageVisibilityState.h:
1090         * page/Settings.cpp:
1091         (WebCore::Settings::Settings):
1092         (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
1093         * page/Settings.h:
1094         * platform/audio/MediaSession.cpp:
1095         (WebCore::MediaSession::updateClientDataBuffering):
1096         * platform/audio/MediaSession.h:
1097
1098 2014-06-21  Frédéric Wang  <fred.wang@free.fr>
1099
1100         [GTK][EFL] Use OpenType MATH fonts by default.
1101         https://bugs.webkit.org/show_bug.cgi?id=133604
1102
1103         Reviewed by Chris Fleizach.
1104
1105         In order to support stretching of horizontal operators and large
1106         operators in display mode as well as to improve the drawing of radicals,
1107         we need to use an OpenType MATH table. This commit makes the MathML code
1108         try "Latin Modern Math" first, which is an OpenType version of Knuth's
1109         popular Computer Modern font and is packaged with most TeX
1110         distributions (e.g. TeX Live on Linux). This should work well on the
1111         EFL & GTK ports for which the initial OpenType MATH support has been
1112         tested. Other ports will be handled later.
1113
1114         No new tests. This is already tested in LayoutTests/mathml/opentype/.
1115
1116         * css/mathml.css:
1117         (math): Add "Latin Modern Math" as the first font-family of the <math> element.
1118
1119 2014-06-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1120
1121         Unreviewed EFL build fix since r170224.
1122
1123         Add retainPlatformLayer() and releasePlatformLayer() in ScrollingStateNodeCoordinatedGraphics.cpp
1124         as well. Thouse functions were missed in r170224.
1125
1126         * page/scrolling/ScrollingStateNode.h:
1127         * page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp:
1128         (WebCore::LayerRepresentation::retainPlatformLayer):
1129         (WebCore::LayerRepresentation::releasePlatformLayer):
1130
1131 2014-06-20  Dean Jackson  <dino@apple.com>
1132
1133         [Mac] Margins for new form controls need tweaking
1134         https://bugs.webkit.org/show_bug.cgi?id=134135
1135         <rdar://problem/17262164>
1136
1137         Reviewed by Sam Weinig.
1138
1139         With the newer animated controls in OS X Yosemite, we need
1140         to tweak the fudge-factor margins for positioning. In a recent
1141         patch I added another fudge, which I'm removing with this. I'm
1142         not sure where the older values came from, but I've checked with
1143         the latest AppKit sources and am using the sizes they implement
1144         for the controls.
1145
1146         This will rebaseline a lot of tests, since I've made small tweaks
1147         to the form layout.
1148
1149         * platform/mac/ThemeMac.mm:
1150         (WebCore::checkboxMargins): New margin amounts.
1151         (WebCore::radioSizes): New sizes.
1152         (WebCore::radioMargins): New margin amounts.
1153         (WebCore::paintToggleButton): No need to call the positioning fudge any more.
1154         (WebCore::checkboxOffsets): Deleted.
1155         (WebCore::radioOffsets): Deleted.
1156
1157 2014-06-20  Alex Christensen  <achristensen@webkit.org>
1158
1159         Fix css jit on armv7.
1160         https://bugs.webkit.org/show_bug.cgi?id=134143
1161         <rdar://problem/17348060>
1162
1163         Reviewed by Benjamin Poulain.
1164
1165         This fixes the acid3 test.
1166
1167         * cssjit/SelectorCompiler.cpp:
1168         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
1169         Correct high and low bits.
1170
1171 2014-06-20  Beth Dakin  <bdakin@apple.com>
1172
1173         https://bugs.webkit.org/show_bug.cgi?id=134117
1174         Unreproducible crashes under WebCore::ScrollingTree::updateTreeFromStateNode() 
1175         from messaging a deleted Obj-C object
1176         -and corresponding-
1177         <rdar://problem/17149252>
1178
1179         Reviewed by Simon Fraser.
1180
1181         This is a speculative fix. It makes LayerRepresentation retain m_platformLayer.
1182
1183         * WebCore.exp.in:
1184         * page/scrolling/ScrollingStateNode.h:
1185         (WebCore::LayerRepresentation::LayerRepresentation):
1186         (WebCore::LayerRepresentation::~LayerRepresentation):
1187         (WebCore::LayerRepresentation::operator=):
1188         (WebCore::LayerRepresentation::operator==):
1189         (WebCore::LayerRepresentation::operator ==): Deleted.
1190
1191         Make this ASSERT an ASSERT_WITH_SECURITY_IMPLICATION
1192         * page/scrolling/ScrollingTree.cpp:
1193         (WebCore::ScrollingTree::updateTreeFromStateNode):
1194
1195         Moved ScrollingStateNodeMac.mm, which was empty anyway, to cocoa/
1196         ScrollingStateNode.mm so that iOS can use it too.
1197         * page/scrolling/cocoa: Added.
1198         * page/scrolling/cocoa/ScrollingStateNode.mm: Copied from page/scrolling/mac/ScrollingStateNodeMac.mm.
1199
1200         Actual implementation for retain and release.
1201         (WebCore::LayerRepresentation::retainPlatformLayer):
1202         (WebCore::LayerRepresentation::releasePlatformLayer):
1203
1204         Deleted.
1205         * page/scrolling/mac/ScrollingStateNodeMac.mm: Removed.
1206
1207 2014-06-19  Zalan Bujtas  <zalan@apple.com>
1208
1209         Introduce RenderLayer::offsetFromAncestorLayer() to make convertToLayerCoords() calls with
1210         LayoutPoint(0, 0) as parameter more explicit.
1211         https://bugs.webkit.org/show_bug.cgi?id=134092
1212
1213         Reviewed by Simon Fraser.
1214
1215         Most of the RenderLayer::convertToLayerCoords() callers are only interested in
1216         the offset from the ancestor layer by passing LayoutPoint(0, 0) as the coordinate to convert.
1217         Introducing offsetFromAncestorLayer() makes those calls more explicit/self-explanatory.
1218         It helps simplifying the callsite's code.
1219
1220         No change in functionality.
1221
1222         * rendering/RenderGeometryMap.cpp:
1223         (WebCore::RenderGeometryMap::mapToContainer):
1224         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
1225         (WebCore::RenderGeometryMap::push):
1226         * rendering/RenderLayer.cpp:
1227         (WebCore::RenderLayer::computeOffsetFromRoot):
1228         (WebCore::RenderLayer::updateLayerPositions):
1229         (WebCore::expandClipRectForRegionAndReflection):
1230         (WebCore::expandClipRectForDescendantsAndReflection):
1231         (WebCore::transparencyClipBox):
1232         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
1233         (WebCore::accumulateOffsetTowardsAncestor):
1234         (WebCore::RenderLayer::convertToLayerCoords):
1235         (WebCore::RenderLayer::offsetFromAncestorLayer):
1236         (WebCore::RenderLayer::clipToRect):
1237         (WebCore::RenderLayer::paintLayerContents):
1238         (WebCore::RenderLayer::paintLayerByApplyingTransform):
1239         (WebCore::RenderLayer::collectFragments):
1240         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
1241         (WebCore::RenderLayer::createLocalTransformState):
1242         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
1243         (WebCore::RenderLayer::calculateClipRects):
1244         * rendering/RenderLayer.h:
1245         * rendering/RenderLayerBacking.cpp:
1246         (WebCore::RenderLayerBacking::updateCompositedBounds):
1247         (WebCore::RenderLayerBacking::updateGeometry):
1248         * rendering/RenderLayerCompositor.cpp:
1249         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor):
1250
1251 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
1252
1253         Removing dead code in platform/graphics/gpu
1254         https://bugs.webkit.org/show_bug.cgi?id=134065
1255
1256         Reviewed by Simon Fraser.
1257
1258         No new tests because there is no behavior change.
1259
1260         * WebCore.vcxproj/WebCore.vcxproj:
1261         * WebCore.vcxproj/WebCore.vcxproj.filters:
1262         * WebCore.xcodeproj/project.pbxproj:
1263         * platform/graphics/gpu/LoopBlinnClassifier.cpp: Removed.
1264         * platform/graphics/gpu/LoopBlinnClassifier.h: Removed.
1265         * platform/graphics/gpu/LoopBlinnConstants.h: Removed.
1266         * platform/graphics/gpu/LoopBlinnLocalTriangulator.cpp: Removed.
1267         * platform/graphics/gpu/LoopBlinnLocalTriangulator.h: Removed.
1268         * platform/graphics/gpu/LoopBlinnMathUtils.cpp: Removed.
1269         * platform/graphics/gpu/LoopBlinnMathUtils.h: Removed.
1270         * platform/graphics/gpu/LoopBlinnPathCache.cpp: Removed.
1271         * platform/graphics/gpu/LoopBlinnPathCache.h: Removed.
1272         * platform/graphics/gpu/LoopBlinnPathProcessor.h: Removed.
1273         * platform/graphics/gpu/LoopBlinnShader.cpp: Removed.
1274         * platform/graphics/gpu/LoopBlinnShader.h: Removed.
1275         * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp: Removed.
1276         * platform/graphics/gpu/LoopBlinnSolidFillShader.h: Removed.
1277         * platform/graphics/gpu/LoopBlinnTextureCoords.cpp: Removed.
1278         * platform/graphics/gpu/LoopBlinnTextureCoords.h: Removed.
1279         * platform/graphics/gpu/Shader.cpp: Removed.
1280         * platform/graphics/gpu/Shader.h: Removed.
1281         * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed.
1282         * platform/graphics/gpu/SharedGraphicsContext3D.h: Removed.
1283         * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
1284         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp: Removed.
1285         * platform/graphics/gpu/opencl/FilterContextOpenCL.h: Removed.
1286         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp: Removed.
1287         * platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Removed.
1288         * platform/graphics/gpu/opencl/OpenCLFEImage.cpp: Removed.
1289         * platform/graphics/gpu/opencl/OpenCLFEMerge.cpp: Removed.
1290         * platform/graphics/gpu/opencl/OpenCLFESourceAlpha.cpp: Removed.
1291         * platform/graphics/gpu/opencl/OpenCLFESourceGraphic.cpp: Removed.
1292         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp: Removed.
1293         * platform/graphics/gpu/opencl/OpenCLHandle.h: Removed.
1294
1295 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
1296
1297         [iOS] Support Khmer and Lao fallback fonts
1298         https://bugs.webkit.org/show_bug.cgi?id=134114
1299
1300         Reviewed by Enrica Casucci.
1301
1302         iOS has fonts which have glyphs for the Khmer and Lao languages.
1303
1304         This patch also does a little refactoring of the language-specific fallback
1305         font path to increase readability.
1306
1307         Test: fast/text/khmer-lao-font.html
1308
1309         * platform/graphics/ios/FontCacheIOS.mm:
1310         (WebCore::languageSpecificFallbackFont):
1311         (WebCore::FontCache::systemFallbackForCharacters):
1312
1313 2014-06-20  Anders Carlsson  <andersca@apple.com>
1314
1315         Give NPAPI post requests a default content type
1316         https://bugs.webkit.org/show_bug.cgi?id=134120
1317
1318         Reviewed by Andreas Kling.
1319
1320         * WebCore.exp.in:
1321
1322 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
1323
1324         REGRESSION (r169972): fix issue when removing masks from compositing layers
1325         https://bugs.webkit.org/show_bug.cgi?id=134118
1326         <rdar://problem/17366654>
1327
1328         Reviewed by Dean Jackson.
1329         
1330         After r169972 when removing the mask, we could destroy the mask
1331         layer before the call into m_graphicsLayer->setMaskLayer(), which would
1332         try to call functions on the old mask. Fix by clearing the mask layer
1333         on the GraphicsLayer before the mask layer gets destroyed.
1334
1335         Test: compositing/masks/toggle-mask.html
1336
1337         * rendering/RenderLayerBacking.cpp:
1338         (WebCore::RenderLayerBacking::updateConfiguration):
1339         (WebCore::RenderLayerBacking::updateMaskLayer):
1340         * rendering/RenderLayerBacking.h:
1341
1342 2014-06-20  Andreas Kling  <akling@apple.com>
1343
1344         [Cocoa] Release freed up blocks from the JS heap after simulated memory pressure.
1345         <https://webkit.org/b/134112>
1346
1347         Reviewed by Mark Hahnenberg.
1348
1349         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1350         (WebCore::MemoryPressureHandler::install):
1351
1352 2014-06-20  Zalan Bujtas  <zalan@apple.com>
1353
1354         Remove redundant RenderLayer::computeOffsetFromRoot() function.
1355         https://bugs.webkit.org/show_bug.cgi?id=134088
1356
1357         Reviewed by Benjamin Poulain.
1358
1359         No change in functionality.
1360
1361         * rendering/RenderLayer.cpp:
1362         (WebCore::RenderLayer::calculateClipRects):
1363         (WebCore::RenderLayer::computeOffsetFromRoot): Deleted.
1364         * rendering/RenderLayer.h:
1365
1366 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
1367
1368         [iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord previews)
1369         https://bugs.webkit.org/show_bug.cgi?id=134085
1370         <rdar://problem/16440586>
1371
1372         Reviewed by Tim Horton.
1373         
1374         When nodes were detached from the scrolling tree, we would previously throw away
1375         all descendant nodes, expecting that they would be re-attached as we walk the compositing
1376         layer tree in RenderLayerCompositor.
1377         
1378         However, this doesn't work across frame boundaries; the subframe may never update
1379         its compositing layers again, so would lose all its scrolling nodes.
1380         
1381         Fix by having ScrollingStateTree::detachNode() by default set aside subframe nodes
1382         into a hash map. On reattach, we'll look in the hash map and pull out an existing node
1383         (with its children intact) if possible.
1384
1385         Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html
1386                platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html
1387                platform/mac-wk2/tiled-drawing/scrolling/frames/remove-coordinated-frame.html
1388
1389         * page/scrolling/ScrollingStateNode.cpp:
1390         (WebCore::ScrollingStateNode::ScrollingStateNode):
1391         * page/scrolling/ScrollingStateTree.cpp:
1392         (WebCore::ScrollingStateTree::attachNode):
1393         (WebCore::ScrollingStateTree::detachNode):
1394         (WebCore::ScrollingStateTree::clear):
1395         (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
1396         (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
1397         * page/scrolling/ScrollingStateTree.h:
1398         * page/scrolling/ScrollingTree.cpp:
1399         (WebCore::ScrollingTree::commitNewTreeState): Go back to removing the deleted
1400         nodes from m_nodeMap first.
1401         (WebCore::ScrollingTree::removeDestroyedNodes): There is no need for this to
1402         actually make use of ScrollingTreeNode* any more; the ASSERT(!node->parent())
1403         is bogus because it can fire when whole subtrees are removed, and to clear the
1404         latched node we just need the ID.
1405
1406 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
1407
1408         Handle scrolling tree modifications which remove intermediate nodes
1409         https://bugs.webkit.org/show_bug.cgi?id=134082
1410
1411         Reviewed by Tim Horton.
1412
1413         When updating the scrolling tree from the state tree, we failed to maintain
1414         the children arrays correctly. Fix by removing all children on scrolling nodes,
1415         and allowing the calls on children to add them back. A temporary hash map
1416         keeps the nodes alive.
1417         
1418         The state tree's m_nodesRemovedSinceLastCommit was also made into a HashSet,
1419         to make it easier to handle removal followed by re-insertion.
1420
1421         * WebCore.exp.in:
1422         * page/scrolling/ScrollingStateTree.cpp:
1423         (WebCore::ScrollingStateTree::attachNode): If a node is (possibly re-)added,
1424         remove it from m_nodesRemovedSinceLastCommit.remove.
1425         (WebCore::ScrollingStateTree::willRemoveNode):
1426         (WebCore::ScrollingStateTree::setRemovedNodes):
1427         * page/scrolling/ScrollingStateTree.h:
1428         (WebCore::ScrollingStateTree::removedNodes):
1429         * page/scrolling/ScrollingTree.cpp:
1430         (WebCore::ScrollingTree::commitNewTreeState):
1431         (WebCore::ScrollingTree::updateTreeFromStateNode): Clean up to have only one call
1432         to updateBeforeChildren(), and remove all children from the scrolling node
1433         before visiting state children.
1434         (WebCore::ScrollingTree::removeDestroyedNodes): It was very wrong to assume
1435         that all non-root nodes were parented in the root! Now we don't need to
1436         remove from the parent anyway.
1437         * page/scrolling/ScrollingTree.h:
1438         * page/scrolling/ScrollingTreeNode.h:
1439         (WebCore::ScrollingTreeNode::children):
1440
1441 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
1442
1443         Make ScrollingTreeNodes refounted, for easier tree reconfiguration
1444         https://bugs.webkit.org/show_bug.cgi?id=134075
1445
1446         Reviewed by Tim Horton.
1447
1448         Make ScrollingTreeNode be ref-counted.
1449
1450         * page/scrolling/AsyncScrollingCoordinator.h:
1451         * page/scrolling/ScrollingTree.cpp:
1452         (WebCore::ScrollingTree::handleWheelEvent):
1453         (WebCore::ScrollingTree::updateTreeFromStateNode):
1454         * page/scrolling/ScrollingTree.h:
1455         (WebCore::ScrollingTree::rootNode):
1456         * page/scrolling/ScrollingTreeNode.cpp:
1457         (WebCore::ScrollingTreeNode::appendChild):
1458         * page/scrolling/ScrollingTreeNode.h:
1459         * page/scrolling/ThreadedScrollingTree.cpp:
1460         (WebCore::ThreadedScrollingTree::createNode):
1461         * page/scrolling/ThreadedScrollingTree.h:
1462         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
1463         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
1464         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
1465         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
1466         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
1467         (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
1468         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1469         (WebCore::ScrollingTreeIOS::createNode):
1470         * page/scrolling/ios/ScrollingTreeIOS.h:
1471         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1472         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1473         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
1474         * page/scrolling/mac/ScrollingTreeFixedNode.h:
1475         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1476         (WebCore::ScrollingTreeFixedNode::create):
1477         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1478         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1479         (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
1480         * page/scrolling/mac/ScrollingTreeStickyNode.h:
1481         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1482         (WebCore::ScrollingTreeStickyNode::create):
1483
1484 2014-06-20  Enrica Casucci  <enrica@apple.com>
1485
1486         iOS build fix after http://trac.webkit.org/changeset/170167.
1487
1488         Reviewed by Geoff Garen.
1489
1490         * bindings/js/JSDeviceMotionEventCustom.cpp:
1491         * bindings/js/JSDeviceOrientationEventCustom.cpp:
1492
1493 2014-06-19  Pratik Solanki  <psolanki@apple.com>
1494
1495         Enable synchronous willSendRequest on iOS
1496         https://bugs.webkit.org/show_bug.cgi?id=134081
1497         <rdar://problem/17350927>
1498
1499         Reviewed by Andreas Kling.
1500
1501         We lost the call to make willSendrequest callbacks be synchronous if possible during code
1502         refactoring. The call is present in ResourceHandleMac.mm but that code is not called when
1503         we use the CFNetwork based loader. Call the SPI in setupRequest().
1504
1505         No new tests because existing tests should cover this functionality.
1506
1507         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1508         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
1509         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
1510
1511 2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1512
1513         [GTK] Do not build quota files when QUOTA is disabled
1514         https://bugs.webkit.org/show_bug.cgi?id=134101
1515
1516         Reviewed by Philippe Normand.
1517
1518         * CMakeLists.txt: Remove exception for GTK+ that is no longer
1519         required since r170173.
1520         * PlatformGTK.cmake: Generate GObject DOM bindings for Quota when enabled.
1521
1522 2014-06-20  Manuel Rego Casasnovas  <rego@igalia.com>
1523
1524         [CSS Grid Layout] Add GridSpan::iterator
1525         https://bugs.webkit.org/show_bug.cgi?id=134058
1526
1527         Reviewed by Bem Jones-Bey.
1528
1529         Once that GridResolvedPosition has been introduced in r169934, this
1530         patch adds a GridSpan::iterator which allows to simplify the loops over
1531         GridResolvedPositions.
1532         From now on we could use range-based for loops.
1533
1534         No new tests as it is already covered by current tests
1535         (fast/css-grid-layout/).
1536
1537         * rendering/RenderGrid.cpp:
1538         (WebCore::RenderGrid::computeNormalizedFractionBreadth): Change loop to
1539         ranged-based for.
1540         (WebCore::RenderGrid::insertItemIntoGrid): Ditto.
1541         (WebCore::RenderGrid::gridAreaBreadthForChild): Ditto.
1542         * rendering/style/GridCoordinate.h: Define GridSpan::iterator.
1543         (WebCore::GridSpan::begin): Return resolved initial position.
1544         (WebCore::GridSpan::end): Return next to resolved final position.
1545         * rendering/style/GridResolvedPosition.h:
1546         (WebCore::GridResolvedPosition::operator*): Add operator required by
1547         range-based for loops.
1548         (WebCore::GridResolvedPosition::operator!=): Add not equal operator.
1549
1550 2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1551
1552         Unreviewed. Fix GTK+ debug build after r170174.
1553
1554         * bindings/gobject/WebKitDOMNodeFilter.cpp:
1555         (WebKit::nodeFilterObjectDestroyedCallback):
1556
1557 2014-06-20  Tim Horton  <timothy_horton@apple.com>
1558
1559         LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
1560         https://bugs.webkit.org/show_bug.cgi?id=134050
1561         <rdar://problem/17315114>
1562
1563         Reviewed by Simon Fraser.
1564
1565         * WebCore.exp.in:
1566         * WebCore.xcodeproj/project.pbxproj:
1567         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1568         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1569         Drain all LayerPools upon memory pressure.
1570
1571         * platform/graphics/ca/LayerPool.cpp:
1572         (WebCore::LayerPool::LayerPool):
1573         (WebCore::LayerPool::~LayerPool):
1574         (WebCore::LayerPool::allLayerPools):
1575         (WebCore::LayerPool::sharedPool): Deleted.
1576         * platform/graphics/ca/LayerPool.h:
1577         * platform/graphics/ca/PlatformCALayer.cpp:
1578         (WebCore::PlatformCALayer::createCompatibleLayerWithSize):
1579         Add createCompatibleLayerWithSize, which optionally tries to take said layer from the LayerPool.
1580
1581         (WebCore::PlatformCALayer::moveToLayerPool):
1582         Add moveToLayerPool, which moves the layer to the LayerPool.
1583
1584         (WebCore::PlatformCALayer::layerPool):
1585         The LayerPool for each layer is obtained via PlatformCALayer::layerPool(), which subclasses can override for special behaviors.
1586         The base class uses a global LayerPool.
1587
1588         * platform/graphics/ca/PlatformCALayer.h:
1589         * platform/graphics/ca/TileController.cpp:
1590         (WebCore::TileController::createTileLayer):
1591         * platform/graphics/ca/TileGrid.cpp:
1592         (WebCore::TileGrid::removeTiles):
1593
1594 2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1595
1596         [GTK] webkit_dom_document_create_tree_walker impossible to use due to WebKitDOMNodeFilter
1597         https://bugs.webkit.org/show_bug.cgi?id=93002
1598
1599         Reviewed by Gustavo Noronha Silva.
1600
1601         Add custom implementation of WebKitDOMNodeFilter to expose it as
1602         an interface instead of a class.
1603
1604         * PlatformGTK.cmake: Add new files to compilation.
1605         * bindings/gobject/GObjectNodeFilterCondition.cpp: Added.
1606         (WebCore::GObjectNodeFilterCondition::~GObjectNodeFilterCondition):
1607         Reset the NodeFilter WebCore object associated to the
1608         WebKitDOMNodeFilter object.
1609         (WebCore::GObjectNodeFilterCondition::acceptNode): Call webkit_dom_node_filter_accept_node().
1610         * bindings/gobject/GObjectNodeFilterCondition.h: Added.
1611         (WebCore::GObjectNodeFilterCondition::create): Create a new
1612         GObjectNodeFilterCondition for the given WebKitDOMNodeFilter.
1613         (WebCore::GObjectNodeFilterCondition::GObjectNodeFilterCondition):
1614         * bindings/gobject/WebKitDOMNodeFilter.cpp: Added.
1615         (webkit_dom_node_filter_default_init):
1616         (webkit_dom_node_filter_accept_node):
1617         (WebKit::nodeFilterMap): Map NodeFilter WebCore objects to
1618         WebKitDOMNodeFilter objects.
1619         (WebKit::nodeFilterObjectDestroyedCallback): Remove the node
1620         filter form the map when the WebKitDOMNodeFilter objecrt is destroyed.
1621         (WebKit::kit): Return the WebKitDOMNodeFilter object for the given
1622         NodeFilter WebCore object.
1623         (WebKit::core): Get or create a NodeFilter WebCore object
1624         associated to the given WebKitDOMNodeFilter.
1625         * bindings/gobject/WebKitDOMNodeFilter.h: Added.
1626         * bindings/gobject/WebKitDOMNodeFilter.symbols: Added.
1627         * bindings/gobject/WebKitDOMNodeFilterPrivate.h: Added.
1628         * bindings/scripts/CodeGeneratorGObject.pm:
1629         (GenerateFunction): Add exceptions for NodeFilter parameters since
1630         the core method returns a PassRefPtr.
1631
1632 2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1633
1634         [GTK] Limit the amount of API exposed to GObject DOM bindings API
1635         https://bugs.webkit.org/show_bug.cgi?id=133726
1636
1637         Reviewed by Gustavo Noronha Silva.
1638
1639         Split the GObject DOM bindings API into stable and unstable. The
1640         unstable API is not included in the main webkitdom.h file, so that
1641         to use it users have to include the headers individually and
1642         define a macro WEBKIT_DOM_USE_UNSTABLE_API. For unstable methods
1643         of stable classes we generate a {ClassName}Unstable.h header file
1644         containing the unstable API. From now on we only keep backwards
1645         compatibility for the stable API.
1646
1647         * PlatformGTK.cmake: Split GObject DOM bindings related variables
1648         into Stable and Unstable. Add also
1649         * bindings/gobject/WebKitDOMCustom.cpp:
1650         (webkit_dom_html_media_element_set_current_time): Deleted.
1651         (webkit_dom_text_track_get_kind): Deleted.
1652         (webkit_dom_text_track_get_mode): Deleted.
1653         (webkit_dom_text_track_set_mode): Deleted.
1654         * bindings/gobject/WebKitDOMCustom.h:
1655         * bindings/gobject/WebKitDOMCustom.symbols: Remove custom symbols
1656         added due to API changes.
1657         * bindings/gobject/WebKitDOMPrivate.h: Include webkitdomdefines-unstable.h.
1658         * bindings/gobject/webkitdom.symbols: Remove all unstable symbols.
1659         * bindings/scripts/CodeGeneratorGObject.pm:
1660         (SkipFunction): Do not skip webkit_dom_html_media_element_set_current_time anymore.
1661         (GenerateHeader): Only force single header include for stable
1662         headers and add WEBKIT_DOM_USE_UNSTABLE_API #ifdef to unstable headers.
1663         (GenerateFunction): Only add stable symbols to the symbols
1664         array. Add function prototypes to main header or unstable header
1665         depending on whether it's an unstable symbol for a stable class or
1666         not. Also add Stability gtk-doc tag to unstable methods.
1667         (GenerateEndHeader): Add required #endifs
1668         (WriteData): Write also an Unstable.h header when appropriate and
1669         only generate a symbols file for stable classes.
1670         (ReadStableSymbols): Read the stable symbols for the current class.
1671         (GenerateInterface): Call ReadStableSymbols.
1672         * bindings/scripts/gobject-generate-headers.pl: Generate webkitdomdefines-unstable.h.
1673         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
1674         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1675         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
1676         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
1677         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
1678         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
1679         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
1680         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
1681         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
1682         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
1683         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
1684         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
1685         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1686         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
1687         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
1688         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
1689         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
1690         * bindings/scripts/test/GObject/WebKitDOMreadonly.h:
1691
1692 2014-06-19  Andreas Kling  <akling@apple.com>
1693
1694         When simulating memory pressure, GC *after* releasing WebCore resources.
1695
1696         Since clearing the page cache is likely to create lots of garbage, defer the
1697         synchronous GC until after the WebCore pressure relief, so we can see the
1698         effect of clearing out all those pages.
1699
1700         Rubber-stamped by Gavin Barraclough.
1701
1702         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1703         (WebCore::MemoryPressureHandler::install):
1704
1705 2014-06-18  Sam Weinig  <sam@webkit.org>
1706
1707         Move generate prototype and constructor classes into the generated implementation files
1708         https://bugs.webkit.org/show_bug.cgi?id=134054
1709
1710         Reviewed by Oliver Hunt.
1711
1712         In an effort to reduce the size of the generated bindings headers, which is important
1713         as the generated headers get included in a lot of places, this patch moves the prototype
1714         and constructor declarations from the header to implementation file. This works because,
1715         for the most part, no code cares about the prototype or constructors except the instance.
1716
1717         There are a few exceptions which had to be accounted for:
1718         - The global objects (JSDOMWindow and JSWorkerGlobalScope) need to have their prototypes
1719           available during initialization, so they remain in the header.
1720         - JSLocation requires customizing some aspects of the prototype behavior, so its prototype,
1721           and any future class that uses JSCustomNamedGetterOnPrototype or JSCustomDefineOwnPropertyOnPrototype,
1722           remains in the header.
1723         - A few classes had custom constructor functions. Instead of keeping the entire constructor
1724           in the header, I opted for pulling just the static constructor function into the header, and
1725           modifying the custom constructors to use the DOMConstructorObject type as the callee, since the
1726           more specific type was unnecessary.
1727
1728         As a result of making these changes, I was also able to remove the #include of JSDOMBinding.h from
1729         all the headers, which brought in quite a bit.
1730
1731         * bindings/js/JSAudioContextCustom.cpp:
1732         (WebCore::constructJSAudioContext):
1733         (WebCore::JSAudioContextConstructor::constructJSAudioContext): Deleted.
1734         * bindings/js/JSBlobCustom.cpp:
1735         (WebCore::constructJSBlob):
1736         (WebCore::JSBlobConstructor::constructJSBlob): Deleted.
1737         * bindings/js/JSCryptoCustom.cpp:
1738         * bindings/js/JSDOMFormDataCustom.cpp:
1739         (WebCore::constructJSDOMFormData):
1740         (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): Deleted.
1741         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
1742         * bindings/js/JSDOMPluginArrayCustom.cpp:
1743         * bindings/js/JSDOMPluginCustom.cpp:
1744         * bindings/js/JSDataCueCustom.cpp:
1745         (WebCore::constructJSDataCue):
1746         (WebCore::JSDataCueConstructor::constructJSDataCue): Deleted.
1747         * bindings/js/JSDataTransferCustom.cpp:
1748         * bindings/js/JSEventCustom.cpp:
1749         * bindings/js/JSFileReaderCustom.cpp:
1750         * bindings/js/JSHistoryCustom.cpp:
1751         * bindings/js/JSIDBAnyCustom.cpp:
1752         * bindings/js/JSIDBDatabaseCustom.cpp:
1753         * bindings/js/JSIDBObjectStoreCustom.cpp:
1754         * bindings/js/JSImageConstructor.cpp:
1755         (WebCore::JSImageConstructor::finishCreation):
1756         * bindings/js/JSImageDataCustom.cpp:
1757         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1758         * bindings/js/JSLocationCustom.cpp:
1759         * bindings/js/JSMessagePortCustom.cpp:
1760         * bindings/js/JSMutationObserverCustom.cpp:
1761         (WebCore::constructJSMutationObserver):
1762         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Deleted.
1763         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1764         * bindings/js/JSSQLTransactionSyncCustom.cpp:
1765         * bindings/js/JSSVGLengthCustom.cpp:
1766         * bindings/js/JSSharedWorkerCustom.cpp:
1767         (WebCore::constructJSSharedWorker):
1768         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Deleted.
1769         * bindings/js/JSStorageCustom.cpp:
1770         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
1771         * bindings/js/JSWebKitPointCustom.cpp:
1772         (WebCore::constructJSWebKitPoint):
1773         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): Deleted.
1774         * bindings/js/JSWorkerCustom.cpp:
1775         (WebCore::constructJSWorker):
1776         (WebCore::JSWorkerConstructor::constructJSWorker): Deleted.
1777         * bindings/js/SerializedScriptValue.cpp:
1778         * bindings/scripts/CodeGeneratorJS.pm:
1779         (GenerateHeader):
1780         (GenerateImplementation):
1781         (GeneratePrototypeDeclaration):
1782         (GenerateConstructorDeclaration):
1783         (GenerateConstructorHelperMethods):
1784         (HeaderNeedsPrototypeDeclaration):
1785         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1786         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1787         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1788         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1789         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1790         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1791         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1792         * bindings/scripts/test/JS/JSTestEventTarget.h:
1793         * bindings/scripts/test/JS/JSTestException.cpp:
1794         * bindings/scripts/test/JS/JSTestException.h:
1795         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1796         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1797         * bindings/scripts/test/JS/JSTestInterface.cpp:
1798         * bindings/scripts/test/JS/JSTestInterface.h:
1799         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1800         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1801         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1802         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1803         * bindings/scripts/test/JS/JSTestNode.cpp:
1804         * bindings/scripts/test/JS/JSTestNode.h:
1805         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1806         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1807         * bindings/scripts/test/JS/JSTestObj.cpp:
1808         * bindings/scripts/test/JS/JSTestObj.h:
1809         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1810         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1811         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1812         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1813         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1814         * bindings/scripts/test/JS/JSTestTypedefs.h:
1815         * bindings/scripts/test/JS/JSattribute.cpp:
1816         * bindings/scripts/test/JS/JSattribute.h:
1817         * bindings/scripts/test/JS/JSreadonly.cpp:
1818         * bindings/scripts/test/JS/JSreadonly.h:
1819
1820
1821 2014-06-19  peavo@outlook.com  <peavo@outlook.com>
1822
1823         [Curl] Compile errors related to http header field names.
1824         https://bugs.webkit.org/show_bug.cgi?id=134029
1825
1826         Reviewed by Brent Fulgham.
1827
1828         Http header field names should now be specified with an enum, not a string.
1829
1830         * platform/network/curl/MultipartHandle.cpp:
1831         (WebCore::MultipartHandle::didReceiveResponse):
1832         * platform/network/curl/ResourceHandleManager.cpp:
1833         (WebCore::getProtectionSpace):
1834
1835 2014-06-19  Anders Carlsson  <andersca@apple.com>
1836
1837         Put the divider in the right place.
1838
1839         * DerivedSources.make:
1840
1841 2014-06-19  Anders Carlsson  <andersca@apple.com>
1842
1843         Address a review comment from Darin.
1844
1845         * inspector/InspectorResourceAgent.cpp:
1846         (WebCore::InspectorResourceAgent::willLoadXHR):
1847
1848 2014-06-19  Anders Carlsson  <andersca@apple.com>
1849
1850         Simplify two HistoryController member functions
1851         https://bugs.webkit.org/show_bug.cgi?id=134064
1852
1853         Reviewed by Dan Bernstein.
1854
1855         Remove the FrameLoadType parameter from recursiveSetProvisionalItem,
1856         use early returns and modern loops.
1857
1858         * loader/HistoryController.cpp:
1859         (WebCore::HistoryController::goToItem):
1860         (WebCore::HistoryController::recursiveSetProvisionalItem):
1861         (WebCore::HistoryController::recursiveGoToItem):
1862         * loader/HistoryController.h:
1863
1864 2014-06-19  David Kilzer  <ddkilzer@apple.com>
1865
1866         MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
1867         <http://webkit.org/b/134052>
1868
1869         Reviewed by Eric Carlson.
1870
1871         Fixes the following static analyzer warning:
1872
1873             WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:688:43: warning: Potential leak of an object stored into 'outOfBandTracks'
1874                     NSMutableArray* outOfBandTracks = [[NSMutableArray alloc] init];
1875                                                       ^
1876
1877         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1878         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
1879         Use RetainPtr<NSMutableArray> to prevent a leak.  Use
1880         Objective-C literals to clean up the code.
1881
1882 2014-06-18  Zan Dobersek  <zdobersek@igalia.com>
1883
1884         ScriptExecutionContext::Task, FileThread::Task parameters should be values
1885         https://bugs.webkit.org/show_bug.cgi?id=134035
1886
1887         Reviewed by Anders Carlsson.
1888
1889         r170106 and similar previous changesets enforced ScriptExecutionContext::Task and
1890         FileThread::Task parameters as rvalue references. There's technically nothing wrong
1891         with that, but since both classes are move-only it is also not strictly required.
1892         Accepting these parameters as values is more common in C++ value semantics as well.
1893
1894         * dom/Document.cpp:
1895         (WebCore::Document::postTask):
1896         * dom/Document.h:
1897         * dom/ScriptExecutionContext.h:
1898         * fileapi/FileThread.cpp:
1899         (WebCore::FileThread::postTask):
1900         * fileapi/FileThread.h:
1901         * workers/DefaultSharedWorkerRepository.cpp:
1902         (WebCore::SharedWorkerProxy::postTaskToLoader):
1903         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
1904         * workers/WorkerGlobalScope.cpp:
1905         (WebCore::WorkerGlobalScope::postTask):
1906         * workers/WorkerGlobalScope.h:
1907         * workers/WorkerLoaderProxy.h:
1908         * workers/WorkerMessagingProxy.cpp:
1909         (WebCore::WorkerMessagingProxy::postTaskToLoader):
1910         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
1911         * workers/WorkerMessagingProxy.h:
1912         * workers/WorkerRunLoop.cpp:
1913         (WebCore::WorkerRunLoop::postTask):
1914         (WebCore::WorkerRunLoop::postTaskAndTerminate):
1915         (WebCore::WorkerRunLoop::postTaskForMode):
1916         (WebCore::WorkerRunLoop::Task::create):
1917         (WebCore::WorkerRunLoop::Task::Task):
1918         * workers/WorkerRunLoop.h:
1919
1920 2014-06-18  James Craig  <jcraig@apple.com>
1921
1922         Web Inspector: AXI: expose aria-relevant
1923         https://bugs.webkit.org/show_bug.cgi?id=130913
1924
1925         Reviewed by Joseph Pecoraro.
1926
1927         Expose ARIA live region relevance in Web Inspector.
1928         E.g. "Live: Assertive (Additions, Text)"
1929
1930         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html
1931
1932         * inspector/InspectorDOMAgent.cpp:
1933         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): Support for liveRegionRelevant.
1934         * inspector/protocol/DOM.json: Defined enum values and array passed to client.
1935
1936 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
1937
1938         Add rebeccapurple to CSS named color list
1939         https://bugs.webkit.org/show_bug.cgi?id=133804
1940
1941         Reviewed by Jer Noble.
1942
1943         Add the named color "rebeccapurple" (#639).
1944
1945         * css/SVGCSSValueKeywords.in:
1946         * platform/ColorData.gperf:
1947
1948 2014-06-11  Jeffrey Pfau  <jpfau@apple.com>
1949
1950         Fix flaky beforeload tests
1951         https://bugs.webkit.org/show_bug.cgi?id=133685
1952
1953         Reviewed by David Kilzer.
1954
1955         * loader/FrameLoader.cpp:
1956         (WebCore::FrameLoader::loadURL):
1957
1958 2014-06-18  Anders Carlsson  <andersca@apple.com>
1959
1960         Make FrameLoadType a strongly typed enum
1961         https://bugs.webkit.org/show_bug.cgi?id=134047
1962
1963         Reviewed by Andreas Kling.
1964
1965         * history/BackForwardController.cpp:
1966         (WebCore::BackForwardController::goBackOrForward):
1967         (WebCore::BackForwardController::goBack):
1968         (WebCore::BackForwardController::goForward):
1969         * history/PageCache.cpp:
1970         (WebCore::logCanCachePageDecision):
1971         (WebCore::PageCache::canCache):
1972         * loader/FrameLoader.cpp:
1973         (WebCore::isBackForwardLoadType):
1974         (WebCore::FrameLoader::FrameLoader):
1975         (WebCore::FrameLoader::loadURLIntoChildFrame):
1976         (WebCore::FrameLoader::prepareForLoadStart):
1977         (WebCore::FrameLoader::loadFrameRequest):
1978         (WebCore::FrameLoader::loadURL):
1979         (WebCore::FrameLoader::load):
1980         (WebCore::FrameLoader::reloadWithOverrideEncoding):
1981         (WebCore::FrameLoader::reload):
1982         (WebCore::FrameLoader::commitProvisionalLoad):
1983         (WebCore::FrameLoader::transitionToCommitted):
1984         (WebCore::FrameLoader::isReplacing):
1985         (WebCore::FrameLoader::setReplacing):
1986         (WebCore::FrameLoader::subresourceCachePolicy):
1987         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1988         (WebCore::FrameLoader::addExtraFieldsToRequest):
1989         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1990         (WebCore::FrameLoader::shouldPerformFragmentNavigation):
1991         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1992         (WebCore::FrameLoader::loadDifferentDocumentItem):
1993         * loader/FrameLoaderTypes.h:
1994         * loader/HistoryController.cpp:
1995         (WebCore::HistoryController::restoreDocumentState):
1996         (WebCore::HistoryController::updateForReload):
1997         (WebCore::HistoryController::isReplaceLoadTypeWithProvisionalItem):
1998         (WebCore::HistoryController::isReloadTypeWithProvisionalItem):
1999         * loader/NavigationAction.cpp:
2000         (WebCore::navigationType):
2001         * loader/PolicyChecker.cpp:
2002         (WebCore::PolicyChecker::PolicyChecker):
2003         (WebCore::PolicyChecker::checkNavigationPolicy):
2004         * loader/cache/CachedResourceLoader.cpp:
2005         (WebCore::CachedResourceLoader::cachePolicy):
2006         * loader/icon/IconController.cpp:
2007         (WebCore::IconController::startLoader):
2008
2009 2014-06-18  Alex Christensen  <achristensen@webkit.org>
2010
2011         [curl] Unreviewed speculative build fix after r170021.
2012
2013         * platform/network/curl/CurlCacheEntry.cpp:
2014         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
2015         (WebCore::CurlCacheEntry::parseResponseHeaders):
2016         * platform/network/curl/CurlDownload.cpp:
2017         (WebCore::CurlDownload::didReceiveHeader):
2018         * platform/network/curl/ResourceHandleManager.cpp:
2019         (WebCore::getProtectionSpace):
2020         (WebCore::headerCallback):
2021         Use HTTPHeaderName constants.
2022
2023 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
2024
2025         Move the removeNode() tree walking from ScrollingStateNote into ScrollingStateTree
2026         https://bugs.webkit.org/show_bug.cgi?id=134043
2027
2028         Reviewed by Beth Dakin.
2029
2030         It's cleaner if ScrollingStateTree does the descendant walk when removing nodes.
2031         We can simply start the "willBeRemoved" walk at the node in question.
2032         
2033         Have willRemoveNode() just remove the node from the m_stateNodeMap directly, rather
2034         than this happening in a separate walk of m_nodesRemovedSinceLastCommit.
2035
2036         * page/scrolling/ScrollingStateNode.cpp:
2037         (WebCore::ScrollingStateNode::removeDescendant): Deleted.
2038         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree): Deleted.
2039         * page/scrolling/ScrollingStateNode.h:
2040         * page/scrolling/ScrollingStateTree.cpp:
2041         (WebCore::ScrollingStateTree::attachNode):
2042         (WebCore::ScrollingStateTree::detachNode):
2043         (WebCore::ScrollingStateTree::clear):
2044         (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
2045         (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
2046         (WebCore::ScrollingStateTree::willRemoveNode):
2047         (WebCore::ScrollingStateTree::removeNode): Deleted.
2048         * page/scrolling/ScrollingStateTree.h:
2049
2050 2014-06-18  Alex Christensen  <achristensen@webkit.org>
2051
2052         [iOS WebGL] Fixed WEBGL_compressed_texture_pvrtc.
2053         https://bugs.webkit.org/show_bug.cgi?id=133561
2054         
2055         Based on Blink r153971 by bajones@chromium.org.
2056
2057         Reviewed by Dean Jackson.
2058
2059         No new tests, but this should fix webgl-compressed-texture-pvrtc.html.
2060
2061         * html/canvas/WebGLRenderingContext.cpp:
2062         (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
2063         (WebCore::WebGLRenderingContext::validateCompressedTexSubDimensions):
2064         Added checks for pvrtc.
2065
2066 2014-06-18  Anders Carlsson  <andersca@apple.com>
2067
2068         Work around a Windows compiler crash.
2069
2070         * loader/archive/cf/LegacyWebArchive.cpp:
2071         (WebCore::LegacyWebArchive::createFromSelection):
2072
2073 2014-06-18  Benjamin Poulain  <benjamin@webkit.org>
2074
2075         Subtrees with :first-child and :last-child are not invalidated when siblings are added/removed
2076         https://bugs.webkit.org/show_bug.cgi?id=133934
2077
2078         Reviewed by Antti Koivisto.
2079
2080         When adding/removing nodes on an element, we try to invalidate only the elements that are
2081         affected. In the case of :first-child and :last-child, that optimizations is implemented
2082         through two types of flags that are updated during style resolution.
2083
2084         The first flag is childrenAffectedByFirstChildRules (childrenAffectedByLastChildRules),
2085         set on the parent of any element that could be affected by :first-child (:last-child).
2086
2087         The other part of the optimization is marking the style itself with firstChildState (lastChildState)
2088         to further reduce invalidations.
2089
2090         The problem in this case happen with a subtree of element is detached. Since there is no renderer,
2091         the computed style is resolved ad-hoc and stored directly on the element. When the element is moved,
2092         the computed style was never cleared because the invalidation optimizations were not handling
2093         elements without style.
2094
2095         Credit to Yusuke Suzuki for discovering the issue and creating test cases.
2096
2097         Tests: fast/css/getComputedStyle/empty-update-without-renderer.html
2098                fast/css/getComputedStyle/first-child-update-without-renderer.html
2099                fast/css/getComputedStyle/last-child-update-without-renderer.html
2100
2101         * dom/Element.cpp:
2102         (WebCore::checkForEmptyStyleChange):
2103         Clean up: pull the style directly from the function instead of expection the call sites to do that.
2104         Refine the checks to avoid invalidation.
2105
2106         (WebCore::checkForSiblingStyleChanges):
2107         Do not early return if the parent is detached, the children may still need invalidation.
2108
2109         When there is no renderer, assume the worst first-child/last-child and force the invalidation.
2110
2111         (WebCore::Element::childrenChanged):
2112
2113 2014-06-18  Daniel Bates  <dabates@apple.com>
2114
2115         REGRESSION (r167856): Unable to log into HSBC app
2116         https://bugs.webkit.org/show_bug.cgi?id=133991
2117         <rdar://problem/17044839>
2118
2119         Reviewed by David Kilzer.
2120
2121         Following <http://trac.webkit.org/changeset/167856> we disallow "navigation to any URL that is
2122         invalid, except for JavaScript URLs, which need not be valid." A byproduct of this policy
2123         decision is that we no longer notify the WebKit client to about a navigation if the destination
2124         URL is invalid. And some apps, including the HSBC app for iOS, have logic to intercept URLs
2125         as a means to pass data from their WebView-embedded web app to the WebView. We should expose a
2126         setting called allowNavigationToInvalidURL (disabled by default on all ports and conditionally
2127         enabled on iOS) to toggle whether WebCore allows navigation to any URL, even if its invalid,
2128         so as to not break clients that intercept URLs and have custom logic to handle them.
2129
2130         Tests: fast/loader/allow-redirect-to-invalid-url-using-javascript.html
2131                fast/loader/allow-redirect-to-invalid-url-using-meta-refresh.html
2132                fast/loader/disallow-redirect-to-invalid-url-using-javascript.html
2133                fast/loader/disallow-redirect-to-invalid-url-using-meta-refresh.html
2134
2135         * loader/NavigationScheduler.cpp:
2136         (WebCore::NavigationScheduler::shouldScheduleNavigation): Modified to only validate
2137         the URL when the setting allowNavigationToInvalidURL is disabled.
2138         * page/Settings.in: Added setting allowNavigationToInvalidURL (disabled by default).
2139
2140 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
2141
2142         Make ScrollingStateNodes refcounted, and other minor cleanup
2143         https://bugs.webkit.org/show_bug.cgi?id=134040
2144
2145         Reviewed by Beth Dakin.
2146
2147         Prepare for future scrolling frame gyrations by making
2148         ScrollingStateNodes refcounted.
2149         
2150         Rename ScrollingStateNode::removeChild() to removeDescendant()
2151         since that's what it does. Also rename didRemoveNode() to willRemoveNode()
2152         to better match the behavior.
2153         
2154         Use 'auto' in more places.
2155
2156         * page/scrolling/AsyncScrollingCoordinator.cpp:
2157         (WebCore::AsyncScrollingCoordinator::syncChildPositions):
2158         * page/scrolling/ScrollingStateFixedNode.cpp:
2159         (WebCore::ScrollingStateFixedNode::create):
2160         (WebCore::ScrollingStateFixedNode::clone):
2161         * page/scrolling/ScrollingStateFixedNode.h:
2162         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2163         (WebCore::ScrollingStateFrameScrollingNode::create):
2164         (WebCore::ScrollingStateFrameScrollingNode::clone):
2165         * page/scrolling/ScrollingStateFrameScrollingNode.h:
2166         * page/scrolling/ScrollingStateNode.cpp:
2167         (WebCore::ScrollingStateNode::cloneAndReset):
2168         (WebCore::ScrollingStateNode::appendChild):
2169         (WebCore::ScrollingStateNode::removeDescendant):
2170         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
2171         (WebCore::ScrollingStateNode::removeChild): Deleted.
2172         * page/scrolling/ScrollingStateNode.h:
2173         (WebCore::ScrollingStateNode::children):
2174         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
2175         (WebCore::ScrollingStateOverflowScrollingNode::create):
2176         (WebCore::ScrollingStateOverflowScrollingNode::clone):
2177         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
2178         * page/scrolling/ScrollingStateStickyNode.cpp:
2179         (WebCore::ScrollingStateStickyNode::create):
2180         (WebCore::ScrollingStateStickyNode::clone):
2181         * page/scrolling/ScrollingStateStickyNode.h:
2182         * page/scrolling/ScrollingStateTree.cpp:
2183         (WebCore::ScrollingStateTree::attachNode):
2184         (WebCore::ScrollingStateTree::removeNode):
2185         (WebCore::ScrollingStateTree::willRemoveNode):
2186         (WebCore::ScrollingStateTree::didRemoveNode): Deleted.
2187         * page/scrolling/ScrollingStateTree.h:
2188         (WebCore::ScrollingStateTree::setRootStateNode):
2189         * page/scrolling/ScrollingTree.cpp:
2190         (WebCore::ScrollingTree::updateTreeFromStateNode):
2191
2192 2014-06-18  Anders Carlsson  <andersca@apple.com>
2193
2194         Adopt modern C++11 loops and fix WebArchive creation functions
2195         https://bugs.webkit.org/show_bug.cgi?id=134032
2196
2197         Reviewed by Andreas Kling.
2198
2199         Use modern loops in a couple of places, fix DocumentLoader::subresources() to return a Vector,
2200         and stop using Vectors of PassRefPtrs.
2201
2202         * WebCore.exp.in:
2203         * dom/Document.cpp:
2204         (WebCore::Document::textInserted):
2205         (WebCore::Document::textRemoved):
2206         (WebCore::Document::textNodesMerged):
2207         * loader/DocumentLoader.cpp:
2208         (WebCore::DocumentLoader::subresources):
2209         (WebCore::DocumentLoader::getSubresources): Deleted.
2210         * loader/DocumentLoader.h:
2211         * loader/appcache/ApplicationCache.cpp:
2212         (WebCore::ApplicationCache::dump):
2213         * loader/appcache/ApplicationCache.h:
2214         (WebCore::ApplicationCache::resources):
2215         (WebCore::ApplicationCache::begin): Deleted.
2216         (WebCore::ApplicationCache::end): Deleted.
2217         * loader/appcache/ApplicationCacheGroup.cpp:
2218         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2219         * loader/appcache/ApplicationCacheHost.cpp:
2220         (WebCore::ApplicationCacheHost::fillResourceList):
2221         * loader/appcache/ApplicationCacheStorage.cpp:
2222         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
2223         (WebCore::ApplicationCacheStorage::store):
2224         (WebCore::ApplicationCacheStorage::empty):
2225         (WebCore::ApplicationCacheStorage::storeCopyOfCache):
2226         * loader/archive/cf/LegacyWebArchive.cpp:
2227         (WebCore::LegacyWebArchive::create):
2228         (WebCore::LegacyWebArchive::createFromSelection):
2229         * loader/archive/cf/LegacyWebArchive.h:
2230         * xml/XMLHttpRequestProgressEventThrottle.cpp:
2231         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
2232
2233 2014-06-18  Alex Christensen  <achristensen@webkit.org>
2234
2235         Remove duplicate code using sdiv.
2236         https://bugs.webkit.org/show_bug.cgi?id=133764
2237
2238         Reviewed by Daniel Bates.
2239
2240         * cssjit/SelectorCompiler.cpp:
2241         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
2242         Use template sdiv for apple armv7s and arm64.
2243
2244 2014-06-18  Zan Dobersek  <zdobersek@igalia.com>
2245
2246         ScriptExecutionContext::Task parameters should always be rvalue references
2247         https://bugs.webkit.org/show_bug.cgi?id=133615
2248
2249         Reviewed by Darin Adler.
2250
2251         ScriptExecutionContext::Task parameters should be rvalue references as the
2252         passed-in objects are always ScriptExecutionContext::Task rvalues that were
2253         implicitly constructed from a lambda function or rvalues of objects that
2254         derive from ScriptExecutionContext::Task.
2255
2256         This isn't really necessary since ScriptExecutionContext::Task is non-copyable
2257         and we have to use move semantics anyway, but it makes it clear that these
2258         objects are expiring rvalues that must be properly dealt with.
2259
2260         * dom/Document.cpp:
2261         (WebCore::Document::postTask):
2262         * dom/Document.h:
2263         * dom/ScriptExecutionContext.h:
2264         * workers/DefaultSharedWorkerRepository.cpp:
2265         (WebCore::SharedWorkerProxy::postTaskToLoader):
2266         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
2267         * workers/WorkerGlobalScope.cpp:
2268         (WebCore::WorkerGlobalScope::postTask):
2269         * workers/WorkerGlobalScope.h:
2270         * workers/WorkerLoaderProxy.h:
2271         * workers/WorkerMessagingProxy.cpp:
2272         (WebCore::WorkerMessagingProxy::postTaskToLoader):
2273         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
2274         * workers/WorkerMessagingProxy.h:
2275         * workers/WorkerRunLoop.cpp:
2276         (WebCore::WorkerRunLoop::postTask):
2277         (WebCore::WorkerRunLoop::postTaskAndTerminate):
2278         (WebCore::WorkerRunLoop::postTaskForMode):
2279         (WebCore::WorkerRunLoop::Task::create):
2280         (WebCore::WorkerRunLoop::Task::Task):
2281         * workers/WorkerRunLoop.h:
2282
2283 2014-06-18  peavo@outlook.com  <peavo@outlook.com>
2284
2285         [WinCairo] Compile errors when trying to compile CA code.
2286         https://bugs.webkit.org/show_bug.cgi?id=134030
2287
2288         Reviewed by Simon Fraser.
2289
2290         WinCairo does not USE(CA).
2291
2292         * WebCore.vcxproj/WebCore.vcxproj:
2293         * platform/graphics/ca/TileController.h:
2294
2295 2014-06-17  Tim Horton  <timothy_horton@apple.com>
2296
2297         [iOS][wk2] Use ImageDocument to display subframe PDFs
2298         https://bugs.webkit.org/show_bug.cgi?id=133944
2299         <rdar://problem/17205983>
2300
2301         Reviewed by Dan Bates.
2302
2303         * dom/DOMImplementation.cpp:
2304         (WebCore::DOMImplementation::createDocument):
2305         Make a ImageDocument to show our subframe PDF, if the setting is enabled.
2306
2307         * html/ImageDocument.cpp:
2308         (WebCore::ImageDocument::finishedParsing):
2309         (WebCore::ImageDocument::createDocumentStructure):
2310         Set the ResourceResponse on the ImageElement upon creation, instead of
2311         when the load finishes. This way, when the internal CachedImage creates
2312         its Image, it can have the correct MIME type for the response, and can
2313         make a PDFDocumentImage if necessary.
2314
2315         We never noticed this before because CachedImage falls back to making a
2316         BitmapImage, and that was the only case that was normally used.
2317
2318         Throw an explicit white background behind PDF ImageDocuments; PDFDocumentImage
2319         paints with a transparent background, but when used as an ImageDocument
2320         it seems reasonable to assume that there should be a white page background
2321         (similar to what PDFPlugin and friends do).
2322
2323         * loader/DocumentWriter.cpp:
2324         (WebCore::DocumentWriter::createDocument):
2325         Don't make a PDFDocument if we want to use an ImageDocument for this subframe PDF.
2326
2327         * page/Settings.in:
2328
2329         * platform/MIMETypeRegistry.cpp:
2330         (WebCore::MIMETypeRegistry::isPDFMIMEType):
2331         * platform/MIMETypeRegistry.h:
2332         Expose the already implemented pdfMIMETypes table just like all the rest.
2333
2334 2014-06-17  Ryuan Choi  <ryuan.choi@samsung.com>
2335
2336         Unreviewed build fix with ENABLE_NOSNIFF after r170021
2337
2338         * loader/cache/CachedScript.cpp:
2339         (WebCore::CachedScript::mimeTypeAllowedByNosniff):
2340
2341 2014-06-17  Jeremy Jones  <jeremyj@apple.com>
2342
2343         Improve enter and exit fullscreen transition by using two step transition.
2344         https://bugs.webkit.org/show_bug.cgi?id=133706
2345
2346         Reviewed by Simon Fraser.
2347
2348         setupFullscreen, creates the fullscreen views ready to receive the video layer.
2349         Once they are in place, didSetupFullscreen will move the video layer into the 
2350         new view hierarchy and initiate enterFullscreen to animate.
2351
2352         Reverse process for exit fullscreen.
2353
2354         * WebCore.exp.in: Add exports.
2355         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2356         (-[WebVideoFullscreenController enterFullscreen:]):
2357         Refactor into didSetupFullscreen.
2358         (-[WebVideoFullscreenController didSetupFullscreen]):
2359         Move the video layer once fullscreen is ready to receive it.
2360         (-[WebVideoFullscreenController didExitFullscreen]):
2361         Move the video layer back into we the web page, and initiate cleanup.
2362         (-[WebVideoFullscreenController didCleanupFullscreen]):
2363         Refactord cleanup from didExitFullscreen.
2364         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add delcarations.
2365         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2366         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
2367         Refactored from enterFullscreen. Builds views ready to receive video layer.
2368         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
2369         Animates into fullscreen.
2370         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
2371         Animates from fullscreen. Cleanup is refactored into cleanupFullscreen()
2372         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
2373         Refactored from exitFullscreen(), removes views.
2374
2375 2014-06-17  Sam Weinig  <sam@webkit.org>
2376
2377         Remove unnecessary Structure flags from generated bindings
2378         https://bugs.webkit.org/show_bug.cgi?id=133992
2379
2380         Reviewed by Daniel Bates.
2381
2382         - Remove OverridesVisitChildren flag from DOM prototype objects. They never
2383           implement visitChildren.
2384         - Remove OverridesGetOwnPropertySlot and ImplementsHasInstance from DOM constructor
2385           objects. getOwnPropertySlot is never implemented and ImplementsHasInstance is inherited
2386           automatically from DOMConstructorObject.
2387         - If we are not changing any flags, we now don't emit StructureFlags at all for the class.
2388
2389         * bindings/scripts/CodeGeneratorJS.pm:
2390         (GenerateHeader):
2391         (GeneratePrototypeDeclaration):
2392         (GenerateConstructorDeclaration):
2393         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2394         (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
2395         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
2396         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2397         (WebCore::JSTestCustomNamedGetterPrototype::JSTestCustomNamedGetterPrototype):
2398         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
2399         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2400         (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
2401         * bindings/scripts/test/JS/JSTestEventTarget.h:
2402         (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
2403         (WebCore::JSTestEventTargetConstructor::createStructure):
2404         * bindings/scripts/test/JS/JSTestException.h:
2405         (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
2406         (WebCore::JSTestExceptionConstructor::createStructure):
2407         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2408         (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
2409         (WebCore::JSTestGenerateIsReachableConstructor::createStructure):
2410         * bindings/scripts/test/JS/JSTestInterface.h:
2411         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
2412         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2413         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
2414         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
2415         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2416         (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
2417         (WebCore::JSTestNamedConstructorConstructor::createStructure):
2418         * bindings/scripts/test/JS/JSTestNode.h:
2419         (WebCore::JSTestNodePrototype::JSTestNodePrototype):
2420         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2421         (WebCore::JSTestNondeterministicPrototype::JSTestNondeterministicPrototype):
2422         (WebCore::JSTestNondeterministicConstructor::createStructure):
2423         * bindings/scripts/test/JS/JSTestObj.h:
2424         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
2425         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2426         (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
2427         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2428         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
2429         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
2430         * bindings/scripts/test/JS/JSTestTypedefs.h:
2431         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
2432         * bindings/scripts/test/JS/JSattribute.h:
2433         (WebCore::JSattributePrototype::JSattributePrototype):
2434         (WebCore::JSattributeConstructor::createStructure):
2435         * bindings/scripts/test/JS/JSreadonly.h:
2436         (WebCore::JSreadonlyPrototype::JSreadonlyPrototype):
2437         (WebCore::JSreadonlyConstructor::createStructure):
2438
2439 2014-06-17  Myles C. Maxfield  <mmaxfield@apple.com>
2440
2441         [iOS] Input type=time elements styled with SVG fonts have 0 width
2442         https://bugs.webkit.org/show_bug.cgi?id=133524
2443
2444         Reviewed by Simon Fraser.
2445
2446         Refactor how the LocalizedDateCache returns maximum widths for input elements. Currently,
2447         measuring the width of an SVG font requires a RenderObject for context, which the
2448         LocalizedDateCache can't know about (it would be a platform violation). Instead, the
2449         LocalizedDateCache can return the strings that it would use to measure the width, and the
2450         caller can actually run the width computation.
2451
2452         Test: fast/forms/time-input-svg-font.html
2453
2454         * platform/text/PlatformLocale.h:
2455         * platform/text/ios/LocalizedDateCache.h:
2456         * platform/text/ios/LocalizedDateCache.mm:
2457         (WebCore::LocalizedDateCache::maximumWidthForDateType): Take a delegate which can
2458         measure text
2459         (WebCore::LocalizedDateCache::calculateMaximumWidth): Perform maximum width
2460         computation using delegate.
2461         * platform/text/mac/LocaleMac.h:
2462         * platform/text/mac/LocaleMac.mm:
2463         (WebCore::LocaleMac::formatDateTime):
2464         (WebCore::LocaleMac::maximumWidthForDateType): Deleted. Short-circuit this and go
2465         directly to the LocalizedDateCache. This makes sense because we have to explicitly
2466         insert computed values back into the cache in this new model.
2467         * rendering/RenderThemeIOS.mm:
2468         (WebCore::adjustInputElementButtonStyle): Create a delegate and pass it to the
2469         LocalizedDateCache
2470
2471 2014-06-17  Simon Fraser  <simon.fraser@apple.com>
2472
2473         [UI-side compositing] fix reflections on composited layers
2474         https://bugs.webkit.org/show_bug.cgi?id=133942
2475
2476         Reviewed by Tim Horton.
2477
2478         Fix reflections on composited layers. There are two main set of changes.
2479         
2480         First, a PlatformCALayerRemote which is a clone has to track the layer
2481         it is a clone of, so it knows where to grab the contents from in the UI process.
2482         This layer may be told that its contents need updating out of order during
2483         recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext
2484         to allow a layer to add itself to the set of layers requiring commit.
2485         
2486         In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree()
2487         to go through clones, and copy their contents from the origin layer.
2488         
2489         The second set of changes makes platformCALayerLayerDidDisplay() work for
2490         UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*.
2491         PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know
2492         what the origin layer is.
2493
2494         Test: compositing/reflections/repaint-with-reflection.html
2495
2496         * WebCore.exp.in:
2497         * platform/graphics/GraphicsLayer.h:
2498         (WebCore::GraphicsLayer::layerDidDisplay): Deleted.
2499         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2500         (WebCore::LayerClient::platformCALayerLayerDidDisplay): Deleted.
2501         * platform/graphics/ca/GraphicsLayerCA.cpp:
2502         (WebCore::GraphicsLayerCA::layerDidDisplay):
2503         (WebCore::GraphicsLayerCA::findOrMakeClone):
2504         * platform/graphics/ca/GraphicsLayerCA.h:
2505         * platform/graphics/ca/PlatformCALayer.h:
2506         * platform/graphics/ca/PlatformCALayerClient.h:
2507         (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
2508         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2509         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2510         (PlatformCALayerMac::copyContentsFromLayer):
2511         (PlatformCALayerMac::superlayer):
2512         (PlatformCALayerMac::setContentsChanged): Deleted.
2513         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2514         (PlatformCALayerWinInternal::displayCallback):
2515         * platform/graphics/mac/WebLayer.mm:
2516         (-[WebSimpleLayer display]):
2517
2518 2014-06-17  Anders Carlsson  <andersca@apple.com>
2519
2520         Use strongly typed enums for AnimationState and AnimationInputState
2521         https://bugs.webkit.org/show_bug.cgi?id=133988
2522
2523         Reviewed by Tim Horton.
2524
2525         * page/animation/AnimationBase.cpp:
2526         (WebCore::AnimationBase::AnimationBase):
2527         (WebCore::nameForState):
2528         (WebCore::AnimationBase::updateStateMachine):
2529         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2530         (WebCore::AnimationBase::updatePlayState):
2531         (WebCore::AnimationBase::timeToNextService):
2532         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
2533         (WebCore::AnimationBase::freezeAtTime):
2534         (WebCore::AnimationBase::beginAnimationUpdateTime):
2535         * page/animation/AnimationBase.h:
2536         (WebCore::AnimationBase::clear):
2537         (WebCore::AnimationBase::onAnimationStartResponse):
2538         (WebCore::AnimationBase::waitingToStart):
2539         (WebCore::AnimationBase::preActive):
2540         (WebCore::AnimationBase::postActive):
2541         (WebCore::AnimationBase::fillingForwards):
2542         (WebCore::AnimationBase::paused):
2543         (WebCore::AnimationBase::inPausedState):
2544         (WebCore::AnimationBase::isNew):
2545         (WebCore::AnimationBase::waitingForStartTime):
2546         (WebCore::AnimationBase::waitingForStyleAvailable):
2547         (WebCore::AnimationBase::isAnimatingProperty):
2548         (WebCore::AnimationBase::styleAvailable):
2549         (WebCore::AnimationBase::compositeAnimation):
2550         * page/animation/ImplicitAnimation.cpp:
2551         (WebCore::ImplicitAnimation::onAnimationEnd):
2552         (WebCore::ImplicitAnimation::sendTransitionEvent):
2553         (WebCore::ImplicitAnimation::reset):
2554         (WebCore::ImplicitAnimation::setOverridden):
2555         * page/animation/KeyframeAnimation.cpp:
2556         (WebCore::KeyframeAnimation::KeyframeAnimation):
2557         (WebCore::KeyframeAnimation::animate):
2558         (WebCore::KeyframeAnimation::sendAnimationEvent):
2559
2560 2014-06-17  Andreas Kling  <akling@apple.com>
2561
2562         Avoid synchronous layout in window.scrollTo(0,0) when already at (0,0)
2563         <https://webkit.org/b/133893>
2564
2565         Going from 0,0 to 0,0 is a no-op since there is no way a layout will
2566         affect the current scroll position.
2567
2568         We don't send scroll events when moving to the previous position,
2569         so this change is not observable.
2570
2571         Reviewed by Anders Carlsson.
2572
2573         * page/DOMWindow.cpp:
2574         (WebCore::DOMWindow::scrollTo):
2575
2576 2014-06-17  Alex Christensen  <achristensen@webkit.org>
2577
2578         Fix css jit register usage on armv7.
2579         https://bugs.webkit.org/show_bug.cgi?id=133952
2580
2581         Reviewed by Benjamin Poulain.
2582
2583         * cssjit/RegisterAllocator.h:
2584         List r7 as a callee saved register, which it is.
2585         * cssjit/SelectorCompiler.cpp:
2586         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2587         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
2588         Save r6, which is used as a temporary register and must be preserved.
2589
2590 2014-06-17  Miyoung Shin  <myid.shin@samsung.com>
2591
2592         Use references instead of pointers to RenderBlock in enclosingBoxModelObject()
2593         https://bugs.webkit.org/show_bug.cgi?id=133978
2594
2595         Reviewed by Andreas Kling.
2596
2597         Just a straightforward conversion from pointers to references.
2598
2599         No new tests, no behavior change.
2600
2601         * rendering/InlineFlowBox.cpp:
2602         (WebCore::InlineFlowBox::paint):
2603         * rendering/RenderBlock.cpp:
2604         (WebCore::RenderBlock::paintObject):
2605         * rendering/RenderObject.cpp:
2606         (WebCore::RenderObject::enclosingBoxModelObject):
2607         * rendering/RenderObject.h:
2608
2609 2014-06-17  Zan Dobersek  <zdobersek@igalia.com>
2610
2611         Cache the gst_query_get_n_buffering_ranges() return value for the for-loop conditional
2612         https://bugs.webkit.org/show_bug.cgi?id=133953
2613
2614         Reviewed by Philippe Normand.
2615
2616         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2617         (WebCore::MediaPlayerPrivateGStreamer::buffered): Avoid the extra call in the for-loop
2618         conditional expression by caching the return value of gst_query_get_n_buffering_ranges().
2619
2620 2014-06-17  Zan Dobersek  <zdobersek@igalia.com>
2621
2622         Avoid Vector<char> copies in the OffsetBuffer constructor
2623         https://bugs.webkit.org/show_bug.cgi?id=133956
2624
2625         Reviewed by Andreas Kling.
2626
2627         * xml/parser/XMLDocumentParserLibxml2.cpp:
2628         (WebCore::OffsetBuffer::OffsetBuffer): Take the Vector parameter by value and
2629         move it into the member variable.
2630         (WebCore::openFunc): Move the Vector object into the OffsetBuffer constructor.
2631
2632 2014-06-17  Jer Noble  <jer.noble@apple.com>
2633
2634         [MSE] Overwritten samples are removed from buffered ranges using decode times; added samples using presentation times
2635         https://bugs.webkit.org/show_bug.cgi?id=133959
2636
2637         Reviewed by Eric Carlson.
2638
2639         Test: media/media-source/media-source-overlapping-append-buffered.html
2640
2641         Explicitly call presentationTime() on removed samples, rather than implicitly asking for the iterator's "first"
2642         member. When iterating over samples, "first" can either be presentation time, or decode time, depending on which
2643         iteration method is called. In the case of removing samples, this was using the decode time incorrectly.
2644
2645         * Modules/mediasource/SourceBuffer.cpp:
2646         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2647
2648 2014-06-16  Mihnea Ovidenie  <mihnea@adobe.com>
2649
2650         [CSSRegions] Region with border radius and overflow:hidden does not clip content
2651         https://bugs.webkit.org/show_bug.cgi?id=133476
2652
2653         Reviewed by Andrei Bucur.
2654
2655         When setting the clip before painting the named flow content,
2656         use the region's foreground rect to take the region's border radius
2657         into account if needed.
2658
2659         Test: fast/regions/region-border-radius-overflow-clip.html
2660
2661         * rendering/RenderLayer.cpp:
2662         (WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
2663
2664 2014-06-16  Sam Weinig  <sam@webkit.org>
2665
2666         Extract prototype declaration generation into a helper function
2667         https://bugs.webkit.org/show_bug.cgi?id=133969
2668
2669         Reviewed by Dan Bernstein.
2670
2671         * bindings/scripts/CodeGeneratorJS.pm:
2672         (GenerateHeader):
2673         (GeneratePrototypeDeclaration):
2674
2675 2014-06-16  Sam Weinig  <sam@webkit.org>
2676
2677         Move forward declaration of bindings static functions into their implementation files
2678         https://bugs.webkit.org/show_bug.cgi?id=133943
2679
2680         Reviewed by Geoffrey Garen.
2681
2682         - Moves the forward declaration of static functions for generated files to the implementation.
2683         - Adds a new extended attribute, ForwardDeclareInHeader, for functions that still need a 
2684           forward declaration in the header.
2685
2686         * bindings/js/JSDOMBinding.h:
2687         (WebCore::nonCachingStaticFunctionGetter):
2688         Move this helper here from JSDOMWindowCustom.cpp.
2689
2690         * bindings/js/JSDOMWindowCustom.cpp:
2691         (WebCore::JSDOMWindow::getOwnPropertySlot):
2692         Switch to comparing the property name directly rather than looking up in the static table and
2693         comparing function pointers.
2694
2695         * bindings/js/JSHistoryCustom.cpp:
2696         (WebCore::JSHistory::getOwnPropertySlotDelegate):
2697         Switch to comparing the property name directly rather than looking up in the static table and
2698         comparing function pointers and start using the nonCachingStaticFunctionGetter<> helper.
2699
2700         * bindings/js/JSLocationCustom.cpp:
2701         (WebCore::JSLocation::getOwnPropertySlotDelegate):
2702         (WebCore::JSLocation::putDelegate):
2703         Switch to comparing the property name directly rather than looking up in the static table and
2704         comparing function pointers and start using the nonCachingStaticFunctionGetter<> helper.
2705
2706         * bindings/scripts/CodeGeneratorJS.pm:
2707         (GenerateHeader):
2708         (GenerateImplementation):
2709         Move forward declaration creation to the implementation file where possible.
2710
2711         * bindings/scripts/IDLAttributes.txt:
2712         Add ForwardDeclareInHeader.
2713
2714         * page/DOMWindow.idl:
2715         * page/History.idl:
2716         * page/Location.idl:
2717         Add ForwardDeclareInHeader where necessary.
2718
2719 2014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>
2720
2721         Unreviewed build fix after r170029
2722
2723         Use String() instead of AtomicString().
2724
2725         * platform/network/HTTPParsers.cpp:
2726         (WebCore::parseHTTPHeader):
2727         * platform/network/soup/ResourceRequestSoup.cpp:
2728         (WebCore::ResourceRequest::updateSoupMessageHeaders):
2729         * platform/network/soup/ResourceResponseSoup.cpp:
2730         (WebCore::ResourceResponse::toSoupMessage):
2731
2732 2014-06-16  Brent Fulgham  <bfulgham@apple.com>
2733
2734         [Win] Use TileController on Windows
2735         https://bugs.webkit.org/show_bug.cgi?id=133895
2736
2737         Reviewed by Tim Horton.
2738
2739         * WebCore.vcxproj/WebCore.vcxproj: Add Tiled Drawing files.
2740         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2741         * platform/graphics/TiledBacking.h: No longer Cocoa-only.
2742         * platform/graphics/ca/GraphicsLayerCA.cpp:
2743         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Windows
2744         now uses the same layer type as Mac.
2745         * platform/graphics/ca/LayerPool.cpp:
2746         (WebCore::LayerPool::takeLayerWithSize): Use nullptr
2747         rather than nil for C++ code.
2748         * platform/graphics/ca/PlatformCALayer.cpp:
2749         * platform/graphics/ca/PlatformCALayer.h: Expose necessary
2750         drawing functions for Windows port.
2751         * platform/graphics/ca/TileController.cpp: Remove unneeded
2752         header include for WebLayer.
2753         * platform/graphics/ca/TileCoverageMap.cpp: Correct #includes.
2754         * platform/graphics/ca/TileGrid.h: Not just for Cococa.
2755         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove
2756         extra whitespace.
2757         * platform/graphics/ca/mac/PlatformCALayerMac.h: Remove
2758         unneeded overload.
2759         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2760         (PlatformCALayer::collectRectsToPaint): Added stub.
2761         (PlatformCALayer::drawLayerContents): Added.
2762         (PlatformCALayer::frameForLayer): Added.
2763         (PlatformCALayerWin::PlatformCALayerWin): Remove unneeded
2764         assert now that we support these types. Add TileController
2765         support.
2766         (PlatformCALayerWin::setEdgeAntialiasingMask): Added.
2767         (printLayer): Add newly-supported tile types.
2768         (PlatformCALayerWin::tiledBacking): Added.
2769         * platform/graphics/ca/win/PlatformCALayerWin.h: Update to
2770         support Tiled Drawing.
2771         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2772         (PlatformCALayerWinInternal::PlatformCALayerWinInternal): Update to
2773         recognize newly-supported layer types.
2774         (PlatformCALayerWinInternal::setNeedsDisplay): Ditto.
2775         (PlatformCALayerWinInternal::setSublayers): Ditto.
2776         (PlatformCALayerWinInternal::getSublayers): Ditto.
2777         (PlatformCALayerWinInternal::removeAllSublayers): Ditto.
2778         (PlatformCALayerWinInternal::insertSublayer): Ditto.
2779         (PlatformCALayerWinInternal::sublayerCount): Ditto.
2780         (PlatformCALayerWinInternal::indexOfSublayer): Ditto.
2781         (PlatformCALayerWinInternal::sublayerAtIndex): Ditto.
2782         (PlatformCALayerWinInternal::setBounds): Ditto.
2783         (PlatformCALayerWinInternal::setFrame): Ditto.
2784         (PlatformCALayerWinInternal::drawTile): Ditto.
2785         (PlatformCALayerWinInternal::createTileController): Ditto.
2786         (PlatformCALayerWinInternal::tiledBacking): Ditto.
2787         * platform/graphics/ca/win/PlatformCALayerWinInternal.h: Update to use
2788         TileController.
2789
2790 2014-06-16  Andreas Kling  <akling@apple.com>
2791
2792         Remove unnecessary style invalidation in RenderTextControl::styleDidChange().
2793         <https://webkit.org/b/133949>
2794
2795         This explicit invalidation of the text control's inner text element
2796         was hacked in to fix an editing test back in 2011, long before lazy
2797         render tree construction.
2798
2799         It should be safe to remove, since doing so doesn't affect any tests.
2800
2801         Reviewed by Antti Koivisto.
2802
2803         * rendering/RenderTextControl.cpp:
2804         (WebCore::RenderTextControl::styleDidChange):
2805
2806 2014-06-16  Anders Carlsson  <andersca@apple.com>
2807
2808         Fix iOS build.
2809
2810         * platform/network/cf/ResourceRequestCFNet.cpp:
2811         (WebCore::setHeaderFields):
2812
2813 2014-06-16  Anders Carlsson  <andersca@apple.com>
2814
2815         Accept-Ranges is not specific to GStreamer.
2816
2817         * platform/network/HTTPHeaderNames.in:
2818
2819 2014-06-16  Anders Carlsson  <andersca@apple.com>
2820
2821         Don't use AtomicString in HTTPHeaderMap
2822         https://bugs.webkit.org/show_bug.cgi?id=133957
2823         <rdar://problem/15256572>
2824
2825         Reviewed by Andreas Kling.
2826
2827         Use the string data that comes from the generated HTTPHeaderNames.cpp file
2828         for sharing header name data instead. In the future we can do something more fancy where
2829         we'll hash the HTTPHeaderName enum directly, but this is good enough for now.
2830
2831         * Modules/websockets/WebSocketHandshake.cpp:
2832         (WebCore::WebSocketHandshake::readHTTPHeaders):
2833         * WebCore.exp.in:
2834         * inspector/InspectorResourceAgent.cpp:
2835         (WebCore::buildObjectForHeaders):
2836         * loader/CrossOriginPreflightResultCache.cpp:
2837         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
2838         * loader/appcache/ApplicationCacheStorage.cpp:
2839         (WebCore::parseHeader):
2840         * loader/cache/CachedResource.cpp:
2841         (WebCore::shouldUpdateHeaderAfterRevalidation):
2842         * platform/network/HTTPHeaderMap.cpp:
2843         (WebCore::HTTPHeaderMap::copyData):
2844         (WebCore::internHTTPHeaderNameString):
2845         (WebCore::HTTPHeaderMap::get):
2846         (WebCore::HTTPHeaderMap::set):
2847         (WebCore::HTTPHeaderMap::add):
2848         (WebCore::CaseFoldingCStringTranslator::hash): Deleted.
2849         (WebCore::CaseFoldingCStringTranslator::equal): Deleted.
2850         (WebCore::CaseFoldingCStringTranslator::translate): Deleted.
2851         * platform/network/HTTPHeaderMap.h:
2852         * platform/network/HTTPHeaderNames.in:
2853         * platform/network/HTTPParsers.cpp:
2854         (WebCore::parseHTTPHeader):
2855         * platform/network/HTTPParsers.h:
2856         * platform/network/ResourceRequestBase.cpp:
2857         (WebCore::ResourceRequestBase::httpHeaderField):
2858         (WebCore::ResourceRequestBase::setHTTPHeaderField):
2859         (WebCore::ResourceRequestBase::addHTTPHeaderField):
2860         * platform/network/ResourceRequestBase.h:
2861         * platform/network/ResourceResponseBase.cpp:
2862         (WebCore::ResourceResponseBase::httpHeaderField):
2863         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2864         (WebCore::ResourceResponseBase::addHTTPHeaderField):
2865         * platform/network/ResourceResponseBase.h:
2866         * platform/network/mac/ResourceRequestMac.mm:
2867         (WebCore::ResourceRequest::doUpdateResourceRequest):
2868         * platform/network/mac/ResourceResponseMac.mm:
2869         (WebCore::ResourceResponse::platformLazyInit):
2870         * xml/XMLHttpRequest.cpp:
2871         (WebCore::XMLHttpRequest::setRequestHeader):
2872         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
2873         (WebCore::XMLHttpRequest::getRequestHeader):
2874         (WebCore::XMLHttpRequest::getResponseHeader):
2875         * xml/XMLHttpRequest.h:
2876
2877 2014-06-16  Chris Fleizach  <cfleizach@apple.com>
2878
2879         AX: Safari crashed once in WebCore::AccessibilityObject::ariaIsHidden
2880         https://bugs.webkit.org/show_bug.cgi?id=133825
2881
2882         Reviewed by Enrica Casucci.
2883
2884         Sometimes asking accessibilityIsIgnored() will cause a newObject to be detached immediately after its created. 
2885         The creation function holds a reference with RefPtr as long as it lives, but when that method returns, the object goes away.
2886
2887         With that out of the way, I saw the same backtrace lead to updateLayoutIgnorePendingStylesheets being called while still inLayout.
2888
2889         I tried my best but could not create a reproducible layout test.
2890
2891         * accessibility/AXObjectCache.cpp:
2892         (WebCore::AXObjectCache::getOrCreate):
2893         * accessibility/AccessibilityObject.cpp:
2894         (WebCore::AccessibilityObject::updateBackingStore):
2895
2896 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
2897
2898         Unreviewed. Add more GStreamer-specific header names that are required
2899         after changes in r170021, fixing the build for ports using GStreamer.
2900
2901         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2902         (StreamingClient::handleResponseReceived):
2903         * platform/network/HTTPHeaderNames.in:
2904
2905 2014-06-16  Chris Fleizach  <cfleizach@apple.com>
2906
2907         AX: Crash at WebCore::AXObjectCache::textChanged
2908         https://bugs.webkit.org/show_bug.cgi?id=133873
2909
2910         Reviewed by Enrica Casucci.
2911
2912         This looks like a very similar problem to 
2913         https://bugs.webkit.org/show_bug.cgi?id=133825
2914
2915         The object is being created and deallocated almost right away because calling accessibilityIsIgnored triggers
2916         a deferred layout that invalidates the associated render element.
2917
2918         Despite my best efforts, I could not come up with a way to reproduce this in a layout test.
2919
2920         * accessibility/AXObjectCache.cpp:
2921         (WebCore::AXObjectCache::getOrCreate):
2922
2923 2014-06-15  Anders Carlsson  <andersca@apple.com>
2924
2925         Change ResourceRequestBase::addHTTPHeaderFields to setHTTPHeaderFields instead
2926         https://bugs.webkit.org/show_bug.cgi?id=133925
2927
2928         Reviewed by Sam Weinig.
2929
2930         * WebCore.exp.in:
2931         * platform/network/ResourceRequestBase.cpp:
2932         (WebCore::ResourceRequestBase::setHTTPHeaderFields):
2933         (WebCore::ResourceRequestBase::addHTTPHeaderFields): Deleted.
2934         * platform/network/ResourceRequestBase.h:
2935         * plugins/PluginView.cpp:
2936         (WebCore::PluginView::handlePost):
2937         * xml/XMLHttpRequest.cpp:
2938         (WebCore::XMLHttpRequest::createRequest):
2939
2940 2014-06-16  Jeongeun Kim  <je_julie.kim@samsung.com>
2941
2942         Use references instead of pointers to RenderBlock in RenderObject::enclosingBox().
2943         https://bugs.webkit.org/show_bug.cgi?id=133902
2944
2945         Reviewed by Andreas Kling.
2946
2947         Just a straightforward conversion from pointers to references.
2948
2949         No new tests, no behavior change.
2950
2951         * bindings/objc/DOMUIKitExtensions.mm:
2952         (-[DOMHTMLElement structuralComplexityContribution]):
2953         * html/HTMLMediaElement.cpp:
2954         (WebCore::HTMLMediaElement::parseAttribute):
2955         * inspector/InspectorOverlay.cpp:
2956         (WebCore::buildObjectForRendererFragments):
2957         * page/EventHandler.cpp:
2958         (WebCore::scrollNode):
2959         (WebCore::EventHandler::scrollOverflow):
2960         (WebCore::EventHandler::logicalScrollOverflow):
2961         * page/FrameView.cpp:
2962         (WebCore::FrameView::layout):
2963         * rendering/RenderBox.cpp:
2964         (WebCore::computeInlineStaticDistance):
2965         * rendering/RenderFlowThread.cpp:
2966         (WebCore::RenderFlowThread::computedRegionRangeForBox):
2967         (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion):
2968         (WebCore::RenderFlowThread::objectInFlowRegion):
2969         * rendering/RenderLayer.cpp:
2970         (WebCore::RenderLayer::calculateClipRects):
2971         * rendering/RenderObject.cpp:
2972         (WebCore::RenderObject::enclosingBox): Removed FIXME comment
2973         * rendering/RenderObject.h:
2974         * rendering/RenderScrollbar.cpp:
2975         (WebCore::RenderScrollbar::owningRenderer):
2976
2977 2014-06-16  Anders Carlsson  <andersca@apple.com>
2978
2979         Use HTTPHeaderName in more places
2980         https://bugs.webkit.org/show_bug.cgi?id=133948
2981
2982         Reviewed by Andreas Kling.
2983
2984         * loader/cache/CachedRawResource.cpp:
2985         (WebCore::shouldIgnoreHeaderForCacheReuse):
2986         * platform/network/HTTPHeaderNames.in:
2987         * xml/XMLHttpRequest.cpp:
2988         (WebCore::isSetCookieHeader):
2989         (WebCore::isForbiddenRequestHeader):
2990         (WebCore::XMLHttpRequest::isAllowedHTTPHeader):
2991         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData): Deleted.
2992         (WebCore::staticData): Deleted.
2993
2994 2014-06-16  Anders Carlsson  <andersca@apple.com>
2995
2996         Add HTTPHeaderName overloads on ResourceResponseBase
2997         https://bugs.webkit.org/show_bug.cgi?id=133946
2998
2999         Reviewed by Andreas Kling.
3000
3001         * WebCore.exp.in:
3002         * dom/Document.cpp:
3003         (WebCore::Document::lastModified):
3004         * loader/CrossOriginAccessControl.cpp:
3005         (WebCore::passesAccessControlCheck):
3006         * loader/CrossOriginPreflightResultCache.cpp:
3007         (WebCore::CrossOriginPreflightResultCacheItem::parse):
3008         * loader/FrameLoader.cpp:
3009         (WebCore::FrameLoader::receivedFirstData):
3010         (WebCore::FrameLoader::didBeginDocument):
3011         * loader/appcache/ApplicationCacheGroup.cpp:
3012         (WebCore::ApplicationCacheGroup::createResourceHandle):
3013         * loader/cache/CachedCSSStyleSheet.cpp:
3014         (WebCore::CachedCSSStyleSheet::canUseSheet):
3015         * loader/cache/CachedResource.cpp:
3016         (WebCore::CachedResource::load):
3017         * loader/cache/CachedScript.cpp:
3018         (WebCore::CachedScript::mimeType):
3019         * platform/network/HTTPHeaderNames.in:
3020         * platform/network/ResourceResponseBase.cpp:
3021         (WebCore::ResourceResponseBase::httpHeaderField):
3022         (WebCore::ResourceResponseBase::setHTTPHeaderField):
3023         * platform/network/ResourceResponseBase.h:
3024         * xml/XMLHttpRequest.cpp:
3025         (WebCore::XMLHttpRequest::getAllResponseHeaders):
3026         (WebCore::XMLHttpRequest::getResponseHeader):
3027         (WebCore::XMLHttpRequest::responseMIMEType):
3028         (WebCore::XMLHttpRequest::didReceiveResponse):
3029
3030 2014-04-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3031
3032         [Bindings] "nullable" sequence support is incomplete (i.e. sequence<NativeType>?)
3033         https://bugs.webkit.org/show_bug.cgi?id=131240
3034
3035         Reviewed by Darin Adler.
3036
3037         Nullable sequences are not fully supported in WebKit's
3038         code generator machinery. Although the generated code
3039         does add "is nullable" check to the evaluation condition
3040         (i.e. if (arg.isNull() || ...)), when the JSValue
3041         that holds a "null" JSObject is actually to be "converted"
3042         to a native Vector<T>, it fails.
3043
3044         The reason for the failure is in JSDOMBindings::toNativeArray.
3045         This method verifies that JSValue does not hold a "non-null"
3046         object, and it bails out.
3047         Analogly, the "ref ptr" variant of this method (toRefPtrNativeArray)
3048         does support nullables.
3049
3050         Patch fixes it be checking for a "null" JSValue check before hand.
3051
3052         Tests: Binding tests updated.
3053
3054         * bindings/js/JSDOMBinding.h:
3055         (WebCore::toNativeArray):
3056         * bindings/scripts/CodeGeneratorJS.pm:
3057         (JSValueToNative):
3058         * Modules/websocket/WebSocket.idl:
3059         Removed one overload ctor now that
3060         we can use nullable sequences.
3061
3062 2014-06-16  Jer Noble  <jer.noble@apple.com>
3063
3064         [MSE][Mac] Occasional image corruption after seeking
3065         https://bugs.webkit.org/show_bug.cgi?id=133879
3066
3067         Reviewed by Eric Carlson.
3068
3069         Change the order of operations for seeks: change the current time of the AVSampleBufferRenderSynchronizer
3070         before flushing and appending non-displaying samples.
3071
3072         Rather than having a single function which retrieves the fast seek time and then seeks, split this out
3073         into two functions: one which gets the fast seek time, and one which seeks. (The later of course already
3074         exists: seekToTime()).
3075
3076         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3077         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
3078         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
3079         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
3080         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3081         (WebCore::MediaSourcePrivateAVFObjC::fastSeekTimeForMediaTime): Renamed from seekToTime()
3082         (WebCore::MediaSourcePrivateAVFObjC::seekToTime): Deleted.
3083
3084 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
3085
3086         Have ScriptExecutionContext::Task functions take in a ScriptExecutionContext reference
3087         https://bugs.webkit.org/show_bug.cgi?id=133795
3088
3089         Reviewed by Andreas Kling.
3090
3091         The pointer to the ScriptExecutionContext object that is passed to the C++11 lambdas or
3092         helper functions wrapped in ScriptExecutionContext::Task is never null, so that parameter
3093         should be a reference instead.
3094
3095         * Modules/webdatabase/Database.cpp:
3096         (WebCore::Database::~Database):
3097         (WebCore::Database::runTransaction):
3098         (WebCore::Database::scheduleTransactionCallback):
3099         * Modules/webdatabase/DatabaseManager.cpp:
3100         (WebCore::DatabaseManager::openDatabase):
3101         * Modules/webdatabase/SQLCallbackWrapper.h:
3102         (WebCore::SQLCallbackWrapper::clear):
3103         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3104         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback):
3105         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks): Dereference the
3106         member variable that holds a never-null pointer to the ScriptExecutionContext. This should
3107         similarly be a reference.
3108         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
3109         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
3110         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback):
3111         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback):
3112         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
3113         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
3114         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback):
3115         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
3116         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3117         (WebCore::workerGlobalScopeDidSend):
3118         (WebCore::workerGlobalScopeDidGetBufferedAmount):
3119         (WebCore::workerGlobalScopeDidConnect):
3120         (WebCore::workerGlobalScopeDidReceiveMessage):
3121         (WebCore::workerGlobalScopeDidReceiveBinaryData):
3122         (WebCore::workerGlobalScopeDidUpdateBufferedAmount):
3123         (WebCore::workerGlobalScopeDidStartClosingHandshake):
3124         (WebCore::workerGlobalScopeDidClose):
3125         (WebCore::workerGlobalScopeDidReceiveMessageError):
3126         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
3127         (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect):
3128         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend):
3129         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer):
3130         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob):
3131         (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount):
3132         (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose):
3133         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail):
3134         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
3135         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend):
3136         (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume):
3137         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3138         * bindings/js/JSCallbackData.h:
3139         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
3140         * bindings/js/JSDOMGlobalObjectTask.cpp:
3141         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
3142         * dom/Document.cpp:
3143         (WebCore::Document::postTask):
3144         (WebCore::Document::pendingTasksTimerFired):
3145         * dom/ScriptExecutionContext.cpp:
3146         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
3147         * dom/ScriptExecutionContext.h:
3148         (WebCore::ScriptExecutionContext::Task::performTask):
3149         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
3150         * dom/StringCallback.cpp:
3151         (WebCore::StringCallback::scheduleCallback):
3152         * fileapi/FileReader.cpp:
3153         (WebCore::delayedAbort):
3154         (WebCore::FileReader::abort):
3155         (WebCore::FileReader::doAbort): Deleted.
3156         * loader/WorkerThreadableLoader.cpp:
3157         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
3158         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy):
3159         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel):
3160         (WebCore::workerGlobalScopeDidSendData):
3161         (WebCore::workerGlobalScopeDidReceiveResponse):
3162         (WebCore::workerGlobalScopeDidReceiveData):
3163         (WebCore::workerGlobalScopeDidFinishLoading):
3164         (WebCore::workerGlobalScopeDidFail):
3165         (WebCore::workerGlobalScopeDidFailAccessControlCheck):
3166         (WebCore::workerGlobalScopeDidFailRedirectCheck):
3167         * loader/WorkerThreadableLoader.h:
3168         * loader/appcache/ApplicationCacheGroup.cpp:
3169         (WebCore::ApplicationCacheGroup::postListenerTask):
3170         * loader/cache/MemoryCache.cpp:
3171         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache):
3172         (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches):
3173         * loader/cache/MemoryCache.h:
3174         * workers/DefaultSharedWorkerRepository.cpp:
3175         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
3176         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
3177         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
3178         * workers/WorkerEventQueue.cpp:
3179         (WebCore::WorkerEventQueue::enqueueEvent):
3180         * workers/WorkerGlobalScope.cpp:
3181         (WebCore::WorkerGlobalScope::close):
3182         * workers/WorkerMessagingProxy.cpp:
3183         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
3184         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
3185         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
3186         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
3187         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
3188         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
3189         (WebCore::WorkerMessagingProxy::connectToInspector):
3190         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
3191         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
3192         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
3193         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
3194         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
3195         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
3196         (WebCore::WorkerMessagingProxy::reportPendingActivity):
3197         * workers/WorkerRunLoop.cpp:
3198         (WebCore::WorkerRunLoop::Task::performTask):
3199         * workers/WorkerScriptLoader.cpp:
3200         * workers/WorkerThread.cpp:
3201         (WebCore::WorkerThread::stop):
3202         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
3203
3204 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
3205
3206         Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
3207         https://bugs.webkit.org/show_bug.cgi?id=133677
3208
3209         Reviewed by Anders Carlsson.
3210
3211         * WebCore.exp.in: Update the changed symbol.
3212         * page/Page.cpp:
3213         (WebCore::Page::findStringMatchingRanges): The method expects the matchRanges parameter to be non-null,
3214         so it should take in that parameter by reference instead of pointer.
3215         * page/Page.h:
3216
3217 2014-06-16  Radu Stavila  <stavila@adobe.com>
3218
3219         REGRESSION (r168046): Incorrect layout for multicol spanners when moving from one thread to another
3220         https://bugs.webkit.org/show_bug.cgi?id=133589
3221
3222         Reviewed by Antti Koivisto.
3223
3224         When a spanner is moved from a multicol thread to another, its placeholder
3225         must be properly repositioned.
3226
3227         Test: fast/multicol/newmulticol/spanner-crash.html
3228
3229         * rendering/RenderMultiColumnFlowThread.cpp:
3230         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
3231
3232 2014-06-16  Mario Sanchez Prada  <mario.prada@samsung.com>
3233
3234         [ATK] Missing 'selection-changed' signal when navigating a combo box with keyboard
3235         https://bugs.webkit.org/show_bug.cgi?id=133512
3236
3237         Reviewed by Chris Fleizach.
3238
3239         Make sure that AccessibilityMenuList objects update their active
3240         option when it changes, which will send a platform-dependent
3241         accessibility-related notification when needed.
3242
3243         Test: accessibility/combo-box-collapsed-selection-changed.html
3244
3245         * rendering/RenderMenuList.cpp:
3246         (RenderMenuList::didUpdateActiveOption): Keep the out-of-bounds
3247         check for the index passed but don't avoid updating the option for
3248         the associated AccessibilityMenuList object if the selected list
3249         item does not have a renderer, because that could be the case for
3250         cases where the popup (and its elements) would be rendered in the
3251         UI Process (e.g. GTK+ port uses GtkMenu and GtkMenuItem for that).
3252
3253         * accessibility/AccessibilityMenuList.cpp:
3254         (WebCore::AccessibilityMenuList::didUpdateActiveOption): Ensure
3255         that the AccessibilityMenuListPopup object for a given menu list
3256         has accessibility children before updating its active option.
3257
3258 2014-06-16  Commit Queue  <commit-queue@webkit.org>
3259
3260         Unreviewed, rolling out r170003.
3261         https://bugs.webkit.org/show_bug.cgi?id=133938
3262
3263         This patch broke GTK build (Requested by kczech on #webkit).
3264
3265         Reverted changeset:
3266
3267         "[EFL] Platform support for WebSpeech feature."
3268         https://bugs.webkit.org/show_bug.cgi?id=116438
3269         http://trac.webkit.org/changeset/170003
3270
3271 2014-06-16  Frédéric Wang  <fred.wang@free.fr>
3272
3273         Draw radicals with glyphs for better rendering.
3274         https://bugs.webkit.org/show_bug.cgi?id=119038
3275
3276         Unreviewed ASSERT fix.
3277
3278         * rendering/mathml/RenderMathMLRoot.h:
3279
3280 2014-06-16  Frédéric Wang  <fred.wang@free.fr>
3281
3282         Draw radicals with glyphs for better rendering
3283         https://bugs.webkit.org/show_bug.cgi?id=119038
3284
3285         Reviewed by Chris Fleizach.
3286
3287         We rewrite RenderMathMLRoot in order to fix bugs with SVG transforms and dynamic modification of children and allow drawing with an OpenType MATH table.
3288         The drawing of the radical sign (without the top bar) is now moved to a RenderMathMLRadicalOperator class inheriting from RenderMathMLOperator.
3289         This class fallbacks to the original drawing with graphic primitives if an OpenType MATH table is not available.
3290
3291         Tests: mathml/opentype/roots-LatinModern.html
3292                mathml/presentation/mroot-transform.html
3293
3294         * CMakeLists.txt: add files to build system.
3295         * WebCore.vcxproj/WebCore.vcxproj: ditto.
3296         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
3297         * WebCore.xcodeproj/project.pbxproj: ditto
3298         * css/mathml.css: remove rules for msqrt/mroot. The "script level" in mroot is not incremented by 2 as specified in the spec.
3299         (math, mrow, mfenced, merror, mphantom, mstyle, menclose):
3300         (mroot > *:last-child):
3301         (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose): Deleted.
3302         (msqrt > *): Deleted.
3303         (mroot): Deleted. This rule was causing bug 126516.
3304         (mroot > * + *): Deleted.
3305         * rendering/RenderObject.h: Add two new isRenderMathML* functions for dynamic casting.
3306         (WebCore::RenderObject::isRenderMathMLRadicalOperator):
3307         (WebCore::RenderObject::isRenderMathMLRootWrapper):
3308         * rendering/mathml/RenderMathMLOperator.cpp: Accept a set of operator dictionary flags, all disabled by default. This is to allow anonymous radicas, which don't have any flag.
3309         isFencedOperator() is now replaced with the more general isAnonymous() since we allow anonymous radical operator fors msqrt/mroot.
3310         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
3311         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
3312         (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
3313         (WebCore::RenderMathMLOperator::SetOperatorProperties):
3314         (WebCore::RenderMathMLOperator::updateTokenContent):
3315         * rendering/mathml/RenderMathMLOperator.h: Allow class to be overriden, redefine the anonymous constructor, remove isFencedOperator().
3316         * rendering/mathml/RenderMathMLRadicalOperator.cpp: Added.
3317         (WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator):
3318         (WebCore::RenderMathMLRadicalOperator::stretchTo):
3319         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties):
3320         (WebCore::RenderMathMLRadicalOperator::computePreferredLogicalWidths):
3321         (WebCore::RenderMathMLRadicalOperator::computeLogicalHeight):
3322         (WebCore::RenderMathMLRadicalOperator::paint):
3323         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError):
3324         * rendering/mathml/RenderMathMLRadicalOperator.h: Added.
3325         * rendering/mathml/RenderMathMLRoot.cpp: Rewritten. Some parts to use graphic primitives are moved to RenderMathMLRadicalOperator.cpp.
3326         (WebCore::RenderMathMLRoot::RenderMathMLRoot):
3327         (WebCore::RenderMathMLRoot::baseWrapper):
3328         (WebCore::RenderMathMLRoot::radicalWrapper):
3329         (WebCore::RenderMathMLRoot::indexWrapper):
3330         (WebCore::RenderMathMLRoot::radicalOperator):
3331         (WebCore::RenderMathMLRoot::restructureWrappers):
3332         (WebCore::RenderMathMLRoot::addChild):
3333         (WebCore::RenderMathMLRoot::styleDidChange):
3334         (WebCore::RenderMathMLRoot::updateFromElement):
3335         (WebCore::RenderMathMLRoot::updateStyle):
3336         (WebCore::RenderMathMLRoot::firstLineBaseline):
3337         (WebCore::RenderMathMLRoot::layout):
3338         (WebCore::RenderMathMLRoot::paint):
3339         (WebCore::RenderMathMLRootWrapper::createAnonymousWrapper):
3340         (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring):
3341         (WebCore::RenderMathMLRootWrapper::removeChild):
3342         (WebCore::RenderMathMLRoot::paddingTop): Deleted.
3343         (WebCore::RenderMathMLRoot::paddingBottom): Deleted.
3344         (WebCore::RenderMathMLRoot::paddingLeft): Deleted.
3345         (WebCore::RenderMathMLRoot::paddingRight): Deleted.
3346         (WebCore::RenderMathMLRoot::paddingBefore): Deleted.
3347         (WebCore::RenderMathMLRoot::paddingAfter): Deleted.
3348         (WebCore::RenderMathMLRoot::paddingStart): Deleted.
3349         (WebCore::RenderMathMLRoot::paddingEnd): Deleted.
3350         (WebCore::RenderMathMLRoot::index): Deleted.
3351         * rendering/mathml/RenderMathMLRoot.h: Rewritten.
3352         (WebCore::RenderMathMLRootWrapper::RenderMathMLRootWrapper):
3353
3354 2014-06-16  Krzysztof Czech  <k.czech@samsung.com>
3355
3356         [EFL] Platform support for WebSpeech feature.
3357         https://bugs.webkit.org/show_bug.cgi?id=116438
3358
3359         Reviewed by Gyuyoung Kim.
3360
3361         It's a first step of adding support for Speech Synthesis in EFL port.
3362         Just stub out required API and support for compilation.
3363
3364         * CMakeLists.txt:
3365         * PlatformEfl.cmake:
3366         * platform/PlatformSpeechSynthesizer.h:
3367         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Added.
3368         (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
3369         (WebCore::PlatformSpeechSynthesisProviderEfl::~PlatformSpeechSynthesisProviderEfl):
3370         (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
3371         (WebCore::PlatformSpeechSynthesisProviderEfl::pause):
3372         (WebCore::PlatformSpeechSynthesisProviderEfl::resume):
3373         (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
3374         (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
3375         * platform/efl/PlatformSpeechSynthesisProviderEfl.h: Added.
3376         * platform/efl/PlatformSpeechSynthesizerEfl.cpp: Added.
3377         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3378         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
3379         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
3380         (WebCore::PlatformSpeechSynthesizer::pause):
3381         (WebCore::PlatformSpeechSynthesizer::resume):
3382         (WebCore::PlatformSpeechSynthesizer::speak):
3383         (WebCore::PlatformSpeechSynthesizer::cancel):
3384
3385 2014-06-15  Benjamin Poulain  <benjamin@webkit.org>
3386
3387         CSS JIT: add support for the :lang() pseudo class
3388         https://bugs.webkit.org/show_bug.cgi?id=133913
3389
3390         Reviewed by Andreas Kling.
3391
3392         The selector is already very expensive to begin with, just implement it with
3393         a function call.
3394
3395         It is also done after every other filter since it is so inefficient.
3396
3397         Tests: fast/selectors/lang-conflict.html
3398                fast/selectors/lang-empty.html
3399                fast/selectors/lang-specificity-xml.xhtml
3400                fast/selectors/lang-specificity.html
3401
3402         * css/SelectorChecker.cpp:
3403         (WebCore::SelectorChecker::checkOne):
3404         * css/SelectorCheckerTestFunctions.h:
3405         (WebCore::matchesLangPseudoClass):
3406         * cssjit/SelectorCompiler.cpp:
3407         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
3408         (WebCore::SelectorCompiler::addPseudoClassType):
3409         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3410         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
3411         * dom/Element.cpp:
3412         (WebCore::Element::computeInheritedLanguage):
3413         * dom/ElementData.cpp:
3414         (WebCore::ElementData::findLanguageAttribute):
3415         * dom/ElementData.h:
3416
3417 2014-06-15  Anders Carlsson  <andersca@apple.com>
3418
3419         Add an autorelease() member function to RetainPtr
3420         https://bugs.webkit.org/show_bug.cgi?id=133929
3421
3422         Reviewed by Dan Bernstein.
3423
3424         * bindings/objc/DOM.mm:
3425         (-[DOMNode renderedImage]):
3426         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
3427         * bindings/objc/DOMUIKitExtensions.mm:
3428         (-[DOMHTMLImageElement dataRepresentation:]):
3429         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3430         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
3431         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):
3432
3433 2014-06-14  Anders Carlsson  <andersca@apple.com>
3434
3435         Adopt HTTPHeaderName in ResourceResponseBase