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