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