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