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