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