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