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