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