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