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