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