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