1 2015-04-29 Martin Robinson <mrobinson@igalia.com>
3 [GTK] Add support for automatic hyphenation
4 https://bugs.webkit.org/show_bug.cgi?id=44478
6 Reviewed by Carlos Garcia Campos.
8 No new tests. This patch unskips and updates results for existing hyphenation tests.
10 * PlatformGTK.cmake: Add the libhypen implementation to the source list.
11 * platform/gtk/GtkUtilities.cpp:
12 (WebCore::topLevelPath): Add this helper function taken from the test harness.
13 (WebCore::getWebKitBuildDirectory): Ditto.
14 * platform/gtk/GtkUtilities.h: Add function declarations for the helper functions.
15 * platform/text/Hyphenation.cpp: Surround this implementation with !USE(LIBHYPHEN),
16 so that it can still be shared.
17 * platform/text/gtk/HyphenationLibHyphen.cpp: Added.
18 (WebCore::extractLocaleFromDictionaryFilePath): Take in a dictionary filename and
19 determine the locale that it covers.
20 (WebCore::scanDirectoryForDicionaries): Look for all installed dictionaries as well
21 as ones in the JHBuild root for testing.
22 (WebCore::scanTestDictionariesDirectoryIfNecessary): Try to scan the dictionaries installed
24 (WebCore::availableLocales): Getter for global hash of installed dictionaries.
25 (WebCore::canHyphenate): Added libhyphen implementation.
26 (WebCore::HyphenationDictionary): Helper class that properly manages the memory of
27 an open libhyphen dictionary. This is useful so that they can be stored in an MRU
28 cache. This is a similar approach to the CoreFoundation implementation.
29 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): MRU cache
31 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Ditto.
32 (WebCore::hyphenDictionaryCache): A cache for opened hyphenation dictionaries.
33 (WebCore::countLeadingSpaces): Count leading spaces, since WebCore often passes words with them.
34 (WebCore::lastHyphenLocation): Added libhyphen implementation.
36 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
40 * platform/graphics/mac/FontCacheMac.mm:
41 (WebCore::fontWithFamily):
43 2015-04-29 Eric Carlson <eric.carlson@apple.com>
45 Some media tests assert after r183096
46 https://bugs.webkit.org/show_bug.cgi?id=144098
48 Reviewed by Brent Fulgham.
50 Never assert when a MediaPlaybackTargetClient client calls one of the methods on Document
51 after it has been unregistered. A media element unregisters itself when it is removed from the
52 document, but scripts can still run and modify state that results in a call to
53 playbackTargetPickerClientStateDidChange. Remove the asserts instead of adding checks to
54 the various call sites.
57 (WebCore::Document::showPlaybackTargetPicker): Don't assert if the client has already
59 (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
61 2015-04-29 Zalan Bujtas <zalan@apple.com>
63 Simple line layout: Web process spins endlessly below layoutSimpleLines.
64 https://bugs.webkit.org/show_bug.cgi?id=144403
65 rdar://problem/20742783
67 Reviewed by Antti Koivisto.
69 When a text fragment overlaps multiple renderes and it does not fit the current line,
70 we revert the text fragment iterator position so that the overlapping content
71 gets processed again for the next line.
72 However, TextFragmentIterator::revertToFragment() was reverting too much and
73 we started processing old content all over again -> infinite loop.
75 This patch ensures that text fragment iterator is reverted to the right position.
77 Test: fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html
79 * rendering/SimpleLineLayout.cpp:
80 (WebCore::SimpleLineLayout::createLineRuns):
81 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
82 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToEndOfFragment):
83 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment): Deleted.
84 * rendering/SimpleLineLayoutTextFragmentIterator.h:
86 2015-04-29 Filip Pizlo <fpizlo@apple.com>
88 JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
89 https://bugs.webkit.org/show_bug.cgi?id=144397
91 Reviewed by Andreas Kling.
93 If you override getCallData() and you want to be called a "function", then you need to use the
94 new TypeOfShouldCallGetCallData flag.
96 * bindings/scripts/CodeGeneratorJS.pm:
98 * bridge/objc/objc_runtime.h:
99 * bridge/runtime_method.h:
100 * bridge/runtime_object.h:
102 2015-04-29 Commit Queue <commit-queue@webkit.org>
104 Unreviewed, rolling out r183553 and r183561.
105 https://bugs.webkit.org/show_bug.cgi?id=144406
107 broke the iOS build (Requested by thorton__ on #webkit).
111 "Switch QuickLook soft-linking to use
112 QuickLookSoftLink.{h,mm}"
113 https://bugs.webkit.org/show_bug.cgi?id=144362
114 http://trac.webkit.org/changeset/183553
116 "Unreviewed iOS build fix after r183553: fix declaration of
118 http://trac.webkit.org/changeset/183561
120 2015-04-29 Antti Koivisto <antti@apple.com>
122 ResourceLoadPriority should be enum class
123 https://bugs.webkit.org/show_bug.cgi?id=144326
125 Reviewed by Darin Adler.
127 * html/HTMLLinkElement.cpp:
128 (WebCore::HTMLLinkElement::process):
129 * loader/LinkLoader.cpp:
130 (WebCore::LinkLoader::loadLink):
131 * loader/ResourceLoadScheduler.cpp:
132 (WebCore::ResourceLoadScheduler::scheduleLoad):
133 (WebCore::ResourceLoadScheduler::servePendingRequests):
134 (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
135 (WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex):
136 (WebCore::ResourceLoadScheduler::HostInformation::schedule):
137 (WebCore::ResourceLoadScheduler::HostInformation::remove):
138 (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
139 (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
140 * loader/ResourceLoadScheduler.h:
141 (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
143 Modernize ResourceLoadScheduler code a bit while switching to enum class.
145 * loader/cache/CachedResource.cpp:
146 (WebCore::defaultPriorityForResourceType):
147 * loader/cache/CachedResourceLoader.cpp:
148 (WebCore::CachedResourceLoader::requestResource):
149 * loader/icon/IconLoader.cpp:
150 (WebCore::IconLoader::startLoading):
151 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
152 (WebCore::WebCoreAVFResourceLoader::startLoading):
153 * platform/network/ResourceLoadPriority.h:
154 (WebCore::operator++):
155 (WebCore::operator--):
156 * platform/network/ResourceRequestBase.cpp:
157 (WebCore::ResourceRequestBase::adopt):
158 (WebCore::ResourceRequestBase::copyData):
159 (WebCore::ResourceRequestBase::cachePolicy):
160 (WebCore::ResourceRequestBase::priority):
161 (WebCore::ResourceRequestBase::setPriority):
162 * platform/network/ResourceRequestBase.h:
164 Remove bitfields. ResourceRequests are not present in large enough numbers to require this kind of optimization.
165 Use modern initialization syntax.
167 (WebCore::ResourceRequestBase::ResourceRequestBase):
168 (WebCore::CrossThreadResourceRequestDataBase::CrossThreadResourceRequestDataBase): Deleted.
169 * platform/network/cf/ResourceRequestCFNet.cpp:
170 (WebCore::initializeMaximumHTTPConnectionCountPerHost):
171 (WebCore::initializeHTTPConnectionSettingsOnStartup):
172 * platform/network/cf/ResourceRequestCFNet.h:
173 (WebCore::toResourceLoadPriority):
174 (WebCore::toPlatformRequestPriority):
175 * platform/network/soup/ResourceRequest.h:
176 (WebCore::toSoupMessagePriority):
177 * testing/Internals.cpp:
178 (WebCore::stringToResourceLoadPriority):
180 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
182 [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
183 https://bugs.webkit.org/show_bug.cgi?id=132159
185 Reviewed by Darin Adler.
187 On platforms that support it, delegate font selection logic to the platform. Currently, this is
188 only supported on Mac, using CTFontCreateForCSS().
190 This also changes the mechanism that enforces our font whitelist in our tests. We used to
191 swizzle the implementations of NSFontManager methods. This patch migrates to using a whitelist of
192 font family names instead.
194 Note that this patch is a work in progress, because it makes the following tests fail:
195 fast/css/font-weight-1.html
196 fast/forms/validation-message-appearance.html
197 fast/forms/select/optgroup-rendering.html
199 No new tests, because there is no behavior change.
201 * platform/graphics/FontCache.h: Add a function to set the whitlist.
202 * platform/graphics/mac/FontCacheMac.mm:
203 (WebCore::fontWhitelist):
204 (WebCore::FontCache::setFontWhitelist):
205 (WebCore::toAppKitFontWeight):
206 (WebCore::toCoreTextFontWeight):
207 (WebCore::fontWithFamily): If ENABLE(PLATFORM_FONT_LOOKUP), use CTFontCreateForCSS().
208 (WebCore::FontCache::createFontPlatformData):
209 * platform/spi/cocoa/CoreTextSPI.h: Add signature for CTFontCreateForCSS().
211 2015-04-29 Jer Noble <jer.noble@apple.com>
213 Unreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme
215 * platform/ios/QuickLookSoftLink.mm:
217 2015-04-29 Eric Carlson <eric.carlson@apple.com>
219 [Mac] Use new device picker menu API
220 https://bugs.webkit.org/show_bug.cgi?id=144392
222 Reviewed by Jer Noble.
224 * Modules/mediasession/WebMediaSessionManager.cpp:
225 (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Pass the route state to the picker.
226 * platform/graphics/MediaPlaybackTargetPicker.h:
228 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
229 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
230 (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac): m_deviceChangeTimer -> m_pendingActionTimer.
231 (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Ditto.
232 (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Renamed from
233 outputeDeviceAvailabilityChangedTimerFired.
234 (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Use addPendingAction.
235 (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Call new picker API if it is
236 available. New API returns true if a target is chosen, so call currentDeviceDidChange in that case.
237 (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): New.
238 (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Make asynchronous because it
239 can now be called from showPlaybackTargetPicker.
240 (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired): Renamed
241 pendingActionTimerFired.
243 * platform/spi/cocoa/AVKitSPI.h: Add new SPI.
245 2015-04-29 Antti Koivisto <antti@apple.com>
247 Main resource loaded via 304 response becomes empty if reloaded by user
248 https://bugs.webkit.org/show_bug.cgi?id=144386
250 Reviewed by Darin Adler.
252 Memory cache layer may make a main resource request conditional (add If-modified-since/If-none-match header).
253 DocumentLoader stores the final ResourceRequest associated with document. If user triggered reload for
254 conditionally loaded document DocumentLoader would include the same conditionals to the new request as well.
255 Since these were not added by the memory cache it would pass any 304 response back to the DocumentLoader.
256 However DocumentLoader has no code to handle 304 so we would end up with an empty document.
258 Test: http/tests/cache/main-resource-304-reload.html
260 * loader/DocumentLoader.cpp:
261 (WebCore::DocumentLoader::startLoadingMainResource):
263 Ensure DocumentLoader doesn't issue conditional requests.
265 2015-04-28 Jer Noble <jer.noble@apple.com>
267 Replace HTMLMediaElement's seek timer with a task queue.
268 https://bugs.webkit.org/show_bug.cgi?id=144353
270 Reviewed by Eric Carlson.
272 No change in functionality, so no new tests added.
274 Replace a zero-length timer with an explicit task queue, backed by Document's postTask(). To
275 make enqueued tasks cancellable, add a new GenericTaskQueue class modelled on
276 GenericEventQueue which can cancel enqueued but not-yet-executed tasks.
279 * WebCore.vcxproj/WebCore.vcxproj:
280 * WebCore.vcxproj/WebCore.vcxproj.filters:
281 * WebCore.xcodeproj/project.pbxproj:
282 * dom/GenericTaskQueue.cpp: Added.
283 (WebCore::GenericTaskQueue::GenericTaskQueue): Initialize ivars.
284 (WebCore::GenericTaskQueue::enqueueTask): Wrap the task and pass it to the ScriptExecutionContext.
285 (WebCore::GenericTaskQueue::close): Assert that the task queue will not accept any additional tasks.
286 (WebCore::GenericTaskQueue::cancelAllTasks): Revoke outstanding weak pointers, thereby cancelling tasks.
287 * dom/GenericTaskQueue.h: Added.
288 (WebCore::GenericTaskQueue::hasPendingTasks):
289 * html/HTMLMediaElement.cpp:
290 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the task queue.
291 (WebCore::HTMLMediaElement::~HTMLMediaElement): Close the task queue.
292 (WebCore::HTMLMediaElement::seekWithTolerance): Post a task, rather than start a timer.
293 (WebCore::HTMLMediaElement::seekTask): Renamed from seekTimerFired().
294 (WebCore::HTMLMediaElement::seekTimerFired): Deleted.
295 * html/HTMLMediaElement.h:
297 2015-04-28 David Kilzer <ddkilzer@apple.com>
299 Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
300 <http://webkit.org/b/144362>
302 Reviewed by Andy Estes.
304 This patch switches soft-linking of QuickLook.framework to
305 QuickLookSoftLink.{h,mm} so that we stop exporting unintended
308 No new tests since no change in behavior.
310 * WebCore.xcodeproj/project.pbxproj:
311 - Add QuickLookSoftLinking.{h,mm} to the project.
313 * platform/ios/QuickLookSoftLink.h: Added.
314 * platform/ios/QuickLookSoftLink.mm: Added.
315 * platform/mac/SoftLinking.h:
316 (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
317 (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
319 * platform/network/ios/QuickLook.h:
320 - Remove unused declarations.
322 * platform/network/ios/QuickLook.mm:
323 (WebCore::QLPreviewConverterClass): Deleted.
324 (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
325 (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
326 (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
327 - Remove SOFT_LINK macros and unused methods after switching to
328 new QuickLookSoftLink.{h,mm}.
329 (WebCore::QLPreviewGetSupportedMIMETypesSet):
330 - Switch to use NeverDestroyed<>.
331 (WebCore::registerQLPreviewConverterIfNeeded):
332 (createQLPreviewProtocol):
333 (WebCore::QLPreviewProtocol):
334 (WebCore::QuickLookHandle::QuickLookHandle):
335 (WebCore::QuickLookHandle::create):
336 (WebCore::QuickLookHandle::shouldCreateForMIMEType):
337 - Simplify code when using QuickLookSoftLink.h.
339 * platform/network/ios/WebCoreURLResponseIOS.mm:
340 - Include QuickLookSoftLink.h header.
342 2015-04-29 Darin Adler <darin@apple.com>
344 [ES6] Implement Unicode code point escapes
345 https://bugs.webkit.org/show_bug.cgi?id=144377
347 Reviewed by Antti Koivisto.
349 Test: js/unicode-escape-sequences.html
352 (WebCore::CSSParser::parseEscape): Use ICU's UCHAR_MAX_VALUE instead of writing
353 out 0x10FFFF; clearer this way. Also use our replacementCharacter instead of
356 * html/parser/HTMLEntityParser.cpp:
357 (WebCore::isAlphaNumeric): Deleted.
358 (WebCore::HTMLEntityParser::legalEntityFor): Use ICU's UCHAR_MAX_VALUE and
359 U_IS_SURROGATE instead of writing the code out. Didn't use U_IS_UNICODE_CHAR
360 because that also includes U_IS_UNICODE_NONCHAR and thus would change behavior,
361 but maye it's something we want to do in the future.
362 (WebCore::HTMLEntityParser::consumeNamedEntity): Use isASCIIAlphanumeric instead
363 of a the function in this file that does the same thing less efficiently.
365 * html/parser/InputStreamPreprocessor.h:
366 (WebCore::InputStreamPreprocessor::processNextInputCharacter): Use
367 replacementCharacter from CharacterNames.h instead of writing out 0xFFFd.
369 * xml/parser/CharacterReferenceParserInlines.h:
370 (WebCore::consumeCharacterReference): Use ICU's UCHAR_MAX_VALUE instead of
371 defining our own local highestValidCharacter constant.
373 2015-04-29 Martin Robinson <mrobinson@igalia.com>
375 [CMake] [GTK] Organize and clean up unused CMake variables
376 https://bugs.webkit.org/show_bug.cgi?id=144364
378 Reviewed by Gyuyoung Kim.
380 * PlatformGTK.cmake: Add variables specific to this project.
382 2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
384 REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
385 https://bugs.webkit.org/show_bug.cgi?id=144388
387 Reviewed by Brady Eidson.
389 There used to be a method in ContextMenuItem to check if share
390 menu item was supported or not, but since r182573, there's a
391 method to get the share menu item. If the returned menu item is
392 null, it's not added to the menu, but we are not returning a null
393 ContextMenu item even though we don't support share menu item.
395 * platform/gtk/ContextMenuItemGtk.cpp:
396 (WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.
398 2015-04-29 Zan Dobersek <zdobersek@igalia.com>
400 Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
401 https://bugs.webkit.org/show_bug.cgi?id=144232
403 Reviewed by Darin Adler.
405 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
406 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
407 Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.
409 2015-04-29 Hyungwook Lee <hyungwook.lee@navercorp.com>
411 Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
412 https://bugs.webkit.org/show_bug.cgi?id=140261
414 Reviewed by Darin Adler.
416 We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
417 because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.
419 * rendering/RenderView.cpp:
420 (WebCore::isValidObjectForNewSelection):
421 (WebCore::RenderView::clearSubtreeSelection):
422 (WebCore::RenderView::applySubtreeSelection):
424 2015-04-29 Youenn Fablet <youenn.fablet@crf.canon.fr>
426 Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
427 https://bugs.webkit.org/show_bug.cgi?id=143711
429 Reviewed by Darin Adler.
431 This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
432 If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
433 This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
435 Test: http/tests/appcache/simple-video-sync.html
437 * html/HTMLMediaElement.cpp:
438 (WebCore::HTMLMediaElement::parseAttribute):
439 * loader/DocumentThreadableLoader.cpp:
440 (WebCore::DocumentThreadableLoader::loadRequest):
441 * loader/FrameLoader.cpp:
442 (WebCore::FrameLoader::loadResourceSynchronously):
443 * loader/FrameLoader.h:
444 * loader/appcache/ApplicationCacheHost.cpp:
445 (WebCore::ApplicationCacheHost::maybeLoadResource):
446 (WebCore::ApplicationCacheHost::createFileURL):
447 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
448 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
449 * loader/appcache/ApplicationCacheHost.h:
450 * xml/XSLTProcessorLibxslt.cpp:
451 (WebCore::docLoaderFunc):
452 * xml/parser/XMLDocumentParserLibxml2.cpp:
455 2015-04-29 Gyuyoung Kim <gyuyoung.kim@webkit.org>
457 Purge PassRefPtr from createSVGPathSegFoo factory functions
458 https://bugs.webkit.org/show_bug.cgi?id=144374
460 Reviewed by Darin Adler.
462 Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
463 those factory functions can't return null. Additionally let's remove unnecessary
464 #include<PassRefPtr.h> there.
466 No new tests, no behavior changes.
469 (WebCore::SVGColor::cloneForCSSOM):
472 (WebCore::GlyphMapNode::create):
474 (WebCore::SVGPaint::cloneForCSSOM):
476 * svg/SVGPathElement.cpp:
477 (WebCore::SVGPathElement::createSVGPathSegClosePath):
478 (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
479 (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
480 (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
481 (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
482 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
483 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
484 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
485 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
486 (WebCore::SVGPathElement::createSVGPathSegArcAbs):
487 (WebCore::SVGPathElement::createSVGPathSegArcRel):
488 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
489 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
490 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
491 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
492 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
493 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
494 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
495 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
496 * svg/SVGPathElement.h:
497 * svg/SVGPathSegArcAbs.h:
498 (WebCore::SVGPathSegArcAbs::create):
499 * svg/SVGPathSegArcRel.h:
500 (WebCore::SVGPathSegArcRel::create):
501 * svg/SVGPathSegClosePath.h:
502 (WebCore::SVGPathSegClosePath::create):
503 * svg/SVGPathSegCurvetoCubicAbs.h:
504 (WebCore::SVGPathSegCurvetoCubicAbs::create):
505 * svg/SVGPathSegCurvetoCubicRel.h:
506 (WebCore::SVGPathSegCurvetoCubicRel::create):
507 * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
508 (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
509 * svg/SVGPathSegCurvetoCubicSmoothRel.h:
510 (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
511 * svg/SVGPathSegCurvetoQuadraticAbs.h:
512 (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
513 * svg/SVGPathSegCurvetoQuadraticRel.h:
514 (WebCore::SVGPathSegCurvetoQuadraticRel::create):
515 * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
516 (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
517 * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
518 (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
519 * svg/SVGPathSegLinetoAbs.h:
520 (WebCore::SVGPathSegLinetoAbs::create):
521 * svg/SVGPathSegLinetoHorizontalAbs.h:
522 (WebCore::SVGPathSegLinetoHorizontalAbs::create):
523 * svg/SVGPathSegLinetoHorizontalRel.h:
524 (WebCore::SVGPathSegLinetoHorizontalRel::create):
525 * svg/SVGPathSegLinetoRel.h:
526 (WebCore::SVGPathSegLinetoRel::create):
527 * svg/SVGPathSegLinetoVerticalAbs.h:
528 (WebCore::SVGPathSegLinetoVerticalAbs::create):
529 * svg/SVGPathSegLinetoVerticalRel.h:
530 (WebCore::SVGPathSegLinetoVerticalRel::create):
531 * svg/SVGPathSegMovetoAbs.h:
532 (WebCore::SVGPathSegMovetoAbs::create):
533 * svg/SVGPathSegMovetoRel.h:
534 (WebCore::SVGPathSegMovetoRel::create):
536 (WebCore::SVGViewSpec::create):
537 * svg/animation/SMILTimeContainer.h:
538 (WebCore::SMILTimeContainer::create):
539 * svg/animation/SVGSMILElement.cpp:
540 (WebCore::ConditionEventListener::create):
541 * svg/graphics/SVGImage.h:
542 * svg/graphics/SVGImageForContainer.h:
543 * svg/graphics/filters/SVGFilter.cpp:
544 (WebCore::SVGFilter::create):
545 * svg/graphics/filters/SVGFilter.h:
547 2015-04-28 Simon Fraser <simon.fraser@apple.com>
549 Make a non-static version of FrameView::yPositionForRootContentLayer()
550 https://bugs.webkit.org/show_bug.cgi?id=144375
552 Reviewed by Andy Estes.
554 There were two calls to the static FrameView::yPositionForRootContentLayer()
555 which passed in all the arguments for the same FrameView. Make a member
556 function for convenience.
558 * page/FrameView.cpp:
559 (WebCore::FrameView::yPositionForRootContentLayer):
561 * rendering/RenderLayerCompositor.cpp:
562 (WebCore::RenderLayerCompositor::updateRootLayerPosition):
564 2015-04-28 Ryuan Choi <ryuan.choi@navercorp.com>
566 [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
567 https://bugs.webkit.org/show_bug.cgi?id=143001
569 Reviewed by Gyuyoung Kim.
571 TiledBackingStore has only been used by Coordinated Graphics since Qt and WebKit1/Efl were dropped.
572 So, this patch replaces USE(TILED_BACKING_STORE) with USE(COORDINATED_GRAPHICS) to merge the features.
574 In addition, this moves TiledBackingStore and related files from platform to platform/texmap/coordinated
575 where other coordinated graphics files are located.
577 * CMakeLists.txt: Move TiledBackingStore.cpp because this is not common file.
580 * WebCore.vcxproj/WebCore.vcxproj: Follow new location of TiledBackingStore* files.
581 * WebCore.vcxproj/WebCore.vcxproj.filters:
582 * loader/EmptyClients.h:
585 * page/ChromeClient.h:
587 (WebCore::Frame::createView):
588 * page/FrameView.cpp:
589 (WebCore::FrameView::requestScrollPositionUpdate):
592 (WebCore::Page::setPageScaleFactor):
593 * platform/HostWindow.h:
594 * platform/ScrollView.cpp:
595 (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
596 (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
597 (WebCore::ScrollView::visibleContentRectInternal):
598 (WebCore::ScrollView::scrollTo):
599 * platform/ScrollView.h:
600 * platform/graphics/cairo/TileCairo.h: Removed because it is dead code since r169328
601 * platform/graphics/texmap/coordinated/Tile.h: Renamed from Source/WebCore/platform/graphics/Tile.h.
602 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.cpp.
603 * platform/graphics/texmap/coordinated/TiledBackingStore.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.h.
604 * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreBackend.h.
605 * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreClient.h.
607 2015-04-28 Brent Fulgham <bfulgham@apple.com>
609 REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
610 https://bugs.webkit.org/show_bug.cgi?id=144366
611 <rdar://problem/20533513>
613 Reviewed by Dean Jackson.
615 * rendering/RenderBlockFlow.cpp:
616 (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
617 before attempting to dereference it.
619 2015-04-28 Andreas Kling <akling@apple.com>
621 Simplify DOM wrapper destruction, don't deref() in finalizers.
622 <https://webkit.org/b/144183>
624 Reviewed by Darin Adler.
626 DOM JS bindings had two mechanisms to call deref() on the WebCore object,
627 once through a weak finalizer, and once through the JSCell's regular destructor.
629 That was once believed to be an optimization, but these days the finalizer will
630 run just moments before the destructor anyway, all in the same call stack.
631 And more importantly, the finalizer is not guaranteed to run, for instance in the
632 case where a Weak is assigned to after going dead, but before the WeakBlock
633 has been swept by the incremental sweeper.
635 Simplify this by just removing the deref() from the generated finalizers.
636 This makes it easier to reason about DOM wrapper destruction, and eliminates
637 the awkward time window where a DOM wrapper could have a null impl().
639 We could spend more time on figuring out a way to have finalizers manage the
640 destruction of these wrappers, but that would require fundamental changes to
641 our implementation of JSC::Weak pointers. It would allow us to make JSDOMWrapper
642 destructor-less, and shrink each wrapper object by 1 pointer (the ClassInfo*.)
643 However the risk:reward ratio does not seem justified at this point in time.
645 * bindings/scripts/CodeGeneratorJS.pm:
647 (GenerateImplementation):
648 * bindings/js/JSCSSValueCustom.cpp:
649 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
650 (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
651 (WebCore::JSTestActiveDOMObjectOwner::finalize):
652 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
653 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
654 (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
655 (WebCore::JSTestCustomNamedGetterOwner::finalize):
656 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
657 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
658 (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
659 (WebCore::JSTestEventConstructorOwner::finalize):
660 * bindings/scripts/test/JS/JSTestEventConstructor.h:
661 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
662 (WebCore::JSTestEventTarget::~JSTestEventTarget):
663 (WebCore::JSTestEventTargetOwner::finalize):
664 * bindings/scripts/test/JS/JSTestEventTarget.h:
665 * bindings/scripts/test/JS/JSTestException.cpp:
666 (WebCore::JSTestException::~JSTestException):
667 (WebCore::JSTestExceptionOwner::finalize):
668 * bindings/scripts/test/JS/JSTestException.h:
669 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
670 (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
671 (WebCore::JSTestGenerateIsReachableOwner::finalize):
672 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
673 * bindings/scripts/test/JS/JSTestInterface.cpp:
674 (WebCore::JSTestInterface::~JSTestInterface):
675 (WebCore::JSTestInterfaceOwner::finalize):
676 * bindings/scripts/test/JS/JSTestInterface.h:
677 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
678 (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
679 (WebCore::JSTestMediaQueryListListenerOwner::finalize):
680 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
681 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
682 (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
683 (WebCore::JSTestNamedConstructorOwner::finalize):
684 * bindings/scripts/test/JS/JSTestNamedConstructor.h:
685 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
686 (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
687 (WebCore::JSTestNondeterministicOwner::finalize):
688 * bindings/scripts/test/JS/JSTestNondeterministic.h:
689 * bindings/scripts/test/JS/JSTestObj.cpp:
690 (WebCore::JSTestObj::~JSTestObj):
691 (WebCore::JSTestObjOwner::finalize):
692 * bindings/scripts/test/JS/JSTestObj.h:
693 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
694 (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
695 (WebCore::JSTestOverloadedConstructorsOwner::finalize):
696 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
697 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
698 (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
699 (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
700 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
701 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
702 (WebCore::JSTestTypedefs::~JSTestTypedefs):
703 (WebCore::JSTestTypedefsOwner::finalize):
704 * bindings/scripts/test/JS/JSTestTypedefs.h:
705 * bindings/scripts/test/JS/JSattribute.cpp:
706 (WebCore::JSattribute::~JSattribute):
707 (WebCore::JSattributeOwner::finalize):
708 * bindings/scripts/test/JS/JSattribute.h:
709 * bindings/scripts/test/JS/JSreadonly.cpp:
710 (WebCore::JSreadonly::~JSreadonly):
711 (WebCore::JSreadonlyOwner::finalize):
712 * bindings/scripts/test/JS/JSreadonly.h:
714 2015-04-28 Alex Christensen <achristensen@webkit.org>
716 Build WinCairo without cygwin.
717 https://bugs.webkit.org/show_bug.cgi?id=144365
719 Reviewed by Myles Maxfield.
721 * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
722 Pass the CC executable to build-generated-files.pl like r182164.
723 * WebCore.vcxproj/build-generated-files.pl:
724 Default to 8 CPUs unless otherwise specified.
726 2015-04-28 Sam Weinig <sam@webkit.org>
728 [Content Extensions] Process NFAs individually to avoid having all NFAs live at the same time
729 https://bugs.webkit.org/show_bug.cgi?id=144363
731 Reviewed by Alex Christensen.
733 This brings dirty memory use when compiling our test content extension down from ~300MB to ~100MB.
735 * contentextensions/CombinedURLFilters.cpp:
736 (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
737 (WebCore::ContentExtensions::CombinedURLFilters::createNFAs): Deleted.
738 * contentextensions/CombinedURLFilters.h:
739 Replace function that creates a Vector of all the NFAs with one that allows incremental processing
742 * contentextensions/ContentExtensionCompiler.cpp:
743 (WebCore::ContentExtensions::addUniversalActionsToDFA):
744 Extract code to add universal actions into a helper, since we need to call it in two places now.
746 (WebCore::ContentExtensions::compileRuleList):
747 Adopt CombinedURLFilters::processNFAs. Now that we don't have a Vector of NFAs, we need to keep track
748 of whether or not any NFAs were processed and if we are currently processing the first NFA so we can
749 ensure that we have some bytecode generated event for empty rule sets, and that universal actions are
750 placed on the first DFA.
752 2015-04-28 Timothy Horton <timothy_horton@apple.com>
754 [TextIndicator] Yellow highlight takes too long to fade out on scroll
755 https://bugs.webkit.org/show_bug.cgi?id=144358
756 <rdar://problem/19451011>
758 Reviewed by Beth Dakin.
760 * page/TextIndicator.h:
761 Add Lifetime and DismissalAnimation enums.
763 (WebCore::TextIndicator::contentImageWithHighlight):
764 (WebCore::TextIndicator::contentImage):
767 * page/mac/TextIndicatorWindow.h:
768 * page/mac/TextIndicatorWindow.mm:
769 (WebCore::TextIndicatorWindow::TextIndicatorWindow):
770 (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
771 (WebCore::TextIndicatorWindow::clearTextIndicator):
772 (WebCore::TextIndicatorWindow::setTextIndicator):
773 (WebCore::TextIndicatorWindow::closeWindow):
774 (WebCore::TextIndicatorWindow::startFadeOut):
775 Rename m_startFadeOutTimer to m_temporaryTextIndicatorTimer (and related).
776 This is just about temporary-lifetime TextIndicators, like the ones
777 you get when the find-in-page UI is hidden but you hit Cmd-G.
779 Add clearTextIndicator, which takes a DismissalAnimation, providing
780 clients an opportunity to avoid the normal fade-out animation, if it
783 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
785 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
786 https://bugs.webkit.org/show_bug.cgi?id=144304
788 Reviewed by Geoffrey Garen.
790 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
792 * Configurations/FeatureDefines.xcconfig:
794 2015-04-28 Commit Queue <commit-queue@webkit.org>
796 Unreviewed, rolling out r183514.
797 https://bugs.webkit.org/show_bug.cgi?id=144359
799 It broke cloop test bots (Requested by mcatanzaro on #webkit).
803 "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
804 https://bugs.webkit.org/show_bug.cgi?id=144304
805 http://trac.webkit.org/changeset/183514
807 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
809 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
810 https://bugs.webkit.org/show_bug.cgi?id=144304
812 Reviewed by Geoffrey Garen.
814 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
816 * Configurations/FeatureDefines.xcconfig:
818 2015-04-28 Zalan Bujtas <zalan@apple.com>
820 Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
821 https://bugs.webkit.org/show_bug.cgi?id=144351
823 Reviewed by Simon Fraser.
825 This patch ensures that CG context is properly restored after painting dashed/dotted lines.
827 Test: fast/forms/checkbox-painting-with-hr.html
829 * platform/graphics/cg/GraphicsContextCG.cpp:
830 (WebCore::GraphicsContext::drawLine):
832 2015-04-28 Simon Fraser <simon.fraser@apple.com>
834 Provide contentsToView() and viewToContents() functions on ScrollView, and use them
835 https://bugs.webkit.org/show_bug.cgi?id=144357
837 Reviewed by Tim Horton.
839 Too much code was consulting topContentInset() and headerHeight() directly. Replace
840 with calls to new contentsToView() and viewToContents() functions, which wrap the
841 exisiting documentScrollOffsetRelativeToViewOrigin().
843 Use the new functions in FrameView and ScrollView coordinate mapping functions.
847 * page/FrameView.cpp:
848 (WebCore::FrameView::convertFromRendererToContainingView):
849 (WebCore::FrameView::convertFromContainingViewToRenderer):
850 * platform/ScrollView.cpp:
851 (WebCore::ScrollView::viewToContents):
852 (WebCore::ScrollView::contentsToView):
853 (WebCore::ScrollView::rootViewToContents):
854 (WebCore::ScrollView::contentsToRootView):
855 (WebCore::ScrollView::rootViewToTotalContents):
856 (WebCore::ScrollView::windowToContents):
857 (WebCore::ScrollView::contentsToWindow):
858 * platform/ScrollView.h:
860 2015-04-28 Eric Carlson <eric.carlson@apple.com>
862 [Mac] Simplify code to support media engines which do not support target playback
863 https://bugs.webkit.org/show_bug.cgi?id=144332
865 Reviewed by Jer Noble.
867 * Modules/mediasession/WebMediaSessionManager.cpp:
868 (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Always make client
869 callback, let them decide if it is significant or not.
871 * html/HTMLMediaElement.cpp:
872 (WebCore::HTMLMediaElement::HTMLMediaElement): m_loadTimer -> m_pendingActionTimer.
873 (WebCore::HTMLMediaElement::scheduleDelayedAction): Handle CheckPlaybackTargetCompatablity.
874 (WebCore::HTMLMediaElement::scheduleNextSourceChild): m_loadTimer -> m_pendingActionTimer.
875 (WebCore::HTMLMediaElement::loadTimerFired): Renamed pendingActionTimerFired.
876 (WebCore::HTMLMediaElement::prepareForLoad): m_loadTimer -> m_pendingActionTimer.
877 (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Add logging.
878 (WebCore::HTMLMediaElement::clearMediaPlayer): m_loadTimer -> m_pendingActionTimer.
879 (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsSupported): Removed.
880 (WebCore::HTMLMediaElement::dispatchEvent): If a 'webkitcurrentplaybacktargetiswirelesschanged'
881 event is dispatched when the current target is wireless but the media engine does not support
882 wireless playback, tell the media engine not to play to the target.
883 * html/HTMLMediaElement.h:
884 * html/HTMLMediaElement.idl:
886 * html/HTMLMediaSession.cpp:
887 (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Drive-by fix to disallow audio-only files.
888 (WebCore::HTMLMediaSession::currentPlaybackTargetIsSupported): Deleted.
889 * html/HTMLMediaSession.h:
891 * platform/graphics/MediaPlayer.cpp:
892 (WebCore::MediaPlayer::isCurrentPlaybackTargetSupported): Deleted.
893 * platform/graphics/MediaPlayer.h:
894 * platform/graphics/MediaPlayerPrivate.h:
896 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
897 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Use a RetainPtr
898 to explicitly manage the lifetime of the temporary object.
899 (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Ditto.
900 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
902 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
903 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
904 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless):
905 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetSupported): Deleted.
907 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
908 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
909 (WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
910 (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetWireless):
911 (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetSupported): Deleted.
913 2015-04-28 Alex Christensen <achristensen@webkit.org>
915 [Content Extensions] Use less memory for CombinedURLFilters.
916 https://bugs.webkit.org/show_bug.cgi?id=144290
918 Reviewed by Andreas Kling.
920 * contentextensions/CombinedURLFilters.cpp:
921 (WebCore::ContentExtensions::recursiveMemoryUsed):
922 (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
923 (WebCore::ContentExtensions::generateNFAForSubtree):
924 (WebCore::ContentExtensions::CombinedURLFilters::createNFAs):
925 * contentextensions/NFA.cpp:
926 (WebCore::ContentExtensions::NFA::memoryUsed):
927 (WebCore::ContentExtensions::NFA::setActions):
928 * contentextensions/NFA.h:
929 * contentextensions/NFANode.h:
930 * contentextensions/Term.h:
931 (WebCore::ContentExtensions::Term::Term::generateGraph):
932 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
933 Use Vectors instead of HashTables in PrefixTreeVertex because the sets stay small and need to be more memory efficient.
935 2015-04-28 Brady Eidson <beidson@apple.com>
937 Consolidate most "frame load" arguments into FrameLoadRequest.
938 https://bugs.webkit.org/show_bug.cgi?id=144276
940 Reviewed by Alexey Proskuryakov.
942 No new tests (No change in behavior).
944 This patch starts the long overdue process of wrangling the insane load methods in FrameLoader.
946 Humble beginnings of this long process:
947 - Put most of the various "frame load" arguments that are passed around within FrameLoader on FrameLoadRequest.
948 - Get rid of the "easy" constructors of FrameLoadRequest, forcing users to actually think about what they're doing.
949 - Change a private FrameLoader load method (urlSelected) to take a FrameLoadRequest instead of argument gobbledygook.
950 - Change a public FrameLoader load methods (changeLocation) to take a FrameLoadRequest instead of gobbledygook.
952 These cover the straightforward changes where it was easy to figure out what the values of the FrameLoadRequest
953 arguments were from these various call sites.
955 Further refactoring can be done in much smaller patches, handling fewer cases at a time. Little by little we will be
956 able to reduce the number of "load" methods on FrameLoader and make sure that they mainly only take a FrameLoadRequest
959 * inspector/InspectorFrontendClientLocal.cpp:
960 (WebCore::InspectorFrontendClientLocal::openInNewTab):
962 * inspector/InspectorPageAgent.cpp:
963 (WebCore::InspectorPageAgent::navigate):
965 * loader/FrameLoadRequest.cpp:
966 (WebCore::FrameLoadRequest::FrameLoadRequest):
967 * loader/FrameLoadRequest.h:
968 (WebCore::FrameLoadRequest::FrameLoadRequest):
969 (WebCore::FrameLoadRequest::lockHistory):
970 (WebCore::FrameLoadRequest::lockBackForwardList):
971 (WebCore::FrameLoadRequest::shouldSendReferrer):
972 (WebCore::FrameLoadRequest::allowNavigationToInvalidURL):
973 (WebCore::FrameLoadRequest::newFrameOpenerPolicy):
974 (WebCore::FrameLoadRequest::shouldReplaceDocumentIfJavaScriptURL):
976 * loader/FrameLoader.cpp:
977 (WebCore::FrameLoader::changeLocation):
978 (WebCore::FrameLoader::urlSelected):
979 (WebCore::FrameLoader::loadFrameRequest):
980 * loader/FrameLoader.h:
982 * loader/NavigationScheduler.cpp:
983 (WebCore::NavigationScheduler::scheduleLocationChange):
985 * page/ContextMenuController.cpp:
986 (WebCore::openNewWindow):
987 (WebCore::ContextMenuController::contextMenuItemSelected):
989 * page/DOMWindow.cpp:
990 (WebCore::DOMWindow::createWindow):
992 2015-04-27 Myles C. Maxfield <mmaxfield@apple.com>
994 [Mac] [iOS] Implement font-synthesis CSS property
995 https://bugs.webkit.org/show_bug.cgi?id=144305
997 Reviewed by Andreas Kling.
999 This patch is fairly straightforward, though there are some particular pieces to the patch listed below.
1001 The implementation of this font-synthesis CSS property lives inside FontCacheIOS and FontCacheMac. We already
1002 determine if we should synthesize bold and italics, this CSS property simply guards that decision.
1004 Because FontCache interacts with FontDescriptions and not RenderStyles, this patch moves the source of truth
1005 regarding font-synthesis into FontDescription (from RenderStyle).
1007 Test: fast/css3-text/font-synthesis.html
1009 * css/CSSPropertyNames.in: Mark font-synthesis as a FontProperty, which means that the relevant state is kept
1010 inside FontDescription. This also means that the property must be marked as a "high priority" property, which
1011 is enforced by it existing at the top of CSSPropertyNames.in. The move to FontDescription must be done so that
1012 FontCacheIOS and FontCacheMac have access to the saved state.
1013 * css/CSSComputedStyleDeclaration.cpp:
1014 (WebCore::fontSynthesisFromStyle): Update to look for state in FontDescription instead of RenderStyle.
1015 * css/CSSSegmentedFontFace.cpp:
1016 (WebCore::CSSSegmentedFontFace::fontRanges): Guard the synthetic bold and synthic italic decision on the new
1017 FontSynthesis state inside FontDescription.
1018 * css/StyleBuilderConverter.h:
1019 (WebCore::StyleBuilderConverter::convertFontSynthesis): Moved from
1020 StyleBuilderCustom::applyValueFontSynthesis(). This is because of the updated options inside of
1022 * css/StyleBuilderCustom.h:
1023 (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Deleted.
1024 * platform/graphics/FontDescription.h:
1025 (WebCore::FontDescription::FontDescription): Moved from RenderStyle.
1026 (WebCore::FontDescription::fontSynthesis): Ditto.
1027 (WebCore::FontDescription::setFontSynthesis): Ditto.
1028 (WebCore::FontDescription::initialFontSynthesis): Ditto.
1029 (WebCore::FontDescription::operator==): Update to include new state.
1030 * platform/graphics/FontCache.h:
1031 (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey): Make FontDescription hashes sensitive to the new
1032 state inside FontDescription.
1033 * platform/graphics/ios/FontCacheIOS.mm:
1034 (WebCore::FontCache::createFontPlatformData): Guard the synthetic bold and synthetic italic decision on the
1035 new FontSynthesis state inside FontDescription.
1036 * platform/graphics/mac/FontCacheMac.mm:
1037 (WebCore::FontCache::createFontPlatformData): Ditto.
1038 * platform/text/TextFlags.h: Move FontSynthesis type from RenderStyleConstants.
1039 * rendering/style/RenderStyle.h:
1040 (WebCore::RenderStyle::fontSynthesis): Moved to FontDescription.
1041 (WebCore::RenderStyle::setFontSynthesis): Ditto.
1042 (WebCore::RenderStyle::initialFontSynthesis): Ditto.
1043 * rendering/style/RenderStyleConstants.h: Moved FontSynthesis type to TextFlags.
1044 * rendering/style/StyleRareInheritedData.h: Remove state regarding font synthesis (moved to FontDescription)
1046 2015-04-28 Youenn Fablet <youenn.fablet@crf.canon.fr>
1048 SharedBuffer::copy is not computing the buffer size correctly when having m_dataArray
1049 https://bugs.webkit.org/show_bug.cgi?id=144321
1051 Reviewed by Darin Adler.
1053 Patch correctness covered by existing tests.
1055 * platform/SharedBuffer.cpp:
1056 (WebCore::SharedBuffer::copy): Direct appending to m_dataArray and not using append method as this method updates the SharedBuffer size.
1058 2015-04-28 Per Arne Vollan <peavo@outlook.com>
1061 https://bugs.webkit.org/show_bug.cgi?id=144327
1063 Reviewed by Brent Fulgham.
1065 When a data url is loaded, the ResourceHandle is not released.
1067 * platform/network/curl/ResourceHandleManager.cpp:
1068 (WebCore::ResourceHandleManager::startJob):
1070 2015-04-28 Andy Estes <aestes@apple.com>
1072 Fix the Mavericks Debug build after r183467.
1074 * platform/network/ResourceRequestBase.h:
1075 (WebCore::ResourceRequestBase::requester): Removed WEBCORE_EXPORT.
1076 (WebCore::ResourceRequestBase::setRequester): Ditto.
1078 2015-04-28 Csaba Osztrogonác <ossy@webkit.org>
1080 Remove make-file-arrays.py
1081 https://bugs.webkit.org/show_bug.cgi?id=144324
1083 Reviewed by Gyuyoung Kim.
1085 * make-file-arrays.py: Removed.
1087 2015-04-28 Antti Koivisto <antti@apple.com>
1091 * platform/network/ios/ResourceRequestIOS.mm:
1092 (WebCore::ResourceRequest::ResourceRequest):
1094 2015-04-28 Antti Koivisto <antti@apple.com>
1096 Network Cache: Disk cache getting filled by YouTube video data
1097 https://bugs.webkit.org/show_bug.cgi?id=144259
1099 Reviewed by Darin Adler.
1101 MSE media is loaded via XHR and tends to eventually fill the cache.
1103 YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
1104 We can reduce disk writes and keep more useful resources around by not caching them
1106 Test: http/tests/cache/disk-cache/disk-cache-media.html
1108 * loader/DocumentLoader.cpp:
1109 (WebCore::DocumentLoader::startLoadingMainResource):
1113 * loader/cache/CachedRawResource.cpp:
1114 (WebCore::CachedRawResource::CachedRawResource):
1115 * page/DiagnosticLoggingKeys.cpp:
1116 (WebCore::DiagnosticLoggingKeys::streamingMedia):
1117 * page/DiagnosticLoggingKeys.h:
1118 * platform/network/ResourceRequestBase.cpp:
1119 (WebCore::ResourceRequestBase::adopt):
1120 (WebCore::ResourceRequestBase::copyData):
1121 (WebCore::equalIgnoringHeaderFields):
1122 * platform/network/ResourceRequestBase.h:
1123 (WebCore::ResourceRequestBase::requester):
1124 (WebCore::ResourceRequestBase::setRequester):
1126 Add requester type to the request object. Currently this is main resource, xhr or unspecified.
1128 (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
1129 (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
1130 * platform/network/cf/ResourceRequest.h:
1131 (WebCore::ResourceRequest::deprecatedSetMainResourceRequest): Deleted.
1132 (WebCore::ResourceRequest::deprecatedIsMainResourceRequest): Deleted.
1134 Replace this iOS only field with shared mechanism.
1136 * platform/network/ios/QuickLook.mm:
1137 (WebCore::QuickLookHandle::create):
1138 * xml/XMLHttpRequest.cpp:
1139 (WebCore::XMLHttpRequest::createRequest):
1143 2015-04-28 Namhoon Kim <nakim@ea.com>
1145 Fix windows build error in WebCore related to bulk build.
1146 https://bugs.webkit.org/show_bug.cgi?id=144313
1148 Reviewed by Csaba Osztrogonác.
1150 No new tests because there is no behavior change.
1152 * css/CSSAllInOne.cpp:
1153 * dom/DOMAllInOne.cpp:
1155 2015-04-27 Simon Fraser <simon.fraser@apple.com>
1157 Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
1158 https://bugs.webkit.org/show_bug.cgi?id=144198
1160 Followup: fix assertions seen in fullscreen and pseudo-element tests. These code
1161 paths set the style to the existing pointer, but with a SyntheticStyleChange.
1162 We have to avoid an early return in this case.
1164 * rendering/RenderElement.cpp:
1165 (WebCore::RenderElement::setStyle):
1167 2015-04-25 Simon Fraser <simon.fraser@apple.com>
1169 Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
1170 https://bugs.webkit.org/show_bug.cgi?id=144198
1172 Reviewed by Darin Adler, Antti Koivisto.
1174 SyntheticStyleChange style recalcs are triggered for cases where behavior depends
1175 on state which is outside of RenderStyle; this includes triggering compositing for
1176 animations, for video and canvas, and for iframes with composited content.
1178 In these cases, we'd run through RenderElement::setStyle() and its fan-out, but
1179 with diff == StyleDifferenceEqual, and so be unable to determine if there
1180 is actual work to be done.
1182 This patch enforces the contract that the diff is never StyleDifferenceEqual if
1183 compositing or other work has to happen from setStyle(). This is achieved by
1184 passing in a 'hasSideEffects' flag, which causes the diff to become at least
1185 StyleDifferenceRecompositeLayer.
1187 RenderLayerCompositor::layerStyleChanged() can now safely early return
1188 if the diff is equal. Future patches will reduce redundant work even more.
1190 Test: compositing/animation/no-style-recalc-during-accelerated-animation.html
1192 * page/animation/AnimationBase.h:
1193 (WebCore::AnimationBase::animate): Returns a bool now if the state changed.
1194 (WebCore::AnimationBase::state):
1195 * page/animation/AnimationController.cpp:
1196 (WebCore::AnimationController::updateAnimations): bool out param which indicates
1197 whether any animations changed state.
1198 * page/animation/AnimationController.h:
1199 * page/animation/CompositeAnimation.cpp:
1200 (WebCore::CompositeAnimation::animate): If any transitions or animations changed
1201 state, set the animationStateChanged out param to true.
1202 * page/animation/CompositeAnimation.h:
1203 * page/animation/ImplicitAnimation.cpp:
1204 (WebCore::ImplicitAnimation::animate): Return true if the state changed.
1205 * page/animation/ImplicitAnimation.h:
1206 * page/animation/KeyframeAnimation.cpp:
1207 (WebCore::KeyframeAnimation::animate): Return true if the state changed.
1208 * page/animation/KeyframeAnimation.h:
1209 * rendering/RenderElement.cpp:
1210 (WebCore::RenderElement::adjustStyleDifference): We may enter here now with diff
1211 != StyleDifferenceEqual, but still need to do the check to see if layers changed.
1212 (WebCore::RenderElement::initializeStyle): When setting style for the first time,
1213 don't use StyleDifferenceEqual.
1214 (WebCore::RenderElement::setStyle): Additional flag to indicate whether this style
1215 change involves side effects. If the diff is equal but the flag is set, change
1216 the diff to StyleDifferenceRecompositeLayer (the "lowest" non-zero diff).
1217 * rendering/RenderElement.h:
1218 (WebCore::RenderElement::setAnimatableStyle): Pass true to setStyle() if hasSideEffects
1219 is true, or if animation state changed.
1220 * rendering/RenderLayer.cpp:
1221 (WebCore::RenderLayer::styleChanged): Pass the diff down.
1222 * rendering/RenderLayerCompositor.cpp:
1223 (WebCore::RenderLayerCompositor::layerStyleChanged): Return if the diff is equal.
1224 * rendering/RenderLayerCompositor.h:
1225 * rendering/style/RenderStyleConstants.h: StyleDifferenceNewStyle is used when
1226 setting style for the first time.
1227 * style/StyleResolveTree.cpp:
1228 (WebCore::Style::createRendererIfNeeded): Provide animationsChanged bool (which is unused).
1229 (WebCore::Style::resolveLocal): If the style change is synthetic, set the flag that
1230 says there are side-effects.
1232 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
1234 [GTK] Add one single option to control all OpenGL-related options
1235 https://bugs.webkit.org/show_bug.cgi?id=144105
1237 Reviewed by Martin Robinson.
1239 Test WTF_USE_TEXTURE_MAPPER since USE_TEXTURE_MAPPER has been removed.
1241 * PlatformGTK.cmake:
1243 2015-04-27 Myles C. Maxfield <mmaxfield@apple.com>
1245 Consolidate one-line flag-related header files into TextFlags.h
1246 https://bugs.webkit.org/show_bug.cgi?id=144295
1248 Reviewed by Tim Horton.
1250 There were a collection of single-line header files throughout platform/ which contain
1251 single-line type declaractions of flags related to text layout & rendering. This patch
1252 consolidates all these single-line headers into TextFlags.h
1254 No new tests because there is no behavior change.
1256 * WebCore.vcxproj/WebCore.vcxproj:
1257 * WebCore.vcxproj/WebCore.vcxproj.filters:
1258 * WebCore.xcodeproj/project.pbxproj:
1259 * css/CSSFontFace.h:
1260 * css/CSSPrimitiveValueMappings.h:
1261 * loader/cache/CachedFont.h:
1262 * loader/cache/CachedTextTrack.h:
1264 * platform/DragImage.h:
1265 * platform/graphics/FontDescription.h:
1266 * platform/graphics/FontOrientation.h: Removed.
1267 * platform/graphics/FontPlatformData.h:
1268 * platform/graphics/FontRenderingMode.h: Removed.
1269 * platform/graphics/FontSmoothingMode.h: Removed.
1270 * platform/graphics/FontTraitsMask.h: Removed.
1271 * platform/graphics/FontWidthVariant.h: Removed.
1272 * platform/graphics/TextRenderingMode.h: Removed.
1273 * platform/graphics/cairo/FontCustomPlatformData.h:
1274 * platform/graphics/freetype/FontPlatformData.h:
1275 * platform/graphics/mac/FontCustomPlatformData.h:
1276 * platform/graphics/win/FontCustomPlatformData.h:
1277 * platform/text/NonCJKGlyphOrientation.h: Removed.
1278 * platform/text/TextFlags.h:
1279 * rendering/TextPainter.h:
1280 * style/StyleFontSizeFunctions.h:
1282 2015-04-27 Daniel Bates <dabates@apple.com>
1284 Form control may be associated with the wrong HTML Form element after form id change
1285 https://bugs.webkit.org/show_bug.cgi?id=133456
1286 <rdar://problem/17095055>
1288 Reviewed by Andy Estes.
1290 Fixes an issue where a form control may be associated with the wrong HTML Form element
1291 after the id of the HTML Form element associated with the form control is changed when
1292 there is more than one HTML Form element with the same id in the document. Specifically,
1293 a form control that has an HTML form attribute value X will always be associated with
1294 some HTML Form element f where f.id = X regardless of whether f.id is subsequently
1297 Tests: fast/forms/change-form-id-to-be-unique-then-submit-form.html
1298 fast/forms/change-form-id-to-be-unique.html
1301 (WebCore::Element::attributeChanged): Notify observers when the id of an element changed.
1302 (WebCore::Element::updateId): Added parameter NotifyObservers (defaults to NotifyObservers::Yes),
1303 as to whether we should notify observers of the id change.
1304 (WebCore::Element::updateIdForTreeScope): Ditto.
1305 (WebCore::Element::willModifyAttribute): Do not notify observers of the id change immediately. As
1306 indicated by the name of this method, we plan to modify the DOM attribute id of the element, but
1307 we have not actually modified it when this method is called. Instead we will notify observers
1308 in Element::attributeChanged(), which is called after the DOM attribute id is modified.
1309 (WebCore::Element::cloneAttributesFromElement): Ditto.
1310 * dom/Element.h: Defined enum class NotifyObservers.
1311 * dom/TreeScope.cpp:
1312 (WebCore::TreeScope::addElementById): Added boolean parameter notifyObservers (defaults to true)
1313 as to whether we should dispatch a notification to all observers.
1314 (WebCore::TreeScope::removeElementById): Ditto.
1317 2015-04-27 Alex Christensen <achristensen@webkit.org>
1319 Reduce allocations and memory usage when compiling content extensions.
1320 https://bugs.webkit.org/show_bug.cgi?id=144277
1322 Reviewed by Benjamin Poulain.
1324 Covered by existing tests.
1326 * contentextensions/Term.h:
1327 (WebCore::ContentExtensions::Term::CharacterSet::set):
1328 (WebCore::ContentExtensions::Term::CharacterSet::get):
1329 (WebCore::ContentExtensions::Term::CharacterSet::invert):
1330 (WebCore::ContentExtensions::Term::CharacterSet::inverted):
1331 (WebCore::ContentExtensions::Term::CharacterSet::bitCount):
1332 (WebCore::ContentExtensions::Term::CharacterSet::operator==):
1333 (WebCore::ContentExtensions::Term::CharacterSet::hash):
1334 (WebCore::ContentExtensions::Term::Term):
1335 (WebCore::ContentExtensions::Term::addCharacter):
1336 (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
1337 (WebCore::ContentExtensions::Term::isUniversalTransition):
1338 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1339 Use two uint64_t's instead of a BitVector with a capacity of 128 bits.
1341 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
1343 Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
1344 https://bugs.webkit.org/show_bug.cgi?id=144193
1346 Reviewed by Darin Adler.
1349 * platform/graphics/ANGLEWebKitBridge.cpp:
1350 * platform/graphics/FormatConverter.cpp:
1351 * platform/graphics/FormatConverter.h:
1352 * platform/graphics/GLContext.h:
1353 * platform/graphics/GraphicsContext3D.cpp:
1354 * platform/graphics/GraphicsContext3DPrivate.cpp:
1355 * platform/graphics/OpenGLShims.cpp:
1356 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1357 * platform/graphics/cg/GraphicsContext3DCG.cpp:
1358 * platform/graphics/egl/GLContextEGL.cpp:
1359 * platform/graphics/egl/GLContextEGL.h:
1360 * platform/graphics/glx/GLContextGLX.cpp:
1361 * platform/graphics/glx/GLContextGLX.h:
1362 * platform/graphics/mac/GraphicsContext3DMac.mm:
1363 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1364 * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1365 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
1366 * platform/graphics/opengl/GLPlatformContext.cpp:
1367 * platform/graphics/opengl/GLPlatformSurface.cpp:
1368 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1369 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1370 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1371 * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
1372 * platform/graphics/win/GraphicsContext3DWin.cpp:
1374 2015-04-27 Jer Noble <jer.noble@apple.com>
1376 [iOS] Video not centered in element on retina devices
1377 https://bugs.webkit.org/show_bug.cgi?id=144274
1379 Reviewed by Simon Fraser.
1381 In r173702, a transform was added to the video layer (and a matching, inverse transform
1382 in the UIProcess), but this transform affects the position property of the video layer
1383 used to position the video content within the element bounds when their aspect ratios
1386 To work around this problem, pre-apply the transform during -setPosition:.
1388 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1389 (-[WebVideoContainerLayer setPosition:]):
1391 2015-04-27 Jer Noble <jer.noble@apple.com>
1393 Add a setting & restriction which prevents non-interactivte playback of audible media elements.
1394 https://bugs.webkit.org/show_bug.cgi?id=143486
1396 Reviewed by Eric Carlson.
1398 Tests: media/audio-playback-restriction-autoplay.html
1399 media/audio-playback-restriction-play.html
1401 To allow clients who want to allow non-user-interactive video-only playback, but still
1402 restrict playback of audible media elements, add a new setting and matching restriction
1403 which disallows playback of media elements containing audible characteristics.
1405 * html/HTMLMediaElement.cpp:
1406 (WebCore::HTMLMediaElement::HTMLMediaElement): Set the RequireUserGestureForAudioRateChange
1407 restriction if the audioPlaybackRequiresUserGesture() setting is set.
1408 (WebCore::HTMLMediaElement::parseAttribute): Drive-by fix. Move the opening brace
1409 out of the #if, as this confuses the heck out of diff and makes all subsequent
1410 changes appear to be within HTMLMediaElement::parseAttribute.
1411 (WebCore::HTMLMediaElement::autoplay): Remove the restriction check from within autoplay().
1412 It is checked again immediately after every autoplay() call site.
1413 (WebCore::HTMLMediaElement::pauseInternal): Remove the iOS-only #if.
1414 (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Check whether playback
1415 is permitted, and if not, pause.
1416 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
1417 (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Ditto.
1418 * html/HTMLMediaSession.cpp:
1419 (WebCore::restrictionName): Since BehaviorRestrictions is a bitfield, check each bit
1421 (WebCore::HTMLMediaSession::removeBehaviorRestriction): Handle RequireUserGestureForAudioRateChange.
1422 (WebCore::HTMLMediaSession::playbackPermitted): Check whether the element has audio and
1423 audio playback is restricted, and return false if so.
1424 * html/HTMLMediaSession.h:
1425 * page/Settings.cpp:
1427 * testing/Internals.cpp:
1428 (WebCore::Internals::setMediaSessionRestrictions): Added.
1429 (WebCore::Internals::setMediaElementRestrictions): Added.
1430 * testing/Internals.h:
1431 * testing/Internals.idl:
1433 2015-04-27 Jer Noble <jer.noble@apple.com>
1435 [WebAudio] AudioContext does not remove user-gesture restriction during resume()
1436 https://bugs.webkit.org/show_bug.cgi?id=144211
1438 Reviewed by Eric Carlson.
1440 Tests: webaudio/audiocontext-restriction-audiobuffersourcenode-start.html
1441 webaudio/audiocontext-restriction.html
1443 Before the introduction of resume(), suspend(), and stop(), AudioContexts which required
1444 a user-gesture would start normally, but would effectively mute their outputs. Now that
1445 the AudioContext's state property is exposed to JavaScript, the AudioContext should stay
1446 in the "suspended" state until the user-gesture restriction is lifted.
1448 Add a new method, willBeginPlayback() which checks and potentially clears the context's
1449 behavior restrictions before checking with the MediaSession. Call this new willBeginPlayback()
1450 method when the state would transition to "running".
1452 Because they may be called before any nodes are created, make sure to call lazyInitialize()
1453 from within the JS-exposed resumePlayback(), suspendPlayback(), and stopPlayback() methods.
1455 Instead of clearing the behavior restrictions directly, scheduled AudioNodes should instead
1456 call a new method nodeWillBeginPlayback(). Because existing sites will call AudioNode.start()
1457 inside a user-gesture handler to clear the user-gesture restriction, call startRendering()
1458 from nodeWillBeginPlayback(). But because we don't want AudioNode.start() to resume playback
1459 unconditionally, only do so when the user-gesture restriction is set.
1461 Now that an AudioContext will not transition to "running" state without a user-gesture (if
1462 that restriction is set), there's no reason to check for that restriction from inside
1463 AudioDestinationNode.
1465 Add some internal methods to set and clear AudioContext BehaviorRestrictions for testing purposes.
1467 * Modules/webaudio/AudioBufferSourceNode.cpp:
1468 (WebCore::AudioBufferSourceNode::startPlaying):
1469 * Modules/webaudio/AudioContext.cpp:
1470 (WebCore::AudioContext::nodeWillBeginPlayback):
1471 (WebCore::AudioContext::willBeginPlayback):
1472 (WebCore::AudioContext::willPausePlayback):
1473 (WebCore::AudioContext::startRendering):
1474 (WebCore::AudioContext::suspendContext):
1475 (WebCore::AudioContext::resumeContext):
1476 (WebCore::AudioContext::closeContext):
1477 (WebCore::AudioContext::suspendPlayback):
1478 (WebCore::AudioContext::mayResumePlayback):
1479 * Modules/webaudio/AudioContext.h:
1480 (WebCore::AudioContext::behaviorRestrictions):
1481 (WebCore::AudioContext::userGestureRequiredForAudioStart):
1482 (WebCore::AudioContext::pageConsentRequiredForAudioStart):
1483 * Modules/webaudio/AudioDestinationNode.cpp:
1484 (WebCore::AudioDestinationNode::render):
1485 * Modules/webaudio/AudioScheduledSourceNode.cpp:
1486 (WebCore::AudioScheduledSourceNode::start):
1487 * testing/Internals.cpp:
1488 (WebCore::Internals::setAudioContextRestrictions):
1489 * testing/Internals.h:
1490 * testing/Internals.idl:
1492 2015-04-27 Alexey Proskuryakov <ap@apple.com>
1496 * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1497 Use -setObject:forKey:, not array subscript.
1499 2015-04-27 Eric Carlson <eric.carlson@apple.com>
1501 WirelessTargetPicker should not be visible unless a file is playable
1502 https://bugs.webkit.org/show_bug.cgi?id=144271
1503 <rdar://problem/20712003>
1505 Reviewed by Jer Noble.
1507 * Modules/mediacontrols/mediaControlsApple.js:
1508 (Controller.prototype.isPlayable): New.
1509 (Controller.prototype.setStatusHidden): Call updateWirelessTargetAvailable.
1510 (Controller.prototype.updateWirelessTargetAvailable): Don't show the button until the
1511 status message has been hidden.
1513 2015-04-22 Martin Robinson <mrobinson@igalia.com>
1515 [CMake] Autogenerate cmakeconfig.h.cmake
1516 https://bugs.webkit.org/show_bug.cgi?id=143997
1518 Reviewed by Csaba Osztrogonác.
1520 * PlatformGTK.cmake: Use the WTF_USE style variables, because those are the same
1521 as the ones exposed to the build.
1523 2015-04-27 Zalan Bujtas <zalan@apple.com>
1525 Simple line layout: Wrong text offsetting when range does not start from the first renderer.
1526 https://bugs.webkit.org/show_bug.cgi?id=144167
1527 rdar://problem/20639857
1529 Reviewed by Simon Fraser.
1531 This patch ensures that TextIterator returns the right text when the input range starts
1532 from a sibling node.
1534 TextIterator::m_previousTextLengthInFlow keeps track of the current node offset from the parent.
1535 It is required to map simple line layout runs to RenderText positions.
1536 This patch sets the offset value when the iteration start with a sibling node.
1538 Test: fast/text/range-text-with-simple-line-layout.html
1540 * editing/TextIterator.cpp:
1541 (WebCore::TextIterator::TextIterator):
1542 (WebCore::TextIterator::handleTextNode):
1544 2015-04-27 Commit Queue <commit-queue@webkit.org>
1546 Unreviewed, rolling out r183393.
1547 https://bugs.webkit.org/show_bug.cgi?id=144272
1549 Caused memory corruption detected by GuardMalloc (Requested by
1554 "Synchronous XMLHttpRequest should get access to AppCache
1555 resources stored as flat files"
1556 https://bugs.webkit.org/show_bug.cgi?id=143711
1557 http://trac.webkit.org/changeset/183393
1559 2015-04-27 Per Arne Vollan <peavo@outlook.com>
1561 [Curl] Favicons loaded from disc cache are ignored.
1562 https://bugs.webkit.org/show_bug.cgi?id=143953
1564 Reviewed by Alex Christensen.
1566 When a favicon is loaded from the Curl disc cache, the icon data is thrown away.
1567 This happens because we give a 304 response, which makes the icon loader ignore
1568 the response. We can solve this by responding with 200 OK.
1570 * platform/network/ResourceHandleInternal.h:
1571 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1572 * platform/network/curl/CurlCacheManager.cpp:
1573 (WebCore::CurlCacheManager::didReceiveResponse):
1574 * platform/network/curl/ResourceHandleManager.cpp:
1575 (WebCore::headerCallback):
1576 (WebCore::ResourceHandleManager::initializeHandle):
1578 2015-04-27 Brady Eidson <beidson@apple.com>
1580 Make 'enum NavigationType' be an enum class
1581 https://bugs.webkit.org/show_bug.cgi?id=144270
1583 Reviewed by Alex Christensen.
1585 No new tests (No change in behavior).
1587 I’ll be adding a new NavigationType for bug 144269 so it makes sense to make this
1588 an enum class first.
1590 * loader/FrameLoader.cpp:
1591 (WebCore::FrameLoader::load):
1592 (WebCore::FrameLoader::reload):
1593 (WebCore::FrameLoader::loadDifferentDocumentItem):
1594 * loader/FrameLoaderTypes.h:
1596 * loader/NavigationAction.cpp:
1597 (WebCore::navigationType):
1598 (WebCore::NavigationAction::NavigationAction):
1600 * loader/PolicyChecker.cpp:
1601 (WebCore::PolicyChecker::checkNavigationPolicy):
1603 * page/PerformanceNavigation.cpp:
1604 (WebCore::PerformanceNavigation::type):
1606 2015-04-27 Yoav Weiss <yoav@yoav.ws>
1608 Fix viewport units in Media Queries
1609 https://bugs.webkit.org/show_bug.cgi?id=144260
1611 Reviewed by Darin Adler.
1613 This patch makes sure that viewport units are considered "length units"
1614 in the context of Media Queries, by having MediaQueryExp use the unit logic
1615 that is in CSSPrimitiveValue.
1616 It does that by turning the relevant methods in CSSPrimitiveValue into static.
1618 It also makes sure that the logic for "resolution units" is not maintained separately
1619 in MediaQueryExp, to avoid similiar issues in the future with resolution units.
1621 Test: fast/media/mq-viewport-units.html
1623 * css/CSSPrimitiveValue.h:
1624 (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Added a static variant.
1625 (WebCore::CSSPrimitiveValue::isLength): Added a static variant.
1626 (WebCore::CSSPrimitiveValue::isResolution): Added a static variant.
1627 * css/MediaQueryExp.cpp:
1628 (WebCore::featureWithValidPositiveLenghtOrNumber): Call CSSPrimitiveValue's length unit logic.
1629 (WebCore::featureWithValidDensity): Call CSSPrimitiveValue's resolution unit logic.
1631 2015-04-27 Javier Fernandez <jfernandez@igalia.com>
1633 [CSS Grid Layout] Support for the justify-self and justify-items in grid layout
1634 https://bugs.webkit.org/show_bug.cgi?id=133280
1636 Reviewed by David Hyatt.
1638 Implementation of justify-self and justify-items properties for grid. It supports
1639 different writing-modes and direction. Margins, borders and paddings are also
1640 considered when computing the final position and stretched size.
1642 This patch applies also a quite important refactoring of the alignment logic in
1643 order to share code between the two alignment dimensions, row-axis and column-axis.
1645 Overflow handling is still missing and will be added later in a follow-up bug.
1647 Tests: fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html
1648 fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html
1649 fast/css-grid-layout/grid-align-justify-margin-border-padding.html
1650 fast/css-grid-layout/justify-self-cell.html
1652 * rendering/RenderGrid.cpp:
1653 (WebCore::RenderGrid::layoutGridItems):
1654 (WebCore::RenderGrid::columnAxisPositionForChild):
1655 (WebCore::RenderGrid::rowAxisPositionForChild):
1656 (WebCore::RenderGrid::rowPositionForChild):
1657 (WebCore::RenderGrid::columnPositionForChild):
1658 (WebCore::RenderGrid::findChildLogicalPosition):
1659 (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild): Deleted.
1660 (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
1661 (WebCore::RenderGrid::marginLogicalHeightForChild): Deleted.
1662 (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): Deleted.
1663 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): Deleted.
1664 * rendering/RenderGrid.h:
1665 * rendering/style/RenderStyle.cpp:
1666 (WebCore::RenderStyle::resolveJustification):
1667 * rendering/style/RenderStyle.h:
1669 2015-04-27 Darin Adler <darin@apple.com>
1671 Crashes under IDBDatabase::closeConnection
1672 https://bugs.webkit.org/show_bug.cgi?id=141745
1674 Reviewed by Alexey Proskuryakov.
1676 * Modules/indexeddb/IDBDatabase.cpp:
1677 (WebCore::IDBDatabase::~IDBDatabase): Do the work of close/closeConnection without
1678 actually calling those functions.
1679 (WebCore::IDBDatabase::closeConnection): Protect the database so it's not destroyed
1680 in the middle of this function's execution.
1682 2015-04-27 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1684 [Streams API] ReadableStream constructor start function should be able to close the stream
1685 https://bugs.webkit.org/show_bug.cgi?id=143363
1687 Reviewed by Benjamin Poulain.
1689 Implements https://streams.spec.whatwg.org/#close-readable-stream.
1690 When the "close" JS function is called, the stream is getting closed.
1691 The stream state is changed to close and if it has a reader, the reader gets closed as well:
1692 The reader resolves the closed promise and releases the stream.
1694 Enabled the possibility to resolve a promise with any JS value.
1695 This is used to resolve closed promise with jsUndefined and will be used for read promises in
1696 the future as well, though of course it is not restricted to Streams.
1698 Covered by reference tests that are now passing.
1700 * Modules/streams/ReadableStream.h:
1701 * Modules/streams/ReadableStream.cpp:
1702 (WebCore::ReadableStream::changeStateToClosed): Called by the JS function 'close'.
1703 * Modules/streams/ReadableStreamReader.cpp:
1704 (WebCore::ReadableStreamReader::ReadableStreamReader): Initialized stream.
1705 (WebCore::ReadableStreamReader::initialize): Added to handle state change at constructor time
1706 in particular closed/errored state.
1707 (WebCore::ReadableStreamReader::releaseStream): Releases the stream.
1708 (WebCore::ReadableStreamReader::closed): Stores the promise callbacks and invokes success
1709 immediately if the stream is already closed.
1710 (WebCore::ReadableStreamReader::changeStateToClosed): Changes the internal state to closed,
1711 resolves the promise and releases the stream.
1712 * Modules/streams/ReadableStreamReader.h:
1713 (WebCore::ReadableStreamReader::State): Added.
1714 * bindings/js/JSDOMPromise.h:
1715 (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Adds the ability to resolve a promise with
1717 * bindings/js/JSReadableStreamControllerCustom.cpp:
1718 (WebCore::JSReadableStreamController::close): Not "notImplemented" anymore. Now it closes the
1720 * bindings/js/JSReadableStreamReaderCustom.cpp:
1721 (WebCore::JSReadableStreamReader::closed): Resolves the promise with undefined.
1723 2015-04-27 Csaba Osztrogonác <ossy@webkit.org>
1725 Fix the !ENABLE(CSS_GRID_LAYOUT) build after r183370
1726 https://bugs.webkit.org/show_bug.cgi?id=144255
1728 Reviewed by Carlos Garcia Campos.
1730 * rendering/RenderBox.cpp:
1731 (WebCore::RenderBox::computeLogicalHeight):
1733 2015-04-27 Youenn Fablet <youenn.fablet@crf.canon.fr>
1735 Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
1736 https://bugs.webkit.org/show_bug.cgi?id=143711
1738 Reviewed by Darin Adler.
1740 This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
1741 If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
1742 This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
1744 Test: http/tests/appcache/simple-video-sync.html
1746 * html/HTMLMediaElement.cpp:
1747 (WebCore::HTMLMediaElement::parseAttribute):
1748 * loader/DocumentThreadableLoader.cpp:
1749 (WebCore::DocumentThreadableLoader::loadRequest):
1750 * loader/FrameLoader.cpp:
1751 (WebCore::FrameLoader::loadResourceSynchronously):
1752 * loader/FrameLoader.h:
1753 * loader/appcache/ApplicationCacheHost.cpp:
1754 (WebCore::ApplicationCacheHost::maybeLoadResource):
1755 (WebCore::ApplicationCacheHost::createFileURL):
1756 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1757 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
1758 * loader/appcache/ApplicationCacheHost.h:
1759 * xml/XSLTProcessorLibxslt.cpp:
1760 (WebCore::docLoaderFunc):
1761 * xml/parser/XMLDocumentParserLibxml2.cpp:
1762 (WebCore::openFunc):
1764 2015-04-24 Philippe Normand <pnormand@igalia.com>
1766 [JHBuild] Move to upstream OpenWebRTC
1767 https://bugs.webkit.org/show_bug.cgi?id=144145
1769 Reviewed by Carlos Garcia Campos.
1771 * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
1772 (WebCore::initializeOpenWebRTC): Update with new owr_init API.
1774 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
1776 [SOUP] Add initial implementation of NetworkProcess disk cache
1777 https://bugs.webkit.org/show_bug.cgi?id=143872
1779 Reviewed by Martin Robinson.
1781 Allow to create a GRefPtr for SoupBuffer. Even though SoupBuffer
1782 is not a GObject and has copy/free functions instead of ref/unref,
1783 it's internally refcounted, so we could use copy/free as
1786 * PlatformGTK.cmake:
1787 * platform/network/soup/GRefPtrSoup.cpp: Added.
1790 * platform/network/soup/GRefPtrSoup.h: Added.
1792 2015-04-26 Manuel Rego Casasnovas <rego@igalia.com>
1794 [CSS Grid Layout] LayoutBox::hasDefiniteLogicalHeight() should consider abspos boxes as definite
1795 https://bugs.webkit.org/show_bug.cgi?id=144144
1797 Reviewed by Darin Adler.
1799 Change order in hasDefiniteLogicalHeight() ifs to consider definite
1800 absolutely positioned elements.
1802 Test: fast/css-grid-layout/percent-track-breadths-regarding-container-size.html
1804 * rendering/RenderBox.cpp:
1805 (WebCore::RenderBox::hasDefiniteLogicalHeight):
1807 2015-04-26 Said Abou-Hallawa <sabouhallawa@apple.com>
1809 SVGFilterBuilder should drive the builtin sourceAlpha from the passed sourceGraphic
1810 https://bugs.webkit.org/show_bug.cgi?id=144137
1812 Reviewed by Darin Adler.
1814 The SourceAlpha should be driven from the last applied FilterEffect. This
1815 will require the SourceAlpha FilterEffect to wrap a FilterEffect rather
1816 than just getting the SourceGraphic reference from FilterEffectRenderer.
1818 This is based on the Blink patch:
1819 https://src.chromium.org/viewvc/blink?revision=194115&view=revision.
1821 Test: svg/filters/sourceAlpha-input-filter-effect.html
1823 * platform/graphics/filters/SourceAlpha.cpp:
1824 (WebCore::SourceAlpha::create): Make SourceAlpha wraps a FilterEffect
1825 rather than a Filter.
1827 (WebCore::SourceAlpha::determineAbsolutePaintRect): Determine the paint
1828 rect from the wrapped FilterEffect.
1830 (WebCore::SourceAlpha::platformApplySoftware): Extract the alpha channel
1831 from the wrapped FilterEffect.
1833 (WebCore::SourceAlpha::SourceAlpha):
1834 * platform/graphics/filters/SourceAlpha.h:
1835 (WebCore::SourceAlpha::SourceAlpha): Deleted.
1836 Reimplement the constructor of the SourceAlpha such that it wraps the
1837 sourceEffect in its inputEffects.
1839 * rendering/FilterEffectRenderer.cpp:
1840 (WebCore::FilterEffectRenderer::buildReferenceFilter): Delete the FIXME
1841 comment and do exactly what it said. This matches the implementation of
1844 * rendering/svg/RenderSVGResourceFilter.cpp:
1845 (WebCore::RenderSVGResourceFilter::buildPrimitives):
1846 Delete the extra argument.
1848 * svg/graphics/filters/SVGFilterBuilder.cpp:
1849 (WebCore::SVGFilterBuilder::SVGFilterBuilder):
1850 * svg/graphics/filters/SVGFilterBuilder.h: Drive the SourceAlpha from the
1851 passed source FilterEffect.
1853 * platform/graphics/filters/FEBlend.cpp:
1854 * platform/graphics/filters/FEBlend.h:
1855 * platform/graphics/filters/FEColorMatrix.cpp:
1856 * platform/graphics/filters/FEColorMatrix.h:
1857 * platform/graphics/filters/FEComponentTransfer.cpp:
1858 * platform/graphics/filters/FEComponentTransfer.h:
1859 * platform/graphics/filters/FEComposite.cpp:
1860 * platform/graphics/filters/FEComposite.h:
1861 * platform/graphics/filters/FEConvolveMatrix.cpp:
1862 * platform/graphics/filters/FEConvolveMatrix.h:
1863 * platform/graphics/filters/FEDiffuseLighting.cpp:
1864 * platform/graphics/filters/FEDiffuseLighting.h:
1865 * platform/graphics/filters/FEDisplacementMap.cpp:
1866 * platform/graphics/filters/FEDisplacementMap.h:
1867 * platform/graphics/filters/FEDropShadow.cpp:
1868 * platform/graphics/filters/FEDropShadow.h:
1869 * platform/graphics/filters/FEFlood.cpp:
1870 * platform/graphics/filters/FEFlood.h:
1871 * platform/graphics/filters/FEGaussianBlur.cpp:
1872 * platform/graphics/filters/FEGaussianBlur.h:
1873 * platform/graphics/filters/FELighting.cpp:
1874 * platform/graphics/filters/FELighting.h:
1875 * platform/graphics/filters/FEMerge.cpp:
1876 * platform/graphics/filters/FEMerge.h:
1877 * platform/graphics/filters/FEMorphology.cpp:
1878 * platform/graphics/filters/FEMorphology.h:
1879 * platform/graphics/filters/FEOffset.cpp:
1880 * platform/graphics/filters/FEOffset.h:
1881 * platform/graphics/filters/FESpecularLighting.cpp:
1882 * platform/graphics/filters/FESpecularLighting.h:
1883 * platform/graphics/filters/FETile.cpp:
1884 * platform/graphics/filters/FETile.h:
1885 * platform/graphics/filters/FETurbulence.cpp:
1886 * platform/graphics/filters/FETurbulence.h:
1887 * platform/graphics/filters/Filter.h:
1888 * platform/graphics/filters/FilterEffect.cpp:
1889 * platform/graphics/filters/FilterEffect.h:
1890 * platform/graphics/filters/SourceGraphic.cpp:
1891 * platform/graphics/filters/SourceGraphic.h:
1892 * rendering/svg/RenderSVGResourceFilter.h:
1893 * rendering/svg/SVGRenderTreeAsText.cpp:
1894 Code clean up: Pointer to reference conversion. It starts by converting
1895 FilterEffect::m_filter from pointer to reference and it kept expanding.
1896 All the creations of FilterEffect were happening by passing "this" so
1897 passing "*this" did not require to check whether the pointer is nil.
1899 * svg/SVGFEBlendElement.cpp:
1900 * svg/SVGFEBlendElement.h:
1901 * svg/SVGFEColorMatrixElement.cpp:
1902 * svg/SVGFEColorMatrixElement.h:
1903 * svg/SVGFEComponentTransferElement.cpp:
1904 * svg/SVGFEComponentTransferElement.h:
1905 * svg/SVGFECompositeElement.cpp:
1906 * svg/SVGFECompositeElement.h:
1907 * svg/SVGFEConvolveMatrixElement.cpp:
1908 * svg/SVGFEConvolveMatrixElement.h:
1909 * svg/SVGFEDiffuseLightingElement.cpp:
1910 * svg/SVGFEDiffuseLightingElement.h:
1911 * svg/SVGFEDisplacementMapElement.cpp:
1912 * svg/SVGFEDisplacementMapElement.h:
1913 * svg/SVGFEDropShadowElement.cpp:
1914 * svg/SVGFEDropShadowElement.h:
1915 * svg/SVGFEFloodElement.cpp:
1916 * svg/SVGFEFloodElement.h:
1917 * svg/SVGFEGaussianBlurElement.cpp:
1918 * svg/SVGFEGaussianBlurElement.h:
1919 * svg/SVGFEImageElement.cpp:
1920 * svg/SVGFEImageElement.h:
1921 * svg/SVGFEMergeElement.cpp:
1922 * svg/SVGFEMergeElement.h:
1923 * svg/SVGFEMorphologyElement.cpp:
1924 * svg/SVGFEMorphologyElement.h:
1925 * svg/SVGFEOffsetElement.cpp:
1926 * svg/SVGFEOffsetElement.h:
1927 * svg/SVGFESpecularLightingElement.cpp:
1928 * svg/SVGFESpecularLightingElement.h:
1929 * svg/SVGFETileElement.cpp:
1930 * svg/SVGFETileElement.h:
1931 * svg/SVGFETurbulenceElement.cpp:
1932 * svg/SVGFETurbulenceElement.h:
1933 * svg/SVGFilterPrimitiveStandardAttributes.h:
1934 * svg/graphics/filters/SVGFEImage.cpp:
1935 * svg/graphics/filters/SVGFEImage.h:
1936 Code clean up: Pointer to reference and PassRefPtr<> to RefPtr<> or Ref<>
1939 2015-04-26 Darin Adler <darin@apple.com>
1941 REGRESSION (r174283): disabled default buttons use impossible-to-read white text on Mac
1942 https://bugs.webkit.org/show_bug.cgi?id=144237
1944 Reviewed by Simon Fraser.
1946 No test because DumpRenderTree and WebKitTestRunner don't have a good method
1947 for testing behaviors that are specific to active windows. That's the same reason
1948 that the change that caused this bug didn't come with a regression test.
1950 * rendering/RenderTheme.cpp:
1951 (WebCore::RenderTheme::adjustStyle): Renamed "e" to "element". Added a comment to
1952 clarify the meaning of the setInsideDefaultButton function, and added an
1953 isDisabledFormControl check so it won't trigger on a disabled button.
1954 (WebCore::RenderTheme::systemColor): Moved CSSValueActivebuttontext into
1955 alphabetical order to match the rest of the switch statement ordering.
1957 * rendering/RenderThemeMac.mm:
1958 (WebCore::RenderThemeMac::systemColor): Moved CSSValueActivebuttontext into
1959 alphabetical order to match the rest of the switch statement ordering. Also
1960 fixed its behavior on older versions of OS X; it should just return the same
1961 thing that CSSValueButtontext would return in that context.
1963 2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
1965 [ES6] Implement ES6 template literals
1966 https://bugs.webkit.org/show_bug.cgi?id=142691
1968 Reviewed by Darin Adler.
1970 Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
1972 * Configurations/FeatureDefines.xcconfig:
1974 2015-04-26 Javier Fernandez <jfernandez@igalia.com>
1976 [CSS Grid Layout] Support for align-self and align-items in grid layout
1977 https://bugs.webkit.org/show_bug.cgi?id=133225
1979 Reviewed by Darin Adler.
1981 Implementation of align-self and align-items properties for grid. It supports
1982 different writing-modes and direction. Margins, borders and paddings are also
1983 considered when computing the final position and stretched size.
1985 Overflow handling is still missing and will be added when implemented row-axis
1988 Test: fast/css-grid-layout/grid-align.html
1990 * rendering/RenderBox.cpp:
1991 (WebCore::RenderBox::computeLogicalHeight):
1992 * rendering/RenderGrid.cpp:
1993 (WebCore::RenderGrid::logicalContentHeightForChild):
1994 (WebCore::RenderGrid::layoutGridItems):
1995 (WebCore::computeOverflowAlignmentOffset):
1996 (WebCore::RenderGrid::endOfRowForChild):
1997 (WebCore::RenderGrid::startOfRowForChild):
1998 (WebCore::RenderGrid::centeredRowPositionForChild):
1999 (WebCore::marginWidthForChild):
2000 (WebCore::marginHeightForChild):
2001 (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
2002 (WebCore::RenderGrid::needToStretchChildLogicalHeight):
2003 (WebCore::RenderGrid::marginLogicalHeightForChild):
2004 (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
2005 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
2006 (WebCore::RenderGrid::rowPositionForChild):
2007 (WebCore::RenderGrid::findChildLogicalPosition):
2008 (WebCore::RenderGrid::populateGridPositions): Deleted.
2009 * rendering/RenderGrid.h:
2011 2015-04-26 Doug Russell <d_russell@apple.com>
2013 AX: richer text change notifications (142719)
2014 https://bugs.webkit.org/show_bug.cgi?id=142719
2016 Reviewed by Darin Adler.
2018 Richer accessibility value change notifications. Introduce AXTextEditType,
2019 postTextStateChangeNotification and postTextReplacementNotification to give assistive
2020 tech apps more reliable context for responding to changes in web content. Also implement
2021 a mechanism to post value changes in password form fields in coalesced ticks to thwart
2022 analyzing the cadence of changes.
2024 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
2025 and an overload of postTextReplacementNotification to give assistive tech apps more
2026 reliable context for responding to changes in web content selection. Also block posting
2027 selection changes on password fields.
2029 Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
2030 platform/mac/accessibility/selection-change-userinfo.html
2031 platform/mac/accessibility/value-change-userinfo.html
2034 * WebCore.vcxproj/WebCore.vcxproj:
2035 * WebCore.vcxproj/WebCore.vcxproj.filters:
2036 * WebCore.xcodeproj/project.pbxproj:
2037 * accessibility/AXObjectCache.cpp:
2038 (WebCore::AXObjectCache::AXObjectCache):
2039 (WebCore::AXObjectCache::notificationPostTimerFired):
2040 (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
2041 (WebCore::AXObjectCache::showIntent):
2042 (WebCore::AXObjectCache::setTextSelectionIntent):
2043 (WebCore::isPasswordFieldOrContainedByPasswordField):
2044 (WebCore::AXObjectCache::postTextStateChangeNotification):
2045 (WebCore::AXObjectCache::postTextReplacementNotification):
2046 (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
2047 (WebCore::AXObjectCache::rootWebArea):
2048 (WebCore::AXObjectCache::textChangeForEditType):
2049 (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
2050 (WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
2051 * accessibility/AXObjectCache.h:
2052 (WebCore::AXObjectCache::postTextStateChangeNotification):
2053 (WebCore::AXObjectCache::postTextReplacementNotification):
2054 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2055 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2056 (WebCore::AXObjectCache::textChangeForEditType):
2057 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2058 (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
2059 (WebCore::AXObjectCache::getOrCreate): Deleted.
2060 (WebCore::AXObjectCache::attachWrapper): Deleted.
2061 * accessibility/AXTextStateChangeIntent.h: Added.
2062 (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
2063 * accessibility/AccessibilityNodeObject.cpp:
2064 (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
2065 * accessibility/AccessibilityNodeObject.h:
2066 * accessibility/AccessibilityObject.cpp:
2067 (WebCore::AccessibilityObject::isContainedByPasswordField):
2068 * accessibility/AccessibilityObject.h:
2069 (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
2070 (WebCore::AccessibilityObject::isPasswordField): Deleted.
2071 * accessibility/AccessibilityRenderObject.cpp:
2072 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2073 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2074 * accessibility/AccessibilityScrollView.h:
2075 * accessibility/atk/AXObjectCacheAtk.cpp:
2076 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2077 * accessibility/ios/AXObjectCacheIOS.mm:
2078 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2079 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2080 * accessibility/mac/AXObjectCacheMac.mm:
2081 (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
2082 (WebCore::AXPostNotificationWithUserInfo):
2083 (WebCore::AXObjectCache::postPlatformNotification):
2084 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2085 (WebCore::textReplacementChangeDictionary):
2086 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2087 * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2088 * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2089 (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
2090 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
2091 (arrayRemovingNonJSONTypes):
2092 (dictionaryRemovingNonJSONTypes):
2093 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
2094 * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
2095 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2096 (textMarkerRangeFromVisiblePositions):
2097 (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
2098 * editing/AppendNodeCommand.cpp:
2099 (WebCore::AppendNodeCommand::AppendNodeCommand):
2100 (WebCore::sendAXTextChangedIgnoringLineBreaks):
2101 (WebCore::AppendNodeCommand::doApply):
2102 (WebCore::AppendNodeCommand::doUnapply):
2103 * editing/AppendNodeCommand.h:
2104 (WebCore::AppendNodeCommand::create):
2105 * editing/ApplyStyleCommand.cpp:
2106 (WebCore::ApplyStyleCommand::ApplyStyleCommand):
2107 (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
2108 * editing/ApplyStyleCommand.h:
2109 * editing/CompositeEditCommand.cpp:
2110 (WebCore::EditCommandComposition::unapplyEditType):
2111 (WebCore::CompositeEditCommand::CompositeEditCommand):
2112 (WebCore::CompositeEditCommand::apply):
2113 (WebCore::CompositeEditCommand::insertParagraphSeparator):
2114 (WebCore::CompositeEditCommand::insertNodeBefore):
2115 (WebCore::CompositeEditCommand::appendNode):
2116 (WebCore::CompositeEditCommand::removeNodePreservingChildren):
2117 (WebCore::CompositeEditCommand::insertTextIntoNode):
2118 (WebCore::CompositeEditCommand::deleteTextFromNode):
2119 (WebCore::CompositeEditCommand::replaceTextInNode):
2120 (WebCore::CompositeEditCommand::moveParagraphs):
2121 (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
2122 (WebCore::CompositeEditCommand::applyStyle): Deleted.
2123 (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
2124 (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
2125 (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
2126 (WebCore::CompositeEditCommand::inputText): Deleted.
2127 * editing/CompositeEditCommand.h:
2128 * editing/DeleteFromTextNodeCommand.cpp:
2129 (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
2130 (WebCore::DeleteFromTextNodeCommand::doApply):
2131 (WebCore::DeleteFromTextNodeCommand::doUnapply):
2132 * editing/DeleteFromTextNodeCommand.h:
2133 (WebCore::DeleteFromTextNodeCommand::create):
2134 (WebCore::DeleteFromTextNodeCommand::deletedText):
2135 * editing/DeleteSelectionCommand.cpp:
2136 (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
2137 (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
2138 * editing/DeleteSelectionCommand.h:
2139 (WebCore::DeleteSelectionCommand::create):
2140 * editing/DictationCommand.cpp:
2141 (WebCore::DictationCommand::insertTextRunWithoutNewlines):
2142 (WebCore::DictationCommand::insertParagraphSeparator):
2143 * editing/EditAction.h:
2144 * editing/EditCommand.cpp:
2145 (WebCore::EditCommand::EditCommand):
2146 (WebCore::EditCommand::editingAction):
2147 (WebCore::EditCommand::applyEditType):
2148 (WebCore::EditCommand::unapplyEditType):
2149 (WebCore::SimpleEditCommand::SimpleEditCommand):
2150 (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
2151 (WebCore::EditCommand::setParent): Deleted.
2152 * editing/EditCommand.h:
2153 * editing/EditingAllInOne.cpp:
2154 * editing/Editor.cpp:
2155 (WebCore::Editor::handleTextEvent):
2156 (WebCore::Editor::deleteSelectionWithSmartDelete):
2157 (WebCore::Editor::replaceSelectionWithFragment):
2158 (WebCore::Editor::replaceSelectionWithText):
2159 (WebCore::Editor::appliedEditing):
2160 (WebCore::Editor::unappliedEditing):
2161 (WebCore::Editor::performCutOrCopy):
2162 (WebCore::Editor::markMisspellingsAfterTypingToWord):
2163 (WebCore::Editor::changeBackToReplacedString):
2164 (WebCore::Editor::transpose):
2165 (WebCore::Editor::changeSelectionAfterCommand):
2167 * editing/EditorCommand.cpp:
2168 (WebCore::executeInsertFragment):
2169 * editing/FrameSelection.cpp:
2170 (WebCore::FrameSelection::moveTo):
2171 (WebCore::FrameSelection::moveWithoutValidationTo):
2172 (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
2173 (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
2174 (WebCore::FrameSelection::setSelection):
2175 (WebCore::FrameSelection::updateAndRevealSelection):
2176 (WebCore::isBoundary):
2177 (WebCore::FrameSelection::textSelectionIntent):
2178 (WebCore::FrameSelection::modify):
2179 (WebCore::FrameSelection::selectAll):
2180 (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
2181 (WebCore::FrameSelection::modifyMovingBackward): Deleted.
2182 (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
2183 (WebCore::FrameSelection::selectionAtWordStart): Deleted.
2184 * editing/FrameSelection.h:
2185 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2186 (WebCore::FrameSelection::selection): Deleted.
2187 * editing/InsertIntoTextNodeCommand.cpp:
2188 (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
2189 (WebCore::InsertIntoTextNodeCommand::doApply):
2190 (WebCore::InsertIntoTextNodeCommand::doUnapply):
2191 * editing/InsertIntoTextNodeCommand.h:
2192 (WebCore::InsertIntoTextNodeCommand::create):
2193 (WebCore::InsertIntoTextNodeCommand::insertedText):
2194 * editing/InsertNodeBeforeCommand.cpp:
2195 (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
2196 (WebCore::InsertNodeBeforeCommand::doApply):
2197 (WebCore::InsertNodeBeforeCommand::doUnapply):
2198 * editing/InsertNodeBeforeCommand.h:
2199 (WebCore::InsertNodeBeforeCommand::create):
2200 * editing/InsertParagraphSeparatorCommand.cpp:
2201 (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
2202 * editing/InsertParagraphSeparatorCommand.h:
2203 (WebCore::InsertParagraphSeparatorCommand::create):
2204 * editing/InsertTextCommand.cpp:
2205 (WebCore::InsertTextCommand::InsertTextCommand):
2206 * editing/InsertTextCommand.h:
2207 (WebCore::InsertTextCommand::create):
2208 (WebCore::InsertTextCommand::createWithMarkerSupplier):
2209 * editing/MoveSelectionCommand.cpp:
2210 (WebCore::MoveSelectionCommand::doApply):
2211 * editing/RemoveNodePreservingChildrenCommand.cpp:
2212 (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
2213 * editing/RemoveNodePreservingChildrenCommand.h:
2214 (WebCore::RemoveNodePreservingChildrenCommand::create):
2215 * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
2216 (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
2217 (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
2218 * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
2219 * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
2220 (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
2221 (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
2222 * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
2223 * editing/ReplaceSelectionCommand.cpp:
2224 (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
2225 (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
2226 (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
2227 * editing/ReplaceSelectionCommand.h:
2228 (WebCore::ReplaceSelectionCommand::create):
2229 * editing/TypingCommand.cpp:
2230 (WebCore::TypingCommand::insertTextRunWithoutNewlines):
2231 (WebCore::TypingCommand::insertParagraphSeparator):
2232 * editing/atk/FrameSelectionAtk.cpp:
2233 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2234 * editing/ios/DictationCommandIOS.cpp:
2235 (WebCore::DictationCommandIOS::DictationCommandIOS):
2236 * editing/ios/DictationCommandIOS.h:
2237 * editing/mac/FrameSelectionMac.mm:
2238 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2239 * html/HTMLTextFormControlElement.cpp:
2240 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2241 * page/DragController.cpp:
2242 (WebCore::DragController::concludeEditDrag):
2243 * page/EventHandler.cpp:
2244 (WebCore::setInitialKeyboardSelection):
2245 * page/FocusController.cpp:
2246 (WebCore::FocusController::advanceFocusInDocumentOrder):
2248 2015-04-26 Darin Adler <darin@apple.com>
2250 REGRESSION (r176751): line-height ignored in <button> elements
2251 https://bugs.webkit.org/show_bug.cgi?id=144234
2253 Reviewed by Antti Koivisto.
2255 Test: fast/forms/button-line-height.html
2257 The theme code was overriding line heights on all themed form controls.
2258 Instead it should have only overridden line height when the theme overrides the font.
2259 For <input type=button> on Mac, the theme always overrides the font, but for
2260 other elements like <button> it does not.
2262 * platform/Theme.h: Changed controlFont to return an Optional so we can tell
2263 when the theme is overriding the font. Otherwise if the font from the user-agent
2264 style sheet and the font from the theme are the same, we will think we are not
2265 overriding the font when we actually are.
2267 * platform/mac/ThemeMac.h: Updated controlFont to return Optional.
2268 * platform/mac/ThemeMac.mm:
2269 (WebCore::ThemeMac::controlFont): Ditto.
2271 * rendering/RenderTheme.cpp:
2272 (WebCore::RenderTheme::adjustStyle): Set line height only if the font is
2273 overriden by the theme, all the time for PushButtonPart on Mac, and not at all
2274 for other parts. Also tightened up the logic a little since RenderStyle's
2275 setFontDescription already does an "==" comparison; we don't have to do
2278 2015-04-26 Darin Adler <darin@apple.com>
2280 REGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
2281 https://bugs.webkit.org/show_bug.cgi?id=137163
2283 Reviewed by Andy Estes.
2285 Test: fast/notifications/request-notification-permission-while-reloading.html
2287 The test doesn't crash under WebKit2, but that's still OK for our purposes.
2289 * Modules/notifications/NotificationCenter.cpp:
2290 (WebCore::NotificationCenter::NotificationCenter): Initialize m_timer.
2291 (WebCore::NotificationCenter::createNotification): Moved here from the header.
2292 (WebCore::NotificationCenter::requestPermission): Start the timer and ref the notification
2293 center when we need to defer a callback. Also use a lambda for the callback and changed
2294 the argument to match what the bindings actually pass. Before we said PassRefPtr, but the
2295 bindings were not transferring ownership of the VoidCallback. The new type is a little
2296 strange but it's consistent with how the bindings work right now.
2297 (WebCore::NotificationCenter::timerFired): Added. Calls all the callbacks, then does a deref
2298 to match the ref we did above.
2299 (WebCore::NotificationCenter::requestTimedOut): Deleted.
2300 (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): Deleted.
2301 (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): Deleted.
2302 (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): Deleted.
2303 (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): Deleted.
2305 * Modules/notifications/NotificationCenter.h: Reorganized the header to be a bit more tidy.
2306 Changed the argument type for requestPermission to match the reality of what's passed by the
2307 bindings. Removed NotificationRequestCallback and replaced the m_callbacks HashSet with a
2308 vector of std::function.
2310 2015-04-26 Simon Fraser <simon.fraser@apple.com>
2312 Modernize animations code
2313 https://bugs.webkit.org/show_bug.cgi?id=144196
2315 Reviewed by Darin Adler.
2317 General cleanup in animation-related code.
2319 Use C++ references where possible. Use modern loops. Make classes fast-allocated.
2320 Use C++11 member initialization. Order member variables to optimize packing.
2322 This removes some null checks in CompositeAnimation, but the values in m_transitions
2323 and m_keyframeAnimations can never be null.
2327 * page/animation/AnimationBase.cpp:
2328 (WebCore::AnimationBase::AnimationBase):
2329 (WebCore::AnimationBase::animationsMatch):
2330 (WebCore::AnimationBase::updateStateMachine):
2331 (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2332 (WebCore::AnimationBase::beginAnimationUpdateTime):
2333 (WebCore::AnimationBase::getElapsedTime):
2334 * page/animation/AnimationBase.h:
2335 (WebCore::AnimationBase::animation):
2336 (WebCore::AnimationBase::setAnimation):
2337 * page/animation/AnimationController.cpp:
2338 (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
2339 (WebCore::AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
2340 * page/animation/CompositeAnimation.cpp:
2341 (WebCore::CompositeAnimation::CompositeAnimation):
2342 (WebCore::CompositeAnimation::clearRenderer):
2343 (WebCore::CompositeAnimation::updateTransitions):
2344 (WebCore::CompositeAnimation::updateKeyframeAnimations):
2345 (WebCore::CompositeAnimation::animate):
2346 (WebCore::CompositeAnimation::getAnimatedStyle):
2347 (WebCore::CompositeAnimation::timeToNextService):
2348 (WebCore::CompositeAnimation::getAnimationForProperty):
2349 (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2350 (WebCore::CompositeAnimation::suspendAnimations):
2351 (WebCore::CompositeAnimation::resumeAnimations):
2352 (WebCore::CompositeAnimation::overrideImplicitAnimations):
2353 (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
2354 (WebCore::CompositeAnimation::isAnimatingProperty):
2355 (WebCore::CompositeAnimation::pauseTransitionAtTime):
2356 (WebCore::CompositeAnimation::numberOfActiveAnimations):
2357 * page/animation/CompositeAnimation.h:
2358 (WebCore::CompositeAnimation::create):
2359 (WebCore::CompositeAnimation::animationController):
2360 * page/animation/ImplicitAnimation.cpp:
2361 (WebCore::ImplicitAnimation::ImplicitAnimation):
2362 (WebCore::ImplicitAnimation::sendTransitionEvent):
2363 * page/animation/ImplicitAnimation.h:
2364 (WebCore::ImplicitAnimation::create):
2365 * page/animation/KeyframeAnimation.cpp:
2366 (WebCore::KeyframeAnimation::KeyframeAnimation):
2367 (WebCore::KeyframeAnimation::animate):
2368 (WebCore::KeyframeAnimation::getAnimatedStyle):
2369 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2370 (WebCore::KeyframeAnimation::startAnimation):
2371 (WebCore::KeyframeAnimation::sendAnimationEvent):
2372 (WebCore::KeyframeAnimation::overrideAnimations):
2373 (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
2374 (WebCore::KeyframeAnimation::timeToNextService):
2375 * page/animation/KeyframeAnimation.h:
2376 * platform/animation/Animation.cpp:
2377 (WebCore::Animation::animationsMatch):
2378 * platform/animation/Animation.h:
2379 * rendering/RenderLayer.cpp:
2380 (WebCore::RenderLayer::paint):
2381 (WebCore::performOverlapTests):
2382 * rendering/style/KeyframeList.h:
2383 (WebCore::KeyframeList::properties):
2384 (WebCore::KeyframeList::keyframes):
2385 (WebCore::KeyframeList::beginProperties): Deleted.
2386 (WebCore::KeyframeList::endProperties): Deleted.
2387 (WebCore::KeyframeList::operator[]): Deleted.
2388 * rendering/style/RenderStyle.h:
2390 2015-04-25 Simon Fraser <simon.fraser@apple.com>
2392 Expand compositing coverage rect when scrolling and animating
2393 https://bugs.webkit.org/show_bug.cgi?id=144214
2394 rdar://problem/20695926
2396 Reviewed by Darin Adler.
2398 r183300 added a secondary rect that gets mapped through graphics layers during
2399 layer flushing, which represents a rect, in layer coordinates, that represents
2400 the portion of this layer that's visible in the viewport.
2402 This patch extends that rect based on scrolling and animating, with the extended
2403 coverage rect being mapped into descendants (where it's used to determine whether
2404 they should detach their backing store). This required moving the responsibility for
2405 extending the coverage rect from TileController (where it was used to compute
2406 tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept
2407 of coverage rect, and pushes it onto TileControllers.
2409 Test: compositing/tiling/transform-origin-tiled.html
2411 * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto
2412 TiledBacking from outside; new functions reflect that.
2413 * platform/graphics/ca/GraphicsLayerCA.cpp:
2414 (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass
2415 old visible rect to commitLayerChangesBeforeSublayers.
2416 (WebCore::accumulatesTransform):
2417 (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(),
2418 then adjustCoverageRect() which adjusts for scrolling and animations.
2419 (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the
2420 TransformState, but we can only use this if mapping it through various transforms didn't clamp
2421 it (which can happen with severe rotations in perspective).
2422 (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing,
2423 ask the TileController to do coverage adjustment (code which should move into here eventually).
2424 For other tiled layers, do motion-based adjustment. This should really be done for all layers
2425 (an animating non-tiled layer may contain a tiled layer).
2426 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed
2427 any more; layers only react to changed in coverage rect now.
2428 (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the
2429 coverage rect, here we push the new rect back into the TransformState so it will affect
2431 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2432 (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go
2434 (WebCore::GraphicsLayerCA::changeLayerTypeTo):
2435 (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted.
2436 (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted.
2437 (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted.
2438 * platform/graphics/ca/GraphicsLayerCA.h:
2439 * platform/graphics/ca/TileController.cpp:
2440 (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance
2442 (WebCore::TileController::setCoverageRect):
2443 (WebCore::TileController::tilesWouldChangeForCoverageRect):
2444 (WebCore::TileController::revalidateTiles):
2445 (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect()
2446 is called at the top of committing the owning layer, we haven't yet pushed a new size to the
2447 underlying platform layer (which TileController::bounds() consults).
2448 (WebCore::TileController::bounds):
2449 (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the
2450 underlying layer hasn't been updated yet.
2451 (WebCore::TileController::didRevalidateTiles):
2452 (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted.
2453 * platform/graphics/ca/TileController.h:
2454 * platform/graphics/ca/TileCoverageMap.cpp:
2455 (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows
2456 a dark blue outline for the coverage rect.
2457 (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top
2458 content inset is non-zero.
2459 * platform/graphics/ca/TileCoverageMap.h:
2460 * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now.
2461 (WebCore::TileGrid::tilesWouldChangeForCoverageRect):
2462 (WebCore::TileGrid::revalidateTiles):
2463 (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted.
2464 * platform/graphics/ca/TileGrid.h:
2465 * platform/graphics/transforms/TransformState.cpp:
2466 (WebCore::TransformState::operator=):
2467 (WebCore::TransformState::mappedQuad): Pass direction into mapQuad().
2468 (WebCore::TransformState::mappedSecondaryQuad): Ditto.
2469 (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller
2470 to pass in a secondary quad, and get it mapped into the coordinate space of the last
2471 "flattening" state (since the TransformState may have in-flight XY offset, or transform).
2472 This mapping is achieved by re-using mapQuad(), but in the inverse direction.
2473 (WebCore::TransformState::mapQuad): Make direction a parameter.
2474 (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary
2475 quad. Failure was detected by tests.
2476 * platform/graphics/transforms/TransformState.h:
2477 (WebCore::TransformState::isMappingSecondaryQuad):
2478 (WebCore::TransformState::direction):
2479 (WebCore::TransformState::inverseDirection):
2480 (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted.
2482 2015-04-25 Dan Bernstein <mitz@apple.com>
2484 Updated expected bindings generation test results after r183343.
2486 * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
2487 * bindings/scripts/test/ObjC/DOMTestCallback.h:
2488 * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
2489 * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
2490 * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
2491 * bindings/scripts/test/ObjC/DOMTestException.h:
2492 * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
2493 * bindings/scripts/test/ObjC/DOMTestInterface.h:
2494 * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
2495 * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
2496 * bindings/scripts/test/ObjC/DOMTestNode.h:
2497 * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
2498 * bindings/scripts/test/ObjC/DOMTestObj.h:
2499 * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
2500 * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
2501 * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
2502 * bindings/scripts/test/ObjC/DOMattribute.h:
2503 * bindings/scripts/test/ObjC/DOMreadonly.h:
2505 2015-04-25 Myles C. Maxfield <mmaxfield@apple.com>
2507 font-synthesis's initial value is "style weight"
2508 https://bugs.webkit.org/show_bug.cgi?id=144195
2510 Reviewed by Darin Adler.
2512 Updated fast/css3-text/font-synthesis-parse.html.
2514 * rendering/style/RenderStyle.h:
2516 2015-04-25 Commit Queue <commit-queue@webkit.org>
2518 Unreviewed, rolling out r183305.
2519 https://bugs.webkit.org/show_bug.cgi?id=144213
2521 Crashes on wikipedia (Requested by litherum on #webkit).
2525 "[Cocoa] FontPlatformData's equality check should always use
2527 https://bugs.webkit.org/show_bug.cgi?id=144168
2528 http://trac.webkit.org/changeset/183305
2530 2015-04-25 Dan Bernstein <mitz@apple.com>
2532 WebCore part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
2533 https://bugs.webkit.org/show_bug.cgi?id=144201
2535 Reviewed by Darin Adler.
2537 Instead of TBD, use the high version number to which it corresponds in CFAvailability.h,
2540 * bindings/objc/WebKitAvailability.h: Added a definition of __NSi_9876_5, so that we can
2541 use 9876_5 in availability macros. Removed the definition of
2542 __AVAILABILITY_INTERNAL__MAC_TBD, which will no longer be used.
2544 * bindings/scripts/CodeGeneratorObjC.pm:
2545 (ReadPublicInterfaces): Use 9876_5 instead of TBD.
2547 2015-04-25 Timothy Hatcher <timothy@apple.com>
2549 Update localized strings.
2551 * English.lproj/Localizable.strings: Updated.
2553 2015-04-25 Darin Adler <darin@apple.com>
2555 Crash if IDBTransaction is aborted right after it's created
2556 https://bugs.webkit.org/show_bug.cgi?id=144199
2558 Reviewed by Simon Fraser.
2560 Test: storage/indexeddb/transaction-abort.html
2562 * Modules/indexeddb/IDBTransactionBackend.cpp:
2563 (WebCore::IDBTransactionBackend::IDBTransactionBackend): Don't start the
2564 transaction if it is already complete (has been aborted).
2566 2015-04-25 Martin Robinson <mrobinson@igalia.com>
2568 Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
2569 https://bugs.webkit.org/show_bug.cgi?id=144182
2571 Reviewed by Simon Fraser.
2573 * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2574 * WebCore.vcxproj/WebCoreCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2575 * WebCore.vcxproj/WebCoreTestSupportCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2576 * css/CSSComputedStyleDeclaration.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2577 * css/MediaQueryEvaluator.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2578 * platform/graphics/GraphicsContext.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2579 * platform/graphics/cairo/GraphicsContextCairo.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2580 * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2581 * rendering/RenderLayer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2582 * rendering/RenderLayerCompositor.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2583 * rendering/RenderObject.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2585 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2587 [Cocoa] FontPlatformData's equality check should always use reference URLs
2588 https://bugs.webkit.org/show_bug.cgi?id=144168
2590 Reviewed by Tim Horton.
2592 <rdar://problem/18985642> is not fixed, so we need to continue using the older
2593 objectForEqualityCheck().
2595 No new tests because there is no behavior change.
2597 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2598 (WebCore::FontPlatformData::objectForEqualityCheck):
2600 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2602 Implement parsing support for font-synthesis CSS property
2603 https://bugs.webkit.org/show_bug.cgi?id=144180
2604 <rdar://problem/20692791>
2605 <rdar://problem/20625024>
2607 Reviewed by Tim Horton.
2609 See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop
2611 This property allows web authors to opt out of font synthesis. This patch only
2612 implements parsing support for the property.
2614 Test: fast/css3-text/font-synthesis-parse.html
2616 * css/CSSComputedStyleDeclaration.cpp:
2617 (WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
2618 (WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
2619 * css/CSSParser.cpp:
2620 (WebCore::CSSParser::parseValue): Call parseFontSynthesis().
2621 (WebCore::CSSParser::parseFontSynthesis): Accept the grammar
2622 "none | [ weight || style ]"
2623 * css/CSSParser.h: Function signature.
2624 * css/CSSPropertyNames.in: New CSS property name.
2625 * css/CSSValueKeywords.in: New CSS value names.
2626 * css/StyleBuilderCustom.h:
2627 (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
2628 representation of font-synthesis for a given CSSValue.
2629 * rendering/style/RenderStyle.h: Function signature.
2630 * rendering/style/RenderStyleConstants.h: Internal representation of
2632 * rendering/style/StyleRareInheritedData.h: Where we actually store the bits
2633 related to this internal representation.
2635 2015-04-24 Simon Fraser <simon.fraser@apple.com>
2637 Have the web inspector report accurate memory use for layers with detached backing store
2638 https://bugs.webkit.org/show_bug.cgi?id=144179
2640 Reviewed by Dean Jackson.
2642 Only report memory use for layers whose backing store is attached.
2644 * platform/graphics/ca/GraphicsLayerCA.cpp:
2645 * platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
2646 which platforms can override if they allow backing store detaching.
2648 2015-04-24 Simon Fraser <simon.fraser@apple.com>
2650 Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
2651 https://bugs.webkit.org/show_bug.cgi?id=144165
2653 Reviewed by Dean Jackson.
2655 Push in the clipRect as the secondary rect when doing a GraphicsLayerCA flush,
2656 which maps this rect through all the layers. Each layer tests intersection with
2657 this rect to determine if its backing store should be attached.
2659 This will cause us to drop backing store for layers that don't intersect the
2660 visible part of the view, which is too aggressive. A future patch will add
2663 Tests: compositing/visible-rect/coverage-clipped.html
2664 compositing/visible-rect/coverage-scrolling.html
2666 * platform/graphics/ca/GraphicsLayerCA.cpp:
2667 (WebCore::GraphicsLayerCA::GraphicsLayerCA): Remove initialization of things with
2668 C++11 initializers. Initialize the new m_intersectsCoverageRect bit.
2669 (WebCore::GraphicsLayerCA::flushCompositingState): Push the clipRect in as the
2670 secondary coverage rect. A future patch will inflate this on the way down the tree.
2671 (WebCore::GraphicsLayerCA::computeVisibleRect): If we're clipping, and
2672 we have a secondary coverage rect, that rect can be clipped to us too.
2673 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2674 (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2675 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2676 (WebCore::GraphicsLayerCA::updateBackingStoreAttachment):
2677 (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
2678 * platform/graphics/ca/GraphicsLayerCA.h: New CoverageRectChanged bit.
2679 Use more C++11 initializers.
2680 (WebCore::GraphicsLayerCA::coverageRect):
2682 2015-04-24 Dean Jackson <dino@apple.com>
2684 AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
2685 https://bugs.webkit.org/show_bug.cgi?id=144173
2686 <rdar://problem/20526168>
2688 Reviewed by Simon Fraser.
2690 Keep a list of Animations that care about scroll updates, and only
2691 run the animation update if the list is not empty.
2693 Covered by existing tests.
2695 * page/animation/AnimationBase.cpp:
2696 (WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
2697 if this is an animation that depends on scrolling.
2698 * page/animation/AnimationController.cpp:
2699 (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
2700 new removeFromAnimationsDependentOnScroll as this animation is deleted.
2701 (WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
2702 (WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
2703 (WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
2704 there are animations that care.
2705 (WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
2707 * page/animation/AnimationController.h:
2708 * page/animation/AnimationControllerPrivate.h:
2709 (WebCore::AnimationControllerPrivate::wantsScrollUpdates):
2711 2015-04-24 Tim Horton <timothy_horton@apple.com>
2713 WKPDFView does not support password-protected PDFs
2714 https://bugs.webkit.org/show_bug.cgi?id=144162
2715 <rdar://problem/18411512>
2717 Reviewed by Andy Estes.
2719 * English.lproj/Localizable.strings:
2720 Add some localizable strings.
2722 2015-04-24 David Kilzer <ddkilzer@apple.com>
2724 Fix iOS EWS builds after updating to iOS 8.3 SDK
2726 * platform/spi/cocoa/CoreTextSPI.h:
2727 * rendering/RenderThemeIOS.mm:
2728 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2729 - Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.
2731 2015-04-24 Jer Noble <jer.noble@apple.com>
2733 Unreviewed iOS build fix; add declarations to AVKitSPI.h
2735 * platform/spi/cocoa/AVKitSPI.h:
2737 2015-04-24 Enrica Casucci <enrica@apple.com>
2739 Make rangeExpandedAroundPositionByCharacters to all platforms.
2740 https://bugs.webkit.org/show_bug.cgi?id=144161
2742 Reviewed by Tim Horton.
2744 No change in functionality, simply making this available
2747 * editing/VisibleUnits.cpp:
2748 (WebCore::rangeExpandedAroundPositionByCharacters):
2749 * editing/VisibleUnits.h:
2750 * editing/mac/DataDetection.mm:
2751 * editing/mac/DictionaryLookup.h:
2752 * editing/mac/DictionaryLookup.mm:
2753 (WebCore::rangeExpandedAroundPositionByCharacters): Deleted.
2755 2015-04-24 Andreas Kling <akling@apple.com>
2757 Purge PassRefPtr from NamedNodeMap.
2758 <https://webkit.org/b/144091>
2760 Reviewed by Antti Koivisto.
2762 Use RefPtr instead of PassRefPtr in NamedNodeMap.
2764 * dom/NamedNodeMap.cpp:
2765 (WebCore::NamedNodeMap::getNamedItem):
2766 (WebCore::NamedNodeMap::getNamedItemNS):
2767 (WebCore::NamedNodeMap::removeNamedItem):
2768 (WebCore::NamedNodeMap::removeNamedItemNS):
2769 (WebCore::NamedNodeMap::setNamedItem):
2770 (WebCore::NamedNodeMap::setNamedItemNS):
2771 (WebCore::NamedNodeMap::item):
2772 * dom/NamedNodeMap.h:
2774 2015-04-24 Commit Queue <commit-queue@webkit.org>
2776 Unreviewed, rolling out r183266.
2777 https://bugs.webkit.org/show_bug.cgi?id=144164
2779 Broke 32-bit build and a test. (Requested by ap on #webkit).
2783 "AX: richer text change notifications (142719)"
2784 https://bugs.webkit.org/show_bug.cgi?id=142719
2785 http://trac.webkit.org/changeset/183266
2787 2015-04-24 Brady Eidson <beidson@apple.com>
2789 Origin header is preserved on cross-origin redirects.
2790 https://bugs.webkit.org/show_bug.cgi?id=144157.
2792 Reviewed by Sam Weinig.
2794 Tests: http/tests/security/cors-post-redirect-301.html
2795 http/tests/security/cors-post-redirect-302.html
2796 http/tests/security/cors-post-redirect-307.html
2797 http/tests/security/cors-post-redirect-308.html
2799 * platform/network/cf/ResourceHandleCFNet.cpp:
2800 (WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
2801 * platform/network/mac/ResourceHandleMac.mm:
2802 (WebCore::ResourceHandle::willSendRequest): Ditto.
2804 2015-04-24 Brent Fulgham <bfulgham@apple.com>
2806 Immediate action not functional for embedded PDFs
2807 https://bugs.webkit.org/show_bug.cgi?id=143952
2808 <rdar://problem/19842365>
2810 Reviewed by Tim Horton.
2812 Add a dictionary lookup method to allow us to retrieve
2813 relevant information for PDFs.
2815 * editing/mac/DictionaryLookup.mm:
2816 (WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
2817 where the Lookup engine selects a smaller range than the initial automatic
2818 selection performed on clicking.
2820 2015-04-24 Simon Fraser <simon.fraser@apple.com>
2822 Make it possible to map a secondary quad through TransformState
2823 https://bugs.webkit.org/show_bug.cgi?id=144156
2825 Reviewed by Dean Jackson.
2827 A future patch will need to map two quads simultaneously through TransformState,
2828 so add the ability to provide an optional secondary quad.
2830 This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
2831 requiring the state to be flattened when setting the quad (and now, the secondary quad).
2832 Previously, setQuad implicitly flattened but failed to update m_mapPoint when
2835 * platform/graphics/ca/GraphicsLayerCA.cpp:
2836 (WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
2837 before setting the quad.
2838 * platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
2839 * platform/graphics/transforms/TransformState.cpp:
2840 (WebCore::TransformState::operator=): Copy the secondary quad if we have one.
2841 (WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
2843 (WebCore::TransformState::mappedQuad): Code factored into mapQuad().
2844 (WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
2845 into the state's current coordinate space.
2846 (WebCore::TransformState::mapQuad): Factored code.
2847 * platform/graphics/transforms/TransformState.h:
2848 (WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
2849 (WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
2850 (WebCore::TransformState::lastPlanarSecondaryQuad):
2851 (WebCore::TransformState::lastPlanarQuad): Deleted.
2853 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2855 [iOS] Reimplement r182512 and r183153 in a cleaner way
2856 https://bugs.webkit.org/show_bug.cgi?id=144151
2858 Reviewed by Enrica Casucci.
2860 On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
2861 This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
2862 react to this fact by making users of a FontPlatformData use the original font passed in
2863 to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
2864 detect that the FontPlatformData represents a system font (the underlying APIs have
2865 different behavior for system fonts and non-system-fonts).
2867 However, on OS X, we create a FontPlatformData's ctFont() directly from the original
2868 font passed in to the constructor. This preserves system-font-ness (because it no
2869 longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
2870 correct behavior regarding system fonts.
2872 The difference between the two ctFont() creation codepaths seems to be historical
2873 rather than intentional. Rather than change all the call sites of ctFont() to use a
2874 different platform font object if a system font is detected, a cleaner solution is to
2875 simply unify the two ctFont() creation codepaths to the version which preserves system-
2876 font-ness. Doing this will make all users of FontPlatformData automatically have the
2877 correct behavior with no updates.
2879 This patch reverts the relevant parts of r182512 and r183153 in favor of this new
2882 No new tests because there is no behavior change.
2884 * platform/graphics/FontPlatformData.h:
2885 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2886 * platform/graphics/cocoa/FontCocoa.mm:
2887 (WebCore::Font::platformWidthForGlyph):
2888 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2889 (WebCore::FontPlatformData::ctFontSize):
2890 (WebCore::FontPlatformData::ctFont):
2891 * platform/graphics/mac/SimpleFontDataCoreText.cpp:
2892 (WebCore::Font::getCFStringAttributes):
2894 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2896 Unreviewed build fix.
2898 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2899 (WebCore::FontPlatformData::FontPlatformData):
2901 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2903 [Cocoa] Start cleaning up FontPlatformData
2904 https://bugs.webkit.org/show_bug.cgi?id=144133
2906 Reviewed by Enrica Casucci.
2908 This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
2909 FontPlatformData. This patch starts this effort out by removing the FontPlatformData
2910 constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
2911 and forwards to another constructor. This patch moves this cast to callers of this constructor,
2912 thereby enumerating the places we have left that use NSFont with FontPlatformData.
2914 This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to
2915 a common constructor.
2917 This patch also collects places inside FontPlatformDataCocoa.mm where we check if a pointer is
2918 not 0 and not -1, and puts this common code inside a new function,
2919 FontPlatformData::isValidCTFontRef().
2921 No new tests because there is no behavior change.
2923 * platform/graphics/FontPlatformData.cpp:
2924 (WebCore::FontPlatformData::FontPlatformData): Coalesce constructors.
2925 * platform/graphics/FontPlatformData.h:
2926 (WebCore::FontPlatformData::isValidCTFontRef): Check if a pointer is not 0 and not -1.
2927 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2928 * platform/graphics/cocoa/FontCocoa.mm:
2929 (WebCore::Font::platformCreateScaledFont): Receive cast which has been hoisted from the deleted
2930 FontPlatformData constructor.
2931 (WebCore::Font::compositeFontReferenceFont): Ditto.
2932 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2933 (WebCore::FontPlatformData::~FontPlatformData): Use isValidCTFontRef().
2934 (WebCore::FontPlatformData::platformDataInit): Ditto.
2935 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2936 (WebCore::FontPlatformData::platformIsEqual): Simplify preprocessor macros.
2937 (WebCore::FontPlatformData::allowsLigatures): Remove unnecessary NSFont use.
2938 (WebCore::FontPlatformData::FontPlatformData): Deleted.
2939 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2940 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Remove unnecessary
2942 * platform/graphics/mac/FontCacheMac.mm:
2943 (WebCore::FontCache::systemFallbackForCharacters): Receive cast which has been hoisted from the
2944 deleted FontPlatformData constructor.
2945 (WebCore::FontCache::createFontPlatformData): Ditto.
2946 * platform/mac/DragImageMac.mm:
2947 (WebCore::fontFromNSFont): Ditto.
2948 (WebCore::widthWithFont): Ditto.
2949 (WebCore::drawAtPoint): Ditto.
2951 2015-04-24 Doug Russell <d_russell@apple.com>
2953 AX: richer text change notifications (142719)
2954 https://bugs.webkit.org/show_bug.cgi?id=142719
2956 Reviewed by Darin Adler.
2958 Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
2960 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
2962 Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
2963 platform/mac/accessibility/selection-change-userinfo.html
2964 platform/mac/accessibility/value-change-userinfo.html
2967 * WebCore.vcxproj/WebCore.vcxproj:
2968 * WebCore.vcxproj/WebCore.vcxproj.filters:
2969 * WebCore.xcodeproj/project.pbxproj:
2970 * accessibility/AXObjectCache.cpp:
2971 (WebCore::AXObjectCache::AXObjectCache):
2972 (WebCore::AXObjectCache::notificationPostTimerFired):
2973 (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
2974 (WebCore::AXObjectCache::showIntent):
2975 (WebCore::AXObjectCache::setTextSelectionIntent):
2976 (WebCore::isPasswordFieldOrContainedByPasswordField):
2977 (WebCore::AXObjectCache::postTextStateChangeNotification):
2978 (WebCore::AXObjectCache::postTextReplacementNotification):
2979 (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
2980 (WebCore::AXObjectCache::rootWebArea):
2981 (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
2982 * accessibility/AXObjectCache.h:
2983 (WebCore::AXObjectCache::postTextStateChangeNotification):
2984 (WebCore::AXObjectCache::postTextReplacementNotification):
2985 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2986 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2987 (WebCore::AXObjectCache::textChangeForEditType):
2988 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2989 (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
2990 (WebCore::AXObjectCache::getOrCreate): Deleted.
2991 (WebCore::AXObjectCache::attachWrapper): Deleted.
2992 * accessibility/AXTextStateChangeIntent.h: Added.
2993 (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
2994 * accessibility/AccessibilityNodeObject.cpp:
2995 (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
2996 * accessibility/AccessibilityNodeObject.h:
2997 * accessibility/AccessibilityObject.cpp:
2998 (WebCore::AccessibilityObject::isContainedByPasswordField):
2999 * accessibility/AccessibilityObject.h:
3000 (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
3001 (WebCore::AccessibilityObject::isPasswordField): Deleted.
3002 * accessibility/AccessibilityRenderObject.cpp:
3003 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3004 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
3005 * accessibility/AccessibilityScrollView.h:
3006 * accessibility/atk/AXObjectCacheAtk.cpp:
3007 (WebCore::AXObjectCache::textChangeForEditType):
3008 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3009 (WebCore::AXObjectCache::postPlatformNotification): Deleted.
3010 * accessibility/ios/AXObjectCacheIOS.mm:
3011 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3012 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3013 * accessibility/mac/AXObjectCacheMac.mm:
3014 (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
3015 (WebCore::AXPostNotificationWithUserInfo):
3016 (WebCore::AXObjectCache::postPlatformNotification):
3017 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3018 (WebCore::textReplacementChangeDictionary):
3019 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3020 * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
3021 * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
3022 (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
3023 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
3024 (arrayRemovingNonJSONTypes):
3025 (dictionaryRemovingNonJSONTypes):
3026 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
3027 * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
3028 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3029 (textMarkerRangeFromVisiblePositions):
3030 (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
3031 * editing/AppendNodeCommand.cpp:
3032 (WebCore::AppendNodeCommand::AppendNodeCommand):
3033 (WebCore::sendAXTextChangedIgnoringLineBreaks):
3034 (WebCore::AppendNodeCommand::doApply):
3035 (WebCore::AppendNodeCommand::doUnapply):
3036 * editing/AppendNodeCommand.h:
3037 (WebCore::AppendNodeCommand::create):
3038 * editing/ApplyStyleCommand.cpp:
3039 (WebCore::ApplyStyleCommand::ApplyStyleCommand):
3040 (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
3041 * editing/ApplyStyleCommand.h:
3042 * editing/CompositeEditCommand.cpp:
3043 (WebCore::EditCommandComposition::unapplyEditType):
3044 (WebCore::CompositeEditCommand::CompositeEditCommand):
3045 (WebCore::CompositeEditCommand::apply):
3046 (WebCore::CompositeEditCommand::insertParagraphSeparator):
3047 (WebCore::CompositeEditCommand::insertNodeBefore):
3048 (WebCore::CompositeEditCommand::appendNode):
3049 (WebCore::CompositeEditCommand::removeNodePreservingChildren):
3050 (WebCore::CompositeEditCommand::insertTextIntoNode):
3051 (WebCore::CompositeEditCommand::deleteTextFromNode):
3052 (WebCore::CompositeEditCommand::replaceTextInNode):
3053 (WebCore::CompositeEditCommand::moveParagraphs):
3054 (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
3055 (WebCore::CompositeEditCommand::applyStyle): Deleted.
3056 (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
3057 (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
3058 (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
3059 (WebCore::CompositeEditCommand::inputText): Deleted.
3060 * editing/CompositeEditCommand.h:
3061 * editing/DeleteFromTextNodeCommand.cpp:
3062 (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
3063 (WebCore::DeleteFromTextNodeCommand::doApply):
3064 (WebCore::DeleteFromTextNodeCommand::doUnapply):
3065 * editing/DeleteFromTextNodeCommand.h:
3066 (WebCore::DeleteFromTextNodeCommand::create):
3067 (WebCore::DeleteFromTextNodeCommand::deletedText):
3068 * editing/DeleteSelectionCommand.cpp:
3069 (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
3070 (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
3071 * editing/DeleteSelectionCommand.h:
3072 (WebCore::DeleteSelectionCommand::create):
3073 * editing/DictationCommand.cpp:
3074 (WebCore::DictationCommand::insertTextRunWithoutNewlines):
3075 (WebCore::DictationCommand::insertParagraphSeparator):
3076 * editing/EditAction.h:
3077 * editing/EditCommand.cpp:
3078 (WebCore::EditCommand::EditCommand):
3079 (WebCore::EditCommand::editingAction):
3080 (WebCore::EditCommand::applyEditType):
3081 (WebCore::EditCommand::unapplyEditType):
3082 (WebCore::SimpleEditCommand::SimpleEditCommand):
3083 (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
3084 (WebCore::EditCommand::setParent): Deleted.
3085 * editing/EditCommand.h:
3086 * editing/EditingAllInOne.cpp:
3087 * editing/Editor.cpp:
3088 (WebCore::Editor::handleTextEvent):
3089 (WebCore::Editor::deleteSelectionWithSmartDelete):
3090 (WebCore::Editor::replaceSelectionWithFragment):
3091 (WebCore::Editor::replaceSelectionWithText):
3092 (WebCore::Editor::appliedEditing):
3093 (WebCore::Editor::unappliedEditing):
3094 (WebCore::Editor::performCutOrCopy):
3095 (WebCore::Editor::markMisspellingsAfterTypingToWord):
3096 (WebCore::Editor::changeBackToReplacedString):
3097 (WebCore::Editor::transpose):
3098 (WebCore::Editor::changeSelectionAfterCommand):
3100 * editing/EditorCommand.cpp:
3101 (WebCore::executeInsertFragment):
3102 * editing/FrameSelection.cpp:
3103 (WebCore::FrameSelection::moveTo):
3104 (WebCore::FrameSelection::moveWithoutValidationTo):
3105 (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
3106 (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
3107 (WebCore::FrameSelection::setSelection):
3108 (WebCore::FrameSelection::updateAndRevealSelection):
3109 (WebCore::isBoundary):
3110 (WebCore::FrameSelection::textSelectionIntent):
3111 (WebCore::FrameSelection::modify):
3112 (WebCore::FrameSelection::selectAll):
3113 (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
3114 (WebCore::FrameSelection::modifyMovingBackward): Deleted.
3115 (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
3116 (WebCore::FrameSelection::selectionAtWordStart): Deleted.
3117 * editing/FrameSelection.h:
3118 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3119 (WebCore::FrameSelection::selection): Deleted.
3120 * editing/InsertIntoTextNodeCommand.cpp:
3121 (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
3122 (WebCore::InsertIntoTextNodeCommand::doApply):
3123 (WebCore::InsertIntoTextNodeCommand::doUnapply):
3124 * editing/InsertIntoTextNodeCommand.h:
3125 (WebCore::InsertIntoTextNodeCommand::create):
3126 (WebCore::InsertIntoTextNodeCommand::insertedText):
3127 * editing/InsertNodeBeforeCommand.cpp:
3128 (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
3129 (WebCore::InsertNodeBeforeCommand::doApply):
3130 (WebCore::InsertNodeBeforeCommand::doUnapply):
3131 * editing/InsertNodeBeforeCommand.h:
3132 (WebCore::InsertNodeBeforeCommand::create):
3133 * editing/InsertParagraphSeparatorCommand.cpp:
3134 (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
3135 * editing/InsertParagraphSeparatorCommand.h:
3136 (WebCore::InsertParagraphSeparatorCommand::create):
3137 * editing/InsertTextCommand.cpp:
3138 (WebCore::InsertTextCommand::InsertTextCommand):
3139 * editing/InsertTextCommand.h:
3140 (WebCore::InsertTextCommand::create):
3141 (WebCore::InsertTextCommand::createWithMarkerSupplier):
3142 * editing/MoveSelectionCommand.cpp:
3143 (WebCore::MoveSelectionCommand::doApply):
3144 * editing/RemoveNodePreservingChildrenCommand.cpp:
3145 (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
3146 * editing/RemoveNodePreservingChildrenCommand.h:
3147 (WebCore::RemoveNodePreservingChildrenCommand::create):
3148 * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3149 (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
3150 (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
3151 * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3152 * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
3153 (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
3154 (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
3155 * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
3156 * editing/ReplaceSelectionCommand.cpp:
3157 (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
3158 (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
3159 (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
3160 * editing/ReplaceSelectionCommand.h:
3161 (WebCore::ReplaceSelectionCommand::create):
3162 * editing/TypingCommand.cpp:
3163 (WebCore::TypingCommand::insertTextRunWithoutNewlines):
3164 (WebCore::TypingCommand::insertParagraphSeparator):
3165 * editing/atk/FrameSelectionAtk.cpp:
3166 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3167 * editing/ios/DictationCommandIOS.cpp:
3168 (WebCore::DictationCommandIOS::DictationCommandIOS):
3169 * editing/ios/DictationCommandIOS.h:
3170 * editing/mac/FrameSelectionMac.mm:
3171 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3172 * html/HTMLTextFormControlElement.cpp:
3173 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
3174 * page/DragController.cpp:
3175 (WebCore::DragController::concludeEditDrag):
3176 * page/EventHandler.cpp:
3177 (WebCore::setInitialKeyboardSelection):
3178 * page/FocusController.cpp:
3179 (WebCore::FocusController::advanceFocusInDocumentOrder):
3181 2015-04-24 Darin Adler <darin@apple.com>
3183 Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
3184 https://bugs.webkit.org/show_bug.cgi?id=128007
3186 Reviewed by Anders Carlsson.
3188 * PlatformEfl.cmake: Removed OwnPtrCairo source files.
3189 * PlatformGTK.cmake: Ditto.
3190 * PlatformWinCairo.cmake: Ditto.
3191 * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3192 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3194 * platform/CrossThreadCopier.cpp: Removed OwnPtr specialization.
3195 * platform/CrossThreadCopier.h: Ditto.
3197 * platform/ScrollAnimatorNone.cpp: Removed unneeded include.
3198 * platform/ThreadGlobalData.cpp: Ditto.
3199 * platform/ThreadGlobalData.h: Ditto.
3200 * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Ditto.
3202 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3203 (WebCore::AVFWrapper::processNotification): Use unique_ptr.
3204 (WebCore::AVFWrapper::notificationCallback): Use make_unique.
3205 (WebCore::AVFWrapper::platformLayer): Ditto.
3207 * platform/graphics/cairo/CairoUtilities.cpp:
3208 (WebCore::appendPathToCairoContext): Use cairo_path_destroy directly
3209 instead of a smart pointer; the code path is simple enough that it is
3212 * platform/graphics/cairo/ImageBufferCairo.cpp:
3213 (WebCore::ImageBuffer::ImageBuffer): Use make_unique.
3214 * platform/graphics/cairo/ImageBufferDataCairo.h: Use unique_ptr.
3216 * platform/graphics/cairo/OwnPtrCairo.cpp: Removed.
3217 * platform/graphics/cairo/OwnPtrCairo.h: Removed.
3219 * platform/graphics/cairo/PathCairo.cpp:
3220 (WebCore::Path::Path): Use cairo_path_destroy directly instead of a
3221 smart pointer; the code path is simple enough that it is clear this way.
3222 (WebCore::Path::operator=): Ditto.
3223 (WebCore::Path::addPath): Ditto.
3224 (WebCore::Path::apply): Ditto.
3225 * platform/graphics/cairo/PlatformContextCairo.cpp:
3226 (WebCore::PlatformContextCairo::clipForPatternFilling): Ditto.
3228 * platform/graphics/freetype/FontCacheFreeType.cpp: Removed unneeded include.
3229 * platform/graphics/glx/GLContextGLX.cpp: Ditto.
3231 * platform/graphics/surfaces/egl/EGLSurface.cpp:
3232 (WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Use make_unique.
3234 * platform/graphics/surfaces/glx/GLXConfigSelector.h:
3235 (WebCore::GLXConfigSelector::findMatchingConfig): Use unique_ptr with X11Deleter.
3236 (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
3237 * platform/graphics/surfaces/glx/GLXSurface.cpp:
3238 (WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
3239 (WebCore::GLXOffScreenSurface::initialize): Ditto.
3241 * platform/graphics/surfaces/glx/OwnPtrX11.h: Removed.
3243 * platform/graphics/surfaces/glx/X11Helper.cpp:
3244 (WebCore::X11Helper::createOffScreenWindow): Use unique_ptr with X11Deleter.
3245 (WebCore::X11Helper::createPixmap): Ditto.
3247 * platform/graphics/surfaces/glx/X11Helper.h: Added X11Deleter,
3248 which can be used with unique_ptr to make it call XFree instead of delete.
3250 * platform/graphics/win/FullScreenController.cpp: Use unique_ptr.
3251 (FullScreenController::FullScreenController): Use make_unique.
3252 (FullScreenController::enterFullScreen): Ditto.
3253 * platform/graphics/win/FullScreenController.h: Use unique_ptr.
3255 * platform/graphics/win/GraphicsContext3DWin.cpp: Removed unneeded includes.
3257 * platform/graphics/win/WKCAImageQueue.cpp:
3258 (WebCore::WKCAImageQueue::WKCAImageQueue): Use make_unique.
3259 * platform/graphics/win/WKCAImageQueue.h: Use unique_ptr.
3261 * platform/network/NetworkStorageSessionStub.cpp: Removed unneeded include.
3263 * platform/network/ResourceHandleInternal.h: Use unique_ptr.
3265 * platform/network/curl/MultipartHandle.cpp:
3266 (WebCore::MultipartHandle::create): Deleted.
3267 * platform/network/curl/MultipartHandle.h: Deleted the create function.
3269 * platform/network/curl/ResourceHandleManager.cpp:
3270 (WebCore::headerCallback): Use make_unique.
3272 2015-04-24 Per Arne Vollan <peavo@outlook.com>
3274 [Win] Popup menu is not accessible.
3275 https://bugs.webkit.org/show_bug.cgi?id=141704
3277 Reviewed by Brent Fulgham.
3279 Get accessibility information for items in popup menus.
3281 * platform/win/PopupMenuWin.cpp:
3282 (WebCore::PopupMenuWin::onGetObject):
3283 (WebCore::PopupMenuWin::wndProc):
3284 (WebCore::AccessiblePopupMenu::AccessiblePopupMenu):
3285 (WebCore::AccessiblePopupMenu::~AccessiblePopupMenu):
3286 (WebCore::AccessiblePopupMenu::QueryInterface):
3287 (WebCore::AccessiblePopupMenu::AddRef):
3288 (WebCore::AccessiblePopupMenu::Release):
3289 (WebCore::AccessiblePopupMenu::GetTypeInfoCount):
3290 (WebCore::AccessiblePopupMenu::GetTypeInfo):
3291 (WebCore::AccessiblePopupMenu::GetIDsOfNames):
3292 (WebCore::AccessiblePopupMenu::Invoke):
3293 (WebCore::AccessiblePopupMenu::get_accParent):
3294 (WebCore::AccessiblePopupMenu::get_accChildCount):
3295 (WebCore::AccessiblePopupMenu::get_accChild):
3296 (WebCore::AccessiblePopupMenu::get_accName):
3297 (WebCore::AccessiblePopupMenu::get_accValue):
3298 (WebCore::AccessiblePopupMenu::get_accDescription):
3299 (WebCore::AccessiblePopupMenu::get_accRole):
3300 (WebCore::AccessiblePopupMenu::get_accState):
3301 (WebCore::AccessiblePopupMenu::get_accHelp):
3302 (WebCore::AccessiblePopupMenu::get_accKeyboardShortcut):
3303 (WebCore::AccessiblePopupMenu::get_accFocus):
3304 (WebCore::AccessiblePopupMenu::get_accSelection):
3305 (WebCore::AccessiblePopupMenu::get_accDefaultAction):
3306 (WebCore::AccessiblePopupMenu::accSelect):
3307 (WebCore::AccessiblePopupMenu::accLocation):
3308 (WebCore::AccessiblePopupMenu::accNavigate):
3309 (WebCore::AccessiblePopupMenu::accHitTest):
3310 (WebCore::AccessiblePopupMenu::accDoDefaultAction):
3311 (WebCore::AccessiblePopupMenu::put_accName):
3312 (WebCore::AccessiblePopupMenu::put_accValue):
3313 (WebCore::AccessiblePopupMenu::get_accHelpTopic):
3314 * platform/win/PopupMenuWin.h:
3315 * platform/win/ScrollbarThemeWin.h:
3316 (WebCore::ScrollbarThemeWin::hasButtons): Deleted.
3318 2015-04-23 Antti Koivisto <antti@apple.com>
3320 Memory cache live resources repeatedly purged during painting
3321 https://bugs.webkit.org/show_bug.cgi?id=144104
3322 <rdar://problem/20667695>
3324 Reviewed by Chris Dumez.
3326 On some PLT pages (like nytimes.com) we get into state where painting repeatedly purges live bitmaps.
3327 This slows down page loads significantly.
3329 This might have regressed because improvements in page caching keep more pages and so resources 'live'.
3331 With this path we do all regular cache pruning asynchronously. If memory is really critical
3332 the low memory handling code will still prune synchronously.
3334 * loader/cache/CachedResource.cpp:
3335 (WebCore::CachedResource::removeClient):
3336 (WebCore::CachedResource::didAccessDecodedData):
3338 prune() -> pruneSoon()
3340 * loader/cache/MemoryCache.cpp:
3342 Decrease the pruning size target from 0.95 to 0.8 so we don't need to prune so often.
3344 (WebCore::MemoryCache::needsPruning):
3346 Factor into a function.
3348 (WebCore::MemoryCache::prune):
3349 (WebCore::MemoryCache::pruneSoon):
3351 Prune asynchronously.
3353 * loader/cache/MemoryCache.h:
3355 2015-04-24 Antti Koivisto <antti@apple.com>
3357 Unreviewed, rolling out r183259.
3363 "Memory cache live resources repeatedly purged during
3365 https://bugs.webkit.org/show_bug.cgi?id=144104
3366 http://trac.webkit.org/changeset/183259
3368 2015-04-24 Antti Koivisto <antti@apple.com>
3370 CrashTracer: WebProcess at com.apple.WebCore: WebCore::toScriptElementIfPossible + 4
3371 https://bugs.webkit.org/show_bug.cgi?id=144050
3373 Reviewed by Chris Dumez.
3375 We are seeing null Element pointer crashes with this stack:
3377 47 com.apple.WebCore: WebCore::toScriptElementIfPossible + 4 <==
3378 47 com.apple.WebCore: WebCore::ScriptRunner::timerFired + 452
3379 47 com.apple.WebCore: WebCore::ThreadTimers::sharedTimerFiredInternal + 175
3381 The most likely cause seems to be that this code
3383 ASSERT(m_pendingAsyncScripts.contains(scriptElement));
3384 m_scriptsToExecuteSoon.append(m_pendingAsyncScripts.take(scriptElement));