1 2015-03-24 Dean Jackson <dino@apple.com>
3 Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
4 https://bugs.webkit.org/show_bug.cgi?id=143039
6 Unreviewed build fix for newer versions of OS X.
8 * rendering/RenderThemeMac.mm: Define a null language parameter. This
9 seemed better than turning the clang warning off for just that
11 (WebCore::AttachmentLayout::layOutTitle):
12 (WebCore::AttachmentLayout::layOutSubtitle):
14 2015-03-24 Dan Bernstein <mitz@apple.com>
16 Another attempt to fix the build.
18 * WebCore.xcodeproj/project.pbxproj:
19 * platform/spi/cocoa/QuartzCoreSPI.h:
21 2015-03-24 Alex Christensen <achristensen@webkit.org>
23 [Content Extensions] Add multi-DFA compiling and interpreting.
24 https://bugs.webkit.org/show_bug.cgi?id=143010
26 Reviewed by Benjamin Poulain.
28 * contentextensions/ContentExtensionCompiler.cpp:
29 (WebCore::ContentExtensions::compileRuleList):
30 Compile multiple NFAs to DFAs.
31 * contentextensions/ContentExtensionsBackend.cpp:
32 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
33 Fixed a bug when there are no non-universal actions.
34 We still need to report that no ignore-previous-rules was hit to apply the
35 universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
36 and skipped in DFABytecodeInterpreter::interpret.
37 * contentextensions/DFABytecodeCompiler.cpp:
38 (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
39 Add a header for each DFA.
40 * contentextensions/DFABytecodeInterpreter.cpp:
41 (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
42 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
43 Interpret as many DFAs as there are in the bytecode.
45 2015-03-24 Dan Bernstein <mitz@apple.com>
47 Tried to fix the EWS build.
49 * platform/spi/cocoa/QuartzCoreSPI.h:
51 2015-03-24 Commit Queue <commit-queue@webkit.org>
53 Unreviewed, rolling out r181898 and r181909.
54 https://bugs.webkit.org/show_bug.cgi?id=143034
56 Broke fast/regions/auto-size/autoheight-two-pass-layout-
57 complex-002.html (Requested by ap on #webkit).
61 "Improve the offsetWidth/Height layout optimization"
62 https://bugs.webkit.org/show_bug.cgi?id=143008
63 http://trac.webkit.org/changeset/181898
65 "Disable layout dimensions optimization for RenderRegions"
66 https://bugs.webkit.org/show_bug.cgi?id=143017
67 http://trac.webkit.org/changeset/181909
69 2015-03-24 Zhuo Li <zachli@apple.com>
71 Scripts running in isolated world should not subject to a page's CSP about 'eval'.
72 https://bugs.webkit.org/show_bug.cgi?id=141316.
74 Reviewed by Geoffrey Garen.
76 * bindings/js/ScriptController.cpp:
77 (WebCore::ScriptController::initScript):
78 We should not impose the main world Content Security Policy onto the isolated world.
80 2015-03-24 Chris Dumez <cdumez@apple.com>
82 [Mac] Use .cpp file extension instead of .mm for SharedTimerCF and PowerObserverMac
83 https://bugs.webkit.org/show_bug.cgi?id=143026
85 Reviewed by Andy Estes.
87 Use .cpp file extension instead of .mm for SharedTimerCF and
90 * WebCore.xcodeproj/project.pbxproj:
91 * platform/cf/SharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.mm.
92 (WebCore::timerFired):
93 Use WTF::AutodrainedPool instead of @autoreleasepool {}.
95 * platform/mac/PowerObserverMac.cpp: Renamed from Source/WebCore/platform/mac/PowerObserverMac.mm.
97 2015-03-24 Yusuke Suzuki <utatane.tea@gmail.com>
99 REGRESSION (r181458): Heap use-after-free in JSSetIterator destructor
100 https://bugs.webkit.org/show_bug.cgi?id=142696
102 Reviewed and tweaked by Geoffrey Garen.
104 Use JSSetIterator/JSMapIterator to iterate over JSSet and JSMap.
106 * ForwardingHeaders/runtime/JSMapIterator.h: Added.
107 * ForwardingHeaders/runtime/JSSetIterator.h: Added.
108 * bindings/js/SerializedScriptValue.cpp:
109 (WebCore::CloneSerializer::serialize):
111 2015-03-24 Dan Bernstein <mitz@apple.com>
113 Tried to fix the iOS Simulator build.
115 * platform/spi/cocoa/QuartzCoreSPI.h:
117 2015-03-24 Benjamin Poulain <bpoulain@apple.com>
119 Make URL filter patterns matching consistent and add a simple canonicalization step
120 https://bugs.webkit.org/show_bug.cgi?id=142998
122 Reviewed by Alex Christensen.
124 This patch makes two changes to the url filter input:
125 -Make the matching "Search" by default, the pattern can now appear anywhere
126 in the URL by default.
127 -Make the input a little less fragile: do not explode on valid input
128 that is not formatted in a certain way.
130 To implement the search behavior, I simply add an implict ".*" in front of the patterns
131 when that make sense.
133 To make the input more solid, we do some little modification on the input:
134 -Remove duplicated ".*".
135 -Remove matching suffixes that do not bring new information.
136 -Unify all the ".*" in the same format.
138 Why do that here? That should be done through a graph analysis on the machine.
140 The reason is this is incredibly cheap compared to the graph analysis. Any state
141 removed upfront will save the handling of several hundred nodes in the deterministic
144 * contentextensions/URLFilterParser.cpp:
145 (WebCore::ContentExtensions::Term::isKnownToMatchAnyString):
146 (WebCore::ContentExtensions::Term::isUniversalTransition):
147 (WebCore::ContentExtensions::GraphBuilder::finalize):
148 (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
149 (WebCore::ContentExtensions::GraphBuilder::fail):
150 (WebCore::ContentExtensions::GraphBuilder::simplifySunkTerms):
152 2015-03-24 Chris Dumez <cdumez@apple.com>
154 Regression(r181671): Caused Timer-related crashes on iOS / WK1
155 https://bugs.webkit.org/show_bug.cgi?id=143025
157 Reviewed by Andy Estes.
159 Call CFRunLoopAddTimer() on WebThreadRunLoop() instead of
160 CFRunLoopGetCurrent() for iOS, as we did before r181671.
162 I inadvertently changed this in r181671 when merging the Mac
163 and iOS implementations.
165 No new tests, already covered by existing tests.
167 * platform/cf/SharedTimerCF.mm:
168 (WebCore::setSharedTimerFireInterval):
170 2015-03-24 Dan Bernstein <mitz@apple.com>
172 WebCore part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
173 https://bugs.webkit.org/show_bug.cgi?id=143023
175 Reviewed by Tim Horton.
177 * platform/spi/cocoa/QuartzCoreSPI.h: Added the declaration of
178 CARenderServerRenderLayerWithTransform.
180 2015-03-24 David Hyatt <hyatt@apple.com>
182 Disable layout dimensions optimization for RenderRegions
183 https://bugs.webkit.org/show_bug.cgi?id=143017
185 Reviewed by Dean Jackson.
188 (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
189 Turn off the optimization for regions, since auto height regions can change size
190 without needing a layout.
192 2015-03-24 Beth Dakin <bdakin@apple.com>
194 Add events related to force click gesture
195 https://bugs.webkit.org/show_bug.cgi?id=142836
197 rdar://problem/20210239
199 Reviewed by Dean Jackson.
201 This patch adds six new events for the force click gesture:
203 webkitmouseforcewillbegin -> Event is sent just before mousedown to indicate that
204 force can be perceived if the user presses any harder. The author should prevent
205 default on this event to both prevent the user agent’s default force click
206 features and to receive the other 5 events.
208 webkitmouseforcechanged -> This event fires whenever force changes between the
209 mousedown and mouseup. It is a new type of mouse event that includes a force
210 variable which is a normalized number between 0 (corresponds to click) and 1
211 (corresponds to force click). In this patch, I have only added code to send this
212 event between mousedown and mouseforcedown, but as a followup patch, we plan to
213 send it through mouseup.
215 webkitmouseforcecancelled -> If the user releases their finger from the trackpad
216 after pressing hard enough to send webkitmouseforcewillbegin events but not hard
217 enough to force click, this event will be sent to indicate that the user bailed
220 webkitmouseforcedown -> The down part of the force click.
222 webkitmouseforceup -> The up part of the force click. This event is added in this
223 patch, but does not yet fire. That is work for a follow-up patch.
225 webkitmouseforceclick -> The equivalent of the click event for the force click.
226 Should fire just after webkitmouseforceup. This event is added in this patch, but
227 does not yet fire. That is work for a follow-up patch.
229 Add new files for WebKitMouseForceEvent to build systems.
230 * DerivedSources.cpp:
231 * DerivedSources.make:
232 * WebCore.vcxproj/WebCore.vcxproj:
233 * WebCore.vcxproj/WebCore.vcxproj.filters:
234 * WebCore.xcodeproj/project.pbxproj:
235 * WebCore.xcodeproj/project.pbxproj:
237 Plumbing for new events.
240 Code to dispatch the new events. Currently the code that calls these functions is
243 (WebCore::Element::dispatchMouseForceWillBegin):
244 (WebCore::Element::dispatchMouseForceChanged):
245 (WebCore::Element::dispatchMouseForceDown):
246 (WebCore::Element::dispatchMouseForceUp):
247 (WebCore::Element::dispatchMouseForceClick):
248 (WebCore::Element::dispatchMouseForceCancelled):
256 Our new type of mouse event that includes force.
257 * dom/WebKitMouseForceEvent.cpp: Added.
258 (WebCore::WebKitMouseForceEventInit::WebKitMouseForceEventInit):
259 (WebCore::WebKitMouseForceEvent::WebKitMouseForceEvent):
260 (WebCore::WebKitMouseForceEvent::~WebKitMouseForceEvent):
261 (WebCore::WebKitMouseForceEvent::eventInterface):
262 * dom/WebKitMouseForceEvent.h: Added.
263 * dom/WebKitMouseForceEvent.idl: Added.
266 * html/HTMLAttributeNames.in:
267 * html/HTMLBodyElement.cpp:
268 (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
269 * html/HTMLBodyElement.idl:
270 * html/HTMLElement.cpp:
271 (WebCore::HTMLElement::createEventHandlerNameMap):
272 * page/DOMWindow.idl:
273 * page/EventHandler.h:
274 (WebCore::EventHandler::lastMouseDownEvent):
276 2015-03-24 Anders Carlsson <andersca@apple.com>
278 Fix designated initializer violations
279 https://bugs.webkit.org/show_bug.cgi?id=143016
280 rdar://problem/20268858
282 Reviewed by Dan Bernstein.
284 Mark -[DOMObject init] as unavailable.
286 * bindings/objc/DOMObject.h:
287 * bindings/objc/DOMObject.mm:
290 2015-03-24 Benjamin Poulain <benjamin@webkit.org>
292 CSS Selectors Level 4: enable case-insensitive attribute matching by default
293 https://bugs.webkit.org/show_bug.cgi?id=142960
295 Reviewed by Andreas Kling.
297 All open issues have been resolved, enable the feature by default.
299 Test: fast/css/attribute-selector-case-insensitive.html
301 * css/CSSGrammar.y.in:
303 2015-03-24 Dean Jackson <dino@apple.com>
305 MediaControls: Scrubber and Time displays have the incorrect blending
306 https://bugs.webkit.org/show_bug.cgi?id=143011
307 <rdar://problem/20245251>
309 Reviewed by Eric Carlson.
311 The scrubber in media controls should use plus-darker blending. Then
312 the scrubber itself should use a slightly transparent black (55% opacity)
315 * Modules/mediacontrols/mediaControlsiOS.css:
316 (audio::-webkit-media-controls-timeline): Add the blend mode.
317 * Modules/mediacontrols/mediaControlsiOS.js:
318 (ControllerIOS.prototype.drawTimelineBackground): Start drawing with
319 transparency. I changed the order of rendering to make it
320 more clear we draw the three parts in left to right order.
322 2015-03-24 David Hyatt <hyatt@apple.com>
324 Improve the offsetWidth/Height layout optimization
325 https://bugs.webkit.org/show_bug.cgi?id=143008
327 Reviewed by Dean Jackson.
330 (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
332 Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
333 the positioning restrictions on the optimization check.
336 (WebCore::Element::offsetWidth):
337 (WebCore::Element::offsetHeight):
338 Change to use Element& instead of Element*.
340 (WebCore::Element::clientWidth):
341 (WebCore::Element::clientHeight):
342 (WebCore::Element::scrollWidth):
343 (WebCore::Element::scrollHeight):
344 Turn on the optimization for clientWidth/Height and scrollWidth/Height.
346 2015-03-24 Yoav Weiss <yoav@yoav.ws>
348 Stop image from displaying when src attribute is removed or emptied
349 https://bugs.webkit.org/show_bug.cgi?id=142677
351 Reviewed by Chris Dumez.
353 Previously, we ignored empty attribute as failed URL, and didn't update the
354 renderer when an image was removed. This patch fixes that.
356 Tests: fast/dom/HTMLImageElement/image-empty-src.html
357 fast/dom/HTMLImageElement/image-remove-src.html
359 * loader/ImageLoader.cpp:
360 (WebCore::ImageLoader::updateFromElement):
362 2015-03-17 Philippe Normand <pnormand@igalia.com>
364 [OpenWebRTC] RealtimeMediaSourceCenter implementation
365 https://bugs.webkit.org/show_bug.cgi?id=142476
367 Reviewed by Eric Carlson.
369 The old GStreamer MediaStreamCenter is replaced by the OpenWebRTC
370 RealtimeMediaSourceCenter. It is not yet able to correctly assess
371 MediaConstraints so it selects the first audio/video sources
372 available through OpenWebRTC.
374 * PlatformEfl.cmake: Add new files to the build.
375 * PlatformGTK.cmake: Ditto.
376 * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Removed.
377 * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Added.
378 (WebCore::initializeOpenWebRTC): Simple function to initialize the
379 framework, it is going to be used by the PeerConnection backend as well.
380 * platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Added.
381 * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Added.
382 (WebCore::mediaSourcesAvailableCallback): Function invoked once
383 the media sources discovery succeeded within OpenWebRTC.
384 (WebCore::RealtimeMediaSourceCenter::platformCenter): Instantiate
385 the OpenWebRTC RealtimeMediaSourceCenter.
386 (WebCore::RealtimeMediaSourceCenterOwr::RealtimeMediaSourceCenterOwr):
387 (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
388 (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
389 Schedule a discovery process for the capture sources.
390 (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Pick
391 the first audio/video sources and create a MediaStream accordingly.
392 (WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources):
394 (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
395 Method invoked once the capture sources process succeeded. Parse
396 them and create an internal cache of RealtimeMediaSources accordingly.
397 (WebCore::RealtimeMediaSourceCenterOwr::firstSource): Utility
398 function to fetch the first source of the given type from the
399 RealtimeMediaSources cache.
400 * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h.
401 * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Added.
403 2015-03-24 Csaba Osztrogonác <ossy@webkit.org>
405 [EFL] Add OpenWebRTC in jhbuild
406 https://bugs.webkit.org/show_bug.cgi?id=142778
408 Reviewed by Gyuyoung Kim.
410 Original patch by Philippe Normand <pnormand@igalia.com>
412 * PlatformEfl.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
414 2015-03-23 Yoav Weiss <yoav@yoav.ws>
416 Update empty image canvas tests and fix a related bug
417 https://bugs.webkit.org/show_bug.cgi?id=142694
419 Reviewed by Chris Dumez.
421 During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
422 we encountered an issue with canvas tests related to empty image handling
423 when drawn or used as a pattern. After updating these tests, an issue with
424 pattern handling was encountered.
426 The spec, as well as Chrome's implementation, say that when an empty image
427 is used as a pattern, createPattern should return null. See
428 https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
429 Instead, createPattern returned an exception in this case.
430 This patch fixes that and makes sure that it returns a null when image loading hasn't started.
432 Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
433 canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
434 canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
435 canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
436 canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html
438 * html/canvas/CanvasRenderingContext2D.cpp:
439 (WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.
441 2015-03-23 Alex Christensen <achristensen@webkit.org>
443 Fix api tests after r181876.
445 * contentextensions/ContentExtensionsBackend.cpp:
446 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
447 Always append a CSSDisplayNoneStyleSheet action if no ignore-previous-rules is seen.
448 * loader/cache/CachedResourceLoader.cpp:
449 (WebCore::CachedResourceLoader::requestResource):
450 Changed an assertion to a null check.
452 2015-03-23 Dean Jackson <dino@apple.com>
454 Timelines are sharing the same canvas background
455 https://bugs.webkit.org/show_bug.cgi?id=142994
456 <rdar://problem/20209466>
458 Reviewed by Brent Fulgham.
460 Since each MediaControl lives in an isolated world, we
461 can't rely on a global variable to provide a unique
462 identifier for a named canvas. The fix is to expose
463 WebCore's UUID generator, and have each canvas use
466 * Modules/mediacontrols/MediaControlsHost.cpp:
467 (WebCore::MediaControlsHost::generateUUID): New method on the
468 MediaControlsHost that generates a UUID.
469 * Modules/mediacontrols/MediaControlsHost.h:
470 * Modules/mediacontrols/MediaControlsHost.idl:
472 * Modules/mediacontrols/mediaControlsApple.js: Remove the global
473 variable unique ID that wasn't working, and instead get
474 an ID from the MediaControlsHost.
475 (Controller.prototype.createControls):
476 * Modules/mediacontrols/mediaControlsiOS.js:
479 2015-03-23 Brent Fulgham <bfulgham@apple.com>
481 Scroll latching logic can get stuck in 'scrollable="no"' iframes
482 https://bugs.webkit.org/show_bug.cgi?id=142789
483 <rdar://problem/20129494>
485 Reviewed by Dean Jackson.
487 Clean up the EventHandler and latching code as follows:
488 (1) Do not handle iframe elements as part of the normal latching logic. Instead, iframes should
489 be evaluated during the 'platformCompleteWheelEvent' phase of processing as top-level scrolling
491 (2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames
493 (3) Modify code to reflect that the scroll latching code really deals with overflow scrolling. Consequently,
494 the 'findEnclosingScrollableContainer' was renamed to 'findEnclosingOverflowScroll' and does not
495 treat iframe as a suitable target.
496 (4) Do not create a latching state object when the container being evaluated is already scrolled to the
497 extreme position in the direction of the mouse gesture. In this case, we want the enclosing frame
498 to be the latching target.
499 (5) Do not treat the state where the mouse wheel gesture has ended manual scrolling, but has not ended
500 momentum scrolling, as an appropriate time to select a latching target.
502 * page/EventHandler.cpp:
503 (WebCore::EventHandler::platformCompleteWheelEvent): Modify signature to remove unneeded argument.
504 (WebCore::EventHandler::handleWheelEvent): Modify call to 'platformCompleteWheelEvent' to remove unused argument.
505 * page/EventHandler.h:
506 * page/mac/EventHandlerMac.mm:
507 (WebCore::findEnclosingOverflowScroll): Renamed from 'findEnclosingScrollableContainer' and revised per the
509 (WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
511 (WebCore::EventHandler::platformCompleteWheelEvent): Remove unused argument. The wheel event target is no
512 longer needed here, now that iframes are not processed by this code.
513 (WebCore::findEnclosingScrollableContainer): Deleted.
514 * page/scrolling/ScrollLatchingState.cpp:
515 (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement:) Switch to move operator for passing
516 a temporary RefPtr to the the function.
517 * page/scrolling/ScrollLatchingState.h:
518 * platform/PlatformWheelEvent.h:
519 (WebCore::PlatformWheelEvent::useLatchedEventElement): Recognize 'phase=ended, momentum=none' as a state
520 that should not cause latching state to be revised.
522 2015-03-23 Anders Carlsson <andersca@apple.com>
524 Try to fix the iOS build.
526 * platform/network/mac/CookieJarMac.mm:
528 2015-03-23 Brady Eidson <beidson@apple.com>
530 Content extensions should apply css selectors
531 https://bugs.webkit.org/show_bug.cgi?id=142604
533 Reviewed by Alex Christensen.
535 Tests: http/tests/contentextensions/css-display-none.html
537 * WebCore.xcodeproj/project.pbxproj:
539 * contentextensions/ContentExtension.cpp:
540 (WebCore::ContentExtensions::ContentExtension::create):
541 (WebCore::ContentExtensions::ContentExtension::ContentExtension):
542 (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
543 * contentextensions/ContentExtension.h:
544 (WebCore::ContentExtensions::ContentExtension::identifier):
545 (WebCore::ContentExtensions::ContentExtension::compiledExtension):
547 * contentextensions/ContentExtensionsBackend.cpp:
548 (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
549 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
550 (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
551 * contentextensions/ContentExtensionsBackend.h:
553 * contentextensions/DFABytecodeInterpreter.cpp:
554 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
556 * dom/DocumentStyleSheetCollection.cpp:
557 (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):
558 * dom/DocumentStyleSheetCollection.h:
560 * loader/DocumentLoader.cpp:
561 (WebCore::DocumentLoader::commitData):
562 (WebCore::DocumentLoader::startLoadingMainResource):
563 (WebCore::DocumentLoader::addPendingContentExtensionSheet):
564 * loader/DocumentLoader.h:
566 * loader/cache/CachedResourceLoader.cpp:
567 (WebCore::CachedResourceLoader::requestResource):
569 * loader/cache/CachedResourceRequest.cpp:
570 (WebCore::CachedResourceRequest::setInitiator):
571 * loader/cache/CachedResourceRequest.h:
572 (WebCore::CachedResourceRequest::initiatingDocumentLoader):
574 * page/UserContentController.cpp:
575 (WebCore::UserContentController::globalDisplayNoneStyleSheet):
576 (WebCore::UserContentController::displayNoneCSSRule):
577 * page/UserContentController.h:
579 2015-03-23 Anders Carlsson <andersca@apple.com>
581 -[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
582 https://bugs.webkit.org/show_bug.cgi?id=142990
583 rdar://problem/20241645
585 Reviewed by Andreas Kling.
587 Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.
589 * platform/network/cf/CookieJarCFNet.cpp:
590 * platform/network/mac/CookieJarMac.mm:
592 2015-03-23 Conrad Shultz <conrad_shultz@apple.com>
594 Replace uses of kCTFontSystemFontType
595 https://bugs.webkit.org/show_bug.cgi?id=142984
597 Reviewed by Tim Horton.
599 * rendering/RenderThemeMac.mm:
600 (WebCore::AttachmentLayout::layOutTitle):
601 (WebCore::AttachmentLayout::layOutSubtitle):
603 2015-03-23 Dean Jackson <dino@apple.com>
605 kCTFontSystemFontType is deprecated in CoreText
606 https://bugs.webkit.org/show_bug.cgi?id=142981
607 <rdar://problem/20261171>
609 Reviewed by Beth Dakin.
611 Update to the non-deprecated version.
613 * rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem
614 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
616 2015-03-23 Eric Carlson <eric.carlson@apple.com>
618 [Mac] Enable fullscreen for MSE-based videos
619 https://bugs.webkit.org/show_bug.cgi?id=142971
621 Reviewed by Jer Noble.
623 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
624 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;
626 2015-03-23 Alex Christensen <achristensen@webkit.org>
628 [MediaFoundation] Implement seek.
629 https://bugs.webkit.org/show_bug.cgi?id=142594
631 Reviewed by Darin Adler.
633 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
634 (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
635 (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
636 (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
637 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
639 2015-03-23 Dan Bernstein <mitz@apple.com>
643 * platform/graphics/cocoa/FontCocoa.mm:
644 (WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
645 (WebCore::Font::platformWidthForGlyph): Ditto.
647 2015-03-23 Jer Noble <jer.noble@apple.com>
649 [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
650 https://bugs.webkit.org/show_bug.cgi?id=142970
652 Reviewed by Eric Carlson.
654 Return early after synchronously calling to the main thread to allocate the volume
655 view, to avoid re-allocating the volume view again on the web thread.
657 * platform/audio/ios/MediaSessionManagerIOS.mm:
658 (-[WebMediaSessionHelper allocateVolumeView]):
660 2015-03-23 Tim Horton <timothy_horton@apple.com>
662 Add a share item to the link action menu
663 https://bugs.webkit.org/show_bug.cgi?id=142961
664 <rdar://problem/19198374>
666 Reviewed by Beth Dakin.
668 * English.lproj/Localizable.strings:
669 Remove some now-unused strings.
671 * platform/spi/mac/NSMenuSPI.h:
674 2015-03-23 David Kilzer <ddkilzer@apple.com>
676 [iOS] Build fix: CoreText deprecated kCTFontSystemFontType
678 Fix tracked by: <rdar://problem/20261171>
680 * rendering/RenderThemeIOS.mm:
681 (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
684 2015-03-23 Brent Fulgham <bfulgham@apple.com>
689 (WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.
691 2015-03-23 Brent Fulgham <bfulgham@apple.com>
693 scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
694 https://bugs.webkit.org/show_bug.cgi?id=142552
695 <rdar://problem/20114743>
697 Reviewed by Dean Jackson.
699 Revise the snap point logic as follows:
700 (1) Put the snap point destination handling in a helper function to make the rest of the code
702 (2) Make sure we always have a left-hand snap point (i.e., position 0), but don't add multiple
703 left-hand snap points.
704 (3) Create a helper function to determine if we should be working with the scroll snap 'elements'
705 behavior. We want to use this for scroll-snap-destination/scroll-snap-coordinate markup.
706 (4) Create per-element snap point offsets when using scroll-snap-destination/scroll-snap-coordinate.
709 (WebCore::CSSParser::parseScrollSnapDestination): Add assertion to try to catch bad parser state.
710 * page/scrolling/AxisScrollSnapOffsets.cpp:
711 (WebCore::destinationOffsetForViewSize): Added helper function to consolidate logic for handling
712 destination coordinates.
713 (WebCore::updateFromStyle): Make sure a left-hand snap point is always provided.
714 (WebCore::styleUsesElements): Added helper function.
715 (WebCore::updateSnapOffsetsForScrollableArea): Revise logic to generate 'per-element' snap point
718 2015-03-23 Yoav Weiss <yoav@yoav.ws>
720 Refactor ImageLoader's setting of CachedImage
721 https://bugs.webkit.org/show_bug.cgi?id=142825
723 Reviewed by Chris Dumez.
725 No new tests, since there's no functional change.
727 setImage and setImageWithoutConsideringPendingLoadEvent were not called with new
728 CachedImages and were not used as originally intended. That resulted in some dead code,
729 and confusion when going over the code.
730 This patch renames these methods into equivalent clearImage* methods, and deletes resulting dead code.
732 * html/HTMLObjectElement.cpp:
733 (WebCore::HTMLObjectElement::renderFallbackContent): Changed setImage call to clearImage.
734 * loader/ImageLoader.cpp:
735 (WebCore::ImageLoader::clearImage):
736 (WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
737 (WebCore::ImageLoader::notifyFinished):
738 (WebCore::ImageLoader::elementDidMoveToNewDocument):
739 (WebCore::ImageLoader::setImage): Deleted.
740 (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Deleted.
741 * loader/ImageLoader.h:
743 2015-03-22 Benjamin Poulain <benjamin@webkit.org>
745 CSS Selectors: fix attribute case-insensitive matching of Contain and List
746 https://bugs.webkit.org/show_bug.cgi?id=142932
748 Reviewed by Darin Adler.
750 Fix the last two attribute selectors that were using full case-insensitive
752 -Contain ([foo*=bar]).
755 Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
756 fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html
758 * css/SelectorChecker.cpp:
759 (WebCore::attributeValueMatches):
760 * cssjit/SelectorCompiler.cpp:
761 (WebCore::SelectorCompiler::attributeValueContains):
762 (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
764 2015-03-22 Benjamin Poulain <bpoulain@apple.com>
766 Detect when url filter pattern with groups match the empty string
767 https://bugs.webkit.org/show_bug.cgi?id=142930
769 Reviewed by Sam Weinig.
771 The previous test was only accounting for simple atoms. This patch extends
774 * contentextensions/URLFilterParser.cpp:
775 (WebCore::ContentExtensions::Term::quantify):
776 (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
777 (WebCore::ContentExtensions::GraphBuilder::finalize):
778 (WebCore::ContentExtensions::Term::quantifier): Deleted.
780 2015-03-22 Eric Carlson <eric.carlson@apple.com>
782 [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
783 https://bugs.webkit.org/show_bug.cgi?id=142940
785 Reviewed by Sam Weinig.
788 (WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.
791 * html/HTMLMediaSession.cpp:
792 (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.
793 * html/HTMLMediaSession.h:
796 (WebCore::Page::didChoosePlaybackTarget): Ditto.
799 * platform/audio/MediaSession.h:
800 * platform/graphics/MediaPlaybackTargetPickerClient.h:
801 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
802 (WebCore::MediaPlaybackTargetPickerMac::devicePicker): Ditto.
804 2015-03-22 Anders Carlsson <andersca@apple.com>
806 _WKWebsiteDataStore should clear WebSQL databases
807 https://bugs.webkit.org/show_bug.cgi?id=142947
809 Reviewed by Sam Weinig.
811 * Modules/webdatabase/DatabaseTracker.cpp:
812 (WebCore::DatabaseTracker::trackerWithDatabasePath):
813 Add a hack so we can get at a tracker from the UI process.
815 (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
816 New function that deletes all databases modified after a given time.
818 * Modules/webdatabase/DatabaseTracker.h:
819 Add new members and export the ones we want to call from WebKit2.
821 * Modules/webdatabase/OriginLock.h:
822 Export the destructor.
824 2015-03-21 Dean Jackson <dino@apple.com>
826 Remove the prefix for CSS Transforms
827 https://bugs.webkit.org/show_bug.cgi?id=142927
828 <rdar://problem/11568151>
830 Reviewed by Simon Fraser.
832 Support the bare form of:
839 For transform-style, we also still differentiate the prefixed property
840 because we may want to use that as an indicator of legacy content.
842 This is mostly a find and replace, but with some related naming
843 changes. The DOM interface for WebKitCSSTransformValue remains
846 Tests: transforms/2d/transform-2d-prefixed.html
847 transforms/3d/general/prefixed-3dtransform-values.html
849 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
850 (WebCore::propertyChangeMayRepaintNonDescendants):
851 * css/CSSComputedStyleDeclaration.cpp:
852 (WebCore::isLayoutDependent):
853 (WebCore::ComputedStyleExtractor::propertyValue):
855 (WebCore::isValidKeywordPropertyAndValue):
856 (WebCore::isKeywordPropertyID):
857 (WebCore::parseTranslateTransformValue):
858 (WebCore::CSSParser::parseValue):
859 (WebCore::CSSParser::parseTransformOrigin):
860 (WebCore::CSSParser::parsePerspectiveOrigin):
861 * css/CSSPropertyNames.in:
862 * css/StyleProperties.cpp:
863 (WebCore::StyleProperties::getPropertyValue):
864 (WebCore::StyleProperties::asText):
865 * css/WebKitCSSMatrix.cpp:
866 (WebCore::WebKitCSSMatrix::setMatrixValue):
867 * html/track/VTTCue.cpp:
868 (WebCore::VTTCueBox::applyCSSProperties):
869 * page/animation/AnimationController.cpp:
870 (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
871 * page/animation/CSSPropertyAnimation.cpp:
872 (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
873 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
874 * page/animation/CompositeAnimation.cpp:
875 (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
876 * page/animation/ImplicitAnimation.cpp:
877 (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
878 * page/animation/KeyframeAnimation.cpp:
879 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
880 (WebCore::KeyframeAnimation::validateTransformFunctionList):
881 * platform/graphics/GraphicsLayer.cpp:
882 (WebCore::GraphicsLayer::validateTransformOperations):
883 * platform/graphics/GraphicsLayerClient.h:
884 * platform/graphics/ca/GraphicsLayerCA.cpp:
885 (WebCore::propertyIdToString):
886 (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
887 (WebCore::GraphicsLayerCA::addAnimation):
888 (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
889 (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
890 (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
891 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
892 (WebCore::GraphicsLayerTextureMapper::addAnimation):
893 * platform/graphics/texmap/TextureMapperAnimation.cpp:
894 (WebCore::TextureMapperAnimation::applyInternal):
895 * platform/graphics/texmap/TextureMapperLayer.cpp:
896 (WebCore::TextureMapperLayer::syncAnimations):
897 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
898 (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
899 (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
900 (WebCore::CoordinatedGraphicsLayer::addAnimation):
901 * rendering/RenderLayerBacking.cpp:
902 (WebCore::RenderLayerBacking::updateGeometry):
903 (WebCore::RenderLayerBacking::startAnimation):
904 (WebCore::RenderLayerBacking::startTransition):
905 (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
906 (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
907 * rendering/RenderLayerCompositor.cpp:
908 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
909 (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
910 * svg/SVGElement.cpp:
911 (WebCore::populateAttributeNameToCSSPropertyIDMap):
913 2015-03-21 Commit Queue <commit-queue@webkit.org>
915 Unreviewed, rolling out r181824.
916 https://bugs.webkit.org/show_bug.cgi?id=142935
918 Broke Windows build (Requested by ap on #webkit).
922 "Remove the prefix for CSS Transforms"
923 https://bugs.webkit.org/show_bug.cgi?id=142927
924 http://trac.webkit.org/changeset/181824
926 2015-03-20 Dean Jackson <dino@apple.com>
928 Remove the prefix for CSS Transforms
929 https://bugs.webkit.org/show_bug.cgi?id=142927
930 <rdar://problem/11568151>
932 Reviewed by Simon Fraser.
934 Support the bare form of:
941 For transform-style, we also still differentiate the prefixed property
942 because we may want to use that as an indicator of legacy content.
944 This is mostly a find and replace, but with some related naming
945 changes. The DOM interface for WebKitCSSTransformValue remains
948 Tests: transforms/2d/transform-2d-prefixed.html
949 transforms/3d/general/prefixed-3dtransform-values.html
951 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
952 (WebCore::propertyChangeMayRepaintNonDescendants):
953 * css/CSSComputedStyleDeclaration.cpp:
954 (WebCore::isLayoutDependent):
955 (WebCore::ComputedStyleExtractor::propertyValue):
957 (WebCore::isValidKeywordPropertyAndValue):
958 (WebCore::isKeywordPropertyID):
959 (WebCore::parseTranslateTransformValue):
960 (WebCore::CSSParser::parseValue):
961 (WebCore::CSSParser::parseTransformOrigin):
962 (WebCore::CSSParser::parsePerspectiveOrigin):
963 * css/CSSPropertyNames.in:
964 * css/StyleProperties.cpp:
965 (WebCore::StyleProperties::getPropertyValue):
966 (WebCore::StyleProperties::asText):
967 * css/WebKitCSSMatrix.cpp:
968 (WebCore::WebKitCSSMatrix::setMatrixValue):
969 * html/track/VTTCue.cpp:
970 (WebCore::VTTCueBox::applyCSSProperties):
971 * page/animation/AnimationController.cpp:
972 (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
973 * page/animation/CSSPropertyAnimation.cpp:
974 (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
975 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
976 * page/animation/CompositeAnimation.cpp:
977 (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
978 * page/animation/ImplicitAnimation.cpp:
979 (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
980 * page/animation/KeyframeAnimation.cpp:
981 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
982 (WebCore::KeyframeAnimation::validateTransformFunctionList):
983 * platform/graphics/GraphicsLayer.cpp:
984 (WebCore::GraphicsLayer::validateTransformOperations):
985 * platform/graphics/GraphicsLayerClient.h:
986 * platform/graphics/ca/GraphicsLayerCA.cpp:
987 (WebCore::propertyIdToString):
988 (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
989 (WebCore::GraphicsLayerCA::addAnimation):
990 (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
991 (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
992 (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
993 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
994 (WebCore::GraphicsLayerTextureMapper::addAnimation):
995 * platform/graphics/texmap/TextureMapperAnimation.cpp:
996 (WebCore::TextureMapperAnimation::applyInternal):
997 * platform/graphics/texmap/TextureMapperLayer.cpp:
998 (WebCore::TextureMapperLayer::syncAnimations):
999 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1000 (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
1001 (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
1002 (WebCore::CoordinatedGraphicsLayer::addAnimation):
1003 * rendering/RenderLayerBacking.cpp:
1004 (WebCore::RenderLayerBacking::updateGeometry):
1005 (WebCore::RenderLayerBacking::startAnimation):
1006 (WebCore::RenderLayerBacking::startTransition):
1007 (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
1008 (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
1009 * rendering/RenderLayerCompositor.cpp:
1010 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1011 (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
1012 * svg/SVGElement.cpp:
1013 (WebCore::populateAttributeNameToCSSPropertyIDMap):
1015 2015-03-20 Yusuke Suzuki <utatane.tea@gmail.com>
1017 REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
1018 https://bugs.webkit.org/show_bug.cgi?id=142410
1020 Reviewed by Geoffrey Garen.
1022 The same issues are found in the existing code; PropertyName does not have ownership.
1023 This patch rewrite the point that should have ownership to Identifier.
1025 * bindings/js/JSDOMWindowCustom.cpp:
1026 (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1027 (WebCore::JSDOMWindow::putByIndex):
1028 * bindings/js/ReadableStreamJSSource.cpp:
1029 (WebCore::getInternalSlotFromObject):
1030 * bindings/scripts/CodeGeneratorJS.pm:
1031 (GenerateImplementation):
1032 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1033 (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
1034 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1035 (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
1036 * bindings/scripts/test/JS/JSTestInterface.cpp:
1037 (WebCore::JSTestInterface::putByIndex):
1039 2015-03-20 Simon Fraser <simon.fraser@apple.com>
1041 Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
1042 https://bugs.webkit.org/show_bug.cgi?id=142917
1044 Reviewed by Beth Dakin.
1046 The scrollperf test would fail to detect transitions between slow and fast scrolling
1047 for new pages, because there was no logging when slow-scrolling scrolling tree was
1048 torn down, and a new fast-scrolling tree constructed.
1050 Fix by always logging the slow-scrolling reasons in the first update of the
1051 ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
1054 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1055 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1056 (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
1057 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
1059 2015-03-19 Geoffrey Garen <ggaren@apple.com>
1061 Function.prototype.toString should not decompile the AST
1062 https://bugs.webkit.org/show_bug.cgi?id=142853
1064 Reviewed by Sam Weinig.
1066 * bindings/js/JSLazyEventListener.cpp:
1067 (WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
1068 number of attribute event listeners to account for the leading newline
1069 now added by JavaScriptCore.
1071 This solution is not perfect, but there are a lot of pre-existing problems
1072 with line and column reporting for attribute event listeners, and this
1073 preserves existing behavior with reasonable reliability.
1075 2015-03-20 Alex Christensen <achristensen@webkit.org>
1077 Progress towards CMake on Mac.
1078 https://bugs.webkit.org/show_bug.cgi?id=136003
1080 Reviewed by Chris Dumez.
1082 * PlatformMac.cmake:
1083 Added some directories to create forwarding headers from.
1084 Generate ObjC bindings.
1086 2015-03-20 Per Arne Vollan <peavo@outlook.com>
1088 [WinCairo] Crash when leaving page while video is playing.
1089 https://bugs.webkit.org/show_bug.cgi?id=142578
1091 Reviewed by Alex Christensen.
1093 This can happen when there is an asynchronous event invoked from a video worker
1094 thread, accessing the media player object after it has been deleted.
1095 This is solved by resetting the media player pointer in the event object,
1096 when the media player is deleted.
1098 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1099 (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
1100 (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
1101 (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
1102 (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
1103 (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
1104 (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
1105 (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
1106 (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
1107 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1108 (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::MediaPlayerListener):
1109 (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::~MediaPlayerListener):
1110 (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::onMediaPlayerDeleted):
1112 2015-03-20 Chris Dumez <cdumez@apple.com>
1114 Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
1115 https://bugs.webkit.org/show_bug.cgi?id=142911
1117 Reviewed by Antti Koivisto.
1119 Drop the isBackForwardLoadType(m_loadType) assertion in
1120 FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
1121 used to hold true when goToBackForwardItem() was only called with
1122 history navigation load types. However, after r181782, we use a Standard
1123 load in the cases where we do not wish to display stale content (e.g.
1124 restoring session state).
1126 The assertion comment says "We only use cache-only loads to avoid
1127 resubmitting forms". However, we then call loadDifferentDocumentItem()
1128 which already takes care of using the ReturnCacheDataElseLoad cache
1129 policy as the HistoryItem has form data and we pass
1130 MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.
1132 No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
1135 * loader/FrameLoader.cpp:
1136 (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
1138 2015-03-20 Andy Estes <aestes@apple.com>
1140 [Content Filtering] Adopt NEFilterSource unblock handling
1141 https://bugs.webkit.org/show_bug.cgi?id=142904
1143 Reviewed by Andreas Kling.
1145 * platform/cocoa/NetworkExtensionContentFilter.mm:
1146 (WebCore::NetworkExtensionContentFilter::unblockHandler):
1147 Returned an unblock handler that calls -[NEFilterSource remediateWithDecisionHandler:].
1148 * platform/cocoa/ParentalControlsContentFilter.mm:
1149 (WebCore::ParentalControlsContentFilter::unblockHandler): Used ASCIILiteral.
1151 2015-03-19 Andy Estes <aestes@apple.com>
1153 [Content Filtering] Add tests for unblock requests
1154 https://bugs.webkit.org/show_bug.cgi?id=142900
1156 Reviewed by Andreas Kling.
1158 Currently the iOS Parental Controls content filter has a mechanism for requesting that a page be unblocked.
1159 WebKit implements this by listening for navigations originating from the filter's error page to a special URL,
1160 and requesting the page be unblocked via platform API, which might cause UI to be displayed. If the unblock is
1161 successful then we schedule a reload of the frame in order to display the unblocked document.
1163 NetworkExtension also supports unblock requests, so in preparation for adopting its API, this patch allows
1164 content filters to specify their own unblock request method, teaches MockContentFilter to provide such a method,
1165 and writes tests to cover both allowed and denied unblock requests.
1167 The content filter that blocks a load creates a ContentFilterUnblockHandler, passing it a lambda that is executed
1168 when a navigation matches the filter's special unblock URL. Filters can also specify that a script be executed in
1169 the context of its error page if the unblock is denied.
1171 All platform content filters can handle unblock requests like this with the exception of iOS Parental Controls in WebKit2.
1172 Since UI can be displayed by the system in this case, the request must be made from within the UI process. Therefore the
1173 existing method is retained of serializing a WebFilterEvaluator and intercepting navigation policy calls in the UI process.
1175 Tests: contentfiltering/allow-after-unblock-request.html
1176 contentfiltering/block-after-unblock-request.html
1178 * bindings/js/JSMockContentFilterSettingsCustom.cpp:
1179 (WebCore::JSMockContentFilterSettings::decisionPoint): Added some using statements for clarity.
1180 (WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
1181 (WebCore::toJSValue): Returns a JSValue from a Decision.
1182 (WebCore::toDecision): Returns a Decision from a JSValue.
1183 (WebCore::JSMockContentFilterSettings::decision): Used toJSValue.
1184 (WebCore::JSMockContentFilterSettings::setDecision): Used toDecision.
1185 (WebCore::JSMockContentFilterSettings::unblockRequestDecision): Used toJSValue.
1186 (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision): Used toDecision.
1187 * loader/ContentFilter.cpp:
1188 (WebCore::ContentFilter::createIfNeeded): Passed a reference to the owning DocumentLoader.
1189 (WebCore::ContentFilter::ContentFilter): Ditto.
1190 (WebCore::ContentFilter::unblockHandler): If the unblockHandler requests that a script be executed when an
1191 unblock request is denied, create a wrapper unblockHandler that executes that script in m_documentLoader's frame.
1192 * loader/ContentFilter.h:
1193 * loader/DocumentLoader.cpp:
1194 (WebCore::DocumentLoader::responseReceived): Passed this to ContentFilter::createIfNeeded.
1195 * loader/FrameLoader.cpp:
1196 (WebCore::FrameLoader::prepareForLoadStart): Called PolicyChecker::prepareForLoadStart.
1197 * loader/PolicyChecker.cpp:
1198 (WebCore::PolicyChecker::prepareForLoadStart): Reset m_contentFilterUnblockHandler.
1199 (WebCore::PolicyChecker::checkNavigationPolicy): Moved logic to here from WebKit1's WebFrameLoaderClient.
1200 Placing it here allows it to be shared between WebKit1 and WebKit2 (when the unblock handler does not need to
1201 be called in the UI process).
1202 * loader/PolicyChecker.h:
1203 (WebCore::PolicyChecker::setContentFilterUnblockHandler): Added.
1204 * page/Frame.h: Made Frame ThreadSafeRefCounted, since RefPtr<Frames> are captured in lambdas that can be
1205 copied by background threads managed by the underlying platform.
1206 * platform/ContentFilterUnblockHandler.h:
1207 (WebCore::ContentFilterUnblockHandler::unblockURLScheme): Returned the Apple content filter scheme.
1208 (WebCore::ContentFilterUnblockHandler::unblockURLHost): Returned the unblock URL host.
1209 (WebCore::ContentFilterUnblockHandler::clear): Deleted.
1210 * platform/PlatformContentFilter.h:
1211 (WebCore::PlatformContentFilter::unblockRequestDeniedScript): Returned the unblock request denied script.
1212 * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
1213 (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler): Added a constructor that takes an
1214 unblockURLHost and a UnblockRequesterFunction. Added an alternate constructor for iOS Parental Controls on
1215 WebKit2 that takes an unblockURLHost and a WebFilterEvaluator.
1216 (WebCore::ContentFilterUnblockHandler::needsUIProcess): Returned true if m_webFilterEvaluator is non-null.
1217 (WebCore::ContentFilterUnblockHandler::encode): Encoded m_unblockURLHost in addition to m_webFilterEvaluator.
1218 (WebCore::ContentFilterUnblockHandler::decode): Decoded m_unblockURLHost in addition to m_webFilterEvaluator.
1219 (WebCore::ContentFilterUnblockHandler::canHandleRequest): Returned true if there is a either a m_unblockRequester
1220 or a m_webFilterEvaluator and the request's host and scheme match those of the unblock request URL.
1221 (WebCore::dispatchToMainThread): Added a helper to dispatch a block to the main thread. Then if the web thread
1222 is enabled on iOS, dispatch it there.
1223 (WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Renamed from handleUnblockRequestAndDispatchIfSuccessful.
1224 Requested an unblock using either m_unblockRequester or m_webFilterEvaluator, then called decisionHandler with the response.
1225 (WebCore::scheme): Moved to ContentFilterUnblockHandler::unblockURLScheme.
1226 (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful): Renamed to requestUnblockAsync.
1227 * platform/cocoa/ParentalControlsContentFilter.mm:
1228 (WebCore::ParentalControlsContentFilter::unblockHandler): Returned an unblock handler using the WebFilterEvaluator constructor.
1229 * testing/MockContentFilter.cpp: Added using statments for clarity.
1230 (WebCore::settings): Added a helper to get MockContentFilterSettings::singleton().
1231 (WebCore::MockContentFilter::canHandleResponse): Used the helper.
1232 (WebCore::MockContentFilter::MockContentFilter): Took advantage of the using statements.
1233 (WebCore::MockContentFilter::addData): Ditto.
1234 (WebCore::MockContentFilter::finishedAddingData): Ditto.
1235 (WebCore::MockContentFilter::unblockHandler): Returned a ContentFilterUnblockHandler that checks settings() for its decision.
1236 (WebCore::MockContentFilter::unblockRequestDeniedScript): Returned the script to execute in MockContentFilter's
1237 error page when an unblock request is denied.
1238 (WebCore::MockContentFilter::maybeDetermineStatus): Took advantage of settings() and using statements.
1239 * testing/MockContentFilterSettings.cpp:
1240 (WebCore::MockContentFilterSettings::unblockRequestURL): Constructed a static unblock URL and returned it.
1241 * testing/MockContentFilterSettings.h:
1242 (WebCore::MockContentFilterSettings::unblockURLHost): Returned the filter's unblock URL host.
1243 (WebCore::MockContentFilterSettings::unblockRequestDecision): Returns the decision to make for an unblock request.
1244 (WebCore::MockContentFilterSettings::setUnblockRequestDecision): Sets the decision to make for an unblock request.
1245 * testing/MockContentFilterSettings.idl: Added the unblockRequestDecision and unblockRequestURL attributes.
1247 2015-03-20 Carlos Garcia Campos <cgarcia@igalia.com>
1249 [GTK] Crash due to empty drag image during drag-and-drop
1250 https://bugs.webkit.org/show_bug.cgi?id=142671
1252 Reviewed by Philippe Normand.
1254 Return early from ImageBuffer constructor if an empty size is
1255 given. This is a speculative fix for a crash while starting a drag
1256 and drop operation, that I haven't been able to reproduce.
1258 * platform/graphics/cairo/ImageBufferCairo.cpp:
1259 (WebCore::ImageBuffer::ImageBuffer):
1261 2015-03-19 Chris Dumez <cdumez@apple.com>
1263 [WK2] We should allow stale content when restoring a killed / crashed WebProcess
1264 https://bugs.webkit.org/show_bug.cgi?id=142893
1265 <rdar://problem/19633737>
1266 <rdar://problem/19869257>
1268 Reviewed by Antti Koivisto.
1270 Always use ReturnCacheDataElseLoad cache policy for history navigations.
1271 Previously, we would use the default protocol cache policy for history
1272 navigations if m_stateMachine.committedFirstRealDocumentLoad() returned
1273 false so that we do not display stale content when restoring the session
1274 state of Safari statup (rdar://problem/8131355). This is now handled
1275 before reaching this method by no longer using "IndexedBackForward"
1276 FrameLoadType when restoring session tabs, and using "Standard" load
1279 * loader/FrameLoader.cpp:
1280 (WebCore::FrameLoader::loadDifferentDocumentItem):
1282 2015-03-19 Andy Estes <aestes@apple.com>
1284 [Content Filtering] Move ContentFilter to from platform/ to loader/
1285 https://bugs.webkit.org/show_bug.cgi?id=142897
1287 Reviewed by Dan Bernstein.
1289 ContentFilterCollection never contained any platform code, so it doesn't make sense for it to be in platform.
1290 Move it to loader/, since ContentFilters are owned by DocumentLoaders, and just call it ContentFilter. Extract
1291 the abstract part of ContentFilter into a new base class called PlatformContentFilter that each of the
1292 individual filters inherit from.
1294 * WebCore.xcodeproj/project.pbxproj:
1295 * loader/ContentFilter.cpp: Renamed from Source/WebCore/platform/ContentFilter.cpp.
1296 (WebCore::ContentFilter::types): Moved from ContentFilterCollection.
1297 (WebCore::ContentFilter::createIfNeeded): Ditto.
1298 (WebCore::ContentFilter::ContentFilter): Ditto.
1299 (WebCore::ContentFilter::addData): Ditto.
1300 (WebCore::ContentFilter::finishedAddingData): Ditto.
1301 (WebCore::ContentFilter::needsMoreData): Ditto.
1302 (WebCore::ContentFilter::didBlockData): Ditto.
1303 (WebCore::ContentFilter::getReplacementData): Ditto.
1304 (WebCore::ContentFilter::unblockHandler): Ditto.
1305 * loader/ContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
1306 (WebCore::ContentFilter::type): Replaced a use of ContentFilterCollection.
1307 * platform/PlatformContentFilter.h: Renamed from Source/WebCore/platform/ContentFilter.h.
1308 * platform/cocoa/NetworkExtensionContentFilter.h: Inherited from PlatformContentFilter.
1309 * platform/cocoa/ParentalControlsContentFilter.h: Ditto.
1310 * testing/MockContentFilter.h: Ditto.
1312 2015-03-19 Dean Jackson <dino@apple.com>
1314 CSS Animations with triggers should map scroll position to duration
1315 https://bugs.webkit.org/show_bug.cgi?id=142870
1316 <rdar://problem/20227244>
1318 Reviewed by Simon Fraser.
1320 Expose a prototype implementation of what will eventually be called
1321 animation-timebase, mapping the scroll location to the duration of an
1322 animation. This only applies if the animation has a start and end
1325 Test: animations/trigger-container-scroll-boundaries.html
1327 * css/CSSComputedStyleDeclaration.cpp:
1328 (WebCore::createAnimationTriggerValue): Change to downcast.
1330 * css/CSSToStyleMap.cpp:
1331 (WebCore::CSSToStyleMap::mapAnimationTrigger): Fix a bug where I wasn't
1332 telling the ScrollAnimationTrigger object whether or not it had
1333 an end value. This wasn't visible before because we were not using
1336 * page/animation/AnimationBase.cpp:
1337 (WebCore::AnimationBase::fireAnimationEventsIfNeeded): Add a comment and
1338 change to using a downcast.
1339 (WebCore::AnimationBase::timeToNextService): Change to downcast.
1340 (WebCore::AnimationBase::freezeAtTime): Whitespace cleanup.
1341 (WebCore::AnimationBase::getElapsedTime): Calculate the elapsedTime based
1342 on the scroll position relative to the start and end trigger spots.
1344 * page/animation/AnimationController.cpp:
1345 (WebCore::AnimationControllerPrivate::updateAnimations): Since this
1346 can potentially call into beginAnimationUpdateTime, it should have
1347 an update blocker. This fixes the assert we were seeing in tests.
1348 (WebCore::AnimationControllerPrivate::scrollWasUpdated): Keep track of the scroll
1349 position so we don't need to ask for it all the time.
1350 * page/animation/AnimationControllerPrivate.h:
1351 (WebCore::AnimationControllerPrivate::scrollPosition): New accessor.
1353 * platform/animation/AnimationTrigger.h: Add downcast macros.
1354 (WebCore::ScrollAnimationTrigger::create): Calculate hasEndValue from the passed
1355 parameters rather than a separate value.
1356 (WebCore::ScrollAnimationTrigger::hasEndValue):
1357 (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
1358 (WebCore::ScrollAnimationTrigger::setHasEndValue): Deleted.
1360 * platform/graphics/ca/GraphicsLayerCA.cpp:
1361 (WebCore::GraphicsLayerCA::animationCanBeAccelerated): If we have an
1362 animation of this sort, we can't use a CAAnimation.
1364 2015-03-19 Eric Carlson <eric.carlson@apple.com>
1366 [Mac] Move MediaPlaybackTargetPicker
1367 https://bugs.webkit.org/show_bug.cgi?id=142889
1369 Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicker so it
1370 can be used by both WK2 and WK1.
1372 Reviewed by Tim Horton.
1374 * WebCore.xcodeproj/project.pbxproj:
1375 * platform/graphics/MediaPlaybackTargetPicker.cpp: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp.
1376 * platform/graphics/MediaPlaybackTargetPicker.h: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h.
1377 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h.
1378 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm.
1380 2015-03-19 Enrica Casucci <enrica@apple.com>
1382 REGRESSION (r109593): Clicking after last inline element could cause a crash.
1383 https://bugs.webkit.org/show_bug.cgi?id=142880
1384 rdar://problem/17222294
1386 Reviewed by Ryosuke Niwa.
1388 Test: editing/selection/click-after-last-inline-crash.html
1390 * rendering/RootInlineBox.cpp:
1391 (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
1393 2015-03-19 Enrica Casucci <enrica@apple.com>
1395 One more build fix after r181760.
1397 * page/EventHandler.cpp:
1398 (WebCore::EventHandler::handleDrag):
1400 2015-03-19 Jessie Berlin <jberlin@webkit.org>
1402 Build fix after r181760.
1404 * rendering/RenderAttachment.h:
1406 2015-03-19 Jer Noble <jer.noble@apple.com>
1408 [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
1409 https://bugs.webkit.org/show_bug.cgi?id=142132
1411 Reviewed by Tim Horton.
1413 Add a new utility method to calculate a rect with a specific aspect ratio wrapping a smaller one.
1415 * platform/graphics/GeometryUtilities.cpp:
1416 (WebCore::smallestRectWithAspectRatioAroundRect):
1417 * platform/graphics/GeometryUtilities.h:
1419 2015-03-19 Chris Dumez <cdumez@apple.com>
1421 Get rid of "CachePolicyCache" cache policy
1422 https://bugs.webkit.org/show_bug.cgi?id=142881
1424 Reviewed by Antti Koivisto.
1426 Get rid of "CachePolicyCache" cache policy as it is unused.
1428 * loader/cache/CachePolicy.h:
1429 * loader/cache/CachedResource.cpp:
1430 (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
1431 * page/DiagnosticLoggingKeys.cpp:
1432 (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey): Deleted.
1433 * page/DiagnosticLoggingKeys.h:
1435 2015-03-19 Alex Christensen <achristensen@webkit.org>
1437 [Content Extensions] Test regular expression parse failures.
1438 https://bugs.webkit.org/show_bug.cgi?id=142872
1440 Reviewed by Benjamin Poulain.
1442 * contentextensions/URLFilterParser.cpp:
1443 (WebCore::ContentExtensions::GraphBuilder::finalize):
1444 (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
1445 (WebCore::ContentExtensions::URLFilterParser::addPattern):
1446 (WebCore::ContentExtensions::URLFilterParser::statusString):
1447 * contentextensions/URLFilterParser.h:
1448 Changed failures that can never happen to assertions.
1450 2015-03-19 Enrica Casucci <enrica@apple.com>
1452 Release build fix after https://trac.webkit.org/r181760.
1456 * page/EventHandler.cpp:
1457 (WebCore::EventHandler::handleDrag):
1459 2015-03-19 Enrica Casucci <enrica@apple.com>
1461 <attachment> should put URLs on the pasteboard so that Finder can accept drops.
1462 https://bugs.webkit.org/show_bug.cgi?id=142801
1463 rdar://problem/19982527
1465 Reviewed by Tim Horton.
1467 Test: editing/pasteboard/drag-and-drop-attachment-contenteditable.html
1469 This patch adds all the necessary support to write attachment elements into
1470 the pasteboard, including the promised type.
1472 * WebCore.xcodeproj/project.pbxproj:
1473 * page/DragActions.h:
1474 * page/DragClient.h:
1475 (WebCore::DragClient::declareAndWriteAttachment):
1476 * page/DragController.cpp:
1477 (WebCore::DragController::draggableElement):
1478 (WebCore::DragController::startDrag):
1479 * page/DragController.h:
1480 (WebCore::DragController::draggingAttachmentURL):
1481 * page/EventHandler.cpp:
1482 (WebCore::EventHandler::dragHysteresisExceeded):
1483 (WebCore::EventHandler::handleDrag):
1484 * page/mac/DragControllerMac.mm:
1485 (WebCore::DragController::declareAndWriteAttachment):
1486 * page/win/DragControllerWin.cpp:
1487 (WebCore::DragController::declareAndWriteAttachment):
1489 (WebCore::URL::fileURLWithFileSystemPath):
1491 * rendering/HitTestResult.cpp:
1492 (WebCore::HitTestResult::absoluteAttachmentURL):
1493 * rendering/HitTestResult.h:
1495 2015-03-19 Chris Dumez <cdumez@apple.com>
1497 Unreviewed, fix linking error after r181753.
1499 Drop WEBCORE_EXPORT for Settings::minimumDOMTimerInterval() as it is
1503 (WebCore::Settings::minimumDOMTimerInterval):
1505 2015-03-19 Brady Eidson <beidson@apple.com>
1507 Part of content extensions should apply css selectors
1508 https://bugs.webkit.org/show_bug.cgi?id=142604
1510 Reviewed by Alex Christensen.
1512 Add a new action for applying the cached global stylesheet.
1514 * contentextensions/CompiledContentExtension.cpp:
1515 (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1517 * contentextensions/ContentExtensionActions.h:
1519 * contentextensions/ContentExtensionCompiler.cpp:
1520 (WebCore::ContentExtensions::serializeActions):
1522 * contentextensions/ContentExtensionParser.cpp:
1523 (WebCore::ContentExtensions::loadAction):
1525 * contentextensions/ContentExtensionRule.cpp:
1526 (WebCore::ContentExtensions::Action::deserialize):
1527 * contentextensions/ContentExtensionRule.h:
1528 (WebCore::ContentExtensions::Action::Action):
1529 (WebCore::ContentExtensions::Action::operator==):
1530 (WebCore::ContentExtensions::Action::stringArgument):
1531 (WebCore::ContentExtensions::Action::cssSelector): Deleted.
1533 * contentextensions/ContentExtensionsBackend.cpp:
1534 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1536 * loader/cache/CachedResourceLoader.cpp:
1537 (WebCore::CachedResourceLoader::requestResource):
1539 2015-03-19 Chris Dumez <cdumez@apple.com>
1541 Clean up DOMTimer related settings
1542 https://bugs.webkit.org/show_bug.cgi?id=142837
1544 Reviewed by Darin Adler.
1546 Clean up DOMTimer related settings:
1547 - Make default minimum timer interval 4ms instead of 10ms as all ports
1548 were setting it to 4ms and the specifications says 4ms.
1549 - Get rid of setters for default DOMTimer interval values as they are
1551 - Move default DOMTimer interval values from Settings to DOMTimer as
1552 those are global (not per-page) and not really settings.
1553 - Stop using abbreviations in the names (e.g. min -> minimum).
1554 - Move DOMTimer settings members from Page to Settings. There is no
1555 reason for those to be stored on the Page. The getters were private
1556 so call-sites had to go via Settings anyway. Also, call-sites already
1557 had to do a null check on the page to get the settings. It seems
1558 unfortunate for the settings to do another null-check on the page for
1559 retrieving the setting value from the page.
1560 - Inline the DOMTimer settings getters as these are trivial.
1563 (WebCore::Document::minimumTimerInterval):
1564 (WebCore::Document::timerAlignmentInterval):
1565 * dom/ScriptExecutionContext.cpp:
1566 (WebCore::ScriptExecutionContext::minimumTimerInterval):
1567 (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1570 (WebCore::Page::Page):
1571 (WebCore::Page::setTimerThrottlingEnabled):
1572 (WebCore::Page::setMinimumTimerInterval): Deleted.
1573 (WebCore::Page::minimumTimerInterval): Deleted.
1575 (WebCore::Page::timerAlignmentInterval): Deleted.
1576 * page/Settings.cpp:
1577 (WebCore::Settings::Settings):
1578 (WebCore::Settings::setMinimumDOMTimerInterval):
1579 (WebCore::Settings::setDOMTimerAlignmentInterval):
1580 (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): Deleted.
1581 (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): Deleted.
1582 (WebCore::Settings::setDefaultMinDOMTimerInterval): Deleted.
1583 (WebCore::Settings::defaultMinDOMTimerInterval): Deleted.
1584 (WebCore::Settings::setMinDOMTimerInterval): Deleted.
1585 (WebCore::Settings::minDOMTimerInterval): Deleted.
1586 (WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Deleted.
1587 (WebCore::Settings::defaultDOMTimerAlignmentInterval): Deleted.
1588 (WebCore::Settings::domTimerAlignmentInterval): Deleted.
1590 (WebCore::Settings::minimumDOMTimerInterval):
1591 (WebCore::Settings::domTimerAlignmentInterval):
1592 * testing/InternalSettings.cpp:
1593 (WebCore::InternalSettings::Backup::Backup):
1594 (WebCore::InternalSettings::Backup::restoreTo):
1595 (WebCore::InternalSettings::setMinimumTimerInterval):
1597 2015-03-19 Carlos Garcia Campos <cgarcia@igalia.com>
1599 [GTK] Scrollbars look bad with GTK+ 3.16
1600 https://bugs.webkit.org/show_bug.cgi?id=140800
1602 Reviewed by Sergio Villar Senin.
1604 Take margin into account when rendering scrollbars. This fixes the
1605 huge scrollbars rendered with GTK+ 3.16. We don't need to check
1606 the GTK+ version because in previous versions the marging were 0,
1607 so the same code just works.
1609 * platform/gtk/ScrollbarThemeGtk.cpp:
1610 (WebCore::adjustRectAccordingToMargin):
1611 (WebCore::ScrollbarThemeGtk::paintTrackBackground):
1612 (WebCore::ScrollbarThemeGtk::paintThumb):
1614 2015-03-19 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1616 [Streams API] Update ReadableStream API according new version of the specification
1617 https://bugs.webkit.org/show_bug.cgi?id=142822
1619 Reviewed by Benjamin Poulain.
1621 This patch updates the IDL of ReadableStream according the new version of the spec, which splits functionality between ReadableStream and ReadableStreamReader.
1622 In particular, this patch removes read(), ready, closed and state from ReadableStream and it adds the getReader method.
1624 Covered by updated readablestream-constructor.html test.
1626 * Modules/streams/ReadableStream.cpp:
1627 (WebCore::ReadableStream::ReadableStream):
1628 (WebCore::ReadableStream::state): Deleted.
1629 (WebCore::ReadableStream::closed): Deleted.
1630 (WebCore::ReadableStream::ready): Deleted.
1631 * Modules/streams/ReadableStream.h:
1632 (WebCore::ReadableStream::internalState): Added to make mac build system happy, to be used by ReadableStreamReader.
1633 * Modules/streams/ReadableStream.idl:
1634 * bindings/js/JSReadableStreamCustom.cpp:
1635 (WebCore::JSReadableStream::cancel):
1636 (WebCore::JSReadableStream::getReader):
1637 (WebCore::JSReadableStream::read): Deleted.
1638 (WebCore::getOrCreatePromiseDeferredFromObject): Deleted.
1639 (WebCore::readyPromiseSlotName): Deleted.
1640 (WebCore::JSReadableStream::ready): Deleted.
1641 (WebCore::closedPromiseSlotName): Deleted.
1642 (WebCore::JSReadableStream::closed): Deleted.
1644 2015-03-18 Manuel Rego Casasnovas <rego@igalia.com>
1646 Unreviewed. GTK build fix after r181720.
1648 * rendering/RenderImage.cpp:
1649 (WebCore::RenderImage::styleDidChange):
1651 2015-03-18 Antti Koivisto <antti@apple.com>
1653 Test disk cache behavior when using back navigation cache policy
1654 https://bugs.webkit.org/show_bug.cgi?id=142848
1656 Reviewed by Chris Dumez.
1658 Add a way to override the normal cache policy so we can test reload behavior of cache without actually reloading.
1660 Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
1662 * loader/FrameLoader.cpp:
1663 (WebCore::FrameLoader::addExtraFieldsToRequest):
1664 * loader/FrameLoader.h:
1665 (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
1666 * testing/Internals.cpp:
1667 (WebCore::Internals::setOverrideCachePolicy):
1668 * testing/Internals.h:
1669 * testing/Internals.idl:
1671 2015-03-18 Yusuke Suzuki <utatane.tea@gmail.com>
1673 TextFragment#start() is always >= 0 since its type is unsigned
1674 https://bugs.webkit.org/show_bug.cgi?id=142860
1676 Reviewed by Andreas Kling.
1678 Since TextFragment::m_start is unsigned, the result of
1679 TextFragment::start() is always >= 0 and assertion is not effective.
1680 This patch removes this assertion to suppress warnings.
1682 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1683 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
1685 2015-03-18 Alex Christensen <achristensen@webkit.org>
1687 [ContentExtensions] Prepare for compiling stylesheets of selectors to be used on every page.
1688 https://bugs.webkit.org/show_bug.cgi?id=142799
1690 Reviewed by Brady Eidson.
1692 * WebCore.xcodeproj/project.pbxproj:
1693 Make private headers to use with API tests.
1694 * contentextensions/CompiledContentExtension.cpp:
1695 (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1696 * contentextensions/CompiledContentExtension.h:
1697 Added method to get only the selectors from the root of the DFA, which apply to all URLs.
1698 * contentextensions/ContentExtensionCompiler.cpp:
1699 (WebCore::ContentExtensions::compileRuleList):
1700 Added checking if the trigger will match everything.
1701 These actions can be put directly on the root of the DFA without adding extra epsilon transitions to the NFA.
1702 * contentextensions/DFA.h:
1703 (WebCore::ContentExtensions::DFA::nodeAt):
1704 * contentextensions/DFABytecodeInterpreter.cpp:
1705 (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1706 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1707 * contentextensions/DFABytecodeInterpreter.h:
1708 * contentextensions/NFA.h:
1709 * contentextensions/URLFilterParser.cpp:
1710 (WebCore::ContentExtensions::Term::quantifier):
1711 Sink terms to a vector then add nodes to NFA when finalizing after checking for regexes that match everything.
1712 (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
1713 (WebCore::ContentExtensions::GraphBuilder::finalize):
1714 (WebCore::ContentExtensions::GraphBuilder::parseStatus):
1715 (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
1716 (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
1717 (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
1718 (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
1719 (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
1720 (WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
1721 (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
1722 (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
1723 (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
1724 (WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
1725 (WebCore::ContentExtensions::GraphBuilder::disjunction):
1726 (WebCore::ContentExtensions::GraphBuilder::hasError):
1727 (WebCore::ContentExtensions::GraphBuilder::fail):
1728 (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
1729 (WebCore::ContentExtensions::URLFilterParser::addPattern):
1730 (WebCore::ContentExtensions::URLFilterParser::statusString):
1731 (WebCore::ContentExtensions::GraphBuilder::errorMessage): Deleted.
1732 * contentextensions/URLFilterParser.h:
1733 Use an enum instead of strings for the status to avoid checking strings when we have a regex that matches everything.
1735 2015-03-18 Yusuke Suzuki <utatane.tea@gmail.com>
1737 Fix build failure due to FALLTHROUGH in unreachable code
1738 https://bugs.webkit.org/show_bug.cgi?id=142703
1740 Reviewed by Benjamin Poulain.
1742 FALLTHROUGH should not exist in unreachable code marked by
1743 ASSERT_NOT_REACHABLE.
1745 When !ENABLE(CSS_SELECTOR_JIT) and Debug mode is enabled,
1746 both ASSERT_NOT_REACHED and FALLTHROUGH are instantiated
1747 and it cause build failure.
1749 Here, since CompiledSingle/CompiledSingleWithRootFilter are
1750 not set when !ENABLE(CSS_SELECTOR_JIT). So dropping FALLTHROUGH
1751 and leave ASSERT_NOT_REACHED.
1752 And since ASSERT_NOT_ReACHED is stripped when Release build,
1753 I've inserted FALLTHROUGH() if ASSERT_DISABLED.
1754 This fix is the same to r162906.
1756 * dom/SelectorQuery.cpp:
1757 (WebCore::SelectorDataList::execute):
1759 2015-03-18 Said Abou-Hallawa <sabouhallawa@apple.com>
1761 Switching between two SVG images with no intrinsic sizes causes them to get the default SVG size instead of the container size.
1762 https://bugs.webkit.org/show_bug.cgi?id=142805.
1764 Reviewed by Darin Adler.
1766 The bug happens due to wrong logic in RenderImage::imageDimensionsChanged().
1767 This function decides to setNeedsLayout() if the intrinsic size of the image
1768 changes. If the size does not change, it only repaints the image rectangle.
1769 When switching the src of the an image between two SVG images and both of
1770 them have no intrinsic size, we do not updateInnerContentRect() and this
1771 means an SVGImageForContainer is not going to be created for this image.
1772 When the image is drawn, it is drawn directly from the SVGImage. And this
1773 means the drawing has to be scaled by container_size / SVG_default_intrinsic_size
1775 After figuring out that I need to updateInnerContentRect() to fix this bug,
1776 I found out Blink has already changed this code to do the same thing. But
1777 they also did more clean-up in this function. Here is the link
1778 https://codereview.chromium.org/114323004. I think their change seems correct
1779 although they did not say what exactly they were trying to fix.
1781 The plan for repaintOrMarkForLayout(), which is the new name of this function,
1783 -- setNeedLayout() if the intrinsic size changes and it affects the size
1785 -- updateInnerContentRect() if the intrinsic size did not change but the
1786 image has exiting layout.
1787 -- repaint the image rectangle if layout is not needed.
1789 This change also removes the call to computeLogicalWidthInRegion(), which is
1790 almost running a layout for the image. This call figures out whether the image
1791 needs to setNeedsLayout(). This call is unnecessary; the image needs to run a
1792 layout if the intrinsic size has changed and it affects the size of the image.
1794 Test: svg/as-image/svg-no-intrinsic-size-switching.html
1796 * rendering/RenderImage.cpp:
1797 (WebCore::RenderImage::styleDidChange): Change the function call.
1798 (WebCore::RenderImage::imageChanged): Rename local variable and change the
1801 (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Simplify this function.
1802 Call setIntrinsicSize() with the new size unless the image is in error state.
1804 (WebCore::RenderImage::repaintOrMarkForLayout): This a better name for this
1805 function since it is called even if the intrinsic size was not changed.
1806 (WebCore::RenderImage::imageDimensionsChanged): Deleted.
1808 * rendering/RenderImage.h: Rename imageDimensionsChanged() and change the
1809 updateIntrinsicSizeIfNeeded() to return void.
1811 * rendering/svg/RenderSVGForeignObject.cpp:
1812 (WebCore::RenderSVGForeignObject::paint): Code cleanup. This function can
1813 only handle the paint phases PaintPhaseForeground and PaintPhaseSelection.
1814 Use this information to simplify the logic and order of painting there.
1816 2015-03-18 Jeremy Jones <jeremyj@apple.com>
1818 Fix typo in playerViewControllerWillCancelOptimizedFullscree.
1819 https://bugs.webkit.org/show_bug.cgi?id=142745
1821 Reviewed by Darin Adler.
1823 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1824 (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]):
1825 (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): Deleted.
1827 2015-03-18 Simon Fraser <simon.fraser@apple.com>
1829 Avoid repaints when changing transform on an element with multiple background images
1830 https://bugs.webkit.org/show_bug.cgi?id=142841
1832 Reviewed by Zalan Bujtas.
1834 Replace the cheap test for changed images in RenderElement::updateFillImages()
1835 with an exhaustive test that walks the entire list of background images,
1836 since any ensuing repaint is way more expensive than a slightly more expensive check here.
1838 Test: fast/repaint/multiple-backgrounds-style-change.html
1840 * rendering/RenderElement.cpp:
1841 (WebCore::RenderElement::updateFillImages):
1842 * rendering/style/FillLayer.cpp:
1843 (WebCore::layerImagesIdentical): See if both images are the same (either none
1844 or both mask images, and same image pointer).
1845 (WebCore::FillLayer::imagesIdentical): Walk the two FillLayer lists, checking the images
1846 on each one. Returns false if we reach the end of one list before the other, or the images
1848 * rendering/style/FillLayer.h: New static function; static because
1849 it compares two FillLayer lists, and I think that makes more sense than
1852 2015-03-18 Anders Carlsson <andersca@apple.com>
1854 Pass cookies by reference in CookieHash functions
1855 https://bugs.webkit.org/show_bug.cgi?id=142839
1857 Reviewed by Sam Weinig.
1859 * platform/Cookie.h:
1860 (WebCore::CookieHash::hash):
1861 (WebCore::CookieHash::equal):
1863 2015-03-18 Tim Horton <timothy_horton@apple.com>
1865 Temporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build
1867 * dom/SelectorQuery.cpp:
1868 (WebCore::SelectorDataList::execute):
1870 2015-03-18 Myles C. Maxfield <mmaxfield@apple.com>
1872 Call CTFontSetRenderingParameters before rendering text
1873 https://bugs.webkit.org/show_bug.cgi?id=142816
1875 Reviewed by Darin Adler.
1879 * platform/graphics/cocoa/FontCascadeCocoa.mm:
1880 (WebCore::showGlyphsWithAdvances):
1881 * platform/spi/cocoa/CoreTextSPI.h:
1883 2015-03-18 Chris Dumez <cdumez@apple.com>
1885 [WK2] Log the number of network cache requests that we have never seen before
1886 https://bugs.webkit.org/show_bug.cgi?id=142828
1887 <rdar://problem/19632130>
1889 Reviewed by Antti Koivisto.
1891 Add diagnostic logging key for network cache efficacy logging.
1893 * page/DiagnosticLoggingKeys.cpp:
1894 (WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
1895 (WebCore::DiagnosticLoggingKeys::requestKey):
1896 * page/DiagnosticLoggingKeys.h:
1898 2015-03-18 Yusuke Suzuki <utatane.tea@gmail.com>
1900 Use filterRootId in SelectorQuery even if CSS JIT is not enabled
1901 https://bugs.webkit.org/show_bug.cgi?id=142703
1903 Reviewed by Benjamin Poulain.
1905 filterRootId pruning path is not inherently related to CSS JIT.
1906 This patch enables filterRootId even in the environment
1907 where CSS JIT is not enabled.
1909 * dom/SelectorQuery.cpp:
1910 (WebCore::filterRootById):
1911 (WebCore::SelectorDataList::executeSingleSelectorData):
1912 (WebCore::SelectorDataList::execute):
1913 * dom/SelectorQuery.h:
1915 2015-03-18 Zalan Bujtas <zalan@apple.com>
1917 Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
1918 https://bugs.webkit.org/show_bug.cgi?id=142809
1920 Reviewed by Antti Koivisto.
1922 FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
1924 No change in functionality.
1926 * rendering/SimpleLineLayoutFlowContents.h:
1927 (WebCore::SimpleLineLayout::FlowContents::begin):
1928 (WebCore::SimpleLineLayout::FlowContents::end):
1929 (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
1930 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
1931 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
1932 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
1933 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
1934 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
1935 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
1936 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1937 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1939 2015-03-18 Zalan Bujtas <zalan@apple.com>
1941 Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
1942 https://bugs.webkit.org/show_bug.cgi?id=142785
1944 Reviewed by Antti Koivisto.
1946 This is in transition to support <br>. A particular position could point to multiple
1947 segments when <br> is directly followed by text.
1949 No change in functionality.
1951 * rendering/SimpleLineLayoutFlowContents.cpp:
1952 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
1953 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
1954 * rendering/SimpleLineLayoutFlowContents.h:
1955 (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
1956 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
1957 (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
1958 * rendering/SimpleLineLayoutResolver.cpp:
1959 (WebCore::SimpleLineLayout::RunResolver::Run::text):
1961 2015-03-17 Simon Fraser <simon.fraser@apple.com>
1963 Skip trying to paint overlay scrollbars when there are none or they are clipped out
1964 https://bugs.webkit.org/show_bug.cgi?id=142811
1965 rdar://problem/20200725
1967 Reviewed by Darin Adler.
1969 In some content with lots of layers and overflow:scroll, we could spend 20% of
1970 the time under paintOverflowControlsForFragments() setting up an (empty) clip,
1971 and then trying to draw scrollbars that we don't have.
1973 Avoid calling paintOverflowControlsForFragments() if there are no scrollbars,
1974 and don't both setting up an empty clip just to paint nothing.
1976 * rendering/RenderLayer.cpp:
1977 (WebCore::RenderLayer::paintLayerContents):
1978 (WebCore::RenderLayer::paintOverflowControlsForFragments):
1980 2015-03-18 Per Arne Vollan <peavo@outlook.com>
1982 [WinCairo] Unreviewed build fix after r181665.
1984 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1985 (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
1987 2015-03-18 Joseph Pecoraro <pecoraro@apple.com>
1989 Remove unused "preprocessor" parameter to sub-CodeGenerators
1990 https://bugs.webkit.org/show_bug.cgi?id=142793
1992 Reviewed by Darin Adler.
1994 * bindings/scripts/CodeGenerator.pm:
1997 * bindings/scripts/CodeGeneratorObjC.pm:
1999 2015-03-18 Zalan Bujtas <zalan@apple.com>
2001 Simple line layout: Split fragments on renderer boundary on the fly.
2002 https://bugs.webkit.org/show_bug.cgi?id=142579
2004 Reviewed by Antti Koivisto.
2006 Fragment splitting at renderers' boundary at the end of the line is no longer needed.
2007 This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
2008 fragments across renderer boundary.
2010 Test: fast/text/simple-line-with-multiple-renderers.html
2012 * rendering/SimpleLineLayout.cpp:
2013 (WebCore::SimpleLineLayout::revertRuns):
2014 (WebCore::SimpleLineLayout::LineState::isEmpty):
2015 (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
2016 whether neighboring fragments need collapsing.
2017 (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
2018 a fragment continuation.
2019 (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
2020 (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
2021 they all get added to the current line.
2022 (WebCore::SimpleLineLayout::createLineRuns):
2023 (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
2024 (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
2025 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
2026 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
2027 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
2028 (WebCore::SimpleLineLayout::begin): Deleted.
2029 (WebCore::SimpleLineLayout::end): Deleted.
2030 (WebCore::SimpleLineLayout::preWrap): Deleted.
2031 (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
2032 (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
2033 (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
2034 (WebCore::SimpleLineLayout::createTextRuns): Deleted.
2035 (WebCore::SimpleLineLayout::create): Deleted.
2036 (WebCore::SimpleLineLayout::Layout::create): Deleted.
2037 * rendering/SimpleLineLayoutFlowContents.h:
2038 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
2039 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
2040 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
2041 * rendering/SimpleLineLayoutFunctions.cpp:
2042 (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
2043 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2044 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
2045 (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
2046 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
2047 (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
2048 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2049 * rendering/SimpleLineLayoutTextFragmentIterator.h:
2050 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
2051 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
2052 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
2053 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
2054 (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
2055 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
2057 2015-03-18 Manuel Rego Casasnovas <rego@igalia.com>
2059 Flex and grid items should be painted as inline-blocks
2060 https://bugs.webkit.org/show_bug.cgi?id=142266
2062 Reviewed by Darin Adler.
2064 Based on Blink r157004 by <cbiesinger@chromium.org>.
2065 https://src.chromium.org/viewvc/blink?revision=157004&view=revision
2067 Both flexbox and grid specs define that the painting order of flex/grid
2068 items is the same as inline blocks. See
2069 http://dev.w3.org/csswg/css-flexbox/#painting and
2070 http://dev.w3.org/csswg/css-grid/#z-order.
2072 Extracted inline blocks painting code from InlineElementBox and moved to
2073 a helper method that will be reused for flexboxes and grids.
2075 Tests: css3/flexbox/flex-item-text-background-not-interleaved.html
2076 fast/css-grid-layout/grid-item-text-background-not-interleaved.html
2078 * rendering/InlineElementBox.cpp:
2079 (WebCore::InlineElementBox::paint): Move code to
2080 RenderElement::paintAsInlineBlock().
2081 * rendering/RenderBlock.cpp:
2082 (WebCore::RenderBlock::paintChild): Add new argument to paint children
2084 * rendering/RenderBlock.h: Define PaintType enmu and modify paintChild()
2085 signature to add the new argument.
2086 * rendering/RenderElement.cpp:
2087 (WebCore::paintPhase): Paint element in a phase.
2088 (WebCore::RenderElement::paintAsInlineBlock): Code extracted from
2089 InlineElementBox::paint().
2090 * rendering/RenderElement.h: Add new method signature.
2091 * rendering/RenderFlexibleBox.cpp:
2092 (WebCore::RenderFlexibleBox::paintChildren): Call
2093 RenderBlock::paintChild() with the new argument.
2094 * rendering/RenderGrid.cpp:
2095 (WebCore::RenderGrid::paintChildren): Ditto.
2097 2015-03-18 Chris Dumez <cdumez@apple.com>
2099 [WK2] Log total number of network cache queries using diagnostic logging
2100 https://bugs.webkit.org/show_bug.cgi?id=142803
2101 <rdar://problem/19632130>
2103 Reviewed by Antti Koivisto.
2105 Add diagnostic logging key needed for network efficacy logging.
2107 * page/DiagnosticLoggingKeys.cpp:
2108 (WebCore::DiagnosticLoggingKeys::retrievalRequestKey):
2109 * page/DiagnosticLoggingKeys.h:
2111 2015-03-18 Tim Horton <timothy_horton@apple.com>
2113 Fix the build after r181660
2115 * page/EventHandler.cpp:
2116 (WebCore::EventHandler::setImmediateActionStage):
2117 * page/EventHandler.h:
2118 (WebCore::EventHandler::setImmediateActionStage):
2119 Un-inline setImmediateActionStage, because it is exported to WebCore, and
2120 exporting inline thing causes random weak symbol errors on some platforms.
2122 2015-03-17 Conrad Shultz <conrad_shultz@apple.com>
2124 Ignore some deprecation warnings
2125 https://bugs.webkit.org/show_bug.cgi?id=142813
2127 Reviewed by Mark Rowe.
2129 Fixing the deprecations is tracked by: <rdar://problem/20201450>
2131 * editing/cocoa/HTMLConverter.mm:
2132 (HTMLConverter::_processElement):
2134 2015-03-17 Commit Queue <commit-queue@webkit.org>
2136 Unreviewed, rolling out r181667, r181682, and r181683.
2137 https://bugs.webkit.org/show_bug.cgi?id=142812
2139 Broke multiple tests with ASan, plus dependent commits
2140 (Requested by ap on #webkit).
2142 Reverted changesets:
2144 "Simple line layout: Split fragments on renderer boundary on
2146 https://bugs.webkit.org/show_bug.cgi?id=142579
2147 http://trac.webkit.org/changeset/181667
2149 "Simple line layout: Change FlowContents::segmentForPosition()
2150 to segmentForRun()."
2151 https://bugs.webkit.org/show_bug.cgi?id=142785
2152 http://trac.webkit.org/changeset/181682
2154 "Simple line layout: Use Vector<>::const_iterator instead of
2155 custom FlowContents::Iterator."
2156 https://bugs.webkit.org/show_bug.cgi?id=142809
2157 http://trac.webkit.org/changeset/181683
2159 2015-03-17 Zalan Bujtas <zalan@apple.com>
2161 Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
2162 https://bugs.webkit.org/show_bug.cgi?id=142809
2164 Reviewed by Antti Koivisto.
2166 FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
2168 No change in functionality.
2170 * rendering/SimpleLineLayoutFlowContents.h:
2171 (WebCore::SimpleLineLayout::FlowContents::begin):
2172 (WebCore::SimpleLineLayout::FlowContents::end):
2173 (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
2174 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
2175 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
2176 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
2177 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
2178 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
2179 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
2180 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2181 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2183 2015-03-17 Zalan Bujtas <zalan@apple.com>
2185 Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
2186 https://bugs.webkit.org/show_bug.cgi?id=142785
2188 Reviewed by Antti Koivisto.
2190 This is in transition to support <br>. A particular position could point to multiple
2191 segments when <br> is directly followed by text.
2193 No change in functionality.
2195 * rendering/SimpleLineLayoutFlowContents.cpp:
2196 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
2197 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
2198 * rendering/SimpleLineLayoutFlowContents.h:
2199 (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
2200 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
2201 (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
2202 * rendering/SimpleLineLayoutResolver.cpp:
2203 (WebCore::SimpleLineLayout::RunResolver::Run::text):
2205 2015-03-17 Chris Dumez <cdumez@apple.com>
2207 [Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
2208 https://bugs.webkit.org/show_bug.cgi?id=142752
2209 <rdar://problem/20176731>
2211 Reviewed by Antti Koivisto.
2213 setSharedTimerFireInterval() / stopSharedTimer() are expensive on Mac
2214 and iOS on pages using a lot of timers.
2216 For example, on bing.com / iOS, ~15.4% of the CPU time is spent in
2217 setSharedTimerFireInterval() and ~14.7% of the CPU time is spent in
2218 stopSharedTimer(). The expensive calls are CFRunLoopAddTimer (11.4%),
2219 CFRunLoopTimerInvalidate (14.1%), CFRunLoopTimerCreate (3.3%).
2221 The issue is that we keep creating, adding to run loop modes, and then
2222 destroying the sharedTimer for each firing event. This is very
2223 expensive. In such case, the CFRunLoopTimerRef documentation advises to
2225 ... create a repeating timer with an initial firing time in the distant
2226 future (or the initial firing time) and a very large repeat interval—on
2227 the order of decades or more—and add it to all the necessary run loop
2228 modes. Then, when you know when the timer should fire next, you reset
2229 the firing time with CFRunLoopTimerSetNextFireDate, perhaps from the
2230 timer’s own callback function. This technique effectively produces a
2231 reusable, asynchronous timer.
2234 Doing so greatly decreases CPU time spend in:
2235 - setSharedTimerFireInterval(): 15.4% -> 4.6%
2236 - stopSharedTimer(): 14.6% -> 8.6%
2238 Overall CPU time spent on bing.com in timerFired() goes down from
2241 This patch also refactors the SharedTimer code to share as much as
2242 possible between Mac and iOS.
2244 This patch is based in part on the following patch:
2245 http://trac.webkit.org/changeset/143210
2247 [1] https://developer.apple.com/library/prerelease/ios/documentation/CoreFoundation/Reference/CFRunLoopTimerRef/index.html#//apple_ref/c/func/CFRunLoopTimerSetNextFireDate
2249 * WebCore.xcodeproj/project.pbxproj:
2250 * platform/SharedTimer.h:
2251 (WebCore::SharedTimer::invalidate):
2252 (WebCore::MainThreadSharedTimer::setFiredFunction): Deleted.
2253 (WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
2254 (WebCore::MainThreadSharedTimer::stop): Deleted.
2255 * platform/ThreadTimers.cpp:
2256 (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
2257 * platform/cf/SharedTimerCF.mm: Added.
2258 (WebCore::applicationDidBecomeActive):
2259 (WebCore::setupPowerObserver):
2260 (WebCore::setSharedTimerFiredFunction):
2261 (WebCore::timerFired):
2262 (WebCore::restartSharedTimer):
2263 (WebCore::invalidateSharedTimer):
2264 (WebCore::setSharedTimerFireInterval):
2265 (WebCore::stopSharedTimer):
2266 * platform/efl/SharedTimerEfl.cpp:
2267 (WebCore::invalidateSharedTimer):
2268 * platform/gtk/SharedTimerGtk.cpp:
2269 (WebCore::invalidateSharedTimer):
2270 * platform/ios/SharedTimerIOS.mm: Removed.
2271 * platform/mac/PowerObserverMac.h: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
2272 * platform/mac/PowerObserverMac.mm: Renamed from Source/WebCore/platform/mac/SharedTimerMac.mm.
2273 (WebCore::PowerObserver::PowerObserver):
2274 (WebCore::PowerObserver::~PowerObserver):
2275 (WebCore::PowerObserver::didReceiveSystemPowerNotification):
2276 * platform/win/SharedTimerWin.cpp:
2277 (WebCore::removeSharedTimer):
2279 2015-03-17 Tim Horton <timothy_horton@apple.com>
2281 Cannot invoke action menus anymore
2282 https://bugs.webkit.org/show_bug.cgi?id=142797
2283 <rdar://problem/20032670>
2285 Reviewed by Beth Dakin.
2287 * platform/spi/mac/NSMenuSPI.h:
2288 Add additional NSMenu SPI.
2290 2015-03-17 Zalan Bujtas <zalan@apple.com>
2292 Simple line layout: Split fragments on renderer boundary on the fly.
2293 https://bugs.webkit.org/show_bug.cgi?id=142579
2295 Reviewed by Antti Koivisto.
2297 Fragment splitting at renderers' boundary at the end of the line is no longer needed.
2298 This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
2299 fragments across renderer boundary.
2301 Test: fast/text/simple-line-with-multiple-renderers.html
2303 * rendering/SimpleLineLayout.cpp:
2304 (WebCore::SimpleLineLayout::revertRuns):
2305 (WebCore::SimpleLineLayout::LineState::isEmpty):
2306 (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
2307 whether neighboring fragments need collapsing.
2308 (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
2309 a fragment continuation.
2310 (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
2311 (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
2312 they all get added to the current line.
2313 (WebCore::SimpleLineLayout::createLineRuns):
2314 (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
2315 (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
2316 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
2317 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
2318 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
2319 (WebCore::SimpleLineLayout::begin): Deleted.
2320 (WebCore::SimpleLineLayout::end): Deleted.
2321 (WebCore::SimpleLineLayout::preWrap): Deleted.
2322 (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
2323 (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
2324 (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
2325 (WebCore::SimpleLineLayout::createTextRuns): Deleted.
2326 (WebCore::SimpleLineLayout::create): Deleted.
2327 (WebCore::SimpleLineLayout::Layout::create): Deleted.
2328 * rendering/SimpleLineLayoutFlowContents.h:
2329 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
2330 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
2331 (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
2332 * rendering/SimpleLineLayoutFunctions.cpp:
2333 (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
2334 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2335 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
2336 (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
2337 (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
2338 (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
2339 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2340 * rendering/SimpleLineLayoutTextFragmentIterator.h:
2341 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
2342 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
2343 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
2344 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
2345 (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
2346 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
2348 2015-03-17 Jeremy Jones <jeremyj@apple.com>
2350 When tab hides, pause fullscreen and exit normally.
2351 https://bugs.webkit.org/show_bug.cgi?id=142685
2353 Reviewed by Eric Carlson.
2355 Pause fullscreen playback when switching tabs. Exit fullscreen is not necessary and even prevents
2356 the normal flow of teardown. This allows the normal exit fullscreen call to succeed and call its callback.
2358 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2359 (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
2361 2015-03-17 Per Arne Vollan <peavo@outlook.com>
2363 [WinCairo] Video position is incorrect when located inside a frame.
2364 https://bugs.webkit.org/show_bug.cgi?id=142784
2366 Reviewed by Brent Fulgham.
2368 We need to take the enclosing frame's position into account, when finding the video position.
2370 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2371 (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
2373 2015-03-17 Benjamin Poulain <bpoulain@apple.com>
2375 Compile character ranges targeting the same state as range check in the bytecode
2376 https://bugs.webkit.org/show_bug.cgi?id=142759
2378 Reviewed by Alex Christensen.
2380 Previously, character ranges would be compiled as many individual character checks.
2381 For example, a transition on "[a-z]" would do 26 character checks + jump, which leads
2382 to enormous matchines.
2384 With this patch, we find the ranges at lowering time and generate a single instruction
2385 for them: "CheckValueRange". This helps making the machine denser when the input
2388 The second part of this patch goes further in the case where the transitions out of
2389 a state cover the entire alphabet. In that case, we create a fallback transition
2390 on the fly and remove all the ranges made useless.
2391 That case is common when ranges are used with inverse character set (e.g. [^a]+a).
2393 * contentextensions/DFABytecode.h:
2394 (WebCore::ContentExtensions::instructionSizeWithArguments):
2395 * contentextensions/DFABytecodeCompiler.cpp:
2396 (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
2397 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2398 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
2399 (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
2400 * contentextensions/DFABytecodeCompiler.h:
2401 Extend the compiler to detect ranges and lower them as CheckValueRange.
2403 * contentextensions/DFABytecodeInterpreter.cpp:
2404 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2405 Range checks in the interpreter.
2407 * contentextensions/NFA.cpp:
2408 (WebCore::ContentExtensions::NFA::setFinal):
2409 This assertion does not make sense with the current codebase. Actions are "compressed",
2410 it is possible to have two patterns with the same action.
2412 * contentextensions/NFAToDFA.cpp:
2413 (WebCore::ContentExtensions::simplifyTransitions):
2414 A very simple DFA optimization function: it only reduce the strength of ranges.
2416 (WebCore::ContentExtensions::NFAToDFA::convert):
2418 2015-03-17 Jer Noble <jer.noble@apple.com>
2420 REGRESSION (r181423): Crash @ generatedcontent.org at com.apple.WebCore: WebCore::MediaPlayer::maximumDurationToCacheMediaTime const + 4
2421 https://bugs.webkit.org/show_bug.cgi?id=142787
2423 Reviewed by Eric Carlson.
2425 Null check m_player before derefencing.
2427 * html/HTMLMediaElement.cpp:
2428 (WebCore::HTMLMediaElement::parseAttribute):
2430 2015-03-17 Beth Dakin <bdakin@apple.com>
2432 DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on
2434 https://bugs.webkit.org/show_bug.cgi?id=142700
2436 rdar://problem/20165168
2438 Reviewed by Tim Horton.
2440 This patch adds a new enum and member variable so that EventHandler can keep track
2441 of the current immediate action state.
2442 * page/EventHandler.cpp:
2443 (WebCore::EventHandler::EventHandler):
2445 A new mouse press even is starting. We can re-set m_immediateActionStage to none
2446 unless a Hit Test has already been performed.
2447 (WebCore::EventHandler::handleMousePressEvent):
2449 If an immediate action was completed, then send mouse to the DOM and return early.
2450 This will prevent us from doing our own normal mouseup behaviors such as
2451 navigating to a link that was clicked — we only want to do that if the click was
2452 not used to perform an immediate action.
2453 (WebCore::EventHandler::handleMouseReleaseEvent):
2454 * page/EventHandler.h:
2455 (WebCore::EventHandler::setImmediateActionStage):
2457 2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
2459 Use a better parameter name for Document.getElementsByClassName
2460 https://bugs.webkit.org/show_bug.cgi?id=142771
2462 Reviewed by Chris Dumez.
2464 * bindings/objc/PublicDOMInterfaces.h:
2467 2015-03-17 Timothy Horton <timothy_horton@apple.com>
2469 Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
2470 https://bugs.webkit.org/show_bug.cgi?id=142776
2471 <rdar://problem/18921338>
2473 Reviewed by Alexey Proskuryakov.
2475 Test: fast/animation/request-animation-frame-unparented-iframe-crash.html
2477 In some cases (like the new test), we can end up trying to start
2478 requestAnimationFrame on a Document that has no Page. Most paths null-checked
2479 the Page and did the right thing, but one failed to do so. In addition,
2480 the current fallback (when Page is null) can result in us constructing
2481 the wrong kind of DisplayRefreshMonitor, which could lead to trouble
2482 down the road when it's reused. Instead, just completely avoid making a
2483 DisplayRefreshMonitor in the null-page case.
2485 * dom/ScriptedAnimationController.cpp:
2486 (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
2487 If the page is null, bail.
2489 * dom/ScriptedAnimationController.h:
2490 * platform/graphics/DisplayRefreshMonitor.cpp:
2491 (WebCore::DisplayRefreshMonitor::create):
2492 Use Optional<> to make it easy to distinguish between ChromeClient
2493 being unreachable (because we don't have a Page for some reason) and
2494 ChromeClient declaring that it doesn't want to override the type of
2495 DisplayRefreshMonitor that is created.
2497 If ChromeClient was unreachable for some reason, we'll get back an engaged
2498 nullptr and return it (instead of creating a DisplayRefreshMonitor based
2499 on the platform). This avoids creating the wrong type of DisplayRefreshMonitor
2500 in the rare case where we can't reach the ChromeClient (e.g. a freshly unparented
2503 If instead the client returns a disengaged Nullopt, we'll interpret that as
2504 "construct the default type", which falls back on the platform #ifdefs to
2505 decide what to make.
2507 * platform/graphics/DisplayRefreshMonitorManager.cpp:
2508 (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
2509 (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
2510 Silently handle the case where we failed to make a DisplayRefreshMonitor.
2512 * platform/graphics/DisplayRefreshMonitor.h:
2513 * platform/graphics/DisplayRefreshMonitorClient.h:
2514 * platform/graphics/GraphicsLayerUpdater.cpp:
2515 (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
2516 * platform/graphics/GraphicsLayerUpdater.h:
2517 * rendering/RenderLayerCompositor.cpp:
2518 (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
2519 * rendering/RenderLayerCompositor.h:
2520 Adjust to the new signature of createDisplayRefreshMonitor, and return
2521 an engaged (nullptr) Optional if we can't get to ChromeClient for any reason.
2523 * page/ChromeClient.h:
2524 Return Nullopt (indicating a lack of override) by default.
2526 2015-03-17 Dean Jackson <dino@apple.com>
2528 Implement Scroll Container Animation Triggers
2529 https://bugs.webkit.org/show_bug.cgi?id=142732
2531 Attempt to fix the build.
2533 * css/CSSComputedStyleDeclaration.cpp: Add an #if ENABLE guard.
2535 2015-03-17 Dean Jackson <dino@apple.com>
2537 Implement Scroll Container Animation Triggers
2538 https://bugs.webkit.org/show_bug.cgi?id=142732
2540 Reviewed by Simon Fraser.
2542 Test: animations/trigger-container-scroll-simple.html
2544 Basic implementation of container-scroll. It only checks
2545 the page scroll position for trigger values (not the scrolling
2546 container in an overflow).
2548 * css/CSSComputedStyleDeclaration.cpp: Add CSSPropertyWebkitAnimationTrigger
2549 so that this property will appear in the inspector.
2551 * page/FrameView.cpp:
2552 (WebCore::FrameView::sendScrollEvent): If the page has scrolled, let the animation
2553 controller know about it.
2555 * page/animation/AnimationBase.cpp:
2556 (WebCore::AnimationBase::updateStateMachine): Whitespace fix.
2557 (WebCore::AnimationBase::fireAnimationEventsIfNeeded): If there is a trigger,
2558 and the scroll position is past it, then tell the state machine that
2560 (WebCore::AnimationBase::timeToNextService): Use the scroll position as
2561 an input to the update timer if a trigger is involved.
2563 * page/animation/AnimationController.cpp:
2564 (WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Add whitespace.
2565 (WebCore::AnimationControllerPrivate::scrollWasUpdated): Call updateAnimations.
2566 (WebCore::AnimationController::scrollWasUpdated): Call into AnimationControllerPrivate.
2567 * page/animation/AnimationController.h:
2568 * page/animation/AnimationControllerPrivate.h:
2570 * page/animation/CompositeAnimation.cpp: Keep a record of whether we have a scroll
2571 triggered animation.
2572 (WebCore::CompositeAnimation::CompositeAnimation):
2573 (WebCore::CompositeAnimation::updateKeyframeAnimations):
2574 * page/animation/CompositeAnimation.h:
2575 (WebCore::CompositeAnimation::hasScrollTriggeredAnimation):
2576 * platform/animation/Animation.cpp:
2577 (WebCore::Animation::operator=):
2579 2015-03-17 Simon Fraser <simon.fraser@apple.com>
2581 Move some code from LogicalSelectionOffsetCaches into RenderElement
2582 https://bugs.webkit.org/show_bug.cgi?id=142758
2584 Reviewed by Myles C. Maxfield.
2586 LogicalSelectionOffsetCaches had some useful code regarding containing blocks etc
2587 that should be used in more places, so move it into RenderElement.
2591 * rendering/LogicalSelectionOffsetCaches.h:
2592 (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
2593 (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Deleted.
2594 (WebCore::isNonRenderBlockInline): Deleted.
2595 (WebCore::containingBlockForFixedPosition): Deleted.
2596 (WebCore::containingBlockForAbsolutePosition): Deleted.
2597 (WebCore::containingBlockForObjectInFlow): Deleted.
2598 * rendering/RenderBlock.cpp: No need to initialize static data.
2599 (WebCore::RenderBlock::positionedObjects): nullptr
2600 * rendering/RenderElement.cpp:
2601 (WebCore::RenderElement::containingBlockForFixedPosition):
2602 (WebCore::RenderElement::containingBlockForAbsolutePosition):
2603 (WebCore::isNonRenderBlockInline):
2604 (WebCore::RenderElement::containingBlockForObjectInFlow):
2605 * rendering/RenderElement.h:
2606 (WebCore::RenderElement::canContainAbsolutelyPositionedObjects):
2607 * rendering/RenderLayer.cpp:
2608 (WebCore::isContainerForPositioned):
2609 * rendering/RenderObject.cpp:
2610 (WebCore::RenderObject::containingBlock):
2612 2015-03-17 Alex Christensen <achristensen@webkit.org>
2614 [WinCairo] Unreviewed build fix after r181640.
2616 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2617 Tell Windows how to find ShaderLang.h.
2619 2015-03-17 Chris Dumez <cdumez@apple.com>
2621 'pageLoaded' diagnostic logging is too verbose
2622 https://bugs.webkit.org/show_bug.cgi?id=142727
2623 <rdar://problem/18937048>
2625 Reviewed by Eric Carlson.
2627 Make 'pageLoaded' diagnostic logging less verbose:
2628 - Log once per main frame instead of once for subframe
2631 * loader/FrameLoader.cpp:
2632 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2634 2015-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
2636 [GTK] Wrong transfer annotations used in GObject DOM bindings
2637 https://bugs.webkit.org/show_bug.cgi?id=142780
2639 Reviewed by Gustavo Noronha Silva.
2641 We are using transfer none for all methods returning a GObject DOM
2642 Object. That's not true. Only objects derived from Node are
2643 automatically released by the DOM object cache and can be transfer
2644 none. All other objects are added to the cache only to avoid
2645 creating the same wrapper twice for the same core object, but
2646 caller should release the returned reference.
2648 * bindings/gobject/WebKitDOMCustomUnstable.h:
2649 * bindings/scripts/CodeGeneratorGObject.pm:
2650 (GetTransferTypeForReturnType):
2653 2015-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
2655 [GTK] WebKitDOM objects leaking
2656 https://bugs.webkit.org/show_bug.cgi?id=118788
2658 Reviewed by Darin Adler and Sergio Villar Senin.
2660 Use a DOMwindowObserver class, derived from DOMWindowProperty to
2661 be notified when the window object is detached from the frame to
2662 clear the DOM objects associated to that frame in that case too.
2664 * bindings/gobject/DOMObjectCache.cpp:
2666 2015-03-17 Zan Dobersek <zdobersek@igalia.com>
2668 [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
2669 https://bugs.webkit.org/show_bug.cgi?id=142530
2671 Reviewed by Darin Adler.
2673 Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
2674 us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
2675 and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
2678 Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
2679 required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
2680 whole WebCore library anymore, only the ANGLESupport library.
2683 * platform/graphics/ANGLEWebKitBridge.h:
2684 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2686 2015-03-17 Matt Baker <mattbaker@apple.com>
2688 Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
2689 https://bugs.webkit.org/show_bug.cgi?id=142029
2691 Reviewed by Timothy Hatcher.
2693 Add new functionality to the Inspector timelines backend to add runloop data to timeline recordings.
2695 * inspector/InspectorTimelineAgent.cpp:
2696 (WebCore::currentRunLoop):
2697 (WebCore::InspectorTimelineAgent::internalStart):
2698 (WebCore::InspectorTimelineAgent::internalStop):
2699 (WebCore::toProtocol):
2700 (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2701 Install observers for the begining and end of the runloop when recording begins. All other
2702 instrumented timeline events get added as children of the current runloop record, which is
2703 sent to the frontend once the runloop completes.
2705 * inspector/InspectorTimelineAgent.h:
2707 * platform/cf/RunLoopObserver.cpp:
2708 (WebCore::RunLoopObserver::schedule):
2709 Wrapper changed to allow observing arbitrary runloop activities.
2711 * platform/cf/RunLoopObserver.h:
2713 2015-03-17 Philippe Normand <pnormand@igalia.com>
2715 [GTK] basic OpenWebRTC build support
2716 https://bugs.webkit.org/show_bug.cgi?id=142393
2718 Reviewed by Carlos Garcia Campos.
2720 * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
2722 2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
2724 Remove never used "useLayerOnTop" bindings generator argument
2725 https://bugs.webkit.org/show_bug.cgi?id=142773
2727 Reviewed by Darin Adler.
2729 * bindings/scripts/CodeGenerator.pm:
2730 * bindings/scripts/CodeGeneratorJS.pm:
2731 * bindings/scripts/CodeGeneratorObjC.pm:
2732 * bindings/scripts/generate-bindings.pl:
2734 2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
2736 Enable ES6 classes by default
2737 https://bugs.webkit.org/show_bug.cgi?id=142774
2739 Reviewed by Gavin Barraclough.
2741 * Configurations/FeatureDefines.xcconfig:
2743 2015-03-16 Simon Fraser <simon.fraser@apple.com>
2745 Update the debug overlays after layout
2746 https://bugs.webkit.org/show_bug.cgi?id=142768
2748 Reviewed by Zalan Bujtas.
2750 The debug overlays need to be updated after layout, in case elements with wheel event handlers
2753 DebugPageOverlays::didLayout() is cheap if there are no overlays.
2755 Call DebugPageOverlays::didLayout() for all frames, not just the main frame, since subframes can contribute
2756 to the main frame's event handler region.
2758 * page/DebugPageOverlays.cpp:
2759 (WebCore::DebugPageOverlays::regionChanged):
2760 * page/DebugPageOverlays.h:
2761 (WebCore::DebugPageOverlays::didLayout):
2762 (WebCore::DebugPageOverlays::didChangeEventHandlers):
2763 * page/FrameView.cpp:
2764 (WebCore::FrameView::layout):
2766 2015-03-16 Jon Lee <jonlee@apple.com>
2768 Unreviewed fix for crash after r181608.
2770 * WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.
2772 2015-03-16 Simon Fraser <simon.fraser@apple.com>
2774 Generalize the Document code that maintains a set of nodes with event handlers
2775 https://bugs.webkit.org/show_bug.cgi?id=142762
2777 Reviewed by Zalan Bujtas, Darin Adler.
2779 Document.h defines a TouchEventTargetSet type, which will in future be used for
2780 other event types too (wheel events), so rename it to EventTargetSet.
2782 Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
2783 to take a reference.
2786 (WebCore::Document::prepareForDestruction): References
2787 (WebCore::Document::didAddTouchEventHandler): Ditto.
2788 (WebCore::Document::didRemoveEventTargetNode): Ditto.
2790 (WebCore::Document::touchEventTargets): No-one calls this; just remove the non
2792 * html/HTMLInputElement.cpp:
2793 (WebCore::HTMLInputElement::~HTMLInputElement): Pass a ref.
2794 (WebCore::HTMLInputElement::didMoveToNewDocument): Pass a ref.
2795 * page/DOMWindow.cpp:
2796 (WebCore::DOMWindow::removeAllEventListeners): Pass a ref.
2798 2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
2800 Web Inspector: Object Previews in Indexed DB tables
2801 https://bugs.webkit.org/show_bug.cgi?id=140813
2803 Reviewed by Timothy Hatcher.
2805 * inspector/InspectorIndexedDBAgent.cpp:
2806 Include previews with object store objects.
2808 2015-03-16 Jer Noble <jer.noble@apple.com>
2810 [Mac] Update missing image UI
2811 https://bugs.webkit.org/show_bug.cgi?id=142592
2813 Reviewed by Darin Adler.
2815 Update the broken image glyphs with new art (including a 3x image).
2817 Test: fast/hidpi/broken-image-icon-very-hidpi.html
2819 * Resources/missingImage.png:
2820 * Resources/missingImage@2x.png:
2821 * Resources/missingImage@3x.png: Added.
2822 * WebCore.xcodeproj/project.pbxproj:
2823 * loader/cache/CachedImage.cpp:
2824 (WebCore::CachedImage::brokenImage):
2826 2015-03-16 Dean Jackson <dino@apple.com>
2828 Parsing and Style Resolution of Container-based Animation Triggers
2829 https://bugs.webkit.org/show_bug.cgi?id=142687
2830 <rdar://problem/20170007>
2832 Reviewed by Simon Fraser.
2834 Take 2 after the previous patch was rolled out.
2836 This is the beginning of a prototype implementation of
2837 CSS Animation Triggers, as described by
2838 https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
2840 In this patch we parse and resolve the value of a new
2841 CSS property "-webkit-animation-trigger". At the moment it
2842 only accepts one function value "container-scroll", which
2843 will trigger the animation at an absolute position within
2844 an element's scrolling container. We expect the syntax to
2845 change in the near future, as the spec is written.
2847 Tests: animations/trigger-computed-style.html
2848 animations/trigger-parsing.html
2850 * WebCore.xcodeproj/project.pbxproj: Add the new files.
2852 * css/CSSAnimationTriggerScrollValue.cpp: Added.
2853 (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
2854 (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
2855 * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
2856 scroll trigger. This name may change in the future to better represent the
2857 type of trigger, but it is good enough for now.
2858 (WebCore::CSSAnimationTriggerScrollValue::create):
2859 (WebCore::CSSAnimationTriggerScrollValue::startValue):
2860 (WebCore::CSSAnimationTriggerScrollValue::endValue):
2861 (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
2863 * css/CSSComputedStyleDeclaration.cpp:
2864 (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
2865 (WebCore::getAnimationTriggerValue): Gets the current computed style.
2866 (WebCore::ComputedStyleExtractor::propertyValue):
2868 * css/CSSParser.cpp:
2869 (WebCore::CSSParser::parseValue):
2870 (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
2871 and record the value as a CSSAnimationTriggerScrollValue.
2872 (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
2875 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
2877 * css/CSSToStyleMap.cpp:
2878 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
2879 an Animation object.
2880 * css/CSSToStyleMap.h:
2882 * css/CSSValue.cpp: Handle the new CSSValue type.
2883 (WebCore::CSSValue::equals):
2884 (WebCore::CSSValue::cssText):
2885 (WebCore::CSSValue::destroy):
2887 (WebCore::CSSValue::isAnimationTriggerScrollValue):
2889 * platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
2890 and use them in the operator==.
2891 * platform/animation/Animation.h: Add AnimationTrigger as a new field.
2892 (WebCore::Animation::isTriggerSet):
2893 (WebCore::Animation::isEmpty):
2895 * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
2896 "auto" and the scrolling trigger.
2897 (WebCore::AnimationTrigger::~AnimationTrigger):
2898 (WebCore::AnimationTrigger::type):
2899 (WebCore::AnimationTrigger::isAutoAnimationTrigger):
2900 (WebCore::AnimationTrigger::isScrollAnimationTrigger):
2901 (WebCore::AnimationTrigger::AnimationTrigger):
2902 (WebCore::AutoAnimationTrigger::create):
2903 (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
2904 (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
2905 (WebCore::ScrollAnimationTrigger::create):
2906 (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
2907 (WebCore::ScrollAnimationTrigger::startValue):
2908 (WebCore::ScrollAnimationTrigger::setStartValue):
2909 (WebCore::ScrollAnimationTrigger::endValue):
2910 (WebCore::ScrollAnimationTrigger::setEndValue):
2911 (WebCore::ScrollAnimationTrigger::hasEndValue):
2912 (WebCore::ScrollAnimationTrigger::setHasEndValue):
2913 (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
2915 2015-03-16 Alex Christensen <achristensen@webkit.org>
2917 Progress towards CMake on Mac
2918 https://bugs.webkit.org/show_bug.cgi?id=142747
2920 Reviewed by Chris Dumez.
2923 * PlatformMac.cmake:
2924 Added more directories, interfaces, and forwarding headers.
2925 Temporarily disabled the generating of ObjC bindings in CMake builds.
2926 * platform/mac/PasteboardMac.mm:
2927 Removed unused include.
2929 2015-03-16 Joanmarie Diggs <jdiggs@igalia.com>
2931 AX: Crash viewing http://www.last.fm/
2932 https://bugs.webkit.org/show_bug.cgi?id=142309
2934 Reviewed by Chris Fleizach.
2936 The crash occurs when a not-yet-rendered object emits a children-changed
2937 signal. If an assistive technology is listening, AT-SPI2 will attempt to
2938 create and cache the state set for the child being added and the creation
2939 of the state set assumes a rendered object.
2941 Test: platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html
2943 * accessibility/atk/AXObjectCacheAtk.cpp:
2944 (WebCore::AXObjectCache::attachWrapper):
2946 2015-03-16 Commit Queue <commit-queue@webkit.org>
2948 Unreviewed, rolling out r181492.
2949 https://bugs.webkit.org/show_bug.cgi?id=142756
2951 May have regressed PLT (Requested by anttik on #webkit).
2955 "Cache glyph widths to GlyphPages"
2956 https://bugs.webkit.org/show_bug.cgi?id=142028
2957 http://trac.webkit.org/changeset/181492
2959 2015-03-16 Roger Fong <roger_fong@apple.com>
2961 [WebGL2] Instancing draw calls.
2962 https://bugs.webkit.org/show_bug.cgi?id=126939.
2963 <rdar://problem/15002379>
2965 Reviewed by Dean Jackson.
2967 Tested by a modified version of the 1.0.3 conformance tests:
2968 conformance/extensions/angle-instanced-arrays.html
2969 conformance/extensions/angle-instanced-arrays-out-of-bounds.html
2971 These tests will be landed along with other modified extension conformance tests
2972 once approval from Khronos is received.
2974 * html/canvas/WebGL2RenderingContext.cpp:
2975 (WebCore::WebGL2RenderingContext::clear): Generate error if clearing an integer color buffer.
2976 (WebCore::WebGL2RenderingContext::vertexAttribDivisor): Call method from base class.
2977 (WebCore::WebGL2RenderingContext::drawArraysInstanced): Ditto.
2978 (WebCore::WebGL2RenderingContext::drawElementsInstanced): Ditto.
2979 (WebCore::WebGL2RenderingContext::isIntegerFormat): Ditto.
2980 (WebCore::WebGL2RenderingContext::validateDrawElements): Deleted. Move back to base class.
2981 * html/canvas/WebGL2RenderingContext.h:
2982 * html/canvas/WebGL2RenderingContext.idl: Add a missing enum.
2983 * html/canvas/WebGLRenderingContext.cpp:
2984 (WebCore::WebGLRenderingContext::clear): Copied from WebGLRenderingContextBase.
2985 (WebCore::WebGLRenderingContext::validateDrawElements): Deleted. Move back to base class.
2986 * html/canvas/WebGLRenderingContext.h:
2987 * html/canvas/WebGLRenderingContextBase.cpp:
2988 (WebCore::WebGLRenderingContextBase::clear): Deleted. Moved to WebGLRenderingContext.
2989 (WebCore::WebGLRenderingContextBase::getVertexAttrib): Check for WebGL2 context.
2990 (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
2991 * html/canvas/WebGLRenderingContextBase.h:
2993 2015-03-16 Commit Queue <commit-queue@webkit.org>
2995 Unreviewed, rolling out r181572.
2996 https://bugs.webkit.org/show_bug.cgi?id=142755
2998 Caused weird test failures in transitions and animations
2999 (Requested by dino on #webkit).
3003 "Parsing and Style Resolution of Container-based Animation
3005 https://bugs.webkit.org/show_bug.cgi?id=142687
3006 http://trac.webkit.org/changeset/181572
3008 2015-03-16 Yoav Weiss <yoav@yoav.ws>
3010 Remove setCachedImage from HTMLImageElement since it is not used
3011 https://bugs.webkit.org/show_bug.cgi?id=142740
3013 Reviewed by Chris Dumez.
3015 No new tests since this patch is just removing dead code.
3017 HTMLImageElement::setCachedImage is not being called by anyone.
3018 This patch removes it, since it's dead code.
3020 * html/HTMLImageElement.h:
3021 (WebCore::HTMLImageElement::setCachedImage): Deleted.
3023 2015-03-16 Brent Fulgham <bfulgham@apple.com>
3025 WebKit1 Clients Are Not Reliably Repainted
3026 https://bugs.webkit.org/show_bug.cgi?id=142750
3027 <rdar://problem/20042453>
3029 Reviewed by Simon Fraser.
3031 * page/FrameView.cpp:
3032 (WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
3033 the early return so we can see when this happening in debug builds.
3035 (WebCore::FrameView::inPaintableState): Added.
3037 2015-03-16 Chris Dumez <cdumez@apple.com>
3039 Make DatabaseContext suspendable if there is no pending database activity
3040 https://bugs.webkit.org/show_bug.cgi?id=142716
3041 <rdar://problem/19923085>
3043 Reviewed by Andreas Kling.
3045 Make DatabaseContext suspendable if there is no pending database
3047 - No pending Database creation JS callback
3048 - No pending transaction(s)
3050 Suspending is safe in this case because we are not going to interrupt
3051 any database activity, nor fire any JS event.
3053 This greatly increases the likelihood of pages using websql to enter
3056 Tests: fast/history/page-cache-webdatabase-no-transaction-db.html
3057 fast/history/page-cache-webdatabase-pending-transaction.html
3059 * Modules/webdatabase/Database.cpp:
3060 (WebCore::Database::hasPendingTransaction):
3061 * Modules/webdatabase/Database.h:
3062 * Modules/webdatabase/DatabaseContext.cpp:
3063 (WebCore::DatabaseContext::canSuspend):
3064 * Modules/webdatabase/DatabaseManager.cpp:
3065 (WebCore::DatabaseManager::openDatabase):
3066 * Modules/webdatabase/DatabaseThread.cpp:
3067 (WebCore::DatabaseThread::hasPendingDatabaseActivity):
3068 * Modules/webdatabase/DatabaseThread.h:
3070 2015-03-16 Brady Eidson <beidson@apple.com>
3072 Addressing additional review feedback after http://trac.webkit.org/changeset/181565
3073 https://bugs.webkit.org/show_bug.cgi?id=142733
3075 Reviewed by Darin Adler.
3077 * loader/icon/IconController.cpp:
3078 (WebCore::IconController::startLoader): Null check page()
3080 2015-03-16 Roger Fong <roger_fong@apple.com>
3082 [Win] Unreviewed build fix attempt after r181571.
3084 * WebCore.vcxproj/WebCore.vcxproj:
3086 2015-03-16 Roger Fong <roger_fong@apple.com>
3088 [WebGL2] Multiple Render Targets.
3089 https://bugs.webkit.org/show_bug.cgi?id=126994.
3090 <rdar://problem/15815766>
3092 Reviewed by Dean Jackson.
3094 Tested by a modified version of the 1.0.3 conformance test:
3095 conformance/extensions/webgl-draw-buffers.html
3096 This test will be landed along with other modified extension conformance tests
3097 once approval from Khronos is received.
3099 * html/canvas/WebGL2RenderingContext.cpp:
3100 (WebCore::WebGL2RenderingContext::drawBuffers): Mostly the same as WebGLDrawBuffers::drawBuffersWEBGL.
3101 Returns different error messages, uses non EXT enums.
3102 (WebCore::WebGL2RenderingContext::clearBufferiv): This actually does nothing for now but the validation has been implemented.
3103 (WebCore::WebGL2RenderingContext::clearBufferuiv): Ditto.
3104 (WebCore::WebGL2RenderingContext::clearBufferfv): Ditto.
3105 (WebCore::WebGL2RenderingContext::clearBufferfi): Ditto.
3106 (WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Removes the extension object check.
3107 (WebCore::WebGL2RenderingContext::getMaxDrawBuffers):
3108 (WebCore::WebGL2RenderingContext::getMaxColorAttachments): Must return the same thing as getMaxDrawBuffers.
3109 (WebCore::WebGL2RenderingContext::getParameter): Remove extension object checks.
3110 * html/canvas/WebGL2RenderingContext.h:
3111 * html/canvas/WebGLFramebuffer.cpp:
3112 (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
3113 * html/canvas/WebGLRenderingContext.cpp:
3114 (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Copied from WebGLRenderingContextBase.
3115 (WebCore::WebGLRenderingContext::getMaxDrawBuffers): Ditto.
3116 (WebCore::WebGLRenderingContext::getMaxColorAttachments): Ditto.
3117 * html/canvas/WebGLRenderingContext.h:
3118 * html/canvas/WebGLRenderingContextBase.cpp:
3119 (WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters): Deleted.
3120 * html/canvas/WebGLRenderingContextBase.h:
3122 2015-03-16 Dean Jackson <dino@apple.com>
3124 Parsing and Style Resolution of Container-based Animation Triggers
3125 https://bugs.webkit.org/show_bug.cgi?id=142687
3126 <rdar://problem/20170007>
3128 Reviewed by Simon Fraser.
3130 This is the beginning of a prototype implementation of
3131 CSS Animation Triggers, as described by
3132 https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
3134 In this patch we parse and resolve the value of a new
3135 CSS property "-webkit-animation-trigger". At the moment it
3136 only accepts one function value "container-scroll", which
3137 will trigger the animation at an absolute position within
3138 an element's scrolling container. We expect the syntax to
3139 change in the near future, as the spec is written.
3141 Tests: animations/trigger-computed-style.html
3142 animations/trigger-parsing.html
3144 * WebCore.xcodeproj/project.pbxproj: Add the new files.
3146 * css/CSSAnimationTriggerScrollValue.cpp: Added.
3147 (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
3148 (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
3149 * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
3150 scroll trigger. This name may change in the future to better represent the
3151 type of trigger, but it is good enough for now.
3152 (WebCore::CSSAnimationTriggerScrollValue::create):
3153 (WebCore::CSSAnimationTriggerScrollValue::startValue):
3154 (WebCore::CSSAnimationTriggerScrollValue::endValue):
3155 (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
3157 * css/CSSComputedStyleDeclaration.cpp:
3158 (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
3159 (WebCore::getAnimationTriggerValue): Gets the current computed style.
3160 (WebCore::ComputedStyleExtractor::propertyValue):
3162 * css/CSSParser.cpp:
3163 (WebCore::CSSParser::parseValue):
3164 (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
3165 and record the value as a CSSAnimationTriggerScrollValue.
3166 (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
3169 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
3171 * css/CSSToStyleMap.cpp:
3172 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
3173 an Animation object.
3174 * css/CSSToStyleMap.h:
3176 * css/CSSValue.cpp: Handle the new CSSValue type.
3177 (WebCore::CSSValue::equals):
3178 (WebCore::CSSValue::cssText):
3179 (WebCore::CSSValue::destroy):
3181 (WebCore::CSSValue::isAnimationTriggerScrollValue):
3183 * platform/animation/Animation.h: Add AnimationTrigger as a new field.
3184 (WebCore::Animation::isTriggerSet):
3185 (WebCore::Animation::isEmpty):
3187 * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
3188 "auto" and the scrolling trigger.
3189 (WebCore::AnimationTrigger::~AnimationTrigger):
3190 (WebCore::AnimationTrigger::type):
3191 (WebCore::AnimationTrigger::isAutoAnimationTrigger):
3192 (WebCore::AnimationTrigger::isScrollAnimationTrigger):
3193 (WebCore::AnimationTrigger::AnimationTrigger):
3194 (WebCore::AutoAnimationTrigger::create):
3195 (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
3196 (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
3197 (WebCore::ScrollAnimationTrigger::create):
3198 (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
3199 (WebCore::ScrollAnimationTrigger::startValue):
3200 (WebCore::ScrollAnimationTrigger::setStartValue):
3201 (WebCore::ScrollAnimationTrigger::endValue):
3202 (WebCore::ScrollAnimationTrigger::setEndValue):
3203 (WebCore::ScrollAnimationTrigger::hasEndValue):
3204 (WebCore::ScrollAnimationTrigger::setHasEndValue):
3205 (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
3207 2015-03-15 Roger Fong <roger_fong@apple.com>
3209 [WebGL2] Vertex Array Objects.
3210 https://bugs.webkit.org/show_bug.cgi?id=126944.
3211 <rdar://problem/15002455>
3213 Reviewed by Dean Jackson.
3215 Tested by a modified version of the 1.0.3 conformance test:
3216 conformance/extensions/oes-vertex-array-object.html
3217 This test will be landed along with other modified extension conformance tests
3218 once approval from Khronos is received.
3220 * html/canvas/OESVertexArrayObject.cpp: Associate extension calls only with WebGLRenderingContext.
3221 (WebCore::OESVertexArrayObject::deleteVertexArrayOES):
3222 (WebCore::OESVertexArrayObject::bindVertexArrayOES):
3223 * html/canvas/WebGLRenderingContext.cpp:
3224 (WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
3225 (WebCore::WebGLRenderingContext::getParameter):
3226 * html/canvas/WebGL2RenderingContext.cpp: Implement vertex array object calls as part WebGL2 context.
3227 (WebCore::WebGL2RenderingContext::createVertexArray):
3228 (WebCore::WebGL2RenderingContext::deleteVertexArray):
3229 (WebCore::WebGL2RenderingContext::isVertexArray):
3230 (WebCore::WebGL2RenderingContext::bindVertexArray):
3231 (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
3232 (WebCore::WebGL2RenderingContext::getParameter):
3234 Duplicate extension object vertex array object extension methods in GraphicsContext3D.
3235 Implementation may change after we upgrade to newer GL headers and profile.
3236 * platform/graphics/GraphicsContext3D.h:
3237 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3238 (WebCore::GraphicsContext3D::createVertexArray):
3239 (WebCore::GraphicsContext3D::deleteVertexArray):
3240 (WebCore::GraphicsContext3D::isVertexArray):
3241 (WebCore::GraphicsContext3D::bindVertexArray):
3243 Have WebGLVertexArrayObjectOES and WebGLVertexArrayObject inherit from WebGLRenderingContextBase.
3245 * WebCore.xcodeproj/project.pbxproj:
3246 * html/canvas/WebGLVertexArrayObject.cpp:
3247 (WebCore::WebGLVertexArrayObject::create):
3248 (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): Use GraphicsContext3D implementation of createVertexArray.
3249 (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
3250 * html/canvas/WebGLVertexArrayObject.h:
3251 * html/canvas/WebGLVertexArrayObjectBase.cpp: Added.
3252 (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):
3253 (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer):
3254 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):
3255 (WebCore::WebGLVertexArrayObjectBase::unbindBuffer):
3256 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribDivisor):
3257 * html/canvas/WebGLVertexArrayObjectBase.h: Added.
3258 (WebCore::WebGLVertexArrayObjectBase::~WebGLVertexArrayObjectBase):
3259 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::VertexAttribState):
3260 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::isBound):
3261 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::validateBinding):
3262 (WebCore::WebGLVertexArrayObjectBase::isDefaultObject):
3263 (WebCore::WebGLVertexArrayObjectBase::hasEverBeenBound):
3264 (WebCore::WebGLVertexArrayObjectBase::setHasEverBeenBound):
3265 (WebCore::WebGLVertexArrayObjectBase::getElementArrayBuffer):
3266 (WebCore::WebGLVertexArrayObjectBase::getVertexAttribState):
3267 * html/canvas/WebGLVertexArrayObjectOES.cpp:
3268 (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
3269 (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
3270 (WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer): Deleted.
3271 (WebCore::WebGLVertexArrayObjectOES::setVertexAttribState): Deleted.
3272 (WebCore::WebGLVertexArrayObjectOES::unbindBuffer): Deleted.
3273 (WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Deleted.
3274 * html/canvas/WebGLVertexArrayObjectOES.h:
3276 * html/canvas/WebGLRenderingContextBase.cpp: Use WebGLVertexArrayObjectBase class.
3277 (WebCore::WebGLRenderingContextBase::initializeNewContext):
3278 (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
3279 (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
3280 (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
3281 (WebCore::WebGLRenderingContextBase::getVertexAttrib):
3282 (WebCore::WebGLRenderingContextBase::initVertexAttrib0):
3283 (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
3284 (WebCore::WebGLRenderingContextBase::restoreStatesAfterVertexAttrib0Simulation):
3285 * html/canvas/WebGLRenderingContextBase.h:
3286 (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject):
3288 Handle construction of WebGLGetInfo using WebGLVertexArrayObject.
3289 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
3291 * html/canvas/WebGLGetInfo.cpp:
3292 (WebCore::WebGLGetInfo::WebGLGetInfo):
3293 (WebCore::WebGLGetInfo::getWebGLVertexArrayObjectOES):
3294 (WebCore::WebGLGetInfo::getWebGLVertexArrayObject):
3295 * html/canvas/WebGLGetInfo.h:
3297 2015-03-16 Brent Fulgham <bfulgham@apple.com>
3299 Potentially uninitialized Inspector values
3300 https://bugs.webkit.org/show_bug.cgi?id=142730
3302 Reviewed by Joseph Pecoraro.
3304 * inspector/InspectorDOMAgent.cpp:
3305 (WebCore::parseColor): Make sure color values are given an initial value.
3307 2015-03-16 Brady Eidson <beidson@apple.com>
3309 URLs visited during private browsing show up in WebpageIcons.db
3310 rdar://problem/11254910 and https://bugs.webkit.org/show_bug.cgi?id=142733
3312 Patch by Sam Weinig. Reviewed by Brady Eidson.
3314 * loader/icon/IconController.cpp:
3315 (WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
3316 (WebCore::IconController::continueLoadWithDecision): Instead of here.
3318 2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
3320 Allow clients to selectively disable plug-ins
3321 https://bugs.webkit.org/show_bug.cgi?id=142506
3323 Reviewed by Anders Carlsson.
3325 Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
3326 from the page). As part of this:
3328 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
3331 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
3334 3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
3335 a concrete implementation thereof in WebPlatformStrategies in WebKit2.
3337 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
3339 While currently only used in a very limited manner, the new declarative plug-in policies are written generically
3340 so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
3342 * dom/DOMImplementation.cpp:
3343 (WebCore::DOMImplementation::createDocument):
3344 Update to reflect function rename.
3346 * loader/SubframeLoader.cpp:
3347 (WebCore::findPluginMIMETypeFromURL):
3348 Adopt getWebVisibleMimesAndPluginIndices().
3349 (WebCore::logPluginRequest):
3350 Update to reflect function rename.
3351 (WebCore::SubframeLoader::shouldUsePlugin):
3354 * platform/PlatformStrategies.h:
3355 Export platformStrategies(), since it is now used in WebProcess.cpp.
3357 * plugins/DOMMimeType.cpp:
3358 (WebCore::DOMMimeType::type):
3359 (WebCore::DOMMimeType::description):
3360 (WebCore::DOMMimeType::mimeClassInfo):
3361 Adopt getWebVisibleMimesAndPluginIndices().
3362 (WebCore::DOMMimeType::enabledPlugin):
3365 * plugins/DOMMimeType.h:
3366 Don't return references in a few places where it is no longer safe to do so.
3367 (WebCore::DOMMimeType::mimeClassInfo): Deleted.
3369 * plugins/DOMMimeTypeArray.cpp:
3370 (WebCore::DOMMimeTypeArray::length):
3371 Adopt getWebVisibleMimesAndPluginIndices().
3372 (WebCore::DOMMimeTypeArray::item):
3374 (WebCore::DOMMimeTypeArray::canGetItemsForName):
3376 (WebCore::DOMMimeTypeArray::namedItem):
3379 * plugins/DOMPlugin.cpp:
3380 (WebCore::DOMPlugin::pluginInfo):
3381 Adopt getWebVisiblePlugins().
3382 (WebCore::DOMPlugin::item):
3383 Adopt getWebVisibleMimesAndPluginIndices().
3384 (WebCore::DOMPlugin::canGetItemsForName):
3386 (WebCore::DOMPlugin::namedItem):
3389 * plugins/DOMPlugin.h:
3390 (WebCore::DOMPlugin::pluginInfo): Deleted.
3392 * plugins/DOMPluginArray.cpp:
3393 (WebCore::DOMPluginArray::length):
3394 Adopt getWebVisiblePlugins().
3395 (WebCore::DOMPluginArray::item):
3397 (WebCore::DOMPluginArray::canGetItemsForName):
3399 (WebCore::DOMPluginArray::namedItem):
3402 * plugins/PluginData.cpp:
3403 (WebCore::PluginData::PluginData):
3404 Stash the passed-in Page and call initPlugins().
3405 (WebCore::PluginData::getWebVisiblePlugins):
3406 New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
3407 (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
3408 New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
3409 limited to the web-visible plug-ins.
3410 (WebCore::PluginData::supportsWebVisibleMimeType):
3411 Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
3412 (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
3413 Renamed from pluginInfoForMimeType(); ditto.
3414 (WebCore::PluginData::pluginNameForWebVisibleMimeType):
3415 Renamed from pluginNameForMimeType(); ditto.
3416 (WebCore::PluginData::pluginFileForWebVisibleMimeType):
3417 Renamed from pluginFileForMimeType(); ditto.
3418 (WebCore::PluginData::initPlugins):
3419 (WebCore::PluginData::supportsMimeType): Deleted.
3420 (WebCore::PluginData::pluginInfoForMimeType): Deleted.
3421 (WebCore::PluginData::pluginNameForMimeType): Deleted.
3422 (WebCore::PluginData::pluginFileForMimeType): Deleted.
3424 * plugins/PluginData.h:
3425 Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
3426 new members to PluginInfo for the clientLoadPolicy and bundle information.
3427 (WebCore::PluginData::PluginData):
3428 Replace some member functions with new ones that will hide plug-ins upon request from the client;
3429 (WebCore::PluginData::mimes): Deleted.
3430 (WebCore::PluginData::mimePluginIndices): Deleted.
3432 * plugins/PluginStrategy.h: