750f9965b26a4f0c5a073ce1a7fbef5c64155746
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-23 Yoav Weiss  <yoav@yoav.ws>
2
3         Update empty image canvas tests and fix a related bug
4         https://bugs.webkit.org/show_bug.cgi?id=142694
5
6         Reviewed by Chris Dumez.
7
8         During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
9         we encountered an issue with canvas tests related to empty image handling
10         when drawn or used as a pattern. After updating these tests, an issue with
11         pattern handling was encountered.
12
13         The spec, as well as Chrome's implementation, say that when an empty image
14         is used as a pattern, createPattern should return null. See
15         https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
16         Instead, createPattern returned an exception in this case.
17         This patch fixes that and makes sure that it returns a null when image loading hasn't started.
18
19         Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
20                canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
21                canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
22                canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
23                canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html
24
25         * html/canvas/CanvasRenderingContext2D.cpp:
26         (WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.
27
28 2015-03-23  Alex Christensen  <achristensen@webkit.org>
29
30         Fix api tests after r181876.
31
32         * contentextensions/ContentExtensionsBackend.cpp:
33         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
34         Always append a CSSDisplayNoneStyleSheet action if no ignore-previous-rules is seen.
35         * loader/cache/CachedResourceLoader.cpp:
36         (WebCore::CachedResourceLoader::requestResource):
37         Changed an assertion to a null check.
38
39 2015-03-23  Dean Jackson  <dino@apple.com>
40
41         Timelines are sharing the same canvas background
42         https://bugs.webkit.org/show_bug.cgi?id=142994
43         <rdar://problem/20209466>
44
45         Reviewed by Brent Fulgham.
46
47         Since each MediaControl lives in an isolated world, we
48         can't rely on a global variable to provide a unique
49         identifier for a named canvas. The fix is to expose
50         WebCore's UUID generator, and have each canvas use
51         that for a name.
52
53         * Modules/mediacontrols/MediaControlsHost.cpp:
54         (WebCore::MediaControlsHost::generateUUID): New method on the
55         MediaControlsHost that generates a UUID.
56         * Modules/mediacontrols/MediaControlsHost.h:
57         * Modules/mediacontrols/MediaControlsHost.idl:
58
59         * Modules/mediacontrols/mediaControlsApple.js: Remove the global
60         variable unique ID that wasn't working, and instead get
61         an ID from the MediaControlsHost.
62         (Controller.prototype.createControls):
63         * Modules/mediacontrols/mediaControlsiOS.js:
64         (ControllerIOS):
65
66 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
67
68         Scroll latching logic can get stuck in 'scrollable="no"' iframes
69         https://bugs.webkit.org/show_bug.cgi?id=142789
70         <rdar://problem/20129494>
71
72         Reviewed by Dean Jackson.
73
74         Clean up the EventHandler and latching code as follows:
75         (1) Do not handle iframe elements as part of the normal latching logic. Instead, iframes should
76             be evaluated during the 'platformCompleteWheelEvent' phase of processing as top-level scrolling
77             frames.
78         (2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames
79             different.
80         (3) Modify code to reflect that the scroll latching code really deals with overflow scrolling. Consequently,
81             the 'findEnclosingScrollableContainer' was renamed to 'findEnclosingOverflowScroll' and does not
82             treat iframe as a suitable target.
83         (4) Do not create a latching state object when the container being evaluated is already scrolled to the
84             extreme position in the direction of the mouse gesture. In this case, we want the enclosing frame
85             to be the latching target.
86         (5) Do not treat the state where the mouse wheel gesture has ended manual scrolling, but has not ended
87             momentum scrolling, as an appropriate time to select a latching target.
88
89         * page/EventHandler.cpp:
90         (WebCore::EventHandler::platformCompleteWheelEvent): Modify signature to remove unneeded argument.
91         (WebCore::EventHandler::handleWheelEvent): Modify call to 'platformCompleteWheelEvent' to remove unused argument.
92         * page/EventHandler.h:
93         * page/mac/EventHandlerMac.mm:
94         (WebCore::findEnclosingOverflowScroll): Renamed from 'findEnclosingScrollableContainer' and revised per the
95         notes above.
96         (WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
97         consolidate logic.
98         (WebCore::EventHandler::platformCompleteWheelEvent): Remove unused argument. The wheel event target is no
99         longer needed here, now that iframes are not processed by this code.
100         (WebCore::findEnclosingScrollableContainer): Deleted.
101         * page/scrolling/ScrollLatchingState.cpp:
102         (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement:) Switch to move operator for passing
103         a temporary RefPtr to the the function.
104         * page/scrolling/ScrollLatchingState.h:
105         * platform/PlatformWheelEvent.h:
106         (WebCore::PlatformWheelEvent::useLatchedEventElement): Recognize 'phase=ended, momentum=none' as a state
107         that should not cause latching state to be revised.
108
109 2015-03-23  Anders Carlsson  <andersca@apple.com>
110
111         Try to fix the iOS build.
112
113         * platform/network/mac/CookieJarMac.mm:
114
115 2015-03-23  Brady Eidson  <beidson@apple.com>
116
117         Content extensions should apply css selectors
118         https://bugs.webkit.org/show_bug.cgi?id=142604
119
120         Reviewed by Alex Christensen.
121
122         Tests: http/tests/contentextensions/css-display-none.html
123
124         * WebCore.xcodeproj/project.pbxproj:
125
126         * contentextensions/ContentExtension.cpp:
127         (WebCore::ContentExtensions::ContentExtension::create):
128         (WebCore::ContentExtensions::ContentExtension::ContentExtension):
129         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
130         * contentextensions/ContentExtension.h:
131         (WebCore::ContentExtensions::ContentExtension::identifier):
132         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
133
134         * contentextensions/ContentExtensionsBackend.cpp:
135         (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
136         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
137         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
138         * contentextensions/ContentExtensionsBackend.h:
139
140         * contentextensions/DFABytecodeInterpreter.cpp:
141         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
142
143         * dom/DocumentStyleSheetCollection.cpp:
144         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):
145         * dom/DocumentStyleSheetCollection.h:
146
147         * loader/DocumentLoader.cpp:
148         (WebCore::DocumentLoader::commitData):
149         (WebCore::DocumentLoader::startLoadingMainResource):
150         (WebCore::DocumentLoader::addPendingContentExtensionSheet):
151         * loader/DocumentLoader.h:
152
153         * loader/cache/CachedResourceLoader.cpp:
154         (WebCore::CachedResourceLoader::requestResource):
155
156         * loader/cache/CachedResourceRequest.cpp:
157         (WebCore::CachedResourceRequest::setInitiator):
158         * loader/cache/CachedResourceRequest.h:
159         (WebCore::CachedResourceRequest::initiatingDocumentLoader):
160
161         * page/UserContentController.cpp:
162         (WebCore::UserContentController::globalDisplayNoneStyleSheet):
163         (WebCore::UserContentController::displayNoneCSSRule):
164         * page/UserContentController.h:
165
166 2015-03-23  Anders Carlsson  <andersca@apple.com>
167
168         -[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
169         https://bugs.webkit.org/show_bug.cgi?id=142990
170         rdar://problem/20241645
171
172         Reviewed by Andreas Kling.
173
174         Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.
175
176         * platform/network/cf/CookieJarCFNet.cpp:
177         * platform/network/mac/CookieJarMac.mm:
178
179 2015-03-23  Conrad Shultz  <conrad_shultz@apple.com>
180
181         Replace uses of kCTFontSystemFontType
182         https://bugs.webkit.org/show_bug.cgi?id=142984
183
184         Reviewed by Tim Horton.
185
186         * rendering/RenderThemeMac.mm:
187         (WebCore::AttachmentLayout::layOutTitle):
188         (WebCore::AttachmentLayout::layOutSubtitle):
189
190 2015-03-23  Dean Jackson  <dino@apple.com>
191
192         kCTFontSystemFontType is deprecated in CoreText
193         https://bugs.webkit.org/show_bug.cgi?id=142981
194         <rdar://problem/20261171>
195
196         Reviewed by Beth Dakin.
197
198         Update to the non-deprecated version.
199
200         * rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem
201         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
202
203 2015-03-23  Eric Carlson  <eric.carlson@apple.com>
204
205         [Mac] Enable fullscreen for MSE-based videos
206         https://bugs.webkit.org/show_bug.cgi?id=142971
207
208         Reviewed by Jer Noble.
209
210         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
211         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;
212
213 2015-03-23  Alex Christensen  <achristensen@webkit.org>
214
215         [MediaFoundation] Implement seek.
216         https://bugs.webkit.org/show_bug.cgi?id=142594
217
218         Reviewed by Darin Adler.
219
220         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
221         (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
222         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
223         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
224         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
225
226 2015-03-23  Dan Bernstein  <mitz@apple.com>
227
228         Fixed the build.
229
230         * platform/graphics/cocoa/FontCocoa.mm:
231         (WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
232         (WebCore::Font::platformWidthForGlyph): Ditto.
233
234 2015-03-23  Jer Noble  <jer.noble@apple.com>
235
236         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
237         https://bugs.webkit.org/show_bug.cgi?id=142970
238
239         Reviewed by Eric Carlson.
240
241         Return early after synchronously calling to the main thread to allocate the volume
242         view, to avoid re-allocating the volume view again on the web thread.
243
244         * platform/audio/ios/MediaSessionManagerIOS.mm:
245         (-[WebMediaSessionHelper allocateVolumeView]):
246
247 2015-03-23  Tim Horton  <timothy_horton@apple.com>
248
249         Add a share item to the link action menu
250         https://bugs.webkit.org/show_bug.cgi?id=142961
251         <rdar://problem/19198374>
252
253         Reviewed by Beth Dakin.
254
255         * English.lproj/Localizable.strings:
256         Remove some now-unused strings.
257
258         * platform/spi/mac/NSMenuSPI.h:
259         Add some SPI.
260
261 2015-03-23  David Kilzer  <ddkilzer@apple.com>
262
263         [iOS] Build fix: CoreText deprecated kCTFontSystemFontType
264
265         Fix tracked by:  <rdar://problem/20261171>
266
267         * rendering/RenderThemeIOS.mm:
268         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
269         Add clang pragmas.
270
271 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
272
273         Unreviewed test fix.
274
275         * css/CSSParser.cpp:
276         (WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.
277
278 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
279
280         scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
281         https://bugs.webkit.org/show_bug.cgi?id=142552
282         <rdar://problem/20114743>
283
284         Reviewed by Dean Jackson.
285
286         Revise the snap point logic as follows:
287         (1) Put the snap point destination handling in a helper function to make the rest of the code
288             easier to read.
289         (2) Make sure we always have a left-hand snap point (i.e., position 0), but don't add multiple
290             left-hand snap points.
291         (3) Create a helper function to determine if we should be working with the scroll snap 'elements'
292             behavior. We want to use this for scroll-snap-destination/scroll-snap-coordinate markup.
293         (4) Create per-element snap point offsets when using scroll-snap-destination/scroll-snap-coordinate.
294
295         * css/CSSParser.cpp:
296         (WebCore::CSSParser::parseScrollSnapDestination): Add assertion to try to catch bad parser state.
297         * page/scrolling/AxisScrollSnapOffsets.cpp:
298         (WebCore::destinationOffsetForViewSize): Added helper function to consolidate logic for handling
299         destination coordinates.
300         (WebCore::updateFromStyle): Make sure a left-hand snap point is always provided.
301         (WebCore::styleUsesElements): Added helper function.
302         (WebCore::updateSnapOffsetsForScrollableArea): Revise logic to generate 'per-element' snap point
303         offsets.
304
305 2015-03-23  Yoav Weiss  <yoav@yoav.ws>
306
307         Refactor ImageLoader's setting of CachedImage
308         https://bugs.webkit.org/show_bug.cgi?id=142825
309
310         Reviewed by Chris Dumez.
311
312         No new tests, since there's no functional change.
313
314         setImage and setImageWithoutConsideringPendingLoadEvent were not called with new
315         CachedImages and were not used as originally intended. That resulted in some dead code,
316         and confusion when going over the code.
317         This patch renames these methods into equivalent clearImage* methods, and deletes resulting dead code.
318
319         * html/HTMLObjectElement.cpp:
320         (WebCore::HTMLObjectElement::renderFallbackContent): Changed setImage call to clearImage.
321         * loader/ImageLoader.cpp:
322         (WebCore::ImageLoader::clearImage):
323         (WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
324         (WebCore::ImageLoader::notifyFinished):
325         (WebCore::ImageLoader::elementDidMoveToNewDocument):
326         (WebCore::ImageLoader::setImage): Deleted.
327         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Deleted.
328         * loader/ImageLoader.h:
329
330 2015-03-22  Benjamin Poulain  <benjamin@webkit.org>
331
332         CSS Selectors: fix attribute case-insensitive matching of Contain and List
333         https://bugs.webkit.org/show_bug.cgi?id=142932
334
335         Reviewed by Darin Adler.
336
337         Fix the last two attribute selectors that were using full case-insensitive
338         match:
339             -Contain ([foo*=bar]).
340             -List (foo~=bar]).
341
342         Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
343                fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html
344
345         * css/SelectorChecker.cpp:
346         (WebCore::attributeValueMatches):
347         * cssjit/SelectorCompiler.cpp:
348         (WebCore::SelectorCompiler::attributeValueContains):
349         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
350
351 2015-03-22  Benjamin Poulain  <bpoulain@apple.com>
352
353         Detect when url filter pattern with groups match the empty string
354         https://bugs.webkit.org/show_bug.cgi?id=142930
355
356         Reviewed by Sam Weinig.
357
358         The previous test was only accounting for simple atoms. This patch extends
359         it to groups.
360
361         * contentextensions/URLFilterParser.cpp:
362         (WebCore::ContentExtensions::Term::quantify):
363         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
364         (WebCore::ContentExtensions::GraphBuilder::finalize):
365         (WebCore::ContentExtensions::Term::quantifier): Deleted.
366
367 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
368
369         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
370         https://bugs.webkit.org/show_bug.cgi?id=142940
371
372         Reviewed by Sam Weinig.
373
374         * dom/Document.cpp:
375         (WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.
376         * dom/Document.h:
377
378         * html/HTMLMediaSession.cpp:
379         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.
380         * html/HTMLMediaSession.h:
381
382         * page/Page.cpp:
383         (WebCore::Page::didChoosePlaybackTarget):  Ditto.
384         * page/Page.h:
385
386         * platform/audio/MediaSession.h:
387         * platform/graphics/MediaPlaybackTargetPickerClient.h:
388         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: 
389         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):  Ditto.
390
391 2015-03-22  Anders Carlsson  <andersca@apple.com>
392
393         _WKWebsiteDataStore should clear WebSQL databases
394         https://bugs.webkit.org/show_bug.cgi?id=142947
395
396         Reviewed by Sam Weinig.
397
398         * Modules/webdatabase/DatabaseTracker.cpp:
399         (WebCore::DatabaseTracker::trackerWithDatabasePath):
400         Add a hack so we can get at a tracker from the UI process.
401
402         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
403         New function that deletes all databases modified after a given time.
404
405         * Modules/webdatabase/DatabaseTracker.h:
406         Add new members and export the ones we want to call from WebKit2.
407
408         * Modules/webdatabase/OriginLock.h:
409         Export the destructor.
410
411 2015-03-21  Dean Jackson  <dino@apple.com>
412
413         Remove the prefix for CSS Transforms
414         https://bugs.webkit.org/show_bug.cgi?id=142927
415         <rdar://problem/11568151>
416
417         Reviewed by Simon Fraser.
418
419         Support the bare form of:
420         - transform
421         - transform-style
422         - transform-origin
423         - perspective
424         - perspective-origin
425
426         For transform-style, we also still differentiate the prefixed property
427         because we may want to use that as an indicator of legacy content.
428
429         This is mostly a find and replace, but with some related naming
430         changes. The DOM interface for WebKitCSSTransformValue remains
431         unchanged.
432
433         Tests: transforms/2d/transform-2d-prefixed.html
434                transforms/3d/general/prefixed-3dtransform-values.html
435
436         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
437         (WebCore::propertyChangeMayRepaintNonDescendants):
438         * css/CSSComputedStyleDeclaration.cpp:
439         (WebCore::isLayoutDependent):
440         (WebCore::ComputedStyleExtractor::propertyValue):
441         * css/CSSParser.cpp:
442         (WebCore::isValidKeywordPropertyAndValue):
443         (WebCore::isKeywordPropertyID):
444         (WebCore::parseTranslateTransformValue):
445         (WebCore::CSSParser::parseValue):
446         (WebCore::CSSParser::parseTransformOrigin):
447         (WebCore::CSSParser::parsePerspectiveOrigin):
448         * css/CSSPropertyNames.in:
449         * css/StyleProperties.cpp:
450         (WebCore::StyleProperties::getPropertyValue):
451         (WebCore::StyleProperties::asText):
452         * css/WebKitCSSMatrix.cpp:
453         (WebCore::WebKitCSSMatrix::setMatrixValue):
454         * html/track/VTTCue.cpp:
455         (WebCore::VTTCueBox::applyCSSProperties):
456         * page/animation/AnimationController.cpp:
457         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
458         * page/animation/CSSPropertyAnimation.cpp:
459         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
460         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
461         * page/animation/CompositeAnimation.cpp:
462         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
463         * page/animation/ImplicitAnimation.cpp:
464         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
465         * page/animation/KeyframeAnimation.cpp:
466         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
467         (WebCore::KeyframeAnimation::validateTransformFunctionList):
468         * platform/graphics/GraphicsLayer.cpp:
469         (WebCore::GraphicsLayer::validateTransformOperations):
470         * platform/graphics/GraphicsLayerClient.h:
471         * platform/graphics/ca/GraphicsLayerCA.cpp:
472         (WebCore::propertyIdToString):
473         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
474         (WebCore::GraphicsLayerCA::addAnimation):
475         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
476         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
477         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
478         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
479         (WebCore::GraphicsLayerTextureMapper::addAnimation):
480         * platform/graphics/texmap/TextureMapperAnimation.cpp:
481         (WebCore::TextureMapperAnimation::applyInternal):
482         * platform/graphics/texmap/TextureMapperLayer.cpp:
483         (WebCore::TextureMapperLayer::syncAnimations):
484         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
485         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
486         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
487         (WebCore::CoordinatedGraphicsLayer::addAnimation):
488         * rendering/RenderLayerBacking.cpp:
489         (WebCore::RenderLayerBacking::updateGeometry):
490         (WebCore::RenderLayerBacking::startAnimation):
491         (WebCore::RenderLayerBacking::startTransition):
492         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
493         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
494         * rendering/RenderLayerCompositor.cpp:
495         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
496         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
497         * svg/SVGElement.cpp:
498         (WebCore::populateAttributeNameToCSSPropertyIDMap):
499
500 2015-03-21  Commit Queue  <commit-queue@webkit.org>
501
502         Unreviewed, rolling out r181824.
503         https://bugs.webkit.org/show_bug.cgi?id=142935
504
505         Broke Windows build (Requested by ap on #webkit).
506
507         Reverted changeset:
508
509         "Remove the prefix for CSS Transforms"
510         https://bugs.webkit.org/show_bug.cgi?id=142927
511         http://trac.webkit.org/changeset/181824
512
513 2015-03-20  Dean Jackson  <dino@apple.com>
514
515         Remove the prefix for CSS Transforms
516         https://bugs.webkit.org/show_bug.cgi?id=142927
517         <rdar://problem/11568151>
518
519         Reviewed by Simon Fraser.
520
521         Support the bare form of:
522         - transform
523         - transform-style
524         - transform-origin
525         - perspective
526         - perspective-origin
527
528         For transform-style, we also still differentiate the prefixed property
529         because we may want to use that as an indicator of legacy content.
530
531         This is mostly a find and replace, but with some related naming
532         changes. The DOM interface for WebKitCSSTransformValue remains
533         unchanged.
534
535         Tests: transforms/2d/transform-2d-prefixed.html
536                transforms/3d/general/prefixed-3dtransform-values.html
537
538         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
539         (WebCore::propertyChangeMayRepaintNonDescendants):
540         * css/CSSComputedStyleDeclaration.cpp:
541         (WebCore::isLayoutDependent):
542         (WebCore::ComputedStyleExtractor::propertyValue):
543         * css/CSSParser.cpp:
544         (WebCore::isValidKeywordPropertyAndValue):
545         (WebCore::isKeywordPropertyID):
546         (WebCore::parseTranslateTransformValue):
547         (WebCore::CSSParser::parseValue):
548         (WebCore::CSSParser::parseTransformOrigin):
549         (WebCore::CSSParser::parsePerspectiveOrigin):
550         * css/CSSPropertyNames.in:
551         * css/StyleProperties.cpp:
552         (WebCore::StyleProperties::getPropertyValue):
553         (WebCore::StyleProperties::asText):
554         * css/WebKitCSSMatrix.cpp:
555         (WebCore::WebKitCSSMatrix::setMatrixValue):
556         * html/track/VTTCue.cpp:
557         (WebCore::VTTCueBox::applyCSSProperties):
558         * page/animation/AnimationController.cpp:
559         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
560         * page/animation/CSSPropertyAnimation.cpp:
561         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
562         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
563         * page/animation/CompositeAnimation.cpp:
564         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
565         * page/animation/ImplicitAnimation.cpp:
566         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
567         * page/animation/KeyframeAnimation.cpp:
568         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
569         (WebCore::KeyframeAnimation::validateTransformFunctionList):
570         * platform/graphics/GraphicsLayer.cpp:
571         (WebCore::GraphicsLayer::validateTransformOperations):
572         * platform/graphics/GraphicsLayerClient.h:
573         * platform/graphics/ca/GraphicsLayerCA.cpp:
574         (WebCore::propertyIdToString):
575         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
576         (WebCore::GraphicsLayerCA::addAnimation):
577         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
578         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
579         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
580         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
581         (WebCore::GraphicsLayerTextureMapper::addAnimation):
582         * platform/graphics/texmap/TextureMapperAnimation.cpp:
583         (WebCore::TextureMapperAnimation::applyInternal):
584         * platform/graphics/texmap/TextureMapperLayer.cpp:
585         (WebCore::TextureMapperLayer::syncAnimations):
586         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
587         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
588         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
589         (WebCore::CoordinatedGraphicsLayer::addAnimation):
590         * rendering/RenderLayerBacking.cpp:
591         (WebCore::RenderLayerBacking::updateGeometry):
592         (WebCore::RenderLayerBacking::startAnimation):
593         (WebCore::RenderLayerBacking::startTransition):
594         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
595         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
596         * rendering/RenderLayerCompositor.cpp:
597         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
598         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
599         * svg/SVGElement.cpp:
600         (WebCore::populateAttributeNameToCSSPropertyIDMap):
601
602 2015-03-20  Yusuke Suzuki  <utatane.tea@gmail.com>
603
604         REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
605         https://bugs.webkit.org/show_bug.cgi?id=142410
606
607         Reviewed by Geoffrey Garen.
608
609         The same issues are found in the existing code; PropertyName does not have ownership.
610         This patch rewrite the point that should have ownership to Identifier.
611
612         * bindings/js/JSDOMWindowCustom.cpp:
613         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
614         (WebCore::JSDOMWindow::putByIndex):
615         * bindings/js/ReadableStreamJSSource.cpp:
616         (WebCore::getInternalSlotFromObject):
617         * bindings/scripts/CodeGeneratorJS.pm:
618         (GenerateImplementation):
619         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
620         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
621         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
622         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
623         * bindings/scripts/test/JS/JSTestInterface.cpp:
624         (WebCore::JSTestInterface::putByIndex):
625
626 2015-03-20  Simon Fraser  <simon.fraser@apple.com>
627
628         Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
629         https://bugs.webkit.org/show_bug.cgi?id=142917
630
631         Reviewed by Beth Dakin.
632         
633         The scrollperf test would fail to detect transitions between slow and fast scrolling
634         for new pages, because there was no logging when slow-scrolling scrolling tree was
635         torn down, and a new fast-scrolling tree constructed.
636         
637         Fix by always logging the slow-scrolling reasons in the first update of the
638         ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
639         changed.
640
641         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
642         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
643         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
644         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
645
646 2015-03-19  Geoffrey Garen  <ggaren@apple.com>
647
648         Function.prototype.toString should not decompile the AST
649         https://bugs.webkit.org/show_bug.cgi?id=142853
650
651         Reviewed by Sam Weinig.
652
653         * bindings/js/JSLazyEventListener.cpp:
654         (WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
655         number of attribute event listeners to account for the leading newline
656         now added by JavaScriptCore.
657
658         This solution is not perfect, but there are a lot of pre-existing problems
659         with line and column reporting for attribute event listeners, and this
660         preserves existing behavior with reasonable reliability.
661
662 2015-03-20  Alex Christensen  <achristensen@webkit.org>
663
664         Progress towards CMake on Mac.
665         https://bugs.webkit.org/show_bug.cgi?id=136003
666
667         Reviewed by Chris Dumez.
668
669         * PlatformMac.cmake:
670         Added some directories to create forwarding headers from.
671         Generate ObjC bindings.
672
673 2015-03-20  Per Arne Vollan  <peavo@outlook.com>
674
675         [WinCairo] Crash when leaving page while video is playing.
676         https://bugs.webkit.org/show_bug.cgi?id=142578
677
678         Reviewed by Alex Christensen.
679
680         This can happen when there is an asynchronous event invoked from a video worker
681         thread, accessing the media player object after it has been deleted.
682         This is solved by resetting the media player pointer in the event object,
683         when the media player is deleted.
684
685         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
686         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
687         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
688         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
689         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
690         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
691         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
692         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
693         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
694         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
695         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::MediaPlayerListener):
696         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::~MediaPlayerListener):
697         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::onMediaPlayerDeleted):
698
699 2015-03-20  Chris Dumez  <cdumez@apple.com>
700
701         Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
702         https://bugs.webkit.org/show_bug.cgi?id=142911
703
704         Reviewed by Antti Koivisto.
705
706         Drop the isBackForwardLoadType(m_loadType) assertion in
707         FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
708         used to hold true when goToBackForwardItem() was only called with
709         history navigation load types. However, after r181782, we use a Standard
710         load in the cases where we do not wish to display stale content (e.g.
711         restoring session state).
712
713         The assertion comment says "We only use cache-only loads to avoid
714         resubmitting forms". However, we then call loadDifferentDocumentItem()
715         which already takes care of using the ReturnCacheDataElseLoad cache
716         policy as the HistoryItem has form data and we pass
717         MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.
718
719         No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
720         API test.
721
722         * loader/FrameLoader.cpp:
723         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
724
725 2015-03-20  Andy Estes  <aestes@apple.com>
726
727         [Content Filtering] Adopt NEFilterSource unblock handling
728         https://bugs.webkit.org/show_bug.cgi?id=142904
729
730         Reviewed by Andreas Kling.
731
732         * platform/cocoa/NetworkExtensionContentFilter.mm:
733         (WebCore::NetworkExtensionContentFilter::unblockHandler):
734         Returned an unblock handler that calls -[NEFilterSource remediateWithDecisionHandler:].
735         * platform/cocoa/ParentalControlsContentFilter.mm:
736         (WebCore::ParentalControlsContentFilter::unblockHandler): Used ASCIILiteral.
737
738 2015-03-19  Andy Estes  <aestes@apple.com>
739
740         [Content Filtering] Add tests for unblock requests
741         https://bugs.webkit.org/show_bug.cgi?id=142900
742
743         Reviewed by Andreas Kling.
744
745         Currently the iOS Parental Controls content filter has a mechanism for requesting that a page be unblocked.
746         WebKit implements this by listening for navigations originating from the filter's error page to a special URL,
747         and requesting the page be unblocked via platform API, which might cause UI to be displayed. If the unblock is
748         successful then we schedule a reload of the frame in order to display the unblocked document.
749
750         NetworkExtension also supports unblock requests, so in preparation for adopting its API, this patch allows
751         content filters to specify their own unblock request method, teaches MockContentFilter to provide such a method,
752         and writes tests to cover both allowed and denied unblock requests.
753
754         The content filter that blocks a load creates a ContentFilterUnblockHandler, passing it a lambda that is executed
755         when a navigation matches the filter's special unblock URL. Filters can also specify that a script be executed in
756         the context of its error page if the unblock is denied.
757
758         All platform content filters can handle unblock requests like this with the exception of iOS Parental Controls in WebKit2.
759         Since UI can be displayed by the system in this case, the request must be made from within the UI process. Therefore the
760         existing method is retained of serializing a WebFilterEvaluator and intercepting navigation policy calls in the UI process.
761
762         Tests: contentfiltering/allow-after-unblock-request.html
763                contentfiltering/block-after-unblock-request.html
764
765         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
766         (WebCore::JSMockContentFilterSettings::decisionPoint): Added some using statements for clarity.
767         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
768         (WebCore::toJSValue): Returns a JSValue from a Decision.
769         (WebCore::toDecision): Returns a Decision from a JSValue.
770         (WebCore::JSMockContentFilterSettings::decision): Used toJSValue.
771         (WebCore::JSMockContentFilterSettings::setDecision): Used toDecision.
772         (WebCore::JSMockContentFilterSettings::unblockRequestDecision): Used toJSValue.
773         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision): Used toDecision.
774         * loader/ContentFilter.cpp:
775         (WebCore::ContentFilter::createIfNeeded): Passed a reference to the owning DocumentLoader.
776         (WebCore::ContentFilter::ContentFilter): Ditto.
777         (WebCore::ContentFilter::unblockHandler): If the unblockHandler requests that a script be executed when an
778         unblock request is denied, create a wrapper unblockHandler that executes that script in m_documentLoader's frame.
779         * loader/ContentFilter.h:
780         * loader/DocumentLoader.cpp:
781         (WebCore::DocumentLoader::responseReceived): Passed this to ContentFilter::createIfNeeded.
782         * loader/FrameLoader.cpp:
783         (WebCore::FrameLoader::prepareForLoadStart): Called PolicyChecker::prepareForLoadStart.
784         * loader/PolicyChecker.cpp:
785         (WebCore::PolicyChecker::prepareForLoadStart): Reset m_contentFilterUnblockHandler.
786         (WebCore::PolicyChecker::checkNavigationPolicy): Moved logic to here from WebKit1's WebFrameLoaderClient.
787         Placing it here allows it to be shared between WebKit1 and WebKit2 (when the unblock handler does not need to
788         be called in the UI process).
789         * loader/PolicyChecker.h:
790         (WebCore::PolicyChecker::setContentFilterUnblockHandler): Added.
791         * page/Frame.h: Made Frame ThreadSafeRefCounted, since RefPtr<Frames> are captured in lambdas that can be
792         copied by background threads managed by the underlying platform.
793         * platform/ContentFilterUnblockHandler.h:
794         (WebCore::ContentFilterUnblockHandler::unblockURLScheme): Returned the Apple content filter scheme.
795         (WebCore::ContentFilterUnblockHandler::unblockURLHost): Returned the unblock URL host.
796         (WebCore::ContentFilterUnblockHandler::clear): Deleted.
797         * platform/PlatformContentFilter.h:
798         (WebCore::PlatformContentFilter::unblockRequestDeniedScript): Returned the unblock request denied script.
799         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
800         (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler): Added a constructor that takes an
801         unblockURLHost and a UnblockRequesterFunction. Added an alternate constructor for iOS Parental Controls on
802         WebKit2 that takes an unblockURLHost and a WebFilterEvaluator.
803         (WebCore::ContentFilterUnblockHandler::needsUIProcess): Returned true if m_webFilterEvaluator is non-null.
804         (WebCore::ContentFilterUnblockHandler::encode): Encoded m_unblockURLHost in addition to m_webFilterEvaluator.
805         (WebCore::ContentFilterUnblockHandler::decode): Decoded m_unblockURLHost in addition to m_webFilterEvaluator.
806         (WebCore::ContentFilterUnblockHandler::canHandleRequest): Returned true if there is a either a m_unblockRequester
807         or a m_webFilterEvaluator and the request's host and scheme match those of the unblock request URL.
808         (WebCore::dispatchToMainThread): Added a helper to dispatch a block to the main thread. Then if the web thread
809         is enabled on iOS, dispatch it there.
810         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Renamed from handleUnblockRequestAndDispatchIfSuccessful.
811         Requested an unblock using either m_unblockRequester or m_webFilterEvaluator, then called decisionHandler with the response.
812         (WebCore::scheme): Moved to ContentFilterUnblockHandler::unblockURLScheme.
813         (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful): Renamed to requestUnblockAsync.
814         * platform/cocoa/ParentalControlsContentFilter.mm:
815         (WebCore::ParentalControlsContentFilter::unblockHandler): Returned an unblock handler using the WebFilterEvaluator constructor.
816         * testing/MockContentFilter.cpp: Added using statments for clarity.
817         (WebCore::settings): Added a helper to get MockContentFilterSettings::singleton().
818         (WebCore::MockContentFilter::canHandleResponse): Used the helper.
819         (WebCore::MockContentFilter::MockContentFilter): Took advantage of the using statements.
820         (WebCore::MockContentFilter::addData): Ditto.
821         (WebCore::MockContentFilter::finishedAddingData): Ditto.
822         (WebCore::MockContentFilter::unblockHandler): Returned a ContentFilterUnblockHandler that checks settings() for its decision.
823         (WebCore::MockContentFilter::unblockRequestDeniedScript): Returned the script to execute in MockContentFilter's
824         error page when an unblock request is denied.
825         (WebCore::MockContentFilter::maybeDetermineStatus): Took advantage of settings() and using statements.
826         * testing/MockContentFilterSettings.cpp:
827         (WebCore::MockContentFilterSettings::unblockRequestURL): Constructed a static unblock URL and returned it.
828         * testing/MockContentFilterSettings.h:
829         (WebCore::MockContentFilterSettings::unblockURLHost): Returned the filter's unblock URL host.
830         (WebCore::MockContentFilterSettings::unblockRequestDecision): Returns the decision to make for an unblock request.
831         (WebCore::MockContentFilterSettings::setUnblockRequestDecision): Sets the decision to make for an unblock request.
832         * testing/MockContentFilterSettings.idl: Added the unblockRequestDecision and unblockRequestURL attributes.
833
834 2015-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
835
836         [GTK] Crash due to empty drag image during drag-and-drop
837         https://bugs.webkit.org/show_bug.cgi?id=142671
838
839         Reviewed by Philippe Normand.
840
841         Return early from ImageBuffer constructor if an empty size is
842         given. This is a speculative fix for a crash while starting a drag
843         and drop operation, that I haven't been able to reproduce.
844
845         * platform/graphics/cairo/ImageBufferCairo.cpp:
846         (WebCore::ImageBuffer::ImageBuffer):
847
848 2015-03-19  Chris Dumez  <cdumez@apple.com>
849
850         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
851         https://bugs.webkit.org/show_bug.cgi?id=142893
852         <rdar://problem/19633737>
853         <rdar://problem/19869257>
854
855         Reviewed by Antti Koivisto.
856
857         Always use ReturnCacheDataElseLoad cache policy for history navigations.
858         Previously, we would use the default protocol cache policy for history
859         navigations if m_stateMachine.committedFirstRealDocumentLoad() returned
860         false so that we do not display stale content when restoring the session
861         state of Safari statup (rdar://problem/8131355). This is now handled
862         before reaching this method by no longer using "IndexedBackForward"
863         FrameLoadType when restoring session tabs, and using "Standard" load
864         type instead.
865
866         * loader/FrameLoader.cpp:
867         (WebCore::FrameLoader::loadDifferentDocumentItem):
868
869 2015-03-19  Andy Estes  <aestes@apple.com>
870
871         [Content Filtering] Move ContentFilter to from platform/ to loader/
872         https://bugs.webkit.org/show_bug.cgi?id=142897
873
874         Reviewed by Dan Bernstein.
875
876         ContentFilterCollection never contained any platform code, so it doesn't make sense for it to be in platform.
877         Move it to loader/, since ContentFilters are owned by DocumentLoaders, and just call it ContentFilter. Extract
878         the abstract part of ContentFilter into a new base class called PlatformContentFilter that each of the
879         individual filters inherit from.
880
881         * WebCore.xcodeproj/project.pbxproj:
882         * loader/ContentFilter.cpp: Renamed from Source/WebCore/platform/ContentFilter.cpp.
883         (WebCore::ContentFilter::types): Moved from ContentFilterCollection.
884         (WebCore::ContentFilter::createIfNeeded): Ditto.
885         (WebCore::ContentFilter::ContentFilter): Ditto.
886         (WebCore::ContentFilter::addData): Ditto.
887         (WebCore::ContentFilter::finishedAddingData): Ditto.
888         (WebCore::ContentFilter::needsMoreData): Ditto.
889         (WebCore::ContentFilter::didBlockData): Ditto.
890         (WebCore::ContentFilter::getReplacementData): Ditto.
891         (WebCore::ContentFilter::unblockHandler): Ditto.
892         * loader/ContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
893         (WebCore::ContentFilter::type): Replaced a use of ContentFilterCollection.
894         * platform/PlatformContentFilter.h: Renamed from Source/WebCore/platform/ContentFilter.h.
895         * platform/cocoa/NetworkExtensionContentFilter.h: Inherited from PlatformContentFilter.
896         * platform/cocoa/ParentalControlsContentFilter.h: Ditto.
897         * testing/MockContentFilter.h: Ditto.
898
899 2015-03-19  Dean Jackson  <dino@apple.com>
900
901         CSS Animations with triggers should map scroll position to duration
902         https://bugs.webkit.org/show_bug.cgi?id=142870
903         <rdar://problem/20227244>
904
905         Reviewed by Simon Fraser.
906
907         Expose a prototype implementation of what will eventually be called
908         animation-timebase, mapping the scroll location to the duration of an
909         animation. This only applies if the animation has a start and end
910         trigger.
911
912         Test: animations/trigger-container-scroll-boundaries.html
913
914         * css/CSSComputedStyleDeclaration.cpp:
915         (WebCore::createAnimationTriggerValue): Change to downcast.
916
917         * css/CSSToStyleMap.cpp:
918         (WebCore::CSSToStyleMap::mapAnimationTrigger): Fix a bug where I wasn't
919         telling the ScrollAnimationTrigger object whether or not it had
920         an end value. This wasn't visible before because we were not using
921         the end value.
922
923         * page/animation/AnimationBase.cpp:
924         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): Add a comment and
925         change to using a downcast.
926         (WebCore::AnimationBase::timeToNextService): Change to downcast.
927         (WebCore::AnimationBase::freezeAtTime): Whitespace cleanup.
928         (WebCore::AnimationBase::getElapsedTime): Calculate the elapsedTime based
929         on the scroll position relative to the start and end trigger spots.
930
931         * page/animation/AnimationController.cpp:
932         (WebCore::AnimationControllerPrivate::updateAnimations): Since this
933         can potentially call into beginAnimationUpdateTime, it should have
934         an update blocker. This fixes the assert we were seeing in tests.
935         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Keep track of the scroll
936         position so we don't need to ask for it all the time.
937         * page/animation/AnimationControllerPrivate.h:
938         (WebCore::AnimationControllerPrivate::scrollPosition): New accessor.
939
940         * platform/animation/AnimationTrigger.h: Add downcast macros.
941         (WebCore::ScrollAnimationTrigger::create): Calculate hasEndValue from the passed
942         parameters rather than a separate value.
943         (WebCore::ScrollAnimationTrigger::hasEndValue):
944         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
945         (WebCore::ScrollAnimationTrigger::setHasEndValue): Deleted.
946
947         * platform/graphics/ca/GraphicsLayerCA.cpp:
948         (WebCore::GraphicsLayerCA::animationCanBeAccelerated): If we have an
949         animation of this sort, we can't use a CAAnimation.
950
951 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
952
953         [Mac] Move MediaPlaybackTargetPicker
954         https://bugs.webkit.org/show_bug.cgi?id=142889
955
956         Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicker so it
957         can be used by both WK2 and WK1.
958
959         Reviewed by Tim Horton.
960
961         * WebCore.xcodeproj/project.pbxproj:
962         * platform/graphics/MediaPlaybackTargetPicker.cpp: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp.
963         * platform/graphics/MediaPlaybackTargetPicker.h: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h.
964         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h.
965         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm.
966
967 2015-03-19  Enrica Casucci  <enrica@apple.com>
968
969         REGRESSION (r109593): Clicking after last inline element could cause a crash.
970         https://bugs.webkit.org/show_bug.cgi?id=142880
971         rdar://problem/17222294
972
973         Reviewed by Ryosuke Niwa.
974
975         Test: editing/selection/click-after-last-inline-crash.html
976
977         * rendering/RootInlineBox.cpp:
978         (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
979
980 2015-03-19  Enrica Casucci  <enrica@apple.com>
981
982         One more build fix after r181760.
983
984         * page/EventHandler.cpp:
985         (WebCore::EventHandler::handleDrag):
986
987 2015-03-19  Jessie Berlin  <jberlin@webkit.org>
988
989         Build fix after r181760.
990
991         * rendering/RenderAttachment.h:
992
993 2015-03-19  Jer Noble  <jer.noble@apple.com>
994
995         [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
996         https://bugs.webkit.org/show_bug.cgi?id=142132
997
998         Reviewed by Tim Horton.
999
1000         Add a new utility method to calculate a rect with a specific aspect ratio wrapping a smaller one.
1001
1002         * platform/graphics/GeometryUtilities.cpp:
1003         (WebCore::smallestRectWithAspectRatioAroundRect):
1004         * platform/graphics/GeometryUtilities.h:
1005
1006 2015-03-19  Chris Dumez  <cdumez@apple.com>
1007
1008         Get rid of "CachePolicyCache" cache policy
1009         https://bugs.webkit.org/show_bug.cgi?id=142881
1010
1011         Reviewed by Antti Koivisto.
1012
1013         Get rid of "CachePolicyCache" cache policy as it is unused.
1014
1015         * loader/cache/CachePolicy.h:
1016         * loader/cache/CachedResource.cpp:
1017         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
1018         * page/DiagnosticLoggingKeys.cpp:
1019         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey): Deleted.
1020         * page/DiagnosticLoggingKeys.h:
1021
1022 2015-03-19  Alex Christensen  <achristensen@webkit.org>
1023
1024         [Content Extensions] Test regular expression parse failures.
1025         https://bugs.webkit.org/show_bug.cgi?id=142872
1026
1027         Reviewed by Benjamin Poulain.
1028
1029         * contentextensions/URLFilterParser.cpp:
1030         (WebCore::ContentExtensions::GraphBuilder::finalize):
1031         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
1032         (WebCore::ContentExtensions::URLFilterParser::addPattern):
1033         (WebCore::ContentExtensions::URLFilterParser::statusString):
1034         * contentextensions/URLFilterParser.h:
1035         Changed failures that can never happen to assertions.
1036
1037 2015-03-19  Enrica Casucci  <enrica@apple.com>
1038
1039         Release build fix after https://trac.webkit.org/r181760.
1040
1041         Unreviewed.
1042
1043         * page/EventHandler.cpp:
1044         (WebCore::EventHandler::handleDrag):
1045
1046 2015-03-19  Enrica Casucci  <enrica@apple.com>
1047
1048         <attachment> should put URLs on the pasteboard so that Finder can accept drops.
1049         https://bugs.webkit.org/show_bug.cgi?id=142801
1050         rdar://problem/19982527
1051
1052         Reviewed by Tim Horton.
1053
1054         Test: editing/pasteboard/drag-and-drop-attachment-contenteditable.html
1055
1056         This patch adds all the necessary support to write attachment elements into
1057         the pasteboard, including the promised type.
1058
1059         * WebCore.xcodeproj/project.pbxproj:
1060         * page/DragActions.h:
1061         * page/DragClient.h:
1062         (WebCore::DragClient::declareAndWriteAttachment):
1063         * page/DragController.cpp:
1064         (WebCore::DragController::draggableElement):
1065         (WebCore::DragController::startDrag):
1066         * page/DragController.h:
1067         (WebCore::DragController::draggingAttachmentURL):
1068         * page/EventHandler.cpp:
1069         (WebCore::EventHandler::dragHysteresisExceeded):
1070         (WebCore::EventHandler::handleDrag):
1071         * page/mac/DragControllerMac.mm:
1072         (WebCore::DragController::declareAndWriteAttachment):
1073         * page/win/DragControllerWin.cpp:
1074         (WebCore::DragController::declareAndWriteAttachment):
1075         * platform/URL.cpp:
1076         (WebCore::URL::fileURLWithFileSystemPath):
1077         * platform/URL.h:
1078         * rendering/HitTestResult.cpp:
1079         (WebCore::HitTestResult::absoluteAttachmentURL):
1080         * rendering/HitTestResult.h:
1081
1082 2015-03-19  Chris Dumez  <cdumez@apple.com>
1083
1084         Unreviewed, fix linking error after r181753.
1085
1086         Drop WEBCORE_EXPORT for Settings::minimumDOMTimerInterval() as it is
1087         now inlined.
1088
1089         * page/Settings.h:
1090         (WebCore::Settings::minimumDOMTimerInterval):
1091
1092 2015-03-19  Brady Eidson  <beidson@apple.com>
1093
1094         Part of content extensions should apply css selectors
1095         https://bugs.webkit.org/show_bug.cgi?id=142604
1096
1097         Reviewed by Alex Christensen.
1098
1099         Add a new action for applying the cached global stylesheet.
1100
1101         * contentextensions/CompiledContentExtension.cpp:
1102         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1103
1104         * contentextensions/ContentExtensionActions.h:
1105
1106         * contentextensions/ContentExtensionCompiler.cpp:
1107         (WebCore::ContentExtensions::serializeActions):
1108
1109         * contentextensions/ContentExtensionParser.cpp:
1110         (WebCore::ContentExtensions::loadAction):
1111
1112         * contentextensions/ContentExtensionRule.cpp:
1113         (WebCore::ContentExtensions::Action::deserialize):
1114         * contentextensions/ContentExtensionRule.h:
1115         (WebCore::ContentExtensions::Action::Action):
1116         (WebCore::ContentExtensions::Action::operator==):
1117         (WebCore::ContentExtensions::Action::stringArgument):
1118         (WebCore::ContentExtensions::Action::cssSelector): Deleted.
1119
1120         * contentextensions/ContentExtensionsBackend.cpp:
1121         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1122
1123         * loader/cache/CachedResourceLoader.cpp:
1124         (WebCore::CachedResourceLoader::requestResource):
1125
1126 2015-03-19  Chris Dumez  <cdumez@apple.com>
1127
1128         Clean up DOMTimer related settings
1129         https://bugs.webkit.org/show_bug.cgi?id=142837
1130
1131         Reviewed by Darin Adler.
1132
1133         Clean up DOMTimer related settings:
1134         - Make default minimum timer interval 4ms instead of 10ms as all ports
1135           were setting it to 4ms and the specifications says 4ms.
1136         - Get rid of setters for default DOMTimer interval values as they are
1137           not set anymore.
1138         - Move default DOMTimer interval values from Settings to DOMTimer as
1139           those are global (not per-page) and not really settings.
1140         - Stop using abbreviations in the names (e.g. min -> minimum).
1141         - Move DOMTimer settings members from Page to Settings. There is no
1142           reason for those to be stored on the Page. The getters were private
1143           so call-sites had to go via Settings anyway. Also, call-sites already
1144           had to do a null check on the page to get the settings. It seems
1145           unfortunate for the settings to do another null-check on the page for
1146           retrieving the setting value from the page.
1147         - Inline the DOMTimer settings getters as these are trivial.
1148
1149         * dom/Document.cpp:
1150         (WebCore::Document::minimumTimerInterval):
1151         (WebCore::Document::timerAlignmentInterval):
1152         * dom/ScriptExecutionContext.cpp:
1153         (WebCore::ScriptExecutionContext::minimumTimerInterval):
1154         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1155         * page/DOMTimer.h:
1156         * page/Page.cpp:
1157         (WebCore::Page::Page):
1158         (WebCore::Page::setTimerThrottlingEnabled):
1159         (WebCore::Page::setMinimumTimerInterval): Deleted.
1160         (WebCore::Page::minimumTimerInterval): Deleted.
1161         * page/Page.h:
1162         (WebCore::Page::timerAlignmentInterval): Deleted.
1163         * page/Settings.cpp:
1164         (WebCore::Settings::Settings):
1165         (WebCore::Settings::setMinimumDOMTimerInterval):
1166         (WebCore::Settings::setDOMTimerAlignmentInterval):
1167         (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): Deleted.
1168         (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): Deleted.
1169         (WebCore::Settings::setDefaultMinDOMTimerInterval): Deleted.
1170         (WebCore::Settings::defaultMinDOMTimerInterval): Deleted.
1171         (WebCore::Settings::setMinDOMTimerInterval): Deleted.
1172         (WebCore::Settings::minDOMTimerInterval): Deleted.
1173         (WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Deleted.
1174         (WebCore::Settings::defaultDOMTimerAlignmentInterval): Deleted.
1175         (WebCore::Settings::domTimerAlignmentInterval): Deleted.
1176         * page/Settings.h:
1177         (WebCore::Settings::minimumDOMTimerInterval):
1178         (WebCore::Settings::domTimerAlignmentInterval):
1179         * testing/InternalSettings.cpp:
1180         (WebCore::InternalSettings::Backup::Backup):
1181         (WebCore::InternalSettings::Backup::restoreTo):
1182         (WebCore::InternalSettings::setMinimumTimerInterval):
1183
1184 2015-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1185
1186         [GTK] Scrollbars look bad with GTK+ 3.16
1187         https://bugs.webkit.org/show_bug.cgi?id=140800
1188
1189         Reviewed by Sergio Villar Senin.
1190
1191         Take margin into account when rendering scrollbars. This fixes the
1192         huge scrollbars rendered with GTK+ 3.16. We don't need to check
1193         the GTK+ version because in previous versions the marging were 0,
1194         so the same code just works.
1195
1196         * platform/gtk/ScrollbarThemeGtk.cpp:
1197         (WebCore::adjustRectAccordingToMargin):
1198         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
1199         (WebCore::ScrollbarThemeGtk::paintThumb):
1200
1201 2015-03-19  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1202
1203         [Streams API] Update ReadableStream API according new version of the specification
1204         https://bugs.webkit.org/show_bug.cgi?id=142822
1205
1206         Reviewed by Benjamin Poulain.
1207
1208         This patch updates the IDL of ReadableStream according the new version of the spec, which splits functionality between ReadableStream and ReadableStreamReader.
1209         In particular, this patch removes read(), ready, closed and state from ReadableStream and it adds the getReader method.
1210
1211         Covered by updated readablestream-constructor.html test.
1212
1213         * Modules/streams/ReadableStream.cpp:
1214         (WebCore::ReadableStream::ReadableStream):
1215         (WebCore::ReadableStream::state): Deleted.
1216         (WebCore::ReadableStream::closed): Deleted.
1217         (WebCore::ReadableStream::ready): Deleted.
1218         * Modules/streams/ReadableStream.h:
1219         (WebCore::ReadableStream::internalState): Added to make mac build system happy, to be used by ReadableStreamReader.
1220         * Modules/streams/ReadableStream.idl:
1221         * bindings/js/JSReadableStreamCustom.cpp:
1222         (WebCore::JSReadableStream::cancel):
1223         (WebCore::JSReadableStream::getReader):
1224         (WebCore::JSReadableStream::read): Deleted.
1225         (WebCore::getOrCreatePromiseDeferredFromObject): Deleted.
1226         (WebCore::readyPromiseSlotName): Deleted.
1227         (WebCore::JSReadableStream::ready): Deleted.
1228         (WebCore::closedPromiseSlotName): Deleted.
1229         (WebCore::JSReadableStream::closed): Deleted.
1230
1231 2015-03-18  Manuel Rego Casasnovas  <rego@igalia.com>
1232
1233         Unreviewed. GTK build fix after r181720.
1234
1235         * rendering/RenderImage.cpp:
1236         (WebCore::RenderImage::styleDidChange):
1237
1238 2015-03-18  Antti Koivisto  <antti@apple.com>
1239
1240         Test disk cache behavior when using back navigation cache policy
1241         https://bugs.webkit.org/show_bug.cgi?id=142848
1242
1243         Reviewed by Chris Dumez.
1244
1245         Add a way to override the normal cache policy so we can test reload behavior of cache without actually reloading.
1246
1247         Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
1248
1249         * loader/FrameLoader.cpp:
1250         (WebCore::FrameLoader::addExtraFieldsToRequest):
1251         * loader/FrameLoader.h:
1252         (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
1253         * testing/Internals.cpp:
1254         (WebCore::Internals::setOverrideCachePolicy):
1255         * testing/Internals.h:
1256         * testing/Internals.idl:
1257
1258 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
1259
1260         TextFragment#start() is always >= 0 since its type is unsigned
1261         https://bugs.webkit.org/show_bug.cgi?id=142860
1262
1263         Reviewed by Andreas Kling.
1264
1265         Since TextFragment::m_start is unsigned, the result of
1266         TextFragment::start() is always >= 0 and assertion is not effective.
1267         This patch removes this assertion to suppress warnings.
1268
1269         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1270         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
1271
1272 2015-03-18  Alex Christensen  <achristensen@webkit.org>
1273
1274         [ContentExtensions] Prepare for compiling stylesheets of selectors to be used on every page.
1275         https://bugs.webkit.org/show_bug.cgi?id=142799
1276
1277         Reviewed by Brady Eidson.
1278
1279         * WebCore.xcodeproj/project.pbxproj:
1280         Make private headers to use with API tests.
1281         * contentextensions/CompiledContentExtension.cpp:
1282         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1283         * contentextensions/CompiledContentExtension.h:
1284         Added method to get only the selectors from the root of the DFA, which apply to all URLs.
1285         * contentextensions/ContentExtensionCompiler.cpp:
1286         (WebCore::ContentExtensions::compileRuleList):
1287         Added checking if the trigger will match everything.
1288         These actions can be put directly on the root of the DFA without adding extra epsilon transitions to the NFA.
1289         * contentextensions/DFA.h:
1290         (WebCore::ContentExtensions::DFA::nodeAt):
1291         * contentextensions/DFABytecodeInterpreter.cpp:
1292         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1293         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1294         * contentextensions/DFABytecodeInterpreter.h:
1295         * contentextensions/NFA.h:
1296         * contentextensions/URLFilterParser.cpp:
1297         (WebCore::ContentExtensions::Term::quantifier):
1298         Sink terms to a vector then add nodes to NFA when finalizing after checking for regexes that match everything.
1299         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
1300         (WebCore::ContentExtensions::GraphBuilder::finalize):
1301         (WebCore::ContentExtensions::GraphBuilder::parseStatus):
1302         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
1303         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
1304         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
1305         (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
1306         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
1307         (WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
1308         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
1309         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
1310         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
1311         (WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
1312         (WebCore::ContentExtensions::GraphBuilder::disjunction):
1313         (WebCore::ContentExtensions::GraphBuilder::hasError):
1314         (WebCore::ContentExtensions::GraphBuilder::fail):
1315         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
1316         (WebCore::ContentExtensions::URLFilterParser::addPattern):
1317         (WebCore::ContentExtensions::URLFilterParser::statusString):
1318         (WebCore::ContentExtensions::GraphBuilder::errorMessage): Deleted.
1319         * contentextensions/URLFilterParser.h:
1320         Use an enum instead of strings for the status to avoid checking strings when we have a regex that matches everything.
1321
1322 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
1323
1324         Fix build failure due to FALLTHROUGH in unreachable code
1325         https://bugs.webkit.org/show_bug.cgi?id=142703
1326
1327         Reviewed by Benjamin Poulain.
1328
1329         FALLTHROUGH should not exist in unreachable code marked by
1330         ASSERT_NOT_REACHABLE.
1331
1332         When !ENABLE(CSS_SELECTOR_JIT) and Debug mode is enabled,
1333         both ASSERT_NOT_REACHED and FALLTHROUGH are instantiated
1334         and it cause build failure.
1335
1336         Here, since CompiledSingle/CompiledSingleWithRootFilter are
1337         not set when !ENABLE(CSS_SELECTOR_JIT). So dropping FALLTHROUGH
1338         and leave ASSERT_NOT_REACHED.
1339         And since ASSERT_NOT_ReACHED is stripped when Release build,
1340         I've inserted FALLTHROUGH() if ASSERT_DISABLED.
1341         This fix is the same to r162906.
1342
1343         * dom/SelectorQuery.cpp:
1344         (WebCore::SelectorDataList::execute):
1345
1346 2015-03-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
1347
1348         Switching between two SVG images with no intrinsic sizes causes them to get the default SVG size instead of the container size.
1349         https://bugs.webkit.org/show_bug.cgi?id=142805.
1350
1351         Reviewed by Darin Adler.
1352         
1353         The bug happens due to wrong logic in RenderImage::imageDimensionsChanged().
1354         This function decides to setNeedsLayout() if the intrinsic size of the image
1355         changes. If the size does not change, it only repaints the image rectangle.
1356         When switching the src of the an image between two SVG images and both of
1357         them have no intrinsic size, we do not updateInnerContentRect() and this
1358         means an SVGImageForContainer is not going to be created for this image.
1359         When the image is drawn, it is drawn directly from the SVGImage. And this
1360         means the drawing has to be scaled by container_size / SVG_default_intrinsic_size
1361         
1362         After figuring out that I need to updateInnerContentRect() to fix this bug,
1363         I found out Blink has already changed this code to do the same thing. But 
1364         they also did more clean-up in this function. Here is the link
1365         https://codereview.chromium.org/114323004. I think their change seems correct
1366         although they did not say what exactly they were trying to fix.
1367         
1368         The plan for repaintOrMarkForLayout(), which is the new name of this function,
1369         is the following:
1370             -- setNeedLayout() if the intrinsic size changes and it affects the size
1371                of the image.
1372             -- updateInnerContentRect() if the intrinsic size did not change but the
1373                image has exiting layout.
1374             -- repaint the image rectangle if layout is not needed.
1375             
1376         This change also removes the call to computeLogicalWidthInRegion(), which is
1377         almost running a layout for the image. This call figures out whether the image
1378         needs to setNeedsLayout(). This call is unnecessary; the image needs to run a
1379         layout if the intrinsic size has changed and it affects the size of the image.
1380                     
1381         Test: svg/as-image/svg-no-intrinsic-size-switching.html
1382
1383         * rendering/RenderImage.cpp:
1384         (WebCore::RenderImage::styleDidChange): Change the function call.
1385         (WebCore::RenderImage::imageChanged): Rename local variable and change the
1386         function call.
1387         
1388         (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Simplify this function.
1389         Call setIntrinsicSize() with the new size unless the image is in error state.
1390         
1391         (WebCore::RenderImage::repaintOrMarkForLayout): This a better name for this
1392         function since it is called even if the intrinsic size was not changed.
1393         (WebCore::RenderImage::imageDimensionsChanged): Deleted.
1394         
1395         * rendering/RenderImage.h: Rename imageDimensionsChanged() and change the 
1396         updateIntrinsicSizeIfNeeded() to return void.
1397         
1398         * rendering/svg/RenderSVGForeignObject.cpp:
1399         (WebCore::RenderSVGForeignObject::paint): Code cleanup. This function can
1400         only handle the paint phases PaintPhaseForeground and PaintPhaseSelection.
1401         Use this information to simplify the logic and order of painting there.
1402
1403 2015-03-18  Jeremy Jones  <jeremyj@apple.com>
1404
1405         Fix typo in playerViewControllerWillCancelOptimizedFullscree.
1406         https://bugs.webkit.org/show_bug.cgi?id=142745
1407
1408         Reviewed by Darin Adler.
1409
1410         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1411         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]):
1412         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): Deleted.
1413
1414 2015-03-18  Simon Fraser  <simon.fraser@apple.com>
1415
1416         Avoid repaints when changing transform on an element with multiple background images
1417         https://bugs.webkit.org/show_bug.cgi?id=142841
1418
1419         Reviewed by Zalan Bujtas.
1420         
1421         Replace the cheap test for changed images in RenderElement::updateFillImages()
1422         with an exhaustive test that walks the entire list of background images,
1423         since any ensuing repaint is way more expensive than a slightly more expensive check here.
1424         
1425         Test: fast/repaint/multiple-backgrounds-style-change.html
1426
1427         * rendering/RenderElement.cpp:
1428         (WebCore::RenderElement::updateFillImages):
1429         * rendering/style/FillLayer.cpp:
1430         (WebCore::layerImagesIdentical): See if both images are the same (either none
1431         or both mask images, and same image pointer).
1432         (WebCore::FillLayer::imagesIdentical): Walk the two FillLayer lists, checking the images
1433         on each one. Returns false if we reach the end of one list before the other, or the images
1434         are different.
1435         * rendering/style/FillLayer.h: New static function; static because
1436         it compares two FillLayer lists, and I think that makes more sense than
1437         a member function.
1438
1439 2015-03-18  Anders Carlsson  <andersca@apple.com>
1440
1441         Pass cookies by reference in CookieHash functions
1442         https://bugs.webkit.org/show_bug.cgi?id=142839
1443
1444         Reviewed by Sam Weinig.
1445
1446         * platform/Cookie.h:
1447         (WebCore::CookieHash::hash):
1448         (WebCore::CookieHash::equal):
1449
1450 2015-03-18  Tim Horton  <timothy_horton@apple.com>
1451
1452         Temporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build
1453
1454         * dom/SelectorQuery.cpp:
1455         (WebCore::SelectorDataList::execute):
1456
1457 2015-03-18  Myles C. Maxfield  <mmaxfield@apple.com>
1458
1459         Call CTFontSetRenderingParameters before rendering text
1460         https://bugs.webkit.org/show_bug.cgi?id=142816
1461
1462         Reviewed by Darin Adler.
1463
1464         No new tests.
1465
1466         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1467         (WebCore::showGlyphsWithAdvances):
1468         * platform/spi/cocoa/CoreTextSPI.h:
1469
1470 2015-03-18  Chris Dumez  <cdumez@apple.com>
1471
1472         [WK2] Log the number of network cache requests that we have never seen before
1473         https://bugs.webkit.org/show_bug.cgi?id=142828
1474         <rdar://problem/19632130>
1475
1476         Reviewed by Antti Koivisto.
1477
1478         Add diagnostic logging key for network cache efficacy logging.
1479
1480         * page/DiagnosticLoggingKeys.cpp:
1481         (WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
1482         (WebCore::DiagnosticLoggingKeys::requestKey):
1483         * page/DiagnosticLoggingKeys.h:
1484
1485 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
1486
1487         Use filterRootId in SelectorQuery even if CSS JIT is not enabled
1488         https://bugs.webkit.org/show_bug.cgi?id=142703
1489
1490         Reviewed by Benjamin Poulain.
1491
1492         filterRootId pruning path is not inherently related to CSS JIT.
1493         This patch enables filterRootId even in the environment
1494         where CSS JIT is not enabled.
1495
1496         * dom/SelectorQuery.cpp:
1497         (WebCore::filterRootById):
1498         (WebCore::SelectorDataList::executeSingleSelectorData):
1499         (WebCore::SelectorDataList::execute):
1500         * dom/SelectorQuery.h:
1501
1502 2015-03-18  Zalan Bujtas  <zalan@apple.com>
1503
1504         Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
1505         https://bugs.webkit.org/show_bug.cgi?id=142809
1506
1507         Reviewed by Antti Koivisto.
1508
1509         FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
1510
1511         No change in functionality.
1512
1513         * rendering/SimpleLineLayoutFlowContents.h:
1514         (WebCore::SimpleLineLayout::FlowContents::begin):
1515         (WebCore::SimpleLineLayout::FlowContents::end):
1516         (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
1517         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
1518         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
1519         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
1520         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
1521         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
1522         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
1523         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1524         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1525
1526 2015-03-18  Zalan Bujtas  <zalan@apple.com>
1527
1528         Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
1529         https://bugs.webkit.org/show_bug.cgi?id=142785
1530
1531         Reviewed by Antti Koivisto.
1532
1533         This is in transition to support <br>. A particular position could point to multiple
1534         segments when <br> is directly followed by text.
1535
1536         No change in functionality.
1537
1538         * rendering/SimpleLineLayoutFlowContents.cpp:
1539         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
1540         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
1541         * rendering/SimpleLineLayoutFlowContents.h:
1542         (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
1543         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
1544         (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
1545         * rendering/SimpleLineLayoutResolver.cpp:
1546         (WebCore::SimpleLineLayout::RunResolver::Run::text):
1547
1548 2015-03-17  Simon Fraser  <simon.fraser@apple.com>
1549
1550         Skip trying to paint overlay scrollbars when there are none or they are clipped out
1551         https://bugs.webkit.org/show_bug.cgi?id=142811
1552         rdar://problem/20200725
1553
1554         Reviewed by Darin Adler.
1555
1556         In some content with lots of layers and overflow:scroll, we could spend 20% of
1557         the time under paintOverflowControlsForFragments() setting up an (empty) clip,
1558         and then trying to draw scrollbars that we don't have.
1559         
1560         Avoid calling paintOverflowControlsForFragments() if there are no scrollbars,
1561         and don't both setting up an empty clip just to paint nothing.
1562
1563         * rendering/RenderLayer.cpp:
1564         (WebCore::RenderLayer::paintLayerContents):
1565         (WebCore::RenderLayer::paintOverflowControlsForFragments):
1566
1567 2015-03-18  Per Arne Vollan  <peavo@outlook.com>
1568
1569         [WinCairo] Unreviewed build fix after r181665.
1570
1571         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1572         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
1573
1574 2015-03-18  Joseph Pecoraro  <pecoraro@apple.com>
1575
1576         Remove unused "preprocessor" parameter to sub-CodeGenerators
1577         https://bugs.webkit.org/show_bug.cgi?id=142793
1578
1579         Reviewed by Darin Adler.
1580
1581         * bindings/scripts/CodeGenerator.pm:
1582         (ProcessDocument):
1583         (FileNamePrefix):
1584         * bindings/scripts/CodeGeneratorObjC.pm:
1585
1586 2015-03-18  Zalan Bujtas  <zalan@apple.com>
1587
1588         Simple line layout: Split fragments on renderer boundary on the fly.
1589         https://bugs.webkit.org/show_bug.cgi?id=142579
1590
1591         Reviewed by Antti Koivisto.
1592
1593         Fragment splitting at renderers' boundary at the end of the line is no longer needed.
1594         This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
1595         fragments across renderer boundary.
1596
1597         Test: fast/text/simple-line-with-multiple-renderers.html
1598
1599         * rendering/SimpleLineLayout.cpp:
1600         (WebCore::SimpleLineLayout::revertRuns):
1601         (WebCore::SimpleLineLayout::LineState::isEmpty):
1602         (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
1603         whether neighboring fragments need collapsing.
1604         (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
1605         a fragment continuation.
1606         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
1607         (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
1608         they all get added to the current line.
1609         (WebCore::SimpleLineLayout::createLineRuns):
1610         (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
1611         (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
1612         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
1613         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
1614         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
1615         (WebCore::SimpleLineLayout::begin): Deleted.
1616         (WebCore::SimpleLineLayout::end): Deleted.
1617         (WebCore::SimpleLineLayout::preWrap): Deleted.
1618         (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
1619         (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
1620         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
1621         (WebCore::SimpleLineLayout::createTextRuns): Deleted.
1622         (WebCore::SimpleLineLayout::create): Deleted.
1623         (WebCore::SimpleLineLayout::Layout::create): Deleted.
1624         * rendering/SimpleLineLayoutFlowContents.h:
1625         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
1626         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
1627         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
1628         * rendering/SimpleLineLayoutFunctions.cpp:
1629         (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
1630         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1631         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
1632         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
1633         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
1634         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
1635         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1636         * rendering/SimpleLineLayoutTextFragmentIterator.h:
1637         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
1638         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
1639         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
1640         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
1641         (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
1642         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
1643
1644 2015-03-18  Manuel Rego Casasnovas  <rego@igalia.com>
1645
1646         Flex and grid items should be painted as inline-blocks
1647         https://bugs.webkit.org/show_bug.cgi?id=142266
1648
1649         Reviewed by Darin Adler.
1650
1651         Based on Blink r157004 by <cbiesinger@chromium.org>.
1652         https://src.chromium.org/viewvc/blink?revision=157004&view=revision
1653
1654         Both flexbox and grid specs define that the painting order of flex/grid
1655         items is the same as inline blocks. See
1656         http://dev.w3.org/csswg/css-flexbox/#painting and
1657         http://dev.w3.org/csswg/css-grid/#z-order.
1658
1659         Extracted inline blocks painting code from InlineElementBox and moved to
1660         a helper method that will be reused for flexboxes and grids.
1661
1662         Tests: css3/flexbox/flex-item-text-background-not-interleaved.html
1663                fast/css-grid-layout/grid-item-text-background-not-interleaved.html
1664
1665         * rendering/InlineElementBox.cpp:
1666         (WebCore::InlineElementBox::paint): Move code to
1667         RenderElement::paintAsInlineBlock().
1668         * rendering/RenderBlock.cpp:
1669         (WebCore::RenderBlock::paintChild): Add new argument to paint children
1670         as inline blocks.
1671         * rendering/RenderBlock.h: Define PaintType enmu and modify paintChild()
1672         signature to add the new argument.
1673         * rendering/RenderElement.cpp:
1674         (WebCore::paintPhase): Paint element in a phase.
1675         (WebCore::RenderElement::paintAsInlineBlock): Code extracted from
1676         InlineElementBox::paint().
1677         * rendering/RenderElement.h: Add new method signature.
1678         * rendering/RenderFlexibleBox.cpp:
1679         (WebCore::RenderFlexibleBox::paintChildren): Call
1680         RenderBlock::paintChild() with the new argument.
1681         * rendering/RenderGrid.cpp:
1682         (WebCore::RenderGrid::paintChildren): Ditto.
1683
1684 2015-03-18  Chris Dumez  <cdumez@apple.com>
1685
1686         [WK2] Log total number of network cache queries using diagnostic logging
1687         https://bugs.webkit.org/show_bug.cgi?id=142803
1688         <rdar://problem/19632130>
1689
1690         Reviewed by Antti Koivisto.
1691
1692         Add diagnostic logging key needed for network efficacy logging.
1693
1694         * page/DiagnosticLoggingKeys.cpp:
1695         (WebCore::DiagnosticLoggingKeys::retrievalRequestKey):
1696         * page/DiagnosticLoggingKeys.h:
1697
1698 2015-03-18  Tim Horton  <timothy_horton@apple.com>
1699
1700         Fix the build after r181660
1701
1702         * page/EventHandler.cpp:
1703         (WebCore::EventHandler::setImmediateActionStage):
1704         * page/EventHandler.h:
1705         (WebCore::EventHandler::setImmediateActionStage):
1706         Un-inline setImmediateActionStage, because it is exported to WebCore, and
1707         exporting inline thing causes random weak symbol errors on some platforms.
1708
1709 2015-03-17  Conrad Shultz  <conrad_shultz@apple.com>
1710
1711         Ignore some deprecation warnings
1712         https://bugs.webkit.org/show_bug.cgi?id=142813
1713
1714         Reviewed by Mark Rowe.
1715
1716         Fixing the deprecations is tracked by: <rdar://problem/20201450>
1717
1718         * editing/cocoa/HTMLConverter.mm:
1719         (HTMLConverter::_processElement):
1720
1721 2015-03-17  Commit Queue  <commit-queue@webkit.org>
1722
1723         Unreviewed, rolling out r181667, r181682, and r181683.
1724         https://bugs.webkit.org/show_bug.cgi?id=142812
1725
1726         Broke multiple tests with ASan, plus dependent commits
1727         (Requested by ap on #webkit).
1728
1729         Reverted changesets:
1730
1731         "Simple line layout: Split fragments on renderer boundary on
1732         the fly."
1733         https://bugs.webkit.org/show_bug.cgi?id=142579
1734         http://trac.webkit.org/changeset/181667
1735
1736         "Simple line layout: Change FlowContents::segmentForPosition()
1737         to segmentForRun()."
1738         https://bugs.webkit.org/show_bug.cgi?id=142785
1739         http://trac.webkit.org/changeset/181682
1740
1741         "Simple line layout: Use Vector<>::const_iterator instead of
1742         custom FlowContents::Iterator."
1743         https://bugs.webkit.org/show_bug.cgi?id=142809
1744         http://trac.webkit.org/changeset/181683
1745
1746 2015-03-17  Zalan Bujtas  <zalan@apple.com>
1747
1748         Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
1749         https://bugs.webkit.org/show_bug.cgi?id=142809
1750
1751         Reviewed by Antti Koivisto.
1752
1753         FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
1754
1755         No change in functionality.
1756
1757         * rendering/SimpleLineLayoutFlowContents.h:
1758         (WebCore::SimpleLineLayout::FlowContents::begin):
1759         (WebCore::SimpleLineLayout::FlowContents::end):
1760         (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
1761         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
1762         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
1763         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
1764         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
1765         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
1766         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
1767         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1768         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1769
1770 2015-03-17  Zalan Bujtas  <zalan@apple.com>
1771
1772         Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
1773         https://bugs.webkit.org/show_bug.cgi?id=142785
1774
1775         Reviewed by Antti Koivisto.
1776
1777         This is in transition to support <br>. A particular position could point to multiple
1778         segments when <br> is directly followed by text.
1779
1780         No change in functionality.
1781
1782         * rendering/SimpleLineLayoutFlowContents.cpp:
1783         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
1784         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
1785         * rendering/SimpleLineLayoutFlowContents.h:
1786         (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
1787         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
1788         (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
1789         * rendering/SimpleLineLayoutResolver.cpp:
1790         (WebCore::SimpleLineLayout::RunResolver::Run::text):
1791
1792 2015-03-17  Chris Dumez  <cdumez@apple.com>
1793
1794         [Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
1795         https://bugs.webkit.org/show_bug.cgi?id=142752
1796         <rdar://problem/20176731>
1797
1798         Reviewed by Antti Koivisto.
1799
1800         setSharedTimerFireInterval() / stopSharedTimer() are expensive on Mac
1801         and iOS on pages using a lot of timers.
1802
1803         For example, on bing.com / iOS, ~15.4% of the CPU time is spent in
1804         setSharedTimerFireInterval() and ~14.7% of the CPU time is spent in
1805         stopSharedTimer(). The expensive calls are CFRunLoopAddTimer (11.4%),
1806         CFRunLoopTimerInvalidate (14.1%), CFRunLoopTimerCreate (3.3%).
1807
1808         The issue is that we keep creating, adding to run loop modes, and then
1809         destroying the sharedTimer for each firing event. This is very
1810         expensive. In such case, the CFRunLoopTimerRef documentation advises to
1811         """
1812         ... create a repeating timer with an initial firing time in the distant
1813         future (or the initial firing time) and a very large repeat interval—on
1814         the order of decades or more—and add it to all the necessary run loop
1815         modes. Then, when you know when the timer should fire next, you reset
1816         the firing time with CFRunLoopTimerSetNextFireDate, perhaps from the
1817         timer’s own callback function. This technique effectively produces a
1818         reusable, asynchronous timer.
1819         """ [1].
1820
1821         Doing so greatly decreases CPU time spend in:
1822         - setSharedTimerFireInterval(): 15.4% -> 4.6%
1823         - stopSharedTimer(): 14.6% -> 8.6%
1824
1825         Overall CPU time spent on bing.com in timerFired() goes down from
1826         ~61.2% to ~49.5%.
1827
1828         This patch also refactors the SharedTimer code to share as much as
1829         possible between Mac and iOS.
1830
1831         This patch is based in part on the following patch:
1832         http://trac.webkit.org/changeset/143210
1833
1834         [1] https://developer.apple.com/library/prerelease/ios/documentation/CoreFoundation/Reference/CFRunLoopTimerRef/index.html#//apple_ref/c/func/CFRunLoopTimerSetNextFireDate
1835
1836         * WebCore.xcodeproj/project.pbxproj:
1837         * platform/SharedTimer.h:
1838         (WebCore::SharedTimer::invalidate):
1839         (WebCore::MainThreadSharedTimer::setFiredFunction): Deleted.
1840         (WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
1841         (WebCore::MainThreadSharedTimer::stop): Deleted.
1842         * platform/ThreadTimers.cpp:
1843         (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
1844         * platform/cf/SharedTimerCF.mm: Added.
1845         (WebCore::applicationDidBecomeActive):
1846         (WebCore::setupPowerObserver):
1847         (WebCore::setSharedTimerFiredFunction):
1848         (WebCore::timerFired):
1849         (WebCore::restartSharedTimer):
1850         (WebCore::invalidateSharedTimer):
1851         (WebCore::setSharedTimerFireInterval):
1852         (WebCore::stopSharedTimer):
1853         * platform/efl/SharedTimerEfl.cpp:
1854         (WebCore::invalidateSharedTimer):
1855         * platform/gtk/SharedTimerGtk.cpp:
1856         (WebCore::invalidateSharedTimer):
1857         * platform/ios/SharedTimerIOS.mm: Removed.
1858         * platform/mac/PowerObserverMac.h: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
1859         * platform/mac/PowerObserverMac.mm: Renamed from Source/WebCore/platform/mac/SharedTimerMac.mm.
1860         (WebCore::PowerObserver::PowerObserver):
1861         (WebCore::PowerObserver::~PowerObserver):
1862         (WebCore::PowerObserver::didReceiveSystemPowerNotification):
1863         * platform/win/SharedTimerWin.cpp:
1864         (WebCore::removeSharedTimer):
1865
1866 2015-03-17  Tim Horton  <timothy_horton@apple.com>
1867
1868         Cannot invoke action menus anymore
1869         https://bugs.webkit.org/show_bug.cgi?id=142797
1870         <rdar://problem/20032670>
1871
1872         Reviewed by Beth Dakin.
1873
1874         * platform/spi/mac/NSMenuSPI.h:
1875         Add additional NSMenu SPI.
1876
1877 2015-03-17  Zalan Bujtas  <zalan@apple.com>
1878
1879         Simple line layout: Split fragments on renderer boundary on the fly.
1880         https://bugs.webkit.org/show_bug.cgi?id=142579
1881
1882         Reviewed by Antti Koivisto.
1883
1884         Fragment splitting at renderers' boundary at the end of the line is no longer needed.
1885         This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
1886         fragments across renderer boundary.
1887
1888         Test: fast/text/simple-line-with-multiple-renderers.html
1889
1890         * rendering/SimpleLineLayout.cpp:
1891         (WebCore::SimpleLineLayout::revertRuns):
1892         (WebCore::SimpleLineLayout::LineState::isEmpty):
1893         (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
1894         whether neighboring fragments need collapsing.
1895         (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
1896         a fragment continuation.
1897         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
1898         (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
1899         they all get added to the current line.
1900         (WebCore::SimpleLineLayout::createLineRuns):
1901         (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
1902         (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
1903         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
1904         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
1905         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
1906         (WebCore::SimpleLineLayout::begin): Deleted.
1907         (WebCore::SimpleLineLayout::end): Deleted.
1908         (WebCore::SimpleLineLayout::preWrap): Deleted.
1909         (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
1910         (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
1911         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
1912         (WebCore::SimpleLineLayout::createTextRuns): Deleted.
1913         (WebCore::SimpleLineLayout::create): Deleted.
1914         (WebCore::SimpleLineLayout::Layout::create): Deleted.
1915         * rendering/SimpleLineLayoutFlowContents.h:
1916         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
1917         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
1918         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
1919         * rendering/SimpleLineLayoutFunctions.cpp:
1920         (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
1921         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1922         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
1923         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
1924         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
1925         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
1926         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1927         * rendering/SimpleLineLayoutTextFragmentIterator.h:
1928         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
1929         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
1930         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
1931         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
1932         (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
1933         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
1934
1935 2015-03-17  Jeremy Jones  <jeremyj@apple.com>
1936
1937         When tab hides, pause fullscreen and exit normally.
1938         https://bugs.webkit.org/show_bug.cgi?id=142685
1939
1940         Reviewed by Eric Carlson.
1941
1942         Pause fullscreen playback when switching tabs. Exit fullscreen is not necessary and even prevents
1943         the normal flow of teardown. This allows the normal exit fullscreen call to succeed and call its callback.
1944
1945         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1946         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
1947
1948 2015-03-17  Per Arne Vollan  <peavo@outlook.com>
1949
1950         [WinCairo] Video position is incorrect when located inside a frame.
1951         https://bugs.webkit.org/show_bug.cgi?id=142784
1952
1953         Reviewed by Brent Fulgham.
1954
1955         We need to take the enclosing frame's position into account, when finding the video position.
1956
1957         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1958         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
1959
1960 2015-03-17  Benjamin Poulain  <bpoulain@apple.com>
1961
1962         Compile character ranges targeting the same state as range check in the bytecode
1963         https://bugs.webkit.org/show_bug.cgi?id=142759
1964
1965         Reviewed by Alex Christensen.
1966
1967         Previously, character ranges would be compiled as many individual character checks.
1968         For example, a transition on "[a-z]" would do 26 character checks + jump, which leads
1969         to enormous matchines.
1970
1971         With this patch, we find the ranges at lowering time and generate a single instruction
1972         for them: "CheckValueRange". This helps making the machine denser when the input
1973         use character sets.
1974
1975         The second part of this patch goes further in the case where the transitions out of
1976         a state cover the entire alphabet. In that case, we create a fallback transition
1977         on the fly and remove all the ranges made useless.
1978         That case is common when ranges are used with inverse character set (e.g. [^a]+a).
1979
1980         * contentextensions/DFABytecode.h:
1981         (WebCore::ContentExtensions::instructionSizeWithArguments):
1982         * contentextensions/DFABytecodeCompiler.cpp:
1983         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
1984         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
1985         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
1986         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
1987         * contentextensions/DFABytecodeCompiler.h:
1988         Extend the compiler to detect ranges and lower them as CheckValueRange.
1989
1990         * contentextensions/DFABytecodeInterpreter.cpp:
1991         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1992         Range checks in the interpreter.
1993
1994         * contentextensions/NFA.cpp:
1995         (WebCore::ContentExtensions::NFA::setFinal):
1996         This assertion does not make sense with the current codebase. Actions are "compressed",
1997         it is possible to have two patterns with the same action.
1998
1999         * contentextensions/NFAToDFA.cpp:
2000         (WebCore::ContentExtensions::simplifyTransitions):
2001         A very simple DFA optimization function: it only reduce the strength of ranges.
2002
2003         (WebCore::ContentExtensions::NFAToDFA::convert):
2004
2005 2015-03-17  Jer Noble  <jer.noble@apple.com>
2006
2007         REGRESSION (r181423): Crash @ generatedcontent.org at com.apple.WebCore: WebCore::MediaPlayer::maximumDurationToCacheMediaTime const + 4
2008         https://bugs.webkit.org/show_bug.cgi?id=142787
2009
2010         Reviewed by Eric Carlson.
2011
2012         Null check m_player before derefencing.
2013
2014         * html/HTMLMediaElement.cpp:
2015         (WebCore::HTMLMediaElement::parseAttribute):
2016
2017 2015-03-17  Beth Dakin  <bdakin@apple.com>
2018
2019         DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on 
2020         10.10.2
2021         https://bugs.webkit.org/show_bug.cgi?id=142700
2022         -and corresponding-
2023         rdar://problem/20165168
2024
2025         Reviewed by Tim Horton.
2026
2027         This patch adds a new enum and member variable so that EventHandler can keep track 
2028         of the current immediate action state.
2029         * page/EventHandler.cpp:
2030         (WebCore::EventHandler::EventHandler):
2031
2032         A new mouse press even is starting. We can re-set m_immediateActionStage to none 
2033         unless a Hit Test has already been performed.
2034         (WebCore::EventHandler::handleMousePressEvent):
2035
2036         If an immediate action was completed, then send mouse to the DOM and return early. 
2037         This will prevent us from doing our own normal mouseup behaviors such as 
2038         navigating to a link that was clicked — we only want to do that if the click was 
2039         not used to perform an immediate action.
2040         (WebCore::EventHandler::handleMouseReleaseEvent):
2041         * page/EventHandler.h:
2042         (WebCore::EventHandler::setImmediateActionStage):
2043
2044 2015-03-17  Joseph Pecoraro  <pecoraro@apple.com>
2045
2046         Use a better parameter name for Document.getElementsByClassName
2047         https://bugs.webkit.org/show_bug.cgi?id=142771
2048
2049         Reviewed by Chris Dumez.
2050
2051         * bindings/objc/PublicDOMInterfaces.h:
2052         * dom/Document.idl:
2053
2054 2015-03-17  Timothy Horton  <timothy_horton@apple.com>
2055
2056         Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
2057         https://bugs.webkit.org/show_bug.cgi?id=142776
2058         <rdar://problem/18921338>
2059
2060         Reviewed by Alexey Proskuryakov.
2061
2062         Test: fast/animation/request-animation-frame-unparented-iframe-crash.html
2063
2064         In some cases (like the new test), we can end up trying to start
2065         requestAnimationFrame on a Document that has no Page. Most paths null-checked
2066         the Page and did the right thing, but one failed to do so. In addition,
2067         the current fallback (when Page is null) can result in us constructing
2068         the wrong kind of DisplayRefreshMonitor, which could lead to trouble
2069         down the road when it's reused. Instead, just completely avoid making a
2070         DisplayRefreshMonitor in the null-page case.
2071
2072         * dom/ScriptedAnimationController.cpp:
2073         (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
2074         If the page is null, bail.
2075
2076         * dom/ScriptedAnimationController.h:
2077         * platform/graphics/DisplayRefreshMonitor.cpp:
2078         (WebCore::DisplayRefreshMonitor::create):
2079         Use Optional<> to make it easy to distinguish between ChromeClient
2080         being unreachable (because we don't have a Page for some reason) and
2081         ChromeClient declaring that it doesn't want to override the type of
2082         DisplayRefreshMonitor that is created.
2083
2084         If ChromeClient was unreachable for some reason, we'll get back an engaged
2085         nullptr and return it (instead of creating a DisplayRefreshMonitor based
2086         on the platform). This avoids creating the wrong type of DisplayRefreshMonitor
2087         in the rare case where we can't reach the ChromeClient (e.g. a freshly unparented
2088         IFrame).
2089
2090         If instead the client returns a disengaged Nullopt, we'll interpret that as
2091         "construct the default type", which falls back on the platform #ifdefs to
2092         decide what to make.
2093
2094         * platform/graphics/DisplayRefreshMonitorManager.cpp:
2095         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
2096         (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
2097         Silently handle the case where we failed to make a DisplayRefreshMonitor.
2098
2099         * platform/graphics/DisplayRefreshMonitor.h:
2100         * platform/graphics/DisplayRefreshMonitorClient.h:
2101         * platform/graphics/GraphicsLayerUpdater.cpp:
2102         (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
2103         * platform/graphics/GraphicsLayerUpdater.h:
2104         * rendering/RenderLayerCompositor.cpp:
2105         (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
2106         * rendering/RenderLayerCompositor.h:
2107         Adjust to the new signature of createDisplayRefreshMonitor, and return
2108         an engaged (nullptr) Optional if we can't get to ChromeClient for any reason.
2109
2110         * page/ChromeClient.h:
2111         Return Nullopt (indicating a lack of override) by default.
2112
2113 2015-03-17  Dean Jackson  <dino@apple.com>
2114
2115         Implement Scroll Container Animation Triggers
2116         https://bugs.webkit.org/show_bug.cgi?id=142732
2117
2118         Attempt to fix the build.
2119
2120         * css/CSSComputedStyleDeclaration.cpp: Add an #if ENABLE guard.
2121
2122 2015-03-17  Dean Jackson  <dino@apple.com>
2123
2124         Implement Scroll Container Animation Triggers
2125         https://bugs.webkit.org/show_bug.cgi?id=142732
2126
2127         Reviewed by Simon Fraser.
2128
2129         Test: animations/trigger-container-scroll-simple.html
2130
2131         Basic implementation of container-scroll. It only checks
2132         the page scroll position for trigger values (not the scrolling
2133         container in an overflow).
2134
2135         * css/CSSComputedStyleDeclaration.cpp: Add CSSPropertyWebkitAnimationTrigger
2136         so that this property will appear in the inspector.
2137
2138         * page/FrameView.cpp:
2139         (WebCore::FrameView::sendScrollEvent): If the page has scrolled, let the animation
2140         controller know about it.
2141
2142         * page/animation/AnimationBase.cpp:
2143         (WebCore::AnimationBase::updateStateMachine): Whitespace fix.
2144         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): If there is a trigger,
2145         and the scroll position is past it, then tell the state machine that
2146         we should start.
2147         (WebCore::AnimationBase::timeToNextService): Use the scroll position as
2148         an input to the update timer if a trigger is involved.
2149
2150         * page/animation/AnimationController.cpp:
2151         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Add whitespace.
2152         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Call updateAnimations.
2153         (WebCore::AnimationController::scrollWasUpdated): Call into AnimationControllerPrivate.
2154         * page/animation/AnimationController.h:
2155         * page/animation/AnimationControllerPrivate.h:
2156
2157         * page/animation/CompositeAnimation.cpp: Keep a record of whether we have a scroll
2158         triggered animation.
2159         (WebCore::CompositeAnimation::CompositeAnimation):
2160         (WebCore::CompositeAnimation::updateKeyframeAnimations):
2161         * page/animation/CompositeAnimation.h:
2162         (WebCore::CompositeAnimation::hasScrollTriggeredAnimation):
2163         * platform/animation/Animation.cpp:
2164         (WebCore::Animation::operator=):
2165
2166 2015-03-17  Simon Fraser  <simon.fraser@apple.com>
2167
2168         Move some code from LogicalSelectionOffsetCaches into RenderElement
2169         https://bugs.webkit.org/show_bug.cgi?id=142758
2170
2171         Reviewed by Myles C. Maxfield.
2172
2173         LogicalSelectionOffsetCaches had some useful code regarding containing blocks etc
2174         that should be used in more places, so move it into RenderElement.
2175         
2176         No behavior change.
2177
2178         * rendering/LogicalSelectionOffsetCaches.h:
2179         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
2180         (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Deleted.
2181         (WebCore::isNonRenderBlockInline): Deleted.
2182         (WebCore::containingBlockForFixedPosition): Deleted.
2183         (WebCore::containingBlockForAbsolutePosition): Deleted.
2184         (WebCore::containingBlockForObjectInFlow): Deleted.
2185         * rendering/RenderBlock.cpp: No need to initialize static data.
2186         (WebCore::RenderBlock::positionedObjects): nullptr
2187         * rendering/RenderElement.cpp:
2188         (WebCore::RenderElement::containingBlockForFixedPosition):
2189         (WebCore::RenderElement::containingBlockForAbsolutePosition):
2190         (WebCore::isNonRenderBlockInline):
2191         (WebCore::RenderElement::containingBlockForObjectInFlow):
2192         * rendering/RenderElement.h:
2193         (WebCore::RenderElement::canContainAbsolutelyPositionedObjects):
2194         * rendering/RenderLayer.cpp:
2195         (WebCore::isContainerForPositioned):
2196         * rendering/RenderObject.cpp:
2197         (WebCore::RenderObject::containingBlock):
2198
2199 2015-03-17  Alex Christensen  <achristensen@webkit.org>
2200
2201         [WinCairo] Unreviewed build fix after r181640.
2202
2203         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2204         Tell Windows how to find ShaderLang.h.
2205
2206 2015-03-17  Chris Dumez  <cdumez@apple.com>
2207
2208         'pageLoaded' diagnostic logging is too verbose
2209         https://bugs.webkit.org/show_bug.cgi?id=142727
2210         <rdar://problem/18937048>
2211
2212         Reviewed by Eric Carlson.
2213
2214         Make 'pageLoaded' diagnostic logging less verbose:
2215         - Log once per main frame instead of once for subframe
2216         - Apply sampling
2217
2218         * loader/FrameLoader.cpp:
2219         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2220
2221 2015-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2222
2223         [GTK] Wrong transfer annotations used in GObject DOM bindings
2224         https://bugs.webkit.org/show_bug.cgi?id=142780
2225
2226         Reviewed by Gustavo Noronha Silva.
2227
2228         We are using transfer none for all methods returning a GObject DOM
2229         Object. That's not true. Only objects derived from Node are
2230         automatically released by the DOM object cache and can be transfer
2231         none. All other objects are added to the cache only to avoid
2232         creating the same wrapper twice for the same core object, but
2233         caller should release the returned reference.
2234
2235         * bindings/gobject/WebKitDOMCustomUnstable.h:
2236         * bindings/scripts/CodeGeneratorGObject.pm:
2237         (GetTransferTypeForReturnType):
2238         (GenerateFunction):
2239
2240 2015-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2241
2242         [GTK] WebKitDOM objects leaking
2243         https://bugs.webkit.org/show_bug.cgi?id=118788
2244
2245         Reviewed by Darin Adler and Sergio Villar Senin.
2246
2247         Use a DOMwindowObserver class, derived from DOMWindowProperty to
2248         be notified when the window object is detached from the frame to
2249         clear the DOM objects associated to that frame in that case too.
2250
2251         * bindings/gobject/DOMObjectCache.cpp:
2252
2253 2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
2254
2255         [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
2256         https://bugs.webkit.org/show_bug.cgi?id=142530
2257
2258         Reviewed by Darin Adler.
2259
2260         Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
2261         us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
2262         and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
2263         headers instead.
2264
2265         Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
2266         required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
2267         whole WebCore library anymore, only the ANGLESupport library.
2268
2269         * CMakeLists.txt:
2270         * platform/graphics/ANGLEWebKitBridge.h:
2271         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2272
2273 2015-03-17  Matt Baker  <mattbaker@apple.com>
2274
2275         Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
2276         https://bugs.webkit.org/show_bug.cgi?id=142029
2277
2278         Reviewed by Timothy Hatcher.
2279
2280         Add new functionality to the Inspector timelines backend to add runloop data to timeline recordings.
2281
2282         * inspector/InspectorTimelineAgent.cpp:
2283         (WebCore::currentRunLoop):
2284         (WebCore::InspectorTimelineAgent::internalStart):
2285         (WebCore::InspectorTimelineAgent::internalStop):
2286         (WebCore::toProtocol):
2287         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2288         Install observers for the begining and end of the runloop when recording begins. All other
2289         instrumented timeline events get added as children of the current runloop record, which is
2290         sent to the frontend once the runloop completes.
2291
2292         * inspector/InspectorTimelineAgent.h:
2293
2294         * platform/cf/RunLoopObserver.cpp:
2295         (WebCore::RunLoopObserver::schedule):
2296         Wrapper changed to allow observing arbitrary runloop activities.
2297
2298         * platform/cf/RunLoopObserver.h:
2299
2300 2015-03-17  Philippe Normand  <pnormand@igalia.com>
2301
2302         [GTK] basic OpenWebRTC build support
2303         https://bugs.webkit.org/show_bug.cgi?id=142393
2304
2305         Reviewed by Carlos Garcia Campos.
2306
2307         * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
2308
2309 2015-03-17  Joseph Pecoraro  <pecoraro@apple.com>
2310
2311         Remove never used "useLayerOnTop" bindings generator argument
2312         https://bugs.webkit.org/show_bug.cgi?id=142773
2313
2314         Reviewed by Darin Adler.
2315
2316         * bindings/scripts/CodeGenerator.pm:
2317         * bindings/scripts/CodeGeneratorJS.pm:
2318         * bindings/scripts/CodeGeneratorObjC.pm:
2319         * bindings/scripts/generate-bindings.pl:
2320
2321 2015-03-16  Ryosuke Niwa  <rniwa@webkit.org>
2322
2323         Enable ES6 classes by default
2324         https://bugs.webkit.org/show_bug.cgi?id=142774
2325
2326         Reviewed by Gavin Barraclough.
2327
2328         * Configurations/FeatureDefines.xcconfig:
2329
2330 2015-03-16  Simon Fraser  <simon.fraser@apple.com>
2331
2332         Update the debug overlays after layout
2333         https://bugs.webkit.org/show_bug.cgi?id=142768
2334
2335         Reviewed by Zalan Bujtas.
2336
2337         The debug overlays need to be updated after layout, in case elements with wheel event handlers
2338         moved around.
2339         
2340         DebugPageOverlays::didLayout() is cheap if there are no overlays.
2341         
2342         Call DebugPageOverlays::didLayout() for all frames, not just the main frame, since subframes can contribute
2343         to the main frame's event handler region.
2344
2345         * page/DebugPageOverlays.cpp:
2346         (WebCore::DebugPageOverlays::regionChanged):
2347         * page/DebugPageOverlays.h:
2348         (WebCore::DebugPageOverlays::didLayout):
2349         (WebCore::DebugPageOverlays::didChangeEventHandlers):
2350         * page/FrameView.cpp:
2351         (WebCore::FrameView::layout):
2352
2353 2015-03-16  Jon Lee  <jonlee@apple.com>
2354
2355         Unreviewed fix for crash after r181608.
2356
2357         * WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.
2358
2359 2015-03-16  Simon Fraser  <simon.fraser@apple.com>
2360
2361         Generalize the Document code that maintains a set of nodes with event handlers
2362         https://bugs.webkit.org/show_bug.cgi?id=142762
2363
2364         Reviewed by Zalan Bujtas, Darin Adler.
2365
2366         Document.h defines a TouchEventTargetSet type, which will in future be used for
2367         other event types too (wheel events), so rename it to EventTargetSet.
2368         
2369         Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
2370         to take a reference.
2371
2372         * dom/Document.cpp:
2373         (WebCore::Document::prepareForDestruction): References
2374         (WebCore::Document::didAddTouchEventHandler): Ditto.
2375         (WebCore::Document::didRemoveEventTargetNode): Ditto.
2376         * dom/Document.h:
2377         (WebCore::Document::touchEventTargets): No-one calls this; just remove the non
2378         #ideffed one.
2379         * html/HTMLInputElement.cpp:
2380         (WebCore::HTMLInputElement::~HTMLInputElement): Pass a ref.
2381         (WebCore::HTMLInputElement::didMoveToNewDocument): Pass a ref.
2382         * page/DOMWindow.cpp:
2383         (WebCore::DOMWindow::removeAllEventListeners): Pass a ref.
2384
2385 2015-03-16  Joseph Pecoraro  <pecoraro@apple.com>
2386
2387         Web Inspector: Object Previews in Indexed DB tables
2388         https://bugs.webkit.org/show_bug.cgi?id=140813
2389
2390         Reviewed by Timothy Hatcher.
2391
2392         * inspector/InspectorIndexedDBAgent.cpp:
2393         Include previews with object store objects.
2394
2395 2015-03-16  Jer Noble  <jer.noble@apple.com>
2396
2397         [Mac] Update missing image UI
2398         https://bugs.webkit.org/show_bug.cgi?id=142592
2399
2400         Reviewed by Darin Adler.
2401
2402         Update the broken image glyphs with new art (including a 3x image).
2403
2404         Test: fast/hidpi/broken-image-icon-very-hidpi.html
2405
2406         * Resources/missingImage.png:
2407         * Resources/missingImage@2x.png:
2408         * Resources/missingImage@3x.png: Added.
2409         * WebCore.xcodeproj/project.pbxproj:
2410         * loader/cache/CachedImage.cpp:
2411         (WebCore::CachedImage::brokenImage):
2412
2413 2015-03-16  Dean Jackson  <dino@apple.com>
2414
2415         Parsing and Style Resolution of Container-based Animation Triggers
2416         https://bugs.webkit.org/show_bug.cgi?id=142687
2417         <rdar://problem/20170007>
2418
2419         Reviewed by Simon Fraser.
2420
2421         Take 2 after the previous patch was rolled out.
2422
2423         This is the beginning of a prototype implementation of
2424         CSS Animation Triggers, as described by
2425         https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
2426
2427         In this patch we parse and resolve the value of a new
2428         CSS property "-webkit-animation-trigger". At the moment it
2429         only accepts one function value "container-scroll", which
2430         will trigger the animation at an absolute position within
2431         an element's scrolling container. We expect the syntax to
2432         change in the near future, as the spec is written.
2433
2434         Tests: animations/trigger-computed-style.html
2435                animations/trigger-parsing.html
2436
2437         * WebCore.xcodeproj/project.pbxproj: Add the new files.
2438
2439         * css/CSSAnimationTriggerScrollValue.cpp: Added.
2440         (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
2441         (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
2442         * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
2443         scroll trigger. This name may change in the future to better represent the
2444         type of trigger, but it is good enough for now.
2445         (WebCore::CSSAnimationTriggerScrollValue::create):
2446         (WebCore::CSSAnimationTriggerScrollValue::startValue):
2447         (WebCore::CSSAnimationTriggerScrollValue::endValue):
2448         (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
2449
2450         * css/CSSComputedStyleDeclaration.cpp:
2451         (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
2452         (WebCore::getAnimationTriggerValue): Gets the current computed style.
2453         (WebCore::ComputedStyleExtractor::propertyValue):
2454
2455         * css/CSSParser.cpp:
2456         (WebCore::CSSParser::parseValue):
2457         (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
2458         and record the value as a CSSAnimationTriggerScrollValue.
2459         (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
2460         * css/CSSParser.h:
2461
2462         * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
2463
2464         * css/CSSToStyleMap.cpp:
2465         (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
2466         an Animation object.
2467         * css/CSSToStyleMap.h:
2468
2469         * css/CSSValue.cpp: Handle the new CSSValue type.
2470         (WebCore::CSSValue::equals):
2471         (WebCore::CSSValue::cssText):
2472         (WebCore::CSSValue::destroy):
2473         * css/CSSValue.h:
2474         (WebCore::CSSValue::isAnimationTriggerScrollValue):
2475
2476         * platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
2477         and use them in the operator==.
2478         * platform/animation/Animation.h: Add AnimationTrigger as a new field.
2479         (WebCore::Animation::isTriggerSet):
2480         (WebCore::Animation::isEmpty):
2481
2482         * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
2483         "auto" and the scrolling trigger.
2484         (WebCore::AnimationTrigger::~AnimationTrigger):
2485         (WebCore::AnimationTrigger::type):
2486         (WebCore::AnimationTrigger::isAutoAnimationTrigger):
2487         (WebCore::AnimationTrigger::isScrollAnimationTrigger):
2488         (WebCore::AnimationTrigger::AnimationTrigger):
2489         (WebCore::AutoAnimationTrigger::create):
2490         (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
2491         (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
2492         (WebCore::ScrollAnimationTrigger::create):
2493         (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
2494         (WebCore::ScrollAnimationTrigger::startValue):
2495         (WebCore::ScrollAnimationTrigger::setStartValue):
2496         (WebCore::ScrollAnimationTrigger::endValue):
2497         (WebCore::ScrollAnimationTrigger::setEndValue):
2498         (WebCore::ScrollAnimationTrigger::hasEndValue):
2499         (WebCore::ScrollAnimationTrigger::setHasEndValue):
2500         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
2501
2502 2015-03-16  Alex Christensen  <achristensen@webkit.org>
2503
2504         Progress towards CMake on Mac
2505         https://bugs.webkit.org/show_bug.cgi?id=142747
2506
2507         Reviewed by Chris Dumez.
2508
2509         * CMakeLists.txt:
2510         * PlatformMac.cmake:
2511         Added more directories, interfaces, and forwarding headers.
2512         Temporarily disabled the generating of ObjC bindings in CMake builds.
2513         * platform/mac/PasteboardMac.mm:
2514         Removed unused include.
2515
2516 2015-03-16  Joanmarie Diggs  <jdiggs@igalia.com>
2517
2518         AX: Crash viewing http://www.last.fm/
2519         https://bugs.webkit.org/show_bug.cgi?id=142309
2520
2521         Reviewed by Chris Fleizach.
2522
2523         The crash occurs when a not-yet-rendered object emits a children-changed
2524         signal. If an assistive technology is listening, AT-SPI2 will attempt to
2525         create and cache the state set for the child being added and the creation
2526         of the state set assumes a rendered object.
2527
2528         Test: platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html
2529
2530         * accessibility/atk/AXObjectCacheAtk.cpp:
2531         (WebCore::AXObjectCache::attachWrapper):
2532
2533 2015-03-16  Commit Queue  <commit-queue@webkit.org>
2534
2535         Unreviewed, rolling out r181492.
2536         https://bugs.webkit.org/show_bug.cgi?id=142756
2537
2538         May have regressed PLT (Requested by anttik on #webkit).
2539
2540         Reverted changeset:
2541
2542         "Cache glyph widths to GlyphPages"
2543         https://bugs.webkit.org/show_bug.cgi?id=142028
2544         http://trac.webkit.org/changeset/181492
2545
2546 2015-03-16  Roger Fong  <roger_fong@apple.com>
2547
2548         [WebGL2] Instancing draw calls.
2549         https://bugs.webkit.org/show_bug.cgi?id=126939.
2550         <rdar://problem/15002379>
2551
2552         Reviewed by Dean Jackson.
2553
2554         Tested by a modified version of the 1.0.3 conformance tests:
2555         conformance/extensions/angle-instanced-arrays.html
2556         conformance/extensions/angle-instanced-arrays-out-of-bounds.html
2557
2558         These tests will be landed along with other modified extension conformance tests
2559         once approval from Khronos is received.
2560
2561         * html/canvas/WebGL2RenderingContext.cpp:
2562         (WebCore::WebGL2RenderingContext::clear): Generate error if clearing an integer color buffer.
2563         (WebCore::WebGL2RenderingContext::vertexAttribDivisor): Call method from base class.
2564         (WebCore::WebGL2RenderingContext::drawArraysInstanced): Ditto.
2565         (WebCore::WebGL2RenderingContext::drawElementsInstanced): Ditto.
2566         (WebCore::WebGL2RenderingContext::isIntegerFormat): Ditto.
2567         (WebCore::WebGL2RenderingContext::validateDrawElements): Deleted. Move back to base class.
2568         * html/canvas/WebGL2RenderingContext.h:
2569         * html/canvas/WebGL2RenderingContext.idl: Add a missing enum.
2570         * html/canvas/WebGLRenderingContext.cpp:
2571         (WebCore::WebGLRenderingContext::clear): Copied from WebGLRenderingContextBase.
2572         (WebCore::WebGLRenderingContext::validateDrawElements): Deleted. Move back to base class.
2573         * html/canvas/WebGLRenderingContext.h:
2574         * html/canvas/WebGLRenderingContextBase.cpp: 
2575         (WebCore::WebGLRenderingContextBase::clear): Deleted. Moved to WebGLRenderingContext.
2576         (WebCore::WebGLRenderingContextBase::getVertexAttrib): Check for WebGL2 context.
2577         (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
2578         * html/canvas/WebGLRenderingContextBase.h:
2579
2580 2015-03-16  Commit Queue  <commit-queue@webkit.org>
2581
2582         Unreviewed, rolling out r181572.
2583         https://bugs.webkit.org/show_bug.cgi?id=142755
2584
2585         Caused weird test failures in transitions and animations
2586         (Requested by dino on #webkit).
2587
2588         Reverted changeset:
2589
2590         "Parsing and Style Resolution of Container-based Animation
2591         Triggers"
2592         https://bugs.webkit.org/show_bug.cgi?id=142687
2593         http://trac.webkit.org/changeset/181572
2594
2595 2015-03-16  Yoav Weiss  <yoav@yoav.ws>
2596
2597         Remove setCachedImage from HTMLImageElement since it is not used
2598         https://bugs.webkit.org/show_bug.cgi?id=142740
2599
2600         Reviewed by Chris Dumez.
2601
2602         No new tests since this patch is just removing dead code.
2603
2604         HTMLImageElement::setCachedImage is not being called by anyone.
2605         This patch removes it, since it's dead code.
2606
2607         * html/HTMLImageElement.h:
2608         (WebCore::HTMLImageElement::setCachedImage): Deleted.
2609
2610 2015-03-16  Brent Fulgham  <bfulgham@apple.com>
2611
2612         WebKit1 Clients Are Not Reliably Repainted
2613         https://bugs.webkit.org/show_bug.cgi?id=142750
2614         <rdar://problem/20042453>
2615
2616         Reviewed by Simon Fraser.
2617
2618         * page/FrameView.cpp:
2619         (WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
2620         the early return so we can see when this happening in debug builds.
2621         * page/FrameView.h:
2622         (WebCore::FrameView::inPaintableState): Added.
2623
2624 2015-03-16  Chris Dumez  <cdumez@apple.com>
2625
2626         Make DatabaseContext suspendable if there is no pending database activity
2627         https://bugs.webkit.org/show_bug.cgi?id=142716
2628         <rdar://problem/19923085>
2629
2630         Reviewed by Andreas Kling.
2631
2632         Make DatabaseContext suspendable if there is no pending database
2633         activity, i.e:
2634         - No pending Database creation JS callback
2635         - No pending transaction(s)
2636
2637         Suspending is safe in this case because we are not going to interrupt
2638         any database activity, nor fire any JS event.
2639
2640         This greatly increases the likelihood of pages using websql to enter
2641         the PageCache.
2642
2643         Tests: fast/history/page-cache-webdatabase-no-transaction-db.html
2644                fast/history/page-cache-webdatabase-pending-transaction.html
2645
2646         * Modules/webdatabase/Database.cpp:
2647         (WebCore::Database::hasPendingTransaction):
2648         * Modules/webdatabase/Database.h:
2649         * Modules/webdatabase/DatabaseContext.cpp:
2650         (WebCore::DatabaseContext::canSuspend):
2651         * Modules/webdatabase/DatabaseManager.cpp:
2652         (WebCore::DatabaseManager::openDatabase):
2653         * Modules/webdatabase/DatabaseThread.cpp:
2654         (WebCore::DatabaseThread::hasPendingDatabaseActivity):
2655         * Modules/webdatabase/DatabaseThread.h:
2656
2657 2015-03-16  Brady Eidson  <beidson@apple.com>
2658
2659         Addressing additional review feedback after http://trac.webkit.org/changeset/181565
2660         https://bugs.webkit.org/show_bug.cgi?id=142733
2661
2662         Reviewed by Darin Adler.
2663
2664         * loader/icon/IconController.cpp:
2665         (WebCore::IconController::startLoader): Null check page()
2666
2667 2015-03-16  Roger Fong  <roger_fong@apple.com>
2668
2669         [Win] Unreviewed build fix attempt after r181571.
2670
2671         * WebCore.vcxproj/WebCore.vcxproj:
2672
2673 2015-03-16  Roger Fong  <roger_fong@apple.com>
2674
2675         [WebGL2] Multiple Render Targets.
2676         https://bugs.webkit.org/show_bug.cgi?id=126994.
2677         <rdar://problem/15815766>
2678
2679         Reviewed by Dean Jackson.
2680
2681         Tested by a modified version of the 1.0.3 conformance test:
2682         conformance/extensions/webgl-draw-buffers.html
2683         This test will be landed along with other modified extension conformance tests
2684         once approval from Khronos is received.
2685
2686         * html/canvas/WebGL2RenderingContext.cpp:
2687         (WebCore::WebGL2RenderingContext::drawBuffers): Mostly the same as WebGLDrawBuffers::drawBuffersWEBGL.
2688         Returns different error messages, uses non EXT enums.
2689         (WebCore::WebGL2RenderingContext::clearBufferiv): This actually does nothing for now but the validation has been implemented.
2690         (WebCore::WebGL2RenderingContext::clearBufferuiv): Ditto.
2691         (WebCore::WebGL2RenderingContext::clearBufferfv): Ditto.
2692         (WebCore::WebGL2RenderingContext::clearBufferfi): Ditto.
2693         (WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Removes the extension object check.
2694         (WebCore::WebGL2RenderingContext::getMaxDrawBuffers):
2695         (WebCore::WebGL2RenderingContext::getMaxColorAttachments): Must return the same thing as getMaxDrawBuffers.
2696         (WebCore::WebGL2RenderingContext::getParameter): Remove extension object checks.
2697         * html/canvas/WebGL2RenderingContext.h:
2698         * html/canvas/WebGLFramebuffer.cpp:
2699         (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
2700         * html/canvas/WebGLRenderingContext.cpp:
2701         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Copied from WebGLRenderingContextBase.
2702         (WebCore::WebGLRenderingContext::getMaxDrawBuffers): Ditto.
2703         (WebCore::WebGLRenderingContext::getMaxColorAttachments): Ditto.
2704         * html/canvas/WebGLRenderingContext.h:
2705         * html/canvas/WebGLRenderingContextBase.cpp:
2706         (WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters): Deleted.
2707         * html/canvas/WebGLRenderingContextBase.h:
2708
2709 2015-03-16  Dean Jackson  <dino@apple.com>
2710
2711         Parsing and Style Resolution of Container-based Animation Triggers
2712         https://bugs.webkit.org/show_bug.cgi?id=142687
2713         <rdar://problem/20170007>
2714
2715         Reviewed by Simon Fraser.
2716
2717         This is the beginning of a prototype implementation of
2718         CSS Animation Triggers, as described by
2719         https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
2720
2721         In this patch we parse and resolve the value of a new
2722         CSS property "-webkit-animation-trigger". At the moment it
2723         only accepts one function value "container-scroll", which
2724         will trigger the animation at an absolute position within
2725         an element's scrolling container. We expect the syntax to
2726         change in the near future, as the spec is written.
2727
2728         Tests: animations/trigger-computed-style.html
2729                animations/trigger-parsing.html
2730
2731         * WebCore.xcodeproj/project.pbxproj: Add the new files.
2732
2733         * css/CSSAnimationTriggerScrollValue.cpp: Added.
2734         (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
2735         (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
2736         * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
2737         scroll trigger. This name may change in the future to better represent the
2738         type of trigger, but it is good enough for now.
2739         (WebCore::CSSAnimationTriggerScrollValue::create):
2740         (WebCore::CSSAnimationTriggerScrollValue::startValue):
2741         (WebCore::CSSAnimationTriggerScrollValue::endValue):
2742         (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
2743
2744         * css/CSSComputedStyleDeclaration.cpp:
2745         (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
2746         (WebCore::getAnimationTriggerValue): Gets the current computed style.
2747         (WebCore::ComputedStyleExtractor::propertyValue):
2748
2749         * css/CSSParser.cpp:
2750         (WebCore::CSSParser::parseValue):
2751         (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
2752         and record the value as a CSSAnimationTriggerScrollValue.
2753         (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
2754         * css/CSSParser.h:
2755
2756         * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
2757
2758         * css/CSSToStyleMap.cpp:
2759         (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
2760         an Animation object.
2761         * css/CSSToStyleMap.h:
2762
2763         * css/CSSValue.cpp: Handle the new CSSValue type.
2764         (WebCore::CSSValue::equals):
2765         (WebCore::CSSValue::cssText):
2766         (WebCore::CSSValue::destroy):
2767         * css/CSSValue.h:
2768         (WebCore::CSSValue::isAnimationTriggerScrollValue):
2769
2770         * platform/animation/Animation.h: Add AnimationTrigger as a new field.
2771         (WebCore::Animation::isTriggerSet):
2772         (WebCore::Animation::isEmpty):
2773
2774         * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
2775         "auto" and the scrolling trigger.
2776         (WebCore::AnimationTrigger::~AnimationTrigger):
2777         (WebCore::AnimationTrigger::type):
2778         (WebCore::AnimationTrigger::isAutoAnimationTrigger):
2779         (WebCore::AnimationTrigger::isScrollAnimationTrigger):
2780         (WebCore::AnimationTrigger::AnimationTrigger):
2781         (WebCore::AutoAnimationTrigger::create):
2782         (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
2783         (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
2784         (WebCore::ScrollAnimationTrigger::create):
2785         (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
2786         (WebCore::ScrollAnimationTrigger::startValue):
2787         (WebCore::ScrollAnimationTrigger::setStartValue):
2788         (WebCore::ScrollAnimationTrigger::endValue):
2789         (WebCore::ScrollAnimationTrigger::setEndValue):
2790         (WebCore::ScrollAnimationTrigger::hasEndValue):
2791         (WebCore::ScrollAnimationTrigger::setHasEndValue):
2792         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
2793
2794 2015-03-15  Roger Fong  <roger_fong@apple.com>
2795
2796         [WebGL2] Vertex Array Objects.
2797         https://bugs.webkit.org/show_bug.cgi?id=126944.
2798         <rdar://problem/15002455>
2799
2800         Reviewed by Dean Jackson.
2801
2802         Tested by a modified version of the 1.0.3 conformance test:
2803         conformance/extensions/oes-vertex-array-object.html
2804         This test will be landed along with other modified extension conformance tests
2805         once approval from Khronos is received.
2806
2807         * html/canvas/OESVertexArrayObject.cpp: Associate extension calls only with WebGLRenderingContext.
2808         (WebCore::OESVertexArrayObject::deleteVertexArrayOES):
2809         (WebCore::OESVertexArrayObject::bindVertexArrayOES):
2810         * html/canvas/WebGLRenderingContext.cpp:
2811         (WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
2812         (WebCore::WebGLRenderingContext::getParameter):
2813         * html/canvas/WebGL2RenderingContext.cpp: Implement vertex array object calls as part WebGL2 context.
2814         (WebCore::WebGL2RenderingContext::createVertexArray):
2815         (WebCore::WebGL2RenderingContext::deleteVertexArray):
2816         (WebCore::WebGL2RenderingContext::isVertexArray):
2817         (WebCore::WebGL2RenderingContext::bindVertexArray):
2818         (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
2819         (WebCore::WebGL2RenderingContext::getParameter):
2820
2821         Duplicate extension object vertex array object extension methods in GraphicsContext3D.
2822         Implementation may change after we upgrade to newer GL headers and profile.
2823         * platform/graphics/GraphicsContext3D.h:
2824         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2825         (WebCore::GraphicsContext3D::createVertexArray):
2826         (WebCore::GraphicsContext3D::deleteVertexArray):
2827         (WebCore::GraphicsContext3D::isVertexArray):
2828         (WebCore::GraphicsContext3D::bindVertexArray):
2829
2830         Have WebGLVertexArrayObjectOES and WebGLVertexArrayObject inherit from WebGLRenderingContextBase.
2831         * CMakeLists.txt:
2832         * WebCore.xcodeproj/project.pbxproj:
2833         * html/canvas/WebGLVertexArrayObject.cpp:
2834         (WebCore::WebGLVertexArrayObject::create):
2835         (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): Use GraphicsContext3D implementation of createVertexArray.
2836         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
2837         * html/canvas/WebGLVertexArrayObject.h:
2838         * html/canvas/WebGLVertexArrayObjectBase.cpp: Added.
2839         (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):
2840         (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer):
2841         (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):
2842         (WebCore::WebGLVertexArrayObjectBase::unbindBuffer):
2843         (WebCore::WebGLVertexArrayObjectBase::setVertexAttribDivisor):
2844         * html/canvas/WebGLVertexArrayObjectBase.h: Added.
2845         (WebCore::WebGLVertexArrayObjectBase::~WebGLVertexArrayObjectBase):
2846         (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::VertexAttribState):
2847         (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::isBound):
2848         (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::validateBinding):
2849         (WebCore::WebGLVertexArrayObjectBase::isDefaultObject):
2850         (WebCore::WebGLVertexArrayObjectBase::hasEverBeenBound):
2851         (WebCore::WebGLVertexArrayObjectBase::setHasEverBeenBound):
2852         (WebCore::WebGLVertexArrayObjectBase::getElementArrayBuffer):
2853         (WebCore::WebGLVertexArrayObjectBase::getVertexAttribState):
2854         * html/canvas/WebGLVertexArrayObjectOES.cpp:
2855         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
2856         (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
2857         (WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer): Deleted.
2858         (WebCore::WebGLVertexArrayObjectOES::setVertexAttribState): Deleted.
2859         (WebCore::WebGLVertexArrayObjectOES::unbindBuffer): Deleted.
2860         (WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Deleted.
2861         * html/canvas/WebGLVertexArrayObjectOES.h:
2862
2863         * html/canvas/WebGLRenderingContextBase.cpp: Use WebGLVertexArrayObjectBase class.
2864         (WebCore::WebGLRenderingContextBase::initializeNewContext):
2865         (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
2866         (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
2867         (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
2868         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
2869         (WebCore::WebGLRenderingContextBase::initVertexAttrib0):
2870         (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
2871         (WebCore::WebGLRenderingContextBase::restoreStatesAfterVertexAttrib0Simulation):
2872         * html/canvas/WebGLRenderingContextBase.h:
2873         (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject):
2874
2875         Handle construction of WebGLGetInfo using WebGLVertexArrayObject.
2876         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
2877         (WebCore::toJS):
2878         * html/canvas/WebGLGetInfo.cpp:
2879         (WebCore::WebGLGetInfo::WebGLGetInfo):
2880         (WebCore::WebGLGetInfo::getWebGLVertexArrayObjectOES):
2881         (WebCore::WebGLGetInfo::getWebGLVertexArrayObject):
2882         * html/canvas/WebGLGetInfo.h:
2883
2884 2015-03-16  Brent Fulgham  <bfulgham@apple.com>
2885
2886         Potentially uninitialized Inspector values
2887         https://bugs.webkit.org/show_bug.cgi?id=142730
2888
2889         Reviewed by Joseph Pecoraro.
2890
2891         * inspector/InspectorDOMAgent.cpp:
2892         (WebCore::parseColor): Make sure color values are given an initial value.
2893
2894 2015-03-16  Brady Eidson  <beidson@apple.com>
2895
2896         URLs visited during private browsing show up in WebpageIcons.db
2897         rdar://problem/11254910 and https://bugs.webkit.org/show_bug.cgi?id=142733
2898
2899         Patch by Sam Weinig. Reviewed by Brady Eidson.
2900
2901         * loader/icon/IconController.cpp:
2902         (WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
2903         (WebCore::IconController::continueLoadWithDecision): Instead of here.
2904
2905 2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
2906
2907         Allow clients to selectively disable plug-ins
2908         https://bugs.webkit.org/show_bug.cgi?id=142506
2909
2910         Reviewed by Anders Carlsson.
2911
2912         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
2913         from the page). As part of this:
2914
2915         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
2916            set of plug-ins.
2917
2918         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
2919            down the stack.
2920
2921         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
2922            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
2923
2924         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
2925
2926         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
2927         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
2928
2929         * dom/DOMImplementation.cpp:
2930         (WebCore::DOMImplementation::createDocument):
2931         Update to reflect function rename.
2932
2933         * loader/SubframeLoader.cpp:
2934         (WebCore::findPluginMIMETypeFromURL):
2935         Adopt getWebVisibleMimesAndPluginIndices().
2936         (WebCore::logPluginRequest):
2937         Update to reflect function rename.
2938         (WebCore::SubframeLoader::shouldUsePlugin):
2939         Ditto.
2940
2941         * platform/PlatformStrategies.h:
2942         Export platformStrategies(), since it is now used in WebProcess.cpp.
2943
2944         * plugins/DOMMimeType.cpp:
2945         (WebCore::DOMMimeType::type):
2946         (WebCore::DOMMimeType::description):
2947         (WebCore::DOMMimeType::mimeClassInfo):
2948         Adopt getWebVisibleMimesAndPluginIndices().
2949         (WebCore::DOMMimeType::enabledPlugin):
2950         Ditto.
2951
2952         * plugins/DOMMimeType.h:
2953         Don't return references in a few places where it is no longer safe to do so.
2954         (WebCore::DOMMimeType::mimeClassInfo): Deleted.
2955
2956         * plugins/DOMMimeTypeArray.cpp:
2957         (WebCore::DOMMimeTypeArray::length):
2958         Adopt getWebVisibleMimesAndPluginIndices().
2959         (WebCore::DOMMimeTypeArray::item):
2960         Ditto.
2961         (WebCore::DOMMimeTypeArray::canGetItemsForName):
2962         Ditto.
2963         (WebCore::DOMMimeTypeArray::namedItem):
2964         Ditto.
2965
2966         * plugins/DOMPlugin.cpp:
2967         (WebCore::DOMPlugin::pluginInfo):
2968         Adopt getWebVisiblePlugins().
2969         (WebCore::DOMPlugin::item):
2970         Adopt getWebVisibleMimesAndPluginIndices().
2971         (WebCore::DOMPlugin::canGetItemsForName):
2972         Ditto.
2973         (WebCore::DOMPlugin::namedItem):
2974         Ditto.
2975
2976         * plugins/DOMPlugin.h:
2977         (WebCore::DOMPlugin::pluginInfo): Deleted.
2978
2979         * plugins/DOMPluginArray.cpp:
2980         (WebCore::DOMPluginArray::length):
2981         Adopt getWebVisiblePlugins().
2982         (WebCore::DOMPluginArray::item):
2983         Ditto.
2984         (WebCore::DOMPluginArray::canGetItemsForName):
2985         Ditto.
2986         (WebCore::DOMPluginArray::namedItem):
2987         Ditto.
2988
2989         * plugins/PluginData.cpp:
2990         (WebCore::PluginData::PluginData):
2991         Stash the passed-in Page and call initPlugins().
2992         (WebCore::PluginData::getWebVisiblePlugins):
2993         New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
2994         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
2995         New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
2996         limited to the web-visible plug-ins.
2997         (WebCore::PluginData::supportsWebVisibleMimeType):
2998         Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
2999         (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
3000         Renamed from pluginInfoForMimeType(); ditto.
3001         (WebCore::PluginData::pluginNameForWebVisibleMimeType):
3002         Renamed from pluginNameForMimeType(); ditto.
3003         (WebCore::PluginData::pluginFileForWebVisibleMimeType):
3004         Renamed from pluginFileForMimeType(); ditto.
3005         (WebCore::PluginData::initPlugins):
3006         (WebCore::PluginData::supportsMimeType): Deleted.
3007         (WebCore::PluginData::pluginInfoForMimeType): Deleted.
3008         (WebCore::PluginData::pluginNameForMimeType): Deleted.
3009         (WebCore::PluginData::pluginFileForMimeType): Deleted.
3010
3011         * plugins/PluginData.h:
3012         Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
3013         new members to PluginInfo for the clientLoadPolicy and bundle information.
3014         (WebCore::PluginData::PluginData):
3015         Replace some member functions with new ones that will hide plug-ins upon request from the client;
3016         (WebCore::PluginData::mimes): Deleted.
3017         (WebCore::PluginData::mimePluginIndices): Deleted.
3018
3019         * plugins/PluginStrategy.h:
3020         Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
3021
3022         * replay/SerializationMethods.cpp:
3023         (JSC::EncodingTraits<PluginData>::encodeValue):
3024         Remove now-obsolete code for handling MIME types and add a FIXME.
3025         (JSC::DeserializedPluginData::DeserializedPluginData):
3026         (JSC::EncodingTraits<PluginData>::decodeValue):
3027         Ditto.
3028         (JSC::EncodingTraits<PluginInfo>::encodeValue):
3029         Handle the new members in PluginInfo.
3030         (JSC::EncodingTraits<PluginInfo>::decodeValue):
3031         Ditto.
3032
3033         * replay/WebInputs.json:
3034         Teach Replay about PluginLoadClientPolicy.
3035
3036 2015-03-16  Max Stepin  <maxstepin@gmail.com>
3037
3038         Add APNG support
3039         https://bugs.webkit.org/show_bug.cgi?id=17022
3040
3041         Reviewed by Carlos Garcia Campos.
3042
3043         Test: fast/images/animated-png.html
3044
3045         * platform/image-decoders/ImageDecoder.h:
3046         (WebCore::ImageFrame::divide255):
3047         (WebCore::ImageFrame::overRGBA):
3048         * platform/image-decoders/png/PNGImageDecoder.cpp:
3049         (WebCore::frameHeader):
3050         (WebCore::readChunks):
3051         (WebCore::PNGImageReader::PNGImageReader):
3052         (WebCore::PNGImageDecoder::PNGImageDecoder):
3053         (WebCore::PNGImageDecoder::frameBufferAtIndex):
3054         (WebCore::PNGImageDecoder::headerAvailable):
3055         (WebCore::PNGImageDecoder::rowAvailable):
3056         (WebCore::PNGImageDecoder::pngComplete):
3057         (WebCore::PNGImageDecoder::readChunks):
3058         (WebCore::PNGImageDecoder::frameHeader):
3059         (WebCore::PNGImageDecoder::init):
3060         (WebCore::PNGImageDecoder::clearFrameBufferCache):
3061         (WebCore::PNGImageDecoder::initFrameBuffer):
3062         (WebCore::PNGImageDecoder::frameComplete):
3063         (WebCore::PNGImageDecoder::processingStart):
3064         (WebCore::PNGImageDecoder::processingFinish):
3065         (WebCore::PNGImageDecoder::fallbackNotAnimated):
3066         * platform/image-decoders/png/PNGImageDecoder.h:
3067         (WebCore::PNGImageDecoder::frameCount):
3068         (WebCore::PNGImageDecoder::repetitionCount):
3069         (WebCore::PNGImageDecoder::isComplete):
3070
3071 2015-03-15  Benjamin Poulain  <benjamin@webkit.org>
3072
3073         CSS: fix the case-insensitive matching of the attribute selectors Begin, End and Hyphen
3074         https://bugs.webkit.org/show_bug.cgi?id=142715
3075
3076         Reviewed by Brent Fulgham.
3077
3078         Fix attribute matching with:
3079         -Begin: [a^=b].
3080         -End: [a$=b].
3081         -Hyphen: [a|=b].
3082
3083         Tests: fast/selectors/attribute-endswith-value-matching-is-ascii-case-insensitive.html
3084                fast/selectors/attribute-hyphen-value-matching-is-ascii-case-insensitive.html
3085                fast/selectors/attribute-startswith-value-matching-is-ascii-case-insensitive.html
3086
3087         * css/SelectorChecker.cpp:
3088         (WebCore::attributeValueMatches):
3089         I forgot to change CSSSelector::Exact in my last patch.
3090         The tests could not catch that since we use the CSS JIT almost everywhere.
3091
3092         * cssjit/SelectorCompiler.cpp:
3093         (WebCore::SelectorCompiler::attributeValueBeginsWith):
3094         (WebCore::SelectorCompiler::attributeValueEndsWith):
3095         (WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
3096
3097 2015-03-15  Dan Bernstein  <mitz@apple.com>
3098
3099         Fixed the iOS build after r181522.
3100
3101         * page/FrameView.cpp:
3102         (WebCore::FrameView::performPostLayoutTasks):
3103
3104 2015-03-15  Andy Estes  <aestes@apple.com>
3105
3106         [Content Filtering] Adopt new NEFilterSource SPI
3107         https://bugs.webkit.org/show_bug.cgi?id=142710
3108         rdar://problem/19023855
3109
3110         Reviewed by Dan Bernstein.
3111
3112         Teach NetworkExtensionContentFilter to use a new, alternate NEFilterSource SPI on platforms where it is available.
3113
3114         * platform/ContentFilter.cpp:
3115         (WebCore::ContentFilter::types): Renamed HAVE(NE_FILTER_SOURCE) to HAVE(NETWORK_EXTENSION).
3116         * platform/cocoa/NetworkExtensionContentFilter.h: Renamed member variables to remove redundancy, forward-declared NEFilterSourceStatus,
3117         added a dispatch_semaphore member variable to avoid creating and destroying multiple semaphores, and made m_originalData a SharedBuffer.
3118         * platform/cocoa/NetworkExtensionContentFilter.mm:
3119         (decisionInfoReplacementData): Returned the replacement data from a decision handler info dictionary.
3120         (WebCore::createNEFilterSource): Created either an old-style or new-style NEFilterSource object.
3121         (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Called receivedResponse:decisionHandler: when using the new SPI.
3122         (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Released the dispatch_semaphore.
3123         (WebCore::NetworkExtensionContentFilter::addData): Appended the copied NSData to m_originalData, avoiding an additional copy previously
3124         being made by NSMutableData. Used the new receivedData:decisionHandler: SPI when appropriate.
3125         (WebCore::NetworkExtensionContentFilter::finishedAddingData): Used the new finishedLoadingWithDecisionHandler: SPI when appropriate.
3126         (WebCore::NetworkExtensionContentFilter::needsMoreData): Changed m_neFilterSourceStatus to m_status.
3127         (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
3128         (WebCore::NetworkExtensionContentFilter::getReplacementData): Returned the replacement data from NEFilterSource if the load was blocked.
3129         Otherwise, returned the original data.
3130         (WebCore::NetworkExtensionContentFilter::handleDecision): Added a helper to set m_status and m_replacementData, and to signal m_semaphore.
3131         * platform/spi/cocoa/NEFilterSourceSPI.h: Declared the new NEFilterSource SPI on platforms that support it.
3132
3133 2015-03-15  Brent Fulgham  <bfulgham@apple.com>
3134
3135         Scroll snap points are not supported on iframe content
3136         https://bugs.webkit.org/show_bug.cgi?id=142582
3137         <rdar://problem/20121319>
3138
3139         Tested by css3/scroll-snap/scroll-snap-iframe.html
3140
3141         Reviewed by Simon Fraser.
3142
3143         The scroll snap points were not being applied to the iframe contents because the code
3144         that sets up the scroll snap point content is not called for iframes.
3145
3146         To correct this, we need to make sure the snap offsets are set during post-frame layout
3147         for iframes. We also need to make sure (on Mac) that the scroll animator and timers are updated.
3148
3149         * page/FrameView.cpp:
3150         (WebCore::FrameView::performPostLayoutTasks): Call 'updateSnapOffsets' if the frame is not a
3151         MainFrame. Also notify scroll animators they need to update their snap point settings.
3152
3153 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
3154
3155         Add the same is<RenderBox> test to KeyframeAnimation::computeExtentOfTransformAnimation()
3156         that ImplicitAnimation::computeExtentOfTransformAnimation() has, and change the latter
3157         to the more canonical is<RenderBox>() form.
3158         
3159         Fixes an assertion in animations/animation-on-inline-crash.html
3160
3161         * page/animation/ImplicitAnimation.cpp:
3162         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
3163         * page/animation/KeyframeAnimation.cpp:
3164         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
3165
3166 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
3167
3168         And another fix. Thanks to Hunseop Jeong for the fix.
3169
3170         * html/HTMLInputElement.cpp:
3171         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
3172         (WebCore::HTMLInputElement::didMoveToNewDocument):
3173
3174 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
3175
3176         Fix the touch-event build.
3177
3178         * dom/Document.cpp:
3179         (WebCore::Document::didAddTouchEventHandler):
3180         (WebCore::Document::didRemoveTouchEventHandler):
3181
3182 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
3183
3184         Reduce the side-effects of animations turning off overlap testing
3185         https://bugs.webkit.org/show_bug.cgi?id=92791
3186
3187         Reviewed by Dean Jackson.
3188         
3189         When a layer is running a transition or animation of the transform property,
3190         we would simply disable overlap testing for later layers, which had the side-effect
3191         of promoting lots of unrelated elements into layers temporarily.
3192         
3193         Fix by maintaining overlap, but computing an overlap extent that takes the animation
3194         into account.
3195         
3196         Rotations are currently treated as full rotations. If an extent for the overlap is
3197         hard to compute (e.g. 3d transforms, or matrix animations with a rotation component),
3198         then we fall back to the current behavior.
3199
3200         Tests: compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html
3201                compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html
3202                compositing/layer-creation/mismatched-transform-transition-overlap.html
3203                compositing/layer-creation/multiple-keyframes-animation-overlap.html
3204                compositing/layer-creation/scale-rotation-animation-overlap.html
3205                compositing/layer-creation/scale-rotation-transition-overlap.html
3206                compositing/layer-creation/translate-animation-overlap.html
3207                compositing/layer-creation/translate-scale-animation-overlap.html
3208                compositing/layer-creation/translate-scale-transition-overlap.html
3209                compositing/layer-creation/translate-transition-overlap.html
3210
3211         * page/animation/AnimationBase.cpp:
3212         (WebCore::containsRotation):
3213         (WebCore::AnimationBase::computeTransformedExtentViaTransformList): When we have matched
3214         transform lists, we can map a rectangle through the various operations. Transform-origin
3215         is used to shift the origin of the box first, and then unshift after. If we encounter
3216         a rotation, for now assume it's a full rotation (a future patch could tighten this up).
3217         (WebCore::AnimationBase::computeTransformedExtentViaMatrix): If we're using matrix
3218         interpolation, we have to decompose the matrix to see if there's any rotation component,
3219         and, if there is, fall back to current behavior.
3220         * page/animation/AnimationBase.h:
3221         * page/animation/AnimationController.cpp:
3222         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
3223         (WebCore::AnimationController::computeExtentOfAnimation):
3224         * page/animation/AnimationController.h:
3225         * page/animation/AnimationControllerPrivate.h:
3226         * page/animation/CompositeAnimation.cpp:
3227         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation): Ask active keyframe
3228         animations and transitions to compute the bounds extent.
3229         * page/animation/CompositeAnimation.h:
3230         * page/animation/ImplicitAnimation.cpp:
3231         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation): Compute the extent
3232         of the start and end transforms, and union them.
3233         * page/animation/ImplicitAnimation.h:
3234         * page/animation/KeyframeAnimation.cpp:
3235         (WebCore::KeyframeAnimation::animate):
3236         (WebCore::KeyframeAnimation::getAnimatedStyle): Some nullptr goodness.
3237         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation): Compute an extent
3238         for each keyframe, and take their union.
3239         * page/animation/KeyframeAnimation.h:
3240         * platform/graphics/GeometryUtilities.cpp:
3241         (WebCore::euclidianDistance): Use Pythagoras to compute a distance.
3242         (WebCore::boundsOfRotatingRect): Given a rect whose location is relative
3243         to the rotation origin, compute a bounds for the rotated rect by computing
3244         the furthest corner from the origin, and sweeping out a circle.
3245         * platform/graphics/GeometryUtilities.h:
3246         * platform/graphics/transforms/Matrix3DTransformOperation.h:
3247         * platform/graphics/transforms/MatrixTransformOperation.h:
3248         * platform/graphics/transforms/PerspectiveTransformOperation.h:
3249         * platform/graphics/transforms/RotateTransformOperation.h:
3250         * platform/graphics/transforms/ScaleTransformOperation.h:
3251         * platform/graphics/transforms/SkewTransformOperation.h:
3252         * platform/graphics/transforms/TransformOperation.h:
3253         (WebCore::TransformOperation::isAffectedByTransformOrigin):
3254         * platform/graphics/transforms/TransformOperations.cpp:
3255         (WebCore::TransformOperations::affectedByTransformOrigin): Ask all the operations if
3256         they are affected by transform-origin.
3257         (WebCore::TransformOperations::blendByMatchingOperations): nullptr.
3258         * platform/graphics/transforms/TransformOperations.h:
3259         * rendering/RenderBox.cpp:
3260         (WebCore::RenderBox::pushMappingToContainer): Comment fix. Only take transforms into account
3261         if the geometry map says so (which is most of the time).
3262         * rendering/RenderGeometryMap.cpp:
3263         (WebCore::RenderGeometryMap::mapToContainer): RenderLayerCompositor is now using the
3264         geometry map in a way that is incompatible with this assertion; it deliberately ignores
3265         transforms sometimes, so we can't easily verify that the mapping matches mapping through
3266         renderers.
3267         (WebCore::RenderGeometryMap::pushMappingsToAncestor): Save and restore the UseTransforms
3268         bit.
3269         * rendering/RenderGeometryMap.h:
3270         * rendering/RenderLayer.cpp:
3271         (WebCore::RenderLayer::boundingBox): Whitespace.
3272         (WebCore::RenderLayer::getOverlapBoundsIncludingChildrenAccountingForTransformAnimations): Helper
3273         function to get the bounds of a layer, including descendants, when a transform animation is running.
3274         * rendering/RenderLayer.h:
3275         * rendering/RenderLayerCompositor.cpp:
3276         (WebCore::RenderLayerCompositor::CompositingState::CompositingState): Add a ancestorHasTransformAnimation
3277         flag to detect nested animated transforms.
3278         (WebCore::RenderLayerCompositor::OverlapExtent::knownToBeHaveExtentUncertainty): This returns true when
3279         the layer is animating transform, and the transition/animation is such that we can't easily compute the
3280         bounds of the animation.
3281         (WebCore::RenderLayerCompositor::computeExtent): const RenderLayer&.
3282         Compute the animated bounds if there's a transform animation running.
3283         (WebCore::RenderLayerCompositor::addToOverlapMap): const RenderLayer&
3284         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): const RenderLayer&
3285         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3286         Delay the call to pushMappingsToAncestor() until knowing if there's a transform animation running, and
3287         if there is, push the mapping while ignoring transforms (since the transform is implicitly taken into account
3288         for overlap via the computed animated bounds).
3289         If this layer is running a transform animation, set the childState.ancestorHasTransformAnimation flag so
3290         that descendants will know (nested transform animations fall back to current behavior).
3291         The if (.... && isRunningAcceleratedTransformAnimation()) is what previously caused us to turn off overlap
3292         testing in the face of animations. That now only happens if we were unable to easily compute the animation bounds.
3293         (WebCore::RenderLayerCompositor::isRunningTransformAnimation): This previously tested whether an accelerated animation
3294         was running, but that's timing sensitive; AnimationController can start the transform animation, but it's not yet
3295         considered accelerated until we get an async callback from GraphicsLayer, yet this code needed to know if the
3296         animation was running.
3297         Since transform animations are always accelerated, we can just test for a running transform animation.
3298         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation): Deleted.
3299         * rendering/RenderLayerCompositor.h:
3300         * rendering/style/RenderStyle.cpp:
3301         (WebCore::requireTransformOrigin): Some FIXME comments.
3302
3303 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
3304
3305         Clean up related to wheelEvent names
3306         https://bugs.webkit.org/show_bug.cgi?id=142713
3307
3308         Reviewed by Anders Carlsson.
3309
3310         Add EventNames::isWheelEventType() and use it in places that test for the
3311         two wheel event names.
3312
3313         * dom/Document.cpp:
3314         (WebCore::Document::didAddWheelEventHandler):
3315         (WebCore::Document::didRemoveWheelEventHandler):
3316         * dom/Document.h: No need for exports (I grepped). Pass the Node*, which
3317         will be used in a later patch.
3318         * dom/EventNames.h:
3319         (WebCore::EventNames::isWheelEventType):
3320         * dom/Node.cpp:
3321         (WebCore::Node::didMoveToNewDocument):
3322         (WebCore::tryAddEventListener):
3323         (WebCore::tryRemoveEventListener):
3324         (WebCore::Node::defaultEventHandler):
3325         * html/shadow/MediaControlsApple.cpp:
3326         (WebCore::MediaControlsAppleEventListener::handleEvent):
3327         * page/DOMWindow.cpp:
3328         (WebCore::DOMWindow::addEventListener):
3329         (WebCore::DOMWindow::removeEventListener):
3330         * page/ios/FrameIOS.mm:
3331         (WebCore::ancestorRespondingToScrollWheelEvents): Remove dead code.
3332
3333 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
3334
3335         Remove a redundant repaint when a layer becomes composited
3336         https://bugs.webkit.org/show_bug.cgi?id=142711
3337
3338         Reviewed by Anders Carlsson.
3339
3340         RenderLayerCompositor::computeCompositingRequirements() doesn't need to call
3341         repaintOnCompositingChange() when a layer is going to become composited,
3342         because updateBacking() does exactly the same thing. I used an assertion
3343         and ran the tests to ensure this wasn't a behavior change.
3344
3345         * rendering/RenderLayerCompositor.cpp:
3346         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3347
3348 2015-03-15  Benjamin Poulain  <bpoulain@apple.com>
3349
3350         Change the exact attribute matching to be ASCII case-insensitive
3351         https://bugs.webkit.org/show_bug.cgi?id=142609
3352
3353         Reviewed by Darin Adler.
3354
3355         In CSS, testing attribute values should be ASCII case-insensitive,
3356         previously we were using full unicode case conversion.
3357
3358         Test: fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive.html
3359
3360         * css/CSSParser.cpp:
3361         (WebCore::CSSParser::parseKeyframeSelector):
3362         The CSS parser has its own fast version for ASCII case insensitive.
3363         This code was using the general equalIgnoringASCIICase() which was causing name conflicts,
3364         change that to the normal CSS parser version.
3365
3366         * css/SelectorCheckerTestFunctions.h:
3367         (WebCore::equalIgnoringASCIICase): Deleted.
3368         * cssjit/SelectorCompiler.cpp:
3369         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
3370
3371 2015-03-15  Brent Fulgham  <bfulgham@apple.com>
3372
3373         scroll snap points do not properly account for zoomed pages
3374         https://bugs.webkit.org/show_bug.cgi?id=142706
3375         <rdar://problem/20165771>
3376
3377         Reviewed by Anders Carlsson.
3378
3379         When a WebView is zoomed (such that it has a non-unity pageScaleFactor), we need to account for this
3380         scaling value when selecting our correct scroll snap point target, as well as when specifying the
3381         pixel location for our animation to target.
3382
3383         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3384         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3385         (WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor): Added new delegate method.
3386         * platform/cocoa/ScrollController.h:
3387         (WebCore::ScrollControllerClient::pageScaleFactor): Added new default delegate.
3388         * platform/cocoa/ScrollController.mm:
3389         (WebCore::ScrollController::beginScrollSnapAnimation): Calculate the correct scroll target
3390         based on the page scale factor.
3391
3392 2015-03-15  Csaba Osztrogonác  <ossy@webkit.org>
3393
3394         Fix run-bindings-tests on the WinCairo bot
3395         https://bugs.webkit.org/show_bug.cgi?id=142588
3396
3397         Reviewed by Alex Christensen.
3398
3399         * bindings/scripts/test/JS/JSFloat64Array.cpp: Added property svn:eol-style.
3400         * bindings/scripts/test/JS/JSFloat64Array.h: Added property svn:eol-style.
3401         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Added property svn:eol-style.
3402         * bindings/scripts/test/JS/JSTestActiveDOMObject.h: Modified property svn:eol-style.
3403         * bindings/scripts/test/JS/JSTestCallback.cpp: Modified property svn:eol-style.
3404         * bindings/scripts/test/JS/JSTestCallback.h: Modified property svn:eol-style.
3405         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Added property svn:eol-style.
3406         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: Modified property svn:eol-style.
3407         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Added property svn:eol-style.
3408         * bindings/scripts/test/JS/JSTestEventConstructor.h: Added property svn:eol-style.
3409         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Added property svn:eol-style.
3410         * bindings/scripts/test/JS/JSTestEventTarget.h: Modified property svn:eol-style.
3411         * bindings/scripts/test/JS/JSTestException.cpp: Added property svn:eol-style.
3412         * bindings/scripts/test/JS/JSTestException.h: Added property svn:eol-style.
3413         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added property svn:eol-style.
3414         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added property svn:eol-style.
3415         * bindings/scripts/test/JS/JSTestImplements.cpp: Added property svn:eol-style.
3416         * bindings/scripts/test/JS/JSTestImplements.h: Added property svn:eol-style.
3417         * bindings/scripts/test/JS/JSTestInterface.cpp: Modified property svn:eol-style.
3418         * bindings/scripts/test/JS/JSTestInterface.h: Modified property svn:eol-style.
3419         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Modified property svn:eol-style.
3420         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: Modified property svn:eol-style.
3421         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Added property svn:eol-style.
3422         * bindings/scripts/test/JS/JSTestNamedConstructor.h: Added property svn:eol-style.
3423         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Added property svn:eol-style.
3424         * bindings/scripts/test/JS/JSTestNondeterministic.h: Added property svn:eol-style.
3425         * bindings/scripts/test/JS/JSTestObj.cpp: Modified property svn:eol-style.
3426         * bindings/scripts/test/JS/JSTestObj.h: Modified property svn:eol-style.
3427         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Added property svn:eol-style.
3428         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: Added property svn:eol-style.
3429         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Modified property svn:eol-style.
3430         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: Modified property svn:eol-style.
3431         * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added property svn:eol-style.
3432         * bindings/scripts/test/JS/JSTestSupplemental.h: Added property svn:eol-style.
3433         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added property svn:eol-style.
3434         * bindings/scripts/test/JS/JSTestTypedefs.h: Added property svn:eol-style.
3435         * bindings/scripts/test/JS/JSattribute.cpp: Added property svn:eol-style.
3436         * bindings/scripts/test/JS/JSattribute.h: Added property svn:eol-style.
3437         * bindings/scripts/test/JS/JSreadonly.cpp: Added property svn:eol-style.
3438         * bindings/scripts/test/JS/JSreadonly.h: Added property svn:eol-style.
3439
3440 2015-03-14  Darin Adler  <darin@apple.com>
3441
3442         More event handler improvements
3443         https://bugs.webkit.org/show_bug.cgi?id=142701
3444
3445         Reviewed by Anders Carlsson.
3446
3447         These are the improvements:
3448
3449         - Use EventHandler rather than EventListener as the the type for event handler
3450           attributes. This matches the HTML specification, and also makes sense, since
3451           EventListener means something else (and we use it to mean that!). Also renamed
3452           JSWindowEventListener to WindowEventHandler. Even though this only affects the
3453           JavaScript code generated, it's not really a JavaScript-specific flag.
3454
3455         - Tweak formatting on addEventListener/removeEventListener/dispatchEvent in
3456           all the IDL files where the appear. This includes changing the spelling from
3457           "evt" to "event". Some day we should fix this so these functions only need to
3458           appear in EventTarget.idl.
3459
3460         - Tweak formatting a bit on the IDL files we had to modify anyway.
3461
3462         - Use [Conditional] more often and #if less often in IDL files.
3463
3464         - Added a new [DocumentEventHandler] attribute for the selectionchange event.
3465           This involved adding new event handler attribute functions to JSEventListener.h
3466           for use by the JavaScript bindings.
3467
3468         - Removed a little unused code from the JavaScript code bindings generator.
3469
3470         - Improved the mechanism used by HTMLElement and SVGElement to share the list of
3471           content attributes that are event handlers so there is only one map rather than
3472           two. Made a similar mechanism so that HTMLBodyElement and HTMLFrameSetElement
3473           can share the list of window event handlers.
3474
3475         - Followed the HTML specification by putting all the event handler support in
3476           the HTMLElement class rather than having event handlers apply only a the
3477           particular element that uses those events. We already did this for most of
3478           our event handlers, but we are now doing it for all of them.
3479
3480         * Modules/battery/BatteryManager.idl: Use EventHandler instead of EventListener
3481         as appropriate. Also reformatted addEventListener/removeEventListener/dispatchEvent.
3482         * Modules/encryptedmedia/MediaKeySession.idl: Ditto.
3483         * Modules/indexeddb/IDBDatabase.idl: Ditto.
3484         * Modules/indexeddb/IDBOpenDBRequest.idl: Ditto.
3485         * Modules/indexeddb/IDBRequest.idl: Ditto.
3486         * Modules/indexeddb/IDBTransaction.idl: Ditto.
3487         * Modules/mediastream/MediaStream.idl: Ditto.
3488         * Modules/mediastream/MediaStreamTrack.idl: Ditto.
3489         * Modules/mediastream/RTCDTMFSender.idl: Ditto.
3490         * Modules/mediastream/RTCDataChannel.idl: Ditto.
3491         * Modules/mediastream/RTCPeerConnection.idl: Ditto.
3492         * Modules/speech/SpeechSynthesisUtterance.idl: Ditto.
3493         * Modules/webaudio/AudioBufferSourceNode.idl: Ditto.
3494         * Modules/webaudio/AudioContext.idl: Ditto.
3495         * Modules/webaudio/OscillatorNode.idl: Ditto.
3496         * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
3497         * Modules/websockets/WebSocket.idl: Ditto.
3498         * css/FontLoader.idl: Ditto.
3499         * dom/EventListener.idl: Ditto.
3500         * dom/EventTarget.idl: Ditto.
3501         * dom/MessagePort.idl: Ditto.
3502         * dom/Node.idl: Ditto.
3503         * dom/WebKitNamedFlow.idl: Ditto.
3504         * fileapi/FileReader.idl: Ditto.
3505         * html/MediaController.idl: Ditto.
3506         * html/track/AudioTrackList.idl: Ditto.
3507         * html/track/TextTrackCue.idl: Ditto.
3508         * html/track/TextTrackList.idl: Ditto.
3509         * html/track/VideoTrackList.idl: Ditto.
3510         * loader/appcache/DOMApplicationCache.idl: Ditto.
3511         * page/EventSource.idl: Ditto.
3512         * page/Performance.idl: Ditto.
3513         * workers/AbstractWorker.idl: Ditto.
3514         * workers/DedicatedWorkerGlobalScope.idl: Ditto.
3515         * workers/Worker.idl: Ditto.
3516         * workers/WorkerGlobalScope.idl: Ditto.
3517         * xml/XMLHttpRequest.idl: Ditto.
3518         * xml/XMLHttpRequestUpload.idl: Ditto.
3519
3520         * Modules/notifications/Notification.idl: Did the above, but also used
3521         [Conditional] instead of #if throughout.
3522         * html/track/TextTrack.idl: Ditto.
3523
3524         * Modules/webaudio/AudioNode.idl: Tweaked paragraphing of this file.
3525
3526         * bindings/js/JSEventListener.cpp:
3527         (WebCore::windowEventHandlerAttribute): Renamed to take the word "forwarded"
3528         out of this. More closely matches the terminology used in IDL files and the
3529         HTML specification.
3530         (WebCore::setWindowEventHandlerAttribute): Ditto.
3531         (WebCore::documentEventHandlerAttribute): Added.
3532         (WebCore::setDocumentEventHandlerAttribute): Added.
3533         * bindings/js/JSEventListener.h: Updated for above changes.
3534
3535         * bindings/objc/PublicDOMInterfaces.h: Renamed argument from "evt" to "event".
3536
3537         * bindings/scripts/CodeGeneratorGObject.pm:
3538         (SkipAttribute): Skip attributes of type "EventHandler" rather than attributes
3539         of type "EventListener".
3540         * bindings/scripts/CodeGeneratorObjC.pm:
3541         (SkipAttribute): Ditto.
3542
3543         * bindings/scripts/CodeGeneratorJS.pm:
3544         (GenerateImplementation): Look for the type EventHandler instead of the type
3545         EventListener for event handler attributes. Also added code to handle the new
3546         DocumentEventHandler, and use the name WindowEventHandler instead of the name
3547         JSWindowEventListener. Removed unneeded preflight check to see if we have
3548         writable attributes; it was not doing us any good. (That caused a lot of code
3549         to be un-indented and makes the diff hard to read.)
3550
3551         * bindings/scripts/IDLAttributes.txt: Removed JSWindowEventListener, and added
3552         WindowEventHandler and DocumentEventHandler.
3553
3554         * bindings/scripts/test/TestObj.idl: Use the type EventHandler instead of the
3555         type EventListener. The test output is unchanged, though.
3556
3557         * dom/Document.idl: Got rid of the conditionals and merged all the event handler
3558         attributes into a single sorted, unconditional list. Added some that were missing,
3559         as detected by the event-handler-attributes.html test.
3560
3561         * dom/Element.idl: Ditto. This includes moving attributes here that were formerly
3562         only in certain element classes. Note that the script event handler attribute
3563         support is still here, even though it should be in HTMLElement and SVGElement
3564         instead. There's a FIXME about that, but no real urgency in fixing it.
3565
3566         * html/HTMLAttributeNames.in: Added onmessage. Previously, the support for this
3567         was from the script attribute only, not the content attribute.
3568
3569         * html/HTMLBodyElement.cpp:
3570         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): Added. This
3571         contains the list of all the window event handlers that can be set on a body
3572         or frameset element and which are triggered by events on the window.
3573         (WebCore::HTMLBodyElement::eventNameForWindowEventHandlerAttribute): Added.
3574         This is the function to call to use the map above. Given an attribute, it
3575         returns either null if it is not a window event handler attribute, or the
3576         event type if it is one.
3577         (WebCore::HTMLBodyElement::parseAttribute): Updated to use the new
3578         functions above. Handling of these attributes is now unconditional, but
3579         also we don't have to keep the nested if statements here up to date, just
3580         the list of event handler attributes names in the map create function above.
3581
3582         * html/HTMLBodyElement.h: Added public eventNameForWindowEventHandlerAttribute
3583         and private createWindowEventHandlerNameMap functions.
3584
3585         * html/HTMLBodyElement.idl: Updated to use WindowEventHandler, DocumentEventHandler,
3586         and EventHandler. Also made everything unconditional. Also filled out the list here
3587         to match the list handled as content attributes. All covered by the test.
3588
3589         * html/HTMLElement.cpp:
3590         (WebCore::HTMLElement::createEventHandlerNameMap): Added. Replaces the old
3591         populate function. Changed the list of event handler attributes to be a bit more
3592         complete, and to be entirely unconditional. Also refactored this function to use
3593         a new populateEventHandlerNameMap helper, shared with HTMLBodyElement.
3594         (WebCore::HTMLElement::populateEventHandlerNameMap): Added. Factors out the code
3595         that both this class and HTMLBodyElement use to build event handler name maps.
3596         (WebCore::HTMLElement::eventNameForEventHandlerAttribute): Added. This is the
3597         function that call to use the map above. Given an attribute it returns either
3598         null if it is not an event handler attribute, or the event type if it is one.
3599         This is actually two functions. One is a protected function for use by both this
3600         class and HTMLBodyElement so they can share things like the optimization to look
3601         for the "on" prefix. The other is the public function that we actually use in
3602         HTMLElement and SVGElement.
3603         (WebCore::HTMLElement::editabilityFromContentEditableAttr): Tweaked and refactored
3604         to use lineageOfType. Would have been even simpler if this took an element instead
3605         of a node. Unrelated to the event handler changes.
3606         (WebCore::HTMLElement::parseAttribute): Removed long-obsolete code that decided
3607         whether to call through to the base class. The base class function is empty and
3608         never needs to be called, and in any case there is no value in doing work to
3609         decide whether to call through to an empty function. Changed the style of the
3610         function to use early return instead of else. Worth considering whether we want
3611         to return early or call through to base class in this family of functions. It's
3612         more efficient to return early, but doesn't work well if both the derived class
3613         and base class want to respond to changes to the same attribute. The new logic
3614         for event handler attributes is more straightforward than the old, since the
3615         eventNameForEventHandlerAttribute has the logic.
3616         (WebCore::HTMLElement::textToFragment): Tweaked and refactored a bit, and also
3617         changed to return a Ref since this never fails and needs to return null.
3618
3619         * html/HTMLElement.h: Updated for above changes. This includes a template version
3620         of populateEventHandlerNameMap that extracts the array size at compile time and
3621         passes it to the non-template function that does the work.
3622
3623         * html/HTMLFrameElementBase.cpp:
3624         (WebCore::HTMLFrameElementBase::parseAttribute): Removed unneeded code to handle
3625         event handler attributes handled by HTMLElement.
3626         * html/HTMLImageElement.cpp:
3627         (WebCore::HTMLImageElement::parseAttribute): Ditto.
3628         * html/HTMLLinkElement.cpp:
3629         (WebCore::HTMLLinkElement::parseAttribute): Ditto.
3630         * html/HTMLObjectElement.cpp:
3631         (WebCore::HTMLObjectElement::parseAttribute): Ditto.
3632         * html/HTMLScriptElement.cpp:
3633         (WebCore::HTMLScriptElement::parseAttribute): Ditto.
3634
3635         * html/HTMLFrameSetElement.cpp:
3636         (WebCore::HTMLFrameSetElement::parseAttribute): Changed function to early return
3637         style, and added FIXMEs about the many problems in the attribute handling code.
3638         Replaced all the code to handle window event handlers with a new bit of code that
3639         calls HTMLBodyElement::eventNameForWindowEventHandlerAttribute.
3640
3641         * html/HTMLFrameSetElement.idl: Changed to match the list of window event handlers
3642         in HTMLBodyElement.idl, although I did not add the document event handler here.
3643         As in the various other cases, having some extra event handlers does not seem to
3644         do harm and this is covered by the event-handler-attributes.html test.
3645
3646         * html/HTMLMarqueeElement.idl: Renamed EventListener to EventHandler in comment.
3647
3648         * page/DOMWindow.idl: As with Element and Document, removed conditionals, and
3649         filled out the list of event handlers so all the tests in
3650         event-handler-attributes.html will pass.
3651
3652         * svg/SVGElement.cpp:
3653         (WebCore::SVGElement::parseAttribute): Changed code to the early return style,
3654         and replaced the event handler attribute code with new much simpler code that
3655         uses the new HTMLElement::eventNameForEventHandlerAttribute. Also changed the
3656         way we call through to base classes. Just call through to the
3657         SVGLangSpace::parseAttribute function unconditionally, and don't try to use
3658         early return style to arbitrate among base classes. We should make this
3659         simplification throughout the SVG code; there's no need for the complexity
3660         that was there before just to cut down slightly on calls through to base
3661         class parseAttribute functions.
3662
3663         * svg/SVGSVGElement.cpp:
3664         (WebCore::SVGSVGElement::parseAttribute): Changed some of this code to the
3665         early return style and corrected some comments about the window event handler
3666         attributes here. These could use some further testing and might later need to be
3667         properly supported when the attributes are set in script, not just in content.
3668
3669         * svg/SVGScriptElement.cpp:
3670         (WebCore::SVGScriptElement::isSupportedAttribute): Deleted.
3671         (WebCore::SVGScriptElement::parseAttribute): Changed this function to use the
3672         early return style and also to call through to all three base classes. This is
3673         a pattern we should follow elsewhere in SVG to simplify the code. There is no
3674         need for the supportedAttributes sets like the one in this calass, and the code
3675         is unnecessarily complex, perhaps in an attempt to optimize performance. I'm
3676         pretty sure the old code was slower than this new code will be. No need for the
3677         extra hash table lookup every time. Also removed handling of event handler
3678         attribute which is taken care of by SVGElement now.
3679         (WebCore::SVGScriptElement::svgAttributeChanged): Made similar changes for
3680         the same reason as in parseAttribute. This function really needs a new name:
3681         It's the same as parseAttribute, except it's also used when implementing
3682         changes due to SVG animation.
3683
3684         * svg/SVGScriptElement.h: Removed isSupportedAttribute.
3685
3686 2015-03-14  Simon Fraser  <simon.fraser@apple.com>
3687
3688         Clean up use of flags in localToContainer-type functions
3689         https://bugs.webkit.org/show_bug.cgi?id=142704
3690
3691         Reviewed by Alexey Proskuryakov.
3692         
3693         RenderObject::localToContainerQuad() had the questionable behavior of always
3694         enforcing UseTransforms in the flags. However, a future patch will need to call
3695         localToContainerQuad() without this flag.
3696         
3697         Fix by requiring callers of localToAbsoluteQuad(), localToContainerQuad(), localToContainerPoint(),
3698         and absoluteToLocalQuad() to pass the UseTransforms flag in, providing it as a default argument.
3699         
3700         The default value of the MapCoordinatesFlags parameter to mapLocalToContainer(),
3701         a lower-level function, is removed.
3702         
3703         Sprinkle a few more nullptrs around.
3704         
3705         No behavior change.
3706
3707         * rendering/RenderBlock.cpp:
3708         (WebCore::RenderBlock::selectionGapRectsForRepaint): call the higher-level localToContainerPoint()
3709         instead of mapLocalToContainer().
3710         (WebCore::RenderBlock::absoluteQuads): Pass UseTransforms.
3711         * rendering/RenderBox.cpp:
3712         (WebCore::RenderBox::absoluteQuads): Ditto.
3713         * rendering/RenderBox.h:
3714         * rendering/RenderFlowThread.h:
3715         * rendering/RenderGeometryMap.h:
3716         (WebCore::RenderGeometryMap::absolutePoint):
3717         (WebCore::RenderGeometryMap::absoluteRect):
3718         * rendering/RenderImage.cpp:
3719         (WebCore::RenderImage::collectSelectionRects): This function was erroneously passing
3720         'false' as flags. Pass UseTransforms instead (but no behavior change since
3721         UseTransforms was forced on lower down).
3722         * rendering/RenderInline.h:
3723         * rendering/RenderLayer.cpp:
3724         (WebCore::RenderLayer::scrollRectToVisible): UseTransforms is the parameter default, remove it.
3725         * rendering/RenderLineBreak.cpp:
3726         (WebCore::RenderLineBreak::absoluteQuads):
3727         (WebCore::RenderLineBreak::collectSelectionRects): Another erroneous 'false'.
3728         * rendering/RenderNamedFlowFragment.cpp:
3729         (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion):
3730         * rendering/RenderObject.cpp:
3731         (WebCore::RenderObject::localToContainerQuad): Here's where we no longer force
3732         the UseTransforms bit.
3733         (WebCore::RenderObject::localToContainerPoint): Also here.
3734         * rendering/RenderObject.h: I prefer bit flags lined up. Makes it easier to spot errors.
3735         (WebCore::RenderObject::localToAbsoluteQuad):
3736         * rendering/RenderText.cpp:
3737         (WebCore::RenderText::collectSelectionRects): Another bad 'false'.
3738         * rendering/RenderTextLineBoxes.cpp:
3739         (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
3740         (WebCore::RenderTextLineBoxes::absoluteQuads):
3741         (WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
3742         * rendering/RenderView.h:
3743         * rendering/SimpleLineLayoutFunctions.cpp:
3744         (WebCore::SimpleLineLayout::collectAbsoluteQuads):
3745         * rendering/svg/RenderSVGForeignObject.h:
3746         * rendering/svg/RenderSVGInline.cpp:
3747         (WebCore::RenderSVGInline::absoluteQuads): Another bad 'false'.
3748         * rendering/svg/RenderSVGInline.h:
3749         * rendering/svg/RenderSVGModelObject.cpp:
3750         (WebCore::RenderSVGModelObject::absoluteQuads):
3751         * rendering/svg/RenderSVGModelObject.h:
3752         * rendering/svg/RenderSVGRoot.h:
3753         * rendering/svg/RenderSVGText.cpp:
3754         (WebCore::RenderSVGText::absoluteQuads):
3755         * rendering/svg/RenderSVGText.h:
3756         * rendering/svg/SVGRenderSupport.h:
3757
3758 2015-03-14  Brent Fulgham  <bfulgham@apple.com>
3759
3760         [iOS] scroll snap points are animating to the wrong positions...
3761         https://bugs.webkit.org/show_bug.cgi?id=142705
3762         <rdar://problem/20136946>
3763
3764         Reviewed by Simon Fraser.
3765
3766         Avoid adding an extra '0' snap point to our set. We always start with one zero; this
3767         extra append just forces us to do more steps in our search for nearest snap point.
3768
3769         * page/scrolling/AxisScrollSnapOffsets.cpp:
3770         (WebCore::updateFromStyle): Remove extra '0' appended to offsets.
3771
3772 2015-03-14  Dean Jackson  <dino@apple.com>
3773
3774         Feature flag for Animations Level 2
3775         https://bugs.webkit.org/show_bug.cgi?id=142699
3776         <rdar://problem/20165097>
3777
3778         Reviewed by Brent Fulgham.
3779
3780         Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
3781
3782         * Configurations/FeatureDefines.xcconfig:
3783         * bindings/generic/RuntimeEnabledFeatures.cpp:
3784         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
3785         * bindings/generic/RuntimeEnabledFeatures.h:
3786         (WebCore::RuntimeEnabledFeatures::setAnimationTriggersEnabled):
3787         (WebCore::RuntimeEnabledFeatures::animationTriggersEnabled):
3788
3789 2015-03-14  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3790
3791         RenderBlock::imageChange() calling const methods on exit
3792         https://bugs.webkit.org/show_bug.cgi?id=142648
3793
3794         Reviewed by Brent Fulgham.
3795
3796         No new tests, no change on behavior.
3797
3798         * rendering/RenderBlock.cpp:
3799         (WebCore::RenderBlock::imageChanged): Deleted.
3800         * rendering/RenderBlock.h:
3801
3802 2015-03-14  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3803
3804         [GStreamer] share GL context in pipeline
3805         https://bugs.webkit.org/show_bug.cgi?id=142693
3806
3807         Reviewed by Philippe Normand.
3808
3809         GstGL elements in a pipeline need to be aware of the application's
3810         display and its GL context. This information is shared through context
3811         messages between the pipeline and the browser.
3812
3813         This patch shares this context through a GStreamer's synchronous
3814         message, using the GL information held in the web process.
3815
3816         This patch is based on the work of Philippe Normand for Bug 138562.
3817
3818         No new tests because this is platform specific and it depends in the
3819         run-time availability and configurations of GstGL elements.
3820
3821         * PlatformGTK.cmake: appends the GstGL header files in the include
3822         directories. Also its library directory is appended.
3823         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3824         (WebCore::mediaPlayerPrivateSyncMessageCallback): New callback function.
3825         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3826         Initialize the new class attributes.
3827         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): New method
3828         for handling synchronous messages from the pipeline. This method
3829         currently only handles the GL context sharing.
3830         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Configures
3831         the pipeline's bus to handle the synchronous messages.
3832         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add new
3833         class methods and attributes.
3834
3835 2015-03-13  Alex Christensen  <achristensen@webkit.org>
3836
3837         Progress towards CMake on Mac.
3838         https://bugs.webkit.org/show_bug.cgi?id=142680
3839
3840         Reviewed by Gyuyoung Kim.
3841
3842         * PlatformMac.cmake:
3843         Added new include directories and removed old source files.
3844
3845 2015-03-13  Commit Queue  <commit-queue@webkit.org>
3846
3847         Unreviewed, rolling out r181483.
3848         https://bugs.webkit.org/show_bug.cgi?id=142688
3849
3850         Caused use-after-free on many tests (Requested by ap on
3851         #webkit).
3852
3853         Reverted changeset:
3854
3855         "Allow clients to selectively disable plug-ins"
3856         https://bugs.webkit.org/show_bug.cgi?id=142506
3857         http://trac.webkit.org/changeset/181483
3858
3859 2015-03-13  Antti Koivisto  <antti@apple.com>
3860
3861         Cache glyph widths to GlyphPages
3862         https://bugs.webkit.org/show_bug.cgi?id=142028
3863
3864         Reviewed by Andreas Kling.
3865
3866         Currently we have a separate cache in Font for glyph widths. In practice we always need
3867         the widths so we can just cache them in GlyphPages. This simplifies the code and removes
3868         a per-character hash lookup from WidthIterator.
3869
3870         * platform/graphics/Font.cpp:
3871         (WebCore::Font::Font):
3872         (WebCore::Font::initCharWidths):
3873         (WebCore::Font::platformGlyphInit):
3874         (WebCore::createAndFillGlyphPage):
3875         (WebCore::Font::computeWidthForGlyph):
3876
3877             Rename to make it clear this doesn't cache.
3878
3879         (WebCore::GlyphPage::setGlyphDataForIndex):
3880
3881             Initialize the width.
3882             This could go to GlyphPage.cpp if we had one.
3883
3884         * platform/graphics/Font.h:
3885         (WebCore::Font::glyphZeroWidth):
3886         (WebCore::Font::isZeroWidthSpaceGlyph):
3887         (WebCore::Font::zeroGlyph): Deleted.
3888         (WebCore::Font::setZeroGlyph): Deleted.
3889         (WebCore::Font::widthForGlyph): Deleted.
3890         * platform/graphics/FontCascade.cpp:
3891         (WebCore::offsetToMiddleOfGlyph):
3892         * platform/graphics/FontCascadeFonts.cpp:
3893         (WebCore::FontCascadeFonts::glyphDataForCharacter):
3894         * platform/graphics/GlyphPage.h:
3895         (WebCore::GlyphData::GlyphData):
3896
3897             Return width too as part of GlyphData.
3898
3899         (WebCore::GlyphPage::glyphDataForIndex):
3900         (WebCore::GlyphPage::setGlyphDataForCharacter):
3901         (WebCore::GlyphPage::setGlyphDataForIndex):
3902         (WebCore::GlyphPage::GlyphPage):
3903         * platform/graphics/WidthIterator.cpp:
3904         (WebCore::WidthIterator::advanceInternal):
3905
3906             No need to lookup width separately now.
3907
3908         * platform/graphics/mac/ComplexTextController.cpp:
3909         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
3910         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3911         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
3912         * rendering/mathml/RenderMathMLOperator.cpp:
3913         (WebCore::RenderMathMLOperator::advanceForGlyph):
3914         * rendering/svg/SVGTextRunRenderingContext.cpp:
3915         (WebCore::missingGlyphForFont):
3916         * svg/SVGFontData.cpp:
3917         (WebCore::SVGFontData::initializeFont):
3918
3919 2015-03-13  Eric Carlson  <eric.carlson@apple.com>
3920
3921         [Mac] Enable WIRELESS_PLAYBACK_TARGET
3922         https://bugs.webkit.org/show_bug.cgi?id=142635
3923
3924         Reviewed by Darin Adler.
3925
3926         * Configurations/FeatureDefines.xcconfig:
3927
3928 2015-03-13  Jeremy Jones  <jeremyj@apple.com>
3929
3930         Fix typo restoreUserInterfaceForOptimizedFullscreeStopWithCompletionHandler.
3931         https://bugs.webkit.org/show_bug.cgi?id=142678
3932
3933         Reviewed by Eric Carlson.
3934
3935         Add the missing 'n' in "fullscreen".
3936
3937         * platform/spi/ios/AVKitSPI.h:
3938
3939 2015-03-13  Timothy Horton  <timothy_horton@apple.com>
3940
3941         Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
3942         https://bugs.webkit.org/show_bug.cgi?id=142664
3943         <rdar://problem/18859470>
3944
3945         Reviewed by Benjamin Poulain.
3946
3947         * page/ViewportConfiguration.cpp:
3948         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
3949         (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
3950         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
3951         Split shouldIgnoreScalingConstraints into one for each dimension.
3952
3953         (WebCore::ViewportConfiguration::initialScale):
3954         (WebCore::ViewportConfiguration::minimumScale):
3955