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