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