1 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
3 Unreviewed iOS build fix. Unused parameter no longer exists.
5 * page/scrolling/ScrollingCoordinator.cpp:
6 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
8 2015-04-29 Simon Fraser <simon.fraser@apple.com>
10 Crash at WebCore::Document::absoluteRegionForEventTargets
11 https://bugs.webkit.org/show_bug.cgi?id=144426
12 rdar://problem/20502166
14 Reviewed by Tim Horton.
16 When a frame had wheel event handlers, we would register the document itself
17 as a handler in its parent document. This is problematic, because there's not
18 code path that removes it when the frame is destroyed.
20 It turns out we don't need to do this at all; the non-fast scrollable region
21 already takes handlers in subframes into account.
23 Tests: fast/events/wheelevent-in-frame.html
24 fast/events/wheelevent-in-reattached-frame.html
27 (WebCore::Document::didAddWheelEventHandler):
28 (WebCore::Document::didRemoveWheelEventHandler):
30 2015-04-29 David Kilzer <ddkilzer@apple.com>
32 Attempt #2: Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
33 <http://webkit.org/b/144362>
35 Reviewed by Andy Estes.
37 This patch switches soft-linking of QuickLook.framework to
38 QuickLookSoftLink.{h,mm} so that we stop exporting unintended
41 No new tests since no change in behavior.
43 * WebCore.xcodeproj/project.pbxproj:
44 - Add QuickLookSoftLinking.{h,mm} to the project.
46 * platform/ios/QuickLookSoftLink.h: Added.
47 * platform/ios/QuickLookSoftLink.mm: Added.
48 * platform/mac/SoftLinking.h:
49 (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
50 (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
51 (SOFT_LINK_POINTER_FOR_HEADER): Add macro.
52 (SOFT_LINK_POINTER_FOR_SOURCE): Add macro.
54 * platform/network/ios/QuickLook.h:
55 - Remove unused declarations.
57 * platform/network/ios/QuickLook.mm:
58 (WebCore::QLPreviewConverterClass): Deleted.
59 (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
60 (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
61 (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
62 - Remove SOFT_LINK macros and unused methods after switching to
63 new QuickLookSoftLink.{h,mm}.
64 (WebCore::QLPreviewGetSupportedMIMETypesSet):
65 - Switch to use NeverDestroyed<>.
66 (WebCore::registerQLPreviewConverterIfNeeded):
67 (createQLPreviewProtocol):
68 (WebCore::QLPreviewProtocol):
69 (WebCore::QuickLookHandle::QuickLookHandle):
70 (WebCore::QuickLookHandle::create):
71 (WebCore::QuickLookHandle::shouldCreateForMIMEType):
72 - Simplify code when using QuickLookSoftLink.h.
74 * platform/network/ios/WebCoreURLResponseIOS.mm:
75 - Include QuickLookSoftLink.h header.
77 2015-04-29 Simon Fraser <simon.fraser@apple.com>
79 Compute the non-fast-scrollable region in main-document coordinates
80 https://bugs.webkit.org/show_bug.cgi?id=144420
82 Reviewed by Tim Horton.
84 Compute the non-fast-scrollable region in document coordinates, to make it easier
85 to reason about. Previously, it was document coordinates offset by top content inset.
87 * page/DebugPageOverlays.cpp:
88 (WebCore::MouseWheelRegionOverlay::updateRegion): Traverse all frames to compute the wheel
89 event handler region, mapping each to root view coords, and then mapping back into document
91 (WebCore::NonFastScrollableRegionOverlay::updateRegion): No offset needed here; the
92 overlay and region are both document coordinates.
93 * page/FrameView.h: Make some mapping function overrides public, and expose widgetsInRenderTree().
95 (WebCore::Page::nonFastScrollableRects): Remove frame argument.
97 * page/PageOverlay.cpp:
98 (WebCore::PageOverlay::bounds):
99 (WebCore::PageOverlay::viewToOverlayOffset): Convenience function to map between
100 view and overlay coordinates.
101 * page/PageOverlay.h:
102 * page/scrolling/AsyncScrollingCoordinator.cpp: New computeNonFastScrollableRegion() signature.
103 (WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
104 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
105 (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
106 * page/scrolling/ScrollingCoordinator.cpp:
107 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame): This function
108 recurses on frames, computing an absolute (document-relative) region per frame. This
109 removes the confusing offsetting through top content inset.
110 Change how we get to plugins that want wheel events; we can't get from PluginViewBase
111 to renderers, so use FrameView's list of Widgets, and their RenderWidgets. This fixes
112 regions for transformed plugin-ins.
113 For subframes, we get a region in the subframe's document coords. Map to that sub-frame,
114 then to our frame, then to our document.
115 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegion): Wrapper that hides
116 the recursive function.
117 (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Deleted.
118 * page/scrolling/ScrollingCoordinator.h:
119 * page/scrolling/ScrollingTree.cpp:
120 (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Map the event point
121 from view coordinates to document coordinates for testing against the non-fast region.
122 We previously assert that the root note is a FrameScrolling node.
123 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
124 (WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset): Similar to ScrollView::viewToContents()
125 for the scrolling tree.
126 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
127 * testing/Internals.cpp:
128 (WebCore::Internals::nonFastScrollableRects): No need for frame arg.
130 2015-04-29 Brent Fulgham <bfulgham@apple.com>
132 Expand test infrastructure to support scrolling tests
133 https://bugs.webkit.org/show_bug.cgi?id=143684
134 <rdar://problem/20375516>
136 Reviewed by Simon Fraser.
138 Tested by various fast/scrolling and platform/mac-wk2/tiled-drawing/scrolling tests.
140 This series of changes adds a new singleton class, 'WheelEventTestTrigger', which encapsulates a
141 function object to be fired when scroll events are finished. The object also keeps track of reasons
142 why the test should not yet fire (e.g., 'rubberbanding' is active) so that tests do not incorrectly
143 check rendering state in the middle of an animation.
145 Switch from the original WeakPtr design to ThreadSafeRefPtr, because WeakPtr cannot be shared
146 across multiple threads.
148 * page/FrameView.cpp:
149 (WebCore::FrameView::layout): Make sure ScrollAnimator knows about any active test trigger.
150 (WebCore::FrameView::setScrollPosition): Ditto.
151 (WebCore::FrameView::didAddScrollbar): Ditto.
152 * page/MainFrame.cpp:
153 (WebCore::MainFrame::testTrigger): Moved to Page.
154 (WebCore::MainFrame::ensureTestTrigger): Ditto.
157 (WebCore::Page::testTrigger): Moved from MainFrame, and converted to use RefPtr.
158 (WebCore::Page::ensureTestTrigger): Ditto.
160 * page/WheelEventTestTrigger.cpp:
161 (WebCore::WheelEventTestTrigger::WheelEventTestTrigger): Remove WeakPtr code.
162 (WebCore::WheelEventTestTrigger::createWeakPtr): Deleted.
163 * page/WheelEventTestTrigger.h:
164 * page/mac/EventHandlerMac.mm:
165 (WebCore::EventHandler::platformPrepareForWheelEvents): Make sure the scroll animator knows about
166 any active test trigger object.
167 * page/scrolling/AsyncScrollingCoordinator.cpp:
168 (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): Notify WheelEventTestTrigger
169 that the scrolling thread is synced with the main thread.
170 * platform/ScrollAnimator.h: Hold a RefPtr to the WheelEventTestTrigger.
171 (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger):
172 * platform/cocoa/ScrollController.h:
173 * platform/cocoa/ScrollController.mm:
174 (WebCore::ScrollController::startSnapRubberbandTimer): Notify test trigger to hold tests until rubber band
175 snapping is complete.
176 (WebCore::ScrollController::stopSnapRubberbandTimer): Notify test trigger that rubber band snapping is done.
177 (WebCore::ScrollController::startScrollSnapTimer): Notify test trigger to hold tests until scroll snapping
179 (WebCore::ScrollController::stopScrollSnapTimer): Notify test trigger that scroll snapping is done.
180 * platform/mac/ScrollAnimatorMac.mm:
181 (WebCore::ScrollAnimatorMac::didBeginScrollGesture): Notify test trigger that a content scroll is in progress.
182 (WebCore::ScrollAnimatorMac::didEndScrollGesture): Notify test trigger that a content scroll is finished.
183 (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): Notify test trigger to hold tests until the content
184 scrolling is complete.
185 (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): Notify test trigger that content scrolling is done.
186 * rendering/RenderBox.cpp:
187 (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
188 (WebCore::RenderBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
189 to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
190 (WebCore::RenderBox::setScrollTop): Ditto.
191 * rendering/RenderLayer.cpp:
192 (WebCore::RenderLayer::createScrollbar): Make sure the ScrollAnimator knows about any active test triggers.
193 * rendering/RenderListBox.cpp:
194 (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
195 (WebCore::RenderListBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
196 to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
197 (WebCore::RenderListBox::setScrollTop): Ditto.
198 (WebCore::RenderListBox::createScrollbar): Ditto.
199 * testing/js/WebCoreTestSupport.cpp:
200 (WebCoreTestSupport::monitorWheelEvents): Look for WheelEventTestTrigger in Page, rather than MainFrame.
201 (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.
203 2015-04-29 Javier Fernandez <jfernandez@igalia.com>
205 [CSS Box Alignment] Unifying alignment data in a single class
206 https://bugs.webkit.org/show_bug.cgi?id=144384
208 Reviewed by David Hyatt.
210 The new CSS Box Alignment specification introduces more complex
211 values and syntax for defining alignment properties. Most of the
212 alignment values were just keyword identifiers, but the new syntax
213 allows different combinations of identifiers to determine the
214 alignment behavior (eg. overflow-alignment keyword).
216 This patch wll help to implement later overflow handling and
217 specially Content Dstribution alignment, the most complex case by
218 far. It will be more consistent against style changes and repaint,
219 snce we will have just one field to monitoring for value
222 No new tests, because no new functionality was added; it's just a
223 code refactoring which is just expected to pass current tests.
225 * css/CSSComputedStyleDeclaration.cpp:
226 (WebCore::resolveSelfAlignmentAuto):
227 (WebCore::ComputedStyleExtractor::propertyValue):
228 * css/CSSPropertyNames.in:
229 * css/StyleBuilderConverter.h:
230 (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
231 (WebCore::StyleBuilderConverter::convertSVGColor): Deleted.
232 * css/StyleBuilderCustom.h:
233 (WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage): Deleted.
234 (WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage): Deleted.
235 (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
236 (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
237 (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
238 (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
239 (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
240 (WebCore::StyleBuilderCustom::applyInheritLineHeight): Deleted.
241 * css/StyleResolver.cpp:
242 (WebCore::StyleResolver::adjustRenderStyle):
243 * mathml/MathMLTextElement.cpp:
244 (WebCore::MathMLTextElement::createElementRenderer):
245 * rendering/RenderFlexibleBox.cpp:
246 (WebCore::RenderFlexibleBox::styleDidChange):
247 * rendering/RenderFullScreen.cpp:
248 (WebCore::createFullScreenStyle):
249 * rendering/RenderMenuList.cpp:
250 (WebCore::RenderMenuList::adjustInnerStyle):
251 * rendering/mathml/RenderMathMLRoot.cpp:
252 (WebCore::RenderMathMLRoot::updateStyle):
253 * rendering/mathml/RenderMathMLScripts.cpp:
254 (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
255 (WebCore::RenderMathMLScripts::fixAnonymousStyles):
256 * rendering/style/RenderStyle.cpp:
257 (WebCore::RenderStyle::resolveAlignment):
258 (WebCore::RenderStyle::resolveJustification):
259 * rendering/style/RenderStyle.h:
260 * rendering/style/StyleRareNonInheritedData.cpp:
261 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
262 (WebCore::StyleRareNonInheritedData::operator==):
263 (WebCore::StyleRareNonInheritedData::contentDataEquivalent): Deleted.
264 * rendering/style/StyleRareNonInheritedData.h:
265 * rendering/style/StyleSelfAlignmentData.h: Added.
266 (WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
267 (WebCore::StyleSelfAlignmentData::setPosition):
268 (WebCore::StyleSelfAlignmentData::setPositionType):
269 (WebCore::StyleSelfAlignmentData::setOverflow):
270 (WebCore::StyleSelfAlignmentData::position):
271 (WebCore::StyleSelfAlignmentData::positionType):
272 (WebCore::StyleSelfAlignmentData::overflow):
273 (WebCore::StyleSelfAlignmentData::operator==):
274 (WebCore::StyleSelfAlignmentData::operator!=):
276 2015-04-29 Joseph Pecoraro <pecoraro@apple.com>
278 NodeList has issues with Symbol and empty string
279 https://bugs.webkit.org/show_bug.cgi?id=144310
281 Reviewed by Darin Adler.
283 Tests: fast/dom/StyleSheet/stylesheet-symbol-names.html
284 fast/dom/dataset-name-getter-symbols.html
285 fast/dom/named-items-with-empty-name.html
286 fast/dom/named-items-with-symbol-name.html
287 storage/domstorage/localstorage/named-items.html
289 Test different bindings objects with custom named setter
290 and getter handlers. Ensure that they handle Symbol properties
291 gracefully. Often times avoiding the string path.
293 * dom/StaticNodeList.cpp:
294 (WebCore::StaticNodeList::namedItem):
295 (WebCore::StaticElementList::namedItem):
296 Better handle the empty string. It should not match an item.
298 * bindings/js/JSDOMBinding.h:
299 (WebCore::propertyNameToString):
300 In cases where we would use this, we should have handled
303 (WebCore::propertyNameToAtomicString):
304 For Symbols, use the unique string. This should result
305 in no matches for a Symbol property.
307 * bindings/js/JSDOMStringMapCustom.cpp:
308 (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
309 (WebCore::JSDOMStringMap::deleteProperty):
310 (WebCore::JSDOMStringMap::putDelegate):
311 * bindings/js/JSStorageCustom.cpp:
312 (WebCore::JSStorage::canGetItemsForName):
313 (WebCore::JSStorage::nameGetter):
314 (WebCore::JSStorage::deleteProperty):
315 (WebCore::JSStorage::putDelegate):
316 * bindings/js/JSStyleSheetListCustom.cpp:
317 (WebCore::JSStyleSheetList::canGetItemsForName):
318 Treat Symbol properties as private properties. They just
319 go directly through to the Object, and avoid the string
320 getter/setter property path.
322 2015-04-29 Eric Carlson <eric.carlson@apple.com>
324 [Mac] Register with device picker whenever a page has <video>
325 https://bugs.webkit.org/show_bug.cgi?id=144408
327 Reviewed by Jer Noble.
329 * Modules/mediasession/WebMediaSessionManager.cpp:
330 (WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
331 to the target when it has not routes.
333 * html/HTMLMediaElement.cpp:
334 (WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the
335 element is <video> with a video track that does not block wireless playback.
337 2015-04-29 Martin Robinson <mrobinson@igalia.com>
339 [GTK] Add support for automatic hyphenation
340 https://bugs.webkit.org/show_bug.cgi?id=44478
342 Reviewed by Carlos Garcia Campos.
344 No new tests. This patch unskips and updates results for existing hyphenation tests.
346 * PlatformGTK.cmake: Add the libhypen implementation to the source list.
347 * platform/gtk/GtkUtilities.cpp:
348 (WebCore::topLevelPath): Add this helper function taken from the test harness.
349 (WebCore::getWebKitBuildDirectory): Ditto.
350 * platform/gtk/GtkUtilities.h: Add function declarations for the helper functions.
351 * platform/text/Hyphenation.cpp: Surround this implementation with !USE(LIBHYPHEN),
352 so that it can still be shared.
353 * platform/text/gtk/HyphenationLibHyphen.cpp: Added.
354 (WebCore::extractLocaleFromDictionaryFilePath): Take in a dictionary filename and
355 determine the locale that it covers.
356 (WebCore::scanDirectoryForDicionaries): Look for all installed dictionaries as well
357 as ones in the JHBuild root for testing.
358 (WebCore::scanTestDictionariesDirectoryIfNecessary): Try to scan the dictionaries installed
360 (WebCore::availableLocales): Getter for global hash of installed dictionaries.
361 (WebCore::canHyphenate): Added libhyphen implementation.
362 (WebCore::HyphenationDictionary): Helper class that properly manages the memory of
363 an open libhyphen dictionary. This is useful so that they can be stored in an MRU
364 cache. This is a similar approach to the CoreFoundation implementation.
365 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): MRU cache
367 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Ditto.
368 (WebCore::hyphenDictionaryCache): A cache for opened hyphenation dictionaries.
369 (WebCore::countLeadingSpaces): Count leading spaces, since WebCore often passes words with them.
370 (WebCore::lastHyphenLocation): Added libhyphen implementation.
372 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
374 Unreviewed build fix.
376 * platform/graphics/mac/FontCacheMac.mm:
377 (WebCore::fontWithFamily):
379 2015-04-29 Eric Carlson <eric.carlson@apple.com>
381 Some media tests assert after r183096
382 https://bugs.webkit.org/show_bug.cgi?id=144098
384 Reviewed by Brent Fulgham.
386 Never assert when a MediaPlaybackTargetClient client calls one of the methods on Document
387 after it has been unregistered. A media element unregisters itself when it is removed from the
388 document, but scripts can still run and modify state that results in a call to
389 playbackTargetPickerClientStateDidChange. Remove the asserts instead of adding checks to
390 the various call sites.
393 (WebCore::Document::showPlaybackTargetPicker): Don't assert if the client has already
395 (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
397 2015-04-29 Zalan Bujtas <zalan@apple.com>
399 Simple line layout: Web process spins endlessly below layoutSimpleLines.
400 https://bugs.webkit.org/show_bug.cgi?id=144403
401 rdar://problem/20742783
403 Reviewed by Antti Koivisto.
405 When a text fragment overlaps multiple renderes and it does not fit the current line,
406 we revert the text fragment iterator position so that the overlapping content
407 gets processed again for the next line.
408 However, TextFragmentIterator::revertToFragment() was reverting too much and
409 we started processing old content all over again -> infinite loop.
411 This patch ensures that text fragment iterator is reverted to the right position.
413 Test: fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html
415 * rendering/SimpleLineLayout.cpp:
416 (WebCore::SimpleLineLayout::createLineRuns):
417 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
418 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToEndOfFragment):
419 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment): Deleted.
420 * rendering/SimpleLineLayoutTextFragmentIterator.h:
422 2015-04-29 Filip Pizlo <fpizlo@apple.com>
424 JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
425 https://bugs.webkit.org/show_bug.cgi?id=144397
427 Reviewed by Andreas Kling.
429 If you override getCallData() and you want to be called a "function", then you need to use the
430 new TypeOfShouldCallGetCallData flag.
432 * bindings/scripts/CodeGeneratorJS.pm:
434 * bridge/objc/objc_runtime.h:
435 * bridge/runtime_method.h:
436 * bridge/runtime_object.h:
438 2015-04-29 Commit Queue <commit-queue@webkit.org>
440 Unreviewed, rolling out r183553 and r183561.
441 https://bugs.webkit.org/show_bug.cgi?id=144406
443 broke the iOS build (Requested by thorton__ on #webkit).
447 "Switch QuickLook soft-linking to use
448 QuickLookSoftLink.{h,mm}"
449 https://bugs.webkit.org/show_bug.cgi?id=144362
450 http://trac.webkit.org/changeset/183553
452 "Unreviewed iOS build fix after r183553: fix declaration of
454 http://trac.webkit.org/changeset/183561
456 2015-04-29 Antti Koivisto <antti@apple.com>
458 ResourceLoadPriority should be enum class
459 https://bugs.webkit.org/show_bug.cgi?id=144326
461 Reviewed by Darin Adler.
463 * html/HTMLLinkElement.cpp:
464 (WebCore::HTMLLinkElement::process):
465 * loader/LinkLoader.cpp:
466 (WebCore::LinkLoader::loadLink):
467 * loader/ResourceLoadScheduler.cpp:
468 (WebCore::ResourceLoadScheduler::scheduleLoad):
469 (WebCore::ResourceLoadScheduler::servePendingRequests):
470 (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
471 (WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex):
472 (WebCore::ResourceLoadScheduler::HostInformation::schedule):
473 (WebCore::ResourceLoadScheduler::HostInformation::remove):
474 (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
475 (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
476 * loader/ResourceLoadScheduler.h:
477 (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
479 Modernize ResourceLoadScheduler code a bit while switching to enum class.
481 * loader/cache/CachedResource.cpp:
482 (WebCore::defaultPriorityForResourceType):
483 * loader/cache/CachedResourceLoader.cpp:
484 (WebCore::CachedResourceLoader::requestResource):
485 * loader/icon/IconLoader.cpp:
486 (WebCore::IconLoader::startLoading):
487 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
488 (WebCore::WebCoreAVFResourceLoader::startLoading):
489 * platform/network/ResourceLoadPriority.h:
490 (WebCore::operator++):
491 (WebCore::operator--):
492 * platform/network/ResourceRequestBase.cpp:
493 (WebCore::ResourceRequestBase::adopt):
494 (WebCore::ResourceRequestBase::copyData):
495 (WebCore::ResourceRequestBase::cachePolicy):
496 (WebCore::ResourceRequestBase::priority):
497 (WebCore::ResourceRequestBase::setPriority):
498 * platform/network/ResourceRequestBase.h:
500 Remove bitfields. ResourceRequests are not present in large enough numbers to require this kind of optimization.
501 Use modern initialization syntax.
503 (WebCore::ResourceRequestBase::ResourceRequestBase):
504 (WebCore::CrossThreadResourceRequestDataBase::CrossThreadResourceRequestDataBase): Deleted.
505 * platform/network/cf/ResourceRequestCFNet.cpp:
506 (WebCore::initializeMaximumHTTPConnectionCountPerHost):
507 (WebCore::initializeHTTPConnectionSettingsOnStartup):
508 * platform/network/cf/ResourceRequestCFNet.h:
509 (WebCore::toResourceLoadPriority):
510 (WebCore::toPlatformRequestPriority):
511 * platform/network/soup/ResourceRequest.h:
512 (WebCore::toSoupMessagePriority):
513 * testing/Internals.cpp:
514 (WebCore::stringToResourceLoadPriority):
516 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
518 [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
519 https://bugs.webkit.org/show_bug.cgi?id=132159
521 Reviewed by Darin Adler.
523 On platforms that support it, delegate font selection logic to the platform. Currently, this is
524 only supported on Mac, using CTFontCreateForCSS().
526 This also changes the mechanism that enforces our font whitelist in our tests. We used to
527 swizzle the implementations of NSFontManager methods. This patch migrates to using a whitelist of
528 font family names instead.
530 Note that this patch is a work in progress, because it makes the following tests fail:
531 fast/css/font-weight-1.html
532 fast/forms/validation-message-appearance.html
533 fast/forms/select/optgroup-rendering.html
535 No new tests, because there is no behavior change.
537 * platform/graphics/FontCache.h: Add a function to set the whitlist.
538 * platform/graphics/mac/FontCacheMac.mm:
539 (WebCore::fontWhitelist):
540 (WebCore::FontCache::setFontWhitelist):
541 (WebCore::toAppKitFontWeight):
542 (WebCore::toCoreTextFontWeight):
543 (WebCore::fontWithFamily): If ENABLE(PLATFORM_FONT_LOOKUP), use CTFontCreateForCSS().
544 (WebCore::FontCache::createFontPlatformData):
545 * platform/spi/cocoa/CoreTextSPI.h: Add signature for CTFontCreateForCSS().
547 2015-04-29 Jer Noble <jer.noble@apple.com>
549 Unreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme
551 * platform/ios/QuickLookSoftLink.mm:
553 2015-04-29 Eric Carlson <eric.carlson@apple.com>
555 [Mac] Use new device picker menu API
556 https://bugs.webkit.org/show_bug.cgi?id=144392
558 Reviewed by Jer Noble.
560 * Modules/mediasession/WebMediaSessionManager.cpp:
561 (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Pass the route state to the picker.
562 * platform/graphics/MediaPlaybackTargetPicker.h:
564 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
565 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
566 (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac): m_deviceChangeTimer -> m_pendingActionTimer.
567 (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Ditto.
568 (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Renamed from
569 outputeDeviceAvailabilityChangedTimerFired.
570 (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Use addPendingAction.
571 (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Call new picker API if it is
572 available. New API returns true if a target is chosen, so call currentDeviceDidChange in that case.
573 (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): New.
574 (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Make asynchronous because it
575 can now be called from showPlaybackTargetPicker.
576 (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired): Renamed
577 pendingActionTimerFired.
579 * platform/spi/cocoa/AVKitSPI.h: Add new SPI.
581 2015-04-29 Antti Koivisto <antti@apple.com>
583 Main resource loaded via 304 response becomes empty if reloaded by user
584 https://bugs.webkit.org/show_bug.cgi?id=144386
586 Reviewed by Darin Adler.
588 Memory cache layer may make a main resource request conditional (add If-modified-since/If-none-match header).
589 DocumentLoader stores the final ResourceRequest associated with document. If user triggered reload for
590 conditionally loaded document DocumentLoader would include the same conditionals to the new request as well.
591 Since these were not added by the memory cache it would pass any 304 response back to the DocumentLoader.
592 However DocumentLoader has no code to handle 304 so we would end up with an empty document.
594 Test: http/tests/cache/main-resource-304-reload.html
596 * loader/DocumentLoader.cpp:
597 (WebCore::DocumentLoader::startLoadingMainResource):
599 Ensure DocumentLoader doesn't issue conditional requests.
601 2015-04-28 Jer Noble <jer.noble@apple.com>
603 Replace HTMLMediaElement's seek timer with a task queue.
604 https://bugs.webkit.org/show_bug.cgi?id=144353
606 Reviewed by Eric Carlson.
608 No change in functionality, so no new tests added.
610 Replace a zero-length timer with an explicit task queue, backed by Document's postTask(). To
611 make enqueued tasks cancellable, add a new GenericTaskQueue class modelled on
612 GenericEventQueue which can cancel enqueued but not-yet-executed tasks.
615 * WebCore.vcxproj/WebCore.vcxproj:
616 * WebCore.vcxproj/WebCore.vcxproj.filters:
617 * WebCore.xcodeproj/project.pbxproj:
618 * dom/GenericTaskQueue.cpp: Added.
619 (WebCore::GenericTaskQueue::GenericTaskQueue): Initialize ivars.
620 (WebCore::GenericTaskQueue::enqueueTask): Wrap the task and pass it to the ScriptExecutionContext.
621 (WebCore::GenericTaskQueue::close): Assert that the task queue will not accept any additional tasks.
622 (WebCore::GenericTaskQueue::cancelAllTasks): Revoke outstanding weak pointers, thereby cancelling tasks.
623 * dom/GenericTaskQueue.h: Added.
624 (WebCore::GenericTaskQueue::hasPendingTasks):
625 * html/HTMLMediaElement.cpp:
626 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the task queue.
627 (WebCore::HTMLMediaElement::~HTMLMediaElement): Close the task queue.
628 (WebCore::HTMLMediaElement::seekWithTolerance): Post a task, rather than start a timer.
629 (WebCore::HTMLMediaElement::seekTask): Renamed from seekTimerFired().
630 (WebCore::HTMLMediaElement::seekTimerFired): Deleted.
631 * html/HTMLMediaElement.h:
633 2015-04-28 David Kilzer <ddkilzer@apple.com>
635 Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
636 <http://webkit.org/b/144362>
638 Reviewed by Andy Estes.
640 This patch switches soft-linking of QuickLook.framework to
641 QuickLookSoftLink.{h,mm} so that we stop exporting unintended
644 No new tests since no change in behavior.
646 * WebCore.xcodeproj/project.pbxproj:
647 - Add QuickLookSoftLinking.{h,mm} to the project.
649 * platform/ios/QuickLookSoftLink.h: Added.
650 * platform/ios/QuickLookSoftLink.mm: Added.
651 * platform/mac/SoftLinking.h:
652 (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
653 (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
655 * platform/network/ios/QuickLook.h:
656 - Remove unused declarations.
658 * platform/network/ios/QuickLook.mm:
659 (WebCore::QLPreviewConverterClass): Deleted.
660 (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
661 (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
662 (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
663 - Remove SOFT_LINK macros and unused methods after switching to
664 new QuickLookSoftLink.{h,mm}.
665 (WebCore::QLPreviewGetSupportedMIMETypesSet):
666 - Switch to use NeverDestroyed<>.
667 (WebCore::registerQLPreviewConverterIfNeeded):
668 (createQLPreviewProtocol):
669 (WebCore::QLPreviewProtocol):
670 (WebCore::QuickLookHandle::QuickLookHandle):
671 (WebCore::QuickLookHandle::create):
672 (WebCore::QuickLookHandle::shouldCreateForMIMEType):
673 - Simplify code when using QuickLookSoftLink.h.
675 * platform/network/ios/WebCoreURLResponseIOS.mm:
676 - Include QuickLookSoftLink.h header.
678 2015-04-29 Darin Adler <darin@apple.com>
680 [ES6] Implement Unicode code point escapes
681 https://bugs.webkit.org/show_bug.cgi?id=144377
683 Reviewed by Antti Koivisto.
685 Test: js/unicode-escape-sequences.html
688 (WebCore::CSSParser::parseEscape): Use ICU's UCHAR_MAX_VALUE instead of writing
689 out 0x10FFFF; clearer this way. Also use our replacementCharacter instead of
692 * html/parser/HTMLEntityParser.cpp:
693 (WebCore::isAlphaNumeric): Deleted.
694 (WebCore::HTMLEntityParser::legalEntityFor): Use ICU's UCHAR_MAX_VALUE and
695 U_IS_SURROGATE instead of writing the code out. Didn't use U_IS_UNICODE_CHAR
696 because that also includes U_IS_UNICODE_NONCHAR and thus would change behavior,
697 but maye it's something we want to do in the future.
698 (WebCore::HTMLEntityParser::consumeNamedEntity): Use isASCIIAlphanumeric instead
699 of a the function in this file that does the same thing less efficiently.
701 * html/parser/InputStreamPreprocessor.h:
702 (WebCore::InputStreamPreprocessor::processNextInputCharacter): Use
703 replacementCharacter from CharacterNames.h instead of writing out 0xFFFd.
705 * xml/parser/CharacterReferenceParserInlines.h:
706 (WebCore::consumeCharacterReference): Use ICU's UCHAR_MAX_VALUE instead of
707 defining our own local highestValidCharacter constant.
709 2015-04-29 Martin Robinson <mrobinson@igalia.com>
711 [CMake] [GTK] Organize and clean up unused CMake variables
712 https://bugs.webkit.org/show_bug.cgi?id=144364
714 Reviewed by Gyuyoung Kim.
716 * PlatformGTK.cmake: Add variables specific to this project.
718 2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
720 REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
721 https://bugs.webkit.org/show_bug.cgi?id=144388
723 Reviewed by Brady Eidson.
725 There used to be a method in ContextMenuItem to check if share
726 menu item was supported or not, but since r182573, there's a
727 method to get the share menu item. If the returned menu item is
728 null, it's not added to the menu, but we are not returning a null
729 ContextMenu item even though we don't support share menu item.
731 * platform/gtk/ContextMenuItemGtk.cpp:
732 (WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.
734 2015-04-29 Zan Dobersek <zdobersek@igalia.com>
736 Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
737 https://bugs.webkit.org/show_bug.cgi?id=144232
739 Reviewed by Darin Adler.
741 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
742 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
743 Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.
745 2015-04-29 Hyungwook Lee <hyungwook.lee@navercorp.com>
747 Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
748 https://bugs.webkit.org/show_bug.cgi?id=140261
750 Reviewed by Darin Adler.
752 We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
753 because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.
755 * rendering/RenderView.cpp:
756 (WebCore::isValidObjectForNewSelection):
757 (WebCore::RenderView::clearSubtreeSelection):
758 (WebCore::RenderView::applySubtreeSelection):
760 2015-04-29 Youenn Fablet <youenn.fablet@crf.canon.fr>
762 Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
763 https://bugs.webkit.org/show_bug.cgi?id=143711
765 Reviewed by Darin Adler.
767 This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
768 If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
769 This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
771 Test: http/tests/appcache/simple-video-sync.html
773 * html/HTMLMediaElement.cpp:
774 (WebCore::HTMLMediaElement::parseAttribute):
775 * loader/DocumentThreadableLoader.cpp:
776 (WebCore::DocumentThreadableLoader::loadRequest):
777 * loader/FrameLoader.cpp:
778 (WebCore::FrameLoader::loadResourceSynchronously):
779 * loader/FrameLoader.h:
780 * loader/appcache/ApplicationCacheHost.cpp:
781 (WebCore::ApplicationCacheHost::maybeLoadResource):
782 (WebCore::ApplicationCacheHost::createFileURL):
783 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
784 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
785 * loader/appcache/ApplicationCacheHost.h:
786 * xml/XSLTProcessorLibxslt.cpp:
787 (WebCore::docLoaderFunc):
788 * xml/parser/XMLDocumentParserLibxml2.cpp:
791 2015-04-29 Gyuyoung Kim <gyuyoung.kim@webkit.org>
793 Purge PassRefPtr from createSVGPathSegFoo factory functions
794 https://bugs.webkit.org/show_bug.cgi?id=144374
796 Reviewed by Darin Adler.
798 Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
799 those factory functions can't return null. Additionally let's remove unnecessary
800 #include<PassRefPtr.h> there.
802 No new tests, no behavior changes.
805 (WebCore::SVGColor::cloneForCSSOM):
808 (WebCore::GlyphMapNode::create):
810 (WebCore::SVGPaint::cloneForCSSOM):
812 * svg/SVGPathElement.cpp:
813 (WebCore::SVGPathElement::createSVGPathSegClosePath):
814 (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
815 (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
816 (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
817 (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
818 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
819 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
820 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
821 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
822 (WebCore::SVGPathElement::createSVGPathSegArcAbs):
823 (WebCore::SVGPathElement::createSVGPathSegArcRel):
824 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
825 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
826 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
827 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
828 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
829 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
830 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
831 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
832 * svg/SVGPathElement.h:
833 * svg/SVGPathSegArcAbs.h:
834 (WebCore::SVGPathSegArcAbs::create):
835 * svg/SVGPathSegArcRel.h:
836 (WebCore::SVGPathSegArcRel::create):
837 * svg/SVGPathSegClosePath.h:
838 (WebCore::SVGPathSegClosePath::create):
839 * svg/SVGPathSegCurvetoCubicAbs.h:
840 (WebCore::SVGPathSegCurvetoCubicAbs::create):
841 * svg/SVGPathSegCurvetoCubicRel.h:
842 (WebCore::SVGPathSegCurvetoCubicRel::create):
843 * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
844 (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
845 * svg/SVGPathSegCurvetoCubicSmoothRel.h:
846 (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
847 * svg/SVGPathSegCurvetoQuadraticAbs.h:
848 (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
849 * svg/SVGPathSegCurvetoQuadraticRel.h:
850 (WebCore::SVGPathSegCurvetoQuadraticRel::create):
851 * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
852 (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
853 * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
854 (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
855 * svg/SVGPathSegLinetoAbs.h:
856 (WebCore::SVGPathSegLinetoAbs::create):
857 * svg/SVGPathSegLinetoHorizontalAbs.h:
858 (WebCore::SVGPathSegLinetoHorizontalAbs::create):
859 * svg/SVGPathSegLinetoHorizontalRel.h:
860 (WebCore::SVGPathSegLinetoHorizontalRel::create):
861 * svg/SVGPathSegLinetoRel.h:
862 (WebCore::SVGPathSegLinetoRel::create):
863 * svg/SVGPathSegLinetoVerticalAbs.h:
864 (WebCore::SVGPathSegLinetoVerticalAbs::create):
865 * svg/SVGPathSegLinetoVerticalRel.h:
866 (WebCore::SVGPathSegLinetoVerticalRel::create):
867 * svg/SVGPathSegMovetoAbs.h:
868 (WebCore::SVGPathSegMovetoAbs::create):
869 * svg/SVGPathSegMovetoRel.h:
870 (WebCore::SVGPathSegMovetoRel::create):
872 (WebCore::SVGViewSpec::create):
873 * svg/animation/SMILTimeContainer.h:
874 (WebCore::SMILTimeContainer::create):
875 * svg/animation/SVGSMILElement.cpp:
876 (WebCore::ConditionEventListener::create):
877 * svg/graphics/SVGImage.h:
878 * svg/graphics/SVGImageForContainer.h:
879 * svg/graphics/filters/SVGFilter.cpp:
880 (WebCore::SVGFilter::create):
881 * svg/graphics/filters/SVGFilter.h:
883 2015-04-28 Simon Fraser <simon.fraser@apple.com>
885 Make a non-static version of FrameView::yPositionForRootContentLayer()
886 https://bugs.webkit.org/show_bug.cgi?id=144375
888 Reviewed by Andy Estes.
890 There were two calls to the static FrameView::yPositionForRootContentLayer()
891 which passed in all the arguments for the same FrameView. Make a member
892 function for convenience.
894 * page/FrameView.cpp:
895 (WebCore::FrameView::yPositionForRootContentLayer):
897 * rendering/RenderLayerCompositor.cpp:
898 (WebCore::RenderLayerCompositor::updateRootLayerPosition):
900 2015-04-28 Ryuan Choi <ryuan.choi@navercorp.com>
902 [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
903 https://bugs.webkit.org/show_bug.cgi?id=143001
905 Reviewed by Gyuyoung Kim.
907 TiledBackingStore has only been used by Coordinated Graphics since Qt and WebKit1/Efl were dropped.
908 So, this patch replaces USE(TILED_BACKING_STORE) with USE(COORDINATED_GRAPHICS) to merge the features.
910 In addition, this moves TiledBackingStore and related files from platform to platform/texmap/coordinated
911 where other coordinated graphics files are located.
913 * CMakeLists.txt: Move TiledBackingStore.cpp because this is not common file.
916 * WebCore.vcxproj/WebCore.vcxproj: Follow new location of TiledBackingStore* files.
917 * WebCore.vcxproj/WebCore.vcxproj.filters:
918 * loader/EmptyClients.h:
921 * page/ChromeClient.h:
923 (WebCore::Frame::createView):
924 * page/FrameView.cpp:
925 (WebCore::FrameView::requestScrollPositionUpdate):
928 (WebCore::Page::setPageScaleFactor):
929 * platform/HostWindow.h:
930 * platform/ScrollView.cpp:
931 (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
932 (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
933 (WebCore::ScrollView::visibleContentRectInternal):
934 (WebCore::ScrollView::scrollTo):
935 * platform/ScrollView.h:
936 * platform/graphics/cairo/TileCairo.h: Removed because it is dead code since r169328
937 * platform/graphics/texmap/coordinated/Tile.h: Renamed from Source/WebCore/platform/graphics/Tile.h.
938 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.cpp.
939 * platform/graphics/texmap/coordinated/TiledBackingStore.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.h.
940 * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreBackend.h.
941 * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreClient.h.
943 2015-04-28 Brent Fulgham <bfulgham@apple.com>
945 REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
946 https://bugs.webkit.org/show_bug.cgi?id=144366
947 <rdar://problem/20533513>
949 Reviewed by Dean Jackson.
951 * rendering/RenderBlockFlow.cpp:
952 (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
953 before attempting to dereference it.
955 2015-04-28 Andreas Kling <akling@apple.com>
957 Simplify DOM wrapper destruction, don't deref() in finalizers.
958 <https://webkit.org/b/144183>
960 Reviewed by Darin Adler.
962 DOM JS bindings had two mechanisms to call deref() on the WebCore object,
963 once through a weak finalizer, and once through the JSCell's regular destructor.
965 That was once believed to be an optimization, but these days the finalizer will
966 run just moments before the destructor anyway, all in the same call stack.
967 And more importantly, the finalizer is not guaranteed to run, for instance in the
968 case where a Weak is assigned to after going dead, but before the WeakBlock
969 has been swept by the incremental sweeper.
971 Simplify this by just removing the deref() from the generated finalizers.
972 This makes it easier to reason about DOM wrapper destruction, and eliminates
973 the awkward time window where a DOM wrapper could have a null impl().
975 We could spend more time on figuring out a way to have finalizers manage the
976 destruction of these wrappers, but that would require fundamental changes to
977 our implementation of JSC::Weak pointers. It would allow us to make JSDOMWrapper
978 destructor-less, and shrink each wrapper object by 1 pointer (the ClassInfo*.)
979 However the risk:reward ratio does not seem justified at this point in time.
981 * bindings/scripts/CodeGeneratorJS.pm:
983 (GenerateImplementation):
984 * bindings/js/JSCSSValueCustom.cpp:
985 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
986 (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
987 (WebCore::JSTestActiveDOMObjectOwner::finalize):
988 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
989 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
990 (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
991 (WebCore::JSTestCustomNamedGetterOwner::finalize):
992 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
993 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
994 (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
995 (WebCore::JSTestEventConstructorOwner::finalize):
996 * bindings/scripts/test/JS/JSTestEventConstructor.h:
997 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
998 (WebCore::JSTestEventTarget::~JSTestEventTarget):
999 (WebCore::JSTestEventTargetOwner::finalize):
1000 * bindings/scripts/test/JS/JSTestEventTarget.h:
1001 * bindings/scripts/test/JS/JSTestException.cpp:
1002 (WebCore::JSTestException::~JSTestException):
1003 (WebCore::JSTestExceptionOwner::finalize):
1004 * bindings/scripts/test/JS/JSTestException.h:
1005 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1006 (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
1007 (WebCore::JSTestGenerateIsReachableOwner::finalize):
1008 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1009 * bindings/scripts/test/JS/JSTestInterface.cpp:
1010 (WebCore::JSTestInterface::~JSTestInterface):
1011 (WebCore::JSTestInterfaceOwner::finalize):
1012 * bindings/scripts/test/JS/JSTestInterface.h:
1013 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1014 (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
1015 (WebCore::JSTestMediaQueryListListenerOwner::finalize):
1016 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1017 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1018 (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
1019 (WebCore::JSTestNamedConstructorOwner::finalize):
1020 * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1021 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1022 (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
1023 (WebCore::JSTestNondeterministicOwner::finalize):
1024 * bindings/scripts/test/JS/JSTestNondeterministic.h:
1025 * bindings/scripts/test/JS/JSTestObj.cpp:
1026 (WebCore::JSTestObj::~JSTestObj):
1027 (WebCore::JSTestObjOwner::finalize):
1028 * bindings/scripts/test/JS/JSTestObj.h:
1029 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1030 (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
1031 (WebCore::JSTestOverloadedConstructorsOwner::finalize):
1032 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1033 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1034 (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
1035 (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
1036 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1037 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1038 (WebCore::JSTestTypedefs::~JSTestTypedefs):
1039 (WebCore::JSTestTypedefsOwner::finalize):
1040 * bindings/scripts/test/JS/JSTestTypedefs.h:
1041 * bindings/scripts/test/JS/JSattribute.cpp:
1042 (WebCore::JSattribute::~JSattribute):
1043 (WebCore::JSattributeOwner::finalize):
1044 * bindings/scripts/test/JS/JSattribute.h:
1045 * bindings/scripts/test/JS/JSreadonly.cpp:
1046 (WebCore::JSreadonly::~JSreadonly):
1047 (WebCore::JSreadonlyOwner::finalize):
1048 * bindings/scripts/test/JS/JSreadonly.h:
1050 2015-04-28 Alex Christensen <achristensen@webkit.org>
1052 Build WinCairo without cygwin.
1053 https://bugs.webkit.org/show_bug.cgi?id=144365
1055 Reviewed by Myles Maxfield.
1057 * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
1058 Pass the CC executable to build-generated-files.pl like r182164.
1059 * WebCore.vcxproj/build-generated-files.pl:
1060 Default to 8 CPUs unless otherwise specified.
1062 2015-04-28 Sam Weinig <sam@webkit.org>
1064 [Content Extensions] Process NFAs individually to avoid having all NFAs live at the same time
1065 https://bugs.webkit.org/show_bug.cgi?id=144363
1067 Reviewed by Alex Christensen.
1069 This brings dirty memory use when compiling our test content extension down from ~300MB to ~100MB.
1071 * contentextensions/CombinedURLFilters.cpp:
1072 (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1073 (WebCore::ContentExtensions::CombinedURLFilters::createNFAs): Deleted.
1074 * contentextensions/CombinedURLFilters.h:
1075 Replace function that creates a Vector of all the NFAs with one that allows incremental processing
1076 as they are created.
1078 * contentextensions/ContentExtensionCompiler.cpp:
1079 (WebCore::ContentExtensions::addUniversalActionsToDFA):
1080 Extract code to add universal actions into a helper, since we need to call it in two places now.
1082 (WebCore::ContentExtensions::compileRuleList):
1083 Adopt CombinedURLFilters::processNFAs. Now that we don't have a Vector of NFAs, we need to keep track
1084 of whether or not any NFAs were processed and if we are currently processing the first NFA so we can
1085 ensure that we have some bytecode generated event for empty rule sets, and that universal actions are
1086 placed on the first DFA.
1088 2015-04-28 Timothy Horton <timothy_horton@apple.com>
1090 [TextIndicator] Yellow highlight takes too long to fade out on scroll
1091 https://bugs.webkit.org/show_bug.cgi?id=144358
1092 <rdar://problem/19451011>
1094 Reviewed by Beth Dakin.
1096 * page/TextIndicator.h:
1097 Add Lifetime and DismissalAnimation enums.
1099 (WebCore::TextIndicator::contentImageWithHighlight):
1100 (WebCore::TextIndicator::contentImage):
1103 * page/mac/TextIndicatorWindow.h:
1104 * page/mac/TextIndicatorWindow.mm:
1105 (WebCore::TextIndicatorWindow::TextIndicatorWindow):
1106 (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
1107 (WebCore::TextIndicatorWindow::clearTextIndicator):
1108 (WebCore::TextIndicatorWindow::setTextIndicator):
1109 (WebCore::TextIndicatorWindow::closeWindow):
1110 (WebCore::TextIndicatorWindow::startFadeOut):
1111 Rename m_startFadeOutTimer to m_temporaryTextIndicatorTimer (and related).
1112 This is just about temporary-lifetime TextIndicators, like the ones
1113 you get when the find-in-page UI is hidden but you hit Cmd-G.
1115 Add clearTextIndicator, which takes a DismissalAnimation, providing
1116 clients an opportunity to avoid the normal fade-out animation, if it
1117 was going to happen.
1119 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
1121 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1122 https://bugs.webkit.org/show_bug.cgi?id=144304
1124 Reviewed by Geoffrey Garen.
1126 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1128 * Configurations/FeatureDefines.xcconfig:
1130 2015-04-28 Commit Queue <commit-queue@webkit.org>
1132 Unreviewed, rolling out r183514.
1133 https://bugs.webkit.org/show_bug.cgi?id=144359
1135 It broke cloop test bots (Requested by mcatanzaro on #webkit).
1139 "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
1140 https://bugs.webkit.org/show_bug.cgi?id=144304
1141 http://trac.webkit.org/changeset/183514
1143 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
1145 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1146 https://bugs.webkit.org/show_bug.cgi?id=144304
1148 Reviewed by Geoffrey Garen.
1150 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1152 * Configurations/FeatureDefines.xcconfig:
1154 2015-04-28 Zalan Bujtas <zalan@apple.com>
1156 Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
1157 https://bugs.webkit.org/show_bug.cgi?id=144351
1159 Reviewed by Simon Fraser.
1161 This patch ensures that CG context is properly restored after painting dashed/dotted lines.
1163 Test: fast/forms/checkbox-painting-with-hr.html
1165 * platform/graphics/cg/GraphicsContextCG.cpp:
1166 (WebCore::GraphicsContext::drawLine):
1168 2015-04-28 Simon Fraser <simon.fraser@apple.com>
1170 Provide contentsToView() and viewToContents() functions on ScrollView, and use them
1171 https://bugs.webkit.org/show_bug.cgi?id=144357
1173 Reviewed by Tim Horton.
1175 Too much code was consulting topContentInset() and headerHeight() directly. Replace
1176 with calls to new contentsToView() and viewToContents() functions, which wrap the
1177 exisiting documentScrollOffsetRelativeToViewOrigin().
1179 Use the new functions in FrameView and ScrollView coordinate mapping functions.
1183 * page/FrameView.cpp:
1184 (WebCore::FrameView::convertFromRendererToContainingView):
1185 (WebCore::FrameView::convertFromContainingViewToRenderer):
1186 * platform/ScrollView.cpp:
1187 (WebCore::ScrollView::viewToContents):
1188 (WebCore::ScrollView::contentsToView):
1189 (WebCore::ScrollView::rootViewToContents):
1190 (WebCore::ScrollView::contentsToRootView):
1191 (WebCore::ScrollView::rootViewToTotalContents):
1192 (WebCore::ScrollView::windowToContents):
1193 (WebCore::ScrollView::contentsToWindow):
1194 * platform/ScrollView.h:
1196 2015-04-28 Eric Carlson <eric.carlson@apple.com>
1198 [Mac] Simplify code to support media engines which do not support target playback
1199 https://bugs.webkit.org/show_bug.cgi?id=144332
1201 Reviewed by Jer Noble.
1203 * Modules/mediasession/WebMediaSessionManager.cpp:
1204 (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Always make client
1205 callback, let them decide if it is significant or not.
1207 * html/HTMLMediaElement.cpp:
1208 (WebCore::HTMLMediaElement::HTMLMediaElement): m_loadTimer -> m_pendingActionTimer.
1209 (WebCore::HTMLMediaElement::scheduleDelayedAction): Handle CheckPlaybackTargetCompatablity.
1210 (WebCore::HTMLMediaElement::scheduleNextSourceChild): m_loadTimer -> m_pendingActionTimer.
1211 (WebCore::HTMLMediaElement::loadTimerFired): Renamed pendingActionTimerFired.
1212 (WebCore::HTMLMediaElement::prepareForLoad): m_loadTimer -> m_pendingActionTimer.
1213 (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Add logging.
1214 (WebCore::HTMLMediaElement::clearMediaPlayer): m_loadTimer -> m_pendingActionTimer.
1215 (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsSupported): Removed.
1216 (WebCore::HTMLMediaElement::dispatchEvent): If a 'webkitcurrentplaybacktargetiswirelesschanged'
1217 event is dispatched when the current target is wireless but the media engine does not support
1218 wireless playback, tell the media engine not to play to the target.
1219 * html/HTMLMediaElement.h:
1220 * html/HTMLMediaElement.idl:
1222 * html/HTMLMediaSession.cpp:
1223 (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Drive-by fix to disallow audio-only files.
1224 (WebCore::HTMLMediaSession::currentPlaybackTargetIsSupported): Deleted.
1225 * html/HTMLMediaSession.h:
1227 * platform/graphics/MediaPlayer.cpp:
1228 (WebCore::MediaPlayer::isCurrentPlaybackTargetSupported): Deleted.
1229 * platform/graphics/MediaPlayer.h:
1230 * platform/graphics/MediaPlayerPrivate.h:
1232 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1233 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Use a RetainPtr
1234 to explicitly manage the lifetime of the temporary object.
1235 (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Ditto.
1236 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1238 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1239 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
1240 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless):
1241 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetSupported): Deleted.
1243 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1244 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1245 (WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
1246 (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetWireless):
1247 (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetSupported): Deleted.
1249 2015-04-28 Alex Christensen <achristensen@webkit.org>
1251 [Content Extensions] Use less memory for CombinedURLFilters.
1252 https://bugs.webkit.org/show_bug.cgi?id=144290
1254 Reviewed by Andreas Kling.
1256 * contentextensions/CombinedURLFilters.cpp:
1257 (WebCore::ContentExtensions::recursiveMemoryUsed):
1258 (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
1259 (WebCore::ContentExtensions::generateNFAForSubtree):
1260 (WebCore::ContentExtensions::CombinedURLFilters::createNFAs):
1261 * contentextensions/NFA.cpp:
1262 (WebCore::ContentExtensions::NFA::memoryUsed):
1263 (WebCore::ContentExtensions::NFA::setActions):
1264 * contentextensions/NFA.h:
1265 * contentextensions/NFANode.h:
1266 * contentextensions/Term.h:
1267 (WebCore::ContentExtensions::Term::Term::generateGraph):
1268 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1269 Use Vectors instead of HashTables in PrefixTreeVertex because the sets stay small and need to be more memory efficient.
1271 2015-04-28 Brady Eidson <beidson@apple.com>
1273 Consolidate most "frame load" arguments into FrameLoadRequest.
1274 https://bugs.webkit.org/show_bug.cgi?id=144276
1276 Reviewed by Alexey Proskuryakov.
1278 No new tests (No change in behavior).
1280 This patch starts the long overdue process of wrangling the insane load methods in FrameLoader.
1282 Humble beginnings of this long process:
1283 - Put most of the various "frame load" arguments that are passed around within FrameLoader on FrameLoadRequest.
1284 - Get rid of the "easy" constructors of FrameLoadRequest, forcing users to actually think about what they're doing.
1285 - Change a private FrameLoader load method (urlSelected) to take a FrameLoadRequest instead of argument gobbledygook.
1286 - Change a public FrameLoader load methods (changeLocation) to take a FrameLoadRequest instead of gobbledygook.
1288 These cover the straightforward changes where it was easy to figure out what the values of the FrameLoadRequest
1289 arguments were from these various call sites.
1291 Further refactoring can be done in much smaller patches, handling fewer cases at a time. Little by little we will be
1292 able to reduce the number of "load" methods on FrameLoader and make sure that they mainly only take a FrameLoadRequest
1295 * inspector/InspectorFrontendClientLocal.cpp:
1296 (WebCore::InspectorFrontendClientLocal::openInNewTab):
1298 * inspector/InspectorPageAgent.cpp:
1299 (WebCore::InspectorPageAgent::navigate):
1301 * loader/FrameLoadRequest.cpp:
1302 (WebCore::FrameLoadRequest::FrameLoadRequest):
1303 * loader/FrameLoadRequest.h:
1304 (WebCore::FrameLoadRequest::FrameLoadRequest):
1305 (WebCore::FrameLoadRequest::lockHistory):
1306 (WebCore::FrameLoadRequest::lockBackForwardList):
1307 (WebCore::FrameLoadRequest::shouldSendReferrer):
1308 (WebCore::FrameLoadRequest::allowNavigationToInvalidURL):
1309 (WebCore::FrameLoadRequest::newFrameOpenerPolicy):
1310 (WebCore::FrameLoadRequest::shouldReplaceDocumentIfJavaScriptURL):
1312 * loader/FrameLoader.cpp:
1313 (WebCore::FrameLoader::changeLocation):
1314 (WebCore::FrameLoader::urlSelected):
1315 (WebCore::FrameLoader::loadFrameRequest):
1316 * loader/FrameLoader.h:
1318 * loader/NavigationScheduler.cpp:
1319 (WebCore::NavigationScheduler::scheduleLocationChange):
1321 * page/ContextMenuController.cpp:
1322 (WebCore::openNewWindow):
1323 (WebCore::ContextMenuController::contextMenuItemSelected):
1325 * page/DOMWindow.cpp:
1326 (WebCore::DOMWindow::createWindow):
1328 2015-04-27 Myles C. Maxfield <mmaxfield@apple.com>
1330 [Mac] [iOS] Implement font-synthesis CSS property
1331 https://bugs.webkit.org/show_bug.cgi?id=144305
1333 Reviewed by Andreas Kling.
1335 This patch is fairly straightforward, though there are some particular pieces to the patch listed below.
1337 The implementation of this font-synthesis CSS property lives inside FontCacheIOS and FontCacheMac. We already
1338 determine if we should synthesize bold and italics, this CSS property simply guards that decision.
1340 Because FontCache interacts with FontDescriptions and not RenderStyles, this patch moves the source of truth
1341 regarding font-synthesis into FontDescription (from RenderStyle).
1343 Test: fast/css3-text/font-synthesis.html
1345 * css/CSSPropertyNames.in: Mark font-synthesis as a FontProperty, which means that the relevant state is kept
1346 inside FontDescription. This also means that the property must be marked as a "high priority" property, which
1347 is enforced by it existing at the top of CSSPropertyNames.in. The move to FontDescription must be done so that
1348 FontCacheIOS and FontCacheMac have access to the saved state.
1349 * css/CSSComputedStyleDeclaration.cpp:
1350 (WebCore::fontSynthesisFromStyle): Update to look for state in FontDescription instead of RenderStyle.
1351 * css/CSSSegmentedFontFace.cpp:
1352 (WebCore::CSSSegmentedFontFace::fontRanges): Guard the synthetic bold and synthic italic decision on the new
1353 FontSynthesis state inside FontDescription.
1354 * css/StyleBuilderConverter.h:
1355 (WebCore::StyleBuilderConverter::convertFontSynthesis): Moved from
1356 StyleBuilderCustom::applyValueFontSynthesis(). This is because of the updated options inside of
1358 * css/StyleBuilderCustom.h:
1359 (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Deleted.
1360 * platform/graphics/FontDescription.h:
1361 (WebCore::FontDescription::FontDescription): Moved from RenderStyle.
1362 (WebCore::FontDescription::fontSynthesis): Ditto.
1363 (WebCore::FontDescription::setFontSynthesis): Ditto.
1364 (WebCore::FontDescription::initialFontSynthesis): Ditto.
1365 (WebCore::FontDescription::operator==): Update to include new state.
1366 * platform/graphics/FontCache.h:
1367 (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey): Make FontDescription hashes sensitive to the new
1368 state inside FontDescription.
1369 * platform/graphics/ios/FontCacheIOS.mm:
1370 (WebCore::FontCache::createFontPlatformData): Guard the synthetic bold and synthetic italic decision on the
1371 new FontSynthesis state inside FontDescription.
1372 * platform/graphics/mac/FontCacheMac.mm:
1373 (WebCore::FontCache::createFontPlatformData): Ditto.
1374 * platform/text/TextFlags.h: Move FontSynthesis type from RenderStyleConstants.
1375 * rendering/style/RenderStyle.h:
1376 (WebCore::RenderStyle::fontSynthesis): Moved to FontDescription.
1377 (WebCore::RenderStyle::setFontSynthesis): Ditto.
1378 (WebCore::RenderStyle::initialFontSynthesis): Ditto.
1379 * rendering/style/RenderStyleConstants.h: Moved FontSynthesis type to TextFlags.
1380 * rendering/style/StyleRareInheritedData.h: Remove state regarding font synthesis (moved to FontDescription)
1382 2015-04-28 Youenn Fablet <youenn.fablet@crf.canon.fr>
1384 SharedBuffer::copy is not computing the buffer size correctly when having m_dataArray
1385 https://bugs.webkit.org/show_bug.cgi?id=144321
1387 Reviewed by Darin Adler.
1389 Patch correctness covered by existing tests.
1391 * platform/SharedBuffer.cpp:
1392 (WebCore::SharedBuffer::copy): Direct appending to m_dataArray and not using append method as this method updates the SharedBuffer size.
1394 2015-04-28 Per Arne Vollan <peavo@outlook.com>
1397 https://bugs.webkit.org/show_bug.cgi?id=144327
1399 Reviewed by Brent Fulgham.
1401 When a data url is loaded, the ResourceHandle is not released.
1403 * platform/network/curl/ResourceHandleManager.cpp:
1404 (WebCore::ResourceHandleManager::startJob):
1406 2015-04-28 Andy Estes <aestes@apple.com>
1408 Fix the Mavericks Debug build after r183467.
1410 * platform/network/ResourceRequestBase.h:
1411 (WebCore::ResourceRequestBase::requester): Removed WEBCORE_EXPORT.
1412 (WebCore::ResourceRequestBase::setRequester): Ditto.
1414 2015-04-28 Csaba Osztrogonác <ossy@webkit.org>
1416 Remove make-file-arrays.py
1417 https://bugs.webkit.org/show_bug.cgi?id=144324
1419 Reviewed by Gyuyoung Kim.
1421 * make-file-arrays.py: Removed.
1423 2015-04-28 Antti Koivisto <antti@apple.com>
1427 * platform/network/ios/ResourceRequestIOS.mm:
1428 (WebCore::ResourceRequest::ResourceRequest):
1430 2015-04-28 Antti Koivisto <antti@apple.com>
1432 Network Cache: Disk cache getting filled by YouTube video data
1433 https://bugs.webkit.org/show_bug.cgi?id=144259
1435 Reviewed by Darin Adler.
1437 MSE media is loaded via XHR and tends to eventually fill the cache.
1439 YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
1440 We can reduce disk writes and keep more useful resources around by not caching them
1442 Test: http/tests/cache/disk-cache/disk-cache-media.html
1444 * loader/DocumentLoader.cpp:
1445 (WebCore::DocumentLoader::startLoadingMainResource):
1449 * loader/cache/CachedRawResource.cpp:
1450 (WebCore::CachedRawResource::CachedRawResource):
1451 * page/DiagnosticLoggingKeys.cpp:
1452 (WebCore::DiagnosticLoggingKeys::streamingMedia):
1453 * page/DiagnosticLoggingKeys.h:
1454 * platform/network/ResourceRequestBase.cpp:
1455 (WebCore::ResourceRequestBase::adopt):
1456 (WebCore::ResourceRequestBase::copyData):
1457 (WebCore::equalIgnoringHeaderFields):
1458 * platform/network/ResourceRequestBase.h:
1459 (WebCore::ResourceRequestBase::requester):
1460 (WebCore::ResourceRequestBase::setRequester):
1462 Add requester type to the request object. Currently this is main resource, xhr or unspecified.
1464 (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
1465 (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
1466 * platform/network/cf/ResourceRequest.h:
1467 (WebCore::ResourceRequest::deprecatedSetMainResourceRequest): Deleted.
1468 (WebCore::ResourceRequest::deprecatedIsMainResourceRequest): Deleted.
1470 Replace this iOS only field with shared mechanism.
1472 * platform/network/ios/QuickLook.mm:
1473 (WebCore::QuickLookHandle::create):
1474 * xml/XMLHttpRequest.cpp:
1475 (WebCore::XMLHttpRequest::createRequest):
1479 2015-04-28 Namhoon Kim <nakim@ea.com>
1481 Fix windows build error in WebCore related to bulk build.
1482 https://bugs.webkit.org/show_bug.cgi?id=144313
1484 Reviewed by Csaba Osztrogonác.
1486 No new tests because there is no behavior change.
1488 * css/CSSAllInOne.cpp:
1489 * dom/DOMAllInOne.cpp:
1491 2015-04-27 Simon Fraser <simon.fraser@apple.com>
1493 Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
1494 https://bugs.webkit.org/show_bug.cgi?id=144198
1496 Followup: fix assertions seen in fullscreen and pseudo-element tests. These code
1497 paths set the style to the existing pointer, but with a SyntheticStyleChange.
1498 We have to avoid an early return in this case.
1500 * rendering/RenderElement.cpp:
1501 (WebCore::RenderElement::setStyle):
1503 2015-04-25 Simon Fraser <simon.fraser@apple.com>
1505 Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
1506 https://bugs.webkit.org/show_bug.cgi?id=144198
1508 Reviewed by Darin Adler, Antti Koivisto.
1510 SyntheticStyleChange style recalcs are triggered for cases where behavior depends
1511 on state which is outside of RenderStyle; this includes triggering compositing for
1512 animations, for video and canvas, and for iframes with composited content.
1514 In these cases, we'd run through RenderElement::setStyle() and its fan-out, but
1515 with diff == StyleDifferenceEqual, and so be unable to determine if there
1516 is actual work to be done.
1518 This patch enforces the contract that the diff is never StyleDifferenceEqual if
1519 compositing or other work has to happen from setStyle(). This is achieved by
1520 passing in a 'hasSideEffects' flag, which causes the diff to become at least
1521 StyleDifferenceRecompositeLayer.
1523 RenderLayerCompositor::layerStyleChanged() can now safely early return
1524 if the diff is equal. Future patches will reduce redundant work even more.
1526 Test: compositing/animation/no-style-recalc-during-accelerated-animation.html
1528 * page/animation/AnimationBase.h:
1529 (WebCore::AnimationBase::animate): Returns a bool now if the state changed.
1530 (WebCore::AnimationBase::state):
1531 * page/animation/AnimationController.cpp:
1532 (WebCore::AnimationController::updateAnimations): bool out param which indicates
1533 whether any animations changed state.
1534 * page/animation/AnimationController.h:
1535 * page/animation/CompositeAnimation.cpp:
1536 (WebCore::CompositeAnimation::animate): If any transitions or animations changed
1537 state, set the animationStateChanged out param to true.
1538 * page/animation/CompositeAnimation.h:
1539 * page/animation/ImplicitAnimation.cpp:
1540 (WebCore::ImplicitAnimation::animate): Return true if the state changed.
1541 * page/animation/ImplicitAnimation.h:
1542 * page/animation/KeyframeAnimation.cpp:
1543 (WebCore::KeyframeAnimation::animate): Return true if the state changed.
1544 * page/animation/KeyframeAnimation.h:
1545 * rendering/RenderElement.cpp:
1546 (WebCore::RenderElement::adjustStyleDifference): We may enter here now with diff
1547 != StyleDifferenceEqual, but still need to do the check to see if layers changed.
1548 (WebCore::RenderElement::initializeStyle): When setting style for the first time,
1549 don't use StyleDifferenceEqual.
1550 (WebCore::RenderElement::setStyle): Additional flag to indicate whether this style
1551 change involves side effects. If the diff is equal but the flag is set, change
1552 the diff to StyleDifferenceRecompositeLayer (the "lowest" non-zero diff).
1553 * rendering/RenderElement.h:
1554 (WebCore::RenderElement::setAnimatableStyle): Pass true to setStyle() if hasSideEffects
1555 is true, or if animation state changed.
1556 * rendering/RenderLayer.cpp:
1557 (WebCore::RenderLayer::styleChanged): Pass the diff down.
1558 * rendering/RenderLayerCompositor.cpp:
1559 (WebCore::RenderLayerCompositor::layerStyleChanged): Return if the diff is equal.
1560 * rendering/RenderLayerCompositor.h:
1561 * rendering/style/RenderStyleConstants.h: StyleDifferenceNewStyle is used when
1562 setting style for the first time.
1563 * style/StyleResolveTree.cpp:
1564 (WebCore::Style::createRendererIfNeeded): Provide animationsChanged bool (which is unused).
1565 (WebCore::Style::resolveLocal): If the style change is synthetic, set the flag that
1566 says there are side-effects.
1568 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
1570 [GTK] Add one single option to control all OpenGL-related options
1571 https://bugs.webkit.org/show_bug.cgi?id=144105
1573 Reviewed by Martin Robinson.
1575 Test WTF_USE_TEXTURE_MAPPER since USE_TEXTURE_MAPPER has been removed.
1577 * PlatformGTK.cmake:
1579 2015-04-27 Myles C. Maxfield <mmaxfield@apple.com>
1581 Consolidate one-line flag-related header files into TextFlags.h
1582 https://bugs.webkit.org/show_bug.cgi?id=144295
1584 Reviewed by Tim Horton.
1586 There were a collection of single-line header files throughout platform/ which contain
1587 single-line type declaractions of flags related to text layout & rendering. This patch
1588 consolidates all these single-line headers into TextFlags.h
1590 No new tests because there is no behavior change.
1592 * WebCore.vcxproj/WebCore.vcxproj:
1593 * WebCore.vcxproj/WebCore.vcxproj.filters:
1594 * WebCore.xcodeproj/project.pbxproj:
1595 * css/CSSFontFace.h:
1596 * css/CSSPrimitiveValueMappings.h:
1597 * loader/cache/CachedFont.h:
1598 * loader/cache/CachedTextTrack.h:
1600 * platform/DragImage.h:
1601 * platform/graphics/FontDescription.h:
1602 * platform/graphics/FontOrientation.h: Removed.
1603 * platform/graphics/FontPlatformData.h:
1604 * platform/graphics/FontRenderingMode.h: Removed.
1605 * platform/graphics/FontSmoothingMode.h: Removed.
1606 * platform/graphics/FontTraitsMask.h: Removed.
1607 * platform/graphics/FontWidthVariant.h: Removed.
1608 * platform/graphics/TextRenderingMode.h: Removed.
1609 * platform/graphics/cairo/FontCustomPlatformData.h:
1610 * platform/graphics/freetype/FontPlatformData.h:
1611 * platform/graphics/mac/FontCustomPlatformData.h:
1612 * platform/graphics/win/FontCustomPlatformData.h:
1613 * platform/text/NonCJKGlyphOrientation.h: Removed.
1614 * platform/text/TextFlags.h:
1615 * rendering/TextPainter.h:
1616 * style/StyleFontSizeFunctions.h:
1618 2015-04-27 Daniel Bates <dabates@apple.com>
1620 Form control may be associated with the wrong HTML Form element after form id change
1621 https://bugs.webkit.org/show_bug.cgi?id=133456
1622 <rdar://problem/17095055>
1624 Reviewed by Andy Estes.
1626 Fixes an issue where a form control may be associated with the wrong HTML Form element
1627 after the id of the HTML Form element associated with the form control is changed when
1628 there is more than one HTML Form element with the same id in the document. Specifically,
1629 a form control that has an HTML form attribute value X will always be associated with
1630 some HTML Form element f where f.id = X regardless of whether f.id is subsequently
1633 Tests: fast/forms/change-form-id-to-be-unique-then-submit-form.html
1634 fast/forms/change-form-id-to-be-unique.html
1637 (WebCore::Element::attributeChanged): Notify observers when the id of an element changed.
1638 (WebCore::Element::updateId): Added parameter NotifyObservers (defaults to NotifyObservers::Yes),
1639 as to whether we should notify observers of the id change.
1640 (WebCore::Element::updateIdForTreeScope): Ditto.
1641 (WebCore::Element::willModifyAttribute): Do not notify observers of the id change immediately. As
1642 indicated by the name of this method, we plan to modify the DOM attribute id of the element, but
1643 we have not actually modified it when this method is called. Instead we will notify observers
1644 in Element::attributeChanged(), which is called after the DOM attribute id is modified.
1645 (WebCore::Element::cloneAttributesFromElement): Ditto.
1646 * dom/Element.h: Defined enum class NotifyObservers.
1647 * dom/TreeScope.cpp:
1648 (WebCore::TreeScope::addElementById): Added boolean parameter notifyObservers (defaults to true)
1649 as to whether we should dispatch a notification to all observers.
1650 (WebCore::TreeScope::removeElementById): Ditto.
1653 2015-04-27 Alex Christensen <achristensen@webkit.org>
1655 Reduce allocations and memory usage when compiling content extensions.
1656 https://bugs.webkit.org/show_bug.cgi?id=144277
1658 Reviewed by Benjamin Poulain.
1660 Covered by existing tests.
1662 * contentextensions/Term.h:
1663 (WebCore::ContentExtensions::Term::CharacterSet::set):
1664 (WebCore::ContentExtensions::Term::CharacterSet::get):
1665 (WebCore::ContentExtensions::Term::CharacterSet::invert):
1666 (WebCore::ContentExtensions::Term::CharacterSet::inverted):
1667 (WebCore::ContentExtensions::Term::CharacterSet::bitCount):
1668 (WebCore::ContentExtensions::Term::CharacterSet::operator==):
1669 (WebCore::ContentExtensions::Term::CharacterSet::hash):
1670 (WebCore::ContentExtensions::Term::Term):
1671 (WebCore::ContentExtensions::Term::addCharacter):
1672 (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
1673 (WebCore::ContentExtensions::Term::isUniversalTransition):
1674 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1675 Use two uint64_t's instead of a BitVector with a capacity of 128 bits.
1677 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
1679 Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
1680 https://bugs.webkit.org/show_bug.cgi?id=144193
1682 Reviewed by Darin Adler.
1685 * platform/graphics/ANGLEWebKitBridge.cpp:
1686 * platform/graphics/FormatConverter.cpp:
1687 * platform/graphics/FormatConverter.h:
1688 * platform/graphics/GLContext.h:
1689 * platform/graphics/GraphicsContext3D.cpp:
1690 * platform/graphics/GraphicsContext3DPrivate.cpp:
1691 * platform/graphics/OpenGLShims.cpp:
1692 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1693 * platform/graphics/cg/GraphicsContext3DCG.cpp:
1694 * platform/graphics/egl/GLContextEGL.cpp:
1695 * platform/graphics/egl/GLContextEGL.h:
1696 * platform/graphics/glx/GLContextGLX.cpp:
1697 * platform/graphics/glx/GLContextGLX.h:
1698 * platform/graphics/mac/GraphicsContext3DMac.mm:
1699 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1700 * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1701 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
1702 * platform/graphics/opengl/GLPlatformContext.cpp:
1703 * platform/graphics/opengl/GLPlatformSurface.cpp:
1704 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1705 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1706 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1707 * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
1708 * platform/graphics/win/GraphicsContext3DWin.cpp:
1710 2015-04-27 Jer Noble <jer.noble@apple.com>
1712 [iOS] Video not centered in element on retina devices
1713 https://bugs.webkit.org/show_bug.cgi?id=144274
1715 Reviewed by Simon Fraser.
1717 In r173702, a transform was added to the video layer (and a matching, inverse transform
1718 in the UIProcess), but this transform affects the position property of the video layer
1719 used to position the video content within the element bounds when their aspect ratios
1722 To work around this problem, pre-apply the transform during -setPosition:.
1724 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1725 (-[WebVideoContainerLayer setPosition:]):
1727 2015-04-27 Jer Noble <jer.noble@apple.com>
1729 Add a setting & restriction which prevents non-interactivte playback of audible media elements.
1730 https://bugs.webkit.org/show_bug.cgi?id=143486
1732 Reviewed by Eric Carlson.
1734 Tests: media/audio-playback-restriction-autoplay.html
1735 media/audio-playback-restriction-play.html
1737 To allow clients who want to allow non-user-interactive video-only playback, but still
1738 restrict playback of audible media elements, add a new setting and matching restriction
1739 which disallows playback of media elements containing audible characteristics.
1741 * html/HTMLMediaElement.cpp:
1742 (WebCore::HTMLMediaElement::HTMLMediaElement): Set the RequireUserGestureForAudioRateChange
1743 restriction if the audioPlaybackRequiresUserGesture() setting is set.
1744 (WebCore::HTMLMediaElement::parseAttribute): Drive-by fix. Move the opening brace
1745 out of the #if, as this confuses the heck out of diff and makes all subsequent
1746 changes appear to be within HTMLMediaElement::parseAttribute.
1747 (WebCore::HTMLMediaElement::autoplay): Remove the restriction check from within autoplay().
1748 It is checked again immediately after every autoplay() call site.
1749 (WebCore::HTMLMediaElement::pauseInternal): Remove the iOS-only #if.
1750 (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Check whether playback
1751 is permitted, and if not, pause.
1752 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
1753 (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Ditto.
1754 * html/HTMLMediaSession.cpp:
1755 (WebCore::restrictionName): Since BehaviorRestrictions is a bitfield, check each bit
1757 (WebCore::HTMLMediaSession::removeBehaviorRestriction): Handle RequireUserGestureForAudioRateChange.
1758 (WebCore::HTMLMediaSession::playbackPermitted): Check whether the element has audio and
1759 audio playback is restricted, and return false if so.
1760 * html/HTMLMediaSession.h:
1761 * page/Settings.cpp:
1763 * testing/Internals.cpp:
1764 (WebCore::Internals::setMediaSessionRestrictions): Added.
1765 (WebCore::Internals::setMediaElementRestrictions): Added.
1766 * testing/Internals.h:
1767 * testing/Internals.idl:
1769 2015-04-27 Jer Noble <jer.noble@apple.com>
1771 [WebAudio] AudioContext does not remove user-gesture restriction during resume()
1772 https://bugs.webkit.org/show_bug.cgi?id=144211
1774 Reviewed by Eric Carlson.
1776 Tests: webaudio/audiocontext-restriction-audiobuffersourcenode-start.html
1777 webaudio/audiocontext-restriction.html
1779 Before the introduction of resume(), suspend(), and stop(), AudioContexts which required
1780 a user-gesture would start normally, but would effectively mute their outputs. Now that
1781 the AudioContext's state property is exposed to JavaScript, the AudioContext should stay
1782 in the "suspended" state until the user-gesture restriction is lifted.
1784 Add a new method, willBeginPlayback() which checks and potentially clears the context's
1785 behavior restrictions before checking with the MediaSession. Call this new willBeginPlayback()
1786 method when the state would transition to "running".
1788 Because they may be called before any nodes are created, make sure to call lazyInitialize()
1789 from within the JS-exposed resumePlayback(), suspendPlayback(), and stopPlayback() methods.
1791 Instead of clearing the behavior restrictions directly, scheduled AudioNodes should instead
1792 call a new method nodeWillBeginPlayback(). Because existing sites will call AudioNode.start()
1793 inside a user-gesture handler to clear the user-gesture restriction, call startRendering()
1794 from nodeWillBeginPlayback(). But because we don't want AudioNode.start() to resume playback
1795 unconditionally, only do so when the user-gesture restriction is set.
1797 Now that an AudioContext will not transition to "running" state without a user-gesture (if
1798 that restriction is set), there's no reason to check for that restriction from inside
1799 AudioDestinationNode.
1801 Add some internal methods to set and clear AudioContext BehaviorRestrictions for testing purposes.
1803 * Modules/webaudio/AudioBufferSourceNode.cpp:
1804 (WebCore::AudioBufferSourceNode::startPlaying):
1805 * Modules/webaudio/AudioContext.cpp:
1806 (WebCore::AudioContext::nodeWillBeginPlayback):
1807 (WebCore::AudioContext::willBeginPlayback):
1808 (WebCore::AudioContext::willPausePlayback):
1809 (WebCore::AudioContext::startRendering):
1810 (WebCore::AudioContext::suspendContext):
1811 (WebCore::AudioContext::resumeContext):
1812 (WebCore::AudioContext::closeContext):
1813 (WebCore::AudioContext::suspendPlayback):
1814 (WebCore::AudioContext::mayResumePlayback):
1815 * Modules/webaudio/AudioContext.h:
1816 (WebCore::AudioContext::behaviorRestrictions):
1817 (WebCore::AudioContext::userGestureRequiredForAudioStart):
1818 (WebCore::AudioContext::pageConsentRequiredForAudioStart):
1819 * Modules/webaudio/AudioDestinationNode.cpp:
1820 (WebCore::AudioDestinationNode::render):
1821 * Modules/webaudio/AudioScheduledSourceNode.cpp:
1822 (WebCore::AudioScheduledSourceNode::start):
1823 * testing/Internals.cpp:
1824 (WebCore::Internals::setAudioContextRestrictions):
1825 * testing/Internals.h:
1826 * testing/Internals.idl:
1828 2015-04-27 Alexey Proskuryakov <ap@apple.com>
1832 * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1833 Use -setObject:forKey:, not array subscript.
1835 2015-04-27 Eric Carlson <eric.carlson@apple.com>
1837 WirelessTargetPicker should not be visible unless a file is playable
1838 https://bugs.webkit.org/show_bug.cgi?id=144271
1839 <rdar://problem/20712003>
1841 Reviewed by Jer Noble.
1843 * Modules/mediacontrols/mediaControlsApple.js:
1844 (Controller.prototype.isPlayable): New.
1845 (Controller.prototype.setStatusHidden): Call updateWirelessTargetAvailable.
1846 (Controller.prototype.updateWirelessTargetAvailable): Don't show the button until the
1847 status message has been hidden.
1849 2015-04-22 Martin Robinson <mrobinson@igalia.com>
1851 [CMake] Autogenerate cmakeconfig.h.cmake
1852 https://bugs.webkit.org/show_bug.cgi?id=143997
1854 Reviewed by Csaba Osztrogonác.
1856 * PlatformGTK.cmake: Use the WTF_USE style variables, because those are the same
1857 as the ones exposed to the build.
1859 2015-04-27 Zalan Bujtas <zalan@apple.com>
1861 Simple line layout: Wrong text offsetting when range does not start from the first renderer.
1862 https://bugs.webkit.org/show_bug.cgi?id=144167
1863 rdar://problem/20639857
1865 Reviewed by Simon Fraser.
1867 This patch ensures that TextIterator returns the right text when the input range starts
1868 from a sibling node.
1870 TextIterator::m_previousTextLengthInFlow keeps track of the current node offset from the parent.
1871 It is required to map simple line layout runs to RenderText positions.
1872 This patch sets the offset value when the iteration start with a sibling node.
1874 Test: fast/text/range-text-with-simple-line-layout.html
1876 * editing/TextIterator.cpp:
1877 (WebCore::TextIterator::TextIterator):
1878 (WebCore::TextIterator::handleTextNode):
1880 2015-04-27 Commit Queue <commit-queue@webkit.org>
1882 Unreviewed, rolling out r183393.
1883 https://bugs.webkit.org/show_bug.cgi?id=144272
1885 Caused memory corruption detected by GuardMalloc (Requested by
1890 "Synchronous XMLHttpRequest should get access to AppCache
1891 resources stored as flat files"
1892 https://bugs.webkit.org/show_bug.cgi?id=143711
1893 http://trac.webkit.org/changeset/183393
1895 2015-04-27 Per Arne Vollan <peavo@outlook.com>
1897 [Curl] Favicons loaded from disc cache are ignored.
1898 https://bugs.webkit.org/show_bug.cgi?id=143953
1900 Reviewed by Alex Christensen.
1902 When a favicon is loaded from the Curl disc cache, the icon data is thrown away.
1903 This happens because we give a 304 response, which makes the icon loader ignore
1904 the response. We can solve this by responding with 200 OK.
1906 * platform/network/ResourceHandleInternal.h:
1907 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1908 * platform/network/curl/CurlCacheManager.cpp:
1909 (WebCore::CurlCacheManager::didReceiveResponse):
1910 * platform/network/curl/ResourceHandleManager.cpp:
1911 (WebCore::headerCallback):
1912 (WebCore::ResourceHandleManager::initializeHandle):
1914 2015-04-27 Brady Eidson <beidson@apple.com>
1916 Make 'enum NavigationType' be an enum class
1917 https://bugs.webkit.org/show_bug.cgi?id=144270
1919 Reviewed by Alex Christensen.
1921 No new tests (No change in behavior).
1923 I’ll be adding a new NavigationType for bug 144269 so it makes sense to make this
1924 an enum class first.
1926 * loader/FrameLoader.cpp:
1927 (WebCore::FrameLoader::load):
1928 (WebCore::FrameLoader::reload):
1929 (WebCore::FrameLoader::loadDifferentDocumentItem):
1930 * loader/FrameLoaderTypes.h:
1932 * loader/NavigationAction.cpp:
1933 (WebCore::navigationType):
1934 (WebCore::NavigationAction::NavigationAction):
1936 * loader/PolicyChecker.cpp:
1937 (WebCore::PolicyChecker::checkNavigationPolicy):
1939 * page/PerformanceNavigation.cpp:
1940 (WebCore::PerformanceNavigation::type):
1942 2015-04-27 Yoav Weiss <yoav@yoav.ws>
1944 Fix viewport units in Media Queries
1945 https://bugs.webkit.org/show_bug.cgi?id=144260
1947 Reviewed by Darin Adler.
1949 This patch makes sure that viewport units are considered "length units"
1950 in the context of Media Queries, by having MediaQueryExp use the unit logic
1951 that is in CSSPrimitiveValue.
1952 It does that by turning the relevant methods in CSSPrimitiveValue into static.
1954 It also makes sure that the logic for "resolution units" is not maintained separately
1955 in MediaQueryExp, to avoid similiar issues in the future with resolution units.
1957 Test: fast/media/mq-viewport-units.html
1959 * css/CSSPrimitiveValue.h:
1960 (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Added a static variant.
1961 (WebCore::CSSPrimitiveValue::isLength): Added a static variant.
1962 (WebCore::CSSPrimitiveValue::isResolution): Added a static variant.
1963 * css/MediaQueryExp.cpp:
1964 (WebCore::featureWithValidPositiveLenghtOrNumber): Call CSSPrimitiveValue's length unit logic.
1965 (WebCore::featureWithValidDensity): Call CSSPrimitiveValue's resolution unit logic.
1967 2015-04-27 Javier Fernandez <jfernandez@igalia.com>
1969 [CSS Grid Layout] Support for the justify-self and justify-items in grid layout
1970 https://bugs.webkit.org/show_bug.cgi?id=133280
1972 Reviewed by David Hyatt.
1974 Implementation of justify-self and justify-items properties for grid. It supports
1975 different writing-modes and direction. Margins, borders and paddings are also
1976 considered when computing the final position and stretched size.
1978 This patch applies also a quite important refactoring of the alignment logic in
1979 order to share code between the two alignment dimensions, row-axis and column-axis.
1981 Overflow handling is still missing and will be added later in a follow-up bug.
1983 Tests: fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html
1984 fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html
1985 fast/css-grid-layout/grid-align-justify-margin-border-padding.html
1986 fast/css-grid-layout/justify-self-cell.html
1988 * rendering/RenderGrid.cpp:
1989 (WebCore::RenderGrid::layoutGridItems):
1990 (WebCore::RenderGrid::columnAxisPositionForChild):
1991 (WebCore::RenderGrid::rowAxisPositionForChild):
1992 (WebCore::RenderGrid::rowPositionForChild):
1993 (WebCore::RenderGrid::columnPositionForChild):
1994 (WebCore::RenderGrid::findChildLogicalPosition):
1995 (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild): Deleted.
1996 (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
1997 (WebCore::RenderGrid::marginLogicalHeightForChild): Deleted.
1998 (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): Deleted.
1999 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): Deleted.
2000 * rendering/RenderGrid.h:
2001 * rendering/style/RenderStyle.cpp:
2002 (WebCore::RenderStyle::resolveJustification):
2003 * rendering/style/RenderStyle.h:
2005 2015-04-27 Darin Adler <darin@apple.com>
2007 Crashes under IDBDatabase::closeConnection
2008 https://bugs.webkit.org/show_bug.cgi?id=141745
2010 Reviewed by Alexey Proskuryakov.
2012 * Modules/indexeddb/IDBDatabase.cpp:
2013 (WebCore::IDBDatabase::~IDBDatabase): Do the work of close/closeConnection without
2014 actually calling those functions.
2015 (WebCore::IDBDatabase::closeConnection): Protect the database so it's not destroyed
2016 in the middle of this function's execution.
2018 2015-04-27 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2020 [Streams API] ReadableStream constructor start function should be able to close the stream
2021 https://bugs.webkit.org/show_bug.cgi?id=143363
2023 Reviewed by Benjamin Poulain.
2025 Implements https://streams.spec.whatwg.org/#close-readable-stream.
2026 When the "close" JS function is called, the stream is getting closed.
2027 The stream state is changed to close and if it has a reader, the reader gets closed as well:
2028 The reader resolves the closed promise and releases the stream.
2030 Enabled the possibility to resolve a promise with any JS value.
2031 This is used to resolve closed promise with jsUndefined and will be used for read promises in
2032 the future as well, though of course it is not restricted to Streams.
2034 Covered by reference tests that are now passing.
2036 * Modules/streams/ReadableStream.h:
2037 * Modules/streams/ReadableStream.cpp:
2038 (WebCore::ReadableStream::changeStateToClosed): Called by the JS function 'close'.
2039 * Modules/streams/ReadableStreamReader.cpp:
2040 (WebCore::ReadableStreamReader::ReadableStreamReader): Initialized stream.
2041 (WebCore::ReadableStreamReader::initialize): Added to handle state change at constructor time
2042 in particular closed/errored state.
2043 (WebCore::ReadableStreamReader::releaseStream): Releases the stream.
2044 (WebCore::ReadableStreamReader::closed): Stores the promise callbacks and invokes success
2045 immediately if the stream is already closed.
2046 (WebCore::ReadableStreamReader::changeStateToClosed): Changes the internal state to closed,
2047 resolves the promise and releases the stream.
2048 * Modules/streams/ReadableStreamReader.h:
2049 (WebCore::ReadableStreamReader::State): Added.
2050 * bindings/js/JSDOMPromise.h:
2051 (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Adds the ability to resolve a promise with
2053 * bindings/js/JSReadableStreamControllerCustom.cpp:
2054 (WebCore::JSReadableStreamController::close): Not "notImplemented" anymore. Now it closes the
2056 * bindings/js/JSReadableStreamReaderCustom.cpp:
2057 (WebCore::JSReadableStreamReader::closed): Resolves the promise with undefined.
2059 2015-04-27 Csaba Osztrogonác <ossy@webkit.org>
2061 Fix the !ENABLE(CSS_GRID_LAYOUT) build after r183370
2062 https://bugs.webkit.org/show_bug.cgi?id=144255
2064 Reviewed by Carlos Garcia Campos.
2066 * rendering/RenderBox.cpp:
2067 (WebCore::RenderBox::computeLogicalHeight):
2069 2015-04-27 Youenn Fablet <youenn.fablet@crf.canon.fr>
2071 Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
2072 https://bugs.webkit.org/show_bug.cgi?id=143711
2074 Reviewed by Darin Adler.
2076 This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
2077 If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
2078 This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
2080 Test: http/tests/appcache/simple-video-sync.html
2082 * html/HTMLMediaElement.cpp:
2083 (WebCore::HTMLMediaElement::parseAttribute):
2084 * loader/DocumentThreadableLoader.cpp:
2085 (WebCore::DocumentThreadableLoader::loadRequest):
2086 * loader/FrameLoader.cpp:
2087 (WebCore::FrameLoader::loadResourceSynchronously):
2088 * loader/FrameLoader.h:
2089 * loader/appcache/ApplicationCacheHost.cpp:
2090 (WebCore::ApplicationCacheHost::maybeLoadResource):
2091 (WebCore::ApplicationCacheHost::createFileURL):
2092 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
2093 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
2094 * loader/appcache/ApplicationCacheHost.h:
2095 * xml/XSLTProcessorLibxslt.cpp:
2096 (WebCore::docLoaderFunc):
2097 * xml/parser/XMLDocumentParserLibxml2.cpp:
2098 (WebCore::openFunc):
2100 2015-04-24 Philippe Normand <pnormand@igalia.com>
2102 [JHBuild] Move to upstream OpenWebRTC
2103 https://bugs.webkit.org/show_bug.cgi?id=144145
2105 Reviewed by Carlos Garcia Campos.
2107 * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
2108 (WebCore::initializeOpenWebRTC): Update with new owr_init API.
2110 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2112 [SOUP] Add initial implementation of NetworkProcess disk cache
2113 https://bugs.webkit.org/show_bug.cgi?id=143872
2115 Reviewed by Martin Robinson.
2117 Allow to create a GRefPtr for SoupBuffer. Even though SoupBuffer
2118 is not a GObject and has copy/free functions instead of ref/unref,
2119 it's internally refcounted, so we could use copy/free as
2122 * PlatformGTK.cmake:
2123 * platform/network/soup/GRefPtrSoup.cpp: Added.
2126 * platform/network/soup/GRefPtrSoup.h: Added.
2128 2015-04-26 Manuel Rego Casasnovas <rego@igalia.com>
2130 [CSS Grid Layout] LayoutBox::hasDefiniteLogicalHeight() should consider abspos boxes as definite
2131 https://bugs.webkit.org/show_bug.cgi?id=144144
2133 Reviewed by Darin Adler.
2135 Change order in hasDefiniteLogicalHeight() ifs to consider definite
2136 absolutely positioned elements.
2138 Test: fast/css-grid-layout/percent-track-breadths-regarding-container-size.html
2140 * rendering/RenderBox.cpp:
2141 (WebCore::RenderBox::hasDefiniteLogicalHeight):
2143 2015-04-26 Said Abou-Hallawa <sabouhallawa@apple.com>
2145 SVGFilterBuilder should drive the builtin sourceAlpha from the passed sourceGraphic
2146 https://bugs.webkit.org/show_bug.cgi?id=144137
2148 Reviewed by Darin Adler.
2150 The SourceAlpha should be driven from the last applied FilterEffect. This
2151 will require the SourceAlpha FilterEffect to wrap a FilterEffect rather
2152 than just getting the SourceGraphic reference from FilterEffectRenderer.
2154 This is based on the Blink patch:
2155 https://src.chromium.org/viewvc/blink?revision=194115&view=revision.
2157 Test: svg/filters/sourceAlpha-input-filter-effect.html
2159 * platform/graphics/filters/SourceAlpha.cpp:
2160 (WebCore::SourceAlpha::create): Make SourceAlpha wraps a FilterEffect
2161 rather than a Filter.
2163 (WebCore::SourceAlpha::determineAbsolutePaintRect): Determine the paint
2164 rect from the wrapped FilterEffect.
2166 (WebCore::SourceAlpha::platformApplySoftware): Extract the alpha channel
2167 from the wrapped FilterEffect.
2169 (WebCore::SourceAlpha::SourceAlpha):
2170 * platform/graphics/filters/SourceAlpha.h:
2171 (WebCore::SourceAlpha::SourceAlpha): Deleted.
2172 Reimplement the constructor of the SourceAlpha such that it wraps the
2173 sourceEffect in its inputEffects.
2175 * rendering/FilterEffectRenderer.cpp:
2176 (WebCore::FilterEffectRenderer::buildReferenceFilter): Delete the FIXME
2177 comment and do exactly what it said. This matches the implementation of
2180 * rendering/svg/RenderSVGResourceFilter.cpp:
2181 (WebCore::RenderSVGResourceFilter::buildPrimitives):
2182 Delete the extra argument.
2184 * svg/graphics/filters/SVGFilterBuilder.cpp:
2185 (WebCore::SVGFilterBuilder::SVGFilterBuilder):
2186 * svg/graphics/filters/SVGFilterBuilder.h: Drive the SourceAlpha from the
2187 passed source FilterEffect.
2189 * platform/graphics/filters/FEBlend.cpp:
2190 * platform/graphics/filters/FEBlend.h:
2191 * platform/graphics/filters/FEColorMatrix.cpp:
2192 * platform/graphics/filters/FEColorMatrix.h:
2193 * platform/graphics/filters/FEComponentTransfer.cpp:
2194 * platform/graphics/filters/FEComponentTransfer.h:
2195 * platform/graphics/filters/FEComposite.cpp:
2196 * platform/graphics/filters/FEComposite.h:
2197 * platform/graphics/filters/FEConvolveMatrix.cpp:
2198 * platform/graphics/filters/FEConvolveMatrix.h:
2199 * platform/graphics/filters/FEDiffuseLighting.cpp:
2200 * platform/graphics/filters/FEDiffuseLighting.h:
2201 * platform/graphics/filters/FEDisplacementMap.cpp:
2202 * platform/graphics/filters/FEDisplacementMap.h:
2203 * platform/graphics/filters/FEDropShadow.cpp:
2204 * platform/graphics/filters/FEDropShadow.h:
2205 * platform/graphics/filters/FEFlood.cpp:
2206 * platform/graphics/filters/FEFlood.h:
2207 * platform/graphics/filters/FEGaussianBlur.cpp:
2208 * platform/graphics/filters/FEGaussianBlur.h:
2209 * platform/graphics/filters/FELighting.cpp:
2210 * platform/graphics/filters/FELighting.h:
2211 * platform/graphics/filters/FEMerge.cpp:
2212 * platform/graphics/filters/FEMerge.h:
2213 * platform/graphics/filters/FEMorphology.cpp:
2214 * platform/graphics/filters/FEMorphology.h:
2215 * platform/graphics/filters/FEOffset.cpp:
2216 * platform/graphics/filters/FEOffset.h:
2217 * platform/graphics/filters/FESpecularLighting.cpp:
2218 * platform/graphics/filters/FESpecularLighting.h:
2219 * platform/graphics/filters/FETile.cpp:
2220 * platform/graphics/filters/FETile.h:
2221 * platform/graphics/filters/FETurbulence.cpp:
2222 * platform/graphics/filters/FETurbulence.h:
2223 * platform/graphics/filters/Filter.h:
2224 * platform/graphics/filters/FilterEffect.cpp:
2225 * platform/graphics/filters/FilterEffect.h:
2226 * platform/graphics/filters/SourceGraphic.cpp:
2227 * platform/graphics/filters/SourceGraphic.h:
2228 * rendering/svg/RenderSVGResourceFilter.h:
2229 * rendering/svg/SVGRenderTreeAsText.cpp:
2230 Code clean up: Pointer to reference conversion. It starts by converting
2231 FilterEffect::m_filter from pointer to reference and it kept expanding.
2232 All the creations of FilterEffect were happening by passing "this" so
2233 passing "*this" did not require to check whether the pointer is nil.
2235 * svg/SVGFEBlendElement.cpp:
2236 * svg/SVGFEBlendElement.h:
2237 * svg/SVGFEColorMatrixElement.cpp:
2238 * svg/SVGFEColorMatrixElement.h:
2239 * svg/SVGFEComponentTransferElement.cpp:
2240 * svg/SVGFEComponentTransferElement.h:
2241 * svg/SVGFECompositeElement.cpp:
2242 * svg/SVGFECompositeElement.h:
2243 * svg/SVGFEConvolveMatrixElement.cpp:
2244 * svg/SVGFEConvolveMatrixElement.h:
2245 * svg/SVGFEDiffuseLightingElement.cpp:
2246 * svg/SVGFEDiffuseLightingElement.h:
2247 * svg/SVGFEDisplacementMapElement.cpp:
2248 * svg/SVGFEDisplacementMapElement.h:
2249 * svg/SVGFEDropShadowElement.cpp:
2250 * svg/SVGFEDropShadowElement.h:
2251 * svg/SVGFEFloodElement.cpp:
2252 * svg/SVGFEFloodElement.h:
2253 * svg/SVGFEGaussianBlurElement.cpp:
2254 * svg/SVGFEGaussianBlurElement.h:
2255 * svg/SVGFEImageElement.cpp:
2256 * svg/SVGFEImageElement.h:
2257 * svg/SVGFEMergeElement.cpp:
2258 * svg/SVGFEMergeElement.h:
2259 * svg/SVGFEMorphologyElement.cpp:
2260 * svg/SVGFEMorphologyElement.h:
2261 * svg/SVGFEOffsetElement.cpp:
2262 * svg/SVGFEOffsetElement.h:
2263 * svg/SVGFESpecularLightingElement.cpp:
2264 * svg/SVGFESpecularLightingElement.h:
2265 * svg/SVGFETileElement.cpp:
2266 * svg/SVGFETileElement.h:
2267 * svg/SVGFETurbulenceElement.cpp:
2268 * svg/SVGFETurbulenceElement.h:
2269 * svg/SVGFilterPrimitiveStandardAttributes.h:
2270 * svg/graphics/filters/SVGFEImage.cpp:
2271 * svg/graphics/filters/SVGFEImage.h:
2272 Code clean up: Pointer to reference and PassRefPtr<> to RefPtr<> or Ref<>
2275 2015-04-26 Darin Adler <darin@apple.com>
2277 REGRESSION (r174283): disabled default buttons use impossible-to-read white text on Mac
2278 https://bugs.webkit.org/show_bug.cgi?id=144237
2280 Reviewed by Simon Fraser.
2282 No test because DumpRenderTree and WebKitTestRunner don't have a good method
2283 for testing behaviors that are specific to active windows. That's the same reason
2284 that the change that caused this bug didn't come with a regression test.
2286 * rendering/RenderTheme.cpp:
2287 (WebCore::RenderTheme::adjustStyle): Renamed "e" to "element". Added a comment to
2288 clarify the meaning of the setInsideDefaultButton function, and added an
2289 isDisabledFormControl check so it won't trigger on a disabled button.
2290 (WebCore::RenderTheme::systemColor): Moved CSSValueActivebuttontext into
2291 alphabetical order to match the rest of the switch statement ordering.
2293 * rendering/RenderThemeMac.mm:
2294 (WebCore::RenderThemeMac::systemColor): Moved CSSValueActivebuttontext into
2295 alphabetical order to match the rest of the switch statement ordering. Also
2296 fixed its behavior on older versions of OS X; it should just return the same
2297 thing that CSSValueButtontext would return in that context.
2299 2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
2301 [ES6] Implement ES6 template literals
2302 https://bugs.webkit.org/show_bug.cgi?id=142691
2304 Reviewed by Darin Adler.
2306 Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
2308 * Configurations/FeatureDefines.xcconfig:
2310 2015-04-26 Javier Fernandez <jfernandez@igalia.com>
2312 [CSS Grid Layout] Support for align-self and align-items in grid layout
2313 https://bugs.webkit.org/show_bug.cgi?id=133225
2315 Reviewed by Darin Adler.
2317 Implementation of align-self and align-items properties for grid. It supports
2318 different writing-modes and direction. Margins, borders and paddings are also
2319 considered when computing the final position and stretched size.
2321 Overflow handling is still missing and will be added when implemented row-axis
2324 Test: fast/css-grid-layout/grid-align.html
2326 * rendering/RenderBox.cpp:
2327 (WebCore::RenderBox::computeLogicalHeight):
2328 * rendering/RenderGrid.cpp:
2329 (WebCore::RenderGrid::logicalContentHeightForChild):
2330 (WebCore::RenderGrid::layoutGridItems):
2331 (WebCore::computeOverflowAlignmentOffset):
2332 (WebCore::RenderGrid::endOfRowForChild):
2333 (WebCore::RenderGrid::startOfRowForChild):
2334 (WebCore::RenderGrid::centeredRowPositionForChild):
2335 (WebCore::marginWidthForChild):
2336 (WebCore::marginHeightForChild):
2337 (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
2338 (WebCore::RenderGrid::needToStretchChildLogicalHeight):
2339 (WebCore::RenderGrid::marginLogicalHeightForChild):
2340 (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
2341 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
2342 (WebCore::RenderGrid::rowPositionForChild):
2343 (WebCore::RenderGrid::findChildLogicalPosition):
2344 (WebCore::RenderGrid::populateGridPositions): Deleted.
2345 * rendering/RenderGrid.h:
2347 2015-04-26 Doug Russell <d_russell@apple.com>
2349 AX: richer text change notifications (142719)
2350 https://bugs.webkit.org/show_bug.cgi?id=142719
2352 Reviewed by Darin Adler.
2354 Richer accessibility value change notifications. Introduce AXTextEditType,
2355 postTextStateChangeNotification and postTextReplacementNotification to give assistive
2356 tech apps more reliable context for responding to changes in web content. Also implement
2357 a mechanism to post value changes in password form fields in coalesced ticks to thwart
2358 analyzing the cadence of changes.
2360 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
2361 and an overload of postTextReplacementNotification to give assistive tech apps more
2362 reliable context for responding to changes in web content selection. Also block posting
2363 selection changes on password fields.
2365 Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
2366 platform/mac/accessibility/selection-change-userinfo.html
2367 platform/mac/accessibility/value-change-userinfo.html
2370 * WebCore.vcxproj/WebCore.vcxproj:
2371 * WebCore.vcxproj/WebCore.vcxproj.filters:
2372 * WebCore.xcodeproj/project.pbxproj:
2373 * accessibility/AXObjectCache.cpp:
2374 (WebCore::AXObjectCache::AXObjectCache):
2375 (WebCore::AXObjectCache::notificationPostTimerFired):
2376 (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
2377 (WebCore::AXObjectCache::showIntent):
2378 (WebCore::AXObjectCache::setTextSelectionIntent):
2379 (WebCore::isPasswordFieldOrContainedByPasswordField):
2380 (WebCore::AXObjectCache::postTextStateChangeNotification):
2381 (WebCore::AXObjectCache::postTextReplacementNotification):
2382 (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
2383 (WebCore::AXObjectCache::rootWebArea):
2384 (WebCore::AXObjectCache::textChangeForEditType):
2385 (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
2386 (WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
2387 * accessibility/AXObjectCache.h:
2388 (WebCore::AXObjectCache::postTextStateChangeNotification):
2389 (WebCore::AXObjectCache::postTextReplacementNotification):
2390 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2391 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2392 (WebCore::AXObjectCache::textChangeForEditType):
2393 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2394 (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
2395 (WebCore::AXObjectCache::getOrCreate): Deleted.
2396 (WebCore::AXObjectCache::attachWrapper): Deleted.
2397 * accessibility/AXTextStateChangeIntent.h: Added.
2398 (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
2399 * accessibility/AccessibilityNodeObject.cpp:
2400 (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
2401 * accessibility/AccessibilityNodeObject.h:
2402 * accessibility/AccessibilityObject.cpp:
2403 (WebCore::AccessibilityObject::isContainedByPasswordField):
2404 * accessibility/AccessibilityObject.h:
2405 (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
2406 (WebCore::AccessibilityObject::isPasswordField): Deleted.
2407 * accessibility/AccessibilityRenderObject.cpp:
2408 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2409 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2410 * accessibility/AccessibilityScrollView.h:
2411 * accessibility/atk/AXObjectCacheAtk.cpp:
2412 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2413 * accessibility/ios/AXObjectCacheIOS.mm:
2414 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2415 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2416 * accessibility/mac/AXObjectCacheMac.mm:
2417 (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
2418 (WebCore::AXPostNotificationWithUserInfo):
2419 (WebCore::AXObjectCache::postPlatformNotification):
2420 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2421 (WebCore::textReplacementChangeDictionary):
2422 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2423 * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2424 * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2425 (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
2426 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
2427 (arrayRemovingNonJSONTypes):
2428 (dictionaryRemovingNonJSONTypes):
2429 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
2430 * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
2431 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2432 (textMarkerRangeFromVisiblePositions):
2433 (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
2434 * editing/AppendNodeCommand.cpp:
2435 (WebCore::AppendNodeCommand::AppendNodeCommand):
2436 (WebCore::sendAXTextChangedIgnoringLineBreaks):
2437 (WebCore::AppendNodeCommand::doApply):
2438 (WebCore::AppendNodeCommand::doUnapply):
2439 * editing/AppendNodeCommand.h:
2440 (WebCore::AppendNodeCommand::create):
2441 * editing/ApplyStyleCommand.cpp:
2442 (WebCore::ApplyStyleCommand::ApplyStyleCommand):
2443 (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
2444 * editing/ApplyStyleCommand.h:
2445 * editing/CompositeEditCommand.cpp:
2446 (WebCore::EditCommandComposition::unapplyEditType):
2447 (WebCore::CompositeEditCommand::CompositeEditCommand):
2448 (WebCore::CompositeEditCommand::apply):
2449 (WebCore::CompositeEditCommand::insertParagraphSeparator):
2450 (WebCore::CompositeEditCommand::insertNodeBefore):
2451 (WebCore::CompositeEditCommand::appendNode):
2452 (WebCore::CompositeEditCommand::removeNodePreservingChildren):
2453 (WebCore::CompositeEditCommand::insertTextIntoNode):
2454 (WebCore::CompositeEditCommand::deleteTextFromNode):
2455 (WebCore::CompositeEditCommand::replaceTextInNode):
2456 (WebCore::CompositeEditCommand::moveParagraphs):
2457 (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
2458 (WebCore::CompositeEditCommand::applyStyle): Deleted.
2459 (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
2460 (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
2461 (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
2462 (WebCore::CompositeEditCommand::inputText): Deleted.
2463 * editing/CompositeEditCommand.h:
2464 * editing/DeleteFromTextNodeCommand.cpp:
2465 (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
2466 (WebCore::DeleteFromTextNodeCommand::doApply):
2467 (WebCore::DeleteFromTextNodeCommand::doUnapply):
2468 * editing/DeleteFromTextNodeCommand.h:
2469 (WebCore::DeleteFromTextNodeCommand::create):
2470 (WebCore::DeleteFromTextNodeCommand::deletedText):
2471 * editing/DeleteSelectionCommand.cpp:
2472 (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
2473 (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
2474 * editing/DeleteSelectionCommand.h:
2475 (WebCore::DeleteSelectionCommand::create):
2476 * editing/DictationCommand.cpp:
2477 (WebCore::DictationCommand::insertTextRunWithoutNewlines):
2478 (WebCore::DictationCommand::insertParagraphSeparator):
2479 * editing/EditAction.h:
2480 * editing/EditCommand.cpp:
2481 (WebCore::EditCommand::EditCommand):
2482 (WebCore::EditCommand::editingAction):
2483 (WebCore::EditCommand::applyEditType):
2484 (WebCore::EditCommand::unapplyEditType):
2485 (WebCore::SimpleEditCommand::SimpleEditCommand):
2486 (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
2487 (WebCore::EditCommand::setParent): Deleted.
2488 * editing/EditCommand.h:
2489 * editing/EditingAllInOne.cpp:
2490 * editing/Editor.cpp:
2491 (WebCore::Editor::handleTextEvent):
2492 (WebCore::Editor::deleteSelectionWithSmartDelete):
2493 (WebCore::Editor::replaceSelectionWithFragment):
2494 (WebCore::Editor::replaceSelectionWithText):
2495 (WebCore::Editor::appliedEditing):
2496 (WebCore::Editor::unappliedEditing):
2497 (WebCore::Editor::performCutOrCopy):
2498 (WebCore::Editor::markMisspellingsAfterTypingToWord):
2499 (WebCore::Editor::changeBackToReplacedString):
2500 (WebCore::Editor::transpose):
2501 (WebCore::Editor::changeSelectionAfterCommand):
2503 * editing/EditorCommand.cpp:
2504 (WebCore::executeInsertFragment):
2505 * editing/FrameSelection.cpp:
2506 (WebCore::FrameSelection::moveTo):
2507 (WebCore::FrameSelection::moveWithoutValidationTo):
2508 (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
2509 (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
2510 (WebCore::FrameSelection::setSelection):
2511 (WebCore::FrameSelection::updateAndRevealSelection):
2512 (WebCore::isBoundary):
2513 (WebCore::FrameSelection::textSelectionIntent):
2514 (WebCore::FrameSelection::modify):
2515 (WebCore::FrameSelection::selectAll):
2516 (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
2517 (WebCore::FrameSelection::modifyMovingBackward): Deleted.
2518 (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
2519 (WebCore::FrameSelection::selectionAtWordStart): Deleted.
2520 * editing/FrameSelection.h:
2521 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2522 (WebCore::FrameSelection::selection): Deleted.
2523 * editing/InsertIntoTextNodeCommand.cpp:
2524 (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
2525 (WebCore::InsertIntoTextNodeCommand::doApply):
2526 (WebCore::InsertIntoTextNodeCommand::doUnapply):
2527 * editing/InsertIntoTextNodeCommand.h:
2528 (WebCore::InsertIntoTextNodeCommand::create):
2529 (WebCore::InsertIntoTextNodeCommand::insertedText):
2530 * editing/InsertNodeBeforeCommand.cpp:
2531 (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
2532 (WebCore::InsertNodeBeforeCommand::doApply):
2533 (WebCore::InsertNodeBeforeCommand::doUnapply):
2534 * editing/InsertNodeBeforeCommand.h:
2535 (WebCore::InsertNodeBeforeCommand::create):
2536 * editing/InsertParagraphSeparatorCommand.cpp:
2537 (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
2538 * editing/InsertParagraphSeparatorCommand.h:
2539 (WebCore::InsertParagraphSeparatorCommand::create):
2540 * editing/InsertTextCommand.cpp:
2541 (WebCore::InsertTextCommand::InsertTextCommand):
2542 * editing/InsertTextCommand.h:
2543 (WebCore::InsertTextCommand::create):
2544 (WebCore::InsertTextCommand::createWithMarkerSupplier):
2545 * editing/MoveSelectionCommand.cpp:
2546 (WebCore::MoveSelectionCommand::doApply):
2547 * editing/RemoveNodePreservingChildrenCommand.cpp:
2548 (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
2549 * editing/RemoveNodePreservingChildrenCommand.h:
2550 (WebCore::RemoveNodePreservingChildrenCommand::create):
2551 * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
2552 (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
2553 (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
2554 * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
2555 * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
2556 (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
2557 (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
2558 * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
2559 * editing/ReplaceSelectionCommand.cpp:
2560 (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
2561 (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
2562 (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
2563 * editing/ReplaceSelectionCommand.h:
2564 (WebCore::ReplaceSelectionCommand::create):
2565 * editing/TypingCommand.cpp:
2566 (WebCore::TypingCommand::insertTextRunWithoutNewlines):
2567 (WebCore::TypingCommand::insertParagraphSeparator):
2568 * editing/atk/FrameSelectionAtk.cpp:
2569 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2570 * editing/ios/DictationCommandIOS.cpp:
2571 (WebCore::DictationCommandIOS::DictationCommandIOS):
2572 * editing/ios/DictationCommandIOS.h:
2573 * editing/mac/FrameSelectionMac.mm:
2574 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2575 * html/HTMLTextFormControlElement.cpp:
2576 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2577 * page/DragController.cpp:
2578 (WebCore::DragController::concludeEditDrag):
2579 * page/EventHandler.cpp:
2580 (WebCore::setInitialKeyboardSelection):
2581 * page/FocusController.cpp:
2582 (WebCore::FocusController::advanceFocusInDocumentOrder):
2584 2015-04-26 Darin Adler <darin@apple.com>
2586 REGRESSION (r176751): line-height ignored in <button> elements
2587 https://bugs.webkit.org/show_bug.cgi?id=144234
2589 Reviewed by Antti Koivisto.
2591 Test: fast/forms/button-line-height.html
2593 The theme code was overriding line heights on all themed form controls.
2594 Instead it should have only overridden line height when the theme overrides the font.
2595 For <input type=button> on Mac, the theme always overrides the font, but for
2596 other elements like <button> it does not.
2598 * platform/Theme.h: Changed controlFont to return an Optional so we can tell
2599 when the theme is overriding the font. Otherwise if the font from the user-agent
2600 style sheet and the font from the theme are the same, we will think we are not
2601 overriding the font when we actually are.
2603 * platform/mac/ThemeMac.h: Updated controlFont to return Optional.
2604 * platform/mac/ThemeMac.mm:
2605 (WebCore::ThemeMac::controlFont): Ditto.
2607 * rendering/RenderTheme.cpp:
2608 (WebCore::RenderTheme::adjustStyle): Set line height only if the font is
2609 overriden by the theme, all the time for PushButtonPart on Mac, and not at all
2610 for other parts. Also tightened up the logic a little since RenderStyle's
2611 setFontDescription already does an "==" comparison; we don't have to do
2614 2015-04-26 Darin Adler <darin@apple.com>
2616 REGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
2617 https://bugs.webkit.org/show_bug.cgi?id=137163
2619 Reviewed by Andy Estes.
2621 Test: fast/notifications/request-notification-permission-while-reloading.html
2623 The test doesn't crash under WebKit2, but that's still OK for our purposes.
2625 * Modules/notifications/NotificationCenter.cpp:
2626 (WebCore::NotificationCenter::NotificationCenter): Initialize m_timer.
2627 (WebCore::NotificationCenter::createNotification): Moved here from the header.
2628 (WebCore::NotificationCenter::requestPermission): Start the timer and ref the notification
2629 center when we need to defer a callback. Also use a lambda for the callback and changed
2630 the argument to match what the bindings actually pass. Before we said PassRefPtr, but the
2631 bindings were not transferring ownership of the VoidCallback. The new type is a little
2632 strange but it's consistent with how the bindings work right now.
2633 (WebCore::NotificationCenter::timerFired): Added. Calls all the callbacks, then does a deref
2634 to match the ref we did above.
2635 (WebCore::NotificationCenter::requestTimedOut): Deleted.
2636 (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): Deleted.
2637 (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): Deleted.
2638 (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): Deleted.
2639 (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): Deleted.
2641 * Modules/notifications/NotificationCenter.h: Reorganized the header to be a bit more tidy.
2642 Changed the argument type for requestPermission to match the reality of what's passed by the
2643 bindings. Removed NotificationRequestCallback and replaced the m_callbacks HashSet with a
2644 vector of std::function.
2646 2015-04-26 Simon Fraser <simon.fraser@apple.com>
2648 Modernize animations code
2649 https://bugs.webkit.org/show_bug.cgi?id=144196
2651 Reviewed by Darin Adler.
2653 General cleanup in animation-related code.
2655 Use C++ references where possible. Use modern loops. Make classes fast-allocated.
2656 Use C++11 member initialization. Order member variables to optimize packing.
2658 This removes some null checks in CompositeAnimation, but the values in m_transitions
2659 and m_keyframeAnimations can never be null.
2663 * page/animation/AnimationBase.cpp:
2664 (WebCore::AnimationBase::AnimationBase):
2665 (WebCore::AnimationBase::animationsMatch):
2666 (WebCore::AnimationBase::updateStateMachine):
2667 (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2668 (WebCore::AnimationBase::beginAnimationUpdateTime):
2669 (WebCore::AnimationBase::getElapsedTime):
2670 * page/animation/AnimationBase.h:
2671 (WebCore::AnimationBase::animation):
2672 (WebCore::AnimationBase::setAnimation):
2673 * page/animation/AnimationController.cpp:
2674 (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
2675 (WebCore::AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
2676 * page/animation/CompositeAnimation.cpp:
2677 (WebCore::CompositeAnimation::CompositeAnimation):
2678 (WebCore::CompositeAnimation::clearRenderer):
2679 (WebCore::CompositeAnimation::updateTransitions):
2680 (WebCore::CompositeAnimation::updateKeyframeAnimations):
2681 (WebCore::CompositeAnimation::animate):
2682 (WebCore::CompositeAnimation::getAnimatedStyle):
2683 (WebCore::CompositeAnimation::timeToNextService):
2684 (WebCore::CompositeAnimation::getAnimationForProperty):
2685 (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2686 (WebCore::CompositeAnimation::suspendAnimations):
2687 (WebCore::CompositeAnimation::resumeAnimations):
2688 (WebCore::CompositeAnimation::overrideImplicitAnimations):
2689 (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
2690 (WebCore::CompositeAnimation::isAnimatingProperty):
2691 (WebCore::CompositeAnimation::pauseTransitionAtTime):
2692 (WebCore::CompositeAnimation::numberOfActiveAnimations):
2693 * page/animation/CompositeAnimation.h:
2694 (WebCore::CompositeAnimation::create):
2695 (WebCore::CompositeAnimation::animationController):
2696 * page/animation/ImplicitAnimation.cpp:
2697 (WebCore::ImplicitAnimation::ImplicitAnimation):
2698 (WebCore::ImplicitAnimation::sendTransitionEvent):
2699 * page/animation/ImplicitAnimation.h:
2700 (WebCore::ImplicitAnimation::create):
2701 * page/animation/KeyframeAnimation.cpp:
2702 (WebCore::KeyframeAnimation::KeyframeAnimation):
2703 (WebCore::KeyframeAnimation::animate):
2704 (WebCore::KeyframeAnimation::getAnimatedStyle):
2705 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2706 (WebCore::KeyframeAnimation::startAnimation):
2707 (WebCore::KeyframeAnimation::sendAnimationEvent):
2708 (WebCore::KeyframeAnimation::overrideAnimations):
2709 (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
2710 (WebCore::KeyframeAnimation::timeToNextService):
2711 * page/animation/KeyframeAnimation.h:
2712 * platform/animation/Animation.cpp:
2713 (WebCore::Animation::animationsMatch):
2714 * platform/animation/Animation.h:
2715 * rendering/RenderLayer.cpp:
2716 (WebCore::RenderLayer::paint):
2717 (WebCore::performOverlapTests):
2718 * rendering/style/KeyframeList.h:
2719 (WebCore::KeyframeList::properties):
2720 (WebCore::KeyframeList::keyframes):
2721 (WebCore::KeyframeList::beginProperties): Deleted.
2722 (WebCore::KeyframeList::endProperties): Deleted.
2723 (WebCore::KeyframeList::operator[]): Deleted.
2724 * rendering/style/RenderStyle.h:
2726 2015-04-25 Simon Fraser <simon.fraser@apple.com>
2728 Expand compositing coverage rect when scrolling and animating
2729 https://bugs.webkit.org/show_bug.cgi?id=144214
2730 rdar://problem/20695926
2732 Reviewed by Darin Adler.
2734 r183300 added a secondary rect that gets mapped through graphics layers during
2735 layer flushing, which represents a rect, in layer coordinates, that represents
2736 the portion of this layer that's visible in the viewport.
2738 This patch extends that rect based on scrolling and animating, with the extended
2739 coverage rect being mapped into descendants (where it's used to determine whether
2740 they should detach their backing store). This required moving the responsibility for
2741 extending the coverage rect from TileController (where it was used to compute
2742 tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept
2743 of coverage rect, and pushes it onto TileControllers.
2745 Test: compositing/tiling/transform-origin-tiled.html
2747 * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto
2748 TiledBacking from outside; new functions reflect that.
2749 * platform/graphics/ca/GraphicsLayerCA.cpp:
2750 (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass
2751 old visible rect to commitLayerChangesBeforeSublayers.
2752 (WebCore::accumulatesTransform):
2753 (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(),
2754 then adjustCoverageRect() which adjusts for scrolling and animations.
2755 (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the
2756 TransformState, but we can only use this if mapping it through various transforms didn't clamp
2757 it (which can happen with severe rotations in perspective).
2758 (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing,
2759 ask the TileController to do coverage adjustment (code which should move into here eventually).
2760 For other tiled layers, do motion-based adjustment. This should really be done for all layers
2761 (an animating non-tiled layer may contain a tiled layer).
2762 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed
2763 any more; layers only react to changed in coverage rect now.
2764 (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the
2765 coverage rect, here we push the new rect back into the TransformState so it will affect
2767 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2768 (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go
2770 (WebCore::GraphicsLayerCA::changeLayerTypeTo):
2771 (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted.
2772 (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted.
2773 (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted.
2774 * platform/graphics/ca/GraphicsLayerCA.h:
2775 * platform/graphics/ca/TileController.cpp:
2776 (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance
2778 (WebCore::TileController::setCoverageRect):
2779 (WebCore::TileController::tilesWouldChangeForCoverageRect):
2780 (WebCore::TileController::revalidateTiles):
2781 (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect()
2782 is called at the top of committing the owning layer, we haven't yet pushed a new size to the
2783 underlying platform layer (which TileController::bounds() consults).
2784 (WebCore::TileController::bounds):
2785 (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the
2786 underlying layer hasn't been updated yet.
2787 (WebCore::TileController::didRevalidateTiles):
2788 (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted.
2789 * platform/graphics/ca/TileController.h:
2790 * platform/graphics/ca/TileCoverageMap.cpp:
2791 (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows
2792 a dark blue outline for the coverage rect.
2793 (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top
2794 content inset is non-zero.
2795 * platform/graphics/ca/TileCoverageMap.h:
2796 * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now.
2797 (WebCore::TileGrid::tilesWouldChangeForCoverageRect):
2798 (WebCore::TileGrid::revalidateTiles):
2799 (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted.
2800 * platform/graphics/ca/TileGrid.h:
2801 * platform/graphics/transforms/TransformState.cpp:
2802 (WebCore::TransformState::operator=):
2803 (WebCore::TransformState::mappedQuad): Pass direction into mapQuad().
2804 (WebCore::TransformState::mappedSecondaryQuad): Ditto.
2805 (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller
2806 to pass in a secondary quad, and get it mapped into the coordinate space of the last
2807 "flattening" state (since the TransformState may have in-flight XY offset, or transform).
2808 This mapping is achieved by re-using mapQuad(), but in the inverse direction.
2809 (WebCore::TransformState::mapQuad): Make direction a parameter.
2810 (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary
2811 quad. Failure was detected by tests.
2812 * platform/graphics/transforms/TransformState.h:
2813 (WebCore::TransformState::isMappingSecondaryQuad):
2814 (WebCore::TransformState::direction):
2815 (WebCore::TransformState::inverseDirection):
2816 (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted.
2818 2015-04-25 Dan Bernstein <mitz@apple.com>
2820 Updated expected bindings generation test results after r183343.
2822 * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
2823 * bindings/scripts/test/ObjC/DOMTestCallback.h:
2824 * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
2825 * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
2826 * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
2827 * bindings/scripts/test/ObjC/DOMTestException.h:
2828 * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
2829 * bindings/scripts/test/ObjC/DOMTestInterface.h:
2830 * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
2831 * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
2832 * bindings/scripts/test/ObjC/DOMTestNode.h:
2833 * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
2834 * bindings/scripts/test/ObjC/DOMTestObj.h:
2835 * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
2836 * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
2837 * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
2838 * bindings/scripts/test/ObjC/DOMattribute.h:
2839 * bindings/scripts/test/ObjC/DOMreadonly.h:
2841 2015-04-25 Myles C. Maxfield <mmaxfield@apple.com>
2843 font-synthesis's initial value is "style weight"
2844 https://bugs.webkit.org/show_bug.cgi?id=144195
2846 Reviewed by Darin Adler.
2848 Updated fast/css3-text/font-synthesis-parse.html.
2850 * rendering/style/RenderStyle.h:
2852 2015-04-25 Commit Queue <commit-queue@webkit.org>
2854 Unreviewed, rolling out r183305.
2855 https://bugs.webkit.org/show_bug.cgi?id=144213
2857 Crashes on wikipedia (Requested by litherum on #webkit).
2861 "[Cocoa] FontPlatformData's equality check should always use
2863 https://bugs.webkit.org/show_bug.cgi?id=144168
2864 http://trac.webkit.org/changeset/183305
2866 2015-04-25 Dan Bernstein <mitz@apple.com>
2868 WebCore part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
2869 https://bugs.webkit.org/show_bug.cgi?id=144201
2871 Reviewed by Darin Adler.
2873 Instead of TBD, use the high version number to which it corresponds in CFAvailability.h,
2876 * bindings/objc/WebKitAvailability.h: Added a definition of __NSi_9876_5, so that we can
2877 use 9876_5 in availability macros. Removed the definition of
2878 __AVAILABILITY_INTERNAL__MAC_TBD, which will no longer be used.
2880 * bindings/scripts/CodeGeneratorObjC.pm:
2881 (ReadPublicInterfaces): Use 9876_5 instead of TBD.
2883 2015-04-25 Timothy Hatcher <timothy@apple.com>
2885 Update localized strings.
2887 * English.lproj/Localizable.strings: Updated.
2889 2015-04-25 Darin Adler <darin@apple.com>
2891 Crash if IDBTransaction is aborted right after it's created
2892 https://bugs.webkit.org/show_bug.cgi?id=144199
2894 Reviewed by Simon Fraser.
2896 Test: storage/indexeddb/transaction-abort.html
2898 * Modules/indexeddb/IDBTransactionBackend.cpp:
2899 (WebCore::IDBTransactionBackend::IDBTransactionBackend): Don't start the
2900 transaction if it is already complete (has been aborted).
2902 2015-04-25 Martin Robinson <mrobinson@igalia.com>
2904 Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
2905 https://bugs.webkit.org/show_bug.cgi?id=144182
2907 Reviewed by Simon Fraser.
2909 * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2910 * WebCore.vcxproj/WebCoreCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2911 * WebCore.vcxproj/WebCoreTestSupportCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2912 * css/CSSComputedStyleDeclaration.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2913 * css/MediaQueryEvaluator.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2914 * platform/graphics/GraphicsContext.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2915 * platform/graphics/cairo/GraphicsContextCairo.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2916 * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2917 * rendering/RenderLayer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2918 * rendering/RenderLayerCompositor.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2919 * rendering/RenderObject.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2921 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2923 [Cocoa] FontPlatformData's equality check should always use reference URLs
2924 https://bugs.webkit.org/show_bug.cgi?id=144168
2926 Reviewed by Tim Horton.
2928 <rdar://problem/18985642> is not fixed, so we need to continue using the older
2929 objectForEqualityCheck().
2931 No new tests because there is no behavior change.
2933 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2934 (WebCore::FontPlatformData::objectForEqualityCheck):
2936 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2938 Implement parsing support for font-synthesis CSS property
2939 https://bugs.webkit.org/show_bug.cgi?id=144180
2940 <rdar://problem/20692791>
2941 <rdar://problem/20625024>
2943 Reviewed by Tim Horton.
2945 See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop
2947 This property allows web authors to opt out of font synthesis. This patch only
2948 implements parsing support for the property.
2950 Test: fast/css3-text/font-synthesis-parse.html
2952 * css/CSSComputedStyleDeclaration.cpp:
2953 (WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
2954 (WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
2955 * css/CSSParser.cpp:
2956 (WebCore::CSSParser::parseValue): Call parseFontSynthesis().
2957 (WebCore::CSSParser::parseFontSynthesis): Accept the grammar
2958 "none | [ weight || style ]"
2959 * css/CSSParser.h: Function signature.
2960 * css/CSSPropertyNames.in: New CSS property name.
2961 * css/CSSValueKeywords.in: New CSS value names.
2962 * css/StyleBuilderCustom.h:
2963 (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
2964 representation of font-synthesis for a given CSSValue.
2965 * rendering/style/RenderStyle.h: Function signature.
2966 * rendering/style/RenderStyleConstants.h: Internal representation of
2968 * rendering/style/StyleRareInheritedData.h: Where we actually store the bits
2969 related to this internal representation.
2971 2015-04-24 Simon Fraser <simon.fraser@apple.com>
2973 Have the web inspector report accurate memory use for layers with detached backing store
2974 https://bugs.webkit.org/show_bug.cgi?id=144179
2976 Reviewed by Dean Jackson.
2978 Only report memory use for layers whose backing store is attached.
2980 * platform/graphics/ca/GraphicsLayerCA.cpp:
2981 * platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
2982 which platforms can override if they allow backing store detaching.
2984 2015-04-24 Simon Fraser <simon.fraser@apple.com>
2986 Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
2987 https://bugs.webkit.org/show_bug.cgi?id=144165
2989 Reviewed by Dean Jackson.
2991 Push in the clipRect as the secondary rect when doing a GraphicsLayerCA flush,
2992 which maps this rect through all the layers. Each layer tests intersection with
2993 this rect to determine if its backing store should be attached.
2995 This will cause us to drop backing store for layers that don't intersect the
2996 visible part of the view, which is too aggressive. A future patch will add
2999 Tests: compositing/visible-rect/coverage-clipped.html
3000 compositing/visible-rect/coverage-scrolling.html
3002 * platform/graphics/ca/GraphicsLayerCA.cpp:
3003 (WebCore::GraphicsLayerCA::GraphicsLayerCA): Remove initialization of things with
3004 C++11 initializers. Initialize the new m_intersectsCoverageRect bit.
3005 (WebCore::GraphicsLayerCA::flushCompositingState): Push the clipRect in as the
3006 secondary coverage rect. A future patch will inflate this on the way down the tree.
3007 (WebCore::GraphicsLayerCA::computeVisibleRect): If we're clipping, and
3008 we have a secondary coverage rect, that rect can be clipped to us too.
3009 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
3010 (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3011 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3012 (WebCore::GraphicsLayerCA::updateBackingStoreAttachment):
3013 (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
3014 * platform/graphics/ca/GraphicsLayerCA.h: New CoverageRectChanged bit.
3015 Use more C++11 initializers.
3016 (WebCore::GraphicsLayerCA::coverageRect):
3018 2015-04-24 Dean Jackson <dino@apple.com>
3020 AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
3021 https://bugs.webkit.org/show_bug.cgi?id=144173
3022 <rdar://problem/20526168>
3024 Reviewed by Simon Fraser.
3026 Keep a list of Animations that care about scroll updates, and only
3027 run the animation update if the list is not empty.
3029 Covered by existing tests.
3031 * page/animation/AnimationBase.cpp:
3032 (WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
3033 if this is an animation that depends on scrolling.
3034 * page/animation/AnimationController.cpp:
3035 (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
3036 new removeFromAnimationsDependentOnScroll as this animation is deleted.
3037 (WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
3038 (WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
3039 (WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
3040 there are animations that care.
3041 (WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
3043 * page/animation/AnimationController.h:
3044 * page/animation/AnimationControllerPrivate.h:
3045 (WebCore::AnimationControllerPrivate::wantsScrollUpdates):
3047 2015-04-24 Tim Horton <timothy_horton@apple.com>
3049 WKPDFView does not support password-protected PDFs
3050 https://bugs.webkit.org/show_bug.cgi?id=144162
3051 <rdar://problem/18411512>
3053 Reviewed by Andy Estes.
3055 * English.lproj/Localizable.strings:
3056 Add some localizable strings.
3058 2015-04-24 David Kilzer <ddkilzer@apple.com>
3060 Fix iOS EWS builds after updating to iOS 8.3 SDK
3062 * platform/spi/cocoa/CoreTextSPI.h:
3063 * rendering/RenderThemeIOS.mm:
3064 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
3065 - Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.
3067 2015-04-24 Jer Noble <jer.noble@apple.com>
3069 Unreviewed iOS build fix; add declarations to AVKitSPI.h
3071 * platform/spi/cocoa/AVKitSPI.h:
3073 2015-04-24 Enrica Casucci <enrica@apple.com>
3075 Make rangeExpandedAroundPositionByCharacters to all platforms.
3076 https://bugs.webkit.org/show_bug.cgi?id=144161
3078 Reviewed by Tim Horton.
3080 No change in functionality, simply making this available
3083 * editing/VisibleUnits.cpp:
3084 (WebCore::rangeExpandedAroundPositionByCharacters):
3085 * editing/VisibleUnits.h:
3086 * editing/mac/DataDetection.mm:
3087 * editing/mac/DictionaryLookup.h:
3088 * editing/mac/DictionaryLookup.mm:
3089 (WebCore::rangeExpandedAroundPositionByCharacters): Deleted.
3091 2015-04-24 Andreas Kling <akling@apple.com>
3093 Purge PassRefPtr from NamedNodeMap.
3094 <https://webkit.org/b/144091>
3096 Reviewed by Antti Koivisto.
3098 Use RefPtr instead of PassRefPtr in NamedNodeMap.
3100 * dom/NamedNodeMap.cpp:
3101 (WebCore::NamedNodeMap::getNamedItem):
3102 (WebCore::NamedNodeMap::getNamedItemNS):
3103 (WebCore::NamedNodeMap::removeNamedItem):
3104 (WebCore::NamedNodeMap::removeNamedItemNS):
3105 (WebCore::NamedNodeMap::setNamedItem):
3106 (WebCore::NamedNodeMap::setNamedItemNS):
3107 (WebCore::NamedNodeMap::item):
3108 * dom/NamedNodeMap.h:
3110 2015-04-24 Commit Queue <commit-queue@webkit.org>
3112 Unreviewed, rolling out r183266.
3113 https://bugs.webkit.org/show_bug.cgi?id=144164
3115 Broke 32-bit build and a test. (Requested by ap on #webkit).
3119 "AX: richer text change notifications (142719)"
3120 https://bugs.webkit.org/show_bug.cgi?id=142719
3121 http://trac.webkit.org/changeset/183266
3123 2015-04-24 Brady Eidson <beidson@apple.com>
3125 Origin header is preserved on cross-origin redirects.
3126 https://bugs.webkit.org/show_bug.cgi?id=144157.
3128 Reviewed by Sam Weinig.
3130 Tests: http/tests/security/cors-post-redirect-301.html
3131 http/tests/security/cors-post-redirect-302.html
3132 http/tests/security/cors-post-redirect-307.html
3133 http/tests/security/cors-post-redirect-308.html
3135 * platform/network/cf/ResourceHandleCFNet.cpp:
3136 (WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
3137 * platform/network/mac/ResourceHandleMac.mm:
3138 (WebCore::ResourceHandle::willSendRequest): Ditto.
3140 2015-04-24 Brent Fulgham <bfulgham@apple.com>
3142 Immediate action not functional for embedded PDFs
3143 https://bugs.webkit.org/show_bug.cgi?id=143952
3144 <rdar://problem/19842365>
3146 Reviewed by Tim Horton.
3148 Add a dictionary lookup method to allow us to retrieve
3149 relevant information for PDFs.
3151 * editing/mac/DictionaryLookup.mm:
3152 (WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
3153 where the Lookup engine selects a smaller range than the initial automatic
3154 selection performed on clicking.
3156 2015-04-24 Simon Fraser <simon.fraser@apple.com>
3158 Make it possible to map a secondary quad through TransformState
3159 https://bugs.webkit.org/show_bug.cgi?id=144156
3161 Reviewed by Dean Jackson.
3163 A future patch will need to map two quads simultaneously through TransformState,
3164 so add the ability to provide an optional secondary quad.
3166 This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
3167 requiring the state to be flattened when setting the quad (and now, the secondary quad).
3168 Previously, setQuad implicitly flattened but failed to update m_mapPoint when
3171 * platform/graphics/ca/GraphicsLayerCA.cpp:
3172 (WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
3173 before setting the quad.
3174 * platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
3175 * platform/graphics/transforms/TransformState.cpp:
3176 (WebCore::TransformState::operator=): Copy the secondary quad if we have one.
3177 (WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
3179 (WebCore::TransformState::mappedQuad): Code factored into mapQuad().
3180 (WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
3181 into the state's current coordinate space.
3182 (WebCore::TransformState::mapQuad): Factored code.
3183 * platform/graphics/transforms/TransformState.h:
3184 (WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
3185 (WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
3186 (WebCore::TransformState::lastPlanarSecondaryQuad):
3187 (WebCore::TransformState::lastPlanarQuad): Deleted.
3189 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3191 [iOS] Reimplement r182512 and r183153 in a cleaner way
3192 https://bugs.webkit.org/show_bug.cgi?id=144151
3194 Reviewed by Enrica Casucci.
3196 On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
3197 This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
3198 react to this fact by making users of a FontPlatformData use the original font passed in
3199 to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
3200 detect that the FontPlatformData represents a system font (the underlying APIs have
3201 different behavior for system fonts and non-system-fonts).
3203 However, on OS X, we create a FontPlatformData's ctFont() directly from the original
3204 font passed in to the constructor. This preserves system-font-ness (because it no
3205 longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
3206 correct behavior regarding system fonts.
3208 The difference between the two ctFont() creation codepaths seems to be historical
3209 rather than intentional. Rather than change all the call sites of ctFont() to use a
3210 different platform font object if a system font is detected, a cleaner solution is to
3211 simply unify the two ctFont() creation codepaths to the version which preserves system-
3212 font-ness. Doing this will make all users of FontPlatformData automatically have the
3213 correct behavior with no updates.
3215 This patch reverts the relevant parts of r182512 and r183153 in favor of this new
3218 No new tests because there is no behavior change.
3220 * platform/graphics/FontPlatformData.h:
3221 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
3222 * platform/graphics/cocoa/FontCocoa.mm:
3223 (WebCore::Font::platformWidthForGlyph):
3224 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3225 (WebCore::FontPlatformData::ctFontSize):
3226 (WebCore::FontPlatformData::ctFont):
3227 * platform/graphics/mac/SimpleFontDataCoreText.cpp:
3228 (WebCore::Font::getCFStringAttributes):
3230 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3232 Unreviewed build fix.
3234 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3235 (WebCore::FontPlatformData::FontPlatformData):
3237 2015-04-24 Myles C. Maxfield <mmaxfield@apple.com>
3239 [Cocoa] Start cleaning up FontPlatformData
3240 https://bugs.webkit.org/show_bug.cgi?id=144133
3242 Reviewed by Enrica Casucci.
3244 This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
3245 FontPlatformData. This patch starts this effort out by removing the FontPlatformData
3246 constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
3247 and forwards to another constructor. This patch moves this cast to callers of this constructor,
3248 thereby enumerating the places we have left that use NSFont with FontPlatformData.
3250 This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to
3251 a common constructor.
3253 This patch also collects places inside FontPlatformDataCocoa.mm where we check if a pointer is
3254 not 0 and not -1, and puts this common code inside a new function,
3255 FontPlatformData::isValidCTFontRef().
3257 No new tests because there is no behavior change.
3259 * platform/graphics/FontPlatformData.cpp:
3260 (WebCore::FontPlatformData::FontPlatformData): Coalesce constructors.
3261 * platform/graphics/FontPlatformData.h:
3262 (WebCore::FontPlatformData::isValidCTFontRef): Check if a pointer is not 0 and not -1.
3263 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
3264 * platform/graphics/cocoa/FontCocoa.mm:
3265 (WebCore::Font::platformCreateScaledFont): Receive cast which has been hoisted from the deleted
3266 FontPlatformData constructor.
3267 (WebCore::Font::compositeFontReferenceFont): Ditto.
3268 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3269 (WebCore::FontPlatformData::~FontPlatformData): Use isValidCTFontRef().
3270 (WebCore::FontPlatformData::platformDataInit): Ditto.
3271 (WebCore::FontPlatformData::platformDataAssign): Ditto.
3272 (WebCore::FontPlatformData::platformIsEqual): Simplify preprocessor macros.
3273 (WebCore::FontPlatformData::allowsLigatures): Remove unnecessary NSFont use.
3274 (WebCore::FontPlatformData::FontPlatformData): Deleted.
3275 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3276 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Remove unnecessary
3278 * platform/graphics/mac/FontCacheMac.mm:
3279 (WebCore::FontCache::systemFallbackForCharacters): Receive cast which has been hoisted from the
3280 deleted FontPlatformData constructor.
3281 (WebCore::FontCache::createFontPlatformData): Ditto.
3282 * platform/mac/DragImageMac.mm:
3283 (WebCore::fontFromNSFont): Ditto.
3284 (WebCore::widthWithFont): Ditto.
3285 (WebCore::drawAtPoint): Ditto.
3287 2015-04-24 Doug Russell <d_russell@apple.com>
3289 AX: richer text change notifications (142719)
3290 https://bugs.webkit.org/show_bug.cgi?id=142719
3292 Reviewed by Darin Adler.
3294 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.
3296 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.
3298 Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
3299 platform/mac/accessibility/selection-change-userinfo.html
3300 platform/mac/accessibility/value-change-userinfo.html
3303 * WebCore.vcxproj/WebCore.vcxproj:
3304 * WebCore.vcxproj/WebCore.vcxproj.filters:
3305 * WebCore.xcodeproj/project.pbxproj:
3306 * accessibility/AXObjectCache.cpp:
3307 (WebCore::AXObjectCache::AXObjectCache):
3308 (WebCore::AXObjectCache::notificationPostTimerFired):
3309 (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
3310 (WebCore::AXObjectCache::showIntent):
3311 (WebCore::AXObjectCache::setTextSelectionIntent):
3312 (WebCore::isPasswordFieldOrContainedByPasswordField):
3313 (WebCore::AXObjectCache::postTextStateChangeNotification):
3314 (WebCore::AXObjectCache::postTextReplacementNotification):
3315 (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
3316 (WebCore::AXObjectCache::rootWebArea):
3317 (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
3318 * accessibility/AXObjectCache.h:
3319 (WebCore::AXObjectCache::postTextStateChangeNotification):
3320 (WebCore::AXObjectCache::postTextReplacementNotification):
3321 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3322 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3323 (WebCore::AXObjectCache::textChangeForEditType):
3324 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3325 (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
3326 (WebCore::AXObjectCache::getOrCreate): Deleted.
3327 (WebCore::AXObjectCache::attachWrapper): Deleted.
3328 * accessibility/AXTextStateChangeIntent.h: Added.
3329 (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
3330 * accessibility/AccessibilityNodeObject.cpp:
3331 (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
3332 * accessibility/AccessibilityNodeObject.h:
3333 * accessibility/AccessibilityObject.cpp:
3334 (WebCore::AccessibilityObject::isContainedByPasswordField):
3335 * accessibility/AccessibilityObject.h:
3336 (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
3337 (WebCore::AccessibilityObject::isPasswordField): Deleted.
3338 * accessibility/AccessibilityRenderObject.cpp:
3339 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3340 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
3341 * accessibility/AccessibilityScrollView.h:
3342 * accessibility/atk/AXObjectCacheAtk.cpp:
3343 (WebCore::AXObjectCache::textChangeForEditType):
3344 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3345 (WebCore::AXObjectCache::postPlatformNotification): Deleted.
3346 * accessibility/ios/AXObjectCacheIOS.mm:
3347 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3348 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3349 * accessibility/mac/AXObjectCacheMac.mm:
3350 (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
3351 (WebCore::AXPostNotificationWithUserInfo):
3352 (WebCore::AXObjectCache::postPlatformNotification):
3353 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3354 (WebCore::textReplacementChangeDictionary):
3355 (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3356 * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
3357 * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
3358 (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
3359 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
3360 (arrayRemovingNonJSONTypes):
3361 (dictionaryRemovingNonJSONTypes):
3362 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
3363 * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
3364 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3365 (textMarkerRangeFromVisiblePositions):
3366 (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
3367 * editing/AppendNodeCommand.cpp:
3368 (WebCore::AppendNodeCommand::AppendNodeCommand):
3369 (WebCore::sendAXTextChangedIgnoringLineBreaks):
3370 (WebCore::AppendNodeCommand::doApply):
3371 (WebCore::AppendNodeCommand::doUnapply):
3372 * editing/AppendNodeCommand.h:
3373 (WebCore::AppendNodeCommand::create):
3374 * editing/ApplyStyleCommand.cpp:
3375 (WebCore::ApplyStyleCommand::ApplyStyleCommand):
3376 (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
3377 * editing/ApplyStyleCommand.h:
3378 * editing/CompositeEditCommand.cpp:
3379 (WebCore::EditCommandComposition::unapplyEditType):
3380 (WebCore::CompositeEditCommand::CompositeEditCommand):
3381 (WebCore::CompositeEditCommand::apply):
3382 (WebCore::CompositeEditCommand::insertParagraphSeparator):
3383 (WebCore::CompositeEditCommand::insertNodeBefore):
3384 (WebCore::CompositeEditCommand::appendNode):
3385 (WebCore::CompositeEditCommand::removeNodePreservingChildren):
3386 (WebCore::CompositeEditCommand::insertTextIntoNode):
3387 (WebCore::CompositeEditCommand::deleteTextFromNode):
3388 (WebCore::CompositeEditCommand::replaceTextInNode):
3389 (WebCore::CompositeEditCommand::moveParagraphs):
3390 (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
3391 (WebCore::CompositeEditCommand::applyStyle): Deleted.
3392 (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
3393 (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
3394 (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
3395 (WebCore::CompositeEditCommand::inputText): Deleted.
3396 * editing/CompositeEditCommand.h:
3397 * editing/DeleteFromTextNodeCommand.cpp:
3398 (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
3399 (WebCore::DeleteFromTextNodeCommand::doApply):
3400 (WebCore::DeleteFromTextNodeCommand::doUnapply):
3401 * editing/DeleteFromTextNodeCommand.h:
3402 (WebCore::DeleteFromTextNodeCommand::create):
3403 (WebCore::DeleteFromTextNodeCommand::deletedText):
3404 * editing/DeleteSelectionCommand.cpp:
3405 (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
3406 (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
3407 * editing/DeleteSelectionCommand.h:
3408 (WebCore::DeleteSelectionCommand::create):
3409 * editing/DictationCommand.cpp:
3410 (WebCore::DictationCommand::insertTextRunWithoutNewlines):
3411 (WebCore::DictationCommand::insertParagraphSeparator):
3412 * editing/EditAction.h:
3413 * editing/EditCommand.cpp:
3414 (WebCore::EditCommand::EditCommand):
3415 (WebCore::EditCommand::editingAction):
3416 (WebCore::EditCommand::applyEditType):
3417 (WebCore::EditCommand::unapplyEditType):
3418 (WebCore::SimpleEditCommand::SimpleEditCommand):
3419 (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
3420 (WebCore::EditCommand::setParent): Deleted.
3421 * editing/EditCommand.h:
3422 * editing/EditingAllInOne.cpp:
3423 * editing/Editor.cpp:
3424 (WebCore::Editor::handleTextEvent):
3425 (WebCore::Editor::deleteSelectionWithSmartDelete):
3426 (WebCore::Editor::replaceSelectionWithFragment):
3427 (WebCore::Editor::replaceSelectionWithText):
3428 (WebCore::Editor::appliedEditing):
3429 (WebCore::Editor::unappliedEditing):
3430 (WebCore::Editor::performCutOrCopy):
3431 (WebCore::Editor::markMisspellingsAfterTypingToWord):
3432 (WebCore::Editor::changeBackToReplacedString):
3433 (WebCore::Editor::transpose):
3434 (WebCore::Editor::changeSelectionAfterCommand):
3436 * editing/EditorCommand.cpp:
3437 (WebCore::executeInsertFragment):
3438 * editing/FrameSelection.cpp:
3439 (WebCore::FrameSelection::moveTo):
3440 (WebCore::FrameSelection::moveWithoutValidationTo):
3441 (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
3442 (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
3443 (WebCore::FrameSelection::setSelection):
3444 (WebCore::FrameSelection::updateAndRevealSelection):
3445 (WebCore::isBoundary):
3446 (WebCore::FrameSelection::textSelectionIntent):
3447 (WebCore::FrameSelection::modify):
3448 (WebCore::FrameSelection::selectAll):
3449 (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
3450 (WebCore::FrameSelection::modifyMovingBackward): Deleted.
3451 (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
3452 (WebCore::FrameSelection::selectionAtWordStart): Deleted.
3453 * editing/FrameSelection.h:
3454 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3455 (WebCore::FrameSelection::selection): Deleted.
3456 * editing/InsertIntoTextNodeCommand.cpp:
3457 (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
3458 (WebCore::InsertIntoTextNodeCommand::doApply):
3459 (WebCore::InsertIntoTextNodeCommand::doUnapply):
3460 * editing/InsertIntoTextNodeCommand.h:
3461 (WebCore::InsertIntoTextNodeCommand::create):
3462 (WebCore::InsertIntoTextNodeCommand::insertedText):
3463 * editing/InsertNodeBeforeCommand.cpp:
3464 (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
3465 (WebCore::InsertNodeBeforeCommand::doApply):
3466 (WebCore::InsertNodeBeforeCommand::doUnapply):
3467 * editing/InsertNodeBeforeCommand.h:
3468 (WebCore::InsertNodeBeforeCommand::create):
3469 * editing/InsertParagraphSeparatorCommand.cpp:
3470 (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
3471 * editing/InsertParagraphSeparatorCommand.h:
3472 (WebCore::InsertParagraphSeparatorCommand::create):
3473 * editing/InsertTextCommand.cpp:
3474 (WebCore::InsertTextCommand::InsertTextCommand):
3475 * editing/InsertTextCommand.h:
3476 (WebCore::InsertTextCommand::create):
3477 (WebCore::InsertTextCommand::createWithMarkerSupplier):
3478 * editing/MoveSelectionCommand.cpp:
3479 (WebCore::MoveSelectionCommand::doApply):
3480 * editing/RemoveNodePreservingChildrenCommand.cpp:
3481 (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
3482 * editing/RemoveNodePreservingChildrenCommand.h:
3483 (WebCore::RemoveNodePreservingChildrenCommand::create):
3484 * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3485 (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
3486 (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
3487 * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3488 * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
3489 (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
3490 (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
3491 * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
3492 * editing/ReplaceSelectionCommand.cpp:
3493 (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
3494 (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
3495 (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
3496 * editing/ReplaceSelectionCommand.h:
3497 (WebCore::ReplaceSelectionCommand::create):
3498 * editing/TypingCommand.cpp:
3499 (WebCore::TypingCommand::insertTextRunWithoutNewlines):
3500 (WebCore::TypingCommand::insertParagraphSeparator):
3501 * editing/atk/FrameSelectionAtk.cpp:
3502 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3503 * editing/ios/DictationCommandIOS.cpp:
3504 (WebCore::DictationCommandIOS::DictationCommandIOS):
3505 * editing/ios/DictationCommandIOS.h:
3506 * editing/mac/FrameSelectionMac.mm:
3507 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3508 * html/HTMLTextFormControlElement.cpp:
3509 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
3510 * page/DragController.cpp:
3511 (WebCore::DragController::concludeEditDrag):
3512 * page/EventHandler.cpp:
3513 (WebCore::setInitialKeyboardSelection):
3514 * page/FocusController.cpp:
3515 (WebCore::FocusController::advanceFocusInDocumentOrder):
3517 2015-04-24 Darin Adler <darin@apple.com>
3519 Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
3520 https://bugs.webkit.org/show_bug.cgi?id=128007
3522 Reviewed by Anders Carlsson.
3524 * PlatformEfl.cmake: Removed OwnPtrCairo source files.
3525 * PlatformGTK.cmake: Ditto.
3526 * PlatformWinCairo.cmake: Ditto.
3527 * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3528 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3530 * platform/CrossThreadCopier.cpp: Removed OwnPtr specialization.
3531 * platform/CrossThreadCopier.h: Ditto.
3533 * platform/ScrollAnimatorNone.cpp: Removed unneeded include.
3534 * platform/ThreadGlobalData.cpp: Ditto.
3535 * platform/ThreadGlobalData.h: Ditto.
3536 * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Ditto.
3538 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3539 (WebCore::AVFWrapper::processNotification): Use unique_ptr.
3540 (WebCore::AVFWrapper::notificationCallback): Use make_unique.
3541 (WebCore::AVFWrapper::platformLayer): Ditto.
3543 * platform/graphics/cairo/CairoUtilities.cpp:
3544 (WebCore::appendPathToCairoContext): Use cairo_path_destroy directly
3545 instead of a smart pointer; the code path is simple enough that it is
3548 * platform/graphics/cairo/ImageBufferCairo.cpp:
3549 (WebCore::ImageBuffer::ImageBuffer): Use make_unique.
3550 * platform/graphics/cairo/ImageBufferDataCairo.h: Use unique_ptr.
3552 * platform/graphics/cairo/OwnPtrCairo.cpp: Removed.
3553 * platform/graphics/cairo/OwnPtrCairo.h: Removed.
3555 * platform/graphics/cairo/PathCairo.cpp:
3556 (WebCore::Path::Path): Use cairo_path_destroy directly instead of a
3557 smart pointer; the code path is simple enough that it is clear this way.
3558 (WebCore::Path::operator=): Ditto.
3559 (WebCore::Path::addPath): Ditto.
3560 (WebCore::Path::apply): Ditto.
3561 * platform/graphics/cairo/PlatformContextCairo.cpp:
3562 (WebCore::PlatformContextCairo::clipForPatternFilling): Ditto.
3564 * platform/graphics/freetype/FontCacheFreeType.cpp: Removed unneeded include.
3565 * platform/graphics/glx/GLContextGLX.cpp: Ditto.
3567 * platform/graphics/surfaces/egl/EGLSurface.cpp:
3568 (WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Use make_unique.
3570 * platform/graphics/surfaces/glx/GLXConfigSelector.h:
3571 (WebCore::GLXConfigSelector::findMatchingConfig): Use unique_ptr with X11Deleter.
3572 (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
3573 * platform/graphics/surfaces/glx/GLXSurface.cpp:
3574 (WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
3575 (WebCore::GLXOffScreenSurface::initialize): Ditto.
3577 * platform/graphics/surfaces/glx/OwnPtrX11.h: Removed.
3579 * platform/graphics/surfaces/glx/X11Helper.cpp:
3580 (WebCore::X11Helper::createOffScreenWindow): Use unique_ptr with X11Deleter.
3581 (WebCore::X11Helper::createPixmap): Ditto.
3583 * platform/graphics/surfaces/glx/X11Helper.h: Added X11Deleter,
3584 which can be used with unique_ptr to make it call XFree instead of delete.
3586 * platform/graphics/win/FullScreenController.cpp: Use unique_ptr.
3587 (FullScreenController::FullScreenController): Use make_unique.
3588 (FullScreenController::enterFullScreen): Ditto.
3589 * platform/graphics/win/FullScreenController.h: Use unique_ptr.
3591 * platform/graphics/win/GraphicsContext3DWin.cpp: Removed unneeded includes.
3593 * platform/graphics/win/WKCAImageQueue.cpp:
3594 (WebCore::WKCAImageQueue::WKCAImageQueue): Use make_unique.
3595 * platform/graphics/win/WKCAImageQueue.h: Use unique_ptr.
3597 * platform/network/NetworkStorageSessionStub.cpp: Removed unneeded include.
3599 * platform/network/ResourceHandleInternal.h: Use unique_ptr.
3601 * platform/network/curl/MultipartHandle.cpp:
3602 (WebCore::MultipartHandle::create): Deleted.
3603 * platform/network/curl/MultipartHandle.h: Deleted the create function.
3605 * platform/network/curl/ResourceHandleManager.cpp:
3606 (WebCore::headerCallback): Use make_unique.
3608 2015-04-24 Per Arne Vollan <peavo@outlook.com>
3610 [Win] Popup menu is not accessible.
3611 https://bugs.webkit.org/show_bug.cgi?id=141704
3613 Reviewed by Brent Fulgham.
3615 Get accessibility information for items in popup menus.
3617 * platform/win/PopupMenuWin.cpp:
3618 (WebCore::PopupMenuWin::onGetObject):
3619 (WebCore::PopupMenuWin::wndProc):
3620 (WebCore::AccessiblePopupMenu::AccessiblePopupMenu):
3621 (WebCore::AccessiblePopupMenu::~AccessiblePopupMenu):
3622 (WebCore::AccessiblePopupMenu::QueryInterface):
3623 (WebCore::AccessiblePopupMenu::AddRef):
3624 (WebCore::AccessiblePopupMenu::Release):
3625 (WebCore::AccessiblePopupMenu::GetTypeInfoCount):
3626 (WebCore::AccessiblePopupMenu::GetTypeInfo):
3627 (WebCore::AccessiblePopupMenu::GetIDsOfNames):
3628 (WebCore::AccessiblePopupMenu::Invoke):
3629 (WebCore::AccessiblePopupMenu::get_accParent):
3630 (WebCore::AccessiblePopupMenu::get_accChildCount):
3631 (WebCore::AccessiblePopupMenu::get_accChild):
3632 (WebCore::AccessiblePopupMenu::get_accName):
3633 (WebCore::AccessiblePopupMenu::get_accValue):
3634 (WebCore::AccessiblePopupMenu::get_accDescription):
3635 (WebCore::AccessiblePopupMenu::get_accRole):
3636 (WebCore::AccessiblePopupMenu::get_accState):
3637 (WebCore::AccessiblePopupMenu::get_accHelp):
3638 (WebCore::AccessiblePopupMenu::get_accKeyboardShortcut):
3639 (WebCore::AccessiblePopupMenu::get_accFocus):
3640 (WebCore::AccessiblePopupMenu::get_accSelection):
3641 (WebCore::AccessiblePopupMenu::get_accDefaultAction):
3642 (WebCore::AccessiblePopupMenu::accSelect):
3643 (WebCore::AccessiblePopupMenu::accLocation):
3644 (WebCore::AccessiblePopupMenu::accNavigate):
3645 (WebCore::AccessiblePopupMenu::accHitTest):
3646 (WebCore::AccessiblePopupMenu::accDoDefaultAction):
3647 (WebCore::AccessiblePopupMenu::put_accName):
3648 (WebCore::AccessiblePopupMenu::put_accValue):
3649 (WebCore::AccessiblePopupMenu::get_accHelpTopic):
3650 * platform/win/PopupMenuWin.h:
3651 * platform/win/ScrollbarThemeWin.h:
3652 (WebCore::ScrollbarThemeWin::hasButtons): Deleted.
3654 2015-04-23 Antti Koivisto <antti@apple.com>
3656 Memory cache live resources repeatedly purged during painting
3657 https://bugs.webkit.org/show_bug.cgi?id=144104
3658 <rdar://problem/20667695>
3660 Reviewed by Chris Dumez.
3662 On some PLT pages (like nytimes.com) we get into state where painting repeatedly purges live bitmaps.
3663 This slows down page loads significantly.
3665 This might have regressed because improvements in page caching keep more pages and so resources 'live'.
3667 With this path we do all regular cache pruning asynchronously. If memory is really critical
3668 the low memory handling code will still prune synchronously.
3670 * loader/cache/CachedResource.cpp:
3671 (WebCore::CachedResource::removeClient):
3672 (WebCore::CachedResource::didAccessDecodedData):
3674 prune() -> pruneSoon()
3676 * loader/cache/MemoryCache.cpp:
3678 Decrease the pruning size target from 0.95 to 0.8 so we don't need to prune so often.
3680 (WebCore::MemoryCache::needsPruning):
3682 Factor into a function.
3684 (WebCore::MemoryCache::prune):
3685 (WebCore::MemoryCache::pruneSoon):
3687 Prune asynchronously.
3689 * loader/cache/MemoryCache.h:
3691 2015-04-24 Antti Koivisto <antti@apple.com>
3693 Unreviewed, rolling out r183259.
3699 "Memory cache live resources repeatedly purged during
3701 https://bugs.webkit.org/show_bug.cgi?id=144104
3702 http://trac.webkit.org/changeset/183259
3704 2015-04-24 Antti Koivisto <antti@apple.com>
3706 CrashTracer: WebProcess at com.apple.WebCore: WebCore::toScriptElementIfPossible + 4
3707 https://bugs.webkit.org/show_bug.cgi?id=144050
3709 Reviewed by Chris Dumez.
3711 We are seeing null Element pointer crashes with this stack:
3713 47 com.apple.WebCore: WebCore::toScriptElementIfPossible + 4 <==
3714 47 com.apple.WebCore: WebCore::ScriptRunner::timerFired + 452
3715 47 com.apple.WebCore: WebCore::ThreadTimers::sharedTimerFiredInternal + 175
3717 The most likely cause seems to be that this code
3719 ASSERT(m_pendingAsyncScripts.contains(scriptElement));
3720 m_scriptsToExecuteSoon.append(m_pendingAsyncScripts.take(scriptElement));
3722 in ScriptRunner::notifyScriptReady fails to find scriptElement and we are left with null entry in
3723 m_scriptsToExecuteSoon. However I haven't managed to repro this or find the exact path how this
3724 could happen. The related code is fragile with lot of state (especially in ScriptElement class)
3725 and involves many opportunities for re-entry via scripts.
3727 No repro, no test case.
3729 * dom/ScriptRunner.cpp:
3730 (WebCore::ScriptRunner::timerFired):
3732 Paper this over by adding a null check. We could check m_pendingAsyncScripts.take() above
3733 but this also covers possibility this is caused by something else.
3735 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
3737 [SOUP] Use a webkit subdirectory for the disk cache
3738 https://bugs.webkit.org/show_bug.cgi?id=144048
3740 Reviewed by Martin Robinson.
3742 Add a static method to SoupNetworkSession to clear a soup cache
3743 given its directory.
3745 * platform/network/soup/SoupNetworkSession.cpp:
3746 (WebCore::strIsNumeric):
3747 (WebCore::SoupNetworkSession::clearCache):
3748 * platform/network/soup/SoupNetworkSession.h:
3750 2015-04-23 Andy Estes <aestes@apple.com>
3752 Fix the iOS build after r183234.
3754 * platform/ios/LegacyTileCache.mm:
3755 (WebCore::LegacyTileCache::commitScaleChange):
3757 2015-04-23 Simon Fraser <simon.fraser@apple.com>
3761 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3762 (PlatformCALayerWin::setBackingStoreAttached):
3763 (PlatformCALayerWin::backingStoreAttached):
3764 * platform/graphics/ca/win/PlatformCALayerWin.h:
3766 2015-04-23 Simon Fraser <simon.fraser@apple.com>
3768 Make it possible to detach GraphicsLayerCA backing store
3769 https://bugs.webkit.org/show_bug.cgi?id=144140
3771 Reviewed by Tim Horton.
3773 This changes makes it possible to denote a GraphicsLayerCA's backing store
3774 as "attached" or not. When not attached, the backing store is made volatile
3775 and can be purged. This will be used in a future patch.
3777 * platform/graphics/ca/GraphicsLayerCA.h: Add updateBackingStoreAttachment().
3778 * platform/graphics/ca/PlatformCALayer.h:
3779 * platform/graphics/ca/mac/PlatformCALayerMac.h:
3780 * platform/graphics/ca/mac/PlatformCALayerMac.mm: Stubs. In future, we could
3781 remove backing store on Mac and iOS WK1 too.
3782 (PlatformCALayerMac::setBackingStoreAttached):
3783 (PlatformCALayerMac::backingStoreAttached):
3785 2015-04-23 Simon Fraser <simon.fraser@apple.com>
3787 Remove "layer" from GraphicsLayerCA member function names
3788 https://bugs.webkit.org/show_bug.cgi?id=144139
3790 Reviewed by Myles Maxfield.
3792 Rename "updateLayer*" to "update*" in GraphicsLayerCA.
3794 * platform/graphics/ca/GraphicsLayerCA.cpp:
3795 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3796 (WebCore::GraphicsLayerCA::updateNames):
3797 (WebCore::GraphicsLayerCA::updateDrawsContent):
3798 (WebCore::GraphicsLayerCA::updateLayerNames): Deleted.
3799 (WebCore::GraphicsLayerCA::updateLayerDrawsContent): Deleted.
3800 * platform/graphics/ca/GraphicsLayerCA.h:
3802 2015-04-23 Dan Bernstein <mitz@apple.com>
3804 <rdar://problem/20663758> Fix the build after AVPlayerViewController API change
3806 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3807 (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Don’t pass a nil completion
3808 handler to -[AVPlayerViewController exitFullScreenAnimated:completionHandler:].
3810 2015-04-23 Darin Adler <darin@apple.com>
3812 Another round of removing use of OwnPtr, PassOwnPtr, and deleteOwnedPtr
3813 https://bugs.webkit.org/show_bug.cgi?id=144090
3815 Reviewed by Anders Carlsson.
3817 * Modules/encryptedmedia/CDMPrivateMediaPlayer.h: Removed unneeded include.
3819 * Modules/navigatorcontentutils/NavigatorContentUtils.h: Removed include of
3820 RefCountedSupplement.h.
3822 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3823 (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3824 Pass data using rvalue references, and use new/delete to pass it across
3825 threads, rather than using PassOwnPtr.
3826 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: Pass data
3827 in an rvalue reference instead of PassOwnPtr.
3828 * Modules/websockets/WebSocket.cpp:
3829 (WebCore::WebSocket::didReceiveBinaryData): Take an rvalue reference
3830 instead of a PassOwnPtr.
3831 * Modules/websockets/WebSocket.h: Ditto.
3832 * Modules/websockets/WebSocketChannel.cpp: Ditto.
3833 (WebCore::WebSocketChannel::processFrame): Ditto.
3834 * Modules/websockets/WebSocketChannelClient.h:
3835 (WebCore::WebSocketChannelClient::didReceiveBinaryData): Ditto.
3836 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3837 (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
3839 * Modules/websockets/WorkerThreadableWebSocketChannel.h: Ditto.
3841 * WebCore.xcodeproj/project.pbxproj: Removed RefCountedSupplement.h.
3843 * loader/cocoa/DiskCacheMonitorCocoa.mm:
3844 (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): Fixed comment
3845 to not mention adoptPtr.
3847 * page/make_settings.pl:
3848 (generateInternalSettingsHeaderFile): Removed include of RefCountedSupplement.h.
3850 * platform/ColorChooserClient.h: Removed unneded include.
3851 * platform/ContextMenuItem.h: Ditto.
3853 * platform/RefCountedSupplement.h: Removed.
3855 * platform/ScrollAnimator.cpp: Removed unneeded include.
3856 * platform/ScrollAnimatorNone.h: Ditto.
3858 * platform/ThreadGlobalData.cpp: Added now-needed include of PassOwnPtr.h.
3860 * platform/graphics/GlyphMetricsMap.h: Ditto.
3861 * platform/graphics/MediaPlayer.h: Ditto.
3862 * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: Ditto.
3863 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Ditto.
3864 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Ditto.
3865 * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Ditto.
3866 * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: Ditto.
3867 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: Ditto.
3868 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Ditto.
3870 * platform/graphics/cg/ImageBufferCG.cpp:
3871 (WebCore::ImageBuffer::ImageBuffer): Use make_unique instead of adoptPtr.
3872 * platform/graphics/cg/ImageBufferDataCG.cpp:
3873 (WebCore::ImageBufferData::getData): Return a RefPtr instead of a PassRefPtr.
3874 * platform/graphics/cg/ImageBufferDataCG.h: Streamlined the header a bit,
3875 use unique_ptr instead of OwnPtr and RefPtr instead of PassRefPtr.
3877 * platform/graphics/cocoa/IOSurface.h: Use unique_ptr instead of OwnPtr.
3878 * platform/graphics/cocoa/IOSurface.mm:
3879 (IOSurface::ensureGraphicsContext): Use make_unique instead of adoptPtr.
3881 * platform/graphics/egl/GLContextEGL.cpp: Removed unneeded includes.
3882 * platform/graphics/filters/FilterOperation.h: Ditto.
3883 * platform/graphics/harfbuzz/HarfBuzzShaper.h: Ditto.
3884 * platform/ios/DeviceMotionClientIOS.h: Ditto.
3885 * platform/ios/DeviceOrientationClientIOS.h: Ditto.
3887 * platform/ios/LegacyTileCache.h: Use unique_ptr instead of OwnPtr.
3888 * platform/ios/LegacyTileCache.mm:
3889 (WebCore::LegacyTileCache::LegacyTileCache): Use make_unique instead of
3890 a create function, and also get rid of unneeded initialization to null.
3891 (WebCore::LegacyTileCache::commitScaleChange): Ditto.
3893 * platform/ios/LegacyTileGrid.h: Made constructor public and got rid of create
3894 function. Made constructor take a reference to the tile cache, and make both
3895 tileCache() and m_tileCache be references too.
3897 * platform/ios/LegacyTileGrid.mm:
3898 (WebCore::LegacyTileGrid::LegacyTileGrid): Updated to use reference.
3899 (WebCore::LegacyTileGrid::visibleRect): Ditto.
3900 (WebCore::LegacyTileGrid::tileByteSize) Ditto.:
3901 (WebCore::LegacyTileGrid::dropDistantTiles): Ditto.
3902 (WebCore::LegacyTileGrid::updateTileOpacity): Ditto.
3903 (WebCore::LegacyTileGrid::updateTileBorderVisibility): Ditto.
3904 (WebCore::LegacyTileGrid::updateHostLayerSize): Ditto.
3905 (WebCore::LegacyTileGrid::invalidateTiles): Ditto.
3906 (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage): Ditto.
3907 (WebCore::LegacyTileGrid::tileDistance2): Ditto.
3908 (WebCore::LegacyTileGrid::createTiles): Ditto.
3909 * platform/ios/LegacyTileGridTile.mm:
3910 (WebCore::LegacyTileGridTile::LegacyTileGridTile): Ditto.
3911 (WebCore::LegacyTileGridTile::invalidateRect): Ditto.
3912 (WebCore::LegacyTileGridTile::showBorder): Ditto.
3913 * platform/ios/LegacyTileLayer.mm:
3914 (-[LegacyTileHostLayer renderInContext:]): Ditto.
3915 (-[LegacyTileLayer layoutSublayers]): Ditto.
3916 (-[LegacyTileLayer drawInContext:]): Ditto.
3918 * platform/ios/LegacyTileLayerPool.h: Removed unneeded include.
3919 * platform/ios/ScrollAnimatorIOS.mm: Ditto.
3920 * platform/mac/ScrollAnimatorMac.mm: Ditto.
3921 * platform/mac/WebVideoFullscreenController.h: Ditto.
3922 * platform/network/BlobData.cpp: Ditto.
3924 * platform/network/ResourceHandle.cpp:
3925 (WebCore::ResourceHandle::ResourceHandle): Use make_unique instead of adoptPtr.
3926 * platform/network/ResourceHandle.h: Use unique_ptr instead of OwnPtr.
3928 * platform/network/ResourceHandleInternal.h: Added now-needed include.
3930 * platform/network/ResourceResponseBase.h: Removed unneeded includes and
3931 tweaked formatting a bit.
3933 * platform/network/SynchronousLoaderClient.h: Removed the create function and
3934 the private constructor. Used data member initialize to make the default
3935 empty constructor automatically get generated (and be public now).
3937 * platform/network/cf/FormDataStreamCFNet.cpp:
3938 (WebCore::formFinishFinalizationOnMainThread): Use delete instead of adoptPtr
3939 to delete the context argument.
3941 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3942 (WebCore::defaultNetworkStorageSession): Return a unique_ptr& instead of an OwnPtr&.
3943 (WebCore::NetworkStorageSession::switchToNewTestingSession): Use make_unique
3944 instead of adoptPtr.
3945 (WebCore::NetworkStorageSession::defaultStorageSession): Ditto.