1 2015-03-24 Csaba Osztrogonác <ossy@webkit.org>
3 [EFL] Add OpenWebRTC in jhbuild
4 https://bugs.webkit.org/show_bug.cgi?id=142778
6 Reviewed by Gyuyoung Kim.
8 Original patch by Philippe Normand <pnormand@igalia.com>
10 * PlatformEfl.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
12 2015-03-23 Yoav Weiss <yoav@yoav.ws>
14 Update empty image canvas tests and fix a related bug
15 https://bugs.webkit.org/show_bug.cgi?id=142694
17 Reviewed by Chris Dumez.
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.
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.
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
36 * html/canvas/CanvasRenderingContext2D.cpp:
37 (WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.
39 2015-03-23 Alex Christensen <achristensen@webkit.org>
41 Fix api tests after r181876.
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.
50 2015-03-23 Dean Jackson <dino@apple.com>
52 Timelines are sharing the same canvas background
53 https://bugs.webkit.org/show_bug.cgi?id=142994
54 <rdar://problem/20209466>
56 Reviewed by Brent Fulgham.
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
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:
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:
77 2015-03-23 Brent Fulgham <bfulgham@apple.com>
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>
83 Reviewed by Dean Jackson.
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
89 (2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames
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.
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
107 (WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
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.
120 2015-03-23 Anders Carlsson <andersca@apple.com>
122 Try to fix the iOS build.
124 * platform/network/mac/CookieJarMac.mm:
126 2015-03-23 Brady Eidson <beidson@apple.com>
128 Content extensions should apply css selectors
129 https://bugs.webkit.org/show_bug.cgi?id=142604
131 Reviewed by Alex Christensen.
133 Tests: http/tests/contentextensions/css-display-none.html
135 * WebCore.xcodeproj/project.pbxproj:
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):
145 * contentextensions/ContentExtensionsBackend.cpp:
146 (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
147 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
148 (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
149 * contentextensions/ContentExtensionsBackend.h:
151 * contentextensions/DFABytecodeInterpreter.cpp:
152 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
154 * dom/DocumentStyleSheetCollection.cpp:
155 (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):
156 * dom/DocumentStyleSheetCollection.h:
158 * loader/DocumentLoader.cpp:
159 (WebCore::DocumentLoader::commitData):
160 (WebCore::DocumentLoader::startLoadingMainResource):
161 (WebCore::DocumentLoader::addPendingContentExtensionSheet):
162 * loader/DocumentLoader.h:
164 * loader/cache/CachedResourceLoader.cpp:
165 (WebCore::CachedResourceLoader::requestResource):
167 * loader/cache/CachedResourceRequest.cpp:
168 (WebCore::CachedResourceRequest::setInitiator):
169 * loader/cache/CachedResourceRequest.h:
170 (WebCore::CachedResourceRequest::initiatingDocumentLoader):
172 * page/UserContentController.cpp:
173 (WebCore::UserContentController::globalDisplayNoneStyleSheet):
174 (WebCore::UserContentController::displayNoneCSSRule):
175 * page/UserContentController.h:
177 2015-03-23 Anders Carlsson <andersca@apple.com>
179 -[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
180 https://bugs.webkit.org/show_bug.cgi?id=142990
181 rdar://problem/20241645
183 Reviewed by Andreas Kling.
185 Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.
187 * platform/network/cf/CookieJarCFNet.cpp:
188 * platform/network/mac/CookieJarMac.mm:
190 2015-03-23 Conrad Shultz <conrad_shultz@apple.com>
192 Replace uses of kCTFontSystemFontType
193 https://bugs.webkit.org/show_bug.cgi?id=142984
195 Reviewed by Tim Horton.
197 * rendering/RenderThemeMac.mm:
198 (WebCore::AttachmentLayout::layOutTitle):
199 (WebCore::AttachmentLayout::layOutSubtitle):
201 2015-03-23 Dean Jackson <dino@apple.com>
203 kCTFontSystemFontType is deprecated in CoreText
204 https://bugs.webkit.org/show_bug.cgi?id=142981
205 <rdar://problem/20261171>
207 Reviewed by Beth Dakin.
209 Update to the non-deprecated version.
211 * rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem
212 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
214 2015-03-23 Eric Carlson <eric.carlson@apple.com>
216 [Mac] Enable fullscreen for MSE-based videos
217 https://bugs.webkit.org/show_bug.cgi?id=142971
219 Reviewed by Jer Noble.
221 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
222 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;
224 2015-03-23 Alex Christensen <achristensen@webkit.org>
226 [MediaFoundation] Implement seek.
227 https://bugs.webkit.org/show_bug.cgi?id=142594
229 Reviewed by Darin Adler.
231 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
232 (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
233 (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
234 (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
235 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
237 2015-03-23 Dan Bernstein <mitz@apple.com>
241 * platform/graphics/cocoa/FontCocoa.mm:
242 (WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
243 (WebCore::Font::platformWidthForGlyph): Ditto.
245 2015-03-23 Jer Noble <jer.noble@apple.com>
247 [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
248 https://bugs.webkit.org/show_bug.cgi?id=142970
250 Reviewed by Eric Carlson.
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.
255 * platform/audio/ios/MediaSessionManagerIOS.mm:
256 (-[WebMediaSessionHelper allocateVolumeView]):
258 2015-03-23 Tim Horton <timothy_horton@apple.com>
260 Add a share item to the link action menu
261 https://bugs.webkit.org/show_bug.cgi?id=142961
262 <rdar://problem/19198374>
264 Reviewed by Beth Dakin.
266 * English.lproj/Localizable.strings:
267 Remove some now-unused strings.
269 * platform/spi/mac/NSMenuSPI.h:
272 2015-03-23 David Kilzer <ddkilzer@apple.com>
274 [iOS] Build fix: CoreText deprecated kCTFontSystemFontType
276 Fix tracked by: <rdar://problem/20261171>
278 * rendering/RenderThemeIOS.mm:
279 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
282 2015-03-23 Brent Fulgham <bfulgham@apple.com>
287 (WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.
289 2015-03-23 Brent Fulgham <bfulgham@apple.com>
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>
295 Reviewed by Dean Jackson.
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
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.
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
316 2015-03-23 Yoav Weiss <yoav@yoav.ws>
318 Refactor ImageLoader's setting of CachedImage
319 https://bugs.webkit.org/show_bug.cgi?id=142825
321 Reviewed by Chris Dumez.
323 No new tests, since there's no functional change.
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.
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:
341 2015-03-22 Benjamin Poulain <benjamin@webkit.org>
343 CSS Selectors: fix attribute case-insensitive matching of Contain and List
344 https://bugs.webkit.org/show_bug.cgi?id=142932
346 Reviewed by Darin Adler.
348 Fix the last two attribute selectors that were using full case-insensitive
350 -Contain ([foo*=bar]).
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
356 * css/SelectorChecker.cpp:
357 (WebCore::attributeValueMatches):
358 * cssjit/SelectorCompiler.cpp:
359 (WebCore::SelectorCompiler::attributeValueContains):
360 (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
362 2015-03-22 Benjamin Poulain <bpoulain@apple.com>
364 Detect when url filter pattern with groups match the empty string
365 https://bugs.webkit.org/show_bug.cgi?id=142930
367 Reviewed by Sam Weinig.
369 The previous test was only accounting for simple atoms. This patch extends
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.
378 2015-03-22 Eric Carlson <eric.carlson@apple.com>
380 [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
381 https://bugs.webkit.org/show_bug.cgi?id=142940
383 Reviewed by Sam Weinig.
386 (WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.
389 * html/HTMLMediaSession.cpp:
390 (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.
391 * html/HTMLMediaSession.h:
394 (WebCore::Page::didChoosePlaybackTarget): Ditto.
397 * platform/audio/MediaSession.h:
398 * platform/graphics/MediaPlaybackTargetPickerClient.h:
399 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
400 (WebCore::MediaPlaybackTargetPickerMac::devicePicker): Ditto.
402 2015-03-22 Anders Carlsson <andersca@apple.com>
404 _WKWebsiteDataStore should clear WebSQL databases
405 https://bugs.webkit.org/show_bug.cgi?id=142947
407 Reviewed by Sam Weinig.
409 * Modules/webdatabase/DatabaseTracker.cpp:
410 (WebCore::DatabaseTracker::trackerWithDatabasePath):
411 Add a hack so we can get at a tracker from the UI process.
413 (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
414 New function that deletes all databases modified after a given time.
416 * Modules/webdatabase/DatabaseTracker.h:
417 Add new members and export the ones we want to call from WebKit2.
419 * Modules/webdatabase/OriginLock.h:
420 Export the destructor.
422 2015-03-21 Dean Jackson <dino@apple.com>
424 Remove the prefix for CSS Transforms
425 https://bugs.webkit.org/show_bug.cgi?id=142927
426 <rdar://problem/11568151>
428 Reviewed by Simon Fraser.
430 Support the bare form of:
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.
440 This is mostly a find and replace, but with some related naming
441 changes. The DOM interface for WebKitCSSTransformValue remains
444 Tests: transforms/2d/transform-2d-prefixed.html
445 transforms/3d/general/prefixed-3dtransform-values.html
447 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
448 (WebCore::propertyChangeMayRepaintNonDescendants):
449 * css/CSSComputedStyleDeclaration.cpp:
450 (WebCore::isLayoutDependent):
451 (WebCore::ComputedStyleExtractor::propertyValue):
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):
511 2015-03-21 Commit Queue <commit-queue@webkit.org>
513 Unreviewed, rolling out r181824.
514 https://bugs.webkit.org/show_bug.cgi?id=142935
516 Broke Windows build (Requested by ap on #webkit).
520 "Remove the prefix for CSS Transforms"
521 https://bugs.webkit.org/show_bug.cgi?id=142927
522 http://trac.webkit.org/changeset/181824
524 2015-03-20 Dean Jackson <dino@apple.com>
526 Remove the prefix for CSS Transforms
527 https://bugs.webkit.org/show_bug.cgi?id=142927
528 <rdar://problem/11568151>
530 Reviewed by Simon Fraser.
532 Support the bare form of:
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.
542 This is mostly a find and replace, but with some related naming
543 changes. The DOM interface for WebKitCSSTransformValue remains
546 Tests: transforms/2d/transform-2d-prefixed.html
547 transforms/3d/general/prefixed-3dtransform-values.html
549 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
550 (WebCore::propertyChangeMayRepaintNonDescendants):
551 * css/CSSComputedStyleDeclaration.cpp:
552 (WebCore::isLayoutDependent):
553 (WebCore::ComputedStyleExtractor::propertyValue):
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):
613 2015-03-20 Yusuke Suzuki <utatane.tea@gmail.com>
615 REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
616 https://bugs.webkit.org/show_bug.cgi?id=142410
618 Reviewed by Geoffrey Garen.
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.
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):
637 2015-03-20 Simon Fraser <simon.fraser@apple.com>
639 Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
640 https://bugs.webkit.org/show_bug.cgi?id=142917
642 Reviewed by Beth Dakin.
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.
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
652 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
653 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
654 (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
655 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
657 2015-03-19 Geoffrey Garen <ggaren@apple.com>
659 Function.prototype.toString should not decompile the AST
660 https://bugs.webkit.org/show_bug.cgi?id=142853
662 Reviewed by Sam Weinig.
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.
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.
673 2015-03-20 Alex Christensen <achristensen@webkit.org>
675 Progress towards CMake on Mac.
676 https://bugs.webkit.org/show_bug.cgi?id=136003
678 Reviewed by Chris Dumez.
681 Added some directories to create forwarding headers from.
682 Generate ObjC bindings.
684 2015-03-20 Per Arne Vollan <peavo@outlook.com>
686 [WinCairo] Crash when leaving page while video is playing.
687 https://bugs.webkit.org/show_bug.cgi?id=142578
689 Reviewed by Alex Christensen.
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.
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):
710 2015-03-20 Chris Dumez <cdumez@apple.com>
712 Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
713 https://bugs.webkit.org/show_bug.cgi?id=142911
715 Reviewed by Antti Koivisto.
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).
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.
730 No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
733 * loader/FrameLoader.cpp:
734 (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
736 2015-03-20 Andy Estes <aestes@apple.com>
738 [Content Filtering] Adopt NEFilterSource unblock handling
739 https://bugs.webkit.org/show_bug.cgi?id=142904
741 Reviewed by Andreas Kling.
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.
749 2015-03-19 Andy Estes <aestes@apple.com>
751 [Content Filtering] Add tests for unblock requests
752 https://bugs.webkit.org/show_bug.cgi?id=142900
754 Reviewed by Andreas Kling.
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.
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.
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.
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.
773 Tests: contentfiltering/allow-after-unblock-request.html
774 contentfiltering/block-after-unblock-request.html
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.
845 2015-03-20 Carlos Garcia Campos <cgarcia@igalia.com>
847 [GTK] Crash due to empty drag image during drag-and-drop
848 https://bugs.webkit.org/show_bug.cgi?id=142671
850 Reviewed by Philippe Normand.
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.
856 * platform/graphics/cairo/ImageBufferCairo.cpp:
857 (WebCore::ImageBuffer::ImageBuffer):
859 2015-03-19 Chris Dumez <cdumez@apple.com>
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>
866 Reviewed by Antti Koivisto.
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
877 * loader/FrameLoader.cpp:
878 (WebCore::FrameLoader::loadDifferentDocumentItem):
880 2015-03-19 Andy Estes <aestes@apple.com>
882 [Content Filtering] Move ContentFilter to from platform/ to loader/
883 https://bugs.webkit.org/show_bug.cgi?id=142897
885 Reviewed by Dan Bernstein.
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.
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.
910 2015-03-19 Dean Jackson <dino@apple.com>
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>
916 Reviewed by Simon Fraser.
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
923 Test: animations/trigger-container-scroll-boundaries.html
925 * css/CSSComputedStyleDeclaration.cpp:
926 (WebCore::createAnimationTriggerValue): Change to downcast.
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
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.
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.
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.
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.
962 2015-03-19 Eric Carlson <eric.carlson@apple.com>
964 [Mac] Move MediaPlaybackTargetPicker
965 https://bugs.webkit.org/show_bug.cgi?id=142889
967 Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicker so it
968 can be used by both WK2 and WK1.
970 Reviewed by Tim Horton.
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.
978 2015-03-19 Enrica Casucci <enrica@apple.com>
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
984 Reviewed by Ryosuke Niwa.
986 Test: editing/selection/click-after-last-inline-crash.html
988 * rendering/RootInlineBox.cpp:
989 (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
991 2015-03-19 Enrica Casucci <enrica@apple.com>
993 One more build fix after r181760.
995 * page/EventHandler.cpp:
996 (WebCore::EventHandler::handleDrag):
998 2015-03-19 Jessie Berlin <jberlin@webkit.org>
1000 Build fix after r181760.
1002 * rendering/RenderAttachment.h:
1004 2015-03-19 Jer Noble <jer.noble@apple.com>
1006 [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
1007 https://bugs.webkit.org/show_bug.cgi?id=142132
1009 Reviewed by Tim Horton.
1011 Add a new utility method to calculate a rect with a specific aspect ratio wrapping a smaller one.
1013 * platform/graphics/GeometryUtilities.cpp:
1014 (WebCore::smallestRectWithAspectRatioAroundRect):
1015 * platform/graphics/GeometryUtilities.h:
1017 2015-03-19 Chris Dumez <cdumez@apple.com>
1019 Get rid of "CachePolicyCache" cache policy
1020 https://bugs.webkit.org/show_bug.cgi?id=142881
1022 Reviewed by Antti Koivisto.
1024 Get rid of "CachePolicyCache" cache policy as it is unused.
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:
1033 2015-03-19 Alex Christensen <achristensen@webkit.org>
1035 [Content Extensions] Test regular expression parse failures.
1036 https://bugs.webkit.org/show_bug.cgi?id=142872
1038 Reviewed by Benjamin Poulain.
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.
1048 2015-03-19 Enrica Casucci <enrica@apple.com>
1050 Release build fix after https://trac.webkit.org/r181760.
1054 * page/EventHandler.cpp:
1055 (WebCore::EventHandler::handleDrag):
1057 2015-03-19 Enrica Casucci <enrica@apple.com>
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
1063 Reviewed by Tim Horton.
1065 Test: editing/pasteboard/drag-and-drop-attachment-contenteditable.html
1067 This patch adds all the necessary support to write attachment elements into
1068 the pasteboard, including the promised type.
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):
1087 (WebCore::URL::fileURLWithFileSystemPath):
1089 * rendering/HitTestResult.cpp:
1090 (WebCore::HitTestResult::absoluteAttachmentURL):
1091 * rendering/HitTestResult.h:
1093 2015-03-19 Chris Dumez <cdumez@apple.com>
1095 Unreviewed, fix linking error after r181753.
1097 Drop WEBCORE_EXPORT for Settings::minimumDOMTimerInterval() as it is
1101 (WebCore::Settings::minimumDOMTimerInterval):
1103 2015-03-19 Brady Eidson <beidson@apple.com>
1105 Part of content extensions should apply css selectors
1106 https://bugs.webkit.org/show_bug.cgi?id=142604
1108 Reviewed by Alex Christensen.
1110 Add a new action for applying the cached global stylesheet.
1112 * contentextensions/CompiledContentExtension.cpp:
1113 (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1115 * contentextensions/ContentExtensionActions.h:
1117 * contentextensions/ContentExtensionCompiler.cpp:
1118 (WebCore::ContentExtensions::serializeActions):
1120 * contentextensions/ContentExtensionParser.cpp:
1121 (WebCore::ContentExtensions::loadAction):
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.
1131 * contentextensions/ContentExtensionsBackend.cpp:
1132 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1134 * loader/cache/CachedResourceLoader.cpp:
1135 (WebCore::CachedResourceLoader::requestResource):
1137 2015-03-19 Chris Dumez <cdumez@apple.com>
1139 Clean up DOMTimer related settings
1140 https://bugs.webkit.org/show_bug.cgi?id=142837
1142 Reviewed by Darin Adler.
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
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.
1161 (WebCore::Document::minimumTimerInterval):
1162 (WebCore::Document::timerAlignmentInterval):
1163 * dom/ScriptExecutionContext.cpp:
1164 (WebCore::ScriptExecutionContext::minimumTimerInterval):
1165 (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1168 (WebCore::Page::Page):
1169 (WebCore::Page::setTimerThrottlingEnabled):
1170 (WebCore::Page::setMinimumTimerInterval): Deleted.
1171 (WebCore::Page::minimumTimerInterval): Deleted.
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.
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):
1195 2015-03-19 Carlos Garcia Campos <cgarcia@igalia.com>
1197 [GTK] Scrollbars look bad with GTK+ 3.16
1198 https://bugs.webkit.org/show_bug.cgi?id=140800
1200 Reviewed by Sergio Villar Senin.
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.
1207 * platform/gtk/ScrollbarThemeGtk.cpp:
1208 (WebCore::adjustRectAccordingToMargin):
1209 (WebCore::ScrollbarThemeGtk::paintTrackBackground):
1210 (WebCore::ScrollbarThemeGtk::paintThumb):
1212 2015-03-19 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1214 [Streams API] Update ReadableStream API according new version of the specification
1215 https://bugs.webkit.org/show_bug.cgi?id=142822
1217 Reviewed by Benjamin Poulain.
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.
1222 Covered by updated readablestream-constructor.html test.
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.
1242 2015-03-18 Manuel Rego Casasnovas <rego@igalia.com>
1244 Unreviewed. GTK build fix after r181720.
1246 * rendering/RenderImage.cpp:
1247 (WebCore::RenderImage::styleDidChange):
1249 2015-03-18 Antti Koivisto <antti@apple.com>
1251 Test disk cache behavior when using back navigation cache policy
1252 https://bugs.webkit.org/show_bug.cgi?id=142848
1254 Reviewed by Chris Dumez.
1256 Add a way to override the normal cache policy so we can test reload behavior of cache without actually reloading.
1258 Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
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:
1269 2015-03-18 Yusuke Suzuki <utatane.tea@gmail.com>
1271 TextFragment#start() is always >= 0 since its type is unsigned
1272 https://bugs.webkit.org/show_bug.cgi?id=142860
1274 Reviewed by Andreas Kling.
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.
1280 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1281 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
1283 2015-03-18 Alex Christensen <achristensen@webkit.org>
1285 [ContentExtensions] Prepare for compiling stylesheets of selectors to be used on every page.
1286 https://bugs.webkit.org/show_bug.cgi?id=142799
1288 Reviewed by Brady Eidson.
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.
1333 2015-03-18 Yusuke Suzuki <utatane.tea@gmail.com>
1335 Fix build failure due to FALLTHROUGH in unreachable code
1336 https://bugs.webkit.org/show_bug.cgi?id=142703
1338 Reviewed by Benjamin Poulain.
1340 FALLTHROUGH should not exist in unreachable code marked by
1341 ASSERT_NOT_REACHABLE.
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.
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.
1354 * dom/SelectorQuery.cpp:
1355 (WebCore::SelectorDataList::execute):
1357 2015-03-18 Said Abou-Hallawa <sabouhallawa@apple.com>
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.
1362 Reviewed by Darin Adler.
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
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.
1379 The plan for repaintOrMarkForLayout(), which is the new name of this function,
1381 -- setNeedLayout() if the intrinsic size changes and it affects the size
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.
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.
1392 Test: svg/as-image/svg-no-intrinsic-size-switching.html
1394 * rendering/RenderImage.cpp:
1395 (WebCore::RenderImage::styleDidChange): Change the function call.
1396 (WebCore::RenderImage::imageChanged): Rename local variable and change the
1399 (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Simplify this function.
1400 Call setIntrinsicSize() with the new size unless the image is in error state.
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.
1406 * rendering/RenderImage.h: Rename imageDimensionsChanged() and change the
1407 updateIntrinsicSizeIfNeeded() to return void.
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.
1414 2015-03-18 Jeremy Jones <jeremyj@apple.com>
1416 Fix typo in playerViewControllerWillCancelOptimizedFullscree.
1417 https://bugs.webkit.org/show_bug.cgi?id=142745
1419 Reviewed by Darin Adler.
1421 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1422 (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]):
1423 (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): Deleted.
1425 2015-03-18 Simon Fraser <simon.fraser@apple.com>
1427 Avoid repaints when changing transform on an element with multiple background images
1428 https://bugs.webkit.org/show_bug.cgi?id=142841
1430 Reviewed by Zalan Bujtas.
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.
1436 Test: fast/repaint/multiple-backgrounds-style-change.html
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
1446 * rendering/style/FillLayer.h: New static function; static because
1447 it compares two FillLayer lists, and I think that makes more sense than
1450 2015-03-18 Anders Carlsson <andersca@apple.com>
1452 Pass cookies by reference in CookieHash functions
1453 https://bugs.webkit.org/show_bug.cgi?id=142839
1455 Reviewed by Sam Weinig.
1457 * platform/Cookie.h:
1458 (WebCore::CookieHash::hash):
1459 (WebCore::CookieHash::equal):
1461 2015-03-18 Tim Horton <timothy_horton@apple.com>
1463 Temporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build
1465 * dom/SelectorQuery.cpp:
1466 (WebCore::SelectorDataList::execute):
1468 2015-03-18 Myles C. Maxfield <mmaxfield@apple.com>
1470 Call CTFontSetRenderingParameters before rendering text
1471 https://bugs.webkit.org/show_bug.cgi?id=142816
1473 Reviewed by Darin Adler.
1477 * platform/graphics/cocoa/FontCascadeCocoa.mm:
1478 (WebCore::showGlyphsWithAdvances):
1479 * platform/spi/cocoa/CoreTextSPI.h:
1481 2015-03-18 Chris Dumez <cdumez@apple.com>
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>
1487 Reviewed by Antti Koivisto.
1489 Add diagnostic logging key for network cache efficacy logging.
1491 * page/DiagnosticLoggingKeys.cpp:
1492 (WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
1493 (WebCore::DiagnosticLoggingKeys::requestKey):
1494 * page/DiagnosticLoggingKeys.h:
1496 2015-03-18 Yusuke Suzuki <utatane.tea@gmail.com>
1498 Use filterRootId in SelectorQuery even if CSS JIT is not enabled
1499 https://bugs.webkit.org/show_bug.cgi?id=142703
1501 Reviewed by Benjamin Poulain.
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.
1507 * dom/SelectorQuery.cpp:
1508 (WebCore::filterRootById):
1509 (WebCore::SelectorDataList::executeSingleSelectorData):
1510 (WebCore::SelectorDataList::execute):
1511 * dom/SelectorQuery.h:
1513 2015-03-18 Zalan Bujtas <zalan@apple.com>
1515 Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
1516 https://bugs.webkit.org/show_bug.cgi?id=142809
1518 Reviewed by Antti Koivisto.
1520 FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
1522 No change in functionality.
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):
1537 2015-03-18 Zalan Bujtas <zalan@apple.com>
1539 Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
1540 https://bugs.webkit.org/show_bug.cgi?id=142785
1542 Reviewed by Antti Koivisto.
1544 This is in transition to support <br>. A particular position could point to multiple
1545 segments when <br> is directly followed by text.
1547 No change in functionality.
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):
1559 2015-03-17 Simon Fraser <simon.fraser@apple.com>
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
1565 Reviewed by Darin Adler.
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.
1571 Avoid calling paintOverflowControlsForFragments() if there are no scrollbars,
1572 and don't both setting up an empty clip just to paint nothing.
1574 * rendering/RenderLayer.cpp:
1575 (WebCore::RenderLayer::paintLayerContents):
1576 (WebCore::RenderLayer::paintOverflowControlsForFragments):
1578 2015-03-18 Per Arne Vollan <peavo@outlook.com>
1580 [WinCairo] Unreviewed build fix after r181665.
1582 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1583 (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
1585 2015-03-18 Joseph Pecoraro <pecoraro@apple.com>
1587 Remove unused "preprocessor" parameter to sub-CodeGenerators
1588 https://bugs.webkit.org/show_bug.cgi?id=142793
1590 Reviewed by Darin Adler.
1592 * bindings/scripts/CodeGenerator.pm:
1595 * bindings/scripts/CodeGeneratorObjC.pm:
1597 2015-03-18 Zalan Bujtas <zalan@apple.com>
1599 Simple line layout: Split fragments on renderer boundary on the fly.
1600 https://bugs.webkit.org/show_bug.cgi?id=142579
1602 Reviewed by Antti Koivisto.
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.
1608 Test: fast/text/simple-line-with-multiple-renderers.html
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.
1655 2015-03-18 Manuel Rego Casasnovas <rego@igalia.com>
1657 Flex and grid items should be painted as inline-blocks
1658 https://bugs.webkit.org/show_bug.cgi?id=142266
1660 Reviewed by Darin Adler.
1662 Based on Blink r157004 by <cbiesinger@chromium.org>.
1663 https://src.chromium.org/viewvc/blink?revision=157004&view=revision
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.
1670 Extracted inline blocks painting code from InlineElementBox and moved to
1671 a helper method that will be reused for flexboxes and grids.
1673 Tests: css3/flexbox/flex-item-text-background-not-interleaved.html
1674 fast/css-grid-layout/grid-item-text-background-not-interleaved.html
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
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.
1695 2015-03-18 Chris Dumez <cdumez@apple.com>
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>
1701 Reviewed by Antti Koivisto.
1703 Add diagnostic logging key needed for network efficacy logging.
1705 * page/DiagnosticLoggingKeys.cpp:
1706 (WebCore::DiagnosticLoggingKeys::retrievalRequestKey):
1707 * page/DiagnosticLoggingKeys.h:
1709 2015-03-18 Tim Horton <timothy_horton@apple.com>
1711 Fix the build after r181660
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.
1720 2015-03-17 Conrad Shultz <conrad_shultz@apple.com>
1722 Ignore some deprecation warnings
1723 https://bugs.webkit.org/show_bug.cgi?id=142813
1725 Reviewed by Mark Rowe.
1727 Fixing the deprecations is tracked by: <rdar://problem/20201450>
1729 * editing/cocoa/HTMLConverter.mm:
1730 (HTMLConverter::_processElement):
1732 2015-03-17 Commit Queue <commit-queue@webkit.org>
1734 Unreviewed, rolling out r181667, r181682, and r181683.
1735 https://bugs.webkit.org/show_bug.cgi?id=142812
1737 Broke multiple tests with ASan, plus dependent commits
1738 (Requested by ap on #webkit).
1740 Reverted changesets:
1742 "Simple line layout: Split fragments on renderer boundary on
1744 https://bugs.webkit.org/show_bug.cgi?id=142579
1745 http://trac.webkit.org/changeset/181667
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
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
1757 2015-03-17 Zalan Bujtas <zalan@apple.com>
1759 Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
1760 https://bugs.webkit.org/show_bug.cgi?id=142809
1762 Reviewed by Antti Koivisto.
1764 FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
1766 No change in functionality.
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):
1781 2015-03-17 Zalan Bujtas <zalan@apple.com>
1783 Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
1784 https://bugs.webkit.org/show_bug.cgi?id=142785
1786 Reviewed by Antti Koivisto.
1788 This is in transition to support <br>. A particular position could point to multiple
1789 segments when <br> is directly followed by text.
1791 No change in functionality.
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):
1803 2015-03-17 Chris Dumez <cdumez@apple.com>
1805 [Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
1806 https://bugs.webkit.org/show_bug.cgi?id=142752
1807 <rdar://problem/20176731>
1809 Reviewed by Antti Koivisto.
1811 setSharedTimerFireInterval() / stopSharedTimer() are expensive on Mac
1812 and iOS on pages using a lot of timers.
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%).
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
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.
1832 Doing so greatly decreases CPU time spend in:
1833 - setSharedTimerFireInterval(): 15.4% -> 4.6%
1834 - stopSharedTimer(): 14.6% -> 8.6%
1836 Overall CPU time spent on bing.com in timerFired() goes down from
1839 This patch also refactors the SharedTimer code to share as much as
1840 possible between Mac and iOS.
1842 This patch is based in part on the following patch:
1843 http://trac.webkit.org/changeset/143210
1845 [1] https://developer.apple.com/library/prerelease/ios/documentation/CoreFoundation/Reference/CFRunLoopTimerRef/index.html#//apple_ref/c/func/CFRunLoopTimerSetNextFireDate
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):
1877 2015-03-17 Tim Horton <timothy_horton@apple.com>
1879 Cannot invoke action menus anymore
1880 https://bugs.webkit.org/show_bug.cgi?id=142797
1881 <rdar://problem/20032670>
1883 Reviewed by Beth Dakin.
1885 * platform/spi/mac/NSMenuSPI.h:
1886 Add additional NSMenu SPI.
1888 2015-03-17 Zalan Bujtas <zalan@apple.com>
1890 Simple line layout: Split fragments on renderer boundary on the fly.
1891 https://bugs.webkit.org/show_bug.cgi?id=142579
1893 Reviewed by Antti Koivisto.
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.
1899 Test: fast/text/simple-line-with-multiple-renderers.html
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.
1946 2015-03-17 Jeremy Jones <jeremyj@apple.com>
1948 When tab hides, pause fullscreen and exit normally.
1949 https://bugs.webkit.org/show_bug.cgi?id=142685
1951 Reviewed by Eric Carlson.
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.
1956 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1957 (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
1959 2015-03-17 Per Arne Vollan <peavo@outlook.com>
1961 [WinCairo] Video position is incorrect when located inside a frame.
1962 https://bugs.webkit.org/show_bug.cgi?id=142784
1964 Reviewed by Brent Fulgham.
1966 We need to take the enclosing frame's position into account, when finding the video position.
1968 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1969 (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
1971 2015-03-17 Benjamin Poulain <bpoulain@apple.com>
1973 Compile character ranges targeting the same state as range check in the bytecode
1974 https://bugs.webkit.org/show_bug.cgi?id=142759
1976 Reviewed by Alex Christensen.
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.
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
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).
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.
2001 * contentextensions/DFABytecodeInterpreter.cpp:
2002 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2003 Range checks in the interpreter.
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.
2010 * contentextensions/NFAToDFA.cpp:
2011 (WebCore::ContentExtensions::simplifyTransitions):
2012 A very simple DFA optimization function: it only reduce the strength of ranges.
2014 (WebCore::ContentExtensions::NFAToDFA::convert):
2016 2015-03-17 Jer Noble <jer.noble@apple.com>
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
2021 Reviewed by Eric Carlson.
2023 Null check m_player before derefencing.
2025 * html/HTMLMediaElement.cpp:
2026 (WebCore::HTMLMediaElement::parseAttribute):
2028 2015-03-17 Beth Dakin <bdakin@apple.com>
2030 DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on
2032 https://bugs.webkit.org/show_bug.cgi?id=142700
2034 rdar://problem/20165168
2036 Reviewed by Tim Horton.
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):
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):
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):
2055 2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
2057 Use a better parameter name for Document.getElementsByClassName
2058 https://bugs.webkit.org/show_bug.cgi?id=142771
2060 Reviewed by Chris Dumez.
2062 * bindings/objc/PublicDOMInterfaces.h:
2065 2015-03-17 Timothy Horton <timothy_horton@apple.com>
2067 Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
2068 https://bugs.webkit.org/show_bug.cgi?id=142776
2069 <rdar://problem/18921338>
2071 Reviewed by Alexey Proskuryakov.
2073 Test: fast/animation/request-animation-frame-unparented-iframe-crash.html
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.
2083 * dom/ScriptedAnimationController.cpp:
2084 (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
2085 If the page is null, bail.
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.
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
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.
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.
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.
2121 * page/ChromeClient.h:
2122 Return Nullopt (indicating a lack of override) by default.
2124 2015-03-17 Dean Jackson <dino@apple.com>
2126 Implement Scroll Container Animation Triggers
2127 https://bugs.webkit.org/show_bug.cgi?id=142732
2129 Attempt to fix the build.
2131 * css/CSSComputedStyleDeclaration.cpp: Add an #if ENABLE guard.
2133 2015-03-17 Dean Jackson <dino@apple.com>
2135 Implement Scroll Container Animation Triggers
2136 https://bugs.webkit.org/show_bug.cgi?id=142732
2138 Reviewed by Simon Fraser.
2140 Test: animations/trigger-container-scroll-simple.html
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).
2146 * css/CSSComputedStyleDeclaration.cpp: Add CSSPropertyWebkitAnimationTrigger
2147 so that this property will appear in the inspector.
2149 * page/FrameView.cpp:
2150 (WebCore::FrameView::sendScrollEvent): If the page has scrolled, let the animation
2151 controller know about it.
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
2158 (WebCore::AnimationBase::timeToNextService): Use the scroll position as
2159 an input to the update timer if a trigger is involved.
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:
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=):
2177 2015-03-17 Simon Fraser <simon.fraser@apple.com>
2179 Move some code from LogicalSelectionOffsetCaches into RenderElement
2180 https://bugs.webkit.org/show_bug.cgi?id=142758
2182 Reviewed by Myles C. Maxfield.
2184 LogicalSelectionOffsetCaches had some useful code regarding containing blocks etc
2185 that should be used in more places, so move it into RenderElement.
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):
2210 2015-03-17 Alex Christensen <achristensen@webkit.org>
2212 [WinCairo] Unreviewed build fix after r181640.
2214 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2215 Tell Windows how to find ShaderLang.h.
2217 2015-03-17 Chris Dumez <cdumez@apple.com>
2219 'pageLoaded' diagnostic logging is too verbose
2220 https://bugs.webkit.org/show_bug.cgi?id=142727
2221 <rdar://problem/18937048>
2223 Reviewed by Eric Carlson.
2225 Make 'pageLoaded' diagnostic logging less verbose:
2226 - Log once per main frame instead of once for subframe
2229 * loader/FrameLoader.cpp:
2230 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2232 2015-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
2234 [GTK] Wrong transfer annotations used in GObject DOM bindings
2235 https://bugs.webkit.org/show_bug.cgi?id=142780
2237 Reviewed by Gustavo Noronha Silva.
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.
2246 * bindings/gobject/WebKitDOMCustomUnstable.h:
2247 * bindings/scripts/CodeGeneratorGObject.pm:
2248 (GetTransferTypeForReturnType):
2251 2015-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
2253 [GTK] WebKitDOM objects leaking
2254 https://bugs.webkit.org/show_bug.cgi?id=118788
2256 Reviewed by Darin Adler and Sergio Villar Senin.
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.
2262 * bindings/gobject/DOMObjectCache.cpp:
2264 2015-03-17 Zan Dobersek <zdobersek@igalia.com>
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
2269 Reviewed by Darin Adler.
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
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.
2281 * platform/graphics/ANGLEWebKitBridge.h:
2282 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2284 2015-03-17 Matt Baker <mattbaker@apple.com>
2286 Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
2287 https://bugs.webkit.org/show_bug.cgi?id=142029
2289 Reviewed by Timothy Hatcher.
2291 Add new functionality to the Inspector timelines backend to add runloop data to timeline recordings.
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.
2303 * inspector/InspectorTimelineAgent.h:
2305 * platform/cf/RunLoopObserver.cpp:
2306 (WebCore::RunLoopObserver::schedule):
2307 Wrapper changed to allow observing arbitrary runloop activities.
2309 * platform/cf/RunLoopObserver.h:
2311 2015-03-17 Philippe Normand <pnormand@igalia.com>
2313 [GTK] basic OpenWebRTC build support
2314 https://bugs.webkit.org/show_bug.cgi?id=142393
2316 Reviewed by Carlos Garcia Campos.
2318 * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
2320 2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
2322 Remove never used "useLayerOnTop" bindings generator argument
2323 https://bugs.webkit.org/show_bug.cgi?id=142773
2325 Reviewed by Darin Adler.
2327 * bindings/scripts/CodeGenerator.pm:
2328 * bindings/scripts/CodeGeneratorJS.pm:
2329 * bindings/scripts/CodeGeneratorObjC.pm:
2330 * bindings/scripts/generate-bindings.pl:
2332 2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
2334 Enable ES6 classes by default
2335 https://bugs.webkit.org/show_bug.cgi?id=142774
2337 Reviewed by Gavin Barraclough.
2339 * Configurations/FeatureDefines.xcconfig:
2341 2015-03-16 Simon Fraser <simon.fraser@apple.com>
2343 Update the debug overlays after layout
2344 https://bugs.webkit.org/show_bug.cgi?id=142768
2346 Reviewed by Zalan Bujtas.
2348 The debug overlays need to be updated after layout, in case elements with wheel event handlers
2351 DebugPageOverlays::didLayout() is cheap if there are no overlays.
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.
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):
2364 2015-03-16 Jon Lee <jonlee@apple.com>
2366 Unreviewed fix for crash after r181608.
2368 * WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.
2370 2015-03-16 Simon Fraser <simon.fraser@apple.com>
2372 Generalize the Document code that maintains a set of nodes with event handlers
2373 https://bugs.webkit.org/show_bug.cgi?id=142762
2375 Reviewed by Zalan Bujtas, Darin Adler.
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.
2380 Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
2381 to take a reference.
2384 (WebCore::Document::prepareForDestruction): References
2385 (WebCore::Document::didAddTouchEventHandler): Ditto.
2386 (WebCore::Document::didRemoveEventTargetNode): Ditto.
2388 (WebCore::Document::touchEventTargets): No-one calls this; just remove the non
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.
2396 2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
2398 Web Inspector: Object Previews in Indexed DB tables
2399 https://bugs.webkit.org/show_bug.cgi?id=140813
2401 Reviewed by Timothy Hatcher.
2403 * inspector/InspectorIndexedDBAgent.cpp:
2404 Include previews with object store objects.
2406 2015-03-16 Jer Noble <jer.noble@apple.com>
2408 [Mac] Update missing image UI
2409 https://bugs.webkit.org/show_bug.cgi?id=142592
2411 Reviewed by Darin Adler.
2413 Update the broken image glyphs with new art (including a 3x image).
2415 Test: fast/hidpi/broken-image-icon-very-hidpi.html
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):
2424 2015-03-16 Dean Jackson <dino@apple.com>
2426 Parsing and Style Resolution of Container-based Animation Triggers
2427 https://bugs.webkit.org/show_bug.cgi?id=142687
2428 <rdar://problem/20170007>
2430 Reviewed by Simon Fraser.
2432 Take 2 after the previous patch was rolled out.
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
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.
2445 Tests: animations/trigger-computed-style.html
2446 animations/trigger-parsing.html
2448 * WebCore.xcodeproj/project.pbxproj: Add the new files.
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):
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):
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.
2473 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
2475 * css/CSSToStyleMap.cpp:
2476 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
2477 an Animation object.
2478 * css/CSSToStyleMap.h:
2480 * css/CSSValue.cpp: Handle the new CSSValue type.
2481 (WebCore::CSSValue::equals):
2482 (WebCore::CSSValue::cssText):
2483 (WebCore::CSSValue::destroy):
2485 (WebCore::CSSValue::isAnimationTriggerScrollValue):
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):
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):
2513 2015-03-16 Alex Christensen <achristensen@webkit.org>
2515 Progress towards CMake on Mac
2516 https://bugs.webkit.org/show_bug.cgi?id=142747
2518 Reviewed by Chris Dumez.
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.
2527 2015-03-16 Joanmarie Diggs <jdiggs@igalia.com>
2529 AX: Crash viewing http://www.last.fm/
2530 https://bugs.webkit.org/show_bug.cgi?id=142309
2532 Reviewed by Chris Fleizach.
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.
2539 Test: platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html
2541 * accessibility/atk/AXObjectCacheAtk.cpp:
2542 (WebCore::AXObjectCache::attachWrapper):
2544 2015-03-16 Commit Queue <commit-queue@webkit.org>
2546 Unreviewed, rolling out r181492.
2547 https://bugs.webkit.org/show_bug.cgi?id=142756
2549 May have regressed PLT (Requested by anttik on #webkit).
2553 "Cache glyph widths to GlyphPages"
2554 https://bugs.webkit.org/show_bug.cgi?id=142028
2555 http://trac.webkit.org/changeset/181492
2557 2015-03-16 Roger Fong <roger_fong@apple.com>
2559 [WebGL2] Instancing draw calls.
2560 https://bugs.webkit.org/show_bug.cgi?id=126939.
2561 <rdar://problem/15002379>
2563 Reviewed by Dean Jackson.
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
2569 These tests will be landed along with other modified extension conformance tests
2570 once approval from Khronos is received.
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:
2591 2015-03-16 Commit Queue <commit-queue@webkit.org>
2593 Unreviewed, rolling out r181572.
2594 https://bugs.webkit.org/show_bug.cgi?id=142755
2596 Caused weird test failures in transitions and animations
2597 (Requested by dino on #webkit).
2601 "Parsing and Style Resolution of Container-based Animation
2603 https://bugs.webkit.org/show_bug.cgi?id=142687
2604 http://trac.webkit.org/changeset/181572
2606 2015-03-16 Yoav Weiss <yoav@yoav.ws>
2608 Remove setCachedImage from HTMLImageElement since it is not used
2609 https://bugs.webkit.org/show_bug.cgi?id=142740
2611 Reviewed by Chris Dumez.
2613 No new tests since this patch is just removing dead code.
2615 HTMLImageElement::setCachedImage is not being called by anyone.
2616 This patch removes it, since it's dead code.
2618 * html/HTMLImageElement.h:
2619 (WebCore::HTMLImageElement::setCachedImage): Deleted.
2621 2015-03-16 Brent Fulgham <bfulgham@apple.com>
2623 WebKit1 Clients Are Not Reliably Repainted
2624 https://bugs.webkit.org/show_bug.cgi?id=142750
2625 <rdar://problem/20042453>
2627 Reviewed by Simon Fraser.
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.
2633 (WebCore::FrameView::inPaintableState): Added.
2635 2015-03-16 Chris Dumez <cdumez@apple.com>
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>
2641 Reviewed by Andreas Kling.
2643 Make DatabaseContext suspendable if there is no pending database
2645 - No pending Database creation JS callback
2646 - No pending transaction(s)
2648 Suspending is safe in this case because we are not going to interrupt
2649 any database activity, nor fire any JS event.
2651 This greatly increases the likelihood of pages using websql to enter
2654 Tests: fast/history/page-cache-webdatabase-no-transaction-db.html
2655 fast/history/page-cache-webdatabase-pending-transaction.html
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:
2668 2015-03-16 Brady Eidson <beidson@apple.com>
2670 Addressing additional review feedback after http://trac.webkit.org/changeset/181565
2671 https://bugs.webkit.org/show_bug.cgi?id=142733
2673 Reviewed by Darin Adler.
2675 * loader/icon/IconController.cpp:
2676 (WebCore::IconController::startLoader): Null check page()
2678 2015-03-16 Roger Fong <roger_fong@apple.com>
2680 [Win] Unreviewed build fix attempt after r181571.
2682 * WebCore.vcxproj/WebCore.vcxproj:
2684 2015-03-16 Roger Fong <roger_fong@apple.com>
2686 [WebGL2] Multiple Render Targets.
2687 https://bugs.webkit.org/show_bug.cgi?id=126994.
2688 <rdar://problem/15815766>
2690 Reviewed by Dean Jackson.
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.
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:
2720 2015-03-16 Dean Jackson <dino@apple.com>
2722 Parsing and Style Resolution of Container-based Animation Triggers
2723 https://bugs.webkit.org/show_bug.cgi?id=142687
2724 <rdar://problem/20170007>
2726 Reviewed by Simon Fraser.
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
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.
2739 Tests: animations/trigger-computed-style.html
2740 animations/trigger-parsing.html
2742 * WebCore.xcodeproj/project.pbxproj: Add the new files.
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):
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):
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.
2767 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
2769 * css/CSSToStyleMap.cpp:
2770 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
2771 an Animation object.
2772 * css/CSSToStyleMap.h:
2774 * css/CSSValue.cpp: Handle the new CSSValue type.
2775 (WebCore::CSSValue::equals):
2776 (WebCore::CSSValue::cssText):
2777 (WebCore::CSSValue::destroy):
2779 (WebCore::CSSValue::isAnimationTriggerScrollValue):
2781 * platform/animation/Animation.h: Add AnimationTrigger as a new field.
2782 (WebCore::Animation::isTriggerSet):
2783 (WebCore::Animation::isEmpty):
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):
2805 2015-03-15 Roger Fong <roger_fong@apple.com>
2807 [WebGL2] Vertex Array Objects.
2808 https://bugs.webkit.org/show_bug.cgi?id=126944.
2809 <rdar://problem/15002455>
2811 Reviewed by Dean Jackson.
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.
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):
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):
2841 Have WebGLVertexArrayObjectOES and WebGLVertexArrayObject inherit from WebGLRenderingContextBase.
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:
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):
2886 Handle construction of WebGLGetInfo using WebGLVertexArrayObject.
2887 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
2889 * html/canvas/WebGLGetInfo.cpp:
2890 (WebCore::WebGLGetInfo::WebGLGetInfo):
2891 (WebCore::WebGLGetInfo::getWebGLVertexArrayObjectOES):
2892 (WebCore::WebGLGetInfo::getWebGLVertexArrayObject):
2893 * html/canvas/WebGLGetInfo.h:
2895 2015-03-16 Brent Fulgham <bfulgham@apple.com>
2897 Potentially uninitialized Inspector values
2898 https://bugs.webkit.org/show_bug.cgi?id=142730
2900 Reviewed by Joseph Pecoraro.
2902 * inspector/InspectorDOMAgent.cpp:
2903 (WebCore::parseColor): Make sure color values are given an initial value.
2905 2015-03-16 Brady Eidson <beidson@apple.com>
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
2910 Patch by Sam Weinig. Reviewed by Brady Eidson.
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.
2916 2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
2918 Allow clients to selectively disable plug-ins
2919 https://bugs.webkit.org/show_bug.cgi?id=142506
2921 Reviewed by Anders Carlsson.
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:
2926 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
2929 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
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.
2935 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
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.
2940 * dom/DOMImplementation.cpp:
2941 (WebCore::DOMImplementation::createDocument):
2942 Update to reflect function rename.
2944 * loader/SubframeLoader.cpp:
2945 (WebCore::findPluginMIMETypeFromURL):
2946 Adopt getWebVisibleMimesAndPluginIndices().
2947 (WebCore::logPluginRequest):
2948 Update to reflect function rename.
2949 (WebCore::SubframeLoader::shouldUsePlugin):
2952 * platform/PlatformStrategies.h:
2953 Export platformStrategies(), since it is now used in WebProcess.cpp.
2955 * plugins/DOMMimeType.cpp:
2956 (WebCore::DOMMimeType::type):
2957 (WebCore::DOMMimeType::description):
2958 (WebCore::DOMMimeType::mimeClassInfo):
2959 Adopt getWebVisibleMimesAndPluginIndices().
2960 (WebCore::DOMMimeType::enabledPlugin):
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.
2967 * plugins/DOMMimeTypeArray.cpp:
2968 (WebCore::DOMMimeTypeArray::length):
2969 Adopt getWebVisibleMimesAndPluginIndices().
2970 (WebCore::DOMMimeTypeArray::item):
2972 (WebCore::DOMMimeTypeArray::canGetItemsForName):
2974 (WebCore::DOMMimeTypeArray::namedItem):
2977 * plugins/DOMPlugin.cpp:
2978 (WebCore::DOMPlugin::pluginInfo):
2979 Adopt getWebVisiblePlugins().
2980 (WebCore::DOMPlugin::item):
2981 Adopt getWebVisibleMimesAndPluginIndices().
2982 (WebCore::DOMPlugin::canGetItemsForName):
2984 (WebCore::DOMPlugin::namedItem):
2987 * plugins/DOMPlugin.h:
2988 (WebCore::DOMPlugin::pluginInfo): Deleted.
2990 * plugins/DOMPluginArray.cpp:
2991 (WebCore::DOMPluginArray::length):
2992 Adopt getWebVisiblePlugins().
2993 (WebCore::DOMPluginArray::item):
2995 (WebCore::DOMPluginArray::canGetItemsForName):
2997 (WebCore::DOMPluginArray::namedItem):
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.
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.
3030 * plugins/PluginStrategy.h:
3031 Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
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):
3039 (JSC::EncodingTraits<PluginInfo>::encodeValue):
3040 Handle the new members in PluginInfo.
3041 (JSC::EncodingTraits<PluginInfo>::decodeValue):
3044 * replay/WebInputs.json:
3045 Teach Replay about PluginLoadClientPolicy.
3047 2015-03-16 Max Stepin <maxstepin@gmail.com>
3050 https://bugs.webkit.org/show_bug.cgi?id=17022
3052 Reviewed by Carlos Garcia Campos.
3054 Test: fast/images/animated-png.html
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):
3082 2015-03-15 Benjamin Poulain <benjamin@webkit.org>
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
3087 Reviewed by Brent Fulgham.
3089 Fix attribute matching with:
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
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.
3103 * cssjit/SelectorCompiler.cpp:
3104 (WebCore::SelectorCompiler::attributeValueBeginsWith):
3105 (WebCore::SelectorCompiler::attributeValueEndsWith):
3106 (WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
3108 2015-03-15 Dan Bernstein <mitz@apple.com>
3110 Fixed the iOS build after r181522.
3112 * page/FrameView.cpp:
3113 (WebCore::FrameView::performPostLayoutTasks):
3115 2015-03-15 Andy Estes <aestes@apple.com>
3117 [Content Filtering] Adopt new NEFilterSource SPI
3118 https://bugs.webkit.org/show_bug.cgi?id=142710
3119 rdar://problem/19023855
3121 Reviewed by Dan Bernstein.
3123 Teach NetworkExtensionContentFilter to use a new, alternate NEFilterSource SPI on platforms where it is available.
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.
3144 2015-03-15 Brent Fulgham <bfulgham@apple.com>
3146 Scroll snap points are not supported on iframe content
3147 https://bugs.webkit.org/show_bug.cgi?id=142582
3148 <rdar://problem/20121319>
3150 Tested by css3/scroll-snap/scroll-snap-iframe.html
3152 Reviewed by Simon Fraser.
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.
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.
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.
3164 2015-03-15 Simon Fraser <simon.fraser@apple.com>
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.
3170 Fixes an assertion in animations/animation-on-inline-crash.html
3172 * page/animation/ImplicitAnimation.cpp:
3173 (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
3174 * page/animation/KeyframeAnimation.cpp:
3175 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
3177 2015-03-15 Simon Fraser <simon.fraser@apple.com>
3179 And another fix. Thanks to Hunseop Jeong for the fix.
3181 * html/HTMLInputElement.cpp:
3182 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
3183 (WebCore::HTMLInputElement::didMoveToNewDocument):
3185 2015-03-15 Simon Fraser <simon.fraser@apple.com>
3187 Fix the touch-event build.
3190 (WebCore::Document::didAddTouchEventHandler):
3191 (WebCore::Document::didRemoveTouchEventHandler):
3193 2015-03-15 Simon Fraser <simon.fraser@apple.com>
3195 Reduce the side-effects of animations turning off overlap testing
3196 https://bugs.webkit.org/show_bug.cgi?id=92791
3198 Reviewed by Dean Jackson.
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.
3204 Fix by maintaining overlap, but computing an overlap extent that takes the animation
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.
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
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
3278 (WebCore::RenderGeometryMap::pushMappingsToAncestor): Save and restore the UseTransforms
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.
3314 2015-03-15 Simon Fraser <simon.fraser@apple.com>
3316 Clean up related to wheelEvent names
3317 https://bugs.webkit.org/show_bug.cgi?id=142713
3319 Reviewed by Anders Carlsson.
3321 Add EventNames::isWheelEventType() and use it in places that test for the
3322 two wheel event names.
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.
3330 (WebCore::EventNames::isWheelEventType):
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.
3344 2015-03-15 Simon Fraser <simon.fraser@apple.com>
3346 Remove a redundant repaint when a layer becomes composited
3347 https://bugs.webkit.org/show_bug.cgi?id=142711
3349 Reviewed by Anders Carlsson.
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.
3356 * rendering/RenderLayerCompositor.cpp:
3357 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3359 2015-03-15 Benjamin Poulain <bpoulain@apple.com>
3361 Change the exact attribute matching to be ASCII case-insensitive
3362 https://bugs.webkit.org/show_bug.cgi?id=142609
3364 Reviewed by Darin Adler.
3366 In CSS, testing attribute values should be ASCII case-insensitive,
3367 previously we were using full unicode case conversion.
3369 Test: fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive.html
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.
3377 * css/SelectorCheckerTestFunctions.h:
3378 (WebCore::equalIgnoringASCIICase): Deleted.
3379 * cssjit/SelectorCompiler.cpp:
3380 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
3382 2015-03-15 Brent Fulgham <bfulgham@apple.com>
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>
3388 Reviewed by Anders Carlsson.
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.
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.
3403 2015-03-15 Csaba Osztrogonác <ossy@webkit.org>
3405 Fix run-bindings-tests on the WinCairo bot
3406 https://bugs.webkit.org/show_bug.cgi?id=142588
3408 Reviewed by Alex Christensen.
3410 * bindings/scripts/test/JS/JSFloat6