371b784c9657bd714368937977531fd238e80808
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-08-12  Jer Noble  <jer.noble@apple.com>
2
3         [MSE][Mac] Seeking to the very beginning of a buffered range stalls video playback
4         https://bugs.webkit.org/show_bug.cgi?id=135865
5
6         Reviewed by Eric Carlson.
7
8         AVSampleBufferRenderSynchronizer will report a current time of about 100ms or so before
9         the destination seek time when seeking. It does this in order to pre-roll the synchronized
10         audio renderer, but this can lead to playback stalling when MediaSource::monitorSourceBuffers()
11         looks at the media element's current time and determines that the current time is 100ms before
12         any buffered samples.
13
14         Clamp the value of currentMediaTime() to, at a minimum, the last requested seek time. This was
15         the suggested course of action from <rdar://problem/17789374>.
16
17         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
18         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
19         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
20         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime):
21         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
22
23 2014-08-12  Jer Noble  <jer.noble@apple.com>
24
25         [MSE] YouTube will lose audio, video after seeking backwards to an unbuffered range.
26         https://bugs.webkit.org/show_bug.cgi?id=135855
27
28         Reviewed by Eric Carlson.
29
30         When seeking into an unbuffered or partially buffered range, we will unconditionally pass samples to the
31         decode queue even if there exist large gaps between those samples. Subsequently, the decoder will not
32         notify us that it has become ready for new samples until playback reaches those later samples and the samples
33         are discarded.
34
35         When sending samples to be decoded in provideMediaData(), stop if there exists a large gap in the sample timeline.
36         Do this by tracking the last enqueued decode end time, and look to see if the next sample's decode time indicates
37         a gap of greater than 1 second.
38
39         * Modules/mediasource/SourceBuffer.cpp:
40         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Initialize lastEnqueuedDecodeEndTime.
41         (WebCore::SourceBuffer::seekToTime): Set needsReenqueueing, in case samples do not yet exist in the trackBuffer
42             sufficient to re-enqueue for the destination time, so that re-enqueueing will occur after the next append.
43         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Check against lastEnqueuedDecodeEndTime, rather than
44             lastEnqueuedPresentationTime before adding samples to the decodeQueue.
45         (WebCore::SourceBuffer::provideMediaData): Stop when we reach a large gap between samples.
46         (WebCore::SourceBuffer::reenqueueMediaForTime): Set or clear lastEnqueuedDecodeEndTime based on whether we
47             have appended any non-displaying samples after flushing.
48
49 2014-08-12  Commit Queue  <commit-queue@webkit.org>
50
51         Unreviewed, rolling out r172494.
52         https://bugs.webkit.org/show_bug.cgi?id=135864
53
54         asserting on bots (Requested by kling on #webkit).
55
56         Reverted changeset:
57
58         "Don't recurse into non-rendered subtrees when computing
59         style"
60         https://bugs.webkit.org/show_bug.cgi?id=135844
61         http://trac.webkit.org/changeset/172494
62
63 2014-08-12  Myles C. Maxfield  <mmaxfield@apple.com>
64
65         Fonts forced to use non synthetic italics might be laid out with the incorrect baseline
66         https://bugs.webkit.org/show_bug.cgi?id=135403
67
68         Reviewed by Darin Adler.
69
70         When italics is specified on a font, and the font isn't coming from the cache, we ask
71         the SimpleFontData to provide a non-synthetic-italic version of itself. Our current
72         implementation doesn't preserve whether or not the SimpleFontData includes vertical
73         glyphs (glyphs that are not rotated when drawn in the vertical writing mode), which
74         determines which baseline we use to lay out the text. By passing "false" to
75         the isTextOrientationFallback argument to SimpleFontData::create(), we preserve this
76         hasVerticalGlyphs flag.
77
78         Test: fast/text/international/synthesized-italic-vertical-latin-double.html
79
80         * platform/graphics/SimpleFontData.cpp:
81         (WebCore::SimpleFontData::nonSyntheticItalicFontData):
82         * testing/Internals.cpp:
83         (WebCore::Internals::invalidateFontCache): Add "invalidateFontCache" to window.internals.
84         * testing/Internals.h: Ditto.
85         * testing/Internals.idl: Ditto.
86
87 2014-08-12  Peyton Randolph  <prandolph@apple.com>
88
89         Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse press gesture.
90         https://bugs.webkit.org/show_bug.cgi?id=135682
91
92         Reviewed by Tim Horton.
93
94         This patch adds a runtime switch for the Long Mouse Press Gesture and initially sets the feature flag
95         to false. It also removes the ENABLE_LONG_MOUSE_PRESS feature flag as the runtime switch now guards
96         its functionality.
97
98         * Configurations/FeatureDefines.xcconfig: Remove LONG_MOUSE_PRESS feature flag.
99         * page/EventHandler.cpp:
100         (WebCore::EventHandler::EventHandler):
101         (WebCore::EventHandler::clear): Remove feature flag.
102         (WebCore::EventHandler::handleMousePressEvent): Ditto.
103         (WebCore::EventHandler::eventMayStartDrag): Ditto.
104         (WebCore::EventHandler::handleMouseReleaseEvent):
105         Perform event iff long mouse presses are enabled.
106         (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Ditto.
107         (WebCore::EventHandler::recognizeLongMousePress): Ditto.
108         (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Ditto.
109         (WebCore::EventHandler::handleMouseMoveEvent): Remove feature flag.
110         (WebCore::EventHandler::handleDrag): Ditto.
111         (WebCore::EventHandler::mouseMovementExceedsThreshold): Ditto.
112         * page/EventHandler.h:
113         * page/Settings.in: Add longMousePressEnabled setting, initially false.
114
115 2014-08-12  Pratik Solanki  <psolanki@apple.com>
116
117         Cached file backed resources don't make it to the Web Process when NETWORK_CFDATA_ARRAY_CALLBACK is enabled
118         https://bugs.webkit.org/show_bug.cgi?id=135727
119         <rdar://problem/17947880>
120
121         Reviewed by Darin Adler.
122
123         Add SharedBuffer::existingCFData() which returns CFDataRef if it has one. Refactor
124         this code out of createCFData().
125
126         * WebCore.exp.in:
127         * platform/SharedBuffer.h:
128         * platform/mac/SharedBufferMac.mm:
129         (WebCore::SharedBuffer::existingCFData): Added.
130         (WebCore::SharedBuffer::createCFData):
131
132 2014-08-12  Tim Horton  <timothy_horton@apple.com>
133
134         Small region (~1px tall) where you get the selection button instead of the phone number overlay
135         https://bugs.webkit.org/show_bug.cgi?id=135852
136         <rdar://problem/17992795>
137
138         Reviewed by Enrica Casucci.
139
140         * WebCore.exp.in:
141
142 2014-08-12  Alex Christensen  <achristensen@webkit.org>
143
144         Generate header detection headers for CMake on Windows.
145         https://bugs.webkit.org/show_bug.cgi?id=135807
146
147         Reviewed by Brent Fulgham.
148
149         * CMakeLists.txt:
150         * PlatformWin.cmake:
151         Generate and include a stub WebCoreHeaderDetection.h.
152
153 2014-08-12  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
154
155         Make sure that begin time cannot be greater than SMILTime::indefiniteValue unintentionally.
156         https://bugs.webkit.org/show_bug.cgi?id=135838
157
158         Reviewed by Darin Adler.
159
160         When WebCore::SVGSMILElement::resolveInterval creates a SMILTime begin
161         node for a SMILInterval, then it only checks if the value of begin is
162         indefinite or unresolved but misses the case if it is between these two
163         reference values.
164
165         This is a backport of my fix in Blink: https://codereview.chromium.org/406263002/.
166
167         Test: svg/animations/animateMotion-crash-with-large-begin-time.html
168
169         * svg/animation/SVGSMILElement.cpp:
170         (WebCore::SVGSMILElement::parseOffsetValue):
171         (WebCore::SVGSMILElement::parseClockValue):
172
173 2014-08-12  Andy Estes  <aestes@apple.com>
174
175         Revert a change that wasn't meant to be a part of r172482.
176
177         * loader/ResourceLoader.cpp:
178         (WebCore::ResourceLoader::init):
179
180 2014-08-12  Antti Koivisto  <antti@apple.com>
181
182         Don't recurse into non-rendered subtrees when computing style
183         https://bugs.webkit.org/show_bug.cgi?id=135844
184
185         Reviewed by Andreas Kling.
186
187         * style/StyleResolveTree.cpp:
188         (WebCore::Style::resetStyleForNonRenderedDescendants):
189         
190         Do a simple reset of the style dirty bits and any computed style in non-rendered subtrees.
191
192         (WebCore::Style::attachRenderTree):
193         (WebCore::Style::resolveTree):
194         
195         Don't recurse into descendants if the element does not create a renderer.
196         We didn't compute style anyway in such subtrees.
197
198 2014-08-12  Antti Koivisto  <antti@apple.com>
199
200         Remove isInCanvasSubtree bit
201         https://bugs.webkit.org/show_bug.cgi?id=135837
202
203         Reviewed by Andreas Kling.
204
205         The logic to update this bit is in a wrong place and it is not clear it does 
206         the right thing in all cases. Also the optimization doesn't seem necessary,
207         the focus code is not that hot.
208
209         * accessibility/AXObjectCache.cpp:
210         (WebCore::AXObjectCache::getOrCreate):
211         * dom/Element.cpp:
212         (WebCore::Element::isFocusable):
213         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
214         (WebCore::Element::setIsInCanvasSubtree): Deleted.
215         (WebCore::Element::isInCanvasSubtree): Deleted.
216         * dom/Element.h:
217         * dom/ElementRareData.h:
218         (WebCore::ElementRareData::ElementRareData):
219         (WebCore::ElementRareData::isInCanvasSubtree): Deleted.
220         (WebCore::ElementRareData::setIsInCanvasSubtree): Deleted.
221         * html/HTMLAnchorElement.cpp:
222         (WebCore::HTMLAnchorElement::isKeyboardFocusable):
223         * html/HTMLCanvasElement.cpp:
224         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
225         (WebCore::HTMLCanvasElement::willAttachRenderers): Deleted.
226         * html/HTMLCanvasElement.h:
227         * style/StyleResolveTree.cpp:
228         (WebCore::Style::attachRenderTree):
229
230 2014-08-11  Andy Estes  <aestes@apple.com>
231
232         [iOS] Get rid of iOS.xcconfig
233         https://bugs.webkit.org/show_bug.cgi?id=135809
234
235         Reviewed by Joseph Pecoraro.
236
237         All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.
238
239         * Configurations/Base.xcconfig:
240         * Configurations/iOS.xcconfig: Removed.
241         * WebCore.xcodeproj/project.pbxproj:
242
243 2014-08-11  Roger Fong  <roger_fong@apple.com>
244
245         Adjust max-width of cues based on text alignment when cue size is expanded.
246         https://bugs.webkit.org/show_bug.cgi?id=135823.
247
248         Reviewed by Brent Fulgham.
249
250         All units are in percentages.
251         If we are left aligned the max cue width is the 100 minus the cue position.
252         If we are right aligned the max cue width is the cue position.
253         If we are centered the max cue width is just 100.
254
255         * html/track/TextTrackCueGeneric.cpp:
256         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
257         * html/track/VTTCue.cpp:
258         (WebCore::VTTCueBox::applyCSSProperties):
259
260 2014-08-12  Fabien Vallée  <fvallee@connected-labs.com>
261
262         [GStreamer] playback rate is rounded to integer
263         https://bugs.webkit.org/show_bug.cgi?id=135802
264
265         Reviewed by Philippe Normand.
266
267         Test: media/video-ended-event-slow-motion-playback.html
268
269         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
270         (WebCore::MediaPlayerPrivateGStreamer::setRate):
271
272 2014-08-12  Brent Fulgham  <bfulgham@apple.com>
273
274         [Win] Unreviewed build fix after r17425
275
276         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Remove
277         unused 'currentTime' declaration from header file. This is now fully implemented
278         in platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h.
279
280 2014-08-12  Zan Dobersek  <zdobersek@igalia.com>
281
282         Dont allocate GCond in VideoSinkGStreamer.cpp dynamically.
283
284         Rubber-stamped by Carlos Garcia Campos.
285
286         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
287         (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Move the
288         g_cond_init() and gst_video_info_init() calls here.
289         (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Move the
290         g_cond_clear() call here.
291         (webkit_video_sink_init):
292         (webkitVideoSinkTimeoutCallback):
293         (webkitVideoSinkRender):
294         (unlockBufferMutex):
295         (webkit_video_sink_class_init):
296         (webkitVideoSinkDispose): Deleted. Not required anymore.
297
298 2014-08-12  Zan Dobersek  <zdobersek@igalia.com>
299
300         Clean up GMutexLocker
301         https://bugs.webkit.org/show_bug.cgi?id=135833
302
303         Reviewed by Carlos Garcia Campos.
304
305         Don't dynamically allocate GMutex objects. Update GMutexLocker
306         initializations to pass in a GMutex reference, not a pointer.
307
308         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
309         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
310         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
311         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
312         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
313         (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Initialize the GMutex.
314         (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Clear the GMutex.
315         (webkit_video_sink_init):
316         (webkitVideoSinkRender):
317         (webkitVideoSinkDispose):
318         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
319         (webKitWebSrcGetProperty):
320         (webKitWebSrcStop):
321         (webKitWebSrcStart):
322         (webKitWebSrcChangeState):
323         (webKitWebSrcQueryWithParent):
324         (webKitWebSrcGetUri):
325         (webKitWebSrcSetUri):
326         (webKitWebSrcNeedDataMainCb):
327         (webKitWebSrcNeedDataCb):
328         (webKitWebSrcEnoughDataMainCb):
329         (webKitWebSrcEnoughDataCb):
330         (webKitWebSrcSeekDataCb):
331         (webKitWebSrcSetMediaPlayer):
332         (StreamingClient::createReadBuffer):
333         (StreamingClient::handleResponseReceived):
334         (StreamingClient::handleDataReceived):
335         (StreamingClient::handleNotifyFinished):
336         (ResourceHandleStreamingClient::wasBlocked):
337         (ResourceHandleStreamingClient::cannotShowURL):
338
339 2014-08-12  Eduardo Lima Mitev  <elima@igalia.com>
340         [GTK] Adds dependency on GnuTLS 3.0+ for the implementation of subtle crypto algorithms
341         https://bugs.webkit.org/show_bug.cgi?id=133317
342
343         Reviewed by Philippe Normand.
344
345         No new tests since no new functionality has been added.
346
347         * PlatformGTK.cmake: Adds GnuTLS libs and included dirs to WebCore targets
348
349 2014-08-10  Philippe Normand  <pnormand@igalia.com>
350
351         [WebAudio] FFTFrame is cluttered with dead code
352         https://bugs.webkit.org/show_bug.cgi?id=135751
353
354         Reviewed by Eric Carlson.
355
356         Cleaned up unused FFTFrame implementations from the tree. If the
357         FFMPEG or IPP versions are needed later on again this patch can be
358         rolled out.
359
360         No new tests, the code removed was disabled on all ports.
361
362         * platform/audio/Biquad.cpp:
363         (WebCore::Biquad::Biquad):
364         (WebCore::Biquad::~Biquad):
365         (WebCore::Biquad::process):
366         (WebCore::Biquad::reset):
367         (WebCore::Biquad::setNormalizedCoefficients):
368         * platform/audio/Biquad.h:
369         * platform/audio/DirectConvolver.cpp:
370         (WebCore::DirectConvolver::DirectConvolver):
371         (WebCore::DirectConvolver::process):
372         (WebCore::DirectConvolver::reset):
373         * platform/audio/DirectConvolver.h:
374         * platform/audio/FFTFrame.h:
375         * platform/audio/FFTFrameStub.cpp:
376         * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp: Removed.
377         * platform/audio/ipp/FFTFrameIPP.cpp: Removed.
378         * platform/audio/mac/FFTFrameMac.cpp:
379
380 2014-08-11  Mark Rowe  <mrowe@apple.com>
381
382         Fix the Mac build.
383
384         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
385         #if a function that's only used on iOS.
386
387 2014-08-11  Brent Fulgham  <bfulgham@apple.com>
388
389         [Mac, iOS] Some media content never reaches full 'loaded' state
390         https://bugs.webkit.org/show_bug.cgi?id=135814
391         <rdar://problem/17476923>
392
393         Reviewed by Jer Noble.
394
395         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
396         (WebCore::MediaPlayerPrivateAVFoundation::duration): Change to a wrapper that just calls
397         the durationDouble method and narrows to a float.
398         (WebCore::MediaPlayerPrivateAVFoundation::durationDouble): Revised version of duration
399         that works with doubles.
400         (WebCore::MediaPlayerPrivateAVFoundation::currentTime): Wrapper that calls the
401         currentTimeDouble method and narrows to a float.
402         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Use durationDouble for
403         comparison with passed 'time' argument (which is a double).
404         (WebCore::MediaPlayerPrivateAVFoundation::didEnd): Use 'currentTimeDouble' so we can
405         cache the double precision version of this value.
406         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Use 'durationDouble' since
407         the rest of the calculation is in terms of doubles.
408         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
409         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
410         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Convert to 'double'. All
411         uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
412         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTimeDouble): Switch from float implementation.
413         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Deleted. (Moved to parent class)
414         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
415         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
416         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
417         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Convert to 'double'. All
418         uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
419         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTimeDouble): Switch from floating implementation.
420         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted. (Moved to parent class)
421
422 2014-08-11  Enrica Casucci  <enrica@apple.com>
423
424         Improve look and feel of combined service menu..
425         https://bugs.webkit.org/show_bug.cgi?id=135824
426         <rdar://problem/17936880>
427
428         Reviewed by Tim Horton.
429
430         Adding some localizable strings.
431
432         * English.lproj/Localizable.strings:
433
434 2014-08-11  Jer Noble  <jer.noble@apple.com>
435
436         [iOS] <video> element requests are missing session cookies; sometimes persistant cookies.
437         https://bugs.webkit.org/show_bug.cgi?id=135816
438
439         Reviewed by Alexey Proskuryakov.
440
441         On iOS, the AVFoundation framework will copy appropriate cookies for the requested URL across to the
442         mediaserverd process. For WebKit2, the WebProcess does not have access to session cookies for the 
443         current browsing session. When creating an AVURLAsset, fetch the appropriate cookies for the requested
444         URL, and pass them into AVURLAsset in the options dictionary.
445
446         * html/HTMLMediaElement.cpp:
447         (WebCore::HTMLMediaElement::mediaPlayerGetRawCookies): Call CookieJar's equivalent method.
448         * html/HTMLMediaElement.h:
449         * platform/graphics/MediaPlayer.cpp:
450         (WebCore::MediaPlayer::getRawCookies): Pass to HTMLMediaElement.
451         * platform/graphics/MediaPlayer.h:
452         (WebCore::MediaPlayerClient::mediaPlayerGetRawCookies):
453         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
454         (WebCore::toNSHTTPCookie): Convert a WebCore Cookie -> NSHTTPCookie.
455         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Fetch cookies for the requested
456             URL, and if successful, add them to the AVURLAsset options dictionary.
457
458 2014-08-11  Roger Fong  <roger_fong@apple.com>
459
460         Adjustments to CueBox CSS Width calculations Part 2.
461         https://bugs.webkit.org/show_bug.cgi?id=135820
462         <rdar://problem/17954473>.
463
464         Reviewed by Brent Fulgham.
465
466         Two adjustments made:
467         a) The default font size used was incorrect. It is not just 10px, 
468         but should be based off a percentage of the video size.
469         b) The top/left CSS property needs to be adjusted appropriately if the cue
470         is center aligned and we change the cue's size such that the cue remains centered.
471         * html/track/TextTrackCueGeneric.cpp:
472         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
473         * html/track/VTTCue.cpp:
474         (WebCore::VTTCueBox::applyCSSProperties):
475         * html/track/VTTCue.h: Remove unnecessary constant.
476
477 2014-08-11  Beth Dakin  <bdakin@apple.com>
478
479         Fixed backgrounds don't paint in blurred inset areas
480         https://bugs.webkit.org/show_bug.cgi?id=135712
481
482         Reviewed by Simon Fraser.
483
484         Background geometry calculations for fixed background need to use the larger 
485         visible rect.
486
487         The first version of this patch caused a regression because it universally 
488         adjusted the value for top to account for the inset whether or not the 
489         viewportRect location was adjusted for the same. This version fixes that — those 
490         two changes go hand-in-hand.
491         * rendering/RenderBoxModelObject.cpp:
492         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
493
494 2014-08-11  Antti Koivisto  <antti@apple.com>
495
496         Pass inherited style only when resolving tree style
497         https://bugs.webkit.org/show_bug.cgi?id=135799
498
499         Reviewed by Andreas Kling.
500
501         No need to pass around the style parent element.
502
503         * dom/ContainerNode.h:
504         (WebCore::ContainerNode::childShouldCreateRenderer): Deleted.
505         * dom/Element.cpp:
506         (WebCore::Element::childShouldCreateRenderer):
507         * dom/Element.h:
508         * style/StyleResolveTree.cpp:
509         (WebCore::Style::RenderTreePosition::parent):
510         (WebCore::Style::nextSiblingRenderer):
511         (WebCore::Style::RenderTreePosition::RenderTreePosition):
512         (WebCore::Style::RenderTreePosition::computeNextSibling):
513         (WebCore::Style::shouldCreateRenderer):
514         (WebCore::Style::styleForElement):
515         (WebCore::Style::createRendererIfNeeded):
516         (WebCore::Style::textRendererIsNeeded):
517         (WebCore::Style::createTextRendererIfNeeded):
518         (WebCore::Style::attachTextRenderer):
519         (WebCore::Style::updateTextRendererAfterContentChange):
520         (WebCore::Style::attachChildren):
521         (WebCore::Style::attachDistributedChildren):
522         (WebCore::Style::attachShadowRoot):
523         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
524         (WebCore::Style::attachRenderTree):
525         (WebCore::Style::resolveLocal):
526         (WebCore::Style::resolveTextNode):
527         (WebCore::Style::resolveShadowTree):
528         (WebCore::Style::updateBeforeOrAfterPseudoElement):
529         (WebCore::Style::resolveTree):
530         * svg/SVGDocument.cpp:
531         (WebCore::SVGDocument::childShouldCreateRenderer): Deleted.
532         
533             Implement this in SVGSVGElement::rendererIsNeeded instead.
534
535         * svg/SVGDocument.h:
536         * svg/SVGSVGElement.cpp:
537         (WebCore::SVGSVGElement::rendererIsNeeded):
538
539 2014-08-11  Yusuke Suzuki  <utatane.tea@gmail.com>
540
541         CSS JIT: support :scope
542         https://bugs.webkit.org/show_bug.cgi?id=135733
543
544         Reviewed by Benjamin Poulain.
545
546         Implement :scope for CSS JIT. It introduces scope field to CheckingContext
547         and it makes CheckingContext more similar to SelectorChecker::SelectorCheckingContext.
548         And since :scope requires CheckingContext, QueryingRules can accept SelectorCheckerWithCheckingContext.
549
550         Tests: fast/selectors/querySelector-scope-filtered-root.html
551                fast/selectors/scope-works-as-root.html
552
553         * css/ElementRuleCollector.cpp:
554         (WebCore::ElementRuleCollector::ruleMatches):
555         * cssjit/SelectorCompiler.cpp:
556         (WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext):
557         (WebCore::SelectorCompiler::addPseudoClassType):
558         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
559         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
560         (WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
561         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
562         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
563         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
564         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
565         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
566         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
567         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
568         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
569         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
570         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
571         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
572         * cssjit/SelectorCompiler.h:
573         (WebCore::SelectorCompiler::CheckingContext::CheckingContext):
574         * dom/SelectorQuery.cpp:
575         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
576         (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
577         (WebCore::SelectorDataList::execute):
578         * dom/SelectorQuery.h:
579
580 2014-08-11  Timothy Hatcher  <timothy@apple.com>
581
582         Web Inspector: console.profile shouldn't stop auto-recorded profiles
583         https://bugs.webkit.org/show_bug.cgi?id=135810
584
585         Reviewed by Joseph Pecoraro.
586
587         * inspector/InspectorTimelineAgent.cpp:
588         (WebCore::InspectorTimelineAgent::start): Added. Call internalStart. Set m_enabledFromFrontend.
589         (WebCore::InspectorTimelineAgent::stop): Added. Calls internalStop. Clear m_enabledFromFrontend.
590         (WebCore::InspectorTimelineAgent::internalStart): Renamed from start.
591         (WebCore::InspectorTimelineAgent::internalStop): Renamed from stop.
592         (WebCore::InspectorTimelineAgent::startFromConsole): Use internalStart.
593         (WebCore::InspectorTimelineAgent::stopFromConsole): Use internalStop. Only stop if !m_enabledFromFrontend.
594         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): Initialize m_enabledFromFrontend.
595         * inspector/InspectorTimelineAgent.h: Added m_enabledFromFrontend.
596
597 2014-08-11  Brent Fulgham  <bfulgham@apple.com>
598
599         [Win] Adjust build script for Windows production build.
600         https://bugs.webkit.org/show_bug.cgi?id=135806
601         <rdar://problem/17978299>
602
603         Reviewed by Timothy Hatcher.
604
605         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy file needed
606         for WebInspectorUI build.
607
608 2014-08-11  Commit Queue  <commit-queue@webkit.org>
609
610         Unreviewed, rolling out r172393.
611         https://bugs.webkit.org/show_bug.cgi?id=135796
612
613         discussion needed about GnuTLS version bump on the bots
614         (Requested by philn on #webkit).
615
616         Reverted changeset:
617
618         https://bugs.webkit.org/show_bug.cgi?id=133317
619         http://trac.webkit.org/changeset/172393
620
621 2014-08-11  Eduardo Lima Mitev  <elima@igalia.com>
622         [GTK] Adds dependency on GnuTLS 3.0+ for the implementation of subtle crypto algorithms
623         https://bugs.webkit.org/show_bug.cgi?id=133317
624
625         Reviewed by Philippe Normand.
626
627         No new tests since no new functionality has been added.
628
629         * PlatformGTK.cmake: Adds GnuTLS libs and included dirs to WebCore targets
630
631 2014-08-11  Eduardo Lima Mitev  <elima@igalia.com>
632
633         [GTK] Fix debug build after r172389.
634
635         Rubber-stamped by Philippe Normand.
636
637         * crypto/gtk/CryptoKeyRSAGtk.cpp:
638         (WebCore::CryptoKeyRSA::exportData): Remove spurious ASSERT from
639         stub. It will be added back along with the real implementation of
640         the method.
641
642 2014-08-11  Zan Dobersek  <zdobersek@igalia.com>
643
644         Unreviewed fix after r172348.
645
646         * platform/graphics/cairo/BitmapImageCairo.cpp:
647         (WebCore::BitmapImage::BitmapImage): Initialize m_minimumSubsamplingLevel to 0.
648
649 2014-08-11  Eduardo Lima Mitev  <elima@igalia.com>
650
651         [GTK] Adds stubs for all subtle crypto algorithm implemntations
652         https://bugs.webkit.org/show_bug.cgi?id=133316
653
654         Reviewed by Philippe Normand.
655
656         No new tests since no new functionality has been added.
657
658         * CMakeLists.txt: Add subtle crypto 'algorithms' and 'parameters' dirs to WebCore incuded dirs
659         * PlatformGTK.cmake:  Add subtle crypto sources to WebCore target
660         * crypto/gtk/CryptoAlgorithmAES_CBCGtk.cpp: Added.
661         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
662         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
663         * crypto/gtk/CryptoAlgorithmAES_KWGtk.cpp: Added.
664         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
665         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
666         * crypto/gtk/CryptoAlgorithmHMACGtk.cpp: Added.
667         (WebCore::CryptoAlgorithmHMAC::platformSign):
668         (WebCore::CryptoAlgorithmHMAC::platformVerify):
669         * crypto/gtk/CryptoAlgorithmRSAES_PKCS1_v1_5Gtk.cpp: Added.
670         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
671         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
672         * crypto/gtk/CryptoAlgorithmRSASSA_PKCS1_v1_5Gtk.cpp: Added.
673         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
674         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
675         * crypto/gtk/CryptoAlgorithmRSA_OAEPGtk.cpp: Added.
676         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
677         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
678         * crypto/gtk/CryptoAlgorithmRegistryGtk.cpp: Added.
679         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
680         * crypto/gtk/CryptoDigestGtk.cpp: Added.
681         (WebCore::CryptoDigest::CryptoDigest):
682         (WebCore::CryptoDigest::~CryptoDigest):
683         (WebCore::CryptoDigest::create):
684         (WebCore::CryptoDigest::addBytes):
685         (WebCore::CryptoDigest::computeHash):
686         * crypto/gtk/CryptoKeyRSAGtk.cpp: Added.
687         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
688         (WebCore::CryptoKeyRSA::create):
689         (WebCore::CryptoKeyRSA::~CryptoKeyRSA):
690         (WebCore::CryptoKeyRSA::restrictToHash):
691         (WebCore::CryptoKeyRSA::isRestrictedToHash):
692         (WebCore::CryptoKeyRSA::keySizeInBits):
693         (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
694         (WebCore::CryptoKeyRSA::exportData):
695         (WebCore::CryptoKeyRSA::generatePair):
696         * crypto/gtk/SerializedCryptoKeyWrapGtk.cpp: Added.
697         (WebCore::getDefaultWebCryptoMasterKey):
698         (WebCore::wrapSerializedCryptoKey):
699         (WebCore::unwrapSerializedCryptoKey):
700         * crypto/keys/CryptoKeyRSA.h:
701
702 2014-08-10  Benjamin Poulain  <bpoulain@apple.com>
703
704         Remove inputSpeech.png
705         https://bugs.webkit.org/show_bug.cgi?id=135771
706
707         Reviewed by Andreas Kling.
708
709         * Resources/inputSpeech.png: Removed.
710         * WebCore.xcodeproj/project.pbxproj:
711
712 2014-08-10  Tim Horton  <timothy_horton@apple.com>
713
714         Yelp phone number highlights often disappear
715         https://bugs.webkit.org/show_bug.cgi?id=135789
716         <rdar://problem/17971057>
717
718         Reviewed by Brady Eidson.
719
720         * editing/Editor.cpp:
721         (WebCore::Editor::scanSelectionForTelephoneNumbers):
722         (WebCore::Editor::clearDataDetectedTelephoneNumbers): Deleted.
723         * editing/Editor.h:
724         (WebCore::Editor::detectedTelephoneNumberRanges):
725         * page/EditorClient.h:
726         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
727         Cache and expose detected telephone number ranges on Editor.
728         Change selectedTelephoneNumberRangesChanged to take no arguments; it's
729         just a notification now.
730
731 2014-08-09  Zalan Bujtas  <zalan@apple.com>
732
733         Subpixel rendering: Transforms on non-compositing layers leave bits behind when the box boundaries changes.
734         https://bugs.webkit.org/show_bug.cgi?id=135786
735
736         Reviewed by Simon Fraser.
737
738         Since we don't control the transformed context painting's snapping strategy, our best bet to fully
739         include the transformed box when requesting for repaint is to use enclosing.
740         Pixelsnapping doesn't work here for all cases. For example, a scaled box at 0.8px can be anti-aliased painted
741         both at 0.5px and 1px, while with pixelsnapping we'd expect it to be painted starting from 1px;
742
743         Test: fast/repaint/hidpi-transform-on-subpixel-repaintrect.html
744
745         * rendering/RenderBox.cpp:
746         (WebCore::RenderBox::computeRectForRepaint): enclose the result of the transform.
747
748 2014-08-08  Mark Lam  <mark.lam@apple.com>
749
750         REGRESSION: Inspector crashes when debugger is paused and injected scripts access window.screen().
751         <https://webkit.org/b/135656>
752
753         Not reviewed.
754
755         Rolling out r170680 which was merged to ToT in r172129.
756
757         * bindings/js/ScriptController.cpp:
758         (WebCore::ScriptController::attachDebugger):
759
760 2014-08-08  Peyton Randolph  <prandolph@apple.com>
761
762         Implement long mouse press over links. Part of 135257 - Add long mouse press gesture.
763         https://bugs.webkit.org/show_bug.cgi?id=135476
764
765         Reviewed by Tim Horton.
766
767         * page/EventHandler.cpp:
768         (WebCore::EventHandler::EventHandler): 
769         (WebCore::EventHandler::clear): Clear long press state.
770         (WebCore::EventHandler::handleMousePressEvent): Start the long-press if the mouse press is a left
771         mouse press over a link.
772         (WebCore::EventHandler::eventMayStartDrag): We cannot start a drag if we've recognized a long press.
773         (WebCore::EventHandler::handleMouseReleaseEvent): 
774         If we didn't recognize a long press, cancel the long press.
775         (WebCore::EventHandler::beginTrackingPotentialLongMousePress): 
776         Begin the long mouse press by kicking off a timer. If the timer fires before the long press is
777         cancelled, the long press is recognized.
778         (WebCore::EventHandler::recognizeLongMousePress): Added. Trigger the long-press and disable other
779         actions like dragging.
780         (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Added. Cancel the long press by 
781         clearing related state.
782         (WebCore::EventHandler::clearLongMousePressState): Added. Clear long press state.
783         (WebCore::EventHandler::handleLongMousePressMouseMovedEvent): Added. Cancel the long press if
784         the mouse moves outside a specified hysteresis interval.
785         (WebCore::EventHandler::handleMouseMoveEvent): Ask handleLongMousePressMouseMovedEvent whether to
786         return early and not update hovers, cursors, drags, etc.
787         (WebCore::EventHandler::dragHysteresisExceeded): Factor out the hysteresis bounds check into
788         mouseHysteresisExceeded().
789         (WebCore::EventHandler::handleDrag): Cancel long press upon starting drag.
790         (WebCore::EventHandler::mouseHysteresisExceeded): Added. General hysteresis function that takes an
791         arbitrary mouse movement threshold. Factored out from dragHysteresisExceeded.
792         * page/EventHandler.h:
793
794 2014-08-08  Simon Fraser  <simon.fraser@apple.com>
795
796         [WK2] Scrolling does not work inside nested frames
797         https://bugs.webkit.org/show_bug.cgi?id=135775
798         <rdar://problem/17959896>
799
800         Reviewed by Tim Horton.
801         
802         r169733 added an "isMainFrame" check in AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged.
803         However we have to rebuild the non-fast-scrollable region when any subframe changes,
804         even a deeply nested one. So always rebuild it, starting from the root frame.
805         
806         Fixes scrolling on nested framesets like http://www.opengl.org/sdk/docs/man3/.
807
808         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability.html
809
810         * page/scrolling/AsyncScrollingCoordinator.cpp:
811         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
812
813 2014-08-08  Bem Jones-Bey  <bjonesbe@adobe.com>
814
815         [CSS Shapes] Refactor getExcludedIntervals since only one LineSegment is ever returned
816         https://bugs.webkit.org/show_bug.cgi?id=135757
817
818         Reviewed by Zoltan Horvath.
819
820         The interface for getExcludedIntervals was designed when shape-inside
821         was still a thing, and it was possible for a line in a shape to have
822         multiple segments. shape-outside can only have one segment per line,
823         so this refactors the code to simplify and reflect that reality.
824
825         No new test, no behavior change.
826
827         * rendering/shapes/BoxShape.cpp:
828         (WebCore::BoxShape::getExcludedInterval): 
829         (WebCore::BoxShape::getExcludedIntervals): Deleted.
830         * rendering/shapes/BoxShape.h:
831         * rendering/shapes/PolygonShape.cpp:
832         (WebCore::PolygonShape::getExcludedInterval):
833         (WebCore::PolygonShape::getExcludedIntervals): Deleted.
834         * rendering/shapes/PolygonShape.h:
835         * rendering/shapes/RasterShape.cpp:
836         (WebCore::RasterShape::getExcludedInterval):
837         (WebCore::RasterShape::getExcludedIntervals): Deleted.
838         * rendering/shapes/RasterShape.h:
839         * rendering/shapes/RectangleShape.cpp:
840         (WebCore::RectangleShape::getExcludedInterval):
841         (WebCore::RectangleShape::getExcludedIntervals): Deleted.
842         * rendering/shapes/RectangleShape.h:
843         * rendering/shapes/Shape.h:
844         (WebCore::LineSegment::LineSegment):
845         * rendering/shapes/ShapeOutsideInfo.cpp:
846         (WebCore::ShapeOutsideInfo::logicalLeftOffset):
847         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
848         (WebCore::ShapeOutsideInfo::computeSegmentsForLine): Deleted.
849         * rendering/shapes/ShapeOutsideInfo.h:
850
851 2014-08-08  Brian J. Burg  <burg@cs.washington.edu>
852
853         Web Inspector: add debugging flag to InspectorTest for unbuffered logging to stderr
854         https://bugs.webkit.org/show_bug.cgi?id=135726
855
856         Reviewed by Timothy Hatcher.
857
858         Add a bridge so that InspectorTest can synchronously log to the console.
859
860         * inspector/InspectorFrontendHost.cpp:
861         (WebCore::InspectorFrontendHost::unbufferedLog): Added.
862         * inspector/InspectorFrontendHost.h:
863         * inspector/InspectorFrontendHost.idl:
864
865 2014-08-08  Roger Fong  <roger_fong@apple.com>
866
867         Adjustments to CueBox CSS Width calculations.
868         https://bugs.webkit.org/show_bug.cgi?id=135759
869         <rdar://problem/17954473>.
870
871         Reviewed by Eric Carlson.
872
873         This is a followup patch that addresses some of the test failures caused by r172224.
874         These tests were skipped in r172253.
875         * html/shadow/MediaControlElements.cpp:
876         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
877         Tell the cue boxes that they need to be updated when the font size specified in the user prefs changes.
878         
879         Cap width to 100%, calculate max-width in percentages instead of pixels.
880         * html/track/TextTrackCueGeneric.cpp:
881         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
882         * html/track/VTTCue.cpp:
883         (WebCore::VTTCueBox::applyCSSProperties):
884
885         (WebCore::VTTCue::setFontSize):
886         Remove some unnecessary code that doesn't actually work.
887         Make sure to tell cuebox that it needs to be updated.
888         * html/track/VTTCue.h: Change float constant to double.
889
890 2014-08-08  Simon Fraser  <simon.fraser@apple.com>
891
892         Clean up image subsampling code, make it less iOS-specific
893         https://bugs.webkit.org/show_bug.cgi?id=134916
894
895         Reviewed by Dean Jackson.
896
897         Compile the image subsampling code on both Mac and iOS, and make it more platform
898         neutral in general. Add a setting to allow it to be enabled on Mac for testing.
899         
900         The most significant changes are in ImageSourceCG and BitmapImageCG. CG's ImageSource
901         is no longer stateful with respect to subsampling; its functions take a SubsamplingLevel
902         when appropriate. CG's BitmapImage now determines which level of subsampling to use
903         for a given frame, storing the subsampling level in the frame data. It can replace
904         an aggressively subsampled frame with a less subsampled frame if necessary.
905         
906         To reduce the chances of subsampling affecting rendering, BitmapImage::size() now
907         always returns the non-subsampled size; subsampling is strictly internal to BitmapImage.
908         BitmapImage::draw() takes care of scaling the srcRect for subsampled images.
909         
910         iOS had a code path that enabled caching of frame metadata in BitmapImage without
911         actually decoding the frame; make this cross-platform.
912         
913         Fix a couple of issues in the original pathc: remove a log, and ImageSource::allowSubsamplingOfFrameAtIndex()
914         return false.
915
916         * WebCore.exp.in: Changed signature for GraphicsContext::drawNativeImage().
917         * WebCore.xcodeproj/project.pbxproj: Added ImageSource.cpp, which is not built
918         for Cocoa but useful for reference.
919         * loader/cache/CachedImage.cpp:
920         (WebCore::CachedImage::imageSizeForRenderer): Remove iOS-specific subsampling code.
921         (WebCore::CachedImage::createImage): Call setAllowSubsampling() on the image if we
922         can get to Settings (m_loader is null for image documents).
923         (WebCore::CachedImage::currentFrameKnownToBeOpaque): This forced decode always
924         caused creation of the non-subsampled image, so remove it. There's no reason to
925         eagerly decode the frame here.
926         * loader/cache/CachedImage.h: Fix comment.
927         * page/Settings.cpp: Add defaultImageSubsamplingEnabled, true for iOS and false for Mac.
928         * page/Settings.in: Added imageSubsamplingEnabled.
929         * platform/graphics/BitmapImage.cpp:
930         (WebCore::BitmapImage::BitmapImage): Init some more things. Default m_allowSubsampling to
931         true for iOS to catch images created in code paths where we can't get to Settings.
932         (WebCore::BitmapImage::haveFrameAtIndex): Handy helper.
933         (WebCore::BitmapImage::cacheFrame): Now takes the subsampling level and whether to cache
934         just metadata, or also the frame.
935         (WebCore::BitmapImage::didDecodeProperties): No need to store originalSize.
936         (WebCore::BitmapImage::updateSize): When we get the size for the first time, call
937         determineMinimumSubsamplingLevel() to choose a reasonable subsampling level which takes
938         platform-specific limits into account.
939         (WebCore::BitmapImage::dataChanged): Comment.
940         (WebCore::BitmapImage::ensureFrameIsCached): Take ImageFrameCaching into account.
941         (WebCore::BitmapImage::frameAtIndex): Choose a subsampling level given the scale,
942         then determine if we can use the currently cached frame, or whether we should resample.
943         (WebCore::BitmapImage::frameIsCompleteAtIndex): Caching m_isComplete is now done when caching
944         frame metadata.
945         (WebCore::BitmapImage::frameDurationAtIndex):
946         (WebCore::BitmapImage::frameHasAlphaAtIndex): The 'true' return is the safe return value.
947         (WebCore::BitmapImage::frameOrientationAtIndex): Caching m_orientation is now done when caching
948         frame metadata.
949         (WebCore::BitmapImage::cacheFrameInfo): Deleted.
950         (WebCore::BitmapImage::originalSize): Deleted.
951         (WebCore::BitmapImage::originalSizeRespectingOrientation): Deleted.
952         (WebCore::BitmapImage::currentFrameSize): Deleted.
953         (WebCore::BitmapImage::ensureFrameInfoIsCached): Deleted.
954         * platform/graphics/BitmapImage.h:
955         (WebCore::FrameData::FrameData):
956         * platform/graphics/GraphicsContext.h: No need to pass a scale param now.
957         * platform/graphics/ImageSource.cpp: Non-Cocoa changes.
958         (WebCore::ImageSource::subsamplingLevelForScale):
959         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
960         (WebCore::ImageSource::size):
961         (WebCore::ImageSource::frameSizeAtIndex):
962         (WebCore::ImageSource::createFrameAtIndex):
963         (WebCore::ImageSource::frameBytesAtIndex):
964         * platform/graphics/ImageSource.h: No longer stores subsampling state.
965         (WebCore::ImageSource::isSubsampled): Deleted.
966         * platform/graphics/cairo/BitmapImageCairo.cpp:
967         (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
968         * platform/graphics/cg/BitmapImageCG.cpp:
969         (WebCore::FrameData::clear):
970         (WebCore::BitmapImage::BitmapImage): Init more members.
971         (WebCore::BitmapImage::determineMinimumSubsamplingLevel): Choose a minimum subsampling
972         level for the platform (subsample until the image area falls under a threshold).
973         (WebCore::BitmapImage::checkForSolidColor): Don't bother decoding frames if the image
974         is not 1x1. Also take care not to decode a non-subsampled image.
975         (WebCore::BitmapImage::draw): The actual bug fix is here; remove logic that
976         computed srcRectForCurrentFrame from m_size and m_originalSize; for some callers
977         srcRect was computed using the pre-subsampled size, and for others it was the subsampled size.
978         Instead, scale srcRect by mapping between the non-subsampled size, and the size of the CGImageRef
979         which is affected by subsampling.
980         (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
981         * platform/graphics/cg/GraphicsContext3DCG.cpp:
982         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Remove #ifdeffed code.
983         (WebCore::GraphicsContext3D::paintToCanvas):
984         * platform/graphics/cg/GraphicsContextCG.cpp:
985         (WebCore::GraphicsContext::drawNativeImage): No more weird scaling!
986         * platform/graphics/cg/ImageBufferCG.cpp:
987         (WebCore::ImageBuffer::draw):
988         * platform/graphics/cg/ImageSourceCG.cpp:
989         (WebCore::ImageSource::ImageSource):
990         (WebCore::createImageSourceOptions): Helper that always returns a new CFDictionaryRef.
991         (WebCore::imageSourceOptions): If not subsampling, return the cached CFDictionaryRef, otherwise
992         make a new options dict and return it.
993         (WebCore::ImageSource::subsamplingLevelForScale): Helper that returns a subsampling level
994         between 0 and 3 given a scale.
995         (WebCore::ImageSource::isSizeAvailable): SkipMetadata is a default value for the param now.
996         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex): We turn off subsampling for progressive
997         JPEGs because of a bug, so need this to know if a frame should be subsampled.
998         (WebCore::ImageSource::frameSizeAtIndex): The looping to find a subsampling level is now in BitmapImageCG.
999         (WebCore::ImageSource::orientationAtIndex):
1000         (WebCore::ImageSource::size): Always use a subsampling level of 0 for size().
1001         (WebCore::ImageSource::getHotSpot):
1002         (WebCore::ImageSource::repetitionCount):
1003         (WebCore::ImageSource::createFrameAtIndex): The caller mapped a scale to a level.
1004         (WebCore::ImageSource::frameDurationAtIndex):
1005         (WebCore::ImageSource::frameBytesAtIndex):
1006         (WebCore::ImageSource::imageSourceOptions): Deleted.
1007         (WebCore::ImageSource::originalSize): Deleted.
1008         * platform/graphics/mac/ImageMac.mm:
1009         (WebCore::BitmapImage::invalidatePlatformData): 0 -> nullptr
1010         * platform/graphics/wince/ImageWinCE.cpp:
1011         (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
1012
1013 2014-08-08  Alex Christensen  <achristensen@webkit.org>
1014
1015         Progress towards using CMake on Mac.
1016         https://bugs.webkit.org/show_bug.cgi?id=135662
1017
1018         Reviewed by Laszlo Gombos.
1019
1020         * CMakeLists.txt:
1021         Added necessary include directories and idls.
1022         * PlatformEfl.cmake:
1023         * PlatformGTK.cmake:
1024         Moved ImageSource.cpp and image-decoders to platform CMake files because they are not used on mac.
1025         * PlatformMac.cmake:
1026         Corrected some sources.
1027         * config.h:
1028         Added workaround for not using prefix headers with CMake.
1029         * platform/graphics/ANGLEWebKitBridge.h:
1030         Compile fix to find ANGLE headers while using CMake.
1031         * platform/graphics/FormatConverter.h:
1032         * platform/mac/NSScrollerImpDetails.h:
1033         Removed unnecessary config.h includes.
1034
1035 2014-08-08  Zan Dobersek  <zdobersek@igalia.com>
1036
1037         [CMake] Drop the required version of CMake down to 2.8.8
1038         https://bugs.webkit.org/show_bug.cgi?id=135713
1039
1040         Reviewed by Alex Christensen.
1041
1042         * CMakeLists.txt: Use set_property() to set INCLUDE_DIRECTORIES for
1043         the ANGLESupport library. This avoids using target_include_directories()
1044         which requires CMake 2.8.11.
1045
1046 2014-08-05  Philippe Normand  <pnormand@igalia.com>
1047
1048         [GStreamer][1.4] Caps negotiation failure in playback pipeline
1049         https://bugs.webkit.org/show_bug.cgi?id=135607
1050
1051         Reviewed by Carlos Garcia Campos.
1052
1053         Ensure the capsfilters used in front of interleave negotiate their
1054         caps correctly with audioconvert which requires audio buffers with
1055         interleaved layout.
1056
1057         No new tests, existing webaudio tests will cover this change once
1058         we bump our JHBuild moduleset to GStreamer 1.4.
1059
1060         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1061         (getGStreamerMonoAudioCaps):
1062
1063 2014-08-07  Commit Queue  <commit-queue@webkit.org>
1064
1065         Unreviewed, rolling out r172291.
1066         https://bugs.webkit.org/show_bug.cgi?id=135748
1067
1068         broke background-attachment-fixed with backround-size-contain
1069         (e.g. iCloud.com) (Requested by thorton on #webkit).
1070
1071         Reverted changeset:
1072
1073         "Fixed backgrounds don't paint in blurred inset areas"
1074         https://bugs.webkit.org/show_bug.cgi?id=135712
1075         http://trac.webkit.org/changeset/172291
1076
1077 2014-08-07  Zalan Bujtas  <zalan@apple.com>
1078
1079         Subpixel rendering: Border thickness and length flooring can result empty borders
1080         due to losing precision during multiple float <-> LayoutUnit conversions.
1081         https://bugs.webkit.org/show_bug.cgi?id=135686
1082
1083         Reviewed by Simon Fraser.
1084
1085         The combination of losing precision and flooring the border thickness/length to avoid
1086         empty border rect drawing can lead to false positives of missing borders.
1087         This patch moves empty border checking right before painting where we can safely use round
1088         instead of floor.
1089
1090         Tests: fast/borders/hidpi-border-width-flooring.html
1091
1092         * rendering/RenderObject.cpp:
1093         (WebCore::drawBorderLineRect):
1094         (WebCore::drawBorderLine):
1095         (WebCore::RenderObject::drawLineForBoxSide):
1096
1097 2014-08-07  Ryuan Choi  <ryuan.choi@samsung.com>
1098
1099         [EFL] Build break with mpegts since r167025
1100         https://bugs.webkit.org/show_bug.cgi?id=135737
1101
1102         Reviewed by Gyuyoung Kim.
1103
1104         * PlatformEfl.cmake: Added includes and libraries about MPEG-TS
1105
1106 2014-08-07  Simon Fraser  <simon.fraser@apple.com>
1107
1108         HTML <sub> and <sup> elements do not work in some 64-bit builds
1109         https://bugs.webkit.org/show_bug.cgi?id=135736
1110
1111         Reviewed by Tim Horton.
1112         
1113         RootInlineBox::verticalPositionForBox() had some implicit conversions between
1114         LayoutUnit and int that caused overflow, and resulted in different comparison
1115         behavior with an int constant in different architectures, since overflow behavior
1116         is undefined.
1117         
1118         Specifically, VerticalPositionCache was written in terms of ints with a special
1119         0x80000000 "not found" value. However, 0x80000000 was being assigned to
1120         a LayoutUnit, which multiplies by 64 causing overflow. The result was then
1121         compared again with 0x80000000 which could pass or fail depending on overflow
1122         behavior.
1123         
1124         Fix by converting VerticalPositionCache to use LayoutUnits, and to have a bool
1125         return value with a result out param, instead of a special return value.
1126
1127         Not easily testable, since the difference does not show in DRT output,
1128         and a ref test would be flakey.
1129
1130         * rendering/RootInlineBox.cpp:
1131         (WebCore::RootInlineBox::ascentAndDescentForBox):
1132         * rendering/VerticalPositionCache.h:
1133         (WebCore::VerticalPositionCache::get):
1134         (WebCore::VerticalPositionCache::set):
1135
1136 2014-08-07  Benjamin Poulain  <bpoulain@apple.com>
1137
1138         Get rid of SCRIPTED_SPEECH
1139         https://bugs.webkit.org/show_bug.cgi?id=135729
1140
1141         Reviewed by Brent Fulgham.
1142
1143         * Configurations/FeatureDefines.xcconfig:
1144         * Modules/speech/SpeechGrammar.cpp: Removed.
1145         * Modules/speech/SpeechGrammar.h: Removed.
1146         * Modules/speech/SpeechGrammar.idl: Removed.
1147         * Modules/speech/SpeechGrammarList.cpp: Removed.
1148         * Modules/speech/SpeechGrammarList.h: Removed.
1149         * Modules/speech/SpeechGrammarList.idl: Removed.
1150         * Modules/speech/SpeechRecognition.cpp: Removed.
1151         * Modules/speech/SpeechRecognition.h: Removed.
1152         * Modules/speech/SpeechRecognition.idl: Removed.
1153         * Modules/speech/SpeechRecognitionAlternative.cpp: Removed.
1154         * Modules/speech/SpeechRecognitionAlternative.h: Removed.
1155         * Modules/speech/SpeechRecognitionAlternative.idl: Removed.
1156         * Modules/speech/SpeechRecognitionClient.h: Removed.
1157         * Modules/speech/SpeechRecognitionController.cpp: Removed.
1158         * Modules/speech/SpeechRecognitionController.h: Removed.
1159         * Modules/speech/SpeechRecognitionError.cpp: Removed.
1160         * Modules/speech/SpeechRecognitionError.h: Removed.
1161         * Modules/speech/SpeechRecognitionError.idl: Removed.
1162         * Modules/speech/SpeechRecognitionEvent.cpp: Removed.
1163         * Modules/speech/SpeechRecognitionEvent.h: Removed.
1164         * Modules/speech/SpeechRecognitionEvent.idl: Removed.
1165         * Modules/speech/SpeechRecognitionResult.cpp: Removed.
1166         * Modules/speech/SpeechRecognitionResult.h: Removed.
1167         * Modules/speech/SpeechRecognitionResult.idl: Removed.
1168         * Modules/speech/SpeechRecognitionResultList.cpp: Removed.
1169         * Modules/speech/SpeechRecognitionResultList.h: Removed.
1170         * Modules/speech/SpeechRecognitionResultList.idl: Removed.
1171         * bindings/generic/RuntimeEnabledFeatures.cpp:
1172         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1173         * bindings/generic/RuntimeEnabledFeatures.h:
1174         (WebCore::RuntimeEnabledFeatures::setScriptedSpeechEnabled): Deleted.
1175         (WebCore::RuntimeEnabledFeatures::scriptedSpeechEnabled): Deleted.
1176         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEnabled): Deleted.
1177         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionErrorEnabled): Deleted.
1178         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled): Deleted.
1179         (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarEnabled): Deleted.
1180         (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarListEnabled): Deleted.
1181         * bindings/js/JSDictionary.cpp:
1182         (WebCore::JSDictionary::convertValue): Deleted.
1183         * bindings/js/JSDictionary.h:
1184         * dom/EventNames.in:
1185         * dom/EventTargetFactory.in:
1186
1187 2014-08-07  Brent Fulgham  <bfulgham@apple.com>
1188
1189         [Win] Unreviewed gardening.
1190
1191         Don't build the JSFileException and JSFileReaderSync files in 64-bit; they are already part
1192         of DerivedObjects.cpp.
1193
1194         * WebCore.vcxproj/WebCore.vcxproj: Exclude JSFileException and JSFileReaderSync to avoid
1195         multiple definitions of symbols.
1196
1197 2014-08-07  Enrica Casucci  <enrica@apple.com>
1198
1199         [Services with UI] Action menu does not appear if selection includes both text and an image.
1200         https://bugs.webkit.org/show_bug.cgi?id=135731
1201         <rdar://problem/17837491>
1202
1203         Reviewed by Brady Eidson.
1204
1205         When collecting selection rects via SelectionRectGatherer we should also note if the selection
1206         contains non text elements. This way the Notifier class can send that information to ServicesOverlayController
1207         to properly handle the highlight for the service.
1208
1209         * editing/SelectionRectGatherer.cpp:
1210         (WebCore::SelectionRectGatherer::SelectionRectGatherer):
1211         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
1212         (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
1213         * editing/SelectionRectGatherer.h:
1214         (WebCore::SelectionRectGatherer::setTextOnly):
1215         (WebCore::SelectionRectGatherer::isTextOnly):
1216         * page/EditorClient.h:
1217         (WebCore::EditorClient::selectionRectsDidChange):
1218         * rendering/RenderView.cpp:
1219         (WebCore::RenderView::applySubtreeSelection):
1220
1221 2014-08-07  Andy Estes  <aestes@apple.com>
1222
1223         [Mac] Parental Controls content filter is mistakenly enabled for HTTP responses
1224         https://bugs.webkit.org/show_bug.cgi?id=135730
1225
1226         Reviewed by Brady Eidson.
1227
1228         On the Mac, the WebFilterEvaluator (Parental Controls) content filter should only be enabled for HTTPS
1229         responses. During iOS upstreaming we mistakenly enabled it for HTTP responses as well, and this causes HTTP
1230         responses to be filtered twice -- once by the Parental Controls HTTP proxy and once by WebCore. Revert to the
1231         pre-upstreaming behavior and only enable the content filter for HTTPS responses.
1232
1233         No new tests. Content filtering is not testable from WebKit.
1234
1235         * loader/DocumentLoader.cpp:
1236         (WebCore::DocumentLoader::responseReceived): Passed the response to ContentFilter::canHandleResponse().
1237         * platform/ContentFilter.h:
1238         * platform/mac/ContentFilterMac.mm:
1239         (WebCore::ContentFilter::canHandleResponse): Renamed from isEnabled(). Checks the response's scheme on Mac to
1240         determine whether WebFilterEvaluator should be used.
1241         (WebCore::ContentFilter::isEnabled): Deleted.
1242
1243 2014-08-07  Beth Dakin  <bdakin@apple.com>
1244
1245         Fixed backgrounds don't paint in blurred inset areas
1246         https://bugs.webkit.org/show_bug.cgi?id=135712
1247
1248         Reviewed by Simon Fraser.
1249
1250         Background geometry calculations for fixed background need to use the larger 
1251         visible rect. 
1252
1253         * rendering/RenderBoxModelObject.cpp:
1254         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1255
1256 2014-08-07  Jer Noble  <jer.noble@apple.com>
1257
1258         [EME][Mac] Error codes returned by AVSampleBufferDisplayLayer are negative; clip when passed to JavaScript as doubles.
1259         https://bugs.webkit.org/show_bug.cgi?id=135710
1260
1261         Reviewed by Brent Fulgham.
1262
1263         Return the absolute value of the error codes returned by AVSampleBufferDisplayLayer, so that the conversion from
1264         unsigned -> double does not clip due to the (converted) value being greater than 2^53.
1265
1266         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1267         (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
1268         (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
1269
1270 2014-08-07  Daniel Bates  <dabates@apple.com>
1271
1272         Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
1273         https://bugs.webkit.org/show_bug.cgi?id=135688
1274         <rdar://problem/17886686>
1275
1276         Reviewed by Alexey Proskuryakov.
1277
1278         Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
1279         function may not be executed and hence Gmail will not display the list of messages and
1280         will subsequently display an error message.
1281
1282         When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
1283         may still load the main resource, say if substitute data is available for it, and defer executing
1284         tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
1285         of pending tasks for the associated Document. This list of pending tasks is never processed when
1286         a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
1287         execute a SQLTransactionCallback function that was deferred.
1288
1289         Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
1290         be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
1291         lack of JavaScript script execution (since substitute data wasn't loaded and hence any JavaScript
1292         script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
1293         it's sufficient to only defer executing tasks when either there are existing pending tasks or the
1294         page defers loading and active DOM objects in the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).
1295
1296         * dom/Document.cpp:
1297         (WebCore::Document::postTask):
1298
1299 2014-08-07  Benjamin Poulain  <bpoulain@apple.com>
1300
1301         Get rid of INPUT_SPEECH
1302         https://bugs.webkit.org/show_bug.cgi?id=135672
1303
1304         Reviewed by Andreas Kling.
1305
1306         * CMakeLists.txt:
1307         * Configurations/FeatureDefines.xcconfig:
1308         * DerivedSources.make:
1309         * Modules/speech/SpeechSynthesis.cpp:
1310         * WebCore.vcxproj/WebCore.vcxproj:
1311         * WebCore.vcxproj/WebCore.vcxproj.filters:
1312         * WebCore.xcodeproj/project.pbxproj:
1313         * bindings/generic/RuntimeEnabledFeatures.cpp:
1314         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1315         * bindings/generic/RuntimeEnabledFeatures.h:
1316         (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled): Deleted.
1317         (WebCore::RuntimeEnabledFeatures::speechInputEnabled): Deleted.
1318         (WebCore::RuntimeEnabledFeatures::webkitSpeechEnabled): Deleted.
1319         (WebCore::RuntimeEnabledFeatures::webkitGrammarEnabled): Deleted.
1320         * css/CSSPrimitiveValueMappings.h:
1321         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1322         * css/CSSValueKeywords.in:
1323         * css/html.css:
1324         (input::-webkit-input-speech-button): Deleted.
1325         * dom/Element.h:
1326         (WebCore::Element::isInputFieldSpeechButtonElement): Deleted.
1327         * dom/EventNames.in:
1328         * html/HTMLInputElement.cpp:
1329         (WebCore::HTMLInputElement::parseAttribute):
1330         (WebCore::HTMLInputElement::speechButtonElement): Deleted.
1331         (WebCore::HTMLInputElement::isSpeechEnabled): Deleted.
1332         * html/HTMLInputElement.h:
1333         * html/HTMLInputElement.idl:
1334         * html/InputType.cpp:
1335         (WebCore::InputType::shouldRespectListAttribute):
1336         (WebCore::InputType::shouldRespectSpeechAttribute): Deleted.
1337         * html/InputType.h:
1338         (WebCore::InputType::speechButtonElement): Deleted.
1339         * html/NumberInputType.cpp:
1340         (WebCore::NumberInputType::shouldRespectSpeechAttribute): Deleted.
1341         * html/NumberInputType.h:
1342         * html/PasswordInputType.cpp:
1343         (WebCore::PasswordInputType::shouldRespectSpeechAttribute): Deleted.
1344         * html/PasswordInputType.h:
1345         * html/SearchInputType.cpp:
1346         (WebCore::SearchInputType::shouldRespectSpeechAttribute): Deleted.
1347         * html/SearchInputType.h:
1348         * html/TelephoneInputType.cpp:
1349         (WebCore::TelephoneInputType::shouldRespectSpeechAttribute): Deleted.
1350         * html/TelephoneInputType.h:
1351         * html/TextFieldInputType.cpp:
1352         (WebCore::TextFieldInputType::needsContainer):
1353         (WebCore::TextFieldInputType::createShadowSubtree):
1354         (WebCore::TextFieldInputType::destroyShadowSubtree):
1355         (WebCore::TextFieldInputType::speechButtonElement): Deleted.
1356         * html/TextFieldInputType.h:
1357         * html/TextInputType.cpp:
1358         (WebCore::TextInputType::shouldRespectSpeechAttribute): Deleted.
1359         * html/TextInputType.h:
1360         * html/shadow/TextControlInnerElements.cpp:
1361         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement): Deleted.
1362         (WebCore::InputFieldSpeechButtonElement::~InputFieldSpeechButtonElement): Deleted.
1363         (WebCore::InputFieldSpeechButtonElement::create): Deleted.
1364         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Deleted.
1365         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents): Deleted.
1366         (WebCore::InputFieldSpeechButtonElement::setState): Deleted.
1367         (WebCore::InputFieldSpeechButtonElement::speechInput): Deleted.
1368         (WebCore::InputFieldSpeechButtonElement::didCompleteRecording): Deleted.
1369         (WebCore::InputFieldSpeechButtonElement::didCompleteRecognition): Deleted.
1370         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): Deleted.
1371         (WebCore::InputFieldSpeechButtonElement::willAttachRenderers): Deleted.
1372         (WebCore::InputFieldSpeechButtonElement::willDetachRenderers): Deleted.
1373         (WebCore::InputFieldSpeechButtonElement::startSpeechInput): Deleted.
1374         (WebCore::InputFieldSpeechButtonElement::stopSpeechInput): Deleted.
1375         * html/shadow/TextControlInnerElements.h:
1376         (WebCore::toInputFieldSpeechButtonElement): Deleted.
1377         * page/SpeechInput.cpp: Removed.
1378         * page/SpeechInput.h: Removed.
1379         * page/SpeechInputClient.h: Removed.
1380         * page/SpeechInputEvent.cpp: Removed.
1381         * page/SpeechInputEvent.h: Removed.
1382         * page/SpeechInputEvent.idl: Removed.
1383         * page/SpeechInputListener.h: Removed.
1384         * page/SpeechInputResult.cpp: Removed.
1385         * page/SpeechInputResult.h: Removed.
1386         * page/SpeechInputResult.idl: Removed.
1387         * page/SpeechInputResultList.cpp: Removed.
1388         * page/SpeechInputResultList.h: Removed.
1389         * page/SpeechInputResultList.idl: Removed.
1390         * platform/ThemeTypes.h:
1391         * rendering/RenderInputSpeech.cpp: Removed.
1392         * rendering/RenderInputSpeech.h: Removed.
1393         * rendering/RenderTheme.cpp:
1394         (WebCore::RenderTheme::adjustStyle):
1395         (WebCore::RenderTheme::paint):
1396         (WebCore::RenderTheme::paintBorderOnly):
1397         (WebCore::RenderTheme::paintDecorations):
1398         (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle): Deleted.
1399         (WebCore::RenderTheme::paintInputFieldSpeechButton): Deleted.
1400         * rendering/RenderTheme.h:
1401         * rendering/RenderThemeMac.mm:
1402         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1403
1404 2014-08-07  Eric Carlson  <eric.carlson@apple.com>
1405
1406         Create UTF-8 string from in-band VTT cues
1407         https://bugs.webkit.org/show_bug.cgi?id=135716
1408
1409         Reviewed by Brent Fulgham.
1410
1411         Tests will be added in https://bugs.webkit.org/show_bug.cgi?id=135717.
1412
1413         * platform/graphics/ISOVTTCue.cpp:
1414         (WebCore::ISOBox::peekString): Call String::fromUTF8 because we know that VTT is always
1415             UTF-8.
1416
1417 2014-08-06  Jeremy Jones  <jeremyj@apple.com>
1418
1419         Disable implicit animations on video layer.
1420         https://bugs.webkit.org/show_bug.cgi?id=135679
1421
1422         Reviewed by Eric Carlson.
1423
1424         Disable implicit animations on AVPlayerLayer except when setting fullscreen frame.
1425         This prevents unwanted animations.
1426
1427         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1428         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): disable implicit animations
1429         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): allow implicit animations while changing fullscreen frame.
1430
1431 2014-08-07  Gordon Sheridan  <gordon_sheridan@apple.com>
1432
1433         Provide methods to clear undesired references to HistoryItems that have been removed from the back/forard list.
1434         https://bugs.webkit.org/show_bug.cgi?id=135634
1435         <rdar://problem/17388461>
1436
1437         Reviewed by Brady Eidson.
1438
1439         No new tests.  Would require an API test that also needs an httpd, which we don't currently support.
1440
1441         * WebCore.exp.in:
1442         Added export for Page::clearPreviousItemFromAllPages.
1443
1444         * loader/HistoryController.cpp:
1445         (WebCore::HistoryController::clearPreviousItem):
1446         Clear m_previousItem and iterate over children recursively calling clearPreviousItem().
1447         The m_previousItem is cleared for the target HistoryController, and all of its descendents.
1448
1449         * loader/HistoryController.h:
1450         Declared HistoryController::clearPreviousItem.
1451
1452         * page/Page.cpp:
1453         (WebCore::Page::clearPreviousItemFromAllPages):
1454         Iterate over each page in the web process, checking if the previous item of
1455         the HistoryController for the main frame is the same as the item being removed. If so, the
1456         frameTree is traversed and each associated HistoryController has its m_previousItem cleared.
1457
1458         * page/Page.h:
1459         Declared Page::clearPreviousItemFromAllPages.
1460
1461 2014-08-07  Roger Fong  <roger_fong@apple.com>
1462
1463         Unreviewed build fix attempt #2 following r172224.
1464
1465         * html/track/VTTCue.cpp:
1466         (WebCore::VTTCueBox::applyCSSProperties):
1467
1468 2014-08-07  Roger Fong  <roger_fong@apple.com>
1469
1470         Unreviewed build fix following r172224.
1471
1472         * html/track/TextTrackCueGeneric.cpp:
1473         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
1474         * html/track/VTTCue.cpp:
1475         (WebCore::VTTCueBox::applyCSSProperties):
1476         * html/track/VTTCue.h:
1477
1478 2014-08-07  Daniel Bates  <dabates@apple.com>
1479
1480         Unreviewed, rolling out r172219.
1481
1482         Caused some /fast/workers tests to fail; will investigate
1483         offline.
1484
1485         Reverted changeset:
1486
1487         "Sometimes Gmail cannot load messages, particularly on refresh
1488         ("...the application ran into an unexpected error...")"
1489         https://bugs.webkit.org/show_bug.cgi?id=135688
1490         http://trac.webkit.org/changeset/172219
1491
1492 2014-08-06  Roger Fong  <roger_fong@apple.com>
1493
1494         Increase width of caption container if a larger font size is selected from user prefs.
1495         https://bugs.webkit.org/show_bug.cgi?id=135677.
1496
1497         Reviewed by Brent Fulgham.
1498
1499         * html/shadow/MediaControlElements.cpp:
1500         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1501         Upon creation of a VTTCueBox make sure to supply the font size set by the user prefs.
1502         * html/track/TextTrackCueGeneric.cpp:
1503         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
1504         Increase the width of the cue box based on user prefs font size selection.
1505
1506         * html/track/VTTCue.h:
1507         Keep track of the font size set in the user prefs for use when the cue boxes are created.
1508         (WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
1509         * html/track/VTTCue.cpp:
1510         (WebCore::VTTCueBox::applyCSSProperties):
1511         Increase the width of the cue box based on user prefs font size selection.
1512         (WebCore::VTTCue::getDisplayTree):
1513         (WebCore::VTTCue::setFontSize):
1514         If the font size set is important then we don't want to use the font size set by user prefs, set it to 0.
1515
1516 2014-08-07  Alex Christensen  <achristensen@webkit.org>
1517
1518         Unreviewed build fix after r172220.
1519
1520         * css/SelectorChecker.cpp:
1521         (WebCore::hasScrollbarPseudoElement):
1522         Use ASSERT_UNUSED instead of just ASSERT.
1523
1524 2014-08-07  Alex Christensen  <achristensen@webkit.org>
1525
1526         Compile scrollbar pseudoclass css selectors.
1527         https://bugs.webkit.org/show_bug.cgi?id=135242
1528
1529         Reviewed by Benjamin Poulain.
1530
1531         Tests: scrollbars/corner-resizer-window-inactive.html
1532                scrollbars/scrollbar-selectors.html
1533
1534         * css/ElementRuleCollector.cpp:
1535         (WebCore::ElementRuleCollector::ruleMatches):
1536         Changed assertion because there are pseudo-elements selectors that return CannotCompileAnything now, which
1537         make SimpleSelectorCheckers.
1538         Add scrollbar, scrollbarPart, and document to the CheckingContext and compile scrollbar pseudo-element selectors.
1539         * css/SelectorChecker.cpp:
1540         (WebCore::hasScrollbarPseudoElement):
1541         Added.  Logic moved from matchRecursively to be easier to read and to add assertions.
1542         context.scrollbar is always non-null when dynamicPseudo is SCROLLBAR_CORNER.
1543         (WebCore::SelectorChecker::matchRecursively):
1544         Moved logic to hasScrollbarPseudoElement.
1545         (WebCore::SelectorChecker::checkOne):
1546         checkScrollbarPseudoClass accesses the document through the element now.
1547         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
1548         * css/SelectorChecker.h:
1549         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
1550         * css/SelectorCheckerTestFunctions.h:
1551         (WebCore::scrollbarMatchesEnabledPseudoClass):
1552         (WebCore::scrollbarMatchesDisabledPseudoClass):
1553         (WebCore::scrollbarMatchesHoverPseudoClass):
1554         (WebCore::scrollbarMatchesActivePseudoClass):
1555         (WebCore::scrollbarMatchesHorizontalPseudoClass):
1556         (WebCore::scrollbarMatchesVerticalPseudoClass):
1557         (WebCore::scrollbarMatchesDecrementPseudoClass):
1558         (WebCore::scrollbarMatchesIncrementPseudoClass):
1559         (WebCore::scrollbarMatchesStartPseudoClass):
1560         (WebCore::scrollbarMatchesEndPseudoClass):
1561         (WebCore::scrollbarMatchesDoubleButtonPseudoClass):
1562         (WebCore::scrollbarMatchesSingleButtonPseudoClass):
1563         (WebCore::scrollbarMatchesNoButtonPseudoClass):
1564         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
1565         Move scrollbar selector logic from SelectorChecker.cpp to SelectorCheckerTestFunctions.h
1566         For window-inactive pseudo classes, we now access the document through the element instead of as a separate parameter.
1567         * cssjit/SelectorCompiler.cpp:
1568         (WebCore::SelectorCompiler::SelectorFragment::appendUnoptimizedPseudoClassWithContext):
1569         (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
1570         (WebCore::SelectorCompiler::addPseudoClassType):
1571         (WebCore::SelectorCompiler::isScrollbarPseudoElement):
1572         (WebCore::SelectorCompiler::constructFragments):
1573         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1574         Call functions for unoptimized pseudo classes that require a context.
1575         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateContextFunctionCallTest):
1576         Added.  Similar to generateElementFunctionCallTest, but the CheckingContext pointer is stored on the stack instead of a dedicated register.
1577         * cssjit/SelectorCompiler.h:
1578         Added scrollbar, scrollbarPart, and document to the CheckingContext.
1579         (WebCore::SelectorCompiler::CheckingContext::document):
1580         Added method to access the document in a way that is syntactically equal to SelectorCheckingContext.
1581         This way, the template functions in SelectorCheckerTestFunctions.h can be compiled with both context types,
1582         but the context types store the document differently.
1583
1584 2014-08-07  Daniel Bates  <dabates@apple.com>
1585
1586         Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
1587         https://bugs.webkit.org/show_bug.cgi?id=135688
1588         <rdar://problem/17886686>
1589
1590         Reviewed by Maciej Stachowiak.
1591
1592         Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
1593         function may not be executed and hence Gmail will not display the list of messages and
1594         will subsequently display an error message.
1595
1596         When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
1597         may still load the main resource, say if substitute data is available for it, and defer executing
1598         tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
1599         of pending tasks for the associated Document. This list of pending tasks is never processed when
1600         a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
1601         execute a SQLTransactionCallback function that was deferred.
1602
1603         Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
1604         be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
1605         lack of JavaScript script execution (since substitute data wasn't loaded and hence any JavaScript
1606         script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
1607         it's sufficient to only defer executing tasks when either there are existing pending tasks or the
1608         active DOM objects for the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).
1609
1610         * dom/Document.cpp:
1611         (WebCore::Document::postTask):
1612
1613 2014-08-07  Zalan Bujtas  <zalan@apple.com>
1614
1615         border-radius on html does not render properly.
1616         https://bugs.webkit.org/show_bug.cgi?id=135706
1617
1618         Reviewed by Simon Fraser.
1619
1620         Ensure that background is initialized when border-radius is present.
1621
1622         Test: fast/borders/border-radius-on-html.html
1623
1624         * rendering/RenderView.cpp:
1625         (WebCore::rendererObscuresBackground):
1626
1627 2014-08-07  Pratik Solanki  <psolanki@apple.com>
1628
1629         Random resource replacement on beta.icloud.com
1630         https://bugs.webkit.org/show_bug.cgi?id=135685
1631         <rdar://problem/17937975>
1632
1633         Reviewed by Alexey Proskuryakov.
1634
1635         Revert the performance optimization in r170499. It turns out we could get a delayed disk
1636         cache notification for a resource that has since been changed in WebCore. In such a case, we
1637         were replacing the newer resource data with the older disk cached resource data. This was
1638         happening for cached POST content on beta.icloud.com. Fix this by forcing a memcmp of data
1639         contents before replacing it which is what we used to do before.
1640
1641         * loader/cache/CachedResource.cpp:
1642         (WebCore::CachedResource::tryReplaceEncodedData):
1643
1644 2014-08-06  Brent Fulgham  <bfulgham@apple.com>
1645
1646         [Mac, iOS] Captions are appearing multiple times during repeated video play through
1647         https://bugs.webkit.org/show_bug.cgi?id=135680
1648         <rdar://problem/17926802>
1649
1650         Reviewed by Eric Carlson.
1651
1652         Test: media/track/track-in-band-cues-added-once.html
1653
1654         Revert TextTrackCueGeneric::isOrderedBefore logic to its original form, and add
1655         a new 'isOrderedBeforeDuringDisplay' for the special case of displaying captions.
1656
1657         * html/shadow/MediaControlElements.cpp:
1658         (WebCore::compareCueIntervalForDisplay): Added helper function.
1659         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Use the new
1660         'isOrderedBeforeDuringDisplay' to order the cues for display.
1661         * html/track/TextTrackCue.h:
1662         (WebCore::TextTrackCue::isOrderedBeforeDuringDisplay): Added. This just
1663         calls the existing 'isOrderedBefore' method.
1664         * html/track/TextTrackCueGeneric.cpp:
1665         (WebCore::TextTrackCueGeneric::isOrderedBefore): Revert to logic used
1666         prior to r171700.
1667         (WebCore::TextTrackCueGeneric::isOrderedBeforeDuringDisplay): New method that
1668         implements the behavior in r171700.
1669         * html/track/TextTrackCueGeneric.h:
1670
1671 2014-08-07  Jer Noble  <jer.noble@apple.com>
1672
1673         [Mac] Taking a paused video full screen flashes black at beginning of animation.
1674         https://bugs.webkit.org/show_bug.cgi?id=135668
1675
1676         Reviewed by Eric Carlson.
1677
1678         When entering fullscreen, the full screen window will momentarily occlude the browser
1679         window, causing a visiblity change notification. To avoid flickering when client buffering
1680         is disabled, throttle calls to updateClientDataBuffering by delaying those calls for a
1681         short period.
1682
1683         * platform/audio/MediaSession.cpp:
1684         (WebCore::MediaSession::MediaSession):
1685         (WebCore::MediaSession::clientWillPausePlayback):
1686         (WebCore::MediaSession::visibilityChanged):
1687         (WebCore::MediaSession::clientDataBufferingTimerFired):
1688         (WebCore::MediaSession::updateClientDataBuffering):
1689         * platform/audio/MediaSession.h:
1690
1691 2014-08-07  Zan Dobersek  <zdobersek@igalia.com>
1692
1693         ASSERT in Document::unregisterCollection reloading apple.com
1694         https://bugs.webkit.org/show_bug.cgi?id=135168
1695
1696         Reviewed by Andreas Kling.
1697
1698         * dom/Document.cpp:
1699         (WebCore::Document::unregisterCollection): This assertion was failing
1700         because the passed-in HTMLCollection was not invalidated for a non-related
1701         attribute, but was instead unregistered during destruction, at which point
1702         the m_collectionsInvalidatedAtDocument HashSet was empty.
1703         The assertion could be trivially reduced into checking that the HashSet is
1704         empty when it was moved out of in Document::invalidateNodeListAndCollectionCaches(),
1705         but that just checks that the move semantics on HashSet work properly. Removing
1706         a non-existent element from a HashSet is harmless, so the assertion can be removed
1707         completely.
1708
1709 2014-08-06  Brent Fulgham  <bfulgham@apple.com>
1710
1711         [Win] Correct build errors when WebGL Disabled
1712         https://bugs.webkit.org/show_bug.cgi?id=135687
1713
1714         Unreviewed build fix.
1715
1716         * WebCore.vcxproj/WebCore.vcxproj: Don't build Cairo files
1717         when building CG.
1718         * platform/graphics/GLContext.cpp: Correct use of 3D_GRAPHICS macro.
1719         * platform/graphics/GraphicsContext3DPrivate.cpp: Ditto.
1720         * platform/graphics/opengl/GLPlatformContext.cpp: Ditto.
1721         * platform/graphics/opengl/GLPlatformSurface.cpp: Ditto.
1722
1723 2014-08-06  Ryuan Choi  <ryuan.choi@samsung.com>
1724
1725         Unreviewed build fix on non Cocoa port since r172172
1726
1727         * platform/text/TextEncodingRegistry.cpp:
1728         (WebCore::defaultTextEncodingNameForSystemLanguage):
1729         * platform/text/TextEncodingRegistry.h:
1730
1731 2014-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
1732
1733         [iOS] Make document marker assets not specific to particular scale factors
1734         https://bugs.webkit.org/show_bug.cgi?id=135671
1735
1736         Reviewed by Simon Fraser.
1737
1738         No new tests.
1739
1740         * WebCore.xcodeproj/project.pbxproj:
1741         * platform/ios/wak/WKGraphics.mm:
1742         (imageResourcePath):
1743         (WKGraphicsCreateImageFromBundleWithName):
1744
1745 2014-08-06  Enrica Casucci  <enrica@apple.com>
1746
1747         Services menu doesn't show up after you defocus/refocus the Safari window.
1748         https://bugs.webkit.org/show_bug.cgi?id=135678
1749         <rdar://problem/17929247>
1750
1751         Reviewed by Tim Horton.
1752
1753         In setSelection we create a SelectionRectGatherer::Notifier object that will notify
1754         SelectionOverlayController about changes to the selection rects.
1755         Upon creation, the list of selections rects is cleared, since it is populated by
1756         the code that collects the selection rects. That code is never called
1757         when setSelection won't change the selection, which the case when the window is
1758         activated. The fix consists in postponing the SelectionRectGatherer::Notifier object
1759         creation until we know for sure that the selection is indeed going to change.
1760         
1761         * rendering/RenderView.cpp:
1762         (WebCore::RenderView::setSelection):
1763
1764 2014-08-06  Dean Jackson  <dino@apple.com>
1765
1766         ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
1767         https://bugs.webkit.org/show_bug.cgi?id=135675
1768
1769         Reviewed by Sam Weinig.
1770
1771         * Configurations/FeatureDefines.xcconfig:
1772
1773 2014-08-06  Brady Eidson  <beidson@apple.com>
1774
1775         IDB transactions never reset if the Web Process ends before cleaning up
1776         https://bugs.webkit.org/show_bug.cgi?id=135218
1777
1778         Reviewed by David Kilzer.
1779
1780         No new tests (Covered by existing tests).
1781
1782         * Modules/indexeddb/IDBServerConnection.h: Add sync versions of reset/rollback.
1783
1784         * Modules/indexeddb/IDBTransactionBackend.cpp:
1785         (WebCore::IDBTransactionBackend::abort): Call the sync versions.
1786
1787 2014-08-06  Wenson Hsieh <wenson_hsieh@apple.com>
1788
1789         Implement parsing for CSS scroll snap points
1790         https://bugs.webkit.org/show_bug.cgi?id=134301
1791
1792         Provided support for parsing -webkit-scroll-snap-* properties, i.e.  type, points-x, points-y, destination, and coordinates.
1793         The exact syntax of the scroll snap CSS properties follow the W3C spec at http://dev.w3.org/csswg/css-snappoints/
1794
1795         Reviewed by Dean Jackson.
1796
1797         Tests: css3/scroll-snap/scroll-snap-property-parsing.html,
1798             css3/scroll-snap/scroll-snap-property-computed-style.html
1799
1800         * CMakeLists.txt: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp
1801         * Configurations/FeatureDefines.xcconfig: Added ENABLE_CSS_SCROLL_SNAP
1802         * WebCore.vcxproj/WebCore.vcxproj: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp
1803         * WebCore.vcxproj/WebCore.vcxproj.filters: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp
1804         * WebCore.xcodeproj/project.pbxproj: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp, LengthRepeat.h
1805         * css/CSSCalculationValue.cpp: Support for LengthRepeat
1806         (WebCore::hasDoubleValue):
1807         * css/CSSComputedStyleDeclaration.cpp: Support for showing computed style for snap point properties.
1808         (WebCore::scrollSnapDestination):
1809         (WebCore::scrollSnapPoints):
1810         (WebCore::scrollSnapCoordinates):
1811         (WebCore::ComputedStyleExtractor::propertyValue):
1812         * css/CSSParser.cpp: Support for parsing snap point properties.
1813         (WebCore::isValidKeywordPropertyAndValue): handle snap point type
1814         (WebCore::isKeywordPropertyID):
1815         (WebCore::CSSParser::parseValue): Added support for parsing snap points.
1816         (WebCore::CSSParser::parseNonElementSnapPoints): Helper for parsing snap points-x/y.
1817         (WebCore::CSSParser::parseScrollSnapDestination): Helper for parsing snap point destinations.
1818         (WebCore::CSSParser::parseScrollSnapCoordinate): Helper for parsing snap point coordinates.
1819         * css/CSSParser.h: Support for parsing snap point properties.
1820         * css/CSSParserValues.cpp:
1821         (WebCore::CSSParserValue::createCSSValue):
1822         * css/CSSPrimitiveValue.cpp:
1823         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1824         (WebCore::CSSPrimitiveValue::init):
1825         (WebCore::CSSPrimitiveValue::cleanup):
1826         (WebCore::CSSPrimitiveValue::getLengthRepeatValue):
1827         (WebCore::CSSPrimitiveValue::formatNumberForcustomCSSText):
1828         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1829         (WebCore::CSSPrimitiveValue::equals):
1830         * css/CSSPrimitiveValue.h:
1831         (WebCore::CSSPrimitiveValue::isLengthRepeat):
1832         (WebCore::CSSPrimitiveValue::getLengthRepeatValue):
1833         * css/CSSPrimitiveValueMappings.h: Added converters for snap point type properties.
1834         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1835         (WebCore::CSSPrimitiveValue::operator ScrollSnapType):
1836         * css/CSSPropertyNames.in: Added relevant snap point property names.
1837         * css/CSSValueKeywords.in: Added "proximity", "mandatory" and "elements".
1838         * css/LengthRepeat.h: Added to represent values of repeat(<length>)
1839         (WebCore::LengthRepeat::create):
1840         (WebCore::LengthRepeat::cloneForCSSOM):
1841         (WebCore::LengthRepeat::interval):
1842         (WebCore::LengthRepeat::setInterval):
1843         (WebCore::LengthRepeat::equals):
1844         (WebCore::LengthRepeat::cssText):
1845         (WebCore::LengthRepeat::LengthRepeat):
1846         * css/StyleResolver.cpp: Support for handling snap point properties
1847         (WebCore::StyleResolver::applyProperty):Updated switch case to build snap-point-related style data
1848         * rendering/style/RenderStyle.h: Added methods to access and modify snap point data
1849         * rendering/style/RenderStyleConstants.h: Added scroll snap type flags.
1850         * rendering/style/StyleAllInOne.cpp: Added StyleScrollSnapPoints.cpp
1851         * rendering/style/StyleRareNonInheritedData.cpp: Added initiazing for m_scrollSnapPoints, updated equality check
1852         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1853         (WebCore::StyleRareNonInheritedData::operator==):
1854         * rendering/style/StyleRareNonInheritedData.h: Added field for StyleScrollSnapPoints
1855         * rendering/style/StyleScrollSnapPoints.cpp: Added. Wrapper for basic snap point data structures.
1856         (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints):
1857         (WebCore::StyleScrollSnapPoints::copy):
1858         (WebCore::StyleScrollSnapPoints::operator==):
1859         * rendering/style/StyleScrollSnapPoints.h: Added.
1860         (WebCore::StyleScrollSnapPoints::create):
1861         (WebCore::StyleScrollSnapPoints::defaultRepeatOffset): Creates a new Length representing the default repeat value of repeat(100%)
1862         (WebCore::StyleScrollSnapPoints::defaultDestinationOffset): Creates a new Length representing a default destination value (0px)
1863         (WebCore::StyleScrollSnapPoints::operator!=):
1864
1865 2014-08-06  Andy Estes  <aestes@apple.com>
1866
1867         [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
1868         https://bugs.webkit.org/show_bug.cgi?id=135676
1869
1870         Reviewed by David Kilzer.
1871
1872         * loader/DocumentLoader.h:
1873         (WebCore::DocumentLoader::setQuickLookHandle):
1874         (WebCore::DocumentLoader::quickLookHandle):
1875
1876 2014-08-06  Simon Fraser  <simon.fraser@apple.com>
1877
1878         REGRESSION (r168119): Album flipping animation doesn’t work
1879         https://bugs.webkit.org/show_bug.cgi?id=132801
1880         <rdar://problem/16878497>, <rdar://problem/17908085>
1881
1882         Reviewed by Dean Jackson.
1883         
1884         In r168119 I avoided creating backing store for backface-visibility:hidden unless
1885         some ancestor was 3d-transformed. However, when starting transitions or animations
1886         that apply transforms, we don't do a layout, and therefore don't update the RenderLayer
1887         flags that mark an ancestor as having a transform. This broke various content which
1888         used backface-visibility:hidden for "flip" animations.
1889         
1890         Make a low-risk fix that looks for the pattern of CSS properties used for flipping,
1891         making a compositing layer for backface-visibility:hidden if the stacking context element
1892         has transform-style: preserve-3d.
1893
1894         Test: compositing/backing/backface-visibility-flip.html
1895
1896         * rendering/RenderLayerCompositor.cpp:
1897         (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility):
1898
1899 2014-08-06  Brent Fulgham  <bfulgham@apple.com>
1900
1901         Consolidate logic for calculating scrollbar page step size
1902         https://bugs.webkit.org/show_bug.cgi?id=135670
1903
1904         Reviewed by Simon Fraser.
1905
1906         Consolidate the calculation of the scroll step size into a single place.
1907         Improve the handling of sub-pixel layout behavior by performing proper
1908         rounding on the fractional scroll ranges.
1909
1910         * editing/EditorCommand.cpp:
1911         (WebCore::verticalScrollDistance): Switch to Scrollbar::pageStep method.
1912         * platform/ScrollAnimator.cpp:
1913         (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
1914         * platform/ScrollView.cpp:
1915         (WebCore::ScrollView::updateScrollbars): Ditto.
1916         * platform/Scrollbar.h:
1917         (WebCore::Scrollbar::pageStep): Added.
1918         (WebCore::Scrollbar::pageStepDelta): Added.
1919         * rendering/RenderLayer.cpp:
1920         (WebCore::RenderLayer::updateScrollbarsAfterLayout): Switch to Scrollbar method.
1921
1922 2014-08-06  Brian J. Burg  <burg@cs.washington.edu>
1923
1924         Web Replay: dispatch timing information should be stored out-of-line in a replay segment
1925         https://bugs.webkit.org/show_bug.cgi?id=135295
1926
1927         Reviewed by Timothy Hatcher.
1928
1929         We need to save a timestamp for each event loop input so that replay can
1930         simulate the original user and network delays. Currently that timestamp
1931         is stored on each EventLoopInput instance.
1932
1933         This patch stores timestamp data in a separate vector attached to the segment.
1934         The event loop input class is now immutable, and new auxiliary data can be added
1935         without adding members to the EventLoopInput class.
1936
1937         As part of the refactoring, InputCursors now keep a reference to the relevant
1938         session segment instead of a reference to their input storage. InputCursors can
1939         be created directly, instead of through ReplaySessionSegment.
1940
1941         No new tests. No behavior was changed.
1942
1943         * inspector/InspectorReplayAgent.cpp:
1944         (WebCore::buildInspectorObjectForInput): Don't send the timestamp with the input.
1945         (WebCore::buildInspectorObjectForSegment):
1946         * inspector/protocol/Replay.json: Remove optional timestamp field for ReplayInput.
1947         * replay/CapturingInputCursor.cpp:
1948         (WebCore::CapturingInputCursor::CapturingInputCursor):
1949         (WebCore::CapturingInputCursor::create):
1950         (WebCore::CapturingInputCursor::storeInput): Save event loop input timings here.
1951         * replay/CapturingInputCursor.h:
1952         * replay/EventLoopInput.h:
1953         (WebCore::EventLoopInputBase::EventLoopInputBase): Deleted.
1954         (WebCore::EventLoopInputBase::timestamp): Deleted.
1955         (WebCore::EventLoopInputBase::setTimestamp): Deleted.
1956         * replay/EventLoopInputDispatcher.cpp: Use a struct for dispatch information.
1957         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
1958         (WebCore::EventLoopInputDispatcher::dispatchInputSoon):
1959         (WebCore::EventLoopInputDispatcher::dispatchInput):
1960         * replay/EventLoopInputDispatcher.h:
1961         * replay/FunctorInputCursor.h:
1962         (WebCore::FunctorInputCursor::forEachInputInQueue):
1963         (WebCore::FunctorInputCursor::FunctorInputCursor):
1964         * replay/ReplayController.cpp:
1965         (WebCore::ReplayController::createSegment):
1966         (WebCore::ReplayController::loadSegmentAtIndex):
1967         (WebCore::ReplayController::unloadSegment): Deleted.
1968         (WebCore::ReplayController::startPlayback): Deleted.
1969         * replay/ReplaySessionSegment.cpp:
1970         (WebCore::ReplaySessionSegment::createCapturingCursor): Deleted.
1971         (WebCore::ReplaySessionSegment::createReplayingCursor): Deleted.
1972         (WebCore::ReplaySessionSegment::createFunctorCursor): Deleted.
1973         * replay/ReplaySessionSegment.h:
1974         (WebCore::ReplaySessionSegment::storage):
1975         (WebCore::ReplaySessionSegment::eventLoopTimings):
1976         * replay/ReplayingInputCursor.cpp:
1977         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
1978         (WebCore::ReplayingInputCursor::create):
1979         (WebCore::ReplayingInputCursor::uncheckedLoadInput):
1980         (WebCore::ReplayingInputCursor::loadEventLoopInput): Added. This method collates
1981         and returns the next event loop input with its associated dispatch information.
1982         * replay/ReplayingInputCursor.h:
1983
1984 2014-08-06  Tim Horton  <timothy_horton@apple.com>
1985
1986         Document-relative overlays disappear after doing page-cache navigations
1987         https://bugs.webkit.org/show_bug.cgi?id=135669
1988         <rdar://problem/17929171>
1989
1990         Reviewed by Simon Fraser.
1991
1992         * rendering/RenderLayerCompositor.cpp:
1993         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
1994         When navigating from one page to another, the document-relative overlay
1995         layer is moved from the layer tree of the RenderLayerCompositor of the
1996         first RenderView to the layer tree of the RenderLayerCompositor of the
1997         new RenderView, upon layer tree construction.
1998         When going "back" via a page cache navigation, we don't rebuild the
1999         layer tree, and just assume that it is in a valid state.
2000         However, the document-relative overlay layer was *moved*, and as such,
2001         needs to be moved back. To do this, reattach the document-relative
2002         overlay layer whenever the root layer attachment of a RenderLayerCompositor
2003         changes, which will happen in the right order when going back to a cached page.
2004
2005 2014-08-06  Filip Pizlo  <fpizlo@apple.com>
2006
2007         Merge r171389, r171495, r171508, r171510, r171605, r171606, r171611, r171614, r171763 from ftlopt.
2008
2009     2014-08-06  Mark Hahnenberg  <mhahnenberg@apple.com>
2010     
2011             Refactor our current implementation of for-in
2012             https://bugs.webkit.org/show_bug.cgi?id=134142
2013     
2014             Reviewed by Filip Pizlo.
2015     
2016             No new tests.
2017     
2018             This patch splits for-in loops into three distinct parts:
2019     
2020             - Iterating over the indexed properties in the base object.
2021             - Iterating over the Structure properties in the base object.
2022             - Iterating over any other enumerable properties for that object and any objects in the prototype chain.
2023      
2024             It does this by emitting these explicit loops in bytecode, using a new set of bytecodes to 
2025             support the various operations required for each loop.
2026     
2027             * bindings/js/JSDOMWindowCustom.cpp:
2028             (WebCore::JSDOMWindow::getEnumerableLength):
2029             (WebCore::JSDOMWindow::getStructurePropertyNames):
2030             (WebCore::JSDOMWindow::getGenericPropertyNames):
2031             * bindings/scripts/CodeGeneratorJS.pm:
2032             (GenerateHeader):
2033             * bridge/runtime_array.cpp:
2034             (JSC::RuntimeArray::getOwnPropertyNames):
2035     
2036 2014-08-06  Alexey Proskuryakov  <ap@apple.com>
2037
2038         REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
2039         https://bugs.webkit.org/show_bug.cgi?id=135667
2040         <rdar://problem/17862892>
2041
2042         Reviewed by Anders Carlsson.
2043
2044         Moved a function that computes default encoding from WebKit to WebCore, so that
2045         it could be shared with WebKit2.
2046
2047         * WebCore.exp.in:
2048         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2049         * platform/mac/WebCoreSystemInterface.h:
2050         * platform/mac/WebCoreSystemInterface.mm:
2051         * platform/text/TextEncodingRegistry.cpp:
2052         (WebCore::defaultTextEncodingNameForSystemLanguage):
2053         * platform/text/TextEncodingRegistry.h:
2054
2055 2014-08-06  Andreas Kling  <akling@apple.com>
2056
2057         Remove unused RenderBox::reflectionBox().
2058         <https://webkit.org/b/135661>
2059
2060         Reviewed by Antti Koivisto.
2061
2062         * rendering/RenderBox.cpp:
2063         (WebCore::RenderBox::reflectionBox): Deleted.
2064         * rendering/RenderBox.h:
2065
2066 2014-08-06  Brian J. Burg  <burg@cs.washington.edu>
2067
2068         Web Inspector: convert ReplayManager to a promise-based API
2069         https://bugs.webkit.org/show_bug.cgi?id=135249
2070
2071         Reviewed by Timothy Hatcher.
2072
2073         Fix some assertions to match ReplayController's preconditions.
2074
2075         * inspector/InspectorReplayAgent.cpp:
2076         (WebCore::InspectorReplayAgent::replayToPosition):
2077         (WebCore::InspectorReplayAgent::replayToCompletion):
2078
2079 2014-08-05  Brent Fulgham  <bfulgham@apple.com>
2080
2081         [Mac] Unable to scroll to bottom of nested scrollable areas
2082         https://bugs.webkit.org/show_bug.cgi?id=135637
2083         <rdar://problem/17910241>
2084
2085         Reviewed by Zalan Bujtas.
2086
2087         Test: platform/mac/fast/scrolling/scroll-latched-nested-div.html
2088
2089         Avoid truncating the fractional portion of scroll ranges.
2090
2091         * rendering/RenderLayer.cpp:
2092         (WebCore::RenderLayer::updateScrollbarsAfterLayout): Round
2093         the LayoutUnit values for scroll width and height rather than
2094         truncating.
2095
2096 2014-08-06  Andy Estes  <aestes@apple.com>
2097
2098         [iOS] QuickLook returns an invalid MIME type for some documents
2099         https://bugs.webkit.org/show_bug.cgi?id=135651
2100
2101         Reviewed by David Kilzer.
2102
2103         r172151 ensured that we ignore QuickLook delegate messages after an error, but neglected to do so for
2104         connectionDidFinishLoading:. Do not call ResourceLoader::didFinishLoading() if an error has occurred.
2105
2106         * platform/network/ios/QuickLook.mm:
2107         (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]):
2108
2109 2014-08-06  Commit Queue  <commit-queue@webkit.org>
2110
2111         Unreviewed, rolling out r172155.
2112         https://bugs.webkit.org/show_bug.cgi?id=135659
2113
2114         ChangeLog and commit message are wrong (Requested by estes on
2115         #webkit).
2116
2117         Reverted changeset:
2118
2119         "Unreviewed, rolling out r172145."
2120         https://bugs.webkit.org/show_bug.cgi?id=135657
2121         http://trac.webkit.org/changeset/172155
2122
2123 2014-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
2124
2125         Unreviewed build fix
2126
2127         * rendering/TextPainter.cpp: Used incorrect variable name
2128  
2129 2014-08-06  Commit Queue  <commit-queue@webkit.org>
2130
2131         Unreviewed, rolling out r172145.
2132         https://bugs.webkit.org/show_bug.cgi?id=135657
2133
2134         caused 1 API test to fail (Requested by zalan on #webkit).
2135
2136         Reverted changeset:
2137
2138         "Cleanup InlineTextBox::paintSelection and
2139         ::localSelectionRect."
2140         https://bugs.webkit.org/show_bug.cgi?id=135631
2141         http://trac.webkit.org/changeset/172145
2142
2143 2014-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
2144
2145         Text-shadow with (0, 0) offset and radius = 0 is ugly
2146         https://bugs.webkit.org/show_bug.cgi?id=135357
2147
2148         Reviewed by Darin Adler.
2149
2150         Instead, check for this kind of shadow and don't draw it.
2151
2152         Test: fast/text/empty-shadow.html
2153
2154         * rendering/TextPainter.cpp:
2155         (WebCore::isEmptyShadow): Does a shadow match these criteria?
2156         (WebCore::paintTextWithShadows): If so, don't draw it.
2157
2158 2014-08-06  Andy Estes  <aestes@apple.com>
2159
2160         [iOS] QuickLook returns an invalid MIME type for some documents
2161         https://bugs.webkit.org/show_bug.cgi?id=135651
2162
2163         Reviewed by David Kilzer.
2164
2165         In some cases QuickLook indicates a failure by returning a nil MIME type in -[QLPreviewConverter previewResponse]
2166         rather than calling connection:didFailWithError:. Calling ResourceLoader::didReceiveResponse() with a response
2167         containing a nil MIME type leads to a crash.
2168
2169         Stop loading the resource and display an error page if QuickLook cannot provide a MIME type for the converted response.
2170
2171         No new tests. QuickLook is not testable from WebKit.
2172
2173         * platform/network/ios/QuickLook.mm:
2174         (-[WebResourceLoaderQuickLookDelegate _sendDidReceiveResponseIfNecessary]): Called ResourceLoader::didFail() if
2175         MIME type was nil. Called ResourceLoader::didReceiveResponse() otherwise.
2176         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): Called -_sendDidReceiveResponseIfNecessary.
2177         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
2178         (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
2179
2180 2014-08-06  Radu Stavila  <stavila@adobe.com>
2181
2182         REGRESSION (r163382): Overflow hidden for inner elements breaks blurring
2183         https://bugs.webkit.org/show_bug.cgi?id=135318
2184
2185         Reviewed by Zalan Bujtas.
2186
2187         For elements with border radius, clipping must be applied using clipRoundedRect.
2188         This regressed in r163382, when normal clipping started being applied also
2189         for elements having border radius.
2190
2191         Test: fast/filter-image/clipped-filter.html
2192
2193         * rendering/RenderLayer.cpp:
2194         (WebCore::RenderLayer::clipToRect):
2195         (WebCore::RenderLayer::restoreClip):
2196
2197 2014-08-06  Zalan Bujtas  <zalan@apple.com>
2198
2199         Cleanup InlineTextBox::paintSelection and ::localSelectionRect.
2200         https://bugs.webkit.org/show_bug.cgi?id=135631
2201
2202         Reviewed by Darin Adler.
2203
2204         Covered by existing tests.
2205
2206         * rendering/InlineTextBox.cpp: Ideally these 2 functions should share some more code.
2207         (WebCore::InlineTextBox::localSelectionRect): Local coordinates should not be snapped/enclosed.
2208         This change could potentially break some selections. Should that be the case, they need to be addressed
2209         separately.
2210         (WebCore::InlineTextBox::paint):
2211         (WebCore::InlineTextBox::paintSelection): Minor cleanup.
2212         * rendering/InlineTextBox.h:
2213
2214 2014-08-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2215
2216         [GTK] Be able to disable gtk2 dependency
2217         https://bugs.webkit.org/show_bug.cgi?id=135505
2218
2219         Reviewed by Gustavo Noronha Silva.
2220
2221         Do not build WebCorePlatformGTK2 when ENABLE_PLUGIN_PROCESS_GTK2
2222         is OFF.
2223
2224         * PlatformGTK.cmake:
2225
2226 2014-08-06  Mark Lam  <mark.lam@apple.com>
2227
2228         Gardening: fix bindings test breakage for for r170564 merged in r172129.
2229         <https://webkit.org/b/134333>
2230
2231         Not reviewed.
2232
2233         No new tests.
2234
2235         * bindings/scripts/test/JS/JSTestEventTarget.h:
2236         (WebCore::JSTestEventTarget::create):
2237
2238 2014-08-06  Ryuan Choi  <ryuan.choi@samsung.com>
2239
2240         Unreviewed typo correction.
2241
2242         * bindings/scripts/CodeGeneratorJS.pm: removed unnecessary space.
2243         (GenerateImplementation):
2244
2245 2014-08-05  James Craig  <jcraig@apple.com>
2246
2247         Web Inspector: AXI: Add label string once AccessibilityObject::computedLabel() is available
2248         https://bugs.webkit.org/show_bug.cgi?id=129940
2249
2250         Reviewed by Chris Fleizach.
2251
2252         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt
2253
2254         * accessibility/AccessibilityObject.cpp: Fixed crash.
2255         (WebCore::AccessibilityObject::accessibilityComputedLabel): 
2256         * accessibility/AccessibilityObject.h: Method name update.
2257         * inspector/InspectorDOMAgent.cpp: New support for getting Node label from AccessibilityObject.
2258         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2259
2260 2014-07-29  Filip Pizlo  <fpizlo@apple.com>
2261
2262         Merge r170564, r170571, r170604, r170628, r170672, r170680, r170724, r170728, r170729, r170819, r170821, r170836, r170855, r170860, r170890, r170907, r170929, r171052, r171106, r171152, r171153, r171214 from ftlopt.
2263
2264     2014-07-01  Mark Lam  <mark.lam@apple.com>
2265     
2266             [ftlopt] DebuggerCallFrame::scope() should return a DebuggerScope.
2267             <https://webkit.org/b/134420>
2268     
2269             Reviewed by Geoffrey Garen.
2270     
2271             No new tests.
2272     
2273             * ForwardingHeaders/debugger/DebuggerCallFrame.h: Removed.
2274             - This is not in use.  Hence, we can remove it.
2275             * bindings/js/ScriptController.cpp:
2276             (WebCore::ScriptController::attachDebugger):
2277             - We should acquire the JSLock before modifying a JS global object.
2278     
2279     2014-06-25  Filip Pizlo  <fpizlo@apple.com>
2280     
2281             [ftlopt] If a CodeBlock is jettisoned due to a watchpoint then it should be possible to figure out something about that watchpoint
2282             https://bugs.webkit.org/show_bug.cgi?id=134333
2283     
2284             Reviewed by Geoffrey Garen.
2285     
2286             No new tests because no change in behavior.
2287     
2288             * bindings/scripts/CodeGeneratorJS.pm:
2289             (GenerateHeader):
2290     
2291 2014-08-05  Ryuan Choi  <ryuan.choi@samsung.com>
2292
2293         Build break since r172093
2294         https://bugs.webkit.org/show_bug.cgi?id=135636
2295
2296         Reviewed by Gyuyoung Kim.
2297
2298         Since r172093, AbstractView.idl is added in CMake Build but CodeGeneratorJS.pm does not take care of it.
2299
2300         No new tests required, no new functionality.
2301
2302         * bindings/scripts/CodeGeneratorJS.pm:
2303         (ShouldGenerateToJSDeclaration):
2304         (ShouldGenerateToJSImplementation):
2305         (GetImplClassName): Added to rename implClassName to DOMWindow if interface name is AbstractView.
2306         (GenerateHeader):
2307         (GenerateImplementation):
2308
2309 2014-08-05  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
2310
2311         [CG] strokeRect does not honor lineJoin
2312         https://bugs.webkit.org/show_bug.cgi?id=132948
2313
2314         Reviewed by Darin Adler.
2315
2316         Replaced use of CGContextStrokeRectWithWidth convenience function with explicit 
2317         call to CGContextAddRect and CGContextStrokePath.  The convenience functions
2318         CGContextStrokeRect and CGContextStrokeRectWithWidth fail to apply some attributes
2319         (e.g. stroke join) of the graphics state in certain cases.
2320
2321         Test: fast/canvas/canvas-strokeRect-lineJoin.html
2322
2323         * platform/graphics/cg/GraphicsContextCG.cpp:
2324         (WebCore::GraphicsContext::strokeRect):
2325
2326 2014-08-05  Brent Fulgham  <bfulgham@apple.com>
2327
2328         [Win] Build attempts to use ANGLE when not building WebGL.
2329         https://bugs.webkit.org/show_bug.cgi?id=135630
2330         <rdar://problem/135630>
2331
2332         Unreviewed build fix.
2333
2334         * platform/graphics/win/GraphicsContext3DWin.cpp: Move #include of GraphicsContext3D.h
2335         inside USE(3D_GRAPHICS) guard.
2336
2337 2014-08-05  Simon Fraser  <simon.fraser@apple.com>
2338
2339         [iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::removeNodeAndAllDescendants)
2340         https://bugs.webkit.org/show_bug.cgi?id=135629
2341         <rdar://problem/17802174>
2342
2343         Reviewed by Tim Horton.
2344         
2345         In r170198 I added an "orphan scrolling nodes" code path that sets aside subtrees
2346         of scrolling nodes into an m_orphanedSubframeNodes map, which keeps them alive until
2347         they get reparented or destroyed. The nodes in that subtree remain in m_stateNodeMap,
2348         which holds raw pointers to them.
2349         
2350         However, ScrollingStateTree::commit() can clear m_orphanedSubframeNodes, which is
2351         sometimes non-empty at this point. When that happened, we would destroy nodes which
2352         were still referenced by m_stateNodeMap, with the result that a later query for the
2353         same nodeID would hand back a pointer to a deleted object.
2354         
2355         Fix by calling recursiveNodeWillBeRemoved() on nodes in the m_orphanedSubframeNodes
2356         before clearing it, which removes them and all their descendants from the state node map.
2357
2358         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html
2359
2360         * page/scrolling/ScrollingStateTree.cpp:
2361         (WebCore::ScrollingStateTree::clear):
2362         (WebCore::ScrollingStateTree::commit):
2363
2364 2014-08-05  Peyton Randolph  <prandolph@apple.com>
2365
2366         Add the ability to force text to render in white, not just black
2367         https://bugs.webkit.org/show_bug.cgi?id=135625
2368
2369         Reviewed by Beth Dakin.
2370
2371         This patch introduces PaintBehaviorForceWhiteText, a complement to PaintBehaviorForceBlackText. If
2372         a client specifies both PaintBehaviorForceWhiteText and PaintBehaviorForceBlackText, the text will be
2373         painted black.
2374
2375         No new tests.
2376
2377         * rendering/EllipsisBox.cpp:
2378         (WebCore::EllipsisBox::paint): Use the forced text color to paint the text if requested.
2379         * rendering/InlineTextBox.cpp:
2380         (WebCore::InlineTextBox::paint): Disable the text shadow if a text color has been forced.
2381         * rendering/PaintInfo.h:
2382         (WebCore::PaintInfo::forceTextColor): 
2383         Return true iff the client has requested to force a black or white text color.
2384         (WebCore::PaintInfo::forceWhiteText):
2385         Return true iff forcing white text has been requested.
2386         (WebCore::PaintInfo::forcedTextColor): 
2387         Return the forced text color. Currently only white and black are supported.
2388         * rendering/PaintPhase.h:
2389         * rendering/RenderLayer.cpp:
2390         (WebCore::RenderLayer::paintLayerContents): Remove the forceBlackText-related code as it is redundant.
2391         (WebCore::RenderLayer::paintForegroundForFragments): 
2392         Remove forceBlackText parameter and infer the correct behavior from the given paint behavior.
2393         * rendering/RenderLayer.h:
2394         * rendering/TextPaintStyle.cpp:
2395         (WebCore::computeTextPaintStyle): Use the forced text color if available.
2396         (WebCore::computeTextSelectionPaintStyle): Use the forced text color if available.
2397
2398 2014-08-05  Alex Christensen  <achristensen@webkit.org>
2399
2400         More work on CMake.
2401         https://bugs.webkit.org/show_bug.cgi?id=135620
2402
2403         Reviewed by Reviewed by Laszlo Gombos.
2404
2405         * CMakeLists.txt:
2406         Added missing idls.
2407         * PlatformMac.cmake:
2408         Added additional include directories and source files.
2409         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
2410         * css/makeSelectorPseudoElementsMap.py:
2411         The Windows distribution of gperf doesn't like single quotes for its key-positions parameters.
2412         * page/Chrome.h:
2413         Compile fix.
2414
2415 2014-08-05  Brian J. Burg  <burg@cs.washington.edu>
2416
2417         Web Inspector: ReplayManager shouldn't assume replay status when the inspector is opened
2418         https://bugs.webkit.org/show_bug.cgi?id=135212
2419
2420         Reviewed by Timothy Hatcher.
2421
2422         The frontend should be able to introspect the session and segment state machines,
2423         currently loaded segment and session identifiers, and replay position.
2424
2425         * inspector/InspectorReplayAgent.cpp:
2426         (WebCore::buildInspectorObjectForSessionState): Added.
2427         (WebCore::buildInspectorObjectForSegmentState): Added.
2428         (WebCore::InspectorReplayAgent::currentReplayState): Added.
2429         * inspector/InspectorReplayAgent.h:
2430         * inspector/protocol/Replay.json: Add currentReplayState query command.
2431         * replay/ReplayController.h: Add some accessors.
2432
2433 2014-08-05  Dean Jackson  <dino@apple.com>
2434
2435         [iOS] Media controls layout incorrectly in RTL content
2436         https://bugs.webkit.org/show_bug.cgi?id=135621
2437         <rdar://problem/17849206>
2438
2439         Reviewed by Eric Carlson.
2440
2441         Media controls should always layout in LTR mode, even when the
2442         page content is RTL. There already was a rule to do this on
2443         non-iOS systems, but it wasn't getting included for iOS.
2444         In this case I put the rule on the composited parent of the
2445         controls in order to maintain the padding of the control panel.
2446         This should still leave the captions unaffected.
2447
2448         * Modules/mediacontrols/mediaControlsiOS.css:
2449         (video::-webkit-media-controls-panel-composited-parent): Add direction: ltr.
2450
2451 2014-08-05  Brian J. Burg  <burg@cs.washington.edu>
2452
2453         Web Replay: rename protocol methods for getting replay session/segment data
2454         https://bugs.webkit.org/show_bug.cgi?id=135618
2455
2456         Reviewed by Timothy Hatcher.
2457
2458         * inspector/InspectorReplayAgent.cpp:
2459         (WebCore::InspectorReplayAgent::getSessionData):
2460         (WebCore::InspectorReplayAgent::getSegmentData):
2461         (WebCore::InspectorReplayAgent::getSerializedSession): Deleted.
2462         (WebCore::InspectorReplayAgent::getSerializedSegment): Deleted.
2463         * inspector/InspectorReplayAgent.h:
2464         * inspector/protocol/Replay.json:
2465
2466 2014-08-05  Antti Koivisto  <antti@apple.com>
2467
2468         REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
2469         https://bugs.webkit.org/show_bug.cgi?id=135603
2470         <rdar://problem/17876385>
2471         
2472         This hit ASSERT(frame().isMainFrame()) in FrameView::updateLayerFlushThrottling
2473         running scrollbars/scrollbar-iframe-click-does-not-blur-content.html and a few other tests.
2474
2475         * page/FrameView.cpp:
2476         (WebCore::FrameView::setWasScrolledByUser): Only invoke updateLayerFlushThrottling for the main frame.
2477
2478 2014-08-05  Peyton Randolph  <prandolph@apple.com>
2479
2480         Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
2481         https://bugs.webkit.org/show_bug.cgi?id=135276
2482
2483         Reviewed by Beth Dakin.
2484
2485         No new tests. Just a compiler flag.
2486
2487         * Configurations/FeatureDefines.xcconfig:
2488
2489 2014-08-05  Dean Jackson  <dino@apple.com>
2490
2491         [Media iOS] Ensure there is a nice default fallback for missing wireless target names
2492         https://bugs.webkit.org/show_bug.cgi?id=135488
2493         <rdar://problem/17879156>
2494
2495         Reviewed by Antoine Quint.
2496
2497         Antoine found me on iMessage to tell me I'm an idiot and that I've
2498         forgotten how to write JavaScript. Embarrassingly, this code is what
2499         I originally had, but then second-guessed myself.
2500
2501         * Modules/mediacontrols/mediaControlsiOS.js:
2502         (ControllerIOS.prototype.updateWirelessPlaybackStatus): No need for the local
2503         variable or conditional statement, since null and "" both evaluate as false.
2504
2505 2014-08-05  Antti Koivisto  <antti@apple.com>
2506
2507         REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
2508         https://bugs.webkit.org/show_bug.cgi?id=135603
2509         <rdar://problem/17876385>
2510
2511         Reviewed by Andreas Kling.
2512
2513         * page/FrameView.cpp:
2514         (WebCore::determineLayerFlushThrottleState):
2515         
2516             Disable throttling after user has scrolled the page.
2517             This is consistent with the speculative tiling. It also gets enabled on first scroll.
2518
2519         (WebCore::FrameView::setWasScrolledByUser):
2520
2521 2014-08-05  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
2522
2523         ASSERTION FAILED: name[0] == '@' && length >= 2 in WebCore::CSSParser::detectAtToken
2524         https://bugs.webkit.org/show_bug.cgi?id=134632
2525
2526         At-rules must consist of at least two characters: the '@' symbol followed by
2527         an identifier name. The failure of this condition makes the assertion fail.
2528
2529         The length of an at-rule is currently calculated by pointer arithmetic on
2530         the 'result' pointer, which is expected to be set to the end of the at-rule
2531         identifier by the WebCore::*CSSTokenizer::parseIdentifier method.
2532         If the at-rule token is a sequence of 8-bit-only characters then
2533         'result' will point correctly at the end of the identifier. However, if
2534         the at-rule contains a 16-bit Unicode escape then 'result' will not be
2535         updated correctly anymore, hence it cannot be used for length calculation.
2536         The patch makes the parseIdentifier bump the result pointer even in the 16-bit slow case.
2537
2538         Patch by Renata Hodovan, backported from Chromium: https://codereview.chromium.org/241053002
2539
2540         Reviewed by Darin Adler.
2541
2542         Test: fast/css/atrule-with-escape-character-crash.html
2543
2544         * css/CSSParser.cpp:
2545         (WebCore::CSSParser::realLex):
2546
2547 2014-08-04  Andy Estes  <aestes@apple.com>
2548
2549         [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
2550         https://bugs.webkit.org/show_bug.cgi?id=135596
2551
2552         Reviewed by David Kilzer.
2553
2554         Some iWork documents contain pre-rendered PDF previews. When WebKit asks QuickLook to convert such a document,
2555         QuickLook will return this PDF as the converted response. However, until WebKit has sent the document's data to
2556         QuickLook, -[QLPreviewConverter previewResponse] will misleadingly tell WebKit that the converted resource will
2557         be of type 'text/html'. This leads WebKit to render the PDF preview as HTML.
2558
2559         Instead of querying QLPreviewConverter for the previewResponse before we've sent it any data, postpone calling
2560         ResourceLoader::didReceiveResponse until we've begun to receive data via the QLPreviewConverter delegate. At
2561         that point -[QLPreviewConverter previewResponse] will have the correct MIME type and we can call didReceiveResponse.
2562
2563         No new tests. QuickLook is not testable from WebKit.
2564
2565         * platform/network/ios/QuickLook.mm:
2566         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): If didReceiveResponse has yet to be
2567         called, call it now with QuickLookHandle::nsResponse().
2568         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
2569         (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
2570         (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]): Assert that didReceiveResponse has been called.
2571         (-[WebResourceLoaderQuickLookDelegate clearHandle]): Cleared the raw pointer to QuickLookHandle.
2572         (WebCore::QuickLookHandle::create): Pointed WebResourceLoaderQuickLookDelegate's quickLookHandle property to
2573         the newly created QuickLookHandle.
2574
2575 2014-08-05  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
2576
2577         Fixing calc() parameter parsing in cubic-bezier functions
2578         https://bugs.webkit.org/show_bug.cgi?id=135605
2579
2580         Reviewed by Andreas Kling.
2581
2582         Before this patch, calc values in cubic-bezier functions weren't being read correctly
2583         since they were handled as simple floats.
2584
2585         This is a backport of my fix in Blink: https://codereview.chromium.org/369313002/
2586
2587         Test: css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html
2588
2589         * css/CSSParser.cpp:
2590         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
2591
2592 2014-08-05  Jer Noble  <jer.noble@apple.com>
2593
2594         [MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
2595         https://bugs.webkit.org/show_bug.cgi?id=135422
2596
2597         Reviewed by Eric Carlson.
2598
2599         Three related fixes:
2600
2601         In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush
2602         samples, so that the next time samples are re-enqueued, the starting point for re-enqueueing
2603         is correct.
2604
2605         In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue
2606         if they are before the current media time.
2607
2608         When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
2609         the SourceBufferPrivate may signal that it's ready for new samples through the
2610         sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
2611         continue to provideMediaData(), as that will append samples from the prior-to-seeking media
2612         timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
2613         display those frames as quickly as possible (the "fast forward" behavior) in order to catch
2614         up to the new current time.
2615
2616         If a re-enqueue is pending, don't provide media data in response to being notified that the
2617         SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
2618         are appended.
2619
2620         Also, don't provide media data if we are waiting for a seek to complete.
2621
2622         * Modules/mediasource/MediaSource.h:
2623         (WebCore::MediaSource::isSeeking): Convenience method.
2624         * Modules/mediasource/SourceBuffer.cpp:
2625         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2626         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
2627         (WebCore::SourceBuffer::reenqueueMediaForTime):
2628
2629 2014-08-05  Chris Fleizach  <cfleizach@apple.com>
2630
2631         AX: Select text activity should return replaced text instead of previously selected text
2632         https://bugs.webkit.org/show_bug.cgi?id=135595
2633
2634         Reviewed by Mario Sanchez Prada.
2635
2636         When the select activity API is used to replace text, the replacement string should be returned instead of the old selected text.
2637
2638         Updated existing test: platform/mac/accessibility/select-text.html
2639
2640         * accessibility/AccessibilityObject.cpp:
2641         (WebCore::AccessibilityObject::selectText):
2642
2643 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
2644
2645         AX: Select activity behavior does not work when an existing range is already selected
2646         https://bugs.webkit.org/show_bug.cgi?id=135579
2647
2648         Reviewed by Mario Sanchez Prada.
2649
2650         If you have an existing range selected, and try to apply a select and replace operation, like capitalize,
2651         searching for that range will fail because it skips the currently selected range.
2652
2653         For these cases, it seems the best way is to start the search from the start position, rather than relying on the
2654         entire range.
2655
2656         Updated existing test: platform/mac/accessibility/select-text.html
2657
2658         * accessibility/AccessibilityObject.cpp:
2659         (WebCore::AccessibilityObject::selectText):
2660
2661 2014-08-04  Jer Noble  <jer.noble@apple.com>
2662
2663         [MSE][Mac] Seeking past buffered range will not resume playback when seek completes.
2664         https://bugs.webkit.org/show_bug.cgi?id=135591
2665
2666         Reviewed by Eric Carlson.
2667
2668         If a seek is delayed due to seeking into an unbuffered area, playback will not be restarted
2669         at that point. Instead, playback must resume when enough media data has been added, and
2670         the MediaSource indicates the seek should complete.
2671
2672         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2673         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted):
2674
2675 2014-08-04  Jer Noble  <jer.noble@apple.com>
2676
2677         [MSE] Videos will report a stall when within 1 frame-duration before the end of a movie.
2678         https://bugs.webkit.org/show_bug.cgi?id=135586
2679
2680         Reviewed by Eric Carlson.
2681
2682         Under certain circumstances, videos which are within 1/24 seconds before the end of a media stream when
2683         monitorSourceBuffers() is called will fail the hasFutureTime() check. This is because hasFutureTime()
2684         checks whether enough media is buffered to play back at least some time in the future, but when the
2685         current time is close to the duration, not enough data is buffered to satisfy that check.
2686
2687         Add some logic which will break out early when the SourceBuffer has buffered up to and including the
2688         media's duration, and return that the buffer indeed hasFutureTime() available.
2689
2690         * Modules/mediasource/SourceBuffer.cpp:
2691         (WebCore::SourceBuffer::hasFutureTime):
2692
2693 2014-08-04  Benjamin Poulain  <benjamin@webkit.org>
2694
2695         Simplify the StyleInvalidation mode of rule collection
2696         https://bugs.webkit.org/show_bug.cgi?id=135521
2697
2698         Reviewed by Antti Koivisto.
2699
2700         There are two branches where StyleInvalidation code is removed:
2701         -Pseudo elements for shadow dom elements.
2702         -Pseudo elements without dom tree counterpart.
2703
2704         The first can never be hit because StyleInvalidationAnalysis does a complete invalidation
2705         when there is any shadow dom styling involved in the stylesheets.
2706
2707         Even if that branch was hit, not failing on custom pseudo elements would be equivalent
2708         to ignoring those pseudo elements from the Selector. By doing so, we would match elements
2709         that do not have shadow dom and invalidate pretty much everything.
2710
2711         Unlike pseudo elements without real elements, shadow dom elements are not matched separately with a different
2712         context, thus we could generalize StyleInvalidationAnalysis to handle this case.
2713
2714
2715         The second case handle pseudo elements that do not have a real element. That case no longer need to be handled
2716         separately at the filter time, it has become a special case of SelectorChecker::match() after everything else
2717         has matched.
2718
2719         The only condition for this to work is that the Context's pseudoId must be NOPSEUDO. This is the case
2720         in practice since matching specific pseudo types would be a waste of time. ElementRuleCollector::collectMatchingRules()
2721         has a new assertion to enforce that.
2722
2723         Test: fast/css/stylesheet-change-updates-pseudo-elements.html
2724
2725         * css/ElementRuleCollector.cpp:
2726         (WebCore::ElementRuleCollector::collectMatchingRules):
2727         * css/SelectorChecker.cpp:
2728         (WebCore::SelectorChecker::matchRecursively):
2729         * cssjit/SelectorCompiler.cpp:
2730         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
2731
2732 2014-08-04  Benjamin Poulain  <benjamin@webkit.org>
2733
2734         Add a flag for the CSS Selectors level 4 implementation
2735         https://bugs.webkit.org/show_bug.cgi?id=135535
2736
2737         Reviewed by Andreas Kling.
2738
2739         * Configurations/FeatureDefines.xcconfig:
2740
2741 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
2742
2743         AX: add AccessibilityObject::computedLabelString() for WebAXI
2744         https://bugs.webkit.org/show_bug.cgi?id=129939
2745
2746         Reviewed by Mario Sanchez Prada.
2747
2748         Provide a method that the WebKit Inspector can call in order to 
2749         display an accessible name for an AX node.
2750
2751         * accessibility/AccessibilityObject.cpp:
2752         (WebCore::AccessibilityObject::accessibilityComputedLabel):
2753         * accessibility/AccessibilityObject.h:
2754
2755 2014-08-04  Tim Horton  <timothy_horton@apple.com>
2756
2757         Lots of crashes in WebKit1 after r172013.
2758         https://bugs.webkit.org/show_bug.cgi?id=135582
2759         <rdar://problem/17837636>
2760
2761         Reviewed by Enrica Casucci.
2762
2763         * editing/SelectionRectGatherer.cpp:
2764         (WebCore::SelectionRectGatherer::addRect):
2765         (WebCore::SelectionRectGatherer::addGapRects):
2766         Don't try to do local-to-absolute coordinate conversion if we don't have
2767         a repaint container, which happens a lot in WebKit1.
2768
2769 2014-08-04  Alex Christensen  <achristensen@webkit.org>
2770
2771         Progress towards CMake on Mac.
2772         https://bugs.webkit.org/show_bug.cgi?id=135528
2773
2774         Reviewed by Gyuyoung Kim.
2775
2776         * PlatformMac.cmake: Added.
2777
2778 2014-08-04  Tim Horton  <timothy_horton@apple.com>
2779
2780         Selection services menu dropdown is in the wrong place when selecting some text on Yelp
2781         https://bugs.webkit.org/show_bug.cgi?id=135582
2782         <rdar://problem/17837636>
2783
2784         Reviewed by Simon Fraser.
2785
2786         * editing/SelectionRectGatherer.cpp:
2787         (WebCore::SelectionRectGatherer::addRect):
2788         (WebCore::SelectionRectGatherer::addGapRects):
2789         (WebCore::SelectionRectGatherer::addRects): Deleted.
2790         Rename addRects to addGapRects for clarity.
2791         Map rects and gapRects to absolute RenderView coordinates so that
2792         they are in a form WebKit2 can use. Previously they were sometimes
2793         relative to a different repaint container, but that information was
2794         lost when moving through SelectionRectGatherer.
2795
2796         Ideally we would keep selection rects as full quads instead of rects
2797         for more of their life, but that problem is much deeper than just SelectionRectGatherer.
2798
2799         * editing/SelectionRectGatherer.h:
2800         Add a comment clarifying the coordinate space of the stored selection rects.
2801
2802         * rendering/RenderView.cpp:
2803         (WebCore::RenderView::applySubtreeSelection):
2804         Rename addRects to addGapRects for clarity.
2805
2806 2014-08-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2807
2808         [CSS Shapes] shape-margin not respected when it extends beyond an explicitly set margin
2809         https://bugs.webkit.org/show_bug.cgi?id=135308
2810
2811         Reviewed by Dean Jackson.
2812
2813         When a zero height line is supplied and the image shape extends into
2814         the margin box (only possible when a shape-margin is supplied), then
2815         only an empty interval was being returned. This patch makes it
2816         properly return the interval for the line in question.
2817
2818         Test: fast/shapes/shape-outside-floats/shape-outside-image-shape-margin.html
2819
2820         * rendering/shapes/RasterShape.cpp:
2821         (WebCore::RasterShape::getExcludedIntervals): Handle the zero height
2822         line case.
2823
2824 2014-08-04  Zalan Bujtas  <zalan@apple.com>
2825
2826         Subpixel rendering: InlineTextBox mistakenly rounds offset value before painting.
2827         https://bugs.webkit.org/show_bug.cgi?id=135470
2828
2829         Reviewed by Simon Fraser.
2830
2831         This patch removes the premature paint offset adjustment for inlines. Premature snapping
2832         could alter the final painting coordinates and push content to wrong positions.
2833
2834         This patch also enforces WebCore's pixel snapping strategy (round) on text painting.
2835         It ensures that text positioning is in sync with other painting related operations including
2836         clipping, box decorations etc. Underlying graphics libraries can take different directions on
2837         text snapping, for example CG ceils text coordinates vertically (in horizontal context,
2838         with the current settings). It can lead to undesired side effects.
2839
2840         Test: fast/inline/hidpi-inline-selection-leaves-gap.html
2841
2842         * rendering/InlineTextBox.cpp:
2843         (WebCore::InlineTextBox::paint):
2844         * rendering/RenderLayer.cpp:
2845         (WebCore::RenderLayer::calculateClipRects): wrong direction used at r171896.
2846         * rendering/SimpleLineLayoutFunctions.cpp: we don't paint vertical content here.
2847         (WebCore::SimpleLineLayout::paintFlow):
2848
2849 2014-08-04  Jer Noble  <jer.noble@apple.com>
2850
2851         Unreviewed, rolling out r171992, r171995, & r172000.
2852
2853         The cumulative effect of those revisions was to cause decoding errors when switching resolutions on YouTube.
2854
2855         Reverted changesets:
2856
2857         https://bugs.webkit.org/show_bug.cgi?id=135422 / http://trac.webkit.org/changeset/171992
2858         https://bugs.webkit.org/show_bug.cgi?id=135424 / http://trac.webkit.org/changeset/171995
2859         https://bugs.webkit.org/show_bug.cgi?id=135572 / http://trac.webkit.org/changeset/172000
2860
2861 2014-08-04  Joseph Pecoraro  <pecoraro@apple.com>
2862
2863         Always clear ConsoleClient when Page/WindowShell is destroyed
2864         https://bugs.webkit.org/show_bug.cgi?id=135569
2865
2866         Reviewed by Mark Lam.
2867
2868         * bindings/js/ScriptController.cpp:
2869         (WebCore::ScriptController::~ScriptController):
2870         Whenever a window shell goes away, clear the console client.
2871         We did this in clearWindowShell but not before destroying.
2872
2873 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
2874
2875         AX: isWordEndMatch should allow for multiple word selections
2876         https://bugs.webkit.org/show_bug.cgi?id=135573
2877
2878         Reviewed by Mario Sanchez Prada.
2879
2880         isWordEndMatch was searching from the beginning of the selected range, which meant
2881         that if the result was multiple words, we'd reject the result. 
2882         Instead, we should search from the end of the range, so that we encompass all words.
2883
2884         Modified existing test: platform/mac/accessibility/select-text-should-match-whole-words.html
2885
2886         * editing/TextIterator.cpp:
2887         (WebCore::SearchBuffer::isWordEndMatch):
2888
2889 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
2890
2891         AX: Secure text fields need to support Search parameterized attributes
2892         https://bugs.webkit.org/show_bug.cgi?id=135568
2893
2894         Reviewed by Mario Sanchez Prada.
2895  
2896         Secure text fields still need to support the fast searching that WebKit exposes, even though they don't support
2897         other parameterized attributes.
2898   
2899         Test: platform/mac/accessibility/secure-text-field-supports-fast-search.html
2900
2901         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2902         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2903
2904 2014-08-04  Jer Noble  <jer.noble@apple.com>
2905
2906         [MSE] Further fixes for "fast forward" playback after seeking in YouTube behavior.
2907         https://bugs.webkit.org/show_bug.cgi?id=135572
2908
2909         Reviewed by Eric Carlson.
2910
2911         Two related fixes:
2912
2913         In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush samples, so that
2914         the next time samples are re-enqueued, the starting point for re-enqueueing is correct.
2915
2916         In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue if they are before the
2917         current media time.
2918
2919         * Modules/mediasource/SourceBuffer.cpp:
2920         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2921         (WebCore::SourceBuffer::reenqueueMediaForTime):
2922
2923 2014-08-04  Matt Baker  <mattbaker@apple.com>
2924
2925         Web Inspector: All-caps CSS properties are not shown in Computed pane
2926         https://bugs.webkit.org/show_bug.cgi?id=133700
2927
2928         Reviewed by Timothy Hatcher.
2929
2930         * inspector/InspectorStyleSheet.cpp:
2931         (WebCore::InspectorStyle::styleWithProperties):
2932
2933 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
2934
2935         AX: SelectText functionality always selects text after current selection even if closer selection is behind it
2936         https://bugs.webkit.org/show_bug.cgi?id=135546
2937
2938         Reviewed by Mario Sanchez Prada.
2939
2940         Logic was incorrect for comparing ranges found before the current selection.
2941         ASSERT was incorrect for allowed ranges. We need to allow ranges that are right at the boundaries of our found ranges.
2942
2943         Extended existing test: platform/mac/accessibility/select-text.html
2944
2945         * accessibility/AccessibilityObject.cpp:
2946         (WebCore::rangeClosestToRange):
2947
2948 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
2949
2950         AX: AXSelectTextWithCriteriaParameterizedAttribute incorrectly selects the beginning letters of a word
2951         https://bugs.webkit.org/show_bug.cgi?id=135547
2952
2953         Reviewed by Mario Sanchez Prada.
2954
2955         Allow text search to specify that it wants to match end of words as well as start of words.
2956         This allows select text criteria to match on whole words only.
2957
2958         Test: platform/mac/accessibility/select-text-should-match-whole-words.html
2959
2960         * accessibility/AccessibilityObject.cpp:
2961         (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
2962         * editing/FindOptions.h:
2963         * editing/TextIterator.cpp:
2964         (WebCore::SearchBuffer::isWordEndMatch):
2965         (WebCore::SearchBuffer::search):
2966
2967 2014-08-04  Jer Noble  <jer.noble@apple.com>
2968
2969         [MSE] Re-enqueing due to overlapping appended samples can cause stuttering playback
2970         https://bugs.webkit.org/show_bug.cgi?id=135424
2971
2972         Reviewed by Eric Carlson.
2973
2974         If it become necessary to re-enqueue samples (due to appending overlapping samples which cause
2975         existing samples to be removed), the previous behavior was to flush and re-enqueue the new
2976         samples dependencies; i.e., everything up to and including the previous sync sample. This causes
2977         the decoder to visibly stall while it decodes those non-displaying samples, which could be
2978         a second or more worth of encoded video samples, depending on the frequency of sync samples.
2979
2980         Instead, when we are asked to re-enqueue, we will look for the next occurring sync sample.
2981         If found, we can switch over to the replacement samples at that point in the decode queue.
2982         This limits the overhead of a stream switch, and should allow for a visually seamless switch,
2983         at the cost of having to wait for the next sync sample to occur to affect the switch.
2984
2985         * Modules/mediasource/SourceBuffer.cpp:
2986         (WebCore::SourceBuffer::seekToTime): Clear the decode queue when seeking.
2987         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reenqueueMediaForCurrentTime.
2988         (WebCore::SourceBuffer::reenqueueMediaForCurrentTime): Switch over to the new stream only
2989             at the next sync sample.
2990
2991 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
2992
2993         AX: The Dictation command "Replace <phrase> with <phrase>" always capitalizes the replacement string
2994         https://bugs.webkit.org/show_bug.cgi?id=135557
2995
2996         Reviewed by Mario Sanchez Prada.
2997
2998         When replacing text, we should match the capitalization of the word being replaced 
2999         (unless the replacement looks like an abbreviation).   
3000  
3001         Test: platform/mac/accessibility/find-and-replace-match-capitalization.html
3002
3003         * accessibility/AccessibilityObject.cpp:
3004         (WebCore::AccessibilityObject::selectText):
3005
3006 2014-08-04  Pratik Solanki  <psolanki@apple.com>
3007
3008         QuickLook resources are cache-replaced with their original binary data causing ASSERT(m_data->size() == newBuffer->size()) in CachedResource.cpp
3009         https://bugs.webkit.org/show_bug.cgi?id=135548
3010         <rdar://problem/17891321>
3011
3012         Reviewed by David Kilzer.
3013
3014         When loading QuickLook resources, the SharedBuffer in the CachedResource is actually a
3015         converted representation of the real QuickLook resource. Replacing this with the actual
3016         network resource (which is what tryReplaceEncodedData() tried to do) is wrong and triggered
3017         asserts in the code.
3018
3019         Fix this by having CachedRawResource::mayTryReplaceEncodedData() return false if we are
3020         loading a QuickLook resource.
3021
3022         No new tests because we don't have a way to test QuickLook documents.
3023
3024         * loader/ResourceLoader.cpp:
3025         (WebCore::ResourceLoader::ResourceLoader):
3026         (WebCore::ResourceLoader::didCreateQuickLookHandle):
3027             Set a flag to indicate that we are loading a QuickLook document.
3028         * loader/ResourceLoader.h:
3029         (WebCore::ResourceLoader::isQuickLookResource):
3030         * loader/cache/CachedRawResource.cpp:
3031         (WebCore::CachedRawResource::CachedRawResource):
3032         (WebCore::CachedRawResource::finishLoading):
3033             Check if we were loading a QuickLook document and if so disable encoded data
3034             replacement.
3035         * loader/cache/CachedRawResource.h:
3036             Add a new bool field returned by mayTryReplaceEncodedData(). Default is true but it is
3037             set to false in finishLoading() if we were loading QuickLook document.
3038
3039 2014-08-04  Jer Noble  <jer.noble@apple.com>
3040
3041         [MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
3042         https://bugs.webkit.org/show_bug.cgi?id=135422
3043
3044         Reviewed by Eric Carlson.
3045
3046         When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
3047         the SourceBufferPrivate may signal that it's ready for new samples through the
3048         sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
3049         continue to provideMediaData(), as that will append samples from the prior-to-seeking media
3050         timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
3051         display those frames as quickly as possible (the "fast forward" behavior) in order to catch
3052         up to the new current time.
3053
3054         If a re-enqueue is pending, don't provide media data in response to being notified that the
3055         SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
3056         are appended.
3057
3058         * Modules/mediasource/SourceBuffer.cpp:
3059         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
3060         * dom/Document.cpp:
3061         (WebCore::Document::unregisterCollection):
3062
3063 2014-08-04  Carlos Garcia Campos  <cgarcia@igalia.com>
3064
3065         [GTK] Install all unstable webkitdom headers
3066         https://bugs.webkit.org/show_bug.cgi?id=135544
3067
3068         Reviewed by Gustavo Noronha Silva.
3069
3070         We were checking whether generated file existed before they had
3071         been generated.
3072
3073         * PlatformGTK.cmake: Add Unstable.h header for all stable classes
3074         to GObjectDOMBindingsUnstable_INSTALLED_HEADERS and split the
3075         install command for stable and unstable headers making unstable
3076         headers optional.
3077
3078 2014-08-04  peavo@outlook.com  <peavo@outlook.com>
3079
3080         [WinCairo] Compile error in OpenTypeMathData.cpp.
3081         https://bugs.webkit.org/show_bug.cgi?id=135541
3082
3083         Reviewed by Brent Fulgham.
3084
3085         The SharedBuffer class needs to be defined.
3086         Also, the OpenTypeMathData constructor should be implemented when OPENTYPE_MATH is not enabled.
3087
3088         * platform/graphics/opentype/OpenTypeMathData.cpp:
3089
3090 2014-08-03  Dan Bernstein  <mitz@apple.com>
3091
3092         <rdar://problem/17782529> REGRESSION: OS marketing version in iOS Simulator user-agent string is the host OS’s
3093         https://bugs.webkit.org/show_bug.cgi?id=135549
3094
3095         Reviewed by Mark Rowe.
3096
3097         * platform/cocoa/SystemVersion.mm:
3098         (WebCore::createSystemMarketingVersion): On the iOS Simulator, locate the system Library
3099         directory relative to the Simulator root.
3100
3101 2014-08-02  Jeremy Jones  <jeremyj@apple.com>
3102
3103         Support both window and view based video fullscreen.
3104         https://bugs.webkit.org/show_bug.cgi?id=135525
3105
3106         Reviewed by Simon Fraser.
3107
3108         Presenting in a separate window gives greater flexibility for rotation separately from the app.
3109         Presenting in the same window works better if the interface is rehosted in another process.
3110
3111         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3112         (-[WebVideoFullscreenController enterFullscreen:]): Use clientRect instead of screenRect.
3113         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add m_window and m_parentView.
3114         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
3115         (-[WebAVVideoLayer setBounds:]): Parent view might not be fullscreen; use window instead.
3116         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Conditionally create UIWindow and UIViewController for fullscreen.
3117         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Video, not the container should have black background.
3118         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Conditionally translate finalRect.
3119         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): Clean up UIWindow and force status bar to correct orientation.
3120         (WebVideoFullscreenInterfaceAVKit::invalidate): Clean up UIWindow.
3121         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Hide window and exit without animation.
3122         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
3123         (WebVideoFullscreenModelMediaElement::setVideoFullscreenLayer): Apply frame, because it may have been set before the layer.
3124
3125 2014-08-02  Benjamin Poulain  <bpoulain@apple.com>
3126
3127         Update the SearchFieldResultsButtonElement shadow Pseudo Id when HTMLInputElement's maxResults change
3128         https://bugs.webkit.org/show_bug.cgi?id=135491
3129
3130         Reviewed by Ryosuke Niwa.
3131
3132         Replace the shadowPseudoId() override + manual style invalidation by the generic pseudo ID update.
3133
3134         * html/HTMLInputElement.cpp:
3135         (WebCore::HTMLInputElement::parseAttribute):
3136         * html/InputType.cpp:
3137         (WebCore::InputType::maxResultsAttributeChanged):
3138         * html/InputType.h:
3139         * html/SearchInputType.cpp:
3140         (WebCore::SearchInputType::SearchInputType):
3141         (WebCore::updateResultButtonPseudoType):
3142         (WebCore::SearchInputType::maxResultsAttributeChanged):
3143         (WebCore::SearchInputType::createShadowSubtree):
3144         (WebCore::SearchInputType::destroyShadowSubtree):
3145         * html/SearchInputType.h:
3146         * html/shadow/TextControlInnerElements.cpp:
3147         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId): Deleted.
3148         * html/shadow/TextControlInnerElements.h:
3149
3150 2014-08-02  Benjamin Poulain  <bpoulain@apple.com>
3151
3152         Add warnings for the buggy implementations of shadowPseudoId()
3153         https://bugs.webkit.org/show_bug.cgi?id=135477
3154
3155         Reviewed by Ryosuke Niwa.
3156
3157         Dean is going to look into fixing media element styling.
3158         In the meantime, add warnings to prevent this from spreading.
3159
3160         * dom/Element.h:
3161         * html/shadow/SliderThumbElement.cpp:
3162         (WebCore::SliderThumbElement::shadowPseudoId):
3163         (WebCore::SliderContainerElement::shadowPseudoId):
3164
3165 2014-08-01  Commit Queue  <commit-queue@webkit.org>
3166
3167         Unreviewed, rolling out r171957.
3168         https://bugs.webkit.org/show_bug.cgi?id=135538
3169
3170         Caused GTK assertions and test failures (Requested by smfr on
3171         #webkit).
3172
3173         Reverted changeset:
3174
3175         "Clean up image subsampling code, make it less iOS-specific"
3176         https://bugs.webkit.org/show_bug.cgi?id=134916
3177         http://trac.webkit.org/changeset/171957
3178
3179 2014-08-01  Myles C. Maxfield  <litherum@gmail.com>
3180
3181         [CMake] Allow CMake to find GLib on FreeBSD
3182         https://bugs.webkit.org/show_bug.cgi?id=132530
3183
3184         Reviewed by Gustavo Noronha Silva.
3185
3186         On FreeBSD, glibconfig.h is at /usr/local/include/glib-2.0/glibconfig.h.
3187
3188         * Source/cmake/FindGLIB.cmake:
3189
3190 2014-08-01  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3191
3192         REGRESSION(r171942): [CMAKE] [GTK] build broken (clean build).
3193         https://bugs.webkit.org/show_bug.cgi?id=135522
3194
3195         Reviewed by Martin Robinson.
3196
3197         No new tests required, no new functionality.
3198
3199         * CMakeLists.txt: Add missing include to the inspector headers
3200         and fix the path to InspectorJSTypeBuilders.h
3201
3202 2014-08-01  Simon Fraser  <simon.fraser@apple.com>
3203
3204         Fix resource leak in FillLayersPropertyWrapper object member
3205         https://bugs.webkit.org/show_bug.cgi?id=135462
3206
3207         Reviewed by Andreas Kling.
3208
3209         Fix leak of m_fillLayerPropertyWrapper by using unique_ptr<>.
3210         Based on patch by Przemyslaw Kuczynski.
3211
3212         * page/animation/CSSPropertyAnimation.cpp:
3213         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
3214
3215 2014-08-01  Simon Fraser  <simon.fraser@apple.com>
3216
3217         Clean up image subsampling code, make it less iOS-specific
3218         https://bugs.webkit.org/show_bug.cgi?id=134916
3219
3220         Reviewed by Dean Jackson.
3221
3222         Compile the image subsampling code on both Mac and iOS, and make it more platform
3223         neutral in general. Add a setting to allow it to be enabled on Mac for testing.
3224         
3225         The most significant changes are in ImageSourceCG and BitmapImageCG. CG's ImageSource
3226         is no longer stateful with respect to subsampling; its functions take a SubsamplingLevel
3227         when appropriate. CG's BitmapImage now determines which level of subsampling to use
3228         for a given frame, storing the subsampling level in the frame data. It can replace
3229         an aggressively subsampled frame with a less subsampled frame if necessary.
3230         
3231         To reduce the chances of subsampling affecting rendering, BitmapImage::size() now
3232         always returns the non-subsampled size; subsampling is strictly internal to BitmapImage.
3233         BitmapImage::draw() takes care of scaling the srcRect for subsampled images.
3234         
3235         iOS had a code path that enabled caching of frame metadata in BitmapImage without
3236         actually decoding the frame; make this cross-platform.
3237
3238         * WebCore.exp.in: Changed signature for GraphicsContext::drawNativeImage().
3239         * WebCore.xcodeproj/project.pbxproj: Added ImageSource.cpp, which is not built
3240         for Cocoa but useful for reference.
3241         * loader/cache/CachedImage.cpp:
3242         (WebCore::CachedImage::imageSizeForRenderer): Remove iOS-specific subsampling code.
3243         (WebCore::CachedImage::createImage): Call setAllowSubsampling() on the image if we
3244         can get to Settings (m_loader is null for image documents).
3245         (WebCore::CachedImage::currentFrameKnownToBeOpaque): This forced decode always
3246         caused creation of the non-subsampled image, so remove it. There's no reason to
3247         eagerly decode the frame here.
3248         * loader/cache/CachedImage.h: Fix comment.
3249         * page/Settings.cpp: Add defaultImageSubsamplingEnabled, true for iOS and false for Mac.
3250         * page/Settings.in: Added imageSubsamplingEnabled.
3251         * platform/graphics/BitmapImage.cpp:
3252         (WebCore::BitmapImage::BitmapImage): Init some more things. Default m_allowSubsampling to
3253         true for iOS to catch images created in code paths where we can't get to Settings.
3254         (WebCore::BitmapImage::haveFrameAtIndex): Handy helper.
3255         (WebCore::BitmapImage::cacheFrame): Now takes the subsampling level and whether to cache
3256         just metadata, or also the frame.
3257         (WebCore::BitmapImage::didDecodeProperties): No need to store originalSize.
3258         (WebCore::BitmapImage::updateSize): When we get the size for the first time, call
3259         determineMinimumSubsamplingLevel() to choose a reasonable subsampling level which takes
3260         platform-specific limits into account.
3261         (WebCore::BitmapImage::dataChanged): Comment.
3262         (WebCore::BitmapImage::ensureFrameIsCached): Take ImageFrameCaching into account.
3263         (WebCore::BitmapImage::frameAtIndex): Choose a subsampling level given the scale,
3264         then determine if we can use the currently cached frame, or whether we should resample.
3265         (WebCore::BitmapImage::frameIsCompleteAtIndex): Caching m_isComplete is now done when caching
3266         frame metadata.
3267         (WebCore::BitmapImage::frameDurationAtIndex):
3268         (WebCore::BitmapImage::frameHasAlphaAtIndex): The 'true' return is the safe return value.
3269         (WebCore::BitmapImage::frameOrientationAtIndex): Caching m_orientation is now done when caching
3270         frame metadata.
3271         (WebCore::BitmapImage::cacheFrameInfo): Deleted.
3272         (WebCore::BitmapImage::originalSize): Deleted.
3273         (WebCore::BitmapImage::originalSizeRespectingOrientation): Deleted.
3274         (WebCore::BitmapImage::currentFrameSize): Deleted.
3275         (WebCore::BitmapImage::ensureFrameInfoIsCached): Deleted.
3276         * platform/graphics/BitmapImage.h:
3277         (WebCore::FrameData::FrameData):
3278         * platform/graphics/GraphicsContext.h: No need to pass a scale param now.
3279         * platform/graphics/ImageSource.cpp: Non-Cocoa changes.
3280         (WebCore::ImageSource::subsamplingLevelForScale):
3281         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
3282         (WebCore::ImageSource::size):
3283         (WebCore::ImageSource::frameSizeAtIndex):
3284         (WebCore::ImageSource::createFrameAtIndex):
3285         (WebCore::ImageSource::frameBytesAtIndex):
3286         * platform/graphics/ImageSource.h: No longer stores subsampling state.
3287         (WebCore::ImageSource::isSubsampled): Deleted.
3288         * platform/graphics/cairo/BitmapImageCairo.cpp:
3289         (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
3290         * platform/graphics/cg/BitmapImageCG.cpp:
3291         (WebCore::FrameData::clear):
3292         (WebCore::BitmapImage::BitmapImage): Init more members.
3293         (WebCore::BitmapImage::determineMinimumSubsamplingLevel): Choose a minimum subsampling
3294         level for the platform (subsample until the image area falls under a threshold).
3295         (WebCore::BitmapImage::checkForSolidColor): Don't bother decoding frames if the image
3296         is not 1x1. Also take care not to decode a non-subsampled image.
3297         (WebCore::BitmapImage::draw): The actual bug fix is here; remove logic that
3298         computed srcRectForCurrentFrame from m_size and m_originalSize; for some callers
3299         srcRect was computed using the pre-subsampled size, and for others it was the subsampled size.
3300         Instead, scale srcRect by mapping between the non-subsampled size, and the size of the CGImageRef
3301         which is affected by subsampling.
3302         (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
3303         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3304         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Remove #ifdeffed code.
3305         (WebCore::GraphicsContext3D::paintToCanvas):
3306         * platform/graphics/cg/GraphicsContextCG.cpp:
3307         (WebCore::GraphicsContext::drawNativeImage): No more weird scaling!
3308         * platform/graphics/cg/ImageBufferCG.cpp:
3309         (WebCore::ImageBuffer::draw):
3310         * platform/graphics/cg/ImageSourceCG.cpp:
3311         (WebCore::ImageSource::ImageSource):
3312         (WebCore::createImageSourceOptions): Helper that always returns a new CFDictionaryRef.
3313         (WebCore::imageSourceOptions): If not subsampling, return the cached CFDictionaryRef, otherwise
3314         make a new options dict and return it.
3315         (WebCore::ImageSource::subsamplingLevelForScale): Helper that returns a subsampling level
3316         between 0 and 3 given a scale.
3317         (WebCore::ImageSource::isSizeAvailable): SkipMetadata is a default value for the param now.
3318         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex): We turn off subsampling for progressive
3319         JPEGs because of a bug, so need this to know if a frame should be subsampled.
3320         (WebCore::ImageSource::frameSizeAtIndex): The looping to find a subsampling level is now in BitmapImageCG.
3321         (WebCore::ImageSource::orientationAtIndex):
3322         (WebCore::ImageSource::size): Always use a subsampling level of 0 for size().
3323         (WebCore::ImageSource::getHotSpot):
3324         (WebCore::ImageSource::repetitionCount):
3325         (WebCore::ImageSource::createFrameAtIndex): The caller mapped a scale to a level.
3326         (WebCore::ImageSource::frameDurationAtIndex):
3327         (WebCore::ImageSource::frameBytesAtIndex):
3328         (WebCore::ImageSource::imageSourceOptions): Deleted.
3329         (WebCore::ImageSource::originalSize): Deleted.
3330         * platform/graphics/mac/ImageMac.mm:
3331         (WebCore::BitmapImage::invalidatePlatformData): 0 -> nullptr
3332         * platform/graphics/wince/ImageWinCE.cpp:
3333         (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
3334
3335 2014-08-01  Andreas Kling  <akling@apple.com>
3336
3337         Many DOM objects have InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero for no reason.
3338         <https://webkit.org/b/135519>
3339
3340         Don't set this structure flag unless the object actually has an override
3341         for getOwnPropertySlotByIndex().
3342
3343         Reviewed by Geoffrey Garen.
3344
3345         * bindings/scripts/CodeGeneratorJS.pm:
3346         (GenerateHeader):
3347         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3348         * bindings/scripts/test/JS/JSTestException.h:
3349         * bindings/scripts/test/JS/JSTestInterface.h:
3350         * bindings/scripts/test/JS/JSTestObj.h:
3351         * bindings/scripts/test/JS/JSTestTypedefs.h:
3352
3353 2014-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
3354
3355         SVG Font kerning can take an early out if the font has no kerning information
3356         https://bugs.webkit.org/show_bug.cgi?id=135524
3357
3358         Reviewed by Dean Jackson.
3359
3360         Rather than calling SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs() again
3361         and again, skip the iteration entirely if every call would return 0.
3362
3363         No new tests because there is no behavior change.
3364
3365         * rendering/svg/SVGTextRunRenderingContext.cpp:
3366         (WebCore::SVGTextRunRenderingContext::applySVGKerning):
3367         * svg/SVGFontElement.h:
3368
3369 2014-08-01  Beth Dakin  <bdakin@apple.com>
3370
3371         Inspector highlights clipped at the bottom on the page in WK1 views with 
3372         contentInsets
3373         https://bugs.webkit.org/show_bug.cgi?id=135480
3374         -and corresponding-
3375         <rdar://problem/17850323>
3376
3377         Forgot to commit this one very critical part with 
3378         http://trac.webkit.org/changeset/171951 
3379
3380         * platform/ScrollView.cpp:
3381         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
3382
3383 2014-08-01  Beth Dakin  <bdakin@apple.com>
3384
3385         Inspector highlights clipped at the bottom on the page in WK1 views with 
3386         contentInsets
3387         https://bugs.webkit.org/show_bug.cgi?id=135480
3388         -and corresponding-
3389         <rdar://problem/17850323>
3390
3391         Reviewed by Simon Fraser.
3392
3393         unscaledTotalVisibleContentSize() was the main function on Mac that was expected 
3394         to return the rect representing ALL visible content, including content that might 
3395         be in an inset area and obscured by UI elements. This patch re-names that function 
3396         to unscaledVisibleContentSizeIncludingObscuredArea(), and that patch makes that 
3397         function return the right thing in the platformWidget() case.
3398
3399         Re-name.
3400         * inspector/InspectorOverlay.cpp:
3401         (WebCore::InspectorOverlay::update):
3402
3403         Return platformVisibleContentSizeIncludingObscuredArea() for the platformWidget() 
3404         case and re-name.
3405         * platform/ScrollView.cpp:
3406         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
3407
3408         This was just wrong. It was returning the big rectangle instead of the small one 
3409         for platformWidget().
3410         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
3411
3412         New platform functions.
3413         (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
3414         (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
3415         (WebCore::ScrollView::unscaledTotalVisibleContentSize): Deleted.
3416         * platform/ScrollView.h:
3417         * platform/ios/ScrollViewIOS.mm:
3418         (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
3419         (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
3420         * platform/mac/ScrollViewMac.mm:
3421         (WebCore::ScrollView::platformVisibleContentRect):
3422         (WebCore::ScrollView::platformVisibleContentSize):
3423         (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
3424         (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
3425
3426         Re-name.
3427         * rendering/RenderLayerCompositor.cpp:
3428         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
3429         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
3430         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
3431         (WebCore::RenderLayerCompositor::ensureRootLayer):
3432
3433 2014-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
3434
3435         SVGGlyph wastes space due to padding
3436         https://bugs.webkit.org/show_bug.cgi?id=135520
3437
3438         Reviewed by Dean Jackson.
3439
3440         Rearrange members in SVGGlyph so there is no wasted padding space.
3441
3442         No new tests because there is no behavior change.
3443
3444         * platform/graphics/SVGGlyph.h:
3445         (WebCore::SVGGlyph::SVGGlyph):
3446
3447 2014-07-31  Dean Jackson  <dino@apple.com>
3448
3449         [Media iOS] Ensure there is a nice default fallback for missing wireless target names
3450         https://bugs.webkit.org/show_bug.cgi?id=135488
3451         <rdar://problem/17879156>
3452
3453         Reviewed by Eric Carlson.
3454
3455         We occasionally run into cases where this.host.externalDeviceDisplayName
3456         is empty or null, creating a pretty ugly/confusing string in the
3457         wireless playback status screen.
3458
3459         If this happens, we should default to using "Apple TV".
3460
3461         * Modules/mediacontrols/mediaControlsiOS.js:
3462         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Check if the externalDeviceDisplayName
3463         is empty or null, and fall back to "Apple TV" if so.
3464
3465 2014-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
3466
3467         URLs in srcset attributes are not made absolute upon copy and paste
3468         https://bugs.webkit.org/show_bug.cgi?id=135448
3469
3470         Reviewed by Ryosuke Niwa.
3471
3472         When pasting, canonicalize URLs in srcset the same way we do with src.
3473
3474         Test: editing/pasteboard/img-srcset-copy-paste-canonicalization.html
3475
3476         * dom/Element.cpp:
3477         (WebCore::Element::completeURLsInAttributeValue): Initial implemention, moved from markup.cpp.
3478         * dom/Element.h:
3479         (WebCore::Element::attributeContainsURL): New function for completeURLs to call.
3480         (WebCore::Element::completeURLsInAttributeValue): Only called if attributeContainsURL returns
3481         true. Default implementation simply calls isURLAttribute().
3482         * editing/markup.cpp:
3483         (WebCore::completeURLs): Call attributeContainsURL() and completeURLsInAttributeValue() to
3484         complete the URL, so nodes can perform their own behavior.
3485         * html/HTMLImageElement.cpp:
3486         (WebCore::HTMLImageElement::attributeContainsURL): Return true for srcset.
3487         (WebCore::HTMLImageElement::completeUrlAttributeValue): Use our existing srcset parser to
3488         parse the srcset attribute, then use its output to canonicalize URLs, and build it back up
3489         into a string.
3490         * html/HTMLImageElement.h:
3491         (WebCore::HTMLImageElement::attributeContainsURL):
3492         (WebCore::HTMLImageElement::completeUrlAttributeValue):
3493         * html/parser/HTMLSrcsetParser.cpp: Make parseImageCandidatesFromSrcsetAttribute() public
3494         and change its signature to return its result.
3495         (WebCore::parseImageCandidatesFromSrcsetAttribute):
3496         * html/parser/HTMLSrcsetParser.h: Ditto.
3497
3498 2014-07-31  Andreas Kling  <akling@apple.com>
3499
3500         Remove the JSC::OverridesVisitChildren flag.
3501         <https://webkit.org/b/135489>
3502
3503         Tweak the bindings code generator to stop spitting out the flag.
3504
3505         Reviewed by Geoffrey Garen.
3506
3507         * bindings/js/JSDOMBinding.h:
3508         * bindings/js/JSDOMGlobalObject.cpp:
3509         (WebCore::JSDOMGlobalObject::visitChildren):
3510         * bindings/scripts/CodeGeneratorJS.pm:
3511         (GenerateHeader):
3512         (GenerateImplementation):
3513
3514 2014-08-01  Jer Noble  <jer.noble@apple.com>
3515
3516         [MSE][Mac] Volume is not remembered between items in a YouTube playlist
3517         https://bugs.webkit.org/show_bug.cgi?id=135479
3518
3519         Reviewed by Eric Carlson.
3520
3521         When an AVSampleBufferAudioRenderer is added to the player, set its -volume and -muted
3522         properties with the current values from the HTMLMediaElement. 
3523
3524         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3525         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
3526
3527 2014-08-01  Tim Horton  <timothy_horton@apple.com>
3528
3529         Fix the iOS build after r171891
3530
3531         * platform/ios/ScrollViewIOS.mm:
3532         (WebCore::ScrollView::platformTopContentInset):
3533         (WebCore::ScrollView::platformSetTopContentInset):
3534
3535 2014-08-01  Pratik Solanki  <psolanki@apple.com>
3536
3537         Remove EventNames.h include from header files
3538         https://bugs.webkit.org/show_bug.cgi?id=135486
3539
3540         Reviewed by Alexey Proskuryakov.
3541
3542         No new tests because no functional changes.
3543
3544         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
3545         * Modules/gamepad/GamepadEvent.h:
3546         * Modules/indexeddb/IDBRequest.h:
3547         * Modules/indexeddb/IDBTransaction.h:
3548         * Modules/mediastream/RTCStatsResponse.h:
3549         * Modules/websockets/WebSocket.h:
3550         * css/FontLoader.h:
3551         * dom/SecurityPolicyViolationEvent.h:
3552         * loader/appcache/DOMApplicationCache.h:
3553         * workers/AbstractWorker.h:
3554         * workers/Worker.h:
3555         * workers/WorkerGlobalScope.h:
3556         * xml/XMLHttpRequest.h:
3557         * xml/XMLHttpRequestProgressEvent.h:
3558
3559 2014-08-01  Simon Fraser  <simon.fraser@apple.com>
3560
3561         nullptr goodness in RenderLayer
3562         https://bugs.webkit.org/show_bug.cgi?id=135512
3563
3564         Reviewed by Brent Fulgham.
3565
3566         Use nullptr in RenderLayer.
3567
3568         * rendering/RenderLayer.cpp:
3569         (WebCore::RenderLayer::RenderLayer):
3570         (WebCore::RenderLayer::updateDescendantDependentFlags):
3571         (WebCore::accumulateOffsetTowardsAncestor):
3572         (WebCore::RenderLayer::scrollRectToVisible):
3573         (WebCore::RenderLayer::destroyScrollbar):
3574         (WebCore::RenderLayer::paintLayerContents):
3575         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
3576         (WebCore::RenderLayer::hitTestLayer):
3577         (WebCore::RenderLayer::hitTestList):
3578         (WebCore::RenderLayer::calculateClipRects):
3579
3580 2014-08-01  Tim Horton  <timothy_horton@apple.com>
3581
3582         Build fix for iOS
3583
3584         * bindings/objc/DOM.mm:
3585         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
3586         We use CGImageRef instead of NSImage here on iOS.
3587
3588 2014-08-01  Renato Nagy  <nagy.renato@stud.u-szeged.hu>
3589
3590         ASSERTION FAILED: listNode in WebCore::RenderListItem::updateListMarkerNumbers
3591         https://bugs.webkit.org/show_bug.cgi?id=134970
3592
3593         Reviewed by Zalan Bujtas.
3594
3595         Removed an unnecessary assert, because the null return value of enclosingList() is
3596         handled properly after this assert.
3597
3598         * rendering/RenderListItem.cpp:
3599         (WebCore::RenderListItem::updateListMarkerNumbers):
3600
3601 2014-08-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3602
3603         Replace DEPRECATED_DEFINE_STATIC_LOCAL with NeverDestroyed<T> in NavigatorContentUtils
3604         https://bugs.webkit.org/show_bug.cgi?id=135494
3605
3606         Reviewed by Andrei Bucur.
3607
3608         Use static NeverDestroyed<T> variables instead of the DEPRECATED_DEFINE_STATIC_LOCAL macro.
3609
3610         No new tests, no behavior changes.
3611
3612         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3613         (WebCore::customHandlersStateString):
3614         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
3615
3616 2014-07-31  Benjamin Poulain  <bpoulain@apple.com>
3617
3618         Remove shadowPseudoId() override from the shadow media controls
3619         https://bugs.webkit.org/show_bug.cgi?id=135474
3620
3621         Reviewed by Eric Carlson.
3622
3623         Small cleanup.
3624
3625         * html/shadow/MediaControlElementTypes.h:
3626         * html/shadow/MediaControlElements.cpp:
3627         (WebCore::MediaControlPanelElement::MediaControlPanelElement):
3628         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
3629         (WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
3630         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement):
3631         (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
3632         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
3633         (WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement):
3634         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement):
3635         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement):
3636         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
3637         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement):
3638         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement):
3639         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement):
3640         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement):
3641         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
3642         (WebCore::MediaControlClosedCaptionsContainerElement::MediaControlClosedCaptionsContainerElement):
3643         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement):
3644         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
3645         (WebCore::MediaControlPanelVolumeSliderElement::MediaControlPanelVolumeSliderElement):
3646         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement):
3647         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
3648         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement):
3649         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement):
3650         (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement):
3651         (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement):
3652         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
3653         (WebCore::MediaControlPanelElement::shadowPseudoId): Deleted.
3654         (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId): Deleted.
3655         (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId): Deleted.
3656         (WebCore::MediaControlTimelineContainerElement::shadowPseudoId): Deleted.
3657         (WebCore::MediaControlVolumeSliderContainerElement::shadowPseudoId): Deleted.
3658         (WebCore::MediaControlStatusDisplayElement::shadowPseudoId): Deleted.
3659         (WebCore::MediaControlPanelMuteButtonElement::shadowPseudoId): Deleted.
3660         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Deleted.
3661         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Deleted.
3662         (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId): Deleted.
3663         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Deleted.
3664         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Deleted.
3665         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Deleted.
3666         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Deleted.
3667         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Deleted.
3668         (WebCore::MediaControlClosedCaptionsContainerElement::shadowPseudoId): Deleted.
3669         (WebCore::MediaControlClosedCaptionsTrackListElement::shadowPseudoId): Deleted.
3670         (WebCore::MediaControlTimelineElement::shadowPseudoId): Deleted.
3671         (WebCore::MediaControlPanelVolumeSliderElement::shadowPseudoId): Deleted.
3672         (WebCore::MediaControlFullscreenVolumeSliderElement::shadowPseudoId): Deleted.
3673         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Deleted.
3674         (WebCore::MediaControlFullscreenVolumeMinButtonElement::shadowPseudoId): Deleted.
3675         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::shadowPseudoId): Deleted.
3676         (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Deleted.
3677         (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Deleted.
3678         (WebCore::MediaControlTextTrackContainerElement::textTrackContainerElementShadowPseudoId): Deleted.
3679         (WebCore::MediaControlTextTrackContainerElement::shadowPseudoId): Deleted.
3680         * html/shadow/MediaControlElements.h:
3681         * html/shadow/MediaControls.cpp:
3682         (WebCore::MediaControls::MediaControls):
3683         (WebCore::MediaControls::shadowPseudoId): Deleted.
3684         * html/shadow/MediaControls.h:
3685
3686 2014-07-31  Timothy Horton  <timothy_horton@apple.com>
3687
3688         Build fix for platforms where we should have automaticallyAdjustsContentInsets but it isn't public yet
3689
3690         * platform/mac/ScrollViewMac.mm:
3691
3692 2014-07-31  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3693
3694         [EFL] Add support for building with Geoclue2.
3695         https://bugs.webkit.org/show_bug.cgi?id=135455
3696
3697         Reviewed by Gyuyoung Kim.
3698
3699         No new tests required, no new functionality.
3700
3701         * PlatformEfl.cmake: Generate derived sources for Geoclue2Interface
3702         and include gio-unix path.
3703
3704 2014-07-31  Zalan Bujtas  <zalan@apple.com>
3705
3706         Subpixel rendering: Region painting needs to take subpixel accumulation into account.
3707         https://bugs.webkit.org/show_bug.cgi?id=135469
3708
3709         Similar to non-region painting, when the context is translated, we need to propagate
3710         the subpixel difference so that renderers get snapped to the same position as if they
3711         were not part of a region.
3712
3713         Reviewed by Simon Fraser.
3714
3715         Covered by existing tests/not testable (webkit.org/b/135470)
3716
3717         * html/shadow/MediaControlElements.cpp:
3718         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
3719         * page/FrameView.cpp:
3720         (WebCore::FrameView::paintContents):
3721         * rendering/RenderLayer.cpp:
3722         (WebCore::RenderLayer::paint):
3723         (WebCore::RenderLayer::calculateClipRects):
3724         * rendering/RenderLayer.h:
3725
3726 2014-07-31  Jer Noble  <jer.noble@apple.com>
3727
3728         [iOS] Video in an <embed> has a bad aspect ratio when in fullscreen mode.
3729         https://bugs.webkit.org/show_bug.cgi?id=135481
3730
3731         Reviewed by Simon Fraser.
3732
3733         Do not change the gravity of our AVPlayerLayer when in full screen mode; its gravity
3734         is controlled by setVideoFullscreenGravity(), and should not be affected by style changes.
3735
3736         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3737         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
3738
3739 2014-07-31  Beth Dakin  <bdakin@apple.com>
3740
3741         Hit-testing broken in WebKit 1 views with AppKit's contentInsets
3742         https://bugs.webkit.org/show_bug.cgi?id=135434
3743         -and corresponding-
3744         <rdar://problem/17850323>
3745
3746         Reviewed by Benjamin Poulain.
3747
3748         AppKit's contentInsets are factored into scroll positions and mouse positions, but
3749         in WebCore, we generally want all of those things to be factored out so that, for
3750         example, the scroll position of a document pinned to the top is the same whether
3751         or not there is a contentInset. So to fix hit-testing in WebKit 1 views with
3752         contentInsets, this patch factors the inset out or into of all coordinate
3753         conversion methods just like we do for the WebKit2 contentInset.
3754         
3755         This patch also adds the ability to test WK1 platformContentInsets with
3756         window.internals, and it re-names convertFromRenderer to 
3757         convertFromRendererToContainingView and also re-names convertToRenderer to
3758         convertFromContainingViewToRenderer.
3759
3760         ScrollView::topContentInset() takes an optional parameter indicating whether the
3761         caller wants the WebCore::Page contentInset or the platform content inset. It’s
3762         necessary to distinguish between these cases because there is a lot of code that
3763         only wants the WebCore::Page contentInset since that feature is actually
3764         implemented in WebCore as opposed to being implemented at the platform level.
3765         * WebCore.exp.in:
3766         * page/FrameView.cpp:
3767         (WebCore::FrameView::topContentInset):
3768
3769         For layout test purposes, set the platforTopContentInset here if there is a 
3770         platformWidget().
3771         (WebCore::FrameView::topContentInsetDidChange):
3772
3773         Re-named functions, also all coordinate conversion functions call 
3774         topContentInset(ManualOrPlatformContentInset)
3775         (WebCore::FrameView::convertFromContainingViewToRenderer):
3776         (WebCore::FrameView::convertToContainingView):
3777         (WebCore::FrameView::convertFromContainingView):
3778         (WebCore::FrameView::convertFromRenderer): Deleted.
3779         (WebCore::FrameView::convertToRenderer): Deleted.
3780         * page/FrameView.h:
3781         * page/Page.cpp:
3782         (WebCore::Page::setTopContentInset):
3783         * platform/ScrollView.cpp:
3784         (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
3785         (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
3786         (WebCore::ScrollView::contentsToRootView):
3787         (WebCore::ScrollView::rootViewToTotalContents):
3788         (WebCore::ScrollView::contentsToWindow):
3789         (WebCore::ScrollView::platformTopContentInset):
3790         (WebCore::ScrollView::platformSetTopContentInset):
3791         * platform/ScrollView.h:
3792         (WebCore::ScrollView::topContentInset):
3793         * platform/ios/ScrollViewIOS.mm:
3794         (WebCore::ScrollView::platformTopContentInset):
3795         (WebCore::ScrollView::platformSetTopContentInset):
3796
3797         Implement new platform inset-related functions using AppKit's implementation.
3798         * platform/mac/ScrollViewMac.mm:
3799         (WebCore::ScrollView::platformTopContentInset):
3800         (WebCore::ScrollView::platformSetTopContentInset):
3801         
3802         When we set the scroll position for the documentView, we have to factor the inset
3803         back into the WebCore scroll position.
3804         (WebCore::ScrollView::platformSetScrollPosition):
3805         
3806         Re-named functions.
3807         * rendering/RenderLayer.cpp:
3808         (WebCore::RenderLayer::convertFromScrollbarToContainingView):
3809         (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
3810         * rendering/RenderListBox.cpp:
3811         (WebCore::RenderListBox::convertFromScrollbarToContainingView):
3812         (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
3813
3814 2014-07-31  Dean Jackson  <dino@apple.com>
3815
3816         Default buttons do not pulse in OS X 10.10
3817         https://bugs.webkit.org/show_bug.cgi?id=135447
3818         <rdar://problem/17875896>
3819
3820         Reviewed by Dan Bernstein.
3821
3822         OS X Yosemite does not have the animated pulsing default
3823         buttons seen in previous releases. We don't need to have
3824         a timer in RenderButton constantly triggering repaints.
3825
3826         * platform/mac/ThemeMac.mm:
3827         (WebCore::paintButton): No need to advance the animation.
3828         * rendering/RenderButton.cpp:
3829         (WebCore::RenderButton::styleDidChange): Ask the theme if it
3830         should advance the animation.
3831         * rendering/RenderTheme.h:
3832         (WebCore::RenderTheme::defaultButtonHasAnimation): Virtual function
3833         indicating if the button needs to repaint.
3834         * rendering/RenderThemeMac.h:
3835         * rendering/RenderThemeMac.mm:
3836         (WebCore::RenderThemeMac::defaultButtonHasAnimation): Provide platform
3837         specific result on Yosemite and above.
3838
3839 2014-07-31  Tim Horton  <timothy_horton@apple.com>
3840
3841         DOM::renderedImageForcingBlackText returns an image with the wrong logical size on 2x displays
3842         https://bugs.webkit.org/show_bug.cgi?id=135442
3843         <rdar://problem/17614632>
3844
3845         Reviewed by Simon Fraser.
3846
3847         * bindings/objc/DOM.mm:
3848         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
3849         Scale the NSImage size by the device scale factor,
3850         similar to what we did for drag images in r167403.
3851         Ideally this scaling would happen in the code that
3852         generates the images, but this is a much larger change
3853         with much more regression potential.
3854
3855 2014-07-31  Bear Travis  <betravis@adobe.com>
3856
3857         [CSS Font Loading] Rename document.fontloader to document.fonts
3858         https://bugs.webkit.org/show_bug.cgi?id=135393
3859
3860         Reviewed by Bem Jones-Bey.
3861
3862         The most recent version of the specification has renamed
3863         document.fontloader to document.fonts. This change updates the
3864         names in WebCore and LayoutTests.
3865
3866         Fixed up existing tests under LayoutTests/fast/css/fontloader-*
3867         and LayoutTests/http/webfont/fontloader-*
3868
3869         * css/CSSFontFace.cpp:
3870         (WebCore::CSSFontFace::notifyFontLoader):
3871         (WebCore::CSSFontFace::notifyLoadingDone):
3872         * dom/Document.cpp:
3873         (WebCore::Document::fonts):
3874         (WebCore::Document::fontloader): Deleted.
3875         * dom/Document.h:
3876         * dom/Document.idl:
3877         * page/FrameView.cpp:
3878         (WebCore::FrameView::performPostLayoutTasks):
3879
3880 2014-07-31  Andrei Bucur  <abucur@adobe.com>
3881
3882         REGRESSION: Search highlight is broken in RTL multicolumn content
3883         https://bugs.webkit.org/show_bug.cgi?id=135452
3884
3885         Reviewed by Simon Fraser.
3886
3887         The offsets for elements inside RTL multi-column elements are incorrectly computed because
3888         the columns don't calculate their left position according to the writing direction.
3889
3890         The patch extracts the column position computation in two helper functions (for top and left)
3891         so they can be used when needed in different parts of the code. In our case, the |columnLogicalLeft|
3892         function should be used inside |columnTranslationForOffset|.
3893
3894         Test: fast/multicol/content-bounding-box-rtl.html
3895
3896         * rendering/RenderMultiColumnSet.cpp:
3897         (WebCore::RenderMultiColumnSet::columnLogicalLeft): Return the logical left of a column relative to the set.
3898         (WebCore::RenderMultiColumnSet::columnLogicalTop): Return the logical top of a column relative to the set.
3899         (WebCore::RenderMultiColumnSet::columnRectAt): Split the code between columnLogicalLeft and columnLogicalTop.
3900         (WebCore::RenderMultiColumnSet::collectLayerFragments): Make code clearer by adding a new line.
3901         (WebCore::RenderMultiColumnSet::columnTranslationForOffset): Use columnLogicalLeft instead of duplicating logic.
3902         * rendering/RenderMultiColumnSet.h:
3903
3904 2014-07-31  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
3905
3906         Eliminate "FractionConversion" from CSSPrimitiveValue::convertToLength
3907         https://bugs.webkit.org/show_bug.cgi?id=135377
3908
3909         Reviewed by Darin Adler.
3910
3911         The FractionConversion argument in CSSPrimitiveValue::convertToLength
3912         doesn't seem to actually have a purpose. It is for converting numbers
3913         into Length(x * 100, Percent), but this case shouldn't be reachable.
3914         The original patch introducing it doesn't shed any light either:
3915         [https://bugs.webkit.org/show_bug.cgi?id=74913
3916
3917         This patch removes the now unused FractionConversion argument. Note
3918         that we can probably also merge the two Fixed conversions, as the
3919         two only differ in clamping large numbers (probably unintended).
3920
3921         Patch by Timothy Loh, backported from Blink: https://codereview.chromium.org/71253002
3922
3923         No new tests.
3924
3925         * css/CSSCalculationValue.cpp:
3926         (WebCore::determineCategory):
3927         * css/CSSParser.cpp:
3928         (WebCore::parseTransformTranslateArguments):
3929         (WebCore::parseTranslateTransformValue):
3930         (WebCore::parseTransformArguments): Deleted.
3931         * css/CSSPrimitiveValueMappings.h:
3932         (WebCore::CSSPrimitiveValue::convertToLength):
3933         * css/DeprecatedStyleBuilder.cpp:
3934         (WebCore::ApplyPropertyClip::convertToLength):
3935         * css/StyleResolver.cpp:
3936         (WebCore::StyleResolver::convertToIntLength):
3937         (WebCore::StyleResolver::convertToFloatLength):
3938         * css/TransformFunctions.cpp:
3939         (WebCore::convertToFloatLength):
3940
3941 2014-07-31  Joseph Pecoraro  <pecoraro@apple.com>
3942
3943         Web Inspector: console.profile missing profile information
3944         https://bugs.webkit.org/show_bug.cgi?id=135432
3945
3946         Reviewed by Timothy Hatcher.
3947
3948         By switching console.profile to start/stop the timeline we would
3949         not have a chance to recompile JS functions with profiling information.
3950         This used to work because whenever the inspector was open we would
3951         have profiling information enabled. Go back to that behavior.
3952
3953         * inspector/InspectorController.cpp:
3954         (WebCore::InspectorController::profilerEnabled):
3955         Instead of checking if the timeline agent has started, check if the
3956         timeline agent has been created. Going back to the normal behavior
3957         of always having profiling information when the inspector is open.
3958
3959         * inspector/InspectorTimelineAgent.h:
3960         * inspector/InspectorTimelineAgent.cpp:
3961         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
3962         Recompile initializing the timeline agent to include profiling information.
3963
3964         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
3965         Recompile destrying the timeline agent, only if needed.
3966
3967         (WebCore::InspectorTimelineAgent::willCallFunction):
3968         (WebCore::InspectorTimelineAgent::didCallFunction):
3969         (WebCore::InspectorTimelineAgent::willEvaluateScript):
3970         (WebCore::InspectorTimelineAgent::didEvaluateScript):
3971         Using a boolean to track nested calls would not give expected
3972         behavior when un-nesting. Switch to a counter to ensure that