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