1 2016-01-31 Gyuyoung Kim <gyuyoung.kim@webkit.org>
3 Use std::make_unique<> when creating an unique_ptr object.
4 https://bugs.webkit.org/show_bug.cgi?id=153705
6 Reviewed by Darin Adler.
8 Some factory functions have used std::unique_ptr<> for creating an unique_ptr object.
9 It is wrong. We have to use std::make_unique<>.
11 * Modules/mediasession/WebMediaSessionManager.cpp:
12 (WebCore::WebMediaSessionManager::mockPicker):
13 * inspector/InspectorTimelineAgent.cpp:
14 (WebCore::InspectorTimelineAgent::internalStart):
15 * platform/cf/RunLoopObserver.cpp:
16 (WebCore::RunLoopObserver::create): Deleted.
17 * platform/cf/RunLoopObserver.h:
18 (WebCore::RunLoopObserver::RunLoopObserver):
19 * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
20 (WebCore::WebMediaSessionManagerMac::platformPicker):
21 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
22 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
23 (WebCore::MediaPlaybackTargetPickerMac::create): Deleted.
24 * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
25 (WebCore::LayerFlushScheduler::LayerFlushScheduler):
26 * platform/mock/MediaPlaybackTargetPickerMock.cpp:
27 (WebCore::MediaPlaybackTargetPickerMock::create): Deleted.
28 * platform/mock/MediaPlaybackTargetPickerMock.h:
29 * rendering/FloatingObjects.cpp:
30 (WebCore::FloatingObject::copyToNewContainer):
32 2016-01-30 Michael Catanzaro <mcatanzaro@igalia.com>
34 Unreviewed, fix GTK debug build after r195899
39 2016-01-30 Jeremy Huddleston Sequoia <jeremyhu@apple.com>
41 Add missing include to fix building debug configuration
42 https://bugs.webkit.org/show_bug.cgi?id=153719
44 Reviewed by Darin Adler.
48 * rendering/RenderObject.cpp:
50 2016-01-30 Commit Queue <commit-queue@webkit.org>
52 Unreviewed, rolling out r195911.
53 https://bugs.webkit.org/show_bug.cgi?id=153723
55 Caused frequent assertion failures on bots (Requested by ap on
60 "Replace CaseFoldingHash with ASCIICaseInsensitiveHash"
61 https://bugs.webkit.org/show_bug.cgi?id=153639
62 http://trac.webkit.org/changeset/195911
64 2016-01-30 Commit Queue <commit-queue@webkit.org>
66 Unreviewed, rolling out r195799 and r195828.
67 https://bugs.webkit.org/show_bug.cgi?id=153722
69 Caused assertion failures, severely affecting EWS (Requested
74 "Web Inspector: InspectorTimelineAgent doesn't need to
75 recompile functions because it now uses the sampling profiler"
76 https://bugs.webkit.org/show_bug.cgi?id=153500
77 http://trac.webkit.org/changeset/195799
79 "Attempt to fix the Windows build after r195799"
80 http://trac.webkit.org/changeset/195828
82 2016-01-30 Brady Eidson <beidson@apple.com>
84 Modern IDB: Some tests crash with specific odd database names.
85 https://bugs.webkit.org/show_bug.cgi?id=153688
87 Reviewed by Darin Adler.
89 No new tests (2 existing tests now pass).
91 * platform/FileSystem.cpp:
92 (WebCore::shouldEscapeUChar): Return true for some surrogate-pair situations.
93 (WebCore::encodeForFileName): Pass along the previous and next characters, as well,
94 and do a two byte escaping for some characters.
96 2016-01-30 Eric Carlson <eric.carlson@apple.com>
98 More than one audio and/or text track sometimes selected in media controls menu
99 https://bugs.webkit.org/show_bug.cgi?id=153664
101 Use an <img> element for the track menu item checkmark instead of a background image and
102 the ::before selector.
104 Reviewed by Jer Noble.
106 Test: media/controls/track-menu.html
108 * Modules/mediacontrols/mediaControlsApple.css:
109 (audio::-webkit-media-controls-closed-captions-container li:hover):
110 (audio::-webkit-media-controls-closed-captions-container li .checkmark-container):
111 (audio::-webkit-media-controls-closed-captions-container li.selected .checkmark-container):
112 (audio::-webkit-media-controls-closed-captions-container li.selected:hover .checkmark-container):
113 (audio::-webkit-media-controls-closed-captions-container li.selected::before): Deleted.
114 (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before): Deleted.
115 * Modules/mediacontrols/mediaControlsApple.js:
116 (Controller.prototype.buildCaptionMenu):
117 (Controller.prototype.):
118 (Controller.prototype.getCurrentControlsStatus):
120 2016-01-30 Darin Adler <darin@apple.com>
122 Replace CaseFoldingHash with ASCIICaseInsensitiveHash
123 https://bugs.webkit.org/show_bug.cgi?id=153639
125 Reviewed by Filip Pizlo.
127 * Modules/webdatabase/DatabaseAuthorizer.h: Use ASCIICaseInsensitiveHash
128 for whitelisted functions. Function names are all ASCII.
130 * accessibility/AccessibilityObject.cpp: Use ASCIICaseInsensitiveHash
131 for ARIA roles. ARIA roles are all ASCII.
133 * crypto/CryptoAlgorithmRegistry.h: Use ASCIICaseInsensitiveHash for
134 crypto algorithm names. Algorithm names are all ASCII.
136 * css/CSSFontSelector.cpp:
137 (WebCore::registerLocalFontFacesForFamily): Use ASCIICaseInsensitiveHash
138 for font faces. Face names should use ASCII case insensitive matching;
139 there is no need for non-ASCII case folding.
140 * css/CSSFontSelector.h: Ditto.
142 * dom/DOMImplementation.cpp: Use ASCIICaseInsensitiveHash for the
143 FeatureSet. The features are all ASCII.
145 * dom/Document.h: Use ASCIICaseInsensitiveHash for the access key
146 map. Access keys are all ASCII.
148 * dom/ScriptElement.cpp:
149 (WebCore::isLegacySupportedJavaScriptLanguage): Use ASCIICaseInsensitiveHash
150 for the language set. These strings are all ASCII.
152 * editing/EditorCommand.cpp: Use ASCIICaseInsensitiveHash for editor
153 command names. These names are all ASCII.
155 * html/HTMLObjectElement.cpp:
156 (WebCore::HTMLObjectElement::parametersForPlugin): Use ASCIICaseInsensitiveHash
157 for parameter names. These names are all ASCII.
159 * html/InputType.cpp: Use ASCIICaseInsensitiveHash for the input types.
160 The input types are all ASCII.
162 * loader/CrossOriginAccessControl.h: Use ASCIICaseInsensitiveHash for
163 HTTP header field names. These names are all ASCII.
164 * loader/CrossOriginPreflightResultCache.h: Ditto.
166 * loader/archive/ArchiveFactory.cpp: Use ASCIICaseInsensitiveHash for
167 MIME types. MIME types are all ASCII.
168 * platform/MIMETypeRegistry.cpp:
169 (WebCore::initializeSupportedImageMIMETypes): Ditto.
171 * platform/SchemeRegistry.h: Use ASCIICaseInsensitiveHas for URL schemes.
172 URL schemes are all ASCII.
173 * platform/URL.cpp: Ditto.
175 * platform/graphics/FontCache.cpp: Reworked FontPlatformDataCacheKey struct:
176 Made it a conventional struct with non-prefixed data members names. Removed
177 the "==" operator since it was appropriate for hash table lookup but wasn't
178 a true equality operator. Tightened the implementations of the constructors.
179 (WebCore::FontPlatformDataCacheKeyHash::hash): Use ASCIICaseInsensitiveHash.
180 (WebCore::FontPlatformDataCacheKeyHash::equal): Do the equality check here,
181 not using the == operator. And use equalIgnoringASCIICase.
182 (WebCore::FontPlatformDataCacheKeyTraits::isEmptyValue): Added this entire
183 traits struct so we check empty values in a more efficient way.
184 (WebCore::FontCache::getCachedFontPlatformData): Added comments and tweaked
185 style in this function.
187 * platform/graphics/FontCascade.cpp:
188 (WebCore::keysMatch): Rename from operator== since this operation is not
189 equality. Changed to equalIgnoringASCIICase and did a little streamlining.
190 (WebCore::makeFontCascadeCacheKey): Use reserveInitialCapacity for slightly
192 (WebCore::computeFontCascadeCacheHash): Use IntegerHasher to make computing
193 a hash more efficient by eliminating the overhead of building a vector and
194 even possible heap allocation and deallocation.
195 (WebCore::retrieveOrAddCachedFonts): Use keysMatch instead of ==.
197 * platform/graphics/cocoa/FontCacheCoreText.cpp: Use ASCIICaseInsensitiveHash
198 for font family names. These names should use ASCII case insensitive matching;
199 there is no need for non-ASCII case folding.
201 * platform/network/HTTPHeaderMap.h: Use ASCIICaseInsensitiveHash for
202 HTTP header field names. These names are all ASCII.
204 * rendering/style/RenderStyle.cpp:
205 (WebCore::computeFontHash): Use IntegerHasher to avoid allocating memory just
206 to compute a hash. Use ASCIICaseInsensitiveHash.
208 2016-01-30 Chris Dumez <cdumez@apple.com>
210 Unreviewed, rolling out r195871.
212 Caused several layout tests to time out
216 "Tab suspension code shouldn't use page cache cacheability
218 https://bugs.webkit.org/show_bug.cgi?id=153680
219 http://trac.webkit.org/changeset/195871
221 2016-01-30 Chris Dumez <cdumez@apple.com>
223 Unreviewed, rebaseline bindings tests after r195904.
225 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
226 (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
227 (WebCore::jsTestCustomNamedGetterConstructor):
228 (WebCore::setJSTestCustomNamedGetterConstructor):
229 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
230 (WebCore::JSTestEventTarget::getOwnPropertySlot):
231 (WebCore::jsTestEventTargetConstructor):
232 (WebCore::setJSTestEventTargetConstructor):
233 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
234 (WebCore::JSTestOverrideBuiltins::getOwnPropertySlot):
235 (WebCore::jsTestOverrideBuiltinsConstructor):
236 (WebCore::setJSTestOverrideBuiltinsConstructor):
238 2016-01-30 Chris Dumez <cdumez@apple.com>
240 [JS Bindings] prototype.constructor should be writable
241 https://bugs.webkit.org/show_bug.cgi?id=149412
242 <rdar://problem/22545096>
244 Reviewed by Darin Adler.
246 prototype.constructor should have the following properties:
247 { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
249 as per the Web IDL specification:
250 https://heycam.github.io/webidl/#interface-prototype-object
252 In WebKit, it is currently not writable. It is writable in Firefox.
254 This patch was first landed in r190085 but was rolled out for causing
255 crashes: <rdar://problem/22825602>. The issue was that even though we
256 marked constructor as writable, we failed to generate a setter for it.
257 This patch addresses the issue and the crash in <rdar://problem/22825602>
258 no longer occurs after this change. A regression test is also added for
262 fast/dom/HTMLDocument/constructor-setter-crash.html
263 fast/dom/prototype-constructor-setter.html
265 * bindings/scripts/CodeGeneratorJS.pm:
266 (GenerateAttributesHashTable):
267 (GenerateImplementation):
268 * bindings/scripts/IDLAttributes.txt:
269 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
270 (WebCore::setJSTestActiveDOMObjectConstructor):
271 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
272 (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
273 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
274 (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):
275 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
276 (WebCore::setJSTestCustomNamedGetterConstructor):
277 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
278 (WebCore::setJSTestEventConstructorConstructor):
279 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
280 (WebCore::setJSTestEventTargetConstructor):
281 * bindings/scripts/test/JS/JSTestException.cpp:
282 (WebCore::setJSTestExceptionConstructor):
283 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
284 (WebCore::setJSTestGenerateIsReachableConstructor):
285 * bindings/scripts/test/JS/JSTestInterface.cpp:
286 (WebCore::setJSTestInterfaceConstructor):
287 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
288 (WebCore::setJSTestJSBuiltinConstructorConstructor):
289 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
290 (WebCore::setJSTestMediaQueryListListenerConstructor):
291 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
292 (WebCore::setJSTestNamedConstructorConstructor):
293 * bindings/scripts/test/JS/JSTestNode.cpp:
294 (WebCore::setJSTestNodeConstructor):
295 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
296 (WebCore::setJSTestNondeterministicConstructor):
297 * bindings/scripts/test/JS/JSTestObj.cpp:
298 (WebCore::setJSTestObjConstructor):
299 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
300 (WebCore::setJSTestOverloadedConstructorsConstructor):
301 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
302 (WebCore::setJSTestOverrideBuiltinsConstructor):
303 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
304 (WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
305 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
306 (WebCore::setJSTestTypedefsConstructor):
307 * bindings/scripts/test/JS/JSattribute.cpp:
308 (WebCore::setJSattributeConstructor):
309 * bindings/scripts/test/JS/JSreadonly.cpp:
310 (WebCore::setJSreadonlyConstructor):
311 * page/DOMWindow.idl:
313 2016-01-30 Chris Dumez <cdumez@apple.com>
315 Move more 'constructor' properties to the prototype
316 https://bugs.webkit.org/show_bug.cgi?id=153667
318 Reviewed by Darin Adler.
320 Move more 'constructor' properties to the prototype. In particular, we
321 used to keep the 'constructor' on the instance for interfaces that have
322 an indexed / named property getter because our getOwnPropertySlot()
323 implementation used to be wrong for such interfaces.
325 However, getOwnPropertySlot() should be correct after r188590 so we
326 should now be able to move the 'constructor' up to the prototype for
327 these interfaces, as per the specification:
328 http://heycam.github.io/webidl/#interface-prototype-object
330 No new tests, already covered by existing tests.
332 * bindings/js/JSPluginElementFunctions.h:
333 (WebCore::pluginElementCustomGetOwnPropertySlot):
334 Add a null check for staticPropHashTable. It is now null because this
335 type no longer has any property on the instance now that 'constructor'
338 * bindings/scripts/CodeGeneratorJS.pm:
339 (ConstructorShouldBeOnInstance):
341 2016-01-29 Ada Chan <adachan@apple.com>
343 Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
344 https://bugs.webkit.org/show_bug.cgi?id=153665
346 Reviewed by Dan Bernstein.
348 * Configurations/FeatureDefines.xcconfig:
350 2016-01-30 David Kilzer <ddkilzer@apple.com>
352 [iOS] WebKit1 apps crash in ___ZN7WebCore16DiskCacheMonitorC2ERKNS_15ResourceRequestENS_9SessionIDEPK20_CFCachedURLResponse_block_invoke1
353 <http://webkit.org/b/153710>
354 <rdar://problem/23116706>
356 Reviewed by Darin Adler.
358 * loader/cocoa/DiskCacheMonitorCocoa.mm:
359 (WebCore::DiskCacheMonitor::DiskCacheMonitor):
360 - Fix race condition on iOS WebKit1 clients by calling the block
361 to cancel the DiskCacheMonitor on the WebThread, which is the
362 same thread where the CFCachedURLResponseCallBackBlock is
364 - Removed whitespace to adhere to style.
366 2016-01-30 Ryosuke Niwa <rniwa@webkit.org>
368 TouchList should be retargeted
369 https://bugs.webkit.org/show_bug.cgi?id=149592
371 Reviewed by Antti Koivisto.
373 Retarget touch target's using the same algorithm as the one used for related targets instead of
374 EventRelatedNodeResolver which is removed in this patch.
376 Also enable the retargeting on iOS.
378 Test: fast/shadow-dom/touch-event-ios.html
380 * dom/EventContext.cpp:
381 (WebCore::TouchEventContext::TouchEventContext):
382 (WebCore::TouchEventContext::handleLocalEvents):
383 (WebCore::TouchEventContext::checkReachability):
384 * dom/EventContext.h:
385 (WebCore::toTouchEventContext):
386 (WebCore::EventContext::isUnreachableNode):
387 * dom/EventDispatcher.cpp:
388 (WebCore::EventRelatedNodeResolver): Deleted.
389 (WebCore::EventPath::EventPath):
390 (WebCore::EventDispatcher::dispatchEvent):
391 (WebCore::addRelatedNodeResolversForTouchList): Deleted.
392 (WebCore::EventPath::updateTouchLists): Deleted.
393 (WebCore::EventPath::setRelatedTarget): Removed superfluous UNUSED_PARAM since the argument is always used.
394 (WebCore::EventPath::retargetTouch): Extracted from updateTouchLists/setRelatedTarget. Clones Touch object
395 with the new target for each event context just like related targets.
396 (WebCore::EventPath::retargetTouchLists): Renamed from updateTouchLists. Calls retargetTouch on each Touch
397 object in each TouchList.
400 2016-01-30 Dave Hyatt <hyatt@apple.com>
402 Support break-after, break-before and break-inside.
403 https://bugs.webkit.org/show_bug.cgi?id=148814
405 Reviewed by Dean Jackson.
407 New tests added in printing/, fast/multicol/, and fast/regions.
409 * css/CSSComputedStyleDeclaration.cpp:
410 (WebCore::convertToPageBreak):
411 (WebCore::convertToColumnBreak):
412 (WebCore::convertToRegionBreak):
413 For backwards compatibility, keep support for all the old properties in
414 computed style. This means we have to convert the break-* property values
415 into keywords that make sense for the legacy properties. This mainly
416 involves mapping "page", "column", "region" to "always" (similar rule for
417 the avoid-* versions as well).
419 (WebCore::ComputedStyleExtractor::propertyValue):
420 Add support for the three new break-* properties.
423 (WebCore::isValidKeywordPropertyAndValue):
424 (WebCore::isKeywordPropertyID):
425 (WebCore::CSSParser::parseValue):
426 Add support for the new break properties.
428 * css/CSSPrimitiveValueMappings.h:
429 (WebCore::CSSPrimitiveValue::operator BreakBetween):
430 (WebCore::CSSPrimitiveValue::operator BreakInside):
431 Add converters for the new BreakBetween and BreakInside enums. Remove
432 the EPageBreak enum, since it is no longer used.
434 * css/CSSPropertyNames.in:
435 * css/CSSValueKeywords.in:
436 Add the new properties and the new values supported by the properties
437 to the keywords lists.
439 * css/StyleBuilderConverter.h:
440 (WebCore::StyleBuilderConverter::convertFontSynthesis):
441 (WebCore::StyleBuilderConverter::convertPageBreakBetween):
442 (WebCore::StyleBuilderConverter::convertPageBreakInside):
443 (WebCore::StyleBuilderConverter::convertColumnBreakBetween):
444 (WebCore::StyleBuilderConverter::convertColumnBreakInside):
445 (WebCore::StyleBuilderConverter::convertRegionBreakBetween):
446 (WebCore::StyleBuilderConverter::convertRegionBreakInside):
447 In order to map the legacy properties into the new break-* values
448 we have custom converter functions.
450 * rendering/RenderBlock.cpp:
451 (WebCore::RenderBlock::paintChild):
452 (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
453 (WebCore::RenderBlock::computeRegionRangeForBoxChild):
454 * rendering/RenderBlockFlow.cpp:
455 (WebCore::RenderBlockFlow::applyBeforeBreak):
456 (WebCore::RenderBlockFlow::applyAfterBreak):
457 Patch the block code to check the correct new break-* constants. For
458 avoidance, this means checking both the general avoid value and the
459 specific value (e.g., avoid-page). In place of "always", we check
460 the specific value (e.g., column) and then for page specifically, we
461 also treat "left", "right", "recto" and "verso" as "always break" for now.
463 * rendering/style/RenderStyle.cpp:
464 (WebCore::RenderStyle::changeRequiresLayout):
465 Make sure changes to the break properties trigger relayout.
467 * rendering/style/RenderStyle.h:
468 Add getters and setters for the break-* properties and remove all
469 occurrences of the legacy page, column and region values from the RenderStyle.
471 * rendering/style/RenderStyleConstants.cpp:
472 (WebCore::alwaysPageBreak):
473 We have a helper function here for mapping several constant values to "page".
475 * rendering/style/RenderStyleConstants.h:
476 Definitions of the new BreakBetween and BreakInside enums.
478 * rendering/style/StyleMultiColData.cpp:
479 (WebCore::StyleMultiColData::StyleMultiColData):
480 (WebCore::StyleMultiColData::operator==):
481 * rendering/style/StyleMultiColData.h:
482 Remove the column-specific break data.
484 * rendering/style/StyleRareNonInheritedData.cpp:
485 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
486 (WebCore::StyleRareNonInheritedData::operator==):
487 * rendering/style/StyleRareNonInheritedData.h:
488 Remove the region-specific break data and replace it with generic break
489 data that is now used by all three pagination models.
491 2016-01-29 Per Arne Vollan <peavo@outlook.com>
493 [Win] Fix compile error.
494 https://bugs.webkit.org/show_bug.cgi?id=153646
496 Reviewed by Darin Adler.
498 * platform/text/win/LocaleWin.cpp:
499 (WebCore::LCIDFromLocaleInternal):
501 2016-01-29 Antti Koivisto <antti@apple.com>
503 Tab suspension code shouldn't use page cache cacheability logic
504 https://bugs.webkit.org/show_bug.cgi?id=153680
506 Reviewed by Andreas Kling.
508 Most of PageCache::canCache() is unnecessary for tab suspension.
510 Also improve robustness.
513 (WebCore::Page::setPageActivityState):
514 (WebCore::Page::setIsVisible):
515 (WebCore::Page::setIsVisibleInternal):
516 (WebCore::Page::setIsPrerender):
517 (WebCore::Page::canTabSuspend):
519 Include visibility test here.
521 Instead of calling PageCache::canCache() just check for each frame that
522 - that the document is loaded
523 - that active DOM objects allow suspension
525 (WebCore::Page::setIsTabSuspended):
526 (WebCore::Page::setTabSuspensionEnabled):
527 (WebCore::Page::updateTabSuspensionState):
529 Refactor for robustness.
531 (WebCore::Page::tabSuspensionTimerFired):
533 Call canTabSuspend, the result might have changed.
535 (WebCore::Page::scheduleTabSuspension): Deleted.
538 2016-01-29 Ryosuke Niwa <rniwa@webkit.org>
540 fast/shadow-dom/Element-interface-attachShadow.html fails on iOS
541 https://bugs.webkit.org/show_bug.cgi?id=153681
543 Reviewed by Antti Koivisto.
545 The bug was caused by canHaveUserAgentShadowRoot() returning false on a meter element since it's disabled on iOS.
546 Override HTMLUnknownElement's canHaveUserAgentShadowRoot to return false for compatbility on iOS.
548 * html/HTMLUnknownElement.h:
549 (WebCore::HTMLUnknownElement::canHaveUserAgentShadowRoot):
551 2016-01-29 Brady Eidson <beidson@apple.com>
553 Modern IDB: Getting records for key ranges with null keys aren't properly handled in SQLite backend
554 https://bugs.webkit.org/show_bug.cgi?id=153666
556 Reviewed by Tim Horton.
558 No new tests (Two failing tests now pass).
560 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
561 (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
563 2016-01-29 Simon Fraser <simon.fraser@apple.com>
565 image-rendering: -webkit-optimize-contrast not working for background images
566 https://bugs.webkit.org/show_bug.cgi?id=97991
568 Reviewed by Darin Adler.
570 Don't equate "pixelated" and "crisp-edges" values for image-rendering with low
571 quality scaling; they should map to InterpolationNone, not InterpolationLow.
573 To support this change ImageQualityController to return a InterpolationQuality
574 from the renamed chooseInterpolationQuality(). If the returned value is not
575 InterpolationDefault, set the GraphicsContext image interpolation when drawing
576 images and image buffers.
578 Remove the redundant "useLowQualityScale" from
580 Test: fast/images/image-rendering-interpolation.html
582 * html/HTMLCanvasElement.cpp:
583 (WebCore::HTMLCanvasElement::paint):
584 * html/HTMLCanvasElement.h:
585 * page/DragController.cpp:
586 (WebCore::DragController::doImageDrag):
587 * platform/graphics/GraphicsContext.cpp:
588 (WebCore::GraphicsContext::drawImage):
589 (WebCore::GraphicsContext::drawTiledImage):
590 (WebCore::GraphicsContext::drawImageBuffer):
591 (WebCore::GraphicsContext::drawConsumingImageBuffer):
592 (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer): Deleted.
593 (WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer): Deleted.
594 * platform/graphics/GraphicsContext.h:
595 (WebCore::ImagePaintingOptions::ImagePaintingOptions):
596 (WebCore::ImagePaintingOptions::usesDefaultInterpolation):
597 (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
598 (WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer):
599 * platform/graphics/GraphicsTypes.h:
600 * platform/graphics/ImageBuffer.h:
601 * platform/graphics/cg/ImageBufferCG.cpp:
602 (WebCore::ImageBuffer::drawConsuming):
603 (WebCore::ImageBuffer::draw):
604 * rendering/ImageQualityController.cpp:
605 (WebCore::ImageQualityController::interpolationQualityFromStyle):
606 (WebCore::ImageQualityController::chooseInterpolationQuality):
607 (WebCore::ImageQualityController::ImageQualityController): Deleted.
608 (WebCore::ImageQualityController::shouldPaintAtLowQuality): Deleted.
609 * rendering/ImageQualityController.h:
610 * rendering/RenderBoxModelObject.cpp:
611 (WebCore::RenderBoxModelObject::chooseInterpolationQuality):
612 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
613 (WebCore::RenderBoxModelObject::shouldPaintAtLowQuality): Deleted.
614 * rendering/RenderBoxModelObject.h:
615 * rendering/RenderEmbeddedObject.cpp:
616 (WebCore::RenderEmbeddedObject::paintSnapshotImage):
617 * rendering/RenderHTMLCanvas.cpp:
618 (WebCore::RenderHTMLCanvas::paintReplaced):
619 * rendering/RenderImage.cpp:
620 (WebCore::RenderImage::paintIntoRect):
621 * rendering/RenderSnapshottedPlugIn.cpp:
622 (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
623 * rendering/style/RenderStyle.h:
625 2016-01-29 Brady Eidson <beidson@apple.com>
627 Modern IDB: storage/indexeddb/modern/index-3.html fails.
628 https://bugs.webkit.org/show_bug.cgi?id=153661
630 Reviewed by Tim Horton.
632 No new tests (1 failing test now passes, others get closer).
634 When indexing a new record fails due to uniqueness constraints, remove all traces of the record.
636 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
637 (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
638 (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
639 (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
641 2016-01-29 Brent Fulgham <bfulgham@apple.com>
643 [WebGL] Check vertex array bounds before permitting a glDrawArrays to execute
644 https://bugs.webkit.org/show_bug.cgi?id=153643
645 <rdar://problem/23424456>
647 Reviewed by Dean Jackson.
649 Tested by fast/canvas/webgl/webgl-drawarrays-crash.html.
651 * html/canvas/WebGLRenderingContextBase.cpp:
652 (WebCore::WebGLRenderingContextBase::validateDrawArrays): Make sure that we have at
653 least one buffer bound to a program if a drawArray call with a non-zero range of
654 requested data is being made.
655 (WebCore::WebGLRenderingContextBase::validateDrawElements): Drive-by formatting fix.
657 2016-01-29 Brady Eidson <beidson@apple.com>
659 Modern IDB: Fix logging that overwhelms python with strings of excessive length.
660 https://bugs.webkit.org/show_bug.cgi?id=153652
662 Reviewed by Tim Horton.
664 No new tests (Two skipped tests now pass).
666 * Modules/indexeddb/IDBKeyData.cpp:
667 (WebCore::IDBKeyData::loggingString): Limit the length of the string.
669 * Modules/indexeddb/IDBKeyRangeData.cpp:
670 (WebCore::IDBKeyRangeData::loggingString): Limit the length of the string.
672 2016-01-29 Jer Noble <jer.noble@apple.com>
674 Unreviewed Windows build fix; one more ResourceLoaderOptions call site which needs to
675 be updated after adding the CachingPolicy parameter.
677 * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
678 (WebCore::WebCoreAVCFResourceLoader::startLoading):
680 2016-01-29 Carlos Garcia Campos <cgarcia@igalia.com>
682 [GTK] Implement overlay scrollbars
683 https://bugs.webkit.org/show_bug.cgi?id=153405
685 Reviewed by Michael Catanzaro.
687 Add support for overlay scrollbars to GTK+ platform following the
688 same style and behavior than GtkScrolledWindow. They are only
689 available for GTK+ >= 3.19, but honoring the GTK_OVERLAY_SCROLLING
690 environment variable, so they could be disable at run time, except
691 when threaded compositor is enabled. A new ScrollAnimator class
692 has been added for GTK+ to implement overlay scrollbars and still
693 allow smooth scrolling when available.
695 * PlatformGTK.cmake: Add ScrollAnimatorGtk and stop building ScrollAnimatorSmooth.
696 * platform/ScrollAnimator.h:
697 (WebCore::ScrollAnimator::ScrollAnimator::mouseEnteredContentArea):
698 Remove const to allow the ScrollAnimator to be updated.
699 (WebCore::ScrollAnimator::ScrollAnimator::mouseExitedContentArea): Ditto.
700 (WebCore::ScrollAnimator::ScrollAnimator::mouseMovedInContentArea): Ditto.
701 (WebCore::ScrollAnimator::ScrollAnimator::contentAreaDidShow): Ditto.
702 (WebCore::ScrollAnimator::ScrollAnimator::contentAreaDidHide): Ditto.
703 * platform/Scrollbar.h:
704 (WebCore::Scrollbar::opacity): Get scrollbar opacity.
705 (WebCore::Scrollbar::setOpacity): Set scrollbar opacity.
706 * platform/gtk/ScrollAnimatorGtk.cpp: Added.
707 (WebCore::ScrollAnimator::create): Create a ScrollAnimatorGtk.
708 (WebCore::ScrollAnimatorGtk::ScrollAnimatorGtk):
709 (WebCore::ScrollAnimatorGtk::~ScrollAnimatorGtk):
710 (WebCore::ScrollAnimatorGtk::ensureSmoothScrollingAnimation):
711 Initialize the ScrollAnimationSmooth if it doesn't exist.
712 (WebCore::ScrollAnimatorGtk::scroll): Ensure we have a
713 ScrollAnimationSmooth if smooth scrolling is enabled. This also
714 fixes the problem of having to reload the page after changing the
715 smooth scrolling setting.
716 (WebCore::ScrollAnimatorGtk::scrollToOffsetWithoutAnimation):
717 (WebCore::ScrollAnimatorGtk::willEndLiveResize):
718 (WebCore::ScrollAnimatorGtk::didAddVerticalScrollbar): Register
719 the scrollbar if it's an overlay scrollbar and make it visible
720 without animating it. Start the hide animation.
721 (WebCore::ScrollAnimatorGtk::didAddHorizontalScrollbar): Ditto.
722 (WebCore::ScrollAnimatorGtk::willRemoveVerticalScrollbar):
723 Unregister the scrollbar if it was registered and resrt the
724 animation state if it was the only scrollbar.
725 (WebCore::ScrollAnimatorGtk::willRemoveHorizontalScrollbar): Ditto.
726 (WebCore::ScrollAnimatorGtk::updateOverlayScrollbarsOpacity): Update
727 the scrollbars opacity and invalidate the indicator.
728 (WebCore::easeOutCubic):
729 (WebCore::ScrollAnimatorGtk::overlayScrollbarAnimationTimerFired):
730 Update the scrollbars opacity and schedule a next frame if the
731 animation didn't finish or start the hide animation otherwhise.
732 (WebCore::ScrollAnimatorGtk::showOverlayScrollbars): Start the
733 fade animation to show the scrollbars if needed.
734 (WebCore::ScrollAnimatorGtk::hideOverlayScrollbars): Start the
735 dafe animation to hide the scrollbars if needed.
736 (WebCore::ScrollAnimatorGtk::mouseEnteredContentArea): Call
737 showOverlayScrollbars().
738 (WebCore::ScrollAnimatorGtk::mouseExitedContentArea): Call
739 hideOverlayScrollbars().
740 (WebCore::ScrollAnimatorGtk::mouseMovedInContentArea): Call
741 showOverlayScrollbars().
742 (WebCore::ScrollAnimatorGtk::contentAreaDidShow): Ditto.
743 (WebCore::ScrollAnimatorGtk::contentAreaDidHide): Hide the
744 scrollbars without animations.
745 (WebCore::ScrollAnimatorGtk::notifyContentAreaScrolled): Call
746 showOverlayScrollbars().
747 (WebCore::ScrollAnimatorGtk::lockOverlayScrollbarStateToHidden):
748 Update the lock state and hide or show the scrollbars when locked
750 * platform/gtk/ScrollAnimatorGtk.h: Added.
751 * platform/gtk/ScrollbarThemeGtk.cpp:
752 (WebCore::ScrollbarThemeGtk::backButtonRect): Pass
753 StyleContextMode to getOrCreateStyleContext depending on the
755 (WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
756 (WebCore::ScrollbarThemeGtk::trackRect): Ditto.
757 (WebCore::ScrollbarThemeGtk::getOrCreateStyleContext): Add
758 StyleContextMode parameter to add the hovering class
759 unconditionally when using overlay scrollbars in layout mode. In
760 paint mode we add the hovering clas only when the scrollbar is
761 hovered. This way we always claim the size of the scrollbar when
762 hovered to be able to show the full scrollbar when the mouse is
763 close enough to the indicator.
764 (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Initialize
765 m_usesOverlayScrollbars.
766 (WebCore::ScrollbarThemeGtk::thumbRect): Pass the scrollbar to
767 getOrCreateStyleContext().
768 (WebCore::adjustRectAccordingToMargin): Fix the top margin.
769 (WebCore::ScrollbarThemeGtk::paintTrackBackground): Pass the
770 scrollbar and paint mode to getOrCreateStyleContext().
771 (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
772 (WebCore::ScrollbarThemeGtk::paintThumb): Adjust the thumb
773 rectangle when overlay scrollbar is not hovered to its current
774 size, since we always claim the size of the scrollbar in hovered
776 (WebCore::ScrollbarThemeGtk::paintButton): Pass the scrollbar and
777 paint mode to getOrCreateStyleContext().
778 (WebCore::ScrollbarThemeGtk::paint): Take the scrollbar opacity
779 into account when rendering overlay scrollbars as indicators. Also
780 get the scrollbar opacity from the GTK+ theme and use a
781 transparency group when the global opacity is not full opaque.
782 (WebCore::ScrollbarThemeGtk::buttonSize): Pass the scrollbar to
783 getOrCreateStyleContext().
784 * platform/gtk/ScrollbarThemeGtk.h:
785 * platform/mac/ScrollAnimatorMac.h:
786 * platform/mac/ScrollAnimatorMac.mm:
787 (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
788 (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
789 (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
790 (WebCore::ScrollAnimatorMac::contentAreaDidShow):
791 (WebCore::ScrollAnimatorMac::contentAreaDidHide):
793 2016-01-29 ChangSeok Oh <changseok.oh@collabora.com>
795 [GStreamer] built-in media player doesn't update
796 https://bugs.webkit.org/show_bug.cgi?id=151816
798 Reviewed by Xabier Rodriguez-Calvar.
800 The timeline of audio controls in media document is not properly updated since it is assumed
801 that the controls are hidden as soon as playing. However, such full page audio always has
802 opacity : 1 declared by video:-webkit-full-page-media::-webkit-media-controls-panel.no-video.
803 i.e. it is not actually hidden. We can fix this by simply returning false for no-video media
804 in controlsAreHidden();
806 Test: media/audio-controls-timeline-in-media-document.html
808 * Modules/mediacontrols/mediaControlsBase.js:
809 (Controller.prototype.controlsAreAlwaysVisible):
810 (Controller.prototype.controlsAreHidden):
812 2016-01-29 Manuel Rego Casasnovas <rego@igalia.com>
814 [css-grid] Store lines instead of tracks in GridResolvedPosition
815 https://bugs.webkit.org/show_bug.cgi?id=153592
817 Reviewed by Sergio Villar Senin.
819 Due to the new feature that allows to create implicit tracks before the
820 explicit ones, we will need to use lines instead of tracks in the
821 code to be able to implement it properly.
823 This is just a first simple patch using lines instead of tracks in
824 GridResolvedPosition. It modifies the code that was using it, as it was
825 considering that the resolvedFinalPosition was a track index and
828 So if we've an item positioned like:
830 grid-row: 1 / span 2;
832 Before we were storing this information on the GridSpan:
834 * resolvedInitialPosition: 1
835 * resolvedFinalPosition: 3
837 * resolvedInitialPosition: 0
838 * resolvedFinalPosition: 1
840 And now we're storing:
842 * resolvedInitialPosition: 1
843 * resolvedFinalPosition: 4
845 * resolvedInitialPosition: 0
846 * resolvedFinalPosition: 2
848 No new tests, no change of behavior.
850 * css/CSSGridTemplateAreasValue.cpp:
851 (WebCore::stringForPosition):
853 (WebCore::CSSParser::parseGridTemplateAreasRow):
854 * css/StyleBuilderConverter.h:
855 (WebCore::StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea):
856 * rendering/RenderGrid.cpp:
857 (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
858 (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
859 (WebCore::RenderGrid::ensureGridSize):
860 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
861 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
862 (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
863 (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
864 (WebCore::RenderGrid::columnAxisOffsetForChild):
865 (WebCore::RenderGrid::rowAxisOffsetForChild):
866 * rendering/RenderGrid.h:
867 * rendering/style/GridCoordinate.h:
868 (WebCore::GridSpan::GridSpan):
869 (WebCore::GridSpan::integerSpan):
870 (WebCore::GridSpan::end):
871 (WebCore::GridCoordinate::GridCoordinate):
872 * rendering/style/GridResolvedPosition.cpp:
873 (WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
874 (WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
875 (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
876 (WebCore::resolveGridPositionAgainstOppositePosition):
877 (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
878 (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
879 (WebCore::resolveNamedGridLinePositionFromStyle): Deleted.
880 * rendering/style/GridResolvedPosition.h:
882 2016-01-28 Brady Eidson <beidson@apple.com>
884 Modern IDB: SQLite backend mismanages key generator values.
885 https://bugs.webkit.org/show_bug.cgi?id=153625
887 Reviewed by Andy Estes.
889 No new tests (Many failing tests pass, a few get closer).
891 There's mixed assumptions about whether the value stored is the current value or the next value.
893 Fixing those assumptions fixes tests.
895 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
896 (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber): Store/retrieve the correct value.
897 (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber): Ditto.
898 (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber): Ditto.
900 2016-01-28 Joseph Pecoraro <pecoraro@apple.com>
902 Web Inspector: InspectorTimelineAgent doesn't need to recompile functions because it now uses the sampling profiler
903 https://bugs.webkit.org/show_bug.cgi?id=153500
904 <rdar://problem/24352458>
906 Reviewed by Timothy Hatcher.
908 * bindings/js/JSDOMWindowBase.cpp:
909 (WebCore::JSDOMWindowBase::supportsLegacyProfiling):
910 (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
911 (WebCore::JSDOMWindowBase::supportsProfiling): Deleted.
912 * bindings/js/JSDOMWindowBase.h:
913 * bindings/js/JSWorkerGlobalScopeBase.cpp:
914 (WebCore::JSWorkerGlobalScopeBase::supportsLegacyProfiling):
915 (WebCore::JSWorkerGlobalScopeBase::supportsProfiling): Deleted.
916 * bindings/js/JSWorkerGlobalScopeBase.h:
917 * inspector/InspectorController.h:
918 * inspector/InspectorController.cpp:
919 (WebCore::InspectorController::legacyProfilerEnabled):
920 (WebCore::InspectorController::setLegacyProfilerEnabled):
921 Be more explicit about enabling legacy profiling.
923 * inspector/InspectorTimelineAgent.cpp:
924 (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
925 (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): Deleted.
926 TimelineAgent doesn't need to recompile if using the sampling profiler.
927 This breaks console.profile, but console.profile should move to using
928 the sampling profiler as well.
930 (WebCore::InspectorTimelineAgent::startFromConsole):
931 (WebCore::InspectorTimelineAgent::stopFromConsole):
932 (WebCore::startProfiling): Deleted.
933 (WebCore::stopProfiling): Deleted.
934 Inlined the use once static functions.
936 * page/PageConsoleClient.cpp:
937 (WebCore::PageConsoleClient::profile):
938 (WebCore::PageConsoleClient::profileEnd):
939 Added FIXMEs for improving console.profile and profileEnd.
941 * testing/Internals.cpp:
942 (WebCore::Internals::resetToConsistentState):
943 (WebCore::Internals::setLegacyJavaScriptProfilingEnabled):
944 (WebCore::Internals::setJavaScriptProfilingEnabled): Deleted.
945 * testing/Internals.h:
946 * testing/Internals.idl:
947 Be more explicit about enabling legacy profiling.
949 2016-01-28 Chris Dumez <cdumez@apple.com>
951 Move attributes to the prototype for List types / and types with indexed/named property getters
952 https://bugs.webkit.org/show_bug.cgi?id=153599
954 Reviewed by Darin Adler.
956 Move attributes to the prototype for List types / and types with indexed/named property getters.
958 We used to keep them on the instance because:
959 1. Our GetOwnProperty lookup used to be in incorrect order for interfaces with indexed/named property getters.
960 -> This was fixed recently and we now match the specification and other browsers.
961 2. This used to regress performance when iterating over those list types
962 -> Local testing seems to show that this is no longer a regression (tested Speedometer and various related Bindings PerformanceTests).
964 No new tests, already covered by existing tests.
966 * bindings/scripts/CodeGeneratorJS.pm:
967 (InterfaceRequiresAttributesOnInstance): Deleted.
968 (AttributeShouldBeOnInstanceForCompatibility): Deleted.
970 2016-01-28 Antti Koivisto <antti@apple.com>
972 Tab suspension code hits asserts
975 Reviewed by Chris Dumez.
977 Enabling tab suspension and navigating around in a few tabs hits an assert in
978 ScriptExecutionContext::suspendActiveDOMObject. This is because suspend/resume reasons don't pair properly
981 (WebCore::Document::documentWillBecomeInactive):
982 (WebCore::Document::suspend):
983 (WebCore::Document::resume):
985 Provide the reason as argument.
988 * history/CachedFrame.cpp:
989 (WebCore::CachedFrameBase::restore):
991 No need to call resumeActiveDOMObjects/resumeScriptedAnimationControllerCallbacks explicitly as Document::resume does that.
993 (WebCore::CachedFrame::CachedFrame):
994 * loader/FrameLoader.cpp:
995 (WebCore::FrameLoader::commitProvisionalLoad):
997 (WebCore::Page::canTabSuspend):
998 (WebCore::Page::setIsTabSuspended):
1000 2016-01-28 Brady Eidson <beidson@apple.com>
1002 Modern IDB: Fix several more problems with object store changes during cursor iteration in SQLite backend.
1003 https://bugs.webkit.org/show_bug.cgi?id=153616
1005 Reviewed by Alex Christensen.
1007 No new tests (A few failing tests pass, a few get closer).
1009 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1010 (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
1012 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1013 (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
1014 (WebCore::IDBServer::SQLiteIDBCursor::bindArguments):
1016 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1017 (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
1019 2016-01-28 Daniel Bates <dabates@apple.com>
1021 Cleanup: Make DedicatedWorkerThread::create() an inline template method
1022 https://bugs.webkit.org/show_bug.cgi?id=153612
1024 Reviewed by Andy Estes.
1026 Make use of variadic template arguments and std::forward() to forward the arguments passed
1027 from DedicatedWorkerThread::create() to DedicatedWorkerThread::DedicatedWorkerThread(). This
1028 removes the need to duplicate code whenever we modify the parameter types or number of
1029 parameters taken by DedicatedWorkerThread::DedicatedWorkerThread().
1031 * workers/DedicatedWorkerThread.cpp:
1032 (WebCore::DedicatedWorkerThread::create): Deleted.
1033 * workers/DedicatedWorkerThread.h: Reorganized listing of member functions such that we
1034 group the creation/constructor and destructor functions.
1035 (WebCore::DedicatedWorkerThread::create): Modified to be an inline template with variadic
1036 parameters that std::forward()s its arguments to DedicatedWorkerThread::DedicatedWorkerThread().
1038 2016-01-28 Brady Eidson <beidson@apple.com>
1040 Modern IDB: SQLite backend doesn't handle mutation during cursor iteration.
1041 https://bugs.webkit.org/show_bug.cgi?id=153614
1043 Reviewed by Alex Christensen.
1045 No new tests (A few failing tests pass, a few get closer).
1047 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1048 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange): Call notifyCursorsOfChanges.
1049 (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Ditto.
1051 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1052 (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
1053 (WebCore::IDBServer::SQLiteIDBCursor::~SQLiteIDBCursor):
1054 * Modules/indexeddb/server/SQLiteIDBCursor.h:
1056 * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
1057 (WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor): Remember these transient backing
1058 store cursors so they can be notified of changes.
1059 (WebCore::IDBServer::SQLiteIDBTransaction::closeCursor): Handle removing the cursor from the right set.
1060 (WebCore::IDBServer::SQLiteIDBTransaction::notifyCursorsOfChanges):
1061 * Modules/indexeddb/server/SQLiteIDBTransaction.h:
1063 2016-01-28 Brady Eidson <beidson@apple.com>
1065 Modern IDB: SQLite backend doesn't support deleting ranges with more than one key.
1066 https://bugs.webkit.org/show_bug.cgi?id=153604
1068 Reviewed by Andy Estes.
1070 No new tests (A few failing tests pass, a few get closer).
1072 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1073 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
1075 2016-01-28 Alex Christensen <achristensen@webkit.org>
1077 Fix Windows build after r195774.
1079 * platform/network/ParsedContentRange.cpp:
1081 2016-01-28 Anders Carlsson <andersca@apple.com>
1083 Add an ArrayValue::get overload that returns a string
1084 https://bugs.webkit.org/show_bug.cgi?id=153613
1086 Reviewed by Tim Horton.
1088 * bindings/js/ArrayValue.cpp:
1089 (WebCore::ArrayValue::get):
1090 * bindings/js/ArrayValue.h:
1092 2016-01-28 Chris Dumez <cdumez@apple.com>
1094 EventHandler IDL attributes should be enumerable
1095 https://bugs.webkit.org/show_bug.cgi?id=153595
1097 Reviewed by Sam Weinig.
1099 Most of our EventHandler IDL attributes were marked as [NotEnumerable]
1100 but should not have been according to the specification:
1101 - https://html.spec.whatwg.org/#globaleventhandlers
1102 - https://html.spec.whatwg.org/#windoweventhandlers
1104 Firefox and Chrome behave according to the specification.
1105 This patch aligns our behavior.
1107 No new tests, already covered by existing tests.
1110 * dom/GlobalEventHandlers.idl:
1111 * page/WindowEventHandlers.idl:
1113 2016-01-28 Jer Noble <jer.noble@apple.com>
1115 Windows build fix; PRId64 formatting macro for int64_t undefined, so provide Windows-specific alternative.
1117 * platform/network/ParsedContentRange.cpp:
1119 2016-01-28 ChangSeok Oh <changseok.oh@collabora.com>
1121 [ThreadedCompositor] Fix flickers happening on video when entering/leaving fullscreen.
1122 https://bugs.webkit.org/show_bug.cgi?id=153585
1124 Reviewed by Michael Catanzaro.
1126 Video thumbnail flickers where threaded compositor is enabled. This is because
1127 a content buffer is not set to a target layer which changes before swapBuffer.
1128 This is a very rare case though, it happens where video size changes many times in a short period.
1130 * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
1131 (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):
1133 2016-01-27 Jer Noble <jer.noble@apple.com>
1135 Allow CachedResourceLoader clients to opt out of the MemoryCache.
1136 https://bugs.webkit.org/show_bug.cgi?id=153549
1138 Reviewed by Darin Adler.
1140 Add a flag to ResourceLoaderOptions which allow loader clients to opt out of having
1141 resources stored in the MemoryCache.
1143 * loader/ResourceLoaderOptions.h:
1144 (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
1145 (WebCore::ResourceLoaderOptions::cachingPolicy):
1147 Existing clients will have to add the (default) AllowCaching flag when they create a
1148 ResourceLoaderOptions object.
1150 * loader/DocumentLoader.cpp:
1151 (WebCore::DocumentLoader::startLoadingMainResource):
1152 * loader/MediaResourceLoader.cpp:
1153 (WebCore::MediaResourceLoader::start):
1154 * loader/NetscapePlugInStreamLoader.cpp:
1155 (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
1156 (WebCore::ResourceLoaderOptions::setCachingPolicy):
1157 * loader/icon/IconLoader.cpp:
1158 (WebCore::IconLoader::startLoading):
1159 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1160 (WebCore::WebCoreAVFResourceLoader::startLoading):
1162 Every time the CachedResource or CachedResourceLoader accesses the MemoryCache, check
1163 to see whether the resource or the request have allowed caching before adding resources
1164 to, removing resources from, or sourcing resource data from the MemoryCache.
1166 * loader/cache/CachedResource.cpp:
1167 (WebCore::CachedResource::~CachedResource):
1168 (WebCore::CachedResource::failBeforeStarting):
1169 (WebCore::CachedResource::addClientToSet):
1170 (WebCore::CachedResource::removeClient):
1171 (WebCore::CachedResource::setDecodedSize):
1172 (WebCore::CachedResource::setEncodedSize):
1173 (WebCore::CachedResource::didAccessDecodedData):
1174 * loader/cache/CachedResource.h:
1175 (WebCore::CachedResource::allowsCaching):
1176 * loader/cache/CachedResourceLoader.cpp:
1177 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1178 (WebCore::CachedResourceLoader::requestResource):
1179 (WebCore::CachedResourceLoader::revalidateResource):
1180 (WebCore::CachedResourceLoader::loadResource):
1181 (WebCore::CachedResourceLoader::printPreloadStats):
1182 (WebCore::CachedResourceLoader::defaultCachedResourceOptions):
1183 * loader/cache/CachedResourceRequest.h:
1184 (WebCore::CachedResourceRequest::allowsCaching):
1186 2016-01-28 Enrica Casucci <enrica@apple.com>
1188 Should avoid navigation for some data detector urls.
1189 https://bugs.webkit.org/show_bug.cgi?id=153600
1191 Reviewed by Tim Horton.
1193 Adding helper function to decide whether the default action should be performed.
1195 * editing/cocoa/DataDetection.h:
1196 * editing/cocoa/DataDetection.mm:
1197 (WebCore::DataDetection::shouldCancelDefaultAction):
1199 2016-01-28 Dave Hyatt <hyatt@apple.com>
1201 Roll out r194555, as it introduced some bad regressions and was not
1204 * rendering/RenderText.cpp:
1205 (WebCore::RenderText::computePreferredLogicalWidths):
1207 2016-01-28 Brady Eidson <beidson@apple.com>
1209 Modern IDB: Index uniqueness broken in the SQLite backend.
1210 https://bugs.webkit.org/show_bug.cgi?id=153596
1212 Reviewed by Alex Christensen.
1214 No new tests (Many failing tests now pass, others improve).
1216 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1217 (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
1218 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
1219 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
1220 (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
1221 (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
1222 (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
1223 (WebCore::IDBServer::SQLiteIDBBackingStore::updateIndexesForAddRecord): Deleted.
1224 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1226 2016-01-08 Jer Noble <jer.noble@apple.com>
1228 Custom protocol loading through AVFoundation does not support byte-range requests.
1229 https://bugs.webkit.org/show_bug.cgi?id=152919
1230 <rdar://problem/23664657>
1232 Reviewed by Alex Christensen.
1234 Tests: http/tests/xmlhttprequest/blob-request-byte-range.html
1235 TestWebkitAPI/Tests/WebCore/ParsedContentRange.cpp
1237 When loading data through the AVAssetResourceLoaderDelegateProtocol, AVFoundation will issue
1238 requests for specific byte-ranges by adding a "Range:" HTTP header to the NSURLRequest it
1239 passes to the delegate. WebCore ignores this header, loads the entire resource, and replies
1240 to the callback with the requested subset of the entire resource.
1242 For byte-range requests near the end of a resource, this is inefficient, as the entire
1243 resource up to, and including, the requested range must be loaded before any data can be
1244 returned. Explicitly handle byte-range requests by creating a CachedResourceRequest with the
1245 underlying NSURLRequest (which includes the "Range:" header) rather than just the request's
1246 URL. BlobResourceHandle must be modified to add the "Content-Range:" response header to the
1249 To facilitate both generating and parsing the "Content-Range:" header, add a new
1250 ParsedContentRange class for use by ResourceResponse and its clients. This class provides
1251 methods both for parsing a "Content-Range" header value string, and for generating the
1252 header value from elemental values.
1254 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1255 (WebCore::WebCoreAVFResourceLoader::startLoading):
1256 (WebCore::WebCoreAVFResourceLoader::responseReceived):
1257 (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
1258 * platform/network/BlobResourceHandle.cpp:
1259 (WebCore::BlobResourceHandle::BlobResourceHandle):
1260 (WebCore::BlobResourceHandle::didGetSize):
1261 (WebCore::BlobResourceHandle::seek):
1262 (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
1263 * platform/network/BlobResourceHandle.h:
1264 * platform/network/HTTPHeaderNames.in:
1265 * platform/network/ParsedContentRange.cpp: Added.
1266 (WebCore::areContentRangeValuesValid):
1267 (WebCore::parseContentRange):
1268 (WebCore::ParsedContentRange::ParsedContentRange):
1269 (WebCore::ParsedContentRange::headerValue):
1270 * platform/network/ParsedContentRange.h: Added.
1271 (WebCore::ParsedContentRange::ParsedContentRange):
1272 (WebCore::ParsedContentRange::isValid):
1273 (WebCore::ParsedContentRange::firstBytePosition):
1274 (WebCore::ParsedContentRange::lastBytePosition):
1275 (WebCore::ParsedContentRange::instanceLength):
1276 * platform/network/ResourceResponseBase.cpp:
1277 (WebCore::ResourceResponseBase::updateHeaderParsedState):
1278 (WebCore::parseContentRangeInHeader):
1279 (WebCore::ResourceResponseBase::contentRange):
1280 * platform/network/ResourceResponseBase.h:
1282 * WebCore.vcxproj/WebCore.vcxproj:
1283 * WebCore.vcxproj/WebCore.vcxproj.filters:
1284 * WebCore.xcodeproj/project.pbxproj:
1286 2016-01-28 Chris Dumez <cdumez@apple.com>
1288 Storage interface's attributes / operations should be enumerable
1289 https://bugs.webkit.org/show_bug.cgi?id=153573
1291 Reviewed by Darin Adler.
1293 Storage interface's attributes / operations should be enumerable:
1294 - https://html.spec.whatwg.org/#the-storage-interface
1296 Firefox matches the specification.
1298 No new tests, already covered by existing test.
1300 * storage/Storage.idl:
1302 2016-01-26 Ada Chan <adachan@apple.com>
1304 Get WebVideoFullscreenManager and related classes to also compile for Mac platform
1305 with video presentation mode support.
1306 https://bugs.webkit.org/show_bug.cgi?id=153221
1308 Reviewed by Eric Carlson.
1310 No new tests, no actual behavior change with a stub implementation of WebVideoFullscreenInterfaceMac.
1312 * WebCore.xcodeproj/project.pbxproj:
1313 Add PlatformView.h, WebVideoFullscreenChangeObserver.h, and WebVideoFullscreenInterfaceMac.h.
1315 * html/HTMLMediaElement.cpp:
1316 (WebCore::HTMLMediaElement::HTMLMediaElement):
1317 (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated):
1318 (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction):
1319 * html/HTMLMediaElement.h:
1320 Enable the code that deals with the video fullscreen layer also for Mac platform with
1321 video presentation mode support.
1323 * platform/cocoa/PlatformView.h:
1324 Header file for declaring the view types for each Cocoa platform.
1326 * platform/cocoa/WebVideoFullscreenChangeObserver.h:
1327 (WebCore::WebVideoFullscreenChangeObserver::~WebVideoFullscreenChangeObserver):
1328 Interface declaration moved from WebVideoFullscreenInterfaceAVKit.h.
1330 * platform/cocoa/WebVideoFullscreenInterface.h:
1331 Stop guarding the declaration of WebVideoFullscreenInterface to be iOS specific. It is now
1332 enabled for iOS and Mac platform with video presentation mode support.
1334 * platform/cocoa/WebVideoFullscreenModel.h:
1335 * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
1336 * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
1337 Enable also for Mac platform with video presentation mode support.
1338 (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
1339 Set the video fullscreen layer's anchor point to (0, 0) since we are not changing the position of
1340 the video layer on Mac.
1342 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1343 Import WebVideoFullscreenChangeObserver.h now that the interface declaration has been moved to that file.
1344 * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1345 Move the declaration of WebVideoFullscreenChangeObserver to a separate header.
1346 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1347 Import WebVideoFullscreenChangeObserver.h now that the interface declaration has been moved to that file.
1349 * platform/mac/WebVideoFullscreenInterfaceMac.h: Added.
1350 * platform/mac/WebVideoFullscreenInterfaceMac.mm:
1351 (WebCore::WebVideoFullscreenInterfaceMac::~WebVideoFullscreenInterfaceMac):
1352 (WebCore::WebVideoFullscreenInterfaceMac::setWebVideoFullscreenModel):
1353 (WebCore::WebVideoFullscreenInterfaceMac::setWebVideoFullscreenChangeObserver):
1354 (WebCore::WebVideoFullscreenInterfaceMac::resetMediaState):
1355 (WebCore::WebVideoFullscreenInterfaceMac::setDuration):
1356 (WebCore::WebVideoFullscreenInterfaceMac::setCurrentTime):
1357 (WebCore::WebVideoFullscreenInterfaceMac::setBufferedTime):
1358 (WebCore::WebVideoFullscreenInterfaceMac::setRate):
1359 (WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
1360 (WebCore::WebVideoFullscreenInterfaceMac::setSeekableRanges):
1361 (WebCore::WebVideoFullscreenInterfaceMac::setCanPlayFastReverse):
1362 (WebCore::WebVideoFullscreenInterfaceMac::setAudioMediaSelectionOptions):
1363 (WebCore::WebVideoFullscreenInterfaceMac::setLegibleMediaSelectionOptions):
1364 (WebCore::WebVideoFullscreenInterfaceMac::setExternalPlayback):
1365 (WebCore::WebVideoFullscreenInterfaceMac::setWirelessVideoPlaybackDisabled):
1366 (WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
1367 (WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
1368 (WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
1369 (WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
1370 (WebCore::WebVideoFullscreenInterfaceMac::invalidate):
1371 (WebCore::WebVideoFullscreenInterfaceMac::requestHideAndExitFullscreen):
1372 (WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
1373 (WebCore::WebVideoFullscreenInterfaceMac::setMode):
1374 (WebCore::WebVideoFullscreenInterfaceMac::clearMode):
1375 (WebCore::WebVideoFullscreenInterfaceMac::mayAutomaticallyShowVideoPictureInPicture):
1376 (WebCore::WebVideoFullscreenInterfaceMac::applicationDidBecomeActive):
1377 (WebCore::supportsPictureInPicture):
1378 Add a stub implementation of WebVideoFullscreenInterfaceMac.
1380 2016-01-28 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
1382 [SVG] Add support for 'lighter' operator in feComposite
1383 https://bugs.webkit.org/show_bug.cgi?id=141376
1385 Reviewed by Darin Adler.
1387 Added new cases where needed to support the lighter (aka 'plus')
1388 Porter Duff operator in SVG Filter Effects.
1389 https://www.w3.org/TR/filter-effects/#valdef-operator-lighter
1390 Note that in the specification, no constant was added to the IDL for
1391 the lighter operator.
1393 Test: svg/filters/feCompositeOpaque.html
1394 svg/dom/script-tests/SVGAnimatedEnumeration-SVGFECompositeElement.js
1396 * platform/graphics/filters/FEComposite.cpp:
1397 (WebCore::FEComposite::platformApplySoftware):
1398 Add case to support lighter.
1399 (WebCore::operator<<):
1400 Add case to support lighter for text stream operations.
1401 * platform/graphics/filters/FEComposite.h:
1402 Add case for lighter to CompositeOperationType enum.
1403 * svg/SVGFECompositeElement.h:
1404 (WebCore::SVGIDLEnumLimits<CompositeOperationType>::highestExposedEnumValue):
1405 Higest exposed value is arithmetic - do not expose lighter.
1406 (WebCore::SVGPropertyTraits<CompositeOperationType>::highestEnumValue):
1407 Highest possible value is now lighter.
1408 (WebCore::SVGPropertyTraits<CompositeOperationType>::toString):
1409 Add case to support lighter.
1410 (WebCore::SVGPropertyTraits<CompositeOperationType>::fromString):
1411 Add case to support lighter.
1413 2016-01-28 Darin Adler <darin@apple.com>
1415 Remove equalIgnoringCase since all callers really wanted equalIgnoringASCIICase
1416 https://bugs.webkit.org/show_bug.cgi?id=153411
1418 Reviewed by Ryosuke Niwa.
1420 Tests: fast/media/media-query-non-ASCII-case-folding.html
1421 fast/dom/HTMLAnchorElement/anchor-non-ASCII-case-folding.html
1422 fast/xpath/xpath-non-ASCII-case-folding.html
1424 No tests included that cover the minor behavior changes in Document::setDomain,
1425 CSPSource::schemeMatches, CSPSource::hostMatches, OriginAccessEntry::operator==,
1426 UserContentURLPattern::matches, UserContentURLPattern::matchesHost,
1427 ContentFilterUnblockHandler::canHandleRequest. Would like to add tests for those
1428 if possible, but it seems clear all are progressions.
1430 For background on why this is the right thing to do in almost every case:
1432 - MIME types are all ASCII and not case sensitive (details in RFC 2045)
1433 <http://tools.ietf.org/html/rfc2045>
1434 - case insensitive comparisons in HTML are all "ASCII case-insensitive"
1435 https://www.w3.org/TR/html/infrastructure.html#ascii-case-insensitive
1438 * Modules/webdatabase/DatabaseAuthorizer.cpp:
1439 (WebCore::DatabaseAuthorizer::denyBasedOnTableName): Use equalIgnoringASCIICase.
1440 No change in behavior since the string we are comparing with is always
1441 "__WebKitDatabaseInfoTable__" in practice.
1443 * accessibility/AccessibilityNodeObject.cpp:
1444 (WebCore::siblingWithAriaRole): Changed argument type to take a const char*,
1445 added some FIXMEs and use equalIgnoringCase. No change in behavior since the
1446 strings we are comparing with are "menu" and "menuitem".
1447 (WebCore::AccessibilityNodeObject::menuElementForMenuButton): Updated to pass
1448 arguments in reverse order.
1449 (WebCore::AccessibilityNodeObject::menuItemElementForMenu): Ditto.
1451 * css/CSSParser.cpp:
1452 (WebCore::CSSParser::parseFontFaceValue): Use equalIgnoringASCIICase.
1453 No change in behavior because the property names are all ASCII constants.
1455 * css/CSSParserValues.h: Removed unused equalIgnoringCase function.
1457 * css/MediaQueryEvaluator.cpp:
1458 (WebCore::MediaQueryEvaluator::mediaTypeMatch): Use equalIgnoringASCIICase.
1459 Changes behavior: No non-ASCII case folding when matching media types.
1460 Covered by new test.
1461 (WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific): Use equalIgnoringASCIICase.
1462 No change in behavior since the only string this is ever called with is "print".
1464 * dom/DataTransfer.cpp:
1465 (WebCore::DataTransfer::hasFileOfType): Use equalIgnoringASCIICase.
1466 No change in behavior because local files will not have content types with
1467 non-ASCII characters in them. In the extremely unlikely case that this is incorrect,
1468 the change in behavior is a progression.
1471 (WebCore::Document::setDomain): Use equalIgnoringASCIICase.
1472 Changes behavior: Domains considered equal because of non-ASCII case folding
1473 would get through without an error before, and now will properly throw an exception.
1476 (WebCore::isStyleAttribute): Refactored into a helper function. Use
1477 equalLettersIgnoringASCIICase. No change in behavior.
1478 (WebCore::Element::synchronizeAttribute): Use isStyleAttribute.
1480 * dom/TreeScope.cpp:
1481 (WebCore::TreeScope::findAnchor): Use equalIgnoringASCIICase.
1482 Changes behavior: Could go to an anchor and it would be considered a match because
1483 of non-ASCII case folding. Covered by new test.
1485 * html/HiddenInputType.cpp:
1486 (WebCore::HiddenInputType::appendFormData): Use equalIgnoringASCIICase.
1487 No change in behavior: comparing with an ASCII literal.
1488 * html/canvas/WebGL2RenderingContext.cpp:
1489 (WebCore::WebGL2RenderingContext::getExtension): Ditto.
1490 * html/canvas/WebGLRenderingContext.cpp:
1491 (WebCore::WebGLRenderingContext::getExtension): Ditto.
1493 * html/parser/CSSPreloadScanner.cpp:
1494 (WebCore::CSSPreloadScanner::emitRule): Use equalLettersIgnoringASCIICase and
1495 StringView to avoid needing a special ruleEqualIgnoringCase function.
1496 No change in behavior.
1498 * inspector/InspectorNodeFinder.cpp:
1499 (WebCore::InspectorNodeFinder::matchesElement): Use equalIgnoringASCIICase.
1500 Changes behavior, but it's an inspector UI thing, not a web behavior thing,
1501 so I don't think a new regression test is needed.
1503 * loader/HistoryController.cpp:
1504 (WebCore::HistoryController::currentItemShouldBeReplaced): Use
1505 equalIgnoringASCIICase. No change in behavior because we are comparing
1508 * loader/SubframeLoader.cpp:
1509 (WebCore::findPluginMIMETypeFromURL): Use equalIgnoringASCIICase.
1510 No change in behavior unless a plug-in claims an extension with non-ASCII
1511 characters. I don't think a new regression test is needed.
1513 * loader/appcache/ApplicationCacheHost.cpp:
1514 (WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache):
1515 Use equalIgnoringASCIICase. No change in behavior because both strings are
1516 protocols from URLs and we don't parse non-ASCII characters into protocol strings;
1517 non-ASCII are already encoding as punycode.
1518 * loader/appcache/ManifestParser.cpp:
1519 (WebCore::parseManifest): Ditto.
1521 * page/ContentSecurityPolicy.cpp:
1522 (WebCore::isExperimentalDirectiveName): Added. Used by isDirectiveName.
1523 Uses equalLettersIgnoringASCIICase. No change in behavior.
1524 (WebCore::isDirectiveName): Use equalLettersIgnoringASCIICase.
1525 No change in behavior.
1526 (WebCore::isSourceListNone): Use equalLettersIgnoringASCIICase. No
1528 (WebCore::CSPSource::schemeMatches): Use equalLettersIgnoringASCIICase
1529 and equalIgnoringASCIICase. It's all about comparing URL protocols. The
1530 old code might have done something strange if someone specified a protocol
1531 with a non-ASCII character in it.
1532 (WebCore::CSPSource::hostMatches): Use equalIgnoringASCIICase.
1533 (WebCore::CSPSourceList::parseSource): Use equalLettersIgnoringASCIICase.
1534 No change in behavior.
1535 (WebCore::CSPDirectiveList::checkSourceAndReportViolation): Tweaked code
1536 to do less unnecessary String allocation.
1537 (WebCore::CSPDirectiveList::parseReflectedXSS): Use
1538 equalLettersIgnoringASCIICase. No change in behavior.
1539 (WebCore::CSPDirectiveList::addDirective): Ditto.
1540 (WebCore::ContentSecurityPolicy::reportUnsupportedDirective): Use
1541 equalLettersIgnoringASCIICase and remove unneeded global constant strings.
1542 No change in behavior.
1543 (WebCore::ContentSecurityPolicy::reportDirectiveAsSourceExpression):
1544 Tweak code to eliminate unneeded local.
1545 (WebCore::ContentSecurityPolicy::reportDuplicateDirective): Ditto.
1546 (WebCore::ContentSecurityPolicy::reportInvalidSourceExpression): Use
1547 equalLettersIgnoringASCIICase. No change in behavior.
1549 * page/OriginAccessEntry.h:
1550 (WebCore::operator==): Use equalLettersIgnoringASCIICase.
1552 * page/Performance.cpp:
1553 (WebCore::Performance::webkitGetEntriesByName): Use equalLettersIgnoringASCIICase.
1554 No change in behavior.
1556 * page/UserContentURLPattern.cpp:
1557 (WebCore::UserContentURLPattern::matches): Use equalIgnoringASCIICase to match
1559 (WebCore::UserContentURLPattern::matchesHost): Use equalIgnoringASCIICase to
1563 (WebCore::URL::init): Use equalIgnoringASCIICase, and also use StringView to
1564 avoid having to allocate a second string just for comparison purposes. Should be
1565 better for efficiency with no change in behavior.
1567 * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
1568 (WebCore::ContentFilterUnblockHandler::canHandleRequest): Use equalIgnoringASCIICase
1571 * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
1572 (WebCore::PlatformSpeechSynthesisProviderEfl::voiceName): Use StringView and
1573 equalIgnoringASCIICase to compare language tags. No test needed because there are
1574 no language tags with non-ASCII characters in them.
1576 * platform/graphics/FontCache.cpp:
1577 (WebCore::FontPlatformDataCacheKey::operator==): Changed to use the equal
1578 function from CaseFoldingHash. In a subsequent patch we will change this to be
1579 ASCIICaseFoldingHash since font names don't need to compare non-ASCII characters
1580 in a case folding manner, but for now preserve behavior.
1581 (WebCore::alternateFamilyName): Use equalLettersIgnoringASCIICase to avoid having
1582 to use a special familyNameEqualIgnoringCase function. This does mean there will
1583 be a null check and a length check that wasn't there before, but the actual
1584 comparison function will be tighter. Guessing it will be a wash. Also improved
1585 the comments and sorted the Windows cases in with the others. No behavior change.
1587 * platform/graphics/FontCascade.cpp:
1588 (WebCore::operator==): Changed to use the equal function from CaseFoldingHash.
1589 Same rationale as above in FontPlatformDataCacheKey.
1591 * platform/graphics/FontDescription.cpp:
1592 (WebCore::FontCascadeDescription::familiesEqualForTextAutoSizing): Use
1593 equalIgnoringASCIICase to compare font family names. Only possible change in
1594 behavior would be if actual fonts with non-ASCII names but that were specified
1595 with different case in style sheets. Highly unlikely this exists.
1597 * platform/graphics/MediaPlayer.cpp:
1598 (WebCore::MediaPlayer::supportsType): Use equalLettersIgnoringASCIICase.
1599 No change in behavior.
1600 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1601 (WebCore::keySystemIsSupported): Ditto.
1603 * platform/graphics/freetype/FontCacheFreeType.cpp:
1604 (WebCore::isCommonlyUsedGenericFamily): Added.
1605 (WebCore::FontCache::createFontPlatformData): Moved code into the
1606 isCommonlyUsedGenericFamily helper and used equalIgnoringASCIICase.
1608 * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1609 (WebCore::FontCustomPlatformData::supportsFormat): Use
1610 equalLettersIgnoringASCIICase. No change in behavior.
1611 * platform/graphics/win/FontCacheWin.cpp:
1612 (WebCore::adjustedGDIFontWeight): Ditto.
1613 (WebCore::FontCache::createFontPlatformData): Ditto.
1614 * platform/graphics/win/FontCustomPlatformData.cpp:
1615 (WebCore::FontCustomPlatformData::supportsFormat): Ditto.
1616 * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1617 (WebCore::FontCustomPlatformData::supportsFormat): Ditto.
1619 * platform/mac/PlatformSpeechSynthesizerMac.mm:
1620 (-[WebSpeechSynthesisWrapper speakUtterance:]): Use equalIgnoringASCIICase to
1621 compare languages. No change in behavior because languages have all-ASCII names.
1623 * platform/network/CacheValidation.cpp:
1624 (WebCore::shouldUpdateHeaderAfterRevalidation): Use equalIgnoringASCIICase.
1625 No change in behavior since it's a fixed list of all ASCII headers.
1626 * platform/network/curl/ResourceHandleManager.cpp:
1627 (WebCore::isAppendableHeader): Ditto.
1629 * platform/network/mac/ResourceHandleMac.mm:
1630 (WebCore::ResourceHandle::willSendRequest): Use equalIgnoringASCIICase.
1631 No change in behavior because HTTP methods are all ASCII letters.
1633 * platform/text/mac/LocaleMac.mm:
1634 (WebCore::determineLocale): Use equalIgnoringASCIICase. No change in behavior
1635 because locale languages identifiers are all ASCII.
1636 * platform/text/win/LocaleWin.cpp:
1637 (WebCore::LCIDFromLocaleInternal): Ditto.
1639 * svg/SVGToOTFFontConversion.cpp:
1640 (WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable):
1641 Use equalIgnoringASCIICase. No change in behavior because Arabic form attribute
1642 values are all ASCII.
1644 * xml/XMLHttpRequest.cpp:
1645 (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): Use equalIgnoringASCIICase.
1646 No change in behavior because these are all fixed known ASCII HTTP method names.
1648 * xml/XPathFunctions.cpp:
1649 (WebCore::XPath::FunLang::evaluate): Use equalIgnoringASCIICase. Changes behavior
1650 if specifying a non-ASCII character. Covered by new test.
1652 * xml/XPathStep.cpp:
1653 (WebCore::XPath::nodeMatchesBasicTest): Use equalIgnoringASCIICase. Changes
1654 behavior if an element local name or XPath predicate has a non-ASCII character.
1655 Covered by new test.
1657 2016-01-28 Zalan Bujtas <zalan@apple.com>
1659 Unexpected content wrapping at http://email.osh.com/H/2/v100000152474feb8ec7c1a1f4bbe5c7c0/HTML
1660 https://bugs.webkit.org/show_bug.cgi?id=153430
1662 Reviewed by Simon Fraser.
1664 Ensure that min/max preferred and computed widths never shrink while converting LayoutUnit to float and back.
1666 Test: fast/table/fixed-size-table-with-fixed-size-content.html
1668 * rendering/AutoTableLayout.cpp:
1669 (WebCore::AutoTableLayout::recalcColumn):
1670 (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1671 (WebCore::AutoTableLayout::layout):
1672 * rendering/RenderBlock.cpp:
1673 (WebCore::RenderBlock::computePreferredLogicalWidths): Deleted.
1675 2016-01-28 Gwang Yoon Hwang <yoon@igalia.com>
1677 [GStreamer] Clean up includes and headers related with GStreamerGL
1678 https://bugs.webkit.org/show_bug.cgi?id=153590
1680 Reviewed by Philippe Normand.
1682 Remove gstglmemory from the including list and reorder includes to
1683 organize GSTREAMER_GL related headers. It violates style rules of the
1684 include order, but there is no clean way to include gst/gl/gl.h
1685 without violating it.
1687 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1688 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1690 2016-01-28 Gwang Yoon Hwang <yoon@igalia.com>
1692 [GStreamer] MediaPlayerPrivateGStreamerBase::handleSyncMessage leaks GstContext
1693 https://bugs.webkit.org/show_bug.cgi?id=153580
1695 Reviewed by Philippe Normand.
1697 When we creates GstContext using gst_context_new it increases refcount itself.
1698 And the refcount of GstContext is increased when it is passed to
1699 gst_element_set_context, also. Therefore We should unref GstContext after
1700 using it to prevent GstContext leaks.
1702 * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1703 (WTF::adoptGRef): Added for GstContext.
1704 (WTF::refGPtr<GstContext>): Ditto
1705 (WTF::derefGPtr<GstContext>): Ditto
1706 * platform/graphics/gstreamer/GRefPtrGStreamer.h:
1707 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1708 (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
1709 Use GRefPtr<GstContext> to handle currect refcounting
1711 2016-01-27 Alex Christensen <achristensen@webkit.org>
1713 Fix clean CMake build after r195711.
1715 * PlatformWin.cmake:
1716 Copy forwarding headers from the new directory to find ContentSecurityPolicy.h.
1717 This should fix EWS issues like the one seen in bug 153573.
1719 2016-01-27 Chris Dumez <cdumez@apple.com>
1721 Expose ValidityState on the global Window object
1722 https://bugs.webkit.org/show_bug.cgi?id=153582
1724 Reviewed by Antti Koivisto.
1726 Expose ValidityState on the global Window object:
1727 https://html.spec.whatwg.org/#validitystate
1729 Firefox and Chrome match the specification.
1731 No new tests, already covered by existing tests.
1733 * html/ValidityState.idl:
1735 2016-01-27 Chris Dumez <cdumez@apple.com>
1737 Expose ApplicationCache on the global Window object
1738 https://bugs.webkit.org/show_bug.cgi?id=153578
1740 Reviewed by Antti Koivisto.
1742 Expose ApplicationCache on the global Window object as per:
1743 https://html.spec.whatwg.org/#the-storage-interface
1745 Chrome follows the spec.
1747 No new tests, already covered by existing test.
1749 * loader/appcache/DOMApplicationCache.idl:
1751 2016-01-27 Ryosuke Niwa <rniwa@webkit.org>
1753 REGRESSION(r190430): Assertion failure in Text::~Text()
1754 https://bugs.webkit.org/show_bug.cgi?id=153577
1756 Reviewed by Antti Koivisto.
1758 The bug was caused by destroyRenderTreeIfNeeded exiting early on all HTMLSlotElement as it lacks a render object.
1759 Fixed it by explicitly avoiding the early return when child is a HTMLSlotElement.
1761 Test: fast/shadow-dom/slot-removal-crash-2.html
1763 * dom/ContainerNode.cpp:
1764 (WebCore::destroyRenderTreeIfNeeded):
1766 2016-01-27 Said Abou-Hallawa <sabouhallawa@apple.com>
1768 Garbage is displayed when root svg element has mix-blend-mode set
1769 https://bugs.webkit.org/show_bug.cgi?id=150556
1771 Reviewed by Darin Adler.
1773 This bug happens when compositing on a CALayer and drawing on a transparent
1774 layer, so it happens with WK2 with <svg style="mix-blend-mode...">. And it
1775 can happen with WK1 also with <svg style="opacity=...;mix-blend-mode...">.
1776 But in both cases, the SVG root renderer should be the root of the render
1777 tree. So it happens only with the stand alone SVG documents.
1779 SVGRenderContext::prepareToRenderSVGContent() ignores the opacity of
1780 the SVG root but it creates a transparent layer for the blend-mode.
1782 But RenderLayer::beginTransparencyLayers() creates a transparent layer
1783 for opacity and it sets the blend-mode also.
1785 The fix is to begin two transparent layers for the SVG root renderer: one
1786 for the opacity and the second for the blend-mode. The opacity transparent
1787 layer will be still managed by RenderLayer::beginTransparencyLayers(). While
1788 the blend-mode transparent layer will be managed by SVGRenderContext
1789 ::prepareToRenderSVGContent().
1791 Tests: svg/css/mix-blend-mode-background-root.svg
1792 svg/css/mix-blend-mode-opacity-root.svg
1794 * rendering/RenderLayer.cpp:
1795 (WebCore::RenderLayer::beginTransparencyLayers):
1797 2016-01-27 Enrica Casucci <enrica@apple.com>
1799 Cache results of data detection in the UI process when load completes.
1800 https://bugs.webkit.org/show_bug.cgi?id=153560
1802 Reviewed by Tim Horton.
1804 Adding new FrameLoaderClient method to notify that data
1805 detection is complete and provide the results.
1807 * loader/EmptyClients.h:
1808 * loader/FrameLoader.cpp:
1809 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1810 * loader/FrameLoaderClient.h:
1812 2016-01-27 Daniel Bates <dabates@apple.com>
1814 Move ContentSecurityPolicy.{cpp, h} to its own directory
1815 https://bugs.webkit.org/show_bug.cgi?id=153527
1816 <rdar://problem/24359892>
1818 Reviewed by Sam Weinig.
1820 Move ContentSecurityPolicy.{cpp, h} from Source/WebCore/page to Source/WebCore/page/csp.
1821 This will facilitate separating out the policy support classes (e.g. CSPDirectiveList)
1822 into their own files to improve the hackability of this code.
1825 * WebCore.vcxproj/WebCore.vcxproj:
1826 * WebCore.vcxproj/WebCore.vcxproj.filters:
1827 * WebCore.xcodeproj/project.pbxproj:
1828 * page/csp/ContentSecurityPolicy.cpp: Renamed from Source/WebCore/page/ContentSecurityPolicy.cpp.
1829 * page/csp/ContentSecurityPolicy.h: Renamed from Source/WebCore/page/ContentSecurityPolicy.h.
1831 2016-01-27 Brady Eidson <beidson@apple.com>
1833 Modern IDB: Incorrect handling of iterating cursors to their end.
1834 https://bugs.webkit.org/show_bug.cgi?id=153569
1836 Reviewed by Alex Christensen.
1838 No new tests (3 tests now pass, others are closer to passing).
1840 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1841 (WebCore::IDBServer::SQLiteIDBCursor::advance):
1842 (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
1844 2016-01-27 Nan Wang <n_wang@apple.com>
1846 AX: Crash in AccessibilityTableColumn::headerObject
1847 https://bugs.webkit.org/show_bug.cgi?id=153553
1848 <rdar://problem/23196278>
1850 Reviewed by Chris Fleizach.
1852 Webkit was crashing sometimes when we asked for column headers of a table.
1853 The columns vector of the table was reset during the iteration when we
1854 were asking for the headerObject of each column. The column's addChildren()
1855 function calls elementRect() for each child cell and that sometimes causes
1856 the parent table to reset its children.
1857 Fixed it by caching the columns vector and moving out the elementRect() logic
1858 from AccessibilityTalbeColumn::addChildren().
1860 * accessibility/AccessibilityTable.cpp:
1861 (WebCore::AccessibilityTable::columnHeaders):
1862 (WebCore::AccessibilityTable::rowHeaders):
1863 * accessibility/AccessibilityTableColumn.cpp:
1864 (WebCore::AccessibilityTableColumn::elementRect):
1865 (WebCore::AccessibilityTableColumn::headerObject):
1866 (WebCore::AccessibilityTableColumn::addChildren):
1867 * accessibility/AccessibilityTableColumn.h:
1869 2016-01-27 Chris Dumez <cdumez@apple.com>
1871 Settings a reflected DOMString attribute to null should set it to the "null" string rather than the empty string
1872 https://bugs.webkit.org/show_bug.cgi?id=153504
1873 <rdar://problem/24353072>
1875 Reviewed by Ryosuke Niwa.
1877 Settings a reflected DOMString attribute to null should set it to the "null"
1878 string rather than the empty string:
1879 - https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes
1880 - http://heycam.github.io/webidl/#es-DOMString
1881 - http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring
1883 Firefox and Chrome match the specification here.
1885 This is causing a lot of W3C HTML reflection tests to fail on WebKit, e.g.:
1886 - http://w3c-test.org/html/dom/reflection-text.html
1888 No new tests, already covered by existing tests.
1890 * bindings/scripts/CodeGeneratorJS.pm:
1892 Call toString() instead of valueToStringWithNullCheck() for reflected
1893 attributes. This way, null gets converted to the string "null", as
1894 expected, instead of a null String object.
1896 * html/HTMLInputElement.idl:
1897 Dropping [TreatNullAs=NullString] IDL extended attribute for
1898 input.defaultValue, as this is not present in the specification:
1899 - https://html.spec.whatwg.org/#htmlinputelement
1901 Without this change, assigning null to input.defaultValue would not
1902 set to to the "null" string, as is expected.
1904 * html/HTMLTextAreaElement.idl:
1905 Dropping [TreatNullAs=NullString] IDL extended attribute for
1906 textArea.defaultValue, as this is not present in the specification:
1907 - https://html.spec.whatwg.org/#htmltextareaelement
1909 Without this change, assigning null to textArea.defaultValue would not
1910 set to to the "null" string, as is expected.
1912 * html/HTMLTitleElement.idl:
1913 Dropping [TreatNullAs=NullString] IDL extended attribute for
1914 title.text, as this is not present in the specification:
1915 - https://html.spec.whatwg.org/#htmltitleelement
1917 Without this change, assigning null to title.text would not
1918 set to to the "null" string, as is expected.
1920 2016-01-27 Simon Fraser <simon.fraser@apple.com>
1922 Support CSS3 Images values for the image-rendering property
1923 https://bugs.webkit.org/show_bug.cgi?id=153556
1925 Reviewed by Dean Jackson.
1927 CSS3 Images has the following values for image-rendering:
1928 auto, crisp-edges, pixelated
1930 The old code supported:
1931 optimizeSpeed, optimizeQuality, -webkit-crisp-edges, -webkit-optimize-contrast
1933 Add support for the new values without prefixes. Map -webkit-crisp-edges to crisp-edges,
1934 and -webkit-optimize-contrast to crisp-edges. Support pixelated which behaves like
1935 crisp-edges (a low quality scale).
1937 The spec says that optimizeQuality should behave like 'auto', but that would be
1938 a behavior change since ImageQualityController::shouldPaintAtLowQuality() currently
1939 uses it as a trigger to avoid low quality scaling, so don't change that for now.
1941 No new tests, covered by fast/css/script-tests/image-rendering-parsing.js
1943 * css/CSSParser.cpp:
1944 (WebCore::isValidKeywordPropertyAndValue):
1945 * css/CSSPrimitiveValueMappings.h:
1946 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1947 (WebCore::CSSPrimitiveValue::operator EImageRendering):
1948 * css/CSSValueKeywords.in:
1949 * rendering/ImageQualityController.cpp:
1950 (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1951 * rendering/RenderHTMLCanvas.cpp:
1952 (WebCore::RenderHTMLCanvas::paintReplaced):
1953 * rendering/style/RenderStyleConstants.h:
1954 * rendering/style/StyleRareInheritedData.h: Need another bit.
1956 2016-01-27 Anders Carlsson <andersca@apple.com>
1958 Add WebKitAdditions extension points to WebCore, WebKit and WebKitLegacy
1959 https://bugs.webkit.org/show_bug.cgi?id=153550
1961 Reviewed by Sam Weinig.
1963 * DerivedSources.make:
1964 Add the ability for WebKitAdditions to add events and event targets.
1966 * WebCore.xcodeproj/project.pbxproj:
1969 * bindings/scripts/InFilesCompiler.pm:
1970 (initializeFromCommandLine):
1972 Handle multiple --input parameters.
1975 Handle adding more event names.
1977 * loader/EmptyClients.cpp:
1978 (WebCore::fillWithEmptyClients):
1979 * page/MainFrame.cpp:
1980 (WebCore::MainFrame::MainFrame):
1982 * page/PageConfiguration.h:
1983 Add extension points.
1985 * platform/cocoa/WebKitAdditions.mm: Added.
1988 2016-01-27 Brady Eidson <beidson@apple.com>
1990 Modern IDB: Fix many Index tests.
1991 https://bugs.webkit.org/show_bug.cgi?id=153561
1993 Reviewed by Alex Christensen.
1995 No new tests (Many failing tests now pass).
1997 * Modules/indexeddb/server/MemoryIndex.cpp:
1998 (WebCore::IDBServer::MemoryIndex::getResultForKeyRange):
2000 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2001 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
2002 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
2003 (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
2004 (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
2006 * Modules/indexeddb/server/SQLiteIDBCursor.h:
2007 (WebCore::IDBServer::SQLiteIDBCursor::didComplete):
2009 2016-01-27 Brady Eidson <beidson@apple.com>
2011 Modern IDB: Cursors are utterly broken in the SQLite backend.
2012 https://bugs.webkit.org/show_bug.cgi?id=153558
2014 Reviewed by Alex Christensen.
2016 No new tests (35 failures now pass, others improve).
2018 - Fixes incorrect usage of Index cursors when ObjectStore cursors are intended.
2019 - Improves the state of getting the cursor value vs. reaching the end of a cursor.
2021 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2022 (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
2023 (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
2025 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
2026 (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
2027 (WebCore::IDBServer::SQLiteIDBCursor::currentData):
2028 * Modules/indexeddb/server/SQLiteIDBCursor.h:
2030 2016-01-27 Chris Dumez <cdumez@apple.com>
2032 Getting / Setting property on prototype object must throw TypeError
2033 https://bugs.webkit.org/show_bug.cgi?id=153547
2034 <rdar://problem/24370650>
2036 Reviewed by Ryosuke Niwa.
2038 Gettingi / Setting property on prototype object must throw TypeError as per
2039 Web IDL specification:
2040 http://heycam.github.io/webidl/#dfn-attribute-getter (Step 2.4.2)
2041 http://heycam.github.io/webidl/#dfn-attribute-setter (Step 3.5)
2043 Firefox and Chrome already throw a TypeError in this case, as per
2044 the specification. However, WebKit was returning null and merely
2045 logging a deprecation error message. This patch aligns our behavior
2046 with other browsers and the specification.
2048 This patch also adds support for the [LenientThis] IDL extended
2050 http://heycam.github.io/webidl/#LenientThis
2052 For [LenientThis] attributes, we do not throw a TypeError if the
2053 attribute getter / setter is called on an object which does not
2054 implement the expected interface, as per:
2055 http://heycam.github.io/webidl/#dfn-attribute-getter (Step 2.4.1)
2056 http://heycam.github.io/webidl/#dfn-attribute-setter (Step 3.5)
2058 No new tests, already covered by existing tests.
2060 * bindings/scripts/CodeGeneratorJS.pm:
2061 (GenerateImplementation):
2062 * bindings/scripts/IDLAttributes.txt:
2063 Add support for [LenientThis]:
2064 http://heycam.github.io/webidl/#LenientThis
2066 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2067 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2068 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2069 * bindings/scripts/test/JS/JSTestInterface.cpp:
2070 * bindings/scripts/test/JS/JSTestNode.cpp:
2071 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2072 * bindings/scripts/test/JS/JSTestObj.cpp:
2073 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2074 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2075 * bindings/scripts/test/JS/JSattribute.cpp:
2076 * bindings/scripts/test/ObjC/DOMTestObj.h:
2077 * bindings/scripts/test/ObjC/DOMTestObj.mm:
2078 Rebaseline bindings tests.
2080 * bindings/scripts/test/TestObj.idl:
2081 Add coverage for [LenientThis] attributes.
2084 Mark 'onreadystatechange' as [LenientThis] as per the HTML
2086 https://html.spec.whatwg.org/#document
2088 * dom/GlobalEventHandlers.idl:
2089 Mark 'onmouseeneter' / 'onmouseleave' as [LenientThis] as per the
2091 https://html.spec.whatwg.org/#globaleventhandlers
2093 2016-01-27 Chris Dumez <cdumez@apple.com>
2095 window.atob() should ignore spaces in input
2096 https://bugs.webkit.org/show_bug.cgi?id=153522
2097 <rdar://problem/24357822>
2099 Reviewed by Benjamin Poulain.
2101 window.atob() should ignore spaces in input as per:
2102 - https://html.spec.whatwg.org/#dom-windowbase64-atob (Step 3)
2104 Previously, WebKit would throw an exception and it was the only browser
2105 to do so. Firefox and Chrome behavior according to the specification.
2107 This was causing us to fail 10 checks in the following W3C HTML test:
2108 http://w3c-test.org/html/webappapis/atob/base64.html
2110 No new tests, updated existing test.
2112 * page/DOMWindow.cpp:
2113 (WebCore::DOMWindow::atob):
2115 (WebCore::Page::userStyleSheetLocationChanged):
2116 * platform/network/DataURL.cpp:
2117 (WebCore::handleDataURL):
2118 * platform/network/DataURLDecoder.cpp:
2119 (WebCore::DataURLDecoder::decodeBase64):
2121 2016-01-27 Ada Chan <adachan@apple.com>
2123 Move some logic related to the presentation mode button from mediaControlsiOS.js to mediaControlsApple.js
2124 https://bugs.webkit.org/show_bug.cgi?id=153476
2126 Reviewed by Eric Carlson.
2128 Also, add the necessary styles to support that control in mediaControlsApple.css.
2130 * Modules/mediacontrols/mediaControlsApple.css:
2131 (video::-webkit-media-controls-panel.picture-in-picture):
2132 (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
2133 (audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
2134 (audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
2135 (video::-webkit-media-controls-panel .picture-in-picture-button):
2136 Use the same mask image as iOS, but with a different size and a background color specified
2137 (since there's another rule that makes buttons within the panel have a transparent
2139 (video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture):
2141 * Modules/mediacontrols/mediaControlsApple.js:
2142 (Controller.prototype.addVideoListeners):
2143 (Controller.prototype.removeVideoListeners):
2144 Listen for (and stop listening for) the webkitpresentationmodechanged event if presentation
2145 mode is supported for this video element.
2146 (Controller.prototype.createControls):
2147 Add a class name to the pictureInPictureButton so we can query for it in the stylesheet.
2148 (Controller.prototype.configureInlineControls):
2149 Call updatePictureInPictureButton().
2150 (Controller.prototype.presentationMode):
2151 Moved from mediaControlsiOS.js.
2152 (Controller.prototype.isFullScreen):
2153 Ditto, with a bug fix to not call presentationMode(), since that method calls isFullScreen(),
2154 resulting in infinite recursion.
2155 (Controller.prototype.updatePictureInPictureButton):
2157 (Controller.prototype.handlePresentationModeChange):
2159 (Controller.prototype.handleFullscreenChange):
2160 Call handlePresentationModeChanged() if presentation mode is supported for this video element.
2161 (Controller.prototype.controlsAlwaysVisible):
2163 (Controller.prototype.handlePictureInPictureButtonClicked):
2165 * Modules/mediacontrols/mediaControlsiOS.js:
2166 (ControllerIOS.prototype.handlePresentationModeChange):
2167 Most logic has been moved to the same method in mediaControlsApple.js, except
2168 updating the style of the panelContainer, which doesn't exist in the Mac controls.
2169 (ControllerIOS.prototype.addVideoListeners): Deleted.
2170 (ControllerIOS.prototype.removeVideoListeners): Deleted.
2171 (ControllerIOS.prototype.presentationMode): Deleted.
2172 (ControllerIOS.prototype.isFullScreen): Deleted.
2173 (ControllerIOS.prototype.handlePictureInPictureButtonClicked): Deleted.
2174 (ControllerIOS.prototype.updatePictureInPictureButton): Deleted.
2175 (ControllerIOS.prototype.handleFullscreenChange): Deleted.
2176 (ControllerIOS.prototype.controlsAlwaysVisible): Deleted.
2177 Delete all code that's already handled in the Controller.
2179 2016-01-26 Ada Chan <adachan@apple.com>
2181 Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaSourceAVFObjC
2182 also on Mac platform with video presentation mode support.
2183 https://bugs.webkit.org/show_bug.cgi?id=153223
2185 Reviewed by Jer Noble.
2187 Reuse VideoFullscreenLayerManager to manage moving the video layer between the fullscreen
2188 layer and the inline layer depending on the current presentation mode.
2190 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2191 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2192 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2193 Create m_videoFullscreenLayerManager.
2194 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
2195 Return the video inline layer from the VideoFullscreenLayerManager.
2196 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
2197 Call VideoFullscreenLayerManager::setVideoLayer() with the m_sampleBufferDisplayLayer.
2198 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
2199 Call VideoFullscreenLayerManager::didDestroyVideoLayer().
2200 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):
2201 Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
2202 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenFrame):
2203 Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
2205 2016-01-27 Brady Eidson <beidson@apple.com>
2207 Modern IDB: SQLite backend doesn't update index records as object records are added.
2208 https://bugs.webkit.org/show_bug.cgi?id=153548
2210 Reviewed by Alex Christensen.
2212 No new tests (4 more tests pass, others improve).
2214 * Modules/indexeddb/server/IDBBackingStore.h:
2216 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2217 (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
2218 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2220 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2221 (WebCore::IDBServer::SQLiteIDBBackingStore::initializeVM):
2222 (WebCore::IDBServer::SQLiteIDBBackingStore::vm):
2223 (WebCore::IDBServer::SQLiteIDBBackingStore::globalObject):
2224 (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
2225 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
2226 (WebCore::IDBServer::SQLiteIDBBackingStore::updateIndexesForAddRecord):
2227 (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
2228 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
2230 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2231 (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2233 * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
2235 2016-01-27 Ryosuke Niwa <rniwa@webkit.org>
2237 Add API to access closed shadowRoot in InjectedBundle
2238 https://bugs.webkit.org/show_bug.cgi?id=153533
2240 Reviewed by Antti Koivisto.
2242 Always return the shadow root in Element.shadowRootForBindings when the DOM wrapper world has
2243 shadowRootIsAlwaysOpen set to true. Also renamed bindingShadowRoot to shadowRootForBindings
2246 * bindings/js/DOMWrapperWorld.h:
2247 (WebCore::DOMWrapperWorld::setShadowRootIsAlwaysOpen): Added.
2248 (WebCore::DOMWrapperWorld::shadowRootIsAlwaysOpen): Added.
2250 (WebCore::Element::shadowRootForBindings): Renamed from bindingShadowRoot.
2254 2016-01-27 Zhuo Li <zachli@apple.com>
2256 Need ability to specify alternate image for AutoFill button in input fields.
2257 https://bugs.webkit.org/show_bug.cgi?id=153116.
2258 rdar://problem/23384854.
2260 Reviewed by Darin Adler.
2262 Add a new AutoFill button that can be shown in <input> elements.
2264 Tests: fast/forms/auto-fill-button/input-contacts-auto-fill-button.html
2265 fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes.html
2268 (input::-webkit-contacts-auto-fill-button):
2269 (input::-webkit-contacts-auto-fill-button:hover):
2270 (input::-webkit-contacts-auto-fill-button:active):
2271 Add default style rules for the Contacts AutoFill button based on the ones used for
2272 Manual AutoFill button.
2274 * html/HTMLInputElement.cpp:
2275 (WebCore::HTMLInputElement::setShowAutoFillButton):
2276 * html/HTMLInputElement.h:
2277 (WebCore::HTMLInputElement::autoFillButtonType):
2278 - Replace the boolean parameter with a new parameter to specify the type of the AutoFill button.
2279 - Declare a private variable to keep a record of the type of the current AutoFill
2281 (WebCore::HTMLInputElement::showAutoFillButton): Deleted.
2283 * html/HTMLTextFormControlElement.h:
2284 Declare enum for AutoFill button type.
2286 * html/TextFieldInputType.cpp:
2287 (WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
2288 (WebCore::isAutoFillButtonTypeChanged):
2289 (WebCore::TextFieldInputType::shouldDrawAutoFillButton): None means the AutoFill button is not
2291 (WebCore::TextFieldInputType::createAutoFillButton): Only create the AutoFill button
2292 if the type is expected.
2293 (WebCore::TextFieldInputType::updateAutoFillButton):
2294 Handle the case where AutoFill button type changes in the text field.
2295 * html/TextFieldInputType.h:
2297 * testing/Internals.cpp:
2298 (WebCore::stringToAutoFillButtonType): Convert the string to AutoFill button type.
2299 (WebCore::Internals::setShowAutoFillButton): Add a new parameter to specify the type of the AutoFill button.
2300 * testing/Internals.h: Ditto.
2301 * testing/Internals.idl: Ditto.
2303 2016-01-26 Ryosuke Niwa <rniwa@webkit.org>
2306 https://bugs.webkit.org/show_bug.cgi?id=153537
2308 Reviewed by Antti Koivisto.
2310 Exposed highestAncestor as Node.prototype.treeRoot, which was added to shadow DOM spec in
2311 https://github.com/w3c/webcomponents/commit/6864a40fe4efa8a737e78512e3c85319ddc5bf8b
2314 http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-node-interface
2316 Test: fast/shadow-dom/Node-interface-treeRoot.html
2320 2016-01-26 Ryosuke Niwa <rniwa@webkit.org>
2322 Rename HTMLSlotElement.getDistributedNodes to getAssignedNodes
2323 https://bugs.webkit.org/show_bug.cgi?id=153534
2325 Reviewed by Antti Koivisto.
2329 * html/HTMLSlotElement.idl:
2331 2016-01-27 Tim Horton <timothy_horton@apple.com>
2333 Need to be able to specify MIME type for <attachment> without filename or handle
2334 https://bugs.webkit.org/show_bug.cgi?id=153552
2335 <rdar://problem/20145857>
2337 Reviewed by Anders Carlsson.
2339 Tests: fast/attachment/attachment-default-icon.html
2340 fast/attachment/attachment-type-attribute.html
2342 * html/HTMLAttachmentElement.cpp:
2343 (WebCore::HTMLAttachmentElement::parseAttribute):
2344 Invalidate attachment when 'type' attribute changes.
2346 (WebCore::HTMLAttachmentElement::attachmentType):
2347 * html/HTMLAttachmentElement.h:
2348 * platform/graphics/Icon.h:
2349 * platform/graphics/mac/IconMac.mm:
2350 (WebCore::Icon::createIconForUTI):
2351 (WebCore::Icon::createIconForMIMEType):
2352 Add Icon class methods to retrieve an icon given a UTI or MIME type.
2354 * rendering/RenderThemeMac.mm:
2355 (WebCore::paintAttachmentIcon):
2356 Use the 'type' attribute (a MIME type) if we have one. Otherwise,
2357 use the filename. Lastly fall back to a plain file icon (using the root
2358 file UTI, public.data).
2360 2016-01-27 Alexey Proskuryakov <ap@apple.com>
2362 Remove ENABLE_CURRENTSRC
2363 https://bugs.webkit.org/show_bug.cgi?id=153545
2365 Reviewed by Simon Fraser.
2367 * Configurations/FeatureDefines.xcconfig:
2369 2016-01-26 Anders Carlsson <andersca@apple.com>
2371 Stop echoing echo commands to stdout
2372 https://bugs.webkit.org/show_bug.cgi?id=153531
2374 Reviewed by Csaba Osztrogonác.
2376 * DerivedSources.make:
2378 2016-01-26 Jer Noble <jer.noble@apple.com>
2380 Calling video.controls=true during a scrub operation cancels scrub.
2381 https://bugs.webkit.org/show_bug.cgi?id=153494
2383 Reviewed by Eric Carlson.
2385 Test: media/media-controls-drag-timeline-set-controls-property.html
2387 Verify that the video.controls attribute actually changed before tearing down and
2388 re-adding the media controls to the Shadow DOM.
2390 * Modules/mediacontrols/mediaControlsApple.js:
2391 (Controller.prototype.handleControlsChange):
2392 (Controller.prototype.hasControls):
2394 2016-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
2396 [GTK][EFL] Rename ScrollAnimationNone as ScrollAnimationSmooth
2397 https://bugs.webkit.org/show_bug.cgi?id=153481
2399 Reviewed by Simon Fraser.
2401 ScrollAnimationNone has always been used by EFL and GTK ports to
2402 implement smooth scrolling. I think it should be possible for
2403 other scroll animators to implement smooth scrolling or even
2404 implement other kind of scroll animations. For example, in the
2405 future I would like to have kinetic scrolling implemented for the
2406 GTK+ port to match all other GTK+ application and decide at
2407 runtime between different animations without having to use a
2408 different scroll animator class. So, this patch also moves the
2409 smooth scrolling animation implementation to its own class
2410 ScrollAnimationSmooth that impements an interface ScrollAnimation
2411 that could be used to implement other animations. This will allow
2412 the GTK+ port to add its own scroll animator class and still
2413 support smooth scrolling sharing the code with the
2414 ScrollAnimationSmooth.
2416 * PlatformEfl.cmake: Add new files to compilation and remove ScrollAnimationNone.
2417 * PlatformGTK.cmake: Ditto.
2418 * platform/ScrollAnimation.h: Added.
2419 (WebCore::ScrollAnimation::serviceAnimation):
2420 (WebCore::ScrollAnimation::ScrollAnimation):
2421 * platform/ScrollAnimationSmooth.cpp: Added.
2422 (WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
2423 (WebCore::ScrollAnimationSmooth::scroll):
2424 (WebCore::ScrollAnimationSmooth::stop):
2425 (WebCore::ScrollAnimationSmooth::updateVisibleLengths):
2426 (WebCore::ScrollAnimationSmooth::setCurrentPosition):
2427 (WebCore::ScrollAnimationSmooth::serviceAnimation):
2428 (WebCore::ScrollAnimationSmooth::~ScrollAnimationSmooth):
2430 (WebCore::attackCurve):
2431 (WebCore::releaseCurve):
2432 (WebCore::coastCurve):
2433 (WebCore::curveIntegralAt):
2434 (WebCore::attackArea):
2435 (WebCore::releaseArea):
2436 (WebCore::getAnimationParametersForGranularity):
2437 (WebCore::ScrollAnimationSmooth::updatePerAxisData):
2438 (WebCore::ScrollAnimationSmooth::animateScroll):
2439 (WebCore::ScrollAnimationSmooth::animationTimerFired):
2440 (WebCore::ScrollAnimationSmooth::startNextTimer):
2441 (WebCore::ScrollAnimationSmooth::animationTimerActive):
2442 * platform/ScrollAnimationSmooth.h: Added.
2443 * platform/ScrollAnimator.cpp:
2444 (WebCore::ScrollAnimator::scroll):
2445 (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
2446 (WebCore::ScrollAnimator::setCurrentPosition):
2447 (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset):
2448 (WebCore::ScrollAnimator::notifyPositionChanged):
2449 (WebCore::ScrollAnimator::scrollOffsetOnAxis):
2450 * platform/ScrollAnimator.h:
2451 (WebCore::ScrollAnimator::ScrollAnimator::currentPosition):
2452 * platform/ScrollAnimatorNone.cpp: Removed.
2453 * platform/ScrollAnimatorNone.h: Removed.
2454 * platform/ScrollAnimatorSmooth.cpp: Added.
2455 (WebCore::ScrollAnimator::create):
2456 (WebCore::ScrollAnimatorSmooth::ScrollAnimatorSmooth):
2457 (WebCore::ScrollAnimatorSmooth::~ScrollAnimatorSmooth):
2458 (WebCore::ScrollAnimatorSmooth::scroll):
2459 (WebCore::ScrollAnimatorSmooth::scrollToOffsetWithoutAnimation):
2460 (WebCore::ScrollAnimatorSmooth::cancelAnimations):
2461 (WebCore::ScrollAnimatorSmooth::serviceScrollAnimations):
2462 (WebCore::ScrollAnimatorSmooth::willEndLiveResize):
2463 (WebCore::ScrollAnimatorSmooth::didAddVerticalScrollbar):
2464 (WebCore::ScrollAnimatorSmooth::didAddHorizontalScrollbar):
2465 * platform/ScrollAnimatorSmooth.h: Added.
2466 * platform/mac/ScrollAnimatorMac.mm:
2467 (WebCore::ScrollAnimatorMac::immediateScrollToPosition):
2468 (WebCore::ScrollAnimatorMac::immediateScrollBy):
2470 2016-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
2472 Overlay scrollbars should always use the whole contents
2473 https://bugs.webkit.org/show_bug.cgi?id=153352
2475 Reviewed by Michael Catanzaro.
2477 In case of having both horizontal and vertical scrollbars, the
2478 scrollbars respect the scroll corner. That looks good for legacy
2479 scrollbars that show the track, but with the overlay indicators
2480 it looks weird that the indicator stops so early before the end of
2481 the contents, giving the impression that there's something else to
2482 scroll. This happens because the scroll corner is transparent, so
2483 it's not obvious that's the scroll corner. It also happens with
2484 the text areas having a resizer. Legacy scrollbars take into
2485 account the resizer, which is good, but I expect overlay
2486 scrollbars to be rendered also over the resizer. The resizer takes
2487 precedence so you can still click and drag to resize the text area.
2488 In the case of main frame scrollbars we are indeed returning an
2489 empty rectangle from ScrollView::scrollCornerRect() when using
2490 overlay scrollbars, but when calculating the size of the
2491 scrollbars we are using the actual width/height instead of the
2492 occupied with/height. For other scrollbars
2493 RenderLayer::scrollCornerRect() is not checking whether scrollbars
2494 are overlay or not and we are always returning a scroll corner
2495 rectangle when scrollbars are present.
2497 * platform/ScrollView.cpp:
2498 (WebCore::ScrollView::updateScrollbars): Use the occupied
2499 width/height when calculating the space the one scrollbar
2500 should leave for the other.
2501 * rendering/RenderLayer.cpp:
2502 (WebCore::RenderLayer::scrollCornerRect): Return an empty
2503 rectangle when using overlay scrollbars.
2505 2016-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
2507 ScrollAnimator is not notified when mouse entered, moved or exited a RenderListBox
2508 https://bugs.webkit.org/show_bug.cgi?id=153398
2510 Reviewed by Michael Catanzaro.
2512 EvenHandler is checking whether the enclosing layer of a node is
2513 registered as scrollable area of its frame view. That doesn't work
2514 for list boxes, because they are the scrollable area
2515 themselves. Also when entering a list box the node under mouse is
2516 not usually the list box itself, but any of its children, a
2517 HTMLOptionElement or a HTMLOptGroupElement. Instead of comparing
2518 layers, we should find the enclosing scrollable area of the target
2519 elements and compare them to decide whether the mouse has entered,
2520 left or moved a scrollable area.
2522 * page/EventHandler.cpp:
2523 (WebCore::enclosingScrollableArea): Return the enclosing
2524 scrollable area of the given node. If the node doesn't have a
2525 renderer, it traverses its parents. If the renderer is a
2526 RenderListBox it is returned, otherwhise the enclosing layer is
2528 (WebCore::EventHandler::mouseMoved): Use enclosingScrollableArea.
2529 (WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
2531 2016-01-26 Sam Weinig <sam@webkit.org>
2533 Try touching DerivedSources.make to force rebuilding.
2535 * DerivedSources.make:
2536 * page/DOMWindow.idl:
2538 2016-01-26 Sam Weinig <sam@webkit.org>
2540 Try to force a rebuild.
2542 * page/DOMWindow.idl:
2544 2016-01-26 Chris Dumez <cdumez@apple.com>
2546 fast/history/page-cache-webdatabase-no-transaction-db.html flakily crashes
2547 https://bugs.webkit.org/show_bug.cgi?id=153525
2549 Reviewed by Andreas Kling.
2551 The test was crashing because DatabaseThread::hasPendingDatabaseActivity()
2552 was accessing m_openDatabaseSet from the main thread without any locking
2553 mechanism. This is an issue because m_openDatabaseSet is altered by the
2556 No new tests, already covered by fast/history/page-cache-webdatabase-no-transaction-db.html.
2558 * Modules/webdatabase/DatabaseThread.cpp:
2559 (WebCore::DatabaseThread::databaseThread):
2560 (WebCore::DatabaseThread::recordDatabaseOpen):
2561 (WebCore::DatabaseThread::recordDatabaseClosed):
2562 (WebCore::DatabaseThread::hasPendingDatabaseActivity):
2563 * Modules/webdatabase/DatabaseThread.h:
2565 2016-01-26 Joseph Pecoraro <pecoraro@apple.com>
2567 Unreviewed CMake build fix after r195644.
2569 * PlatformMac.cmake:
2571 2016-01-26 Brady Eidson <beidson@apple.com>
2573 Modern IDB: Key generator support for SQLite backend.
2574 https://bugs.webkit.org/show_bug.cgi?id=153427
2576 Reviewed by Alex Christensen.
2578 No new tests (Existing failing tests now pass, others improved).
2580 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2581 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
2582 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
2583 (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
2584 (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
2585 (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
2586 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
2588 2016-01-26 Simon Fraser <simon.fraser@apple.com>
2590 Allow canvas to use display-list drawing for testing
2591 https://bugs.webkit.org/show_bug.cgi?id=153475
2593 Reviewed by Dean Jackson.
2595 Optionally have 2D <canvas> use display-list drawing, which is only enabled
2596 via Internals for now.
2598 Support displayListAsText() and replayDisplayListAsText() on canvas, so we can
2599 use it to test playback optimizations. [Note that displayListAsText() always
2600 returns an empty string currently, because the display list is cleared when the
2601 canvas is painted to the page.]
2603 Display list rendering is implemented by giving CanvasRenderingContext2D an
2604 optional DisplayListDrawingContext, which packages up a display list, recorder
2605 and recording context. The existing paintRenderingResultsToCanvas() is overridden
2606 to replay the recorded display list into the primary canvas context.
2608 Tracked replay display lists are stored in a static map, keyed by the CanvasRenderingContext2D.
2610 Test: displaylists/canvas-display-list.html
2612 * html/HTMLCanvasElement.cpp:
2613 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2614 (WebCore::HTMLCanvasElement::getContext):
2615 (WebCore::HTMLCanvasElement::paint):
2616 (WebCore::HTMLCanvasElement::setUsesDisplayListDrawing):
2617 (WebCore::HTMLCanvasElement::setTracksDisplayListReplay):
2618 (WebCore::HTMLCanvasElement::displayListAsText):
2619 (WebCore::HTMLCanvasElement::replayDisplayListAsText):
2620 * html/HTMLCanvasElement.h:
2621 * html/canvas/CanvasRenderingContext.h:
2622 * html/canvas/CanvasRenderingContext2D.cpp:
2623 (WebCore::DisplayListDrawingContext::DisplayListDrawingContext):
2624 (WebCore::contextDisplayListMap):
2625 (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
2626 (WebCore::CanvasRenderingContext2D::setTracksDisplayListReplay):
2627 (WebCore::CanvasRenderingContext2D::displayListAsText):
2628 (WebCore::CanvasRenderingContext2D::replayDisplayListAsText):
2629 (WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas):
2630 (WebCore::CanvasRenderingContext2D::drawingContext):
2631 (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Deleted.
2632 * html/canvas/CanvasRenderingContext2D.h:
2633 * testing/Internals.cpp:
2634 (WebCore::Internals::setElementUsesDisplayListDrawing):
2635 (WebCore::Internals::setElementTracksDisplayListReplay):
2636 (WebCore::Internals::displayListForElement):
2637 (WebCore::Internals::replayDisplayListForElement):
2639 2016-01-26 Joseph Pecoraro <pecoraro@apple.com>
2641 Generalize ResourceUsageData gathering to be used outside of ResourceUsageOverlay
2642 https://bugs.webkit.org/show_bug.cgi?id=153509
2643 <rdar://problem/24354291>
2645 Reviewed by Andreas Kling.
2648 * PlatformMac.cmake:
2649 * WebCore.xcodeproj/project.pbxproj:
2652 * page/Settings.cpp:
2654 * page/ResourceUsageOverlay.cpp:
2655 * page/ResourceUsageOverlay.h:
2656 Add new files to the build and updated ENABLE flag name.
2658 * page/ResourceUsageData.cpp: Added.
2659 (WebCore::ResourceUsageData::ResourceUsageData):
2660 * page/ResourceUsageData.h: Added.
2661 (WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
2662 Platform agnostic resource data that may be used by multiple clients,
2663 such as the ResourceUsageOverlay and later the Inspector.
2665 * page/ResourceUsageThread.h: Added.
2666 * page/ResourceUsageThread.cpp: Added.
2667 (WebCore::ResourceUsageThread::ResourceUsageThread):
2668 (WebCore::ResourceUsageThread::singleton):
2669 (WebCore::ResourceUsageThread::addObserver):
2670 (WebCore::ResourceUsageThread::removeObserver):
2671 (WebCore::ResourceUsageThread::waitUntilObservers):
2672 (WebCore::ResourceUsageThread::notifyObservers):
2673 (WebCore::ResourceUsageThread::createThreadIfNeeded):
2674 (WebCore::ResourceUsageThread::threadCallback):
2675 (WebCore::ResourceUsageThread::threadBody):
2676 Platform agnostic resource usage thread that can be used to gather data
2677 into a ResourceUsageData struct on a background thread and notify observers
2678 on the main thread. Platforms need only implement ResourceUsageThread::platformThreadBody
2679 to populate the ResourceUsageData struct with data.
2681 * page/cocoa/ResourceUsageOverlayCocoa.mm:
2682 (WebCore::HistoricMemoryCategoryInfo::HistoricMemoryCategoryInfo):
2683 (WebCore::HistoricResourceUsageData::HistoricResourceUsageData):
2684 (WebCore::historicUsageData):
2685 (WebCore::appendDataToHistory):
2686 (WebCore::ResourceUsageOverlay::platformInitialize):
2687 (WebCore::ResourceUsageOverlay::platformDestroy):
2688 (WebCore::drawMemHistory):
2689 (WebCore::drawMemoryPie):
2690 (WebCore::ResourceUsageOverlay::platformDraw):
2691 Move CPU and memory resource usage calculations to ResourceUsageThread.
2692 The overlay adds itself as an observer, and builds its RingBuffer list
2693 of data from notifications from the ResourceUsageThread. Renamed
2696 * page/cocoa/ResourceUsageThreadCocoa.mm: Added.
2697 (WebCore::vmPageSize):
2698 (WebCore::TagInfo::TagInfo):
2699 (WebCore::pagesPerVMTag):
2700 (WebCore::cpuUsage):
2701 (WebCore::categoryForVMTag):
2702 (WebCore::ResourceUsageThread::platformThreadBody):
2703 Extracted from ResourceUsageOverlayCocoa.
2705 * page/scrolling/ScrollingThread.cpp:
2706 (WebCore::ScrollingThread::dispatch):
2707 Drive-by, don't call singleton again, we already have the result.
2709 2016-01-26 Simon Fraser <simon.fraser@apple.com>
2711 Use initializers in HTMLCanvasElement
2712 https://bugs.webkit.org/show_bug.cgi?id=153472
2714 Reviewed by Michael Catanzaro.
2716 Use initializers, and re-order member variables for better packing.
2718 * html/HTMLCanvasElement.cpp:
2719 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2720 * html/HTMLCanvasElement.h:
2722 2016-01-26 Chris Dumez <cdumez@apple.com>
2724 Setting HTMLInputElement.value to null to set its value to the empty string
2725 https://bugs.webkit.org/show_bug.cgi?id=153519
2727 Reviewed by Ryosuke Niwa.
2729 Setting HTMLInputElement.value to null to set its value to the empty string:
2730 - https://html.spec.whatwg.org/#htmlinputelement
2731 - http://heycam.github.io/webidl/#TreatNullAs
2733 WebKit would previously unset the value attribute instead, which caused
2734 it to fallback to input.defaultValue if set.
2736 Firefox and Chrome behave correctly.
2738 Test: fast/dom/HTMLInputElement/input-value-set-null.html
2740 * html/HTMLInputElement.cpp:
2741 (WebCore::HTMLInputElement::setValue):
2743 2016-01-26 Anders Carlsson <andersca@apple.com>
2745 WebKitAdditions should be able to modify derived source rules
2746 https://bugs.webkit.org/show_bug.cgi?id=153514
2748 Reviewed by Tim Horton.
2750 * DerivedSources.make:
2751 Include WebCoreDerivedSourcesAdditions.make.
2753 * WebCore.xcodeproj/project.pbxproj:
2754 Pass our WebKitAdditions paths as include paths to make.
2756 2016-01-26 Chris Dumez <cdumez@apple.com>
2758 document.open() / write() should be prevented in beforeunload event handlers
2759 https://bugs.webkit.org/show_bug.cgi?id=153432
2761 Reviewed by Ryosuke Niwa.
2763 document.open() / write() should be prevented in beforeunload event handlers:
2764 - https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-open (step 6)
2765 - https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-write (step 3)
2766 - https://html.spec.whatwg.org/multipage/webappapis.html#ignore-opens-during-unload-counter
2767 - https://html.spec.whatwg.org/multipage/browsers.html#unload-a-document
2769 Test: fast/frames/page-beforeunload-document-open.html
2771 * loader/FrameLoader.cpp:
2772 (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
2774 2016-01-26 Chris Dumez <cdumez@apple.com>
2776 Add support for HTMLDataElement
2777 https://bugs.webkit.org/show_bug.cgi?id=153459
2779 Reviewed by Ryosuke Niwa.
2781 Add support for HTMLDataElement:
2782 https://html.spec.whatwg.org/multipage/semantics.html#the-data-element
2784 Firefox already supports it.
2786 No new tests, already covered by existing tests.
2789 * DerivedSources.cpp:
2790 * DerivedSources.make:
2791 * WebCore.vcxproj/WebCore.vcxproj:
2792 * WebCore.vcxproj/WebCore.vcxproj.filters:
2793 * WebCore.xcodeproj/project.pbxproj:
2794 * html/HTMLDataElement.cpp: Added.
2795 (WebCore::HTMLDataElement::create):
2796 (WebCore::HTMLDataElement::HTMLDataElement):
2797 * html/HTMLDataElement.h: Added.
2798 * html/HTMLDataElement.idl: Added.
2799 * html/HTMLElementsAllInOne.cpp:
2800 * html/HTMLTagNames.in:
2802 2016-01-26 Commit Queue <commit-queue@webkit.org>
2804 Unreviewed, rolling out r195610.
2805 https://bugs.webkit.org/show_bug.cgi?id=153513
2807 The test added with this change is timing out on almost every
2808 run (Requested by ryanhaddad on #webkit).
2812 "Calling video.controls=true during a scrub operation cancels
2814 https://bugs.webkit.org/show_bug.cgi?id=153494
2815 http://trac.webkit.org/changeset/195610
2817 2016-01-26 Brady Eidson <beidson@apple.com>
2819 History.pushState causes intense memory pressure.
2820 https://bugs.webkit.org/show_bug.cgi?id=153435
2822 Reviewed by Sam Weinig, Oliver Hunt, and Geoff Garen.
2824 Tests: fast/loader/stateobjects/pushstate-frequency-iframe.html
2825 fast/loader/stateobjects/pushstate-frequency-with-user-gesture.html
2826 fast/loader/stateobjects/pushstate-frequency.html
2827 fast/loader/stateobjects/replacestate-frequency-iframe.html
2828 fast/loader/stateobjects/replacestate-frequency-with-user-gesture.html
2829 fast/loader/stateobjects/replacestate-frequency.html
2830 loader/stateobjects/pushstate-size-iframe.html
2831 loader/stateobjects/pushstate-size.html
2832 loader/stateobjects/replacestate-size-iframe.html
2833 loader/stateobjects/replacestate-size.html
2835 Add restrictions on how frequently push/replaceState can be called,
2836 as well as how much of a cumulative payload they can deliver.
2838 * bindings/js/JSHistoryCustom.cpp:
2839 (WebCore::JSHistory::pushState):
2840 (WebCore::JSHistory::replaceState):
2843 (WebCore::History::stateObjectAdded):
2846 2016-01-26 Anders Carlsson <andersca@apple.com>
2848 Add a Dictionary overload that returns an Optional result
2849 https://bugs.webkit.org/show_bug.cgi?id=153507
2851 Reviewed by Tim Horton.
2853 * bindings/js/Dictionary.h:
2854 (WebCore::Dictionary::get):
2856 2016-01-26 Philip Rogers <pdr@chromium.org>
2858 Let SVG images not taint canvases except when containing foreignObjects
2859 https://bugs.webkit.org/show_bug.cgi?id=119639
2861 Reviewed by Brent Fulgham.
2863 r153876 caused SVG images to not taint canvases but the patch allowed
2864 for subimage resources. This can be a problem if a subimage (e.g., data
2865 uri image) contains a foreignObject which can violate security (e.g.,
2868 This patch updates SVGImage::hasSingleSecurityOrigin to check if the
2869 image contains any foreignObjects or images that themselves contain
2870 foreignObjects. SVG images without foreignObjects are allowed to not
2873 Canvas patterns are problematic because an animated SVG image can switch
2874 between tainting and not tainting the canvas. A FIXME has been added to
2875 solve this, and in the meantime we cause SVG images to taint patterns.
2877 Tests: svg/as-image/svg-canvas-pattern-with-link-tainted.html
2878 svg/as-image/svg-canvas-svg-with-feimage-with-link-tainted.html
2879 svg/as-image/svg-canvas-svg-with-image-with-link-tainted.html
2881 * html/canvas/CanvasPattern.cpp:
2882 (WebCore::CanvasPattern::CanvasPattern):
2883 (WebCore::CanvasPattern::~CanvasPattern):
2884 * svg/SVGFEImageElement.cpp:
2885 (WebCore::SVGFEImageElement::~SVGFEImageElement):
2886 (WebCore::SVGFEImageElement::hasSingleSecurityOrigin):
2887 (WebCore::SVGFEImageElement::clearResourceReferences):
2888 * svg/SVGFEImageElement.h:
2889 * svg/SVGImageElement.cpp:
2890 (WebCore::SVGImageElement::create):
2891 (WebCore::SVGImageElement::hasSingleSecurityOrigin):
2892 (WebCore::SVGImageElement::isSupportedAttribute):
2893 * svg/SVGImageElement.h:
2894 * svg/graphics/SVGImage.cpp:
2895 (WebCore::SVGImage::hasSingleSecurityOrigin):
2897 2016-01-26 Michael Catanzaro <mcatanzaro@igalia.com>
2899 CSSGrammar.y:1742.31-34: warning: unused value: $3
2900 https://bugs.webkit.org/show_bug.cgi?id=153462
2902 Reviewed by Alex Christensen.
2904 This warning indicates that we have a memory leak. From the bison manual:
2906 "Right-hand side symbols of a rule that explicitly triggers a syntax error via YYERROR are
2907 not discarded automatically. As a rule of thumb, destructors are invoked only when user
2908 actions cannot manage the memory."
2910 Arguably a design error, but that's how it is.
2912 * css/CSSGrammar.y.in:
2914 2016-01-26 Jer Noble <jer.noble@apple.com>
2916 Calling video.controls=true during a scrub operation cancels scrub.
2917 https://bugs.webkit.org/show_bug.cgi?id=153494
2919 Reviewed by Eric Carlson.
2921 Test: media/media-controls-drag-timeline-set-controls-property.html
2923 Verify that the video.controls attribute actually changed before tearing down and
2924 re-adding the media controls to the Shadow DOM.
2926 * Modules/mediacontrols/mediaControlsApple.js:
2927 (Controller.prototype.handleControlsChange):
2928 (Controller.prototype.hasControls):
2930 2016-01-26 Jeremy Noble <jer.noble@apple.com>
2932 [EME][Mac] Crash in [AVStreamSession addStreamDataParser:]; uncaught exception
2933 https://bugs.webkit.org/show_bug.cgi?id=153495
2935 Reviewed by Eric Carlson.
2937 When AVContentKeySession is not available, fall back to pre-AVContentKeySession behavior;
2938 namely, immediately create an AVStreamSession object in
2939 willProvideContentKeyRequestInitializationData, rather than waiting for didProvide.
2941 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2942 (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
2944 2016-01-26 Dean Jackson <dino@apple.com>
2946 [iOS] Documents without an explicit width should not get fast tapping
2947 https://bugs.webkit.org/show_bug.cgi?id=153465
2948 <rdar://problem/23962529>
2950 Reviewed by Simon Fraser (and Wenson Hseih).
2952 As the title says, documents that do not set a viewport should
2953 not get the fast click behaviour. There were complaints that we broke
2954 double-tap to scroll in ImageDocuments where the image was narrow and long.
2956 The fix is to just keep a flag that tells the UI process if the
2957 width was explicit. However, it turns out that those ImageDocuments
2958 are given an explicit device-width, which is fine for scaling but
2959 really should behave as auto for fast tapping. So we also need
2960 to tell the UIProcess if the viewport arguments came from an
2963 Test: fast/events/ios/viewport-no-width-value-allows-double-tap.html
2965 * dom/ViewportArguments.cpp:
2966 (WebCore::findSizeValue): Add a parameter that toggles a flag
2967 if the size was explicitly set.
2968 (WebCore::setViewportFeature): Remember if the width was
2970 * dom/ViewportArguments.h: Add a widthWasExplicit flag.
2971 (WebCore::ViewportArguments::operator==):
2973 2016-01-25 Dave Hyatt <hyatt@apple.com>
2975 Speculative fixes for crashing in viewportChangeAffectedPicture
2976 https://bugs.webkit.org/show_bug.cgi?id=153450
2978 Reviewed by Dean Jackson.
2980 Don't attach any conditions to the removal of a picture element from
2981 the document's HashSet. This ensures that if the condition is ever
2982 wrong for any reason, we'll still remove the picture element on
2985 Fix the media query evaluation to match the other evaluations (used by
2986 the preload scanner and HTMLImageElement). This includes using the
2987 document element's computed style instead of our own and also null
2988 checking the document element first. This is the likely cause of the
2991 * html/HTMLPictureElement.cpp:
2992 (WebCore::HTMLPictureElement::~HTMLPictureElement):
2993 (WebCore::HTMLPictureElement::didMoveToNewDocument):
2994 (WebCore::HTMLPictureElement::viewportChangeAffectedPicture):
2996 2016-01-26 Chris Dumez <cdumez@apple.com>
2998 Make sure a page is still PageCache-able after firing the 'pagehide' events
2999 https://bugs.webkit.org/show_bug.cgi?id=153449
3001 Reviewed by Andreas Kling.
3003 Make sure a page is still PageCache-able after firing the 'pagehide'
3004 events and abort if it isn't. This should improve robustness and it is
3005 easy for pagehide event handlers to do things that would make a Page no
3006 longer PageCache-able and this leads to bugs that are difficult to
3009 To achieve this, the 'pagehide' event firing logic was moved out of the
3010 CachedFrame constructor. It now happens earlier in
3011 PageCache::addIfCacheable() after checking if the page is cacheable and
3012 before constructing the CachedPage / CachedFrames. After firing the
3013 'pagehide' event in PageCache::addIfCacheable(), we check again that
3014 the page is still cacheable and we abort early if it is not.
3016 * history/CachedFrame.cpp:
3017 (WebCore::CachedFrame::CachedFrame):
3018 * history/PageCache.cpp:
3019 (WebCore::setInPageCache):
3020 (WebCore::firePageHideEventRecursively):
3021 (WebCore::PageCache::addIfCacheable):
3022 * history/PageCache.h:
3023 * loader/FrameLoader.cpp:
3024 (WebCore::FrameLoader::commitProvisionalLoad):
3026 2016-01-26 Beth Dakin <bdakin@apple.com>
3028 Rubber-stamped by Tim Horton.
3030 Add one more bit of SPI.
3031 * platform/spi/mac/NSSpellCheckerSPI.h:
3033 2016-01-26 Olivier Blin <olivier.blin@softathome.com>
3035 Fix build with ENABLE_DEVICE_ORIENTATION on non-iOS platforms
3036 https://bugs.webkit.org/show_bug.cgi?id=153490
3038 Reviewed by Michael Catanzaro.
3040 This has been broken since r178702, which changed the Page
3041 argument from a pointer to a reference in logCanCachePageDecision().
3043 No new tests since this is a build fix.
3045 * history/PageCache.cpp:
3046 (WebCore::canCachePage):
3048 2016-01-25 Ada Chan <adachan@apple.com>
3050 Move WebVideoFullscreenManager and related classes from iOS specific folders to cocoa folders
3051 https://bugs.webkit.org/show_bug.cgi?id=153473
3053 Reviewed by Eric Carlson.
3055 No new tests, just moving files.
3057 * WebCore.xcodeproj/project.pbxproj:
3058 Update due to changes to the file locations.
3059 * platform/cocoa/WebVideoFullscreenModel.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModel.h.
3060 * platform/cocoa/WebVideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.h.
3061 (WebCore::WebVideoFullscreenModelVideoElement::create):
3062 Fix a style error by moving the opening curly brace down one line.
3063 * platform/cocoa/WebVideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm.
3065 2016-01-26 Konstantin Tokarev <annulen@yandex.ru>
3067 Do not convert GlyphBufferAdvance to FloatSize
3068 https://bugs.webkit.org/show_bug.cgi?id=153429
3070 GlyphBufferAdvance is not necessaryly convertible to FloatSize.
3071 Also, this code was doing extra work by transforming height value.
3073 Reviewed by Antti Koivisto.
3075 No new tests needed.
3077 * rendering/svg/SVGTextRunRenderingContext.cpp:
3078 (WebCore::SVGGlyphToPathTranslator::extents):
3080 2016-01-22 Ada Chan <adachan@apple.com>
3082 Enable API related to the video fullscreen layer in MediaPlayerPrivateAVFoundationObjC
3083 also on Mac with video presentation mode support.
3084 https://bugs.webkit.org/show_bug.cgi?id=153222
3086 Reviewed by Eric Carlson.
3088 No new tests. Covered by existing tests.
3090 Introduce VideoFullscreenLayerManager to deal with the video layer when switching
3091 between inline and fullscreen mode. We'll reuse it in other MediaPlayerPrivateInterface
3094 Now that MediaPlayerPrivateAVFoundationObjC's platform layer can be a WebVideoContainerLayer,
3095 this exposes a bug in PlatformCALayerCocoa::clone() where we assumed the platform layer
3096 is always an AVPlayerLayer if the PlatformCALayer's layer type is LayerTypeAVPlayerLayer.
3097 Add a helper method to get an AVPlayerLayer from a PlatformCALayerCocoa (which also handles
3098 WebVideoContainerLayer case) and use it in PlatformCALayerCocoa::clone().
3100 * WebCore.xcodeproj/project.pbxproj:
3101 Add VideoFullscreenLayerManager to the project.
3103 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3104 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3105 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
3106 Create m_videoFullscreenLayerManager. The video inline layer, video fullscreen layer,
3107 and the video fullscreen frame are now managed by that class.
3108 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
3109 Just call VideoFullscreenLayerManager::setVideoLayer() to handle adding the video
3110 layer in either the inline or fullscreen layer.
3111 (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
3112 Call VideoFullscreenLayerManager::didDestroyVideoLayer().
3113 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
3114 Get the video inline layer from VideoFullscreenLayerManager.
3115 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
3116 Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
3117 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
3118 Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
3119 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
3120 Guard the iOS specific code properly.
3121 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
3122 Get the video fullscreen layer from VideoFullscreenLayerManager.
3123 (WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation):
3125 (WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
3126 Get the video fullscreen layer and video fullscreen frame from VideoFullscreenLayerManager.
3127 (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation):
3128 Get the video fullscreen layer from VideoFullscreenLayerManager.
3130 * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h: Added.
3131 (WebCore::VideoFullscreenLayerManager::videoInlineLayer):
3132 (WebCore::VideoFullscreenLayerManager::videoFullscreenLayer):
3133 (WebCore::VideoFullscreenLayerManager::videoFullscreenFrame):
3134 * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: Added.
3135 (-[WebVideoContainerLayer setBounds:]):
3136 (-[WebVideoContainerLayer setPosition:]):
3137 WebVideoContainerLayer was moved from MediaPlayerPrivateAVFoundationObjC.mm.
3138 (WebCore::VideoFullscreenLayerManager::create):
3139 (WebCore::VideoFullscreenLayerManager::VideoFullscreenLayerManager):
3140 (WebCore::VideoFullscreenLayerManager::setVideoLayer):
3141 Code moved from MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer().
3142 (WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):
3143 Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer().
3144 (WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame):
3145 Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame().
3146 (WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer):
3147 Code moved from MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer().
3149 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
3150 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
3151 (PlatformCALayerCocoa::clone):
3152 Use the new PlatformCALayerCocoa::avPlayerLayer() method to get the AVPlayerLayer from both the
3153 destination and source PlatformCALayers.
3154 (PlatformCALayerCocoa::avPlayerLayer):
3155 Return nil if the layer type is not LayerTypeAVPlayerLayer. Otherwise, return the
3156 platform layer if it is indeed an AVPlayerLayer. If not, it should be a WebVideoContainerLayer
3157 and we should return its sublayer which should be an AVPlayerLayer.
3159 2016-01-26 Chris Dumez <cdumez@apple.com>
3161 First parameter to window.showModalDialog() should be mandatory
3162 https://bugs.webkit.org/show_bug.cgi?id=153436
3164 Reviewed by Youenn Fablet.
3166 Make window.showModalDialog()'s first parameter mandatory to match the
3167 last specification containing it:
3168 http://dev.w3.org/html5/spec-preview/user-prompts.html#dialogs-implemented-using-separate-documents
3170 The new behavior also matches Firefox, while Chrome no longer supports
3173 With this change, the W3C HTML test suite no longer hangs in the middle
3174 because it mistakenly pops up a modal dialog during testing.
3176 Test: fast/dom/Window/showModalDialog-mandatory-parameter.html
3178 * bindings/js/JSDOMWindowCustom.cpp:
3179 (WebCore::JSDOMWindow::showModalDialog):
3181 2016-01-26 Eric Carlson <eric.carlson@apple.com>
3183 LayoutTest media/airplay-target-availability.html is flaky
3184 https://bugs.webkit.org/show_bug.cgi?id=153100
3185 <rdar://problem/24346796>
3187 Reviewed by Daniel Bates.
3189 No new tests, media/airplay-target-availability.html was updated
3191 * Modules/mediasession/WebMediaSessionManager.cpp:
3192 (WebCore::WebMediaSessionManager::clientStateDidChange): Schedule a configuration scan if
3193 any of the config flags have changed.
3194 (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Update logging.
3196 2016-01-25 Carlos Garcia Campos <cgarcia@igalia.com>
3198 Main frame scrollbars not updated on hovering when using overlay scrollbars
3199 https://bugs.webkit.org/show_bug.cgi?id=153304
3201 Reviewed by Michael Catanzaro.
3203 Legacy scrollbars were fixed in r194155, but overlay scrollbars
3204 are not notified when they are hovered. This is because the layer
3205 hit test in RenderView::hitTest always returns true when using
3206 overlay scrollbars and we are returning early in such case,
3207 ignoring the HitTestRequest::AllowFrameScrollbars flag. So, in
3208 case of using overlay scrollbars we still need to check the
3209 RenderView scrollbars even when the layer hit test succeeded.
3211 * rendering/RenderView.cpp:
3212 (WebCore::RenderView::hitTest):
3214 2016-01-26 Daniel Bates <dabates@apple.com>
3216 LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html crashing
3217 https://bugs.webkit.org/show_bug.cgi?id=153250
3218 <rdar://problem/12172843>
3220 <rdar://problem/24248040>
3222 Reviewed by Alexey Proskuryakov.
3224 Remove an incorrect assertion that the absolute URL associated with a protection space cannot
3225 contain consecutive forward slash (/) characters. A URL can contain consecutive forward slashes.
3226 This also makes the invariants for CredentialStorage::findDefaultProtectionSpaceForURL() symmetric
3227 with the invariants for WebCore::protectionSpaceMapKeyFromURL().
3229 Tests: http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
3230 http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
3232 * platform/network/CredentialStorage.cpp:
3233 (WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
3235 2016-01-26 Daniel Bates <dabates@apple.com>
3237 Remove XMLHttpRequestException
3238 https://bugs.webkit.org/show_bug.cgi?id=102698
3239 <rdar://problem/24338476>
3241 Reviewed by Chris Dumez.
3243 Inspired by a patch by Erik Arvidsson.
3245 As per <https://xhr.spec.whatwg.org> (21 January 2016) and <https://html.spec.whatwg.org/multipage/workers.html#dom-workerglobalscope-importscripts> (25 January 2016)
3246 XMLHttpRequest and WorkerGlobalScope.importScripts() should throw a DOMException object instead
3247 of a XMLHttpRequestException object when a NetworkError, AbortError, or TimeoutError occur. This
3248 makes the behavior of WebKit more closely conform to these standards as well as the behavior of
3251 * CMakeLists.txt: Remove entries for XMLHttpRequestException.idl and XMLHttpRequestException.cpp.
3252 * DerivedSources.make: Remove entry for XMLHttpRequestException.idl.
3253 * WebCore.order: Remove exported symbols for XMLHttpRequestException.
3254 * WebCore.vcxproj/WebCore.vcxproj: Remove entries for JSXMLHttpRequestException.{cpp, h}, XMLHttpRequestException.{cpp, h}
3255 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3256 * WebCore.xcodeproj/project.pbxproj: Ditto.
3257 * bindings/js/JSExceptionBase.cpp:
3258 (WebCore::toExceptionBase): Remove logic for XMLHttpRequestException.
3259 * dom/DOMExceptions.in: Remove entry for XMLHttpRequestException.
3260 * workers/WorkerGlobalScope.cpp:
3261 (WebCore::WorkerGlobalScope::importScripts): Throw DOMException.NETWORK_ERR instead of XMLHttpRequestException.NETWORK_ERR.
3262 * xml/XMLHttpRequest.cpp:
3263 (WebCore::XMLHttpRequest::createRequest): Ditto.
3264 (WebCore::XMLHttpRequest::didFail): Throw DOMException.ABORT_ERR instead of XMLHttpRequestException.ABORT_ERR.
3265 (WebCore::XMLHttpRequest::didReachTimeout): Throw DOMException.TIMEOUT_ERR instead of XMLHttpRequestException.TIMEOUT_ERR.
3266 * xml/XMLHttpRequestException.cpp: Removed.
3267 * xml/XMLHttpRequestException.h: Removed.
3268 * xml/XMLHttpRequestException.idl: Removed.
3270 2016-01-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
3272 WebCoreJSBuiltins do not use to do conditional include
3273 https://bugs.webkit.org/show_bug.cgi?id=153306
3275 Reviewed by Alex Christensen.
3277 Removing compilation guards as builtin generator adds them in the files themselves.
3278 Fixing MediaDevices.js to generate MEDIA_STREAM compilation guard.
3280 No change in behavior.
3282 * Modules/mediastream/MediaDevices.js: Changing @optional to @conditional.
3283 * Modules/mediastream/NavigatorUserMedia.js: Making it @conditional.
3284 * bindings/js/WebCoreJSBuiltins.cpp:
3285 * bindings/js/WebCoreJSBuiltins.h:
3287 2016-01-25 Alex Christensen <achristensen@webkit.org>
3289 Fix internal Windows build
3290 https://bugs.webkit.org/show_bug.cgi?id=153469
3292 Reviewed by Brent Fulgham.
3295 Pass the GPERF_EXECUTABLE that we found to perl scripts so they can use it instead of just calling gperf.
3296 This is needed for builds where gperf is not in the PATH.
3297 * DerivedSources.make:
3298 Pass "gperf" as the gperf command to retain existing functionality on mac.
3299 * bindings/scripts/preprocess-idls.pl:
3300 (CygwinPathIfNeeded):
3301 * bindings/scripts/preprocessor.pm:
3302 (applyPreprocessor):
3303 Add /cygdrive/c/cygwin/bin to the PATH before calling cygpath.
3304 This is needed for builds where we are using cygwin, but C:/cygwin/bin is not in the PATH.
3305 * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
3306 * css/makeSelectorPseudoElementsMap.py:
3308 * platform/network/create-http-header-name-table:
3309 Use the gperf executable passed in as a command line parameter if it is given.
3311 2016-01-25 Simon Fraser <simon.fraser@apple.com>
3313 DisplayList items can log paths now
3314 https://bugs.webkit.org/show_bug.cgi?id=153417
3316 Reviewed by Zalan Bujtas.
3318 Now that Path supports TextStream logging, clean up its output a little and
3319 enable dumping of Paths in DisplayListItems.
3321 * platform/graphics/Path.cpp:
3322 (WebCore::operator<<):
3323 * platform/graphics/displaylists/DisplayListItems.cpp:
3324 (WebCore::DisplayList::operator<<):
3326 2016-01-25 Antti Koivisto <antti@apple.com>
3330 * rendering/style/RenderStyle.h:
3332 2016-01-25 Enrica Casucci <enrica@apple.com>
3334 Add support for DataDetectors in WK (iOS).
3335 https://bugs.webkit.org/show_bug.cgi?id=152989
3336 rdar://problem/22855960
3338 Reviewed by Tim Horton.
3340 Adding new helper functions for data detection related tasks.
3341 The patch also fixes a bug when creating DOM ranges from DDQueryRange
3342 spanning multiple fragments.
3344 * editing/cocoa/DataDetection.h:
3345 * editing/cocoa/DataDetection.mm:
3346 (WebCore::DataDetection::isDataDetectorLink):
3347 (WebCore::DataDetection::dataDetectorIdentifier):
3348 (WebCore::detectItemAtPositionWithRange):
3349 (WebCore::DataDetection::detectItemAroundHitTestResult):
3350 (WebCore::resultIsURL):
3351 (WebCore::removeResultLinksFromAnchor):
3352 (WebCore::searchForLinkRemovingExistingDDLinks):
3353 (WebCore::DataDetection::detectContentInRange):
3355 2016-01-25 Myles C. Maxfield <mmaxfield@apple.com>
3357 Remove broken cache from CSSFontFaceSource
3358 https://bugs.webkit.org/show_bug.cgi?id=153440
3360 Reviewed by Simon Fraser.
3362 This cache has been broken since 2013 (r158085). Given we didn't notice a perf
3363 hit when it broke, and the fact it's been broken for years, it clearly isn't
3366 https://bugs.webkit.org/show_bug.cgi?id=153414 consists of a fairly invasive
3367 change to CSSFontFaceSource; this patch includes a working version of this
3368 cache, along with an easy way to enable/disable it (to measure possible perf
3371 This patch is a short-term cleanup patch in the mean time until the above
3372 invasive change gets landed.
3374 No new tests because there is no behavior (or performance!) change.
3376 * css/CSSFontFaceSource.cpp:
3377 (WebCore::CSSFontFaceSource::font):
3378 (WebCore::CSSFontFaceSource::~CSSFontFaceSource): Deleted.
3379 (WebCore::CSSFontFaceSource::pruneTable): Deleted.
3380 (WebCore::CSSFontFaceSource::fontLoaded): Deleted.
3381 * css/CSSFontFaceSource.h:
3383 2016-01-25 Sam Weinig <sam@webkit.org>
3385 Try to fix the simulator build.
3387 * platform/spi/cocoa/DataDetectorsCoreSPI.h:
3389 2016-01-25 Sam Weinig <sam@webkit.org>
3391 Roll back in r195559 with a build fix.
3393 * WebCore.xcodeproj/project.pbxproj:
3394 * editing/cocoa/DataDetection.mm:
3395 * platform/cocoa/DataDetectorsCoreSoftLink.mm: Added.
3396 * platform/cocoa/DataDetectorsCoreSoftLink.h: Added.
3397 * platform/spi/cocoa/DataDetectorsCoreSPI.h:
3399 2016-01-25 Commit Queue <commit-queue@webkit.org>
3401 Unreviewed, rolling out r195559.
3402 https://bugs.webkit.org/show_bug.cgi?id=153458
3404 This change broke the iOS build (Requested by ryanhaddad on
3409 "Fix the ASAN build."
3410 http://trac.webkit.org/changeset/195559
3412 2016-01-25 Antti Koivisto <antti@apple.com>
3414 Resolving direction and writing mode properties should not mutate document
3415 https://bugs.webkit.org/show_bug.cgi?id=153446
3417 Reviewed by Andreas Kling.
3419 Replace directionSetOnDocumentElement/writingModeSetOnDocumentElement document flags them with style flags.
3421 * css/StyleBuilderCustom.h:
3422 (WebCore::StyleBuilderCustom::applyValueDirection):
3423 (WebCore::StyleBuilderCustom::resetEffectiveZoom):
3424 (WebCore::StyleBuilderCustom::applyValueWebkitWritingMode):
3425 (WebCore::StyleBuilderCustom::applyValueWebkitTextOrientation):
3426 * css/StyleResolver.cpp:
3427 (WebCore::StyleResolver::styleForElement):
3429 (WebCore::Document::Document):
3431 (WebCore::Document::markers):
3432 (WebCore::Document::directionSetOnDocumentElement): Deleted.
3433 (WebCore::Document::writingModeSetOnDocumentElement): Deleted.
3434 (WebCore::Document::setDirectionSetOnDocumentElement): Deleted.