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