fd1223cd18e3381a964d44d27d0d15094cc80ddd
[WebKit.git] / Source / WebCore / ChangeLog
1 2015-03-31  Yusuke Suzuki  <utatane.tea@gmail.com>
2
3         Clean up Identifier factories to clarify the meaning of StringImpl*
4         https://bugs.webkit.org/show_bug.cgi?id=143146
5
6         Reviewed by Filip Pizlo.
7
8         Just change Identifier creations.
9
10         1. If the code creates Identifier from StringImpl*
11         which is treated as symbol or string(unique id), use Identifier::fromUid.
12         2. If the code creates Identifier from string, use Identifier::fromString.
13
14         * Modules/plugins/QuickTimePluginReplacement.mm:
15         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
16         (WebCore::QuickTimePluginReplacement::installReplacement):
17         * bindings/js/IDBBindingUtilities.cpp:
18         (WebCore::get):
19         (WebCore::set):
20         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
21         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
22         * bindings/js/JSCallbackData.cpp:
23         (WebCore::JSCallbackData::invokeCallback):
24         * bindings/js/JSCommandLineAPIHostCustom.cpp:
25         (WebCore::getJSListenerFunctions):
26         (WebCore::JSCommandLineAPIHost::getEventListeners):
27         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
28         (WebCore::JSCryptoAlgorithmBuilder::add):
29         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
30         (WebCore::getProperty):
31         (WebCore::getHashAlgorithm):
32         * bindings/js/JSCryptoKeySerializationJWK.cpp:
33         (WebCore::getJSArrayFromJSON):
34         (WebCore::getStringFromJSON):
35         (WebCore::getBooleanFromJSON):
36         (WebCore::addToJSON):
37         (WebCore::buildJSONForRSAComponents):
38         (WebCore::addBoolToJSON):
39         (WebCore::addUsagesToJSON):
40         * bindings/js/JSCustomXPathNSResolver.cpp:
41         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
42         * bindings/js/JSDOMStringMapCustom.cpp:
43         (WebCore::JSDOMStringMap::getOwnPropertyNames):
44         * bindings/js/JSDOMWindowCustom.cpp:
45         (WebCore::JSDOMWindow::defineOwnProperty):
46         (WebCore::JSDOMWindow::setLocation):
47         (WebCore::DialogHandler::dialogCreated):
48         (WebCore::DialogHandler::returnValue):
49         * bindings/js/JSDeviceMotionEventCustom.cpp:
50         (WebCore::readAccelerationArgument):
51         (WebCore::readRotationRateArgument):
52         (WebCore::createAccelerationObject):
53         (WebCore::createRotationRateObject):
54         * bindings/js/JSDictionary.cpp:
55         (WebCore::JSDictionary::tryGetProperty):
56         * bindings/js/JSEventListener.cpp:
57         (WebCore::JSEventListener::handleEvent):
58         * bindings/js/JSHTMLAllCollectionCustom.cpp:
59         (WebCore::callHTMLAllCollection):
60         (WebCore::JSHTMLAllCollection::item):
61         (WebCore::JSHTMLAllCollection::namedItem):
62         * bindings/js/JSHTMLDocumentCustom.cpp:
63         (WebCore::JSHTMLDocument::all):
64         (WebCore::JSHTMLDocument::setAll):
65         (WebCore::JSHTMLDocument::open):
66         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
67         (WebCore::JSHTMLFormControlsCollection::namedItem):
68         * bindings/js/JSIDBDatabaseCustom.cpp:
69         (WebCore::JSIDBDatabase::createObjectStore):
70         * bindings/js/JSIDBObjectStoreCustom.cpp:
71         (WebCore::JSIDBObjectStore::createIndex):
72         * bindings/js/JSImageDataCustom.cpp:
73         (WebCore::toJS):
74         * bindings/js/JSInspectorFrontendHostCustom.cpp:
75         (WebCore::populateContextMenuItems):
76         * bindings/js/JSLazyEventListener.cpp:
77         (WebCore::JSLazyEventListener::initializeJSFunction):
78         * bindings/js/JSNodeFilterCondition.cpp:
79         (WebCore::JSNodeFilterCondition::acceptNode):
80         * bindings/js/JSSQLResultSetRowListCustom.cpp:
81         (WebCore::JSSQLResultSetRowList::item):
82         * bindings/js/JSStorageCustom.cpp:
83         (WebCore::JSStorage::getOwnPropertyNames):
84         * bindings/js/ReadableStreamJSSource.cpp:
85         (WebCore::setInternalSlotToObject):
86         (WebCore::getInternalSlotFromObject):
87         * bindings/js/ScriptGlobalObject.cpp:
88         (WebCore::ScriptGlobalObject::set):
89         (WebCore::ScriptGlobalObject::get):
90         (WebCore::ScriptGlobalObject::remove):
91         * bindings/js/SerializedScriptValue.cpp:
92         (WebCore::CloneSerializer::CloneSerializer):
93         (WebCore::CloneSerializer::write):
94         (WebCore::CloneDeserializer::deserialize):
95         * bindings/objc/WebScriptObject.mm:
96         (-[WebScriptObject callWebScriptMethod:withArguments:]):
97         (-[WebScriptObject setValue:forKey:]):
98         (-[WebScriptObject valueForKey:]):
99         (-[WebScriptObject removeWebScriptKey:]):
100         (-[WebScriptObject hasWebScriptKey:]):
101         * bindings/scripts/CodeGeneratorJS.pm:
102         (GenerateImplementation):
103         * bindings/scripts/test/JS/JSFloat64Array.cpp:
104         (WebCore::JSFloat64Array::getOwnPropertyNames):
105         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
106         (WebCore::JSTestEventTarget::getOwnPropertyNames):
107         * bindings/scripts/test/JS/JSTestObj.cpp:
108         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
109         (WebCore::setJSTestObjConditionalAttr4Constructor):
110         (WebCore::setJSTestObjConditionalAttr5Constructor):
111         (WebCore::setJSTestObjConditionalAttr6Constructor):
112         (WebCore::setJSTestObjReplaceableAttribute):
113         * bridge/c/c_utility.cpp:
114         (JSC::Bindings::identifierFromNPIdentifier):
115         * bridge/objc/objc_runtime.mm:
116         (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
117         * bridge/testbindings.cpp:
118         (main):
119         * bridge/testbindings.mm:
120         (main):
121         * contentextensions/ContentExtensionParser.cpp:
122         (WebCore::ContentExtensions::loadTrigger):
123         (WebCore::ContentExtensions::loadAction):
124         * html/HTMLMediaElement.cpp:
125         (WebCore::HTMLMediaElement::parseAttribute):
126         * html/HTMLPlugInImageElement.cpp:
127         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
128         * testing/js/WebCoreTestSupport.cpp:
129         (WebCoreTestSupport::injectInternalsObject):
130
131 2015-03-31  Jer Noble  <jer.noble@apple.com>
132
133         [Mac] Songza.com fails to play; QTKit path reports it is always "seeking".
134         https://bugs.webkit.org/show_bug.cgi?id=143274
135
136         Rubber-stamped by Eric Carlson.
137
138         MediaTime::invalidTime() is always greater than any valid time. So when
139         checking to see if MediaPlayerPrivateQTKit is seeking, first check if the
140         m_seekTo time is valid before checking whether it's > 0.
141
142         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
143         (WebCore::MediaPlayerPrivateQTKit::seeking):
144
145 2015-03-31  Said Abou-Hallawa  <sabouhallawa@apple.com>
146
147         border-image with 'fill' keyword does not fill the middle area unless the border width is greater than zero.
148         https://bugs.webkit.org/show_bug.cgi?id=142650.
149
150         Reviewed by Simon Fraser.
151
152         The decoration of a RenderBox, a RenderTable or an InlineFlowBox should be
153         drawn if its RenderStyle has a non-zero width border or the border-image
154         has the keyword fill.
155
156         Tests: fast/borders/border-image-fill-inline-no-border.html
157                fast/borders/border-image-fill-no-border.html
158
159         * rendering/InlineFlowBox.cpp:
160         (WebCore::InlineFlowBox::paintBoxDecorations):
161         * rendering/RenderBox.cpp:
162         (WebCore::RenderBox::paintBoxDecorations):
163         * rendering/RenderBoxModelObject.cpp:
164         (WebCore::RenderBoxModelObject::hasBoxDecorationStyle):
165         * rendering/RenderTable.cpp:
166         (WebCore::RenderTable::paintBoxDecorations):
167         * rendering/style/BorderData.h:
168         (WebCore::BorderData::hasFill):
169         * rendering/style/RenderStyle.h:
170
171 2015-03-31  Alex Christensen  <achristensen@webkit.org>
172
173         [Win] Unreviewed build fix.
174
175         * WebCore.vcxproj/WebCore.vcxproj:
176         Don't include inspector files twice in debug builds.
177         InspectorAllInOne.cpp is now used on debug builds.
178
179 2015-03-31  David Hyatt  <hyatt@apple.com>
180
181         [New Block-Inside-Inline Model] Anonymous inline-blocks should size as though they are block-level.
182         https://bugs.webkit.org/show_bug.cgi?id=143271
183
184         Reviewed by Dean Jackson.
185
186         Added fast/block/inside-inlines/block-width-check.html.
187
188         * rendering/RenderBox.cpp:
189         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
190         Return false when an anonymous inline-block is encountered, since we want to treat it like a regular
191         block instead.
192
193 2015-03-31  Commit Queue  <commit-queue@webkit.org>
194
195         Unreviewed, rolling out r182186.
196         https://bugs.webkit.org/show_bug.cgi?id=143270
197
198         it crashes all the WebGL tests on the Debug bots (Requested by
199         dino on #webkit).
200
201         Reverted changeset:
202
203         "Web Inspector: add 2D/WebGL canvas instrumentation
204         infrastructure"
205         https://bugs.webkit.org/show_bug.cgi?id=137278
206         http://trac.webkit.org/changeset/182186
207
208 2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>
209
210         Crash in CGContextShowGlyphsWithAdvances when passing kCGFontIndexInvalid
211         https://bugs.webkit.org/show_bug.cgi?id=143114
212
213         This is a workaround for <rdar://problem/20230073>. Please remove when it is no longer necessary.
214
215         Reviewed by Alexey Proskuryakov.
216
217         Covered by:
218         compositing/regions/floated-region-with-transformed-child.html
219         compositing/regions/floated-region-with-transformed-child-expected.html
220         fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005.html
221         fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005-expected.html
222         fast/regions/overflow/overflow-content-transform-rotate.html
223         fast/regions/overflow/overflow-content-transform-rotate-expected.html
224
225         * platform/graphics/GlyphBuffer.h:
226         (WebCore::GlyphBuffer::shrink): Performing shaping may remove glyphs, so we need to shrink the GlyphBuffer.
227         * platform/graphics/WidthIterator.cpp:
228         (WebCore::applyFontTransforms): Filter out kCGFontIndexInvalid.
229         (WebCore::WidthIterator::advanceInternal): Moved code into applyFontTransforms, and trigger the
230         shrink of the GlyphBuffer.
231
232 2015-03-31  Beth Dakin  <bdakin@apple.com>
233
234         REGRESSION (r173484): Reducing content of scrollable region does not reset scroll 
235         position
236         https://bugs.webkit.org/show_bug.cgi?id=138525
237         -and corresponding-
238         rdar://problem/18166043
239
240         Reviewed by Simon Fraser.
241
242         The change that caused this regression was correct. That change does not allow 
243         RenderLayer to update scroll position after a layout if a rubber-band is currently 
244         happening. The change caused this regression because all of the member variables 
245         in ScrollController that attempt to keep track of the current state of the scroll 
246         gesture (m_inScrollGesture, m_momentumScrollInProgress, and 
247         m_snapRubberbandTimerIsActive) all indicated that a momentum scroll gesture was 
248         still in action for this div even though it very much is not when the bug happens. 
249         Those variables were never properly re-set because the 
250         PlatformWheelEventPhaseEnded events never got dispatched to the ScrollController, 
251         which brought the investigation back to Element.
252
253         We must still dispatch events that have zero delta so that the default event 
254         handlers can handle them, but we should stopPropagation() so that these events are 
255         not sent to the DOM. Websites will break if they get wheel events with no delta.
256         * dom/Element.cpp:
257         (WebCore::Element::dispatchWheelEvent):
258
259 2015-03-31  Alex Christensen  <achristensen@webkit.org>
260
261         [Win] Unreviewed debug build fix after r182186.
262
263         * WebCore.vcxproj/WebCore.vcxproj:
264         Include InspectorAllInOne.cpp in debug builds.
265
266 2015-03-30  David Hyatt  <hyatt@apple.com>
267
268         [New Block-Inside-Inline Model] Make sure line breaks occur before and after the anonymous inline-block.
269         https://bugs.webkit.org/show_bug.cgi?id=143238.
270
271         Reviewed by Dean Jackson.
272
273         Added fast/blocks/inside-inlines/breaking-behavior.html (and new-model equivalent).
274
275         * rendering/InlineFlowBox.h:
276         (WebCore::InlineFlowBox::InlineFlowBox):
277         (WebCore::InlineFlowBox::hasAnonymousInlineBlock):
278         (WebCore::InlineFlowBox::setHasAnonymousInlineBlock):
279         Add a bit to root line boxes (stored in the InlineFlowBox since it has free bits) that indicates whether
280         or not a line is an anonymous inline-block line.
281
282         * rendering/RenderBlockFlow.cpp:
283         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
284         Patch the preferred logical width computation to break both before and after an anonymous inline-block.
285         Also make sure to strip trailing spaces from the line before the anonymous inline-block.
286
287         * rendering/RenderBlockLineLayout.cpp:
288         (WebCore::RenderBlockFlow::constructLine):
289         Patch line construction so that no intermediate boxes are constructed between the InlineBox for the anonymous
290         inline-block and the root line box.
291
292         * rendering/RootInlineBox.cpp:
293         (WebCore::RootInlineBox::ascentAndDescentForBox):
294         The height of a "line" that holds an anonymous inline-block should ignore line-box-contain and also make sure
295         that the margins of the replaced element are "outside" the line, since those margins will collapse.
296
297         * rendering/line/BreakingContext.h:
298         (WebCore::BreakingContext::handleReplaced):
299         Patch handleReplaced to make sure breaks occur both before and after an anonymous inline-block. In the case of
300         a break after the block, we setPreviousLineBrokeCleanly to true so that <br>s that follow the anonymous inline-block
301         are respected.
302
303 2015-03-31  Csaba Osztrogonác  <ossy@webkit.org>
304
305         [EFL] Add nullptr check to GraphicsContext3D::makeContextCurrent()
306         https://bugs.webkit.org/show_bug.cgi?id=143214
307
308         Reviewed by Žan Doberšek.
309
310         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
311         (WebCore::GraphicsContext3D::makeContextCurrent):
312
313 2015-03-31  Matt Baker  <mattbaker@apple.com>
314
315         Web Inspector: add 2D/WebGL canvas instrumentation infrastructure
316         https://bugs.webkit.org/show_bug.cgi?id=137278
317
318         Reviewed by Timothy Hatcher.
319
320         Added backend agent for canvas inspection. A canvas is instrumented once its CanvasRenderingContext has been
321         created. WebGLRenderingContext is instrumented to track the lifetime of shader program objects.
322
323         To instrument off-screen rendering contexts (CSS canvases and detached canvas elements), the canvas agent must
324         track all CanvasRenderingContexts as they are created, even in the absense of the frontend. As far as I know,
325         there is no practical way to identify rendering contexts belonging to a frame that are not in the DOM. In the
326         absence of the inspector frontend the agent does only the minimum required to track the lifetime of rendering
327         contexts and their resources, to avoid creating a negative performance impact.
328
329         Tests: inspector/canvas/canvas-add-remove-events.html
330                inspector/canvas/canvas-context-attributes.html
331                inspector/canvas/canvas-css-name.html
332
333         * CMakeLists.txt:
334         * WebCore.xcodeproj/project.pbxproj:
335
336         * dom/Document.cpp:
337         (WebCore::Document::getCSSCanvasElement):
338         Instrumentation for CSS canvases.
339
340         * html/HTMLCanvasElement.cpp:
341         (WebCore::HTMLCanvasElement::getContext):
342         Instrumentation for context creation.
343
344         * html/canvas/WebGLRenderingContextBase.cpp:
345         (WebCore::WebGLRenderingContextBase::attachShader):
346         (WebCore::WebGLRenderingContextBase::createProgram):
347         (WebCore::WebGLRenderingContextBase::deleteProgram):
348         (WebCore::WebGLRenderingContextBase::detachShader):
349         Instrumentation for programs and shaders.
350
351         * inspector/InspectorAllInOne.cpp:
352
353         * inspector/InspectorCanvasAgent.cpp: Added.
354         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
355         (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
356         (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
357         (WebCore::InspectorCanvasAgent::frameNavigated):
358         (WebCore::InspectorCanvasAgent::didCreateCSSCanvas):
359         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
360         (WebCore::InspectorCanvasAgent::didAttachShader):
361         (WebCore::InspectorCanvasAgent::didDetachShader):
362         (WebCore::InspectorCanvasAgent::didCreateProgram):
363         (WebCore::InspectorCanvasAgent::didDeleteProgram):
364         (WebCore::InspectorCanvasAgent::getCanvases):
365         (WebCore::InspectorCanvasAgent::canvasDestroyed):
366         (WebCore::InspectorCanvasAgent::canvasDestroyedTimerFired):
367         (WebCore::InspectorCanvasAgent::reset):
368         (WebCore::InspectorCanvasAgent::getCanvasEntry):
369         (WebCore::InspectorCanvasAgent::getProgramEntry):
370         (WebCore::InspectorCanvasAgent::removeShaderFromShaderMap):
371         (WebCore::InspectorCanvasAgent::contextTypeJson):
372         (WebCore::InspectorCanvasAgent::buildObjectForCanvas):
373         * inspector/InspectorCanvasAgent.h: Added.
374         New backend agent.
375
376         * inspector/InspectorController.cpp:
377         (WebCore::InspectorController::InspectorController):
378         Support for new backend agent.
379
380         * inspector/InspectorInstrumentation.cpp:
381         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
382         (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl):
383         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
384         (WebCore::InspectorInstrumentation::didAttachShaderImpl):
385         (WebCore::InspectorInstrumentation::didDetachShaderImpl):
386         (WebCore::InspectorInstrumentation::didCreateProgramImpl):
387         (WebCore::InspectorInstrumentation::didDeleteProgramImpl):
388         (WebCore::InspectorInstrumentation::instrumentingAgentsForRenderingContext):
389         Plumbing for canvas instrumentation.
390
391         * inspector/InspectorInstrumentation.h:
392         (WebCore::InspectorInstrumentation::didCreateCSSCanvas):
393         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
394         (WebCore::InspectorInstrumentation::didAttachShader):
395         (WebCore::InspectorInstrumentation::didDetachShader):
396         (WebCore::InspectorInstrumentation::didCreateProgram):
397         (WebCore::InspectorInstrumentation::didDeleteProgram):
398
399         * inspector/InstrumentingAgents.cpp:
400         (WebCore::InstrumentingAgents::InstrumentingAgents):
401         (WebCore::InstrumentingAgents::reset):
402         * inspector/InstrumentingAgents.h:
403         (WebCore::InstrumentingAgents::inspectorCanvasAgent):
404         (WebCore::InstrumentingAgents::setInspectorCanvasAgent):
405         Support for new backend agent.
406
407 2015-03-31  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
408
409         [Streams API] Implement a barebone ReadableStreamReader interface
410         https://bugs.webkit.org/show_bug.cgi?id=142866
411
412         Reviewed by Benjamin Poulain.
413
414         This patch implements a barebone ReadableStreamReader as described in https://streams.spec.whatwg.org/#reader-class.
415         It implements the IDL without implementing most of the functionality behind.
416         It implements ReadableStreamReader JS constructor and the link with ReadableStream.getReader:
417         - Raise an error if stream is already locked
418         - Set the stream reader to the newly created ReadableStreamReader instance.
419
420         Test: streams/readablestreamreader-constructor.html
421
422         * CMakeLists.txt: Adding ReadableStreamReader files.
423         * DerivedSources.cpp: Ditto.
424         * DerivedSources.make: Ditto.
425         * Modules/streams/ReadableStream.cpp:
426         (WebCore::ReadableStream::createReader): Used by JS binding to get access to the reader.
427         * Modules/streams/ReadableStream.h: Declaration of createReader, reader and lock.
428         (WebCore::ReadableStream::reader):
429         (WebCore::ReadableStream::lock):
430         * Modules/streams/ReadableStream.idl: Cleaning-up the IDL.
431         * Modules/streams/ReadableStreamReader.cpp: Added.
432         (WebCore::ReadableStreamReader::create):
433         (WebCore::ReadableStreamReader::ReadableStreamReader):
434         (WebCore::ReadableStreamReader::~ReadableStreamReader):
435         (WebCore::ReadableStreamReader::closed):
436         (WebCore::ReadableStreamReader::activeDOMObjectName):
437         (WebCore::ReadableStreamReader::canSuspend):
438         * Modules/streams/ReadableStreamReader.h: Added.
439         (WebCore::ReadableStreamReader::stream):
440         * Modules/streams/ReadableStreamReader.idl: Added.
441         * WebCore.vcxproj/WebCore.vcxproj:
442         * WebCore.vcxproj/WebCore.vcxproj.filters:
443         * WebCore.xcodeproj/project.pbxproj:
444         * bindings/js/JSBindingsAllInOne.cpp:
445         * bindings/js/JSReadableStreamCustom.cpp:
446         (WebCore::JSReadableStream::getReader):
447         * bindings/js/JSReadableStreamReaderCustom.cpp: Added.
448         (WebCore::JSReadableStreamReader::read):
449         (WebCore::getOrCreatePromiseDeferredFromObject):
450         (WebCore::closedPromiseSlotName):
451         (WebCore::JSReadableStreamReader::closed):
452         (WebCore::JSReadableStreamReader::cancel):
453         (WebCore::JSReadableStreamReader::releaseLock):
454         (WebCore::constructJSReadableStreamReader):
455
456 2015-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>
457
458         [GTK] DnD icon/widget has odd background
459         https://bugs.webkit.org/show_bug.cgi?id=143217
460
461         Reviewed by Martin Robinson.
462
463         Remove DragIcon class since it's no longer needed with GTK+3 and
464         the GTK+2 code there is unused. GTK+ knows what to do with a cairo
465         surface, I guess we migrated the GTK+2 code to GTK+3 without
466         realizing that using the surface was enough.
467
468         * PlatformGTK.cmake:
469         * platform/gtk/DragIcon.cpp: Removed.
470         * platform/gtk/DragIcon.h: Removed.
471
472 2015-03-30  Alex Christensen  <achristensen@webkit.org>
473
474         Unreviewed build fix after r182168.
475
476         * contentextensions/ContentExtensionsBackend.cpp:
477         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
478         Explicitly cast to unsigned.
479
480 2015-03-30  Alex Christensen  <achristensen@webkit.org>
481
482         [Content Extensions] Correctly handle regular expressions matching everything
483         https://bugs.webkit.org/show_bug.cgi?id=143235
484
485         Reviewed by Benjamin Poulain.
486
487         Test: http/tests/contentextensions/whitelist.html
488
489         * contentextensions/CompiledContentExtension.cpp:
490         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
491         Global actions can have non-css actions.  Only put the selectors into the list of selectors.
492         * contentextensions/ContentExtensionCompiler.cpp:
493         (WebCore::ContentExtensions::serializeSelector):
494         (WebCore::ContentExtensions::serializeActions):
495         Merge sequential css selectors with identical triggers (usually .*) into one action to reduce the number of actions.
496         (WebCore::ContentExtensions::compileRuleList):
497         Fail if a regular expression matches everything after ignore-previous-rules.
498         * contentextensions/ContentExtensionError.cpp:
499         (WebCore::ContentExtensions::contentExtensionErrorCategory):
500         * contentextensions/ContentExtensionError.h:
501         Add more failure cases.
502         * contentextensions/ContentExtensionRule.h:
503         (WebCore::ContentExtensions::Trigger::operator==):
504         Allow comparing of Triggers to determine if sequential triggers are equal.
505         * contentextensions/ContentExtensionsBackend.cpp:
506         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
507         Put non-css actions that match everything into the list of actions if ignore-previous-rules was not hit.
508         These actions will be out of order, but order only matters when determining if ignore-previous-rules, and this case is handled correctly.
509         * contentextensions/DFABytecodeInterpreter.cpp:
510         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
511         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
512         Added an assertion that all actions that match everything should be in the first DFA root.
513         We should catch them all with URLFilterParser::MatchesEverything.
514
515 2015-03-30  Myles C. Maxfield  <mmaxfield@apple.com>
516
517         Allow building on Windows without Cygwin
518         https://bugs.webkit.org/show_bug.cgi?id=143219
519
520         Reviewed by Brent Fulgham.
521
522         * AVFoundationSupport.py: Renamed from Source/WebCore/WebCore.vcxproj/MigrateScripts.
523         Move logic from DerivedSources.make to its own script
524         (lookFor):
525         * DerivedSources.make: Paths like /usr/bin don't exist on Windows.
526         Windows uses del instead of rm -f
527         Windows doesn't have printf
528         * WebCore.vcxproj/WebCoreGenerated.make: Pass the CC executable to
529         build-generated-files.pl
530         * WebCore.vcxproj/build-generated-files.pl: Export the CC executable as an environment
531         variable. Don't use /usr/bin.
532         * WebCore.vcxproj/migrate-scripts.pl: Deleted the MigrateScripts makefile. We don't
533         need a whole Makefile just to copy 5 files. Moved this logic into migrate-scripts.pl.
534         (copyFile):
535         * bindings/scripts/preprocessor.pm:
536         (applyPreprocessor): Support passing preprocessing flags to the Visual Studio
537         compiler.
538         * dom/make_names.pl: Ditto.
539
540 2015-03-30  Alexey Proskuryakov  <ap@apple.com>
541
542         Build fix.
543
544         * platform/spi/mac/AVFoundationSPI.h:
545
546 2015-03-30  Sam Weinig  <sam@webkit.org>
547
548         [Content Extensions] Flesh out the UserContentExtensionStore
549         https://bugs.webkit.org/show_bug.cgi?id=143123
550
551         Reviewed by Benjamin Poulain.
552
553         - Adds a variant of getFileSize() that takes a PlatformFileHandle.
554         - Adds a new file system function, rename() which operates as the POSIX
555           rename function does.
556
557         * platform/FileSystem.h:
558         Add new functions.
559
560         * platform/posix/FileSystemPOSIX.cpp:
561         (WebCore::renameFile):
562         (WebCore::getFileSize):
563         Add implementations.
564
565         * platform/gtk/FileSystemGtk.cpp:
566         (WebCore::renameFile):
567         (WebCore::getFileSize):
568         * platform/win/FileSystemWin.cpp:
569         (WebCore::getFileSize):
570         (WebCore::renameFile):
571         Add stubs.
572
573 2015-03-30  Per Arne Vollan  <peavo@outlook.com>
574
575         [WinCairo] Crash when closing window while video is loading
576         https://bugs.webkit.org/show_bug.cgi?id=143088
577
578         Reviewed by Mark Lam.
579
580         When the media player is destroyed, we have to cancel possible calls on the
581         main thread made by a worker thread. Otherwise the destroyed media player
582         will be accessed when performing the call.
583
584         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
585         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
586         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
587         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
588         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
589         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSourceCallback):
590         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySetCallback):
591         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
592
593 2015-03-30  Gwang Yoon Hwang  <yoon@igalia.com>
594
595         [Threaded Compositor] Crash when animation changes frequently.
596         https://bugs.webkit.org/show_bug.cgi?id=143213
597
598         Reviewed by Simon Fraser.
599
600         CompositingCoordinator copies CoordinatedGraphicsLayerState when
601         flushing GraphicsLayer changes, and ThreadedCoordinatedCompositor passes
602         it to compositing thread.
603
604         To ensure thread-safety, we need to provide copy constructor to copy
605         Animation object in TextureMapperAnimation instead of referencing it.
606
607         Since TimingFunction and TransformOperation used by KeyframeValueList are
608         not ThreadSafeRefCounted, these should be cloned also.
609
610         No new tests needed.
611
612         * platform/graphics/GraphicsLayer.h:
613         (WebCore::AnimationValue::AnimationValue):
614         (WebCore::FloatAnimationValue::FloatAnimationValue):
615         (WebCore::TransformAnimationValue::TransformAnimationValue):
616         (WebCore::FilterAnimationValue::FilterAnimationValue):
617         Adds deep copy constructor.
618
619         * platform/graphics/texmap/TextureMapperAnimation.cpp:
620         (WebCore::TextureMapperAnimation::TextureMapperAnimation):
621         Because the name of the animation can be AtomicString, we need to create
622         isolated version of string to ensure thread safty.
623
624         * platform/graphics/texmap/TextureMapperAnimation.h:
625         * platform/graphics/transforms/IdentityTransformOperation.h:
626         * platform/graphics/transforms/Matrix3DTransformOperation.h:
627         * platform/graphics/transforms/MatrixTransformOperation.h:
628         * platform/graphics/transforms/PerspectiveTransformOperation.h:
629         * platform/graphics/transforms/RotateTransformOperation.h:
630         * platform/graphics/transforms/ScaleTransformOperation.h:
631         * platform/graphics/transforms/SkewTransformOperation.h:
632         * platform/graphics/transforms/TransformOperation.h:
633         * platform/graphics/transforms/TranslateTransformOperation.h:
634         Adds TransformOperation::clone() for threadsafety.
635
636 2015-03-30  Chris Dumez  <cdumez@apple.com>
637
638         Cached "Expires" header is not updated upon successful resource revalidation
639         https://bugs.webkit.org/show_bug.cgi?id=143228
640         <rdar://problem/20348059>
641
642         Reviewed by Antti Koivisto.
643
644         Cached "Expires" header was not updated upon successful resource
645         revalidation. This affected both our disk cache and our memory cache.
646         This was caused by shouldUpdateHeaderAfterRevalidation() in
647         CacheValidation.cpp returning false for the "Expires" header.
648
649         There is a comment there stating that the list of ignored headers
650         matches Chromium's net library but that's not the case, at least not
651         anymore:
652         http://osxr.org/android/source/external/chromium/net/http/http_response_headers.cc
653
654         HTTP servers such as Apache return an "Expires" header in their 304
655         responses and the "Expires" header is potentially a new one. However,
656         our caches were ignoring the updated expiration date and kept using the
657         old one, which meant that the cached resource expired sooner than it
658         should have.
659
660         See the following Apache bugs that explain the issue:
661         https://bz.apache.org/bugzilla/show_bug.cgi?id=24884
662         https://bz.apache.org/bugzilla/show_bug.cgi?id=25123
663
664         Test: http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html
665
666         * platform/network/CacheValidation.cpp:
667
668 2015-03-30  Antti Koivisto  <antti@apple.com>
669
670         Don't cache resources that are very unlikely to be reused
671         https://bugs.webkit.org/show_bug.cgi?id=143226
672         <rdar://problem/20347160>
673
674         Reviewed by Geoff Garen.
675
676         Allow overriding resource load priorities via Internals for testing.
677
678         * loader/FrameLoader.cpp:
679         (WebCore::FrameLoader::addExtraFieldsToRequest):
680         (WebCore::FrameLoader::clearTestingOverrides):
681         * loader/FrameLoader.h:
682         (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting):
683         (WebCore::FrameLoader::clearOverrideCachePolicyForTesting): Deleted.
684         * page/DiagnosticLoggingKeys.cpp:
685         (WebCore::DiagnosticLoggingKeys::unlikelyToReuseKey):
686         * page/DiagnosticLoggingKeys.h:
687
688             Add a key.
689
690         * testing/Internals.cpp:
691         (WebCore::Internals::resetToConsistentState):
692         (WebCore::stringToResourceLoadPriority):
693         (WebCore::Internals::setOverrideResourceLoadPriority):
694         * testing/Internals.h:
695         * testing/Internals.idl:
696
697 2015-03-30  Javier Fernandez  <jfernandez@igalia.com>
698
699         [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
700         https://bugs.webkit.org/show_bug.cgi?id=133359
701
702         Reviewed by David Hyatt.
703
704         From Blink r164817 and r165264 by <jchaffraix@chromium.org>
705
706         Broaden justify-self's parsing name
707
708         This is in preparation of migrating align-self, align-items
709         and justify-items to the CSS 3 Alignment syntax.
710
711         The current naming was too tied to justify-self and needs to
712         be broadened. This will reduce the follow-up implementations'
713         patches.
714
715         Upgrade align-self and align-items parsing to CSS 3
716
717         This change migrates the 2 properties to the CSS 3 Alignment
718         parsing. The new parsing is identical to how we parse
719         'justify-self'. The 2 properties need to be migrated together
720         as they are used in tandem in CSSComputedStyleDeclaration.
721
722         This change also removes EAlignItems as it is now unused.
723
724         Tests: css3/parse-align-items.html
725                css3/parse-align-self.html
726
727         * css/CSSComputedStyleDeclaration.cpp:
728         (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties.
729         (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
730         (WebCore::ComputedStyleExtractor::propertyValue):
731         * css/CSSParser.cpp:
732          (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items.
733         (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items.
734         (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value.
735         (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
736         (WebCore::CSSParser::parseJustifySelf): Deleted.
737         (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
738         * css/CSSParser.h:
739         * css/CSSPrimitiveValueMappings.h:
740         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added.
741         (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
742         (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
743         (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
744         (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
745         (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
746         * css/CSSPropertyNames.in:
747         * css/CSSValueKeywords.in:
748         * css/StyleBuilderCustom.h:
749         (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added.
750         (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added.
751         (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added.
752         (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added.
753         (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added.
754         (WebCore::StyleBuilderCustom::applyValueAlignItems): Added.
755         (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added.
756         (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added.
757         (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added.
758         (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted.
759         * css/StyleResolver.cpp:
760         (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function.
761         (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle.
762         (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle.
763         (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle.
764         * rendering/RenderBox.cpp:
765         (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum.
766         * rendering/RenderFlexibleBox.cpp:
767         (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum.
768         (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum.
769         (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum.
770         (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum.
771         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum.
772         (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum.
773         (WebCore::resolveAlignment): Deleted. Moved to RenderStyle.
774         * rendering/RenderFlexibleBox.h:
775         * rendering/RenderFullScreen.cpp:
776         (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum.
777         * rendering/RenderMenuList.cpp:
778         (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum.
779         * rendering/mathml/RenderMathMLRoot.cpp:
780         (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum.
781         * rendering/mathml/RenderMathMLScripts.cpp:
782         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum.
783         (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum.
784         * rendering/style/ContentData.h:
785         * rendering/style/RenderStyle.cpp:
786         (WebCore::RenderStyle::resolveAlignment): Added.
787         * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum.
788         * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum.
789         * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum.
790         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum.
791         (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum.
792         * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum.
793         * style/StyleResolveTree.cpp:
794         (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach.
795
796 2015-03-27  David Hyatt  <hyatt@apple.com>
797
798         [New Block-Inside-Inline Model] Create anonymous inline blocks to hold blocks-inside-inlines.
799         https://bugs.webkit.org/show_bug.cgi?id=143145
800
801         Reviewed by Dean Jackson.
802
803         Added fast/block/inside-inlines/ tests.
804
805         * rendering/RenderBlock.cpp:
806         (WebCore::RenderBlock::renderName):
807         Add support for labeling anonymous inline-blocks when dumped by the render tree.
808
809         * rendering/RenderInline.cpp:
810         (WebCore::RenderInline::addChildIgnoringContinuation):
811         When the pref is set to use the new block-inside-inline model, create an anonymous inline block to
812         hold block children of RenderInlines instead of splitting flows or creating continuations.
813
814         * rendering/RenderObject.h:
815         (WebCore::RenderObject::isAnonymousInlineBlock):
816         Add the definition of isAnonymousInlineBlock (note the exclusion of Ruby, since Ruby creates anonymous
817         inline-blocks also).
818
819 2015-03-30  Chris Dumez  <cdumez@apple.com>
820
821         [WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
822         https://bugs.webkit.org/show_bug.cgi?id=143159
823         <rdar://problem/20333296>
824
825         Reviewed by Antti Koivisto.
826
827         Add support for "Cache-Control: max-stale" request header:
828         https://tools.ietf.org/html/rfc7234#section-5.2.1.2
829
830         Test: http/tests/cache/disk-cache/disk-cache-request-max-stale.html
831
832         * platform/network/CacheValidation.cpp:
833         (WebCore::parseCacheControlDirectives):
834         * platform/network/CacheValidation.h:
835
836 2015-03-30  Simon Fraser  <simon.fraser@apple.com>
837
838         Fix iOS internal build after r182132.
839
840         * page/scrolling/ScrollingCoordinator.cpp:
841         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
842
843 2015-03-30  Jer Noble  <jer.noble@apple.com>
844
845         [iOS] When Web Audio is interrupted by a phone call, it cannot be restarted.
846         https://bugs.webkit.org/show_bug.cgi?id=143190
847
848         Reviewed by Darin Adler.
849
850         Tests: webaudio/audiocontext-state-interrupted.html
851                webaudio/audiocontext-state.html
852
853         Implement the following methods and properties from the Web Audio spec:
854         close(), suspend(), resume(), onstatechange.
855
856         AudioContext will take more responsibility for tracking state and interruptions (and
857         AudioDestination will give up that responsibility). This means AudioContext must be a
858         MediaSessionClient, and own its own MediaSession. In return, AudioDestinationIOS and 
859         AudioDestinationMac relinquish both.
860
861         * Modules/webaudio/AudioContext.cpp:
862         (WebCore::AudioContext::AudioContext): Set default values in header.
863         (WebCore::AudioContext::uninitialize): Call setState() instead of setting m_state.
864         (WebCore::AudioContext::addReaction): Added. Append the callback to the appropriate vector for the state.
865         (WebCore::AudioContext::setState): Added. Fire events and resolve the appropriate reaction callbacks for the new state.
866         (WebCore::AudioContext::state): Return a string representing the context's state.
867         (WebCore::AudioContext::stop): Close the event queue.
868         (WebCore::AudioContext::startRendering): Call setState().
869         (WebCore::AudioContext::fireCompletionEvent): Call setState().
870         (WebCore::AudioContext::suspendContext): Added. Add reaction callback and call suspend() on the destination node.
871         (WebCore::AudioContext::resumeContext): Added. Add reaction callback and call resume() on the destination node.
872         (WebCore::AudioContext::closeContext): Added. Add reaction callback and call close() on the destination node.
873         (WebCore::AudioContext::suspendPlayback): Added. Suspend playback and set state to interrupted.
874         (WebCore::AudioContext::mayResumePlayback): Added. Conditionally resume playback.
875         * bindings/js/JSAudioContextCustom.cpp:
876         (WebCore::JSAudioContext::suspend): Added. Create and return a new Promise object.
877         (WebCore::JSAudioContext::resume): Ditto.
878         (WebCore::JSAudioContext::close): Ditto.
879         * Modules/webaudio/AudioContext.idl: Add new methods and properties.
880
881         Extensive organizational changes were made to AudioContext.h to group instance
882         variables together and add C++11 initializers in their declarations:
883
884         * Modules/webaudio/AudioContext.h:
885         (WebCore::AudioContext::mediaType): Moved from AudioDestinationNode.
886         (WebCore::AudioContext::presentationType): Ditto.
887         (WebCore::AudioContext::canReceiveRemoteControlCommands): Ditto.
888         (WebCore::AudioContext::didReceiveRemoteControlCommand): Ditto.
889         (WebCore::AudioContext::overrideBackgroundPlaybackRestriction): Ditto.
890         
891         Other changes to support the new AudioContext methods:
892
893         * Modules/webaudio/AudioDestinationNode.h:
894         (WebCore::AudioDestinationNode::resume): Add empty default virtual method.
895         (WebCore::AudioDestinationNode::suspend): Ditto.
896         (WebCore::AudioDestinationNode::close): Ditto.
897         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
898         (WebCore::DefaultAudioDestinationNode::resume): Added. Pass to AudioDestination.
899         (WebCore::DefaultAudioDestinationNode::suspend): Ditto.
900         (WebCore::DefaultAudioDestinationNode::close): Ditto.
901         * Modules/webaudio/DefaultAudioDestinationNode.h:
902         * bindings/js/JSDOMPromise.h:
903         (WebCore::DeferredWrapper::resolve): Add an overload for a nullptr resolve value.
904         * dom/EventNames.h: Added 'statechange'.
905         * dom/ScriptExecutionContext.h:
906         (WebCore::ScriptExecutionContext::Task::Task): Add a constructor which takes a void() callback.
907
908         Modify MediaSession, AudioSession, and MediaSessionManager to support the new
909         interruption behavior.
910
911         * html/HTMLMediaElement.cpp:
912         (WebCore::HTMLMediaElement::suspendPlayback): Renamed from pausePlayback().
913         (WebCore::HTMLMediaElement::mayResumePlayback): Renamed from resumePlayback().
914         * html/HTMLMediaElement.h:
915         * platform/audio/AudioSession.cpp:
916         (WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return true by default.
917         (WebCore::AudioSession::setActive): Deleted.
918         * platform/audio/AudioSession.h:
919         * platform/audio/MediaSession.cpp:
920         (WebCore::MediaSession::beginInterruption): pausePlayback() was renamed to suspendPlayback().
921         (WebCore::MediaSession::endInterruption): Always notify the client, telling it whether to resume.
922         (WebCore::MediaSession::clientWillBeginPlayback): Bail early if reentrant.  Check the (new) 
923             return value of sessionWillBeginPlayback() and remember to resume once the interruption ends.
924         (WebCore::MediaSession::clientWillPausePlayback): Bail early if reentrant.
925         (WebCore::MediaSession::pauseSession): pausePlayback() was renamed to suspendPlayback().
926         * platform/audio/MediaSession.h:
927         * platform/audio/MediaSessionManager.cpp:
928         (WebCore::MediaSessionManager::sessionWillBeginPlayback): Return false if not allowed to break interruption or 
929             if activating the audio session failed. Otherwise, end the interruption.
930         * platform/audio/MediaSessionManager.h:
931         * platform/audio/ios/AudioDestinationIOS.cpp:
932         (WebCore::AudioDestinationIOS::AudioDestinationIOS): m_mediaSession was removed.
933         (WebCore::AudioDestinationIOS::start): Ditto.
934         * platform/audio/ios/AudioDestinationIOS.h:
935         * platform/audio/ios/AudioSessionIOS.mm:
936         (WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return false if the AVAudioSession could not be activated.
937         (WebCore::AudioSession::setActive): Deleted.
938         * platform/audio/ios/MediaSessionManagerIOS.h:
939         * platform/audio/ios/MediaSessionManagerIOS.mm:
940         (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Do not update the now playing info if session playback was blocked.
941         * platform/audio/mac/AudioDestinationMac.cpp:
942         (WebCore::AudioDestinationMac::AudioDestinationMac): m_mediaSession was removed.
943         * platform/audio/mac/AudioDestinationMac.h:
944         * platform/audio/mac/AudioSessionMac.cpp:
945         (WebCore::AudioSession::tryToSetActive): Renamed from setActive(). Return true by default.
946         (WebCore::AudioSession::setActive): Deleted.
947         * platform/audio/mac/MediaSessionManagerMac.cpp:
948         (MediaSessionManager::updateSessionState): No longer attempt to activate the session, as this is done
949             MediaSessionManager::sessionWillBeginPlayback().
950         * testing/Internals.cpp:
951         (WebCore::Internals::setMediaSessionRestrictions): Add "InterruptedPlaybackNotPermitted".
952
953 2015-03-25 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
954
955         [Streams API] Error storage should be moved from source to stream/reader
956         https://bugs.webkit.org/show_bug.cgi?id=143048
957
958         Reviewed by Benjamin Poulain.
959
960         This patch removes error storage from the source as it should be stored at the stream level as error access goes through the reader.
961         It removes abstract ReadableStreamSource::isErrored and the storage of JavaScript errors from ReadableStreamJSSource.
962
963         Existing tests cover most of the changes.
964         Added test case for creating readable stream from empty JS object.
965
966         * Modules/streams/ReadableStreamSource.h: Removing isErrored().
967         * bindings/js/JSReadableStreamCustom.cpp:
968         (WebCore::constructJSReadableStream): Added JS stream constructor parameters checking.
969         * bindings/js/ReadableStreamJSSource.cpp:
970         (WebCore::ReadableStreamJSSource::ReadableStreamJSSource): Removed JS stream constructor parameters checking.
971         (WebCore::ReadableStreamJSSource::start): Changed prototype of start so that start can throw errors directly.
972         (WebCore::ReadableStreamJSSource::setInternalError): Deleted.
973         * bindings/js/ReadableStreamJSSource.h: Removed m_error, setInternalError and updated start declaration.
974
975 2015-03-30  Philippe Normand  <pnormand@igalia.com>
976
977         [GStreamer] More GL shared context fixes
978         https://bugs.webkit.org/show_bug.cgi?id=143216
979
980         Reviewed by Carlos Garcia Campos.
981
982         Moved the GLX/EGL context tests to be done at runtime rather than
983         using build-time macros because in the GTK port at least, both EGL
984         and GLX support are mutually exclusive. Also fixed a couple wrong
985         defines (USE(GLES2) doesn't exist).
986
987         * platform/graphics/GLContext.h: Simple utility method to check if
988         the platform context is compatible with EGL APIs or not.
989         * platform/graphics/egl/GLContextEGL.h:
990         (WebCore::GLContextEGL::isEGLContext):
991         * platform/graphics/glx/GLContextGLX.h:
992         (WebCore::GLContextGLX::isEGLContext):
993         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
994         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): Do
995         runtime checks and properly ensure GLES2/GL API usage.
996
997 2015-03-30  Marcos Chavarría Teijeiro  <chavarria1991@gmail.com>
998
999         Add support for deleting emoji on GTK
1000         https://bugs.webkit.org/show_bug.cgi?id=141419
1001
1002         Reviewed by Gustavo Noronha Silva.
1003
1004         The code for deleting special group of characters was specific for
1005         COCOA and EFL platforms. The fix consists on add GTK to the #if
1006         preprocessor directive.
1007
1008         * rendering/RenderText.cpp:
1009         (WebCore::RenderText::previousOffsetForBackwardDeletion):
1010
1011 2015-03-30  Benjamin Poulain  <benjamin@webkit.org>
1012
1013         Start the features.json files
1014         https://bugs.webkit.org/show_bug.cgi?id=143207
1015
1016         Reviewed by Darin Adler.
1017
1018         * features.json: Added.
1019
1020 2015-03-29  Simon Fraser  <simon.fraser@apple.com>
1021
1022         Convert arguments to ScrollingCoordinator functions to references
1023         https://bugs.webkit.org/show_bug.cgi?id=143198
1024
1025         Reviewed by Darin Adler.
1026
1027         Convert all the FrameView* and ScrollableArea* arguments to ScrollingCoordinator functions to
1028         references, and use references in a few other places.
1029
1030         * dom/Document.cpp:
1031         (WebCore::wheelEventHandlerCountChanged):
1032         * loader/HistoryController.cpp:
1033         (WebCore::HistoryController::restoreScrollPositionAndViewState):
1034         * page/DebugPageOverlays.cpp:
1035         (WebCore::NonFastScrollableRegionOverlay::updateRegion):
1036         * page/Frame.cpp:
1037         (WebCore::Frame::willDetachPage):
1038         * page/FrameView.cpp:
1039         (WebCore::FrameView::prepareForDetach):
1040         (WebCore::FrameView::addSlowRepaintObject):
1041         (WebCore::FrameView::removeSlowRepaintObject):
1042         (WebCore::FrameView::addViewportConstrainedObject):
1043         (WebCore::FrameView::removeViewportConstrainedObject):
1044         (WebCore::FrameView::requestScrollPositionUpdate):
1045         (WebCore::FrameView::performPostLayoutTasks):
1046         (WebCore::FrameView::scrollableAreaSetChanged):
1047         (WebCore::FrameView::wheelEvent):
1048         * page/Page.cpp:
1049         (WebCore::Page::nonFastScrollableRects):
1050         * page/Page.h:
1051         * page/scrolling/AsyncScrollingCoordinator.cpp:
1052         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1053         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
1054         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
1055         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
1056         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
1057         (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
1058         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
1059         (WebCore::AsyncScrollingCoordinator::updateMainFrameScrollLayerPosition):
1060         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
1061         * page/scrolling/AsyncScrollingCoordinator.h:
1062         * page/scrolling/ScrollingCoordinator.cpp:
1063         (WebCore::ScrollingCoordinator::pageDestroyed):
1064         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
1065         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
1066         (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged):
1067         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
1068         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
1069         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea):
1070         (WebCore::ScrollingCoordinator::scrollLayerForFrameView):
1071         (WebCore::ScrollingCoordinator::headerLayerForFrameView):
1072         (WebCore::ScrollingCoordinator::footerLayerForFrameView):
1073         (WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView):
1074         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
1075         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
1076         (WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
1077         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
1078         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
1079         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
1080         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
1081         (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
1082         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
1083         (WebCore::ScrollingCoordinator::replaySessionStateDidChange):
1084         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
1085         * page/scrolling/ScrollingCoordinator.h: Align the bitmask enums to make mistakes easier to spot.
1086         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
1087         (WebCore::ScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
1088         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
1089         (WebCore::ScrollingCoordinator::handleWheelEvent):
1090         (WebCore::ScrollingCoordinator::willDestroyScrollableArea):
1091         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
1092         (WebCore::ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
1093         (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
1094         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1095         (WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
1096         (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
1097         (WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate):
1098         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
1099         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
1100         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1101         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1102         (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
1103         * rendering/RenderLayer.cpp:
1104         (WebCore::RenderLayer::~RenderLayer):
1105         * rendering/RenderLayerBacking.cpp:
1106         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
1107         * rendering/RenderLayerCompositor.cpp:
1108         (WebCore::RenderLayerCompositor::updateBacking):
1109         (WebCore::RenderLayerCompositor::hasCoordinatedScrolling):
1110         (WebCore::RenderLayerCompositor::scrollingLayerDidChange):
1111         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1112         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1113         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1114         (WebCore::RenderLayerCompositor::destroyRootLayer):
1115         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
1116         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1117         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1118         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
1119         * testing/Internals.cpp:
1120         (WebCore::Internals::nonFastScrollableRects):
1121
1122 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
1123
1124         Use :matches() instead of :-webkit-any() for the sections and headings default style
1125         https://bugs.webkit.org/show_bug.cgi?id=143197
1126
1127         Reviewed by Darin Adler.
1128
1129         We no longer need to use the :-webkit-any() hack in the default stylesheet.
1130
1131         The pseudo class :matches() also support correct specificity. This is not observable
1132         since those selector do not conflict with any other rule in the default stylesheet.
1133
1134         * css/CSSSelector.h:
1135         * css/SelectorChecker.cpp:
1136         (WebCore::SelectorChecker::determineLinkMatchType):
1137         * css/html.css:
1138         (:matches(article, aside, nav, section) h1):
1139         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1140         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1141         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1142         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1143         (:-webkit-any(article,aside,nav,section) h1): Deleted.
1144         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1145         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1146         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1147         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1148
1149 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
1150
1151         `currentColor` computes to the same colour on all elements, even if 'color' is inherited differently
1152         https://bugs.webkit.org/show_bug.cgi?id=133420
1153
1154         Reviewed by Darin Adler.
1155
1156         When resolving a style with the help of the property cache, we were
1157         completely ignoring currentColor.
1158
1159         Since you can set currentColor on properties that are not inherited,
1160         those properties would just be copied from the cached style, which
1161         may have a completely different inherited color.
1162
1163         This pacth fixes the issue by preventing any MatchResult from hitting
1164         the cache if it contains any non-inherited property that would require
1165         resolution by the cache:
1166         -Using the inherit value.
1167         -Using the currentColor value.
1168
1169         Tests: fast/css/currentColor-on-before-after-pseudo-elements.html
1170                fast/css/currentColor-style-update-reftest.html
1171                fast/css/currentColor-value-style-update.html
1172
1173         * css/ElementRuleCollector.cpp:
1174         (WebCore::ElementRuleCollector::addElementStyleProperties):
1175         (WebCore::ElementRuleCollector::matchAuthorRules):
1176         (WebCore::ElementRuleCollector::matchUserRules):
1177         (WebCore::ElementRuleCollector::matchUARules):
1178         * css/StyleResolver.cpp:
1179         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
1180         (WebCore::StyleResolver::styleForKeyframe):
1181         (WebCore::StyleResolver::pseudoStyleForElement):
1182         (WebCore::StyleResolver::styleForPage):
1183         (WebCore::StyleResolver::findFromMatchedPropertiesCache):
1184         (WebCore::StyleResolver::addToMatchedPropertiesCache):
1185         (WebCore::extractDirectionAndWritingMode):
1186         (WebCore::StyleResolver::applyMatchedProperties):
1187         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
1188         (WebCore::StyleResolver::CascadedProperties::addMatches):
1189         * css/StyleResolver.h:
1190         (WebCore::StyleResolver::MatchResult::matchedProperties):
1191
1192 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
1193
1194         Enable :any-link by default
1195         https://bugs.webkit.org/show_bug.cgi?id=143201
1196
1197         Reviewed by Sam Weinig.
1198
1199         The pseudo class :any-link has been stable for a while. This patch enables
1200         it by default and remove the -webkit- prefix on the default style.
1201
1202         * css/CSSDefaultStyleSheets.cpp:
1203         * css/CSSSelector.cpp:
1204         (WebCore::CSSSelector::selectorText):
1205         * css/CSSSelector.h:
1206         * css/RuleSet.cpp:
1207         (WebCore::RuleSet::addRule):
1208         * css/SelectorChecker.cpp:
1209         (WebCore::SelectorChecker::checkOne):
1210         * css/SelectorChecker.h:
1211         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
1212         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1213         * css/html.css:
1214         (a:any-link):
1215         (a:any-link:active):
1216         (:any-link img):
1217         (a:-webkit-any-link): Deleted.
1218         (a:-webkit-any-link:active): Deleted.
1219         (:-webkit-any-link img): Deleted.
1220         * cssjit/SelectorCompiler.cpp:
1221         (WebCore::SelectorCompiler::addPseudoClassType):
1222         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
1223
1224 2015-03-29  Joonghun Park  <jh718.park@samsung.com>
1225
1226         nullptr cleanup in RenderFooBox classes
1227         https://bugs.webkit.org/show_bug.cgi?id=143182
1228
1229         Reviewed by Ryosuke Niwa.
1230
1231         No new tests, no behavior changes
1232
1233         Replace 0 with nullptr in RenderFooBox classes.
1234
1235         * rendering/RenderBox.cpp:
1236         (WebCore::RenderBox::RenderBox):
1237         (WebCore::RenderBox::paintFillLayer):
1238         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
1239         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
1240         (WebCore::RenderBox::renderBoxRegionInfo):
1241         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1242         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1243         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
1244         (WebCore::RenderBox::positionForPoint):
1245         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1246         * rendering/RenderBox.h:
1247         (WebCore::RenderBox::setMarginBefore):
1248         (WebCore::RenderBox::setMarginAfter):
1249         (WebCore::RenderBox::setMarginStart):
1250         (WebCore::RenderBox::setMarginEnd):
1251         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
1252         (WebCore::RenderBox::setInlineBoxWrapper):
1253         * rendering/RenderBoxModelObject.cpp:
1254         (WebCore::RenderBoxModelObject::willBeDestroyed):
1255         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
1256         (WebCore::RenderBoxModelObject::paintBorderSides):
1257         (WebCore::RenderBoxModelObject::firstLetterRemainingText):
1258         * rendering/RenderBoxModelObject.h:
1259         (WebCore::RenderBoxModelObject::moveChildTo):
1260         (WebCore::RenderBoxModelObject::moveAllChildrenTo):
1261         (WebCore::RenderBoxModelObject::moveChildrenTo):
1262         * rendering/RenderDeprecatedFlexibleBox.cpp:
1263         (WebCore::FlexBoxIterator::reset):
1264         (WebCore::FlexBoxIterator::next):
1265         * rendering/RenderDeprecatedFlexibleBox.h:
1266         * rendering/RenderFlexibleBox.cpp:
1267         (WebCore::RenderFlexibleBox::firstLineBaseline):
1268         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1269         * rendering/RenderLineBoxList.cpp:
1270         (WebCore::RenderLineBoxList::deleteLineBoxTree):
1271         (WebCore::RenderLineBoxList::extractLineBox):
1272         (WebCore::RenderLineBoxList::deleteLineBoxes):
1273         (WebCore::RenderLineBoxList::checkConsistency):
1274         * rendering/RenderLineBoxList.h:
1275         (WebCore::RenderLineBoxList::RenderLineBoxList):
1276         * rendering/RenderListBox.cpp:
1277         (WebCore::RenderListBox::enclosingScrollableArea):
1278         (WebCore::RenderListBox::setHasVerticalScrollbar):
1279         * rendering/RenderListBox.h:
1280
1281 2015-03-29  Darin Adler  <darin@apple.com>
1282
1283         HTMLCollection caches incorrect length if item(0) is called before length on an empty collection
1284         https://bugs.webkit.org/show_bug.cgi?id=143203
1285         rdar://problem/18460462
1286
1287         Reviewed by Antti Koivisto.
1288
1289         Test: fast/dom/htmlcollection-length-after-item-2.html
1290
1291         * dom/CollectionIndexCache.h:
1292         (CollectionIndexCache::nodeAt): If we hit the end looking for index 0, cache a length
1293         of 0, not a length of 1.
1294
1295 2015-03-29  Darin Adler  <darin@apple.com>
1296
1297         Remove unneeded SVG code, including most isSupportedAttribute functions
1298         https://bugs.webkit.org/show_bug.cgi?id=143194
1299
1300         Reviewed by Antti Koivisto.
1301
1302         - Removed most implementations of isSupportedAttribute. Others can be removed in
1303           future patches. The ones left behind are now all private static member functions.
1304           It's dangerous for them to be public because they tend to indicate which attributes
1305           are supported at a particular level in the class hierarchy and they are not virtual
1306           functions; might want to rethink the function name if we keep any of these long term.
1307
1308         - Removed unneeded includes, especially of Attr.h and Attribute.h.
1309
1310         - Changed most parseAttribute and svgAttributeChanged functions so they no longer
1311           rely on checking attribute names against a set. Also removed lots of unneeded calls
1312           to SVGLangSpace::parseAttribute, which is called by SVGElement::parseAttribute and
1313           need not be called by derived classes.
1314
1315         - Removed return values from parseAttribute functions. Skipping other parseAttribute
1316           logic is not an important optimization and makes functions needlessly complex.
1317
1318         - Moved use of InstanceInvalidationGuard closer to where they are needed. Eventually
1319           we may be able to remove many of these.
1320
1321         - Used auto in a few places where the same type is repeated twice on the same line of
1322           code, and auto makes it a bit smaller.
1323
1324         - Got rid of protected sections in some final classes; doesn't make sense to combine
1325           these two. Also moved a few functions from protected to private in other classes.
1326
1327         - Made a number of functions into static member functions in the base classes such
1328           as SVGLangSpace; they were not making any use of the object, and so it was wasteful
1329           to compile them as non-static member functions.
1330
1331         * rendering/svg/RenderSVGImage.cpp: Removed unneeded includes.
1332         * svg/SVGAElement.cpp: Removed unneeded includes.
1333         (WebCore::SVGAElement::isSupportedAttribute): Deleted.
1334         (WebCore::SVGAElement::parseAttribute): Don't use isSupportedAttribute.
1335         (WebCore::SVGAElement::svgAttributeChanged): Don't use isSupportedAttribute.
1336         * svg/SVGAElement.h: Removed isSupportedAttribute.
1337         * svg/SVGAnimateMotionElement.cpp: Removed unneeded includes.
1338         (WebCore::SVGAnimateMotionElement::isSupportedAttribute): Deleted.
1339         (WebCore::SVGAnimateMotionElement::parseAttribute): Don't use isSupportedAttribute.
1340         * svg/SVGAnimateMotionElement.h: Removed isSupportedAttribute.
1341         * svg/SVGAnimateTransformElement.cpp:
1342         (WebCore::SVGAnimateTransformElement::isSupportedAttribute): Deleted.
1343         (WebCore::SVGAnimateTransformElement::parseAttribute): Don't use isSupportedAttribute.
1344         * svg/SVGAnimateTransformElement.h: Removed isSupportedAttribute.
1345         * svg/SVGAnimationElement.cpp:
1346         (WebCore::SVGAnimationElement::parseAttribute): Don't use isSupportedAttribute.
1347         * svg/SVGCircleElement.cpp:
1348         (WebCore::SVGCircleElement::isSupportedAttribute): Deleted.
1349         (WebCore::SVGCircleElement::parseAttribute): Don't use isSupportedAttribute.
1350         (WebCore::SVGCircleElement::svgAttributeChanged): Don't use isSupportedAttribute.
1351         * svg/SVGCircleElement.h: Removed isSupportedAttribute.
1352         * svg/SVGClipPathElement.cpp: Removed unneeded includes.
1353         (WebCore::SVGClipPathElement::parseAttribute): Don't use isSupportedAttribute.
1354         * svg/SVGComponentTransferFunctionElement.cpp:
1355         (WebCore::SVGComponentTransferFunctionElement::parseAttribute): Don't use isSupportedAttribute.
1356         * svg/SVGCursorElement.cpp: Removed unneeded includes.
1357         (WebCore::SVGCursorElement::parseAttribute): Don't use isSupportedAttribute.
1358         (WebCore::SVGCursorElement::svgAttributeChanged): Don't use isSupportedAttribute.
1359         * svg/SVGElement.cpp: Removed unneeded includes.
1360         * svg/SVGEllipseElement.cpp: Removed unneeded includes.
1361         (WebCore::SVGEllipseElement::isSupportedAttribute): Deleted.
1362         (WebCore::SVGEllipseElement::parseAttribute): Don't use isSupportedAttribute.
1363         (WebCore::SVGEllipseElement::svgAttributeChanged): Don't use isSupportedAttribute.
1364         * svg/SVGEllipseElement.h: Removed isSupportedAttribute.
1365         * svg/SVGExternalResourcesRequired.cpp: Removed unneeded includes.
1366         (WebCore::SVGExternalResourcesRequired::parseAttribute): Don't return a boolean.
1367         * svg/SVGExternalResourcesRequired.h: Don't return a boolean.
1368         * svg/SVGFEBlendElement.cpp: Removed unneeded includes.
1369         (WebCore::SVGFEBlendElement::isSupportedAttribute): Deleted.
1370         (WebCore::SVGFEBlendElement::parseAttribute): Don't use isSupportedAttribute.
1371         (WebCore::SVGFEBlendElement::svgAttributeChanged): Don't use isSupportedAttribute.
1372         * svg/SVGFEBlendElement.h: Removed isSupportedAttribute.
1373         * svg/SVGFEColorMatrixElement.cpp: Removed unneeded includes.
1374         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute): Deleted.
1375         (WebCore::SVGFEColorMatrixElement::parseAttribute): Don't use isSupportedAttribute.
1376         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
1377         * svg/SVGFEColorMatrixElement.h: Removed isSupportedAttribute.
1378         * svg/SVGFEComponentTransferElement.cpp: Removed unneeded includes.
1379         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute): Deleted.
1380         (WebCore::SVGFEComponentTransferElement::parseAttribute): Don't use isSupportedAttribute.
1381         * svg/SVGFEComponentTransferElement.h: Removed unneeded includes.
1382         * svg/SVGFECompositeElement.cpp: Removed unneeded includes.
1383         (WebCore::SVGFECompositeElement::isSupportedAttribute): Deleted.
1384         (WebCore::SVGFECompositeElement::parseAttribute): Don't use isSupportedAttribute.
1385         (WebCore::SVGFECompositeElement::svgAttributeChanged): Don't use isSupportedAttribute.
1386         * svg/SVGFECompositeElement.h:
1387         * svg/SVGFEConvolveMatrixElement.cpp: Removed unneeded includes.
1388         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute): Deleted.
1389         (WebCore::SVGFEConvolveMatrixElement::parseAttribute): Don't use isSupportedAttribute.
1390         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
1391         * svg/SVGFEConvolveMatrixElement.h:
1392         * svg/SVGFEDiffuseLightingElement.cpp: Removed unneeded includes.
1393         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute): Deleted.
1394         (WebCore::SVGFEDiffuseLightingElement::parseAttribute): Don't use isSupportedAttribute.
1395         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
1396         * svg/SVGFEDiffuseLightingElement.h:
1397         * svg/SVGFEDisplacementMapElement.cpp: Removed unneeded includes.
1398         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute): Deleted.
1399         (WebCore::SVGFEDisplacementMapElement::parseAttribute): Don't use isSupportedAttribute.
1400         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Don't use isSupportedAttribute.
1401         * svg/SVGFEDisplacementMapElement.h:
1402         * svg/SVGFEDropShadowElement.cpp: Removed unneeded includes.
1403         (WebCore::SVGFEDropShadowElement::isSupportedAttribute): Deleted.
1404         (WebCore::SVGFEDropShadowElement::parseAttribute): Don't use isSupportedAttribute.
1405         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Don't use isSupportedAttribute.
1406         * svg/SVGFEDropShadowElement.h:
1407         * svg/SVGFEFloodElement.cpp: Removed unneeded includes.
1408         * svg/SVGFEGaussianBlurElement.cpp: Removed unneeded includes.
1409         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): Deleted.
1410         (WebCore::SVGFEGaussianBlurElement::parseAttribute): Don't use isSupportedAttribute.
1411         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Don't use isSupportedAttribute.
1412         * svg/SVGFEGaussianBlurElement.h:
1413         * svg/SVGFEImageElement.cpp: Removed unneeded includes.
1414         (WebCore::SVGFEImageElement::isSupportedAttribute): Deleted.
1415         (WebCore::SVGFEImageElement::parseAttribute): Don't use isSupportedAttribute.
1416         (WebCore::SVGFEImageElement::svgAttributeChanged): Don't use isSupportedAttribute.
1417         * svg/SVGFEImageElement.h:
1418         * svg/SVGFELightElement.cpp: Removed unneeded includes.
1419         (WebCore::SVGFELightElement::isSupportedAttribute): Deleted.
1420         (WebCore::SVGFELightElement::parseAttribute): Don't use isSupportedAttribute.
1421         (WebCore::SVGFELightElement::svgAttributeChanged): Don't use isSupportedAttribute.
1422         * svg/SVGFELightElement.h:
1423         * svg/SVGFEMergeNodeElement.cpp: Removed unneeded includes.
1424         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute): Deleted.
1425         (WebCore::SVGFEMergeNodeElement::parseAttribute): Don't use isSupportedAttribute.
1426         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Don't use isSupportedAttribute.
1427         * svg/SVGFEMergeNodeElement.h:
1428         * svg/SVGFEMorphologyElement.cpp: Removed unneeded includes.
1429         (WebCore::SVGFEMorphologyElement::isSupportedAttribute): Deleted.
1430         (WebCore::SVGFEMorphologyElement::parseAttribute): Don't use isSupportedAttribute.
1431         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Don't use isSupportedAttribute.
1432         * svg/SVGFEMorphologyElement.h:
1433         * svg/SVGFEOffsetElement.cpp: Removed unneeded includes.
1434         (WebCore::SVGFEOffsetElement::isSupportedAttribute): Deleted.
1435         (WebCore::SVGFEOffsetElement::parseAttribute): Don't use isSupportedAttribute.
1436         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Don't use isSupportedAttribute.
1437         * svg/SVGFEOffsetElement.h:
1438         * svg/SVGFESpecularLightingElement.cpp: Removed unneeded includes.
1439         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute): Deleted.
1440         (WebCore::SVGFESpecularLightingElement::parseAttribute): Don't use isSupportedAttribute.
1441         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
1442         * svg/SVGFESpecularLightingElement.h:
1443         * svg/SVGFETileElement.cpp: Removed unneeded includes.
1444         (WebCore::SVGFETileElement::isSupportedAttribute): Deleted.
1445         (WebCore::SVGFETileElement::parseAttribute): Don't use isSupportedAttribute.
1446         (WebCore::SVGFETileElement::svgAttributeChanged): Don't use isSupportedAttribute.
1447         * svg/SVGFETileElement.h:
1448         * svg/SVGFETurbulenceElement.cpp: Removed unneeded includes.
1449         (WebCore::SVGFETurbulenceElement::isSupportedAttribute): Deleted.
1450         (WebCore::SVGFETurbulenceElement::parseAttribute): Don't use isSupportedAttribute.
1451         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Don't use isSupportedAttribute.
1452         * svg/SVGFETurbulenceElement.h:
1453         * svg/SVGFilterElement.cpp: Removed unneeded includes.
1454         (WebCore::SVGFilterElement::parseAttribute): Don't use isSupportedAttribute.
1455         * svg/SVGFilterPrimitiveStandardAttributes.cpp: Removed unneeded includes.
1456         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): Don't use isSupportedAttribute.
1457         * svg/SVGFilterPrimitiveStandardAttributes.h: Removed isSupportedAttribute and also moved a
1458         couple functions out of the class definition.
1459         * svg/SVGFitToViewBox.cpp: Removed unneeded includes.
1460         * svg/SVGFontFaceElement.cpp: Removed unneeded includes.
1461         * svg/SVGFontFaceUriElement.cpp: Removed unneeded includes.
1462         * svg/SVGForeignObjectElement.cpp: Removed unneeded includes.
1463         (WebCore::SVGForeignObjectElement::parseAttribute): Don't use isSupportedAttribute.
1464         * svg/SVGGElement.cpp: Removed unneeded includes.
1465         (WebCore::SVGGElement::parseAttribute): Don't use isSupportedAttribute.
1466         * svg/SVGGlyphElement.cpp: Removed unneeded includes.
1467         * svg/SVGGlyphRefElement.cpp: Removed unneeded includes.
1468         (WebCore::SVGGlyphRefElement::hasValidGlyphElement): Rewrote to use is<> instead of hasTagName.
1469         (WebCore::SVGGlyphRefElement::parseAttribute): Don't use return value from SVGURIReference::parseAttribute.
1470         * svg/SVGGradientElement.cpp: Removed unneeded includes.
1471         (WebCore::SVGGradientElement::parseAttribute): Don't use isSupportedAttribute.
1472         * svg/SVGGraphicsElement.cpp: Removed unneeded includes.
1473         (WebCore::SVGGraphicsElement::parseAttribute): Don't use isSupportedAttribute.
1474         * svg/SVGImageElement.cpp: Removed unneeded includes.
1475         (WebCore::SVGImageElement::parseAttribute): Don't use isSupportedAttribute.
1476         * svg/SVGLangSpace.cpp: Removed unneeded includes.
1477         (WebCore::SVGLangSpace::parseAttribute): Removed the return value.
1478         * svg/SVGLangSpace.h: Converted functions to static member functions and removed the
1479         return value from parseAttribute.
1480         * svg/SVGLineElement.cpp: Removed unneeded includes.
1481         (WebCore::SVGLineElement::parseAttribute): Don't use isSupportedAttribute.
1482         * svg/SVGLinearGradientElement.cpp: Removed unneeded includes.
1483         (WebCore::SVGLinearGradientElement::parseAttribute): Don't use isSupportedAttribute.
1484         * svg/SVGMPathElement.cpp: Removed unneeded includes.
1485         (WebCore::SVGMPathElement::isSupportedAttribute): Deleted.
1486         (WebCore::SVGMPathElement::parseAttribute): Don't use isSupportedAttribute.
1487         (WebCore::SVGMPathElement::svgAttributeChanged): Don't use isSupportedAttribute.
1488         * svg/SVGMPathElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
1489         private instead of protected.
1490         * svg/SVGMarkerElement.cpp: Removed unneeded includes.
1491         (WebCore::SVGMarkerElement::parseAttribute): Don't use isSupportedAttribute.
1492         * svg/SVGMaskElement.cpp: Removed unneeded includes.
1493         (WebCore::SVGMaskElement::parseAttribute): Don't use isSupportedAttribute.
1494         * svg/SVGPathElement.cpp: Removed unneeded includes.
1495         (WebCore::SVGPathElement::parseAttribute): Don't use isSupportedAttribute.
1496         * svg/SVGPatternElement.cpp: Removed unneeded includes.
1497         (WebCore::SVGPatternElement::parseAttribute): Don't use isSupportedAttribute.
1498         * svg/SVGPolyElement.cpp: Removed unneeded includes.
1499         (WebCore::SVGPolyElement::isSupportedAttribute): Deleted.
1500         (WebCore::SVGPolyElement::parseAttribute): Don't use isSupportedAttribute.
1501         (WebCore::SVGPolyElement::svgAttributeChanged): Don't use isSupportedAttribute.
1502         * svg/SVGPolyElement.h:
1503         * svg/SVGRadialGradientElement.cpp: Removed unneeded includes.
1504         (WebCore::SVGRadialGradientElement::parseAttribute): Don't use isSupportedAttribute.
1505         * svg/SVGRectElement.cpp: Removed unneeded includes.
1506         (WebCore::SVGRectElement::isSupportedAttribute): Deleted.
1507         (WebCore::SVGRectElement::parseAttribute): Don't use isSupportedAttribute.
1508         (WebCore::SVGRectElement::svgAttributeChanged): Don't use isSupportedAttribute.
1509         * svg/SVGRectElement.h:
1510         * svg/SVGSVGElement.cpp: Removed unneeded includes.
1511         (WebCore::SVGSVGElement::parseAttribute): Don't use isSupportedAttribute.
1512         * svg/SVGScriptElement.cpp: Removed unneeded includes.
1513         * svg/SVGStopElement.cpp: Removed unneeded includes.
1514         (WebCore::SVGStopElement::isSupportedAttribute): Deleted.
1515         (WebCore::SVGStopElement::parseAttribute): Don't use isSupportedAttribute.
1516         (WebCore::SVGStopElement::svgAttributeChanged): Don't use isSupportedAttribute.
1517         * svg/SVGStopElement.h: Removed isSupportedAttribute.
1518         * svg/SVGStyleElement.cpp: Removed unneeded includes.
1519         (WebCore::SVGStyleElement::isSupportedAttribute): Deleted.
1520         (WebCore::SVGStyleElement::parseAttribute): Don't use isSupportedAttribute.
1521         * svg/SVGStyleElement.h: Removed isSupportedAttribute.
1522         * svg/SVGSymbolElement.cpp: Removed unneeded includes.
1523         (WebCore::SVGSymbolElement::isSupportedAttribute): Deleted.
1524         (WebCore::SVGSymbolElement::parseAttribute): Don't use isSupportedAttribute.
1525         (WebCore::SVGSymbolElement::svgAttributeChanged): Don't use isSupportedAttribute.
1526         * svg/SVGSymbolElement.h: Removed isSupportedAttribute.
1527         * svg/SVGTRefElement.cpp: Removed unneeded includes.
1528         (WebCore::SVGTRefElement::isSupportedAttribute): Deleted.
1529         (WebCore::SVGTRefElement::parseAttribute): Don't use isSupportedAttribute.
1530         (WebCore::SVGTRefElement::svgAttributeChanged): Don't use isSupportedAttribute.
1531         * svg/SVGTRefElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
1532         private instead of protected.
1533         * svg/SVGTests.cpp: Removed unneeded includes.
1534         (WebCore::SVGTests::parseAttribute): Removed return value.
1535         * svg/SVGTests.h: Removed return value of parseAttribute.
1536         * svg/SVGTextContentElement.cpp: Removed unneeded includes.
1537         (WebCore::SVGTextContentElement::collectStyleForPresentationAttribute): Don't use
1538         isSupportedAttribute. Also removed global to optimize comparing attribute value against
1539         the string "preserve".
1540         (WebCore::SVGTextContentElement::parseAttribute): Don't use isSupportedAttribute.
1541         (WebCore::SVGTextContentElement::svgAttributeChanged): Don't use isSupportedAttribute.
1542         * svg/SVGTextContentElement.h: Made isSupportedAttribute private instead of protected.
1543         * svg/SVGTextElement.cpp: Removed unneeded includes.
1544         * svg/SVGTextPathElement.cpp: Removed unneeded includes.
1545         (WebCore::SVGTextPathElement::parseAttribute): Don't use isSupportedAttribute.
1546         * svg/SVGTextPositioningElement.cpp: Removed unneeded includes.
1547         (WebCore::SVGTextPositioningElement::isSupportedAttribute): Deleted.
1548         (WebCore::SVGTextPositioningElement::parseAttribute): Don't use isSupportedAttribute.
1549         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Don't use isSupportedAttribute.
1550         * svg/SVGTextPositioningElement.h: Removed isSupportedAttribute and made some functions
1551         private insetad of protected.
1552         * svg/SVGURIReference.cpp: Removed unneeded includes.
1553         (WebCore::SVGURIReference::parseAttribute): Don't use isSupportedAttribute.
1554         * svg/SVGURIReference.h:
1555         (WebCore::SVGURIReference::isExternalURIReference):
1556         * svg/SVGUseElement.cpp: Removed unneeded includes.
1557         (WebCore::SVGUseElement::parseAttribute): Don't use isSupportedAttribute.
1558         * svg/SVGViewElement.h: Removed isSupportedAttribute.
1559         * svg/animation/SVGSMILElement.cpp: Removed unneeded includes.
1560
1561 2015-03-29  Darin Adler  <darin@apple.com>
1562
1563         Remove unneeded includes of "Attribute.h"
1564         https://bugs.webkit.org/show_bug.cgi?id=143195
1565
1566         Reviewed by Antti Koivisto.
1567
1568         * css/StyleResolver.cpp:
1569         * html/HTMLAnchorElement.cpp:
1570         * html/HTMLAreaElement.cpp:
1571         * html/HTMLBRElement.cpp:
1572         * html/HTMLBaseElement.cpp:
1573         * html/HTMLBodyElement.cpp:
1574         * html/HTMLButtonElement.cpp:
1575         * html/HTMLCanvasElement.cpp:
1576         * html/HTMLDivElement.cpp:
1577         * html/HTMLElement.cpp:
1578         * html/HTMLEmbedElement.cpp:
1579         * html/HTMLFontElement.cpp:
1580         * html/HTMLFormControlElement.cpp:
1581         * html/HTMLFormElement.cpp:
1582         * html/HTMLFrameElement.cpp:
1583         * html/HTMLFrameElementBase.cpp:
1584         * html/HTMLFrameSetElement.cpp:
1585         * html/HTMLHRElement.cpp:
1586         * html/HTMLIFrameElement.cpp:
1587         * html/HTMLImageElement.cpp:
1588         * html/HTMLOListElement.cpp:
1589         * html/HTMLOptionElement.cpp:
1590         * html/HTMLParagraphElement.cpp:
1591         * html/HTMLParamElement.cpp:
1592         * html/HTMLPlugInElement.cpp:
1593         * html/HTMLPreElement.cpp:
1594         * html/HTMLProgressElement.cpp:
1595         * html/HTMLScriptElement.cpp:
1596         * html/HTMLSelectElement.cpp:
1597         * html/HTMLStyleElement.cpp:
1598         * html/HTMLTableCaptionElement.cpp:
1599         * html/HTMLTableCellElement.cpp:
1600         * html/HTMLTableColElement.cpp:
1601         * html/HTMLTableElement.cpp:
1602         * html/HTMLTablePartElement.cpp:
1603         * html/HTMLTextAreaElement.cpp:
1604         * html/HTMLTextFormControlElement.cpp:
1605         * html/HTMLUListElement.cpp:
1606         * html/HTMLVideoElement.cpp:
1607         * html/parser/HTMLScriptRunner.cpp:
1608         * inspector/InspectorNodeFinder.cpp:
1609         Removed includes of "Attribute.h".
1610
1611 2015-03-28  Eric Carlson  <eric.carlson@apple.com>
1612
1613         [Mac] Update for output device API change
1614         https://bugs.webkit.org/show_bug.cgi?id=143187
1615
1616         Reviewed by Zalan Bujtas.
1617
1618         The API used for output device is being deprecated, update to the replacement.
1619
1620         * WebCore.xcodeproj/project.pbxproj: Add SPI headers.
1621
1622         * platform/graphics/MediaPlaybackTarget.h:
1623         (WebCore::MediaPlaybackTarget::MediaPlaybackTarget): Update for API change.
1624         (WebCore::MediaPlaybackTarget::setDevicePickerContext):
1625         (WebCore::MediaPlaybackTarget::devicePickerContext):
1626
1627         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
1628         (WebCore::MediaPlaybackTarget::encode):
1629         (WebCore::MediaPlaybackTarget::decode):
1630
1631         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
1632         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1633         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
1634         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
1635         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired):
1636         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
1637         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
1638         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets):
1639         (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
1640         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Deleted.
1641
1642         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1643         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1644         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
1645         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1646         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
1647         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1648
1649         * platform/spi/cocoa/AVKitSPI.h: Copied from Source/WebCore/platform/spi/ios/AVKitSPI.h. Moved
1650             from ios directory, added Mac includes and prototypes.
1651         * platform/spi/ios/AVKitSPI.h: Removed.
1652
1653         * platform/spi/mac/AVFoundationSPI.h: Added.
1654
1655 2015-03-28  Simon Fraser  <simon.fraser@apple.com>
1656
1657         Optimize RenderLayer::intersectsDamageRect() slightly
1658         https://bugs.webkit.org/show_bug.cgi?id=143186
1659
1660         Reviewed by Zalan Bujtas.
1661
1662         We can early return from RenderLayer::intersectsDamageRect() if the
1663         damageRect is empty, since nothing will intersect with the empty rect.
1664         
1665         Slight performance gain when scrolling overflow-scroll with lots of nested,
1666         clipping layers.
1667
1668         * rendering/RenderLayer.cpp:
1669         (WebCore::RenderLayer::calculateClipRects):
1670
1671 2015-03-28  Anders Carlsson  <andersca@apple.com>
1672
1673         Remove an unused SPI method from WebKitLegacy
1674         https://bugs.webkit.org/show_bug.cgi?id=143185
1675
1676         Reviewed by Sam Weinig.
1677
1678         * loader/appcache/ApplicationCacheStorage.cpp:
1679         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Deleted.
1680         * loader/appcache/ApplicationCacheStorage.h:
1681
1682 2015-03-28  Joonghun Park  <jh718.park@samsung.com>
1683
1684         nullptr cleanup in InlineFooBox classes
1685         https://bugs.webkit.org/show_bug.cgi?id=143178
1686
1687         Reviewed by Csaba Osztrogonác.
1688
1689         No new tests, no behavior changes
1690
1691         Replace 0 with nullptr in InlineFooBox classes.
1692
1693         * rendering/InlineBox.cpp:
1694         (WebCore::InlineBox::prevLeafChildIgnoringLineBreak):
1695         * rendering/InlineFlowBox.cpp:
1696         (WebCore::InlineFlowBox::removeChild):
1697         (WebCore::InlineFlowBox::deleteLine):
1698         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
1699         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
1700         * rendering/InlineFlowBox.h:
1701         (WebCore::InlineFlowBox::InlineFlowBox):
1702         * rendering/InlineTextBox.h:
1703         (WebCore::InlineTextBox::InlineTextBox):
1704         * rendering/RootInlineBox.cpp:
1705         (WebCore::RootInlineBox::getLogicalStartBoxWithNode):
1706         (WebCore::RootInlineBox::getLogicalEndBoxWithNode):
1707         * rendering/RootInlineBox.h:
1708         * rendering/svg/SVGInlineTextBox.cpp:
1709         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
1710         (WebCore::SVGInlineTextBox::releasePaintingResource):
1711         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
1712         * rendering/svg/SVGRootInlineBox.cpp:
1713         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
1714         (WebCore::findFirstAndLastAttributesInVector):
1715         * rendering/svg/SVGRootInlineBox.h:
1716
1717 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
1718
1719         More modern loops in RenderLayer.cpp
1720         https://bugs.webkit.org/show_bug.cgi?id=143175
1721
1722         Reviewed by Ryosuke Niwa.
1723
1724         Use modern loops in more places in RenderLayer.app.
1725
1726         * rendering/RenderLayer.cpp:
1727         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
1728         (WebCore::RenderLayer::paint):
1729         (WebCore::performOverlapTests):
1730         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
1731         (WebCore::RenderLayer::paintList):
1732         (WebCore::RenderLayer::collectFragments):
1733         (WebCore::RenderLayer::updatePaintingInfoForFragments):
1734         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
1735         (WebCore::RenderLayer::calculateClipRects):
1736
1737 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
1738
1739         nullptr cleanup in RenderLayer
1740         https://bugs.webkit.org/show_bug.cgi?id=143174
1741
1742         Reviewed by Ryosuke Niwa.
1743
1744         Replace 0 with nullptr in RenderLayer.cpp.
1745
1746         * rendering/RenderLayer.cpp:
1747         (WebCore::RenderLayer::filterRenderer):
1748         (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
1749         (WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll):
1750         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
1751         (WebCore::RenderLayer::enclosingOverflowClipLayer):
1752         (WebCore::RenderLayer::enclosingCompositingLayer):
1753         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
1754         (WebCore::RenderLayer::enclosingFilterLayer):
1755         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
1756         (WebCore::RenderLayer::clippingRootForPainting):
1757         (WebCore::RenderLayer::transparentPaintingAncestor):
1758         (WebCore::transparencyClipBox):
1759         (WebCore::RenderLayer::removeChild):
1760         (WebCore::RenderLayer::removeOnlyThisLayer):
1761         (WebCore::RenderLayer::insertOnlyThisLayer):
1762         (WebCore::accumulateOffsetTowardsAncestor):
1763         (WebCore::RenderLayer::enclosingScrollableArea):
1764         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
1765         (WebCore::RenderLayer::enclosingElement):
1766         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
1767         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
1768         (WebCore::RenderLayer::hitTestLayer):
1769         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
1770         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
1771         (WebCore::RenderLayer::hitTestList):
1772         (WebCore::RenderLayer::updateClipRects):
1773         (WebCore::RenderLayer::clipRects):
1774         (WebCore::RenderLayer::calculateClipRects):
1775
1776 2015-03-27  Gwang Yoon Hwang  <yoon@igalia.com>
1777
1778         [TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
1779         https://bugs.webkit.org/show_bug.cgi?id=142386
1780
1781         Reviewed by Žan Doberšek.
1782
1783         TextureMapper and TextureMapperGL are bloated and tightly coupled with
1784         BitmapTexture. We should move these classes to seperated file of their own.
1785         Also, this patch removes friend relationship from TextureMapperGL and  its
1786         subsidiary classes.
1787
1788         The main purpose of this refactoring is to expose BitmapTexturePool to
1789         renderers of platformlayers like Video and Canvas. By doing this, each
1790         renderer can acquire textures from the global texture pool to paint
1791         their contents directly.
1792
1793         No new tests needed.
1794
1795         * PlatformEfl.cmake:
1796         * PlatformGTK.cmake:
1797         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1798         Include BitmapTextureGL and BitmapTexturePool explicitly
1799
1800         * platform/graphics/texmap/BitmapTexture.cpp: Added.
1801         * platform/graphics/texmap/BitmapTexture.h: Added.
1802         (WebCore::BitmapTexture::updateContents):
1803         Exclude BitmapTexture class from TextureMapper
1804
1805         * platform/graphics/texmap/BitmapTextureGL.cpp: Added.
1806         * platform/graphics/texmap/BitmapTextureGL.h: Added.
1807         Exclude BitmapTextureGL class from TextureMapperGL
1808         (WebCore::BitmapTextureGL::clipStack): Added.
1809         Add the getter for clipStack for TextureMapperGL
1810         (WebCore::BitmapTextureGL::Bind): Deleted.
1811         (WebCore::BitmapTextureGL::BindAsSurface): Added.
1812         Bind used TextureMapperGL's internal data directly to compute projection matrix as a friend class,
1813         However, TextureMapperGL can compute projection matrix itself after binding job, so this
1814         friend ship is not needed. Also, this patch renames Bind to BindAsSurface to remove ambiguity.
1815
1816         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Added.
1817         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Added.
1818         Exclude BitmapTextureImageBuffer class from TextureMapperImageBuffer
1819
1820         * platform/graphics/texmap/BitmapTexturePool.cpp: Added.
1821         * platform/graphics/texmap/BitmapTexturePool.h: Added.
1822         Exclude BitmapTexturePool class from TextureMapperGL
1823         (WebCore::BitmapTexturePool::acquireTexture):
1824         Modified to use passed GraphicsContext3D instead of TextureMapperGL to remove redundant coupling
1825
1826         * platform/graphics/texmap/TextureMapper.cpp:
1827         * platform/graphics/texmap/TextureMapper.h:
1828         Remove BitmapTexturePool and BitmapTexture from its implementation.
1829
1830         * platform/graphics/texmap/TextureMapperGL.cpp:
1831         * platform/graphics/texmap/TextureMapperGL.h:
1832         Remove BitmapTextureGL from its implementation.
1833         (WebCore::TextureMapperGL::TextureMapperGL):
1834         (WebCore::TextureMapperGL::clipStack):
1835         (WebCore::TextureMapperGL::bindSurface):
1836         (WebCore::TextureMapperGL::currentSurface):
1837         Add a getter of the current surface for filtering operation in BitmapTextureGL.
1838         It would be clear to move filtering operation from BitmapTextureGL to TextureMapperGL later.
1839
1840         (WebCore::TextureMapperGL::ClipStack):
1841         Move inner class declaration to public.
1842
1843         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1844         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1845         Remove BitmapTextureImageBuffer from its implementation.
1846
1847 2015-03-27  Tim Horton  <timothy_horton@apple.com>
1848
1849         WebProcess started by editable WKWebView spends 15% of its initialization time loading DataDetectors
1850         https://bugs.webkit.org/show_bug.cgi?id=143142
1851         <rdar://problem/20324495>
1852
1853         Reviewed by Anders Carlsson.
1854
1855         Calling DataDetectorsLibrary() is expensive; we should avoid doing it
1856         until actually necessary. When loading a page that makes a caret selection,
1857         ServicesOverlayController was calling DataDetectorsLibrary() (ignoring the fact
1858         that a caret selection can't have any services associated with it) to avoid
1859         crashing on systems where DataDetectors is not available. Instead, we should
1860         first check if there's anything to do, and then check for the existence
1861         of DataDetectors.
1862
1863         * page/mac/ServicesOverlayController.mm:
1864         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
1865         Build the list of phone number ranges, and bail (clearing the potential highlights)
1866         if it is empty, before calling DataDetectorsLibrary().
1867
1868         (WebCore::ServicesOverlayController::buildSelectionHighlight):
1869         Check the list of selection rects, and bail (clearing the potential highlights)
1870         if it is empty, before calling DataDetectorsLibrary().
1871
1872 2015-03-27  Jer Noble  <jer.noble@apple.com>
1873
1874         [Mac] Safari fails to fire page "load" event with video[preload=none]
1875         https://bugs.webkit.org/show_bug.cgi?id=143147
1876
1877         Reviewed by Simon Fraser.
1878
1879         Test: media/video-page-load-preload-none.html
1880
1881         When told to load() when preload == None, set the networkState to Idle.
1882         This causes HTMLMediaElement to set the shouldDelayLoadEvent flag to
1883         false, and allows the page's 'load' event to fire.
1884
1885         Drive-by fix: add setNetworkState() and setReadyState() methods to
1886         MediaPlayerPrivateAVFoundation, reducing a bunch of code duplication.
1887
1888         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1889         (WebCore::MediaPlayerPrivateAVFoundation::load):
1890         (WebCore::MediaPlayerPrivateAVFoundation::setNetworkState):
1891         (WebCore::MediaPlayerPrivateAVFoundation::setReadyState):
1892         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
1893         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1894
1895 2015-03-27  Alexey Proskuryakov  <ap@apple.com>
1896
1897         Calling crypto.webkitSubtle.generateKey causes page memory to never be released
1898         https://bugs.webkit.org/show_bug.cgi?id=143151
1899         rdar://problem/18940687
1900
1901         Reviewed by Tim Horton.
1902
1903         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair): Don't.
1904
1905 2015-03-27  Brent Fulgham  <bfulgham@apple.com>
1906
1907         Null dereference in InbandMetadataTextTrack handling
1908         https://bugs.webkit.org/show_bug.cgi?id=143144
1909         <rdar://problem/18983250>
1910
1911         Reviewed by Eric Carlson.
1912
1913         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
1914         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): Check for null return value from
1915         'client()', just like we do in all other methods.
1916
1917 2015-03-27  Oliver Hunt  <oliver@apple.com>
1918
1919         Forward additional CFNetwork ATS information to child processes
1920         https://bugs.webkit.org/show_bug.cgi?id=143136
1921
1922         Reviewed by Anders Carlsson.
1923
1924         Declare SPI.
1925
1926         * platform/spi/cf/CFNetworkSPI.h:
1927
1928 2015-03-27  Chris Dumez  <cdumez@apple.com>
1929
1930         [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
1931         https://bugs.webkit.org/show_bug.cgi?id=143125
1932         <rdar://problem/20321172>
1933
1934         Reviewed by Antti Koivisto.
1935
1936         Export a couple of extra symbols.
1937
1938         * platform/network/ResourceResponseBase.h:
1939
1940 2015-03-27  Jer Noble  <jer.noble@apple.com>
1941
1942         HTMLMediaElement will fire 'seeked' before seek completes, leading to currentTime discontinuities.
1943         https://bugs.webkit.org/show_bug.cgi?id=143132
1944
1945         Reviewed by Eric Carlson.
1946
1947         When seeking, if the ready state rises to >= HAVE_CURRENT_DATA, we will fire the 'seeked'
1948         event and continue playback. However, if a media engine updates the ready state before its
1949         seek operation actually completes, the currentTime it returns may still be the time before
1950         the seek.
1951
1952         Wait until both the ready state rises to HAVE_CURRENT_DATA and m_player->seeking() returns
1953         false before firing the 'seeked' event.
1954
1955         * html/HTMLMediaElement.cpp:
1956         (WebCore::HTMLMediaElement::parseAttribute):
1957
1958 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
1959
1960         Make some more objects use FastMalloc
1961         https://bugs.webkit.org/show_bug.cgi?id=143122
1962
1963         Reviewed by Csaba Osztrogonác.
1964
1965         * Modules/geolocation/GeolocationController.h:
1966         * Modules/geolocation/NavigatorGeolocation.h:
1967         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
1968         * Modules/notifications/NotificationController.h:
1969         * Modules/webdatabase/DatabaseServer.h:
1970         * css/CSSFontFaceSource.h:
1971         * html/HTMLMediaSession.h:
1972         * inspector/InspectorIndexedDBAgent.h:
1973         * inspector/InspectorReplayAgent.h:
1974         * page/CaptionUserPreferencesMediaAF.h:
1975         * page/PageConsoleClient.h:
1976         * page/PageDebuggable.h:
1977         * page/animation/CSSPropertyAnimation.cpp:
1978         * page/mac/ServicesOverlayController.h:
1979         * platform/RemoteCommandListener.h:
1980         * platform/Timer.h:
1981         * platform/audio/MediaSessionManager.h:
1982         * platform/mac/SystemSleepListenerMac.h:
1983         * platform/mac/ThemeMac.h:
1984         * rendering/svg/RenderSVGResourceSolidColor.h:
1985         * replay/ReplayController.h:
1986
1987 2015-03-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
1988
1989         FEMorphology::platformApplyGeneric() should bail out if the radius is less than or equal to zero.
1990         https://bugs.webkit.org/show_bug.cgi?id=142885.
1991
1992         Reviewed by Dean Jackson.
1993
1994         FEMorphology class implementation code clean up.
1995         
1996         Tests: svg/filters/feMorphology-radius-cases.svg
1997
1998         * platform/graphics/filters/FEMorphology.cpp:
1999         (WebCore::shouldSupersedeExtremum): Reuse code instead of repeating it and
2000         use < and > instead of =< and >=.
2001         
2002         (WebCore::pixelArrayIndex): Returns the array index of a pixel in an image
2003         buffer, given: position(x, y), image width and the color channel.
2004         
2005         (WebCore::columnExtremum): Returns the extremum of a column of pixels.
2006         
2007         (WebCore::kernelExtremum): Returns the extremum of a filter kernel.
2008         
2009         (WebCore::FEMorphology::platformApplyGeneric): Apply some code clean-up.
2010         The kernel size should be equal to radius of the filter. The extra pixel
2011         was causing the resulted image to be asymmetric in some cases.
2012         
2013         (WebCore::FEMorphology::platformApplyDegenerate):
2014         (WebCore::FEMorphology::platformApplySoftware): After applying scaling, we
2015         still need to check the resulted radius is negative (overflow case) or less
2016         than one (zero radius case) and treat these cases differently.
2017         
2018         (WebCore::FEMorphology::morphologyOperator): Deleted.
2019         (WebCore::FEMorphology::radiusX): Deleted.
2020         (WebCore::FEMorphology::radiusY): Deleted.
2021         * platform/graphics/filters/FEMorphology.h:
2022         (WebCore::FEMorphology::morphologyOperator):
2023         (WebCore::FEMorphology::radiusX):
2024         (WebCore::FEMorphology::radiusY):
2025         Move a single line functions from the source file to the header file.
2026
2027 2015-03-27  Antti Koivisto  <antti@apple.com>
2028
2029         Move CacheValidation to platform
2030         https://bugs.webkit.org/show_bug.cgi?id=143133
2031
2032         Reviewed by Chris Dumez.
2033
2034         It deals with platform types only and is currently violating layering.
2035
2036         * WebCore.xcodeproj/project.pbxproj:
2037         * loader/cache/CacheValidation.cpp: Removed.
2038         * loader/cache/CacheValidation.h: Removed.
2039         * platform/network/CacheValidation.cpp: Copied from Source/WebCore/loader/cache/CacheValidation.cpp.
2040         * platform/network/CacheValidation.h: Copied from Source/WebCore/loader/cache/CacheValidation.h.
2041
2042 2015-03-27  Commit Queue  <commit-queue@webkit.org>
2043
2044         Unreviewed, rolling out r177896.
2045         https://bugs.webkit.org/show_bug.cgi?id=142978
2046
2047         Loading libgstclutter.so in-process hangs web process
2048         (Requested by mcatanzaro on #webkit).
2049
2050         Reverted changeset:
2051
2052         "[GStreamer] Disable gst-plugin-scanner if seccomp filters are
2053         enabled"
2054         https://bugs.webkit.org/show_bug.cgi?id=140069
2055         http://trac.webkit.org/changeset/177896
2056
2057 2015-03-26  Antti Koivisto  <antti@apple.com>
2058
2059         Respect cache-control directives in request
2060         https://bugs.webkit.org/show_bug.cgi?id=143121
2061         rdar://problem/19714040
2062
2063         Reviewed by Chris Dumez.
2064
2065         Test: http/tests/cache/disk-cache/disk-cache-request-headers.html
2066
2067         * loader/cache/CacheValidation.cpp:
2068         (WebCore::isCacheHeaderSeparator):
2069         (WebCore::isControlCharacter):
2070         (WebCore::trimToNextSeparator):
2071         (WebCore::parseCacheHeader):
2072         (WebCore::parseCacheControlDirectives):
2073
2074             Factor Cache-control parsing here so it can be used for both requests and responses.
2075
2076         * loader/cache/CacheValidation.h:
2077         * platform/network/ResourceRequestBase.h:
2078         * platform/network/ResourceResponseBase.cpp:
2079         (WebCore::ResourceResponseBase::ResourceResponseBase):
2080         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2081         (WebCore::ResourceResponseBase::cacheControlContainsNoCache):
2082         (WebCore::ResourceResponseBase::cacheControlContainsNoStore):
2083         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
2084         (WebCore::ResourceResponseBase::cacheControlMaxAge):
2085         (WebCore::isCacheHeaderSeparator): Deleted.
2086         (WebCore::isControlCharacter): Deleted.
2087         (WebCore::trimToNextSeparator): Deleted.
2088         (WebCore::parseCacheHeader): Deleted.
2089         * platform/network/ResourceResponseBase.h:
2090
2091 2015-03-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2092
2093         [GStreamer] share GL context in pipeline, part 2
2094         https://bugs.webkit.org/show_bug.cgi?id=143049
2095
2096         Reviewed by Carlos Garcia Campos.
2097
2098         This patch, instead of cluttering the GstGL attributes creation in
2099         ::handleSyncMessage(), creates a new method ::ensureGstGLContext(),
2100         where those attributes are defined. This method is guarded by
2101         USE(GSTREAMER_GL)
2102
2103         ::handlSyncMessage() shall return nothing, according to GStreamer
2104         documentation, not a boolean.
2105
2106         The GstGL attributes are now GRefPtr<> to avoid memory leaks.
2107
2108         The GstGLAPI and GstGLPlatform are now set given by the pre-processor
2109         directives, and the code in ::ensureGstGLContext() is simpler.
2110
2111         No new tests because this is platform specific and it depends in the
2112         run-time availability and configurations of GstGL elements.
2113
2114         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2115         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2116         Don't initialise the GstGL attributes since are GRefPtr<>
2117         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Changed the
2118         signature to use void instead of gboolean.
2119         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): New method.
2120         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2121
2122 2015-03-26  Jeremy Jones  <jeremyj@apple.com>
2123
2124         Optimized Fullscreen fails to cleanup because of no longer necessary release of m_playerController in exitFullscreen()
2125         https://bugs.webkit.org/show_bug.cgi?id=143120
2126
2127         Reviewed by Eric Carlson.
2128
2129         We used to release m_playerController in WebVideoFullscreenInterfaceAVKit::exitFullscreen() in order to make sure 
2130         media state was reset. This is no longer necessary as we now have a way the model can explicitly request resetting the
2131         media state via resetMediaState(). m_playerController is already released in 
2132         WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal(). Releasing it prematurely can actually prevent the exit
2133         fullscreen process from completing successfully.
2134
2135         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2136         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
2137
2138 2015-03-26  Zalan Bujtas  <zalan@apple.com>
2139
2140         Inline continuation code should not take anonymous containing wrapper granted.
2141         https://bugs.webkit.org/show_bug.cgi?id=133312
2142
2143         Reviewed by Dave Hyatt.
2144
2145         It's wrong to assume that when RenderInline is part of an inline continuation, its containing block
2146         is an anonymous wrapper and its sibling might be a block level renderer.
2147         When the inline continuation is no longer needed, for example when the block level renderer that initiated the continuation
2148         is detached from the render tree, the inline renderes still continue to form continuation.(however they no longer require
2149         anonymous wrappers)
2150
2151         Test: fast/inline/crash-when-position-property-is-changed-and-no-longer-in-continuation.html
2152
2153         * rendering/RenderInline.cpp:
2154         (WebCore::updateStyleOfAnonymousBlockContinuations):
2155         (WebCore::RenderInline::styleDidChange):
2156
2157 2015-03-26  Tim Horton  <timothy_horton@apple.com>
2158
2159         REGRESSION (r181358 and r181507): Lots of sites think that we support touch events on OS X
2160         https://bugs.webkit.org/show_bug.cgi?id=142888
2161         <rdar://problem/20227304>
2162
2163         Reviewed by Beth Dakin.
2164
2165         * dom/Document.idl:
2166         * dom/Element.idl:
2167         * html/HTMLBodyElement.idl:
2168         * html/HTMLFrameSetElement.idl:
2169         * page/DOMWindow.idl:
2170         Re-conditionalize a lot of event listeners; sites test ("ontouchstart" in window), which
2171         is not covered by NotEnumerable, and so r181358 and r181507 broke a bunch of sites
2172         (apple.com, blaze.com, anything using nicescroll.js, etc.) by causing them to think
2173         that (Mac) Safari was touch-enabled.
2174
2175 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
2176
2177         "lineNo" does not match WebKit coding style guidelines
2178         https://bugs.webkit.org/show_bug.cgi?id=143119
2179
2180         Reviewed by Michael Saboff.
2181
2182         We can afford to use whole words.
2183
2184         * bindings/js/JSLazyEventListener.cpp:
2185         (WebCore::JSLazyEventListener::initializeJSFunction):
2186         * bindings/js/JSMainThreadExecStateInstrumentation.h:
2187         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
2188         * inspector/InspectorDOMAgent.cpp:
2189         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2190         * testing/Internals.cpp:
2191         (WebCore::Internals::parserMetaData):
2192
2193 2015-03-26  Roger Fong  <roger_fong@apple.com>
2194
2195         Apply blur effect to media control background.
2196         https://bugs.webkit.org/show_bug.cgi?id=143116.
2197         <rdar://problem/20316964>.
2198
2199         Reviewed by Brent Fulgham.
2200
2201         There are still a few issues, like the borders of the controls being blurred with black,
2202         and the volume slider background not showing the blur effect. Will fix those separately.
2203
2204         Add CSS for new divs to create blur effect using back drop filters and blend modes.
2205         * Modules/mediacontrols/mediaControlsApple.css:
2206         (audio::-webkit-media-controls-panel):
2207         (audio::-webkit-media-controls-panel-tint):
2208         (audio::-webkit-media-controls-panel-background):
2209         (audio::-webkit-media-controls-panel .volume-box):
2210         (audio::-webkit-media-controls-volume-slider-container-background):
2211         (audio::-webkit-media-controls-volume-slider-container-tint):
2212         (audio::-webkit-media-controls-toggle-closed-captions-button): Adjust fill.
2213         (audio::-webkit-media-controls-fullscreen-button): Adjust fill.
2214         (audio::-webkit-media-controls-fullscreen-button.exit): Adjust fill.
2215         (video:-webkit-full-screen::-webkit-media-controls-panel):
2216         (audio:-webkit-full-screen::-webkit-media-controls-panel-tint):
2217         (audio:-webkit-full-screen::-webkit-media-controls-panel-background):
2218         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
2219         (video:-webkit-full-screen::-webkit-media-controls-play-button):
2220         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
2221         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
2222         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
2223         (video:-webkit-full-screen::-webkit-media-controls-status-display):
2224         (audio::-webkit-media-controls-panel .volume-box:active): Deleted.
2225         * Modules/mediacontrols/mediaControlsApple.js:
2226         (Controller.prototype.createControls):
2227         (Controller.prototype.configureInlineControls): Add new divs for blurred background effect.
2228         (Controller.prototype.configureFullScreenControls): Ditto.
2229         (Controller.prototype.handlePanelMouseDown): The tint div is now in front.
2230         (Controller.prototype.drawTimelineBackground): Adjust colors to make border look better with new background.
2231         (Controller.prototype.drawVolumeBackground): Ditto.
2232
2233 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
2234
2235         Assertion firing in JavaScriptCore/parser/parser.h for statesman.com site
2236         https://bugs.webkit.org/show_bug.cgi?id=142974
2237
2238         Reviewed by Joseph Pecoraro.
2239
2240         * bindings/js/JSLazyEventListener.cpp:
2241         (WebCore::JSLazyEventListener::initializeJSFunction): Use the new override
2242         line number API to guarantee that errors will map to the .html file locations
2243         that we like.
2244
2245         * bindings/js/ScriptController.cpp:
2246         (WebCore::ScriptController::eventHandlerPosition): Added a FIXME to cover
2247         some cases where our line and column numbers are still nonsense.
2248
2249 2015-03-26  Beth Dakin  <bdakin@apple.com>
2250
2251         Relevant repainted objects callback is inaccurate and inconsistent for PDF 
2252         documents
2253         https://bugs.webkit.org/show_bug.cgi?id=143118
2254         -and corresponding-
2255         rdar://problem/13371582
2256
2257         Reviewed by Tim Horton.
2258
2259         Investigating this bug resulted in finding two things that should change for the 
2260         relevant repainted objects heuristic. First, we should not count any objects 
2261         painted while updating control tints. And secondly, we should not use it at all 
2262         for plugin documents. In other documents, we count the plugin area as “painted” 
2263         when we get to paint whether or not the plugin has actually loaded. This is 
2264         intentional because it allows us to account for chunks of the page that will be 
2265         filled in by possibly slow-loading ads. However, if the plugin is the whole 
2266         document, then the heuristic just doesn’t make any sense and it leads to 
2267         inconsistent behavior at different window sizes. So we’ll only count plugins when 
2268         the document is not a plugin document. 
2269
2270         Don’t count objects during this paint!
2271         * page/FrameView.cpp:
2272         (WebCore::FrameView::updateControlTints):
2273         * page/Page.h:
2274         (WebCore::Page::setIsCountingRelevantRepaintedObjects):
2275
2276         Make sure the document is not a plugin document.
2277         * rendering/RenderEmbeddedObject.cpp:
2278         (WebCore::RenderEmbeddedObject::paint):
2279
2280 2015-03-26  Alex Christensen  <achristensen@webkit.org>
2281
2282         Progress towards CMake on Mac.
2283         https://bugs.webkit.org/show_bug.cgi?id=143112
2284
2285         Reviewed by Chris Dumez.
2286
2287         * CMakeLists.txt:
2288         * PlatformEfl.cmake:
2289         * PlatformGTK.cmake:
2290         * PlatformMac.cmake:
2291         * platform/graphics/mac/IconMac.mm:
2292
2293 2015-03-26  Jer Noble  <jer.noble@apple.com>
2294
2295         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
2296         https://bugs.webkit.org/show_bug.cgi?id=142970
2297
2298         Reviewed by Eric Carlson.
2299
2300         isMainThread() will (ironically) return true if called from the web thread. Rather than dispatch
2301         synchronously to the main thread to allocate the _volumeView, dispatch asynchronously and handle
2302         the case where the MPVolumeView has not yet been created.
2303
2304         * platform/audio/ios/MediaSessionManagerIOS.mm:
2305         (-[WebMediaSessionHelper allocateVolumeView]): Dispatch to the main thread to allocate. Move notification
2306             registration to -setVolumeView:.
2307         (-[WebMediaSessionHelper setVolumeView:]): Added. Register/Unregister for route availablitiy notifications.
2308         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Handle the possibility of a nil _volumeView.
2309
2310 2015-03-26  Benjamin Poulain  <bpoulain@apple.com>
2311
2312         Fix state maching debugging after r181964
2313         https://bugs.webkit.org/show_bug.cgi?id=143082
2314
2315         Reviewed by Alex Christensen.
2316
2317         * contentextensions/ContentExtensionCompiler.cpp:
2318         (WebCore::ContentExtensions::compileRuleList):
2319
2320 2015-03-25  David Hyatt  <hyatt@apple.com>
2321
2322         Improve the offsetWidth/Height layout optimization
2323         https://bugs.webkit.org/show_bug.cgi?id=143008
2324
2325         Reviewed by Zalan Bujtas.
2326
2327         * dom/Document.cpp:
2328         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
2329         * dom/Document.h:
2330         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
2331         the positioning restrictions on the optimization check.
2332
2333         * dom/Element.cpp:
2334         (WebCore::Element::offsetWidth):
2335         (WebCore::Element::offsetHeight):
2336         Change to use Element& instead of Element*.
2337
2338         (WebCore::Element::clientWidth):
2339         (WebCore::Element::clientHeight):
2340         (WebCore::Element::scrollWidth):
2341         (WebCore::Element::scrollHeight):
2342         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
2343
2344 2015-03-26  Brady Eidson  <beidson@apple.com>
2345
2346         Apply ContentExtension actions after redirects.
2347         <rdar://problem/20062613> and https://bugs.webkit.org/show_bug.cgi?id=143055
2348
2349         Reviewed by Alex Christensen.
2350
2351         Tests: http/tests/contentextensions/loading/main-resource-redirect-blocked.php
2352                http/tests/contentextensions/subresource-redirect-blocked.html
2353
2354         This patch moves the "run a URL against the content extension" code from CachedResourceLoader to
2355         the ContentExtensionsBackend.
2356
2357         That allows it to be shared between the CachedResourceLoader where loads are initiated and 
2358         ResourceLoader where redirects are handled.
2359
2360         * contentextensions/ContentExtension.cpp:
2361         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
2362
2363         * contentextensions/ContentExtensionsBackend.cpp:
2364         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2365         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
2366         * contentextensions/ContentExtensionsBackend.h:
2367
2368         * loader/NetscapePlugInStreamLoader.cpp:
2369         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
2370
2371         * loader/ResourceLoadInfo.h:
2372
2373         * loader/ResourceLoader.cpp:
2374         (WebCore::ResourceLoader::ResourceLoader):
2375         (WebCore::ResourceLoader::willSendRequest):
2376         * loader/ResourceLoader.h:
2377
2378         * loader/SubresourceLoader.cpp:
2379         (WebCore::SubresourceLoader::SubresourceLoader):
2380
2381         * loader/cache/CachedResourceLoader.cpp:
2382         (WebCore::CachedResourceLoader::requestResource):
2383
2384         * page/UserContentController.cpp:
2385         (WebCore::UserContentController::processContentExtensionRulesForLoad):
2386         (WebCore::UserContentController::actionsForResourceLoad): Deleted.
2387         (WebCore::UserContentController::globalDisplayNoneStyleSheet): Deleted.
2388         (WebCore::UserContentController::displayNoneCSSRule): Deleted.
2389         * page/UserContentController.h:
2390
2391 2015-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
2392
2393         Crash when laying out (char)0
2394         https://bugs.webkit.org/show_bug.cgi?id=143103
2395
2396         Reviewed by Dean Jackson.
2397
2398         We currently cache a character -> Font mapping in a HashMap.
2399         However, keys in Hashmaps can't be 0. This patch simply skips
2400         the cache in this case.
2401
2402         No new tests, for now. I'm having trouble creating a test because
2403         the site that causes this bug generates their page using script,
2404         and the script is all minified, and difficult to understand. I
2405         will contact the owner of the site and ask for and unminified
2406         version of their sources. However, I don't want to that to block
2407         this tiny fix from going in.
2408
2409         * platform/graphics/Font.cpp:
2410         (WebCore::Font::systemFallbackFontForCharacter):
2411
2412 2015-03-26  Jer Noble  <jer.noble@apple.com>
2413
2414         [Mac][EME] Crash at com.apple.WebCore: WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys + 177
2415         https://bugs.webkit.org/show_bug.cgi?id=143080
2416
2417         Reviewed by Eric Carlson.
2418
2419         Null-check m_certificate before dereferencing.
2420
2421         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2422         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
2423
2424 2015-03-26  Chris Fleizach  <cfleizach@apple.com>
2425
2426         AX: [role="button"][aria-pressed] should be exposed as AXCheckbox:AXToggleButton, with role description of "toggle button"
2427         https://bugs.webkit.org/show_bug.cgi?id=115298
2428
2429         Reviewed by Mario Sanchez Prada.
2430
2431         A role=button + aria-pressed object should be exposed as AXCheckbox on Mac now. It should also convert the
2432         aria-pressed state into a 0, 1, 2 number value for the Mac.
2433
2434         Test: platform/mac/accessibility/aria-pressed-button-attributes.html
2435
2436         * accessibility/AccessibilityObject.cpp:
2437         (WebCore::AccessibilityObject::checkboxOrRadioValue):
2438         * accessibility/AccessibilityObject.h:
2439         (WebCore::AccessibilityObject::isToggleButton):
2440         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2441         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2442         (createAccessibilityRoleMap):
2443         (-[WebAccessibilityObjectWrapper subrole]):
2444         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2445
2446 2015-03-25  Dean Jackson  <dino@apple.com>
2447
2448         CSS blend modes do not parse when in the shadow tree
2449         https://bugs.webkit.org/show_bug.cgi?id=143067
2450         <rdar://problem/20302662>
2451
2452         Reviewed by Anders Carlson.
2453
2454         The media controls style sheets are injected as UA stylesheets
2455         when we come across a <video> or <audio> element. These stylesheets
2456         have a different parsing context than the document stylesheets -
2457         one that uses the default constructor, which initializes some
2458         features like cssCompositingEnabled to false without checking
2459         the runtime state.
2460
2461         The easy fix is to use the global state to initialize the context.
2462
2463         Unfortunately we can't test this since it only occurs in the shadow
2464         tree.
2465
2466         * css/CSSParser.cpp:
2467         (WebCore::CSSParserContext::CSSParserContext): Check the state
2468         of RuntimeEnabledFeatures to initialize CSS Regions and
2469         CSS Compositing (Blending).
2470
2471 2015-03-25  Chris Fleizach  <cfleizach@apple.com>
2472
2473         AX: table cells that use display:block render the table inaccessible to VoiceOver
2474         https://bugs.webkit.org/show_bug.cgi?id=143007
2475
2476         Reviewed by Mario Sanchez Prada.
2477
2478         When display:block is used on a table cell, it was being ignored because it was anonymous.
2479         This is still a valid scenario however if it's still inside of a valid table.
2480
2481         Test: accessibility/table-cell-display-block.html
2482
2483         * accessibility/AccessibilityTableCell.cpp:
2484         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
2485
2486 2015-03-25  Tim Horton  <timothy_horton@apple.com>
2487
2488         Add a preference to prevent "user-scalable=no" from having any effect
2489         https://bugs.webkit.org/show_bug.cgi?id=143032
2490
2491         Reviewed by Sam Weinig.
2492
2493         * page/ViewportConfiguration.cpp:
2494         (WebCore::ViewportConfiguration::ViewportConfiguration):
2495         (WebCore::ViewportConfiguration::allowsUserScaling):
2496         * page/ViewportConfiguration.h:
2497         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
2498         If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
2499
2500 2015-03-25  Dan Bernstein  <mitz@apple.com>
2501
2502         Another attempt to get the iOS EWS building again.
2503
2504         * WebCore.xcodeproj/project.pbxproj:
2505
2506 2015-03-25  Alex Christensen  <achristensen@webkit.org>
2507
2508         Add case-insensitive checks to DFA bytecode.
2509         https://bugs.webkit.org/show_bug.cgi?id=142977
2510
2511         Reviewed by Benjamin Poulain.
2512
2513         * contentextensions/DFABytecode.h:
2514         (WebCore::ContentExtensions::instructionSizeWithArguments):
2515         * contentextensions/DFABytecodeCompiler.cpp:
2516         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
2517         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
2518         Add case-insensitive bytecode.
2519         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
2520         Check to see if case-insensitive bytecodes can be used.
2521         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
2522         * contentextensions/DFABytecodeCompiler.h:
2523         (WebCore::ContentExtensions::DFABytecodeCompiler::Range::Range):
2524         Added Range structure to be able to count the ranges in a future patch deciding if we want to use jump tables.
2525         * contentextensions/DFABytecodeInterpreter.cpp:
2526         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2527         Interpret case-insensitive bytecodes.
2528
2529 2015-03-25  Sam Weinig  <sam@webkit.org>
2530
2531         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
2532
2533         * contentextensions/ContentExtensionCompiler.cpp:
2534         (WebCore::ContentExtensions::compileRuleList):
2535         * contentextensions/ContentExtensionCompiler.h:
2536         * contentextensions/ContentExtensionParser.cpp:
2537         (WebCore::ContentExtensions::getTypeFlags):
2538
2539 2015-03-25  Sam Weinig  <sam@webkit.org>
2540
2541         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
2542         https://bugs.webkit.org/show_bug.cgi?id=143059
2543
2544         Reviewed by Alex Christensen.
2545
2546         * WebCore.xcodeproj/project.pbxproj:
2547         Add ContentExtensionError.h/cpp.
2548
2549         * contentextensions/ContentExtensionError.cpp: Added.
2550         (WebCore::ContentExtensions::contentExtensionErrorCategory):
2551         * contentextensions/ContentExtensionError.h: Added.
2552         (WebCore::ContentExtensions::make_error_code):
2553         Add ContentExtensionError enum and std::error_code adaptor.
2554
2555         * contentextensions/ContentExtensionCompiler.h:
2556         Instead of returning CompiledContentExtensionData, use a client interface
2557         to pass data. Eventually, this should be turned into a direct streaming 
2558         interface so we can write directly to a file.
2559
2560         * contentextensions/ContentExtensionCompiler.cpp:
2561         (WebCore::ContentExtensions::compileRuleList):
2562         * contentextensions/ContentExtensionParser.cpp:
2563         (WebCore::ContentExtensions::getTypeFlags):
2564         (WebCore::ContentExtensions::loadTrigger):
2565         (WebCore::ContentExtensions::loadAction):
2566         (WebCore::ContentExtensions::loadRule):
2567         (WebCore::ContentExtensions::loadEncodedRules):
2568         (WebCore::ContentExtensions::parseRuleList):
2569         * contentextensions/ContentExtensionParser.h:
2570         Convert to return an error.
2571
2572 2015-03-25  Beth Dakin  <bdakin@apple.com>
2573
2574         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
2575         force preview
2576         https://bugs.webkit.org/show_bug.cgi?id=143057
2577         -and corresponding-
2578         rdar://problem/20251436
2579
2580         Reviewed by Tim Horton.
2581
2582         This patch adds a value for ActionUpdated to the ImmediateActionStage enum. Now if 
2583         m_immediateActionStage indicates that an immediate action has either begun or 
2584         completed then we can have the same behavior.
2585         * page/EventHandler.cpp:
2586         (WebCore::EventHandler::handleMouseReleaseEvent):
2587         * page/EventHandler.h:
2588
2589 2015-03-25  Dean Jackson  <dino@apple.com>
2590
2591         MediaControls: Use font with fixed number width
2592         https://bugs.webkit.org/show_bug.cgi?id=143018
2593         <rdar://problem/20245415>
2594
2595         Reviewed by Eric Carlson.
2596
2597         Add a new font-family, specific to Apple platforms,
2598         called -apple-system-font-monospaced-numbers. This is
2599         a special variant of the system font which uses monospaced
2600         forms for the number glyphs - allowing a time reading that
2601         doesn't bounce around as the time changes.
2602
2603         * Modules/mediacontrols/mediaControlsApple.css: Media controls should
2604         use the new font.
2605         (audio::-webkit-media-controls-time-remaining-display):
2606         * Modules/mediacontrols/mediaControlsiOS.css:
2607         (audio::-webkit-media-controls-time-remaining-display):
2608
2609         * platform/graphics/ios/FontCacheIOS.mm: Request a new CTFontRef with
2610         the appropriate attributes.
2611         (WebCore::createCTFontWithFamilyNameAndWeight):
2612         * platform/graphics/mac/FontCacheMac.mm: Ditto, but NSFont.
2613         (WebCore::fontWithFamily):
2614         * platform/spi/cocoa/CoreTextSPI.h: Expose the constants for
2615         the new form so that the public SDK can build.
2616
2617 2015-03-25  Alex Christensen  <achristensen@webkit.org>
2618
2619         [Content Extensions] Add multi-DFA compiling and interpreting.
2620         https://bugs.webkit.org/show_bug.cgi?id=143010
2621
2622         Reviewed by Benjamin Poulain.
2623
2624         * contentextensions/ContentExtensionCompiler.cpp:
2625         (WebCore::ContentExtensions::compileRuleList):
2626         Compile multiple NFAs to DFAs.
2627         * contentextensions/ContentExtensionsBackend.cpp:
2628         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2629         Fixed a bug when there are no non-universal actions.
2630         We still need to report that no ignore-previous-rules was hit to apply the
2631         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
2632         and skipped in DFABytecodeInterpreter::interpret.
2633         * contentextensions/DFABytecodeCompiler.cpp:
2634         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
2635         Add a header for each DFA.
2636         * contentextensions/DFABytecodeInterpreter.cpp:
2637         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
2638         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2639         Interpret as many DFAs as there are in the bytecode.
2640
2641 2015-03-25  Per Arne Vollan  <peavo@outlook.com>
2642
2643         [Win] Illegal character in project file.
2644         https://bugs.webkit.org/show_bug.cgi?id=143051
2645
2646         Reviewed by Brent Fulgham.
2647
2648         There is an illegal character in the WebCore project filter.
2649         WebCore files are shown unfiltered.
2650
2651         * WebCore.vcxproj/WebCore.vcxproj.filters:
2652
2653 2015-03-25  David Hyatt  <hyatt@apple.com>
2654
2655         Add a pref to enable the new block-inside-inline model
2656         https://bugs.webkit.org/show_bug.cgi?id=143050
2657
2658         Reviewed by Sam Weinig.
2659
2660         * page/Settings.in:
2661
2662 2015-03-25  Dan Bernstein  <mitz@apple.com>
2663
2664         iOS Simulator build fix.
2665
2666         * platform/spi/cocoa/IOSurfaceSPI.h:
2667
2668 2015-03-25  Commit Queue  <commit-queue@webkit.org>
2669
2670         Unreviewed, rolling out r181932.
2671         https://bugs.webkit.org/show_bug.cgi?id=143041
2672
2673         The test fails most of the time on bots (Requested by ap on
2674         #webkit).
2675
2676         Reverted changeset:
2677
2678         "[Content Extensions] Add multi-DFA compiling and
2679         interpreting."
2680         https://bugs.webkit.org/show_bug.cgi?id=143010
2681         http://trac.webkit.org/changeset/181932
2682
2683 2015-03-24  Dean Jackson  <dino@apple.com>
2684
2685         Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
2686         https://bugs.webkit.org/show_bug.cgi?id=143039
2687
2688         Unreviewed build fix for newer versions of OS X.
2689
2690         * rendering/RenderThemeMac.mm: Define a null language parameter. This
2691         seemed better than turning the clang warning off for just that
2692         function.
2693         (WebCore::AttachmentLayout::layOutTitle):
2694         (WebCore::AttachmentLayout::layOutSubtitle):
2695
2696 2015-03-24  Dan Bernstein  <mitz@apple.com>
2697
2698         Another attempt to fix the build.
2699
2700         * WebCore.xcodeproj/project.pbxproj:
2701         * platform/spi/cocoa/QuartzCoreSPI.h:
2702
2703 2015-03-24  Alex Christensen  <achristensen@webkit.org>
2704
2705         [Content Extensions] Add multi-DFA compiling and interpreting.
2706         https://bugs.webkit.org/show_bug.cgi?id=143010
2707
2708         Reviewed by Benjamin Poulain.
2709
2710         * contentextensions/ContentExtensionCompiler.cpp:
2711         (WebCore::ContentExtensions::compileRuleList):
2712         Compile multiple NFAs to DFAs.
2713         * contentextensions/ContentExtensionsBackend.cpp:
2714         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2715         Fixed a bug when there are no non-universal actions.
2716         We still need to report that no ignore-previous-rules was hit to apply the
2717         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
2718         and skipped in DFABytecodeInterpreter::interpret.
2719         * contentextensions/DFABytecodeCompiler.cpp:
2720         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
2721         Add a header for each DFA.
2722         * contentextensions/DFABytecodeInterpreter.cpp:
2723         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
2724         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2725         Interpret as many DFAs as there are in the bytecode.
2726
2727 2015-03-24  Dan Bernstein  <mitz@apple.com>
2728
2729         Tried to fix the EWS build.
2730
2731         * platform/spi/cocoa/QuartzCoreSPI.h:
2732
2733 2015-03-24  Commit Queue  <commit-queue@webkit.org>
2734
2735         Unreviewed, rolling out r181898 and r181909.
2736         https://bugs.webkit.org/show_bug.cgi?id=143034
2737
2738         Broke fast/regions/auto-size/autoheight-two-pass-layout-
2739         complex-002.html (Requested by ap on #webkit).
2740
2741         Reverted changesets:
2742
2743         "Improve the offsetWidth/Height layout optimization"
2744         https://bugs.webkit.org/show_bug.cgi?id=143008
2745         http://trac.webkit.org/changeset/181898
2746
2747         "Disable layout dimensions optimization for RenderRegions"
2748         https://bugs.webkit.org/show_bug.cgi?id=143017
2749         http://trac.webkit.org/changeset/181909
2750
2751 2015-03-24  Zhuo Li  <zachli@apple.com>
2752
2753         Scripts running in isolated world should not subject to a page's CSP about 'eval'.
2754         https://bugs.webkit.org/show_bug.cgi?id=141316.
2755
2756         Reviewed by Geoffrey Garen.
2757
2758         * bindings/js/ScriptController.cpp:
2759         (WebCore::ScriptController::initScript):
2760         We should not impose the main world Content Security Policy onto the isolated world.
2761
2762 2015-03-24  Chris Dumez  <cdumez@apple.com>
2763
2764         [Mac] Use .cpp file extension instead of .mm for SharedTimerCF and PowerObserverMac
2765         https://bugs.webkit.org/show_bug.cgi?id=143026
2766
2767         Reviewed by Andy Estes.
2768
2769         Use .cpp file extension instead of .mm for SharedTimerCF and
2770         PowerObserverMac.
2771
2772         * WebCore.xcodeproj/project.pbxproj:
2773         * platform/cf/SharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.mm.
2774         (WebCore::timerFired):
2775         Use WTF::AutodrainedPool instead of @autoreleasepool {}.
2776
2777         * platform/mac/PowerObserverMac.cpp: Renamed from Source/WebCore/platform/mac/PowerObserverMac.mm.
2778
2779 2015-03-24  Yusuke Suzuki  <utatane.tea@gmail.com>
2780
2781         REGRESSION (r181458): Heap use-after-free in JSSetIterator destructor
2782         https://bugs.webkit.org/show_bug.cgi?id=142696
2783
2784         Reviewed and tweaked by Geoffrey Garen.
2785
2786         Use JSSetIterator/JSMapIterator to iterate over JSSet and JSMap.
2787
2788         * ForwardingHeaders/runtime/JSMapIterator.h: Added.
2789         * ForwardingHeaders/runtime/JSSetIterator.h: Added.
2790         * bindings/js/SerializedScriptValue.cpp:
2791         (WebCore::CloneSerializer::serialize):
2792
2793 2015-03-24  Dan Bernstein  <mitz@apple.com>
2794
2795         Tried to fix the iOS Simulator build.
2796
2797         * platform/spi/cocoa/QuartzCoreSPI.h:
2798
2799 2015-03-24  Benjamin Poulain  <bpoulain@apple.com>
2800
2801         Make URL filter patterns matching consistent and add a simple canonicalization step
2802         https://bugs.webkit.org/show_bug.cgi?id=142998
2803
2804         Reviewed by Alex Christensen.
2805
2806         This patch makes two changes to the url filter input:
2807         -Make the matching "Search" by default, the pattern can now appear anywhere
2808          in the URL by default.
2809         -Make the input a little less fragile: do not explode on valid input
2810          that is not formatted in a certain way.
2811
2812         To implement the search behavior, I simply add an implict ".*" in front of the patterns
2813         when that make sense.
2814
2815         To make the input more solid, we do some little modification on the input:
2816         -Remove duplicated ".*".
2817         -Remove matching suffixes that do not bring new information.
2818         -Unify all the ".*" in the same format.
2819
2820         Why do that here? That should be done through a graph analysis on the machine.
2821
2822         The reason is this is incredibly cheap compared to the graph analysis. Any state
2823         removed upfront will save the handling of several hundred nodes in the deterministic
2824         graph.
2825
2826         * contentextensions/URLFilterParser.cpp:
2827         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString):
2828         (WebCore::ContentExtensions::Term::isUniversalTransition):
2829         (WebCore::ContentExtensions::GraphBuilder::finalize):
2830         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
2831         (WebCore::ContentExtensions::GraphBuilder::fail):
2832         (WebCore::ContentExtensions::GraphBuilder::simplifySunkTerms):
2833
2834 2015-03-24  Chris Dumez  <cdumez@apple.com>
2835
2836         Regression(r181671): Caused Timer-related crashes on iOS / WK1
2837         https://bugs.webkit.org/show_bug.cgi?id=143025
2838
2839         Reviewed by Andy Estes.
2840
2841         Call CFRunLoopAddTimer() on WebThreadRunLoop() instead of
2842         CFRunLoopGetCurrent() for iOS, as we did before r181671.
2843
2844         I inadvertently changed this in r181671 when merging the Mac
2845         and iOS implementations.
2846
2847         No new tests, already covered by existing tests.
2848
2849         * platform/cf/SharedTimerCF.mm:
2850         (WebCore::setSharedTimerFireInterval):
2851
2852 2015-03-24  Dan Bernstein  <mitz@apple.com>
2853
2854         WebCore part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
2855         https://bugs.webkit.org/show_bug.cgi?id=143023
2856
2857         Reviewed by Tim Horton.
2858
2859         * platform/spi/cocoa/QuartzCoreSPI.h: Added the declaration of
2860         CARenderServerRenderLayerWithTransform.
2861
2862 2015-03-24  David Hyatt  <hyatt@apple.com>
2863
2864         Disable layout dimensions optimization for RenderRegions
2865         https://bugs.webkit.org/show_bug.cgi?id=143017
2866
2867         Reviewed by Dean Jackson.
2868
2869         * dom/Document.cpp:
2870         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
2871         Turn off the optimization for regions, since auto height regions can change size
2872         without needing a layout.
2873
2874 2015-03-24  Beth Dakin  <bdakin@apple.com>
2875
2876         Add events related to force click gesture
2877         https://bugs.webkit.org/show_bug.cgi?id=142836
2878         -and corresponding-
2879         rdar://problem/20210239
2880
2881         Reviewed by Dean Jackson.
2882
2883         This patch adds six new events for the force click gesture:
2884
2885         webkitmouseforcewillbegin -> Event is sent just before mousedown to indicate that 
2886         force can be perceived if the user presses any harder. The author should prevent 
2887         default on this event to both prevent the user agent’s default force click 
2888         features and to receive the other 5 events.
2889
2890         webkitmouseforcechanged -> This event fires whenever force changes between the 
2891         mousedown and mouseup. It is a new type of mouse event that includes a force 
2892         variable which is a normalized number between 0 (corresponds to click) and 1 
2893         (corresponds to force click). In this patch, I have only added code to send this 
2894         event between mousedown and mouseforcedown, but as a followup patch, we plan to 
2895         send it through mouseup.
2896
2897         webkitmouseforcecancelled -> If the user releases their finger from the trackpad 
2898         after pressing hard enough to send webkitmouseforcewillbegin events but not hard 
2899         enough to force click, this event will be sent to indicate that the user bailed 
2900         out on the gesture.
2901
2902         webkitmouseforcedown -> The down part of the force click.
2903
2904         webkitmouseforceup -> The up part of the force click. This event is added in this 
2905         patch, but does not yet fire. That is work for a follow-up patch.
2906
2907         webkitmouseforceclick -> The equivalent of the click event for the force click. 
2908         Should fire just after webkitmouseforceup. This event is added in this patch, but 
2909         does not yet fire. That is work for a follow-up patch.
2910
2911         Add new files for WebKitMouseForceEvent to build systems.
2912         * DerivedSources.cpp:
2913         * DerivedSources.make:
2914         * WebCore.vcxproj/WebCore.vcxproj:
2915         * WebCore.vcxproj/WebCore.vcxproj.filters:
2916         * WebCore.xcodeproj/project.pbxproj:
2917         * WebCore.xcodeproj/project.pbxproj:
2918
2919         Plumbing for new events.
2920         * dom/Document.idl:
2921
2922         Code to dispatch the new events. Currently the code that calls these functions is 
2923         in WebKit2.
2924         * dom/Element.cpp:
2925         (WebCore::Element::dispatchMouseForceWillBegin):
2926         (WebCore::Element::dispatchMouseForceChanged):
2927         (WebCore::Element::dispatchMouseForceDown):
2928         (WebCore::Element::dispatchMouseForceUp):
2929         (WebCore::Element::dispatchMouseForceClick):
2930         (WebCore::Element::dispatchMouseForceCancelled):
2931         * dom/Element.h:
2932
2933         More plumbing.
2934         * dom/Element.idl:
2935         * dom/EventNames.h:
2936         * dom/EventNames.in:
2937
2938         Our new type of mouse event that includes force.
2939         * dom/WebKitMouseForceEvent.cpp: Added.
2940         (WebCore::WebKitMouseForceEventInit::WebKitMouseForceEventInit):
2941         (WebCore::WebKitMouseForceEvent::WebKitMouseForceEvent):
2942         (WebCore::WebKitMouseForceEvent::~WebKitMouseForceEvent):
2943         (WebCore::WebKitMouseForceEvent::eventInterface):
2944         * dom/WebKitMouseForceEvent.h: Added.
2945         * dom/WebKitMouseForceEvent.idl: Added.
2946
2947         More plumbing.
2948         * html/HTMLAttributeNames.in:
2949         * html/HTMLBodyElement.cpp:
2950         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
2951         * html/HTMLBodyElement.idl:
2952         * html/HTMLElement.cpp:
2953         (WebCore::HTMLElement::createEventHandlerNameMap):
2954         * page/DOMWindow.idl:
2955         * page/EventHandler.h:
2956         (WebCore::EventHandler::lastMouseDownEvent):
2957
2958 2015-03-24  Anders Carlsson  <andersca@apple.com>
2959
2960         Fix designated initializer violations
2961         https://bugs.webkit.org/show_bug.cgi?id=143016
2962         rdar://problem/20268858
2963
2964         Reviewed by Dan Bernstein.
2965
2966         Mark -[DOMObject init] as unavailable.
2967
2968         * bindings/objc/DOMObject.h:
2969         * bindings/objc/DOMObject.mm:
2970         (-[DOMObject init]):
2971
2972 2015-03-24  Benjamin Poulain  <benjamin@webkit.org>
2973
2974         CSS Selectors Level 4: enable case-insensitive attribute matching by default
2975         https://bugs.webkit.org/show_bug.cgi?id=142960
2976
2977         Reviewed by Andreas Kling.
2978
2979         All open issues have been resolved, enable the feature by default.
2980
2981         Test: fast/css/attribute-selector-case-insensitive.html
2982
2983         * css/CSSGrammar.y.in:
2984
2985 2015-03-24  Dean Jackson  <dino@apple.com>
2986
2987         MediaControls: Scrubber and Time displays have the incorrect blending
2988         https://bugs.webkit.org/show_bug.cgi?id=143011
2989         <rdar://problem/20245251>
2990
2991         Reviewed by Eric Carlson.
2992
2993         The scrubber in media controls should use plus-darker blending. Then
2994         the scrubber itself should use a slightly transparent black (55% opacity)
2995         when drawing.
2996
2997         * Modules/mediacontrols/mediaControlsiOS.css:
2998         (audio::-webkit-media-controls-timeline): Add the blend mode.
2999         * Modules/mediacontrols/mediaControlsiOS.js:
3000         (ControllerIOS.prototype.drawTimelineBackground): Start drawing with
3001         transparency. I changed the order of rendering to make it
3002         more clear we draw the three parts in left to right order.
3003
3004 2015-03-24  David Hyatt  <hyatt@apple.com>
3005
3006         Improve the offsetWidth/Height layout optimization
3007         https://bugs.webkit.org/show_bug.cgi?id=143008
3008
3009         Reviewed by Dean Jackson.
3010
3011         * dom/Document.cpp:
3012         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
3013         * dom/Document.h:
3014         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
3015         the positioning restrictions on the optimization check.
3016
3017         * dom/Element.cpp:
3018         (WebCore::Element::offsetWidth):
3019         (WebCore::Element::offsetHeight):
3020         Change to use Element& instead of Element*.
3021
3022         (WebCore::Element::clientWidth):
3023         (WebCore::Element::clientHeight):
3024         (WebCore::Element::scrollWidth):
3025         (WebCore::Element::scrollHeight):
3026         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
3027
3028 2015-03-24  Yoav Weiss  <yoav@yoav.ws>
3029
3030         Stop image from displaying when src attribute is removed or emptied
3031         https://bugs.webkit.org/show_bug.cgi?id=142677
3032
3033         Reviewed by Chris Dumez.
3034
3035         Previously, we ignored empty attribute as failed URL, and didn't update the
3036         renderer when an image was removed. This patch fixes that.
3037
3038         Tests: fast/dom/HTMLImageElement/image-empty-src.html
3039                fast/dom/HTMLImageElement/image-remove-src.html
3040
3041         * loader/ImageLoader.cpp:
3042         (WebCore::ImageLoader::updateFromElement):
3043
3044 2015-03-17  Philippe Normand  <pnormand@igalia.com>
3045
3046         [OpenWebRTC] RealtimeMediaSourceCenter implementation
3047         https://bugs.webkit.org/show_bug.cgi?id=142476
3048
3049         Reviewed by Eric Carlson.
3050
3051         The old GStreamer MediaStreamCenter is replaced by the OpenWebRTC
3052         RealtimeMediaSourceCenter. It is not yet able to correctly assess
3053         MediaConstraints so it selects the first audio/video sources
3054         available through OpenWebRTC.
3055
3056         * PlatformEfl.cmake: Add new files to the build.
3057         * PlatformGTK.cmake: Ditto.
3058         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Removed.
3059         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Added.
3060         (WebCore::initializeOpenWebRTC): Simple function to initialize the
3061         framework, it is going to be used by the PeerConnection backend as well.
3062         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Added.
3063         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Added.
3064         (WebCore::mediaSourcesAvailableCallback): Function invoked once
3065         the media sources discovery succeeded within OpenWebRTC.
3066         (WebCore::RealtimeMediaSourceCenter::platformCenter): Instantiate
3067         the OpenWebRTC RealtimeMediaSourceCenter.
3068         (WebCore::RealtimeMediaSourceCenterOwr::RealtimeMediaSourceCenterOwr):
3069         (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
3070         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
3071         Schedule a discovery process for the capture sources.
3072         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Pick
3073         the first audio/video sources and create a MediaStream accordingly.
3074         (WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources):
3075         Not yet implemented.
3076         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
3077         Method invoked once the capture sources process succeeded. Parse
3078         them and create an internal cache of RealtimeMediaSources accordingly.
3079         (WebCore::RealtimeMediaSourceCenterOwr::firstSource): Utility
3080         function to fetch the first source of the given type from the
3081         RealtimeMediaSources cache.
3082         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h.
3083         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Added.
3084
3085 2015-03-24  Csaba Osztrogonác  <ossy@webkit.org>
3086
3087         [EFL] Add OpenWebRTC in jhbuild
3088         https://bugs.webkit.org/show_bug.cgi?id=142778
3089
3090         Reviewed by Gyuyoung Kim.
3091
3092         Original patch by Philippe Normand <pnormand@igalia.com>
3093
3094         * PlatformEfl.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
3095
3096 2015-03-23 Yoav Weiss  <yoav@yoav.ws>
3097
3098         Update empty image canvas tests and fix a related bug
3099         https://bugs.webkit.org/show_bug.cgi?id=142694
3100
3101         Reviewed by Chris Dumez.
3102
3103         During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
3104         we encountered an issue with canvas tests related to empty image handling
3105         when drawn or used as a pattern. After updating these tests, an issue with
3106         pattern handling was encountered.
3107
3108         The spec, as well as Chrome's implementation, say that when an empty image
3109         is used as a pattern, createPattern should return null. See
3110         https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
3111         Instead, createPattern returned an exception in this case.
3112         This patch fixes that and makes sure that it returns a null when image loading hasn't started.
3113
3114         Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
3115                canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
3116                canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
3117                canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
3118                canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html
3119
3120         * html/canvas/CanvasRenderingContext2D.cpp:
3121         (WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.
3122
3123 2015-03-23  Alex Christensen  <achristensen@webkit.org>
3124
3125         Fix api tests after r181876.
3126
3127         * contentextensions/ContentExtensionsBackend.cpp:
3128         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3129         Always append a CSSDisplayNoneStyleSheet action if no ignore-previous-rules is seen.
3130         * loader/cache/CachedResourceLoader.cpp:
3131         (WebCore::CachedResourceLoader::requestResource):
3132         Changed an assertion to a null check.
3133
3134 2015-03-23  Dean Jackson  <dino@apple.com>
3135
3136         Timelines are sharing the same canvas background
3137         https://bugs.webkit.org/show_bug.cgi?id=142994
3138         <rdar://problem/20209466>
3139
3140         Reviewed by Brent Fulgham.
3141
3142         Since each MediaControl lives in an isolated world, we
3143         can't rely on a global variable to provide a unique
3144         identifier for a named canvas. The fix is to expose
3145         WebCore's UUID generator, and have each canvas use
3146         that for a name.
3147
3148         * Modules/mediacontrols/MediaControlsHost.cpp:
3149         (WebCore::MediaControlsHost::generateUUID): New method on the
3150         MediaControlsHost that generates a UUID.
3151         * Modules/mediacontrols/MediaControlsHost.h:
3152         * Modules/mediacontrols/MediaControlsHost.idl:
3153
3154         * Modules/mediacontrols/mediaControlsApple.js: Remove the global
3155         variable unique ID that wasn't working, and instead get
3156         an ID from the MediaControlsHost.
3157         (Controller.prototype.createControls):
3158         * Modules/mediacontrols/mediaControlsiOS.js:
3159         (ControllerIOS):
3160
3161 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
3162
3163         Scroll latching logic can get stuck in 'scrollable="no"' iframes
3164         https://bugs.webkit.org/show_bug.cgi?id=142789
3165         <rdar://problem/20129494>
3166
3167         Reviewed by Dean Jackson.
3168
3169         Clean up the EventHandler and latching code as follows:
3170         (1) Do not handle iframe elements as part of the normal latching logic. Instead, iframes should
3171             be evaluated during the 'platformCompleteWheelEvent' phase of processing as top-level scrolling
3172             frames.
3173         (2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames
3174             different.
3175         (3) Modify code to reflect that the scroll latching code really deals with overflow scrolling. Consequently,
3176             the 'findEnclosingScrollableContainer' was renamed to 'findEnclosingOverflowScroll' and does not
3177             treat iframe as a suitable target.
3178         (4) Do not create a latching state object when the container being evaluated is already scrolled to the
3179             extreme position in the direction of the mouse gesture. In this case, we want the enclosing frame
3180             to be the latching target.
3181         (5) Do not treat the state where the mouse wheel gesture has ended manual scrolling, but has not ended
3182             momentum scrolling, as an appropriate time to select a latching target.
3183
3184         * page/EventHandler.cpp:
3185         (WebCore::EventHandler::platformCompleteWheelEvent): Modify signature to remove unneeded argument.
3186         (WebCore::EventHandler::handleWheelEvent): Modify call to 'platformCompleteWheelEvent' to remove unused argument.
3187         * page/EventHandler.h:
3188         * page/mac/EventHandlerMac.mm:
3189         (WebCore::findEnclosingOverflowScroll): Renamed from 'findEnclosingScrollableContainer' and revised per the
3190         notes above.
3191         (WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
3192         consolidate logic.
3193         (WebCore::EventHandler::platformCompleteWheelEvent): Remove unused argument. The wheel event target is no
3194         longer needed here, now that iframes are not processed by this code.
3195         (WebCore::findEnclosingScrollableContainer): Deleted.
3196         * page/scrolling/ScrollLatchingState.cpp:
3197         (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement:) Switch to move operator for passing
3198         a temporary RefPtr to the the function.
3199         * page/scrolling/ScrollLatchingState.h:
3200         * platform/PlatformWheelEvent.h:
3201         (WebCore::PlatformWheelEvent::useLatchedEventElement): Recognize 'phase=ended, momentum=none' as a state
3202         that should not cause latching state to be revised.
3203
3204 2015-03-23  Anders Carlsson  <andersca@apple.com>
3205
3206         Try to fix the iOS build.
3207
3208         * platform/network/mac/CookieJarMac.mm:
3209
3210 2015-03-23  Brady Eidson  <beidson@apple.com>
3211
3212         Content extensions should apply css selectors
3213         https://bugs.webkit.org/show_bug.cgi?id=142604
3214
3215         Reviewed by Alex Christensen.
3216
3217         Tests: http/tests/contentextensions/css-display-none.html
3218
3219         * WebCore.xcodeproj/project.pbxproj:
3220
3221         * contentextensions/ContentExtension.cpp:
3222         (WebCore::ContentExtensions::ContentExtension::create):
3223         (WebCore::ContentExtensions::ContentExtension::ContentExtension):
3224         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
3225         * contentextensions/ContentExtension.h:
3226         (WebCore::ContentExtensions::ContentExtension::identifier):
3227         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
3228
3229         * contentextensions/ContentExtensionsBackend.cpp:
3230         (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
3231         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3232         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
3233         * contentextensions/ContentExtensionsBackend.h:
3234
3235         * contentextensions/DFABytecodeInterpreter.cpp:
3236         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3237
3238         * dom/DocumentStyleSheetCollection.cpp:
3239         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):
3240         * dom/DocumentStyleSheetCollection.h:
3241
3242         * loader/DocumentLoader.cpp:
3243         (WebCore::DocumentLoader::commitData):
3244         (WebCore::DocumentLoader::startLoadingMainResource):
3245         (WebCore::DocumentLoader::addPendingContentExtensionSheet):
3246         * loader/DocumentLoader.h:
3247
3248         * loader/cache/CachedResourceLoader.cpp:
3249         (WebCore::CachedResourceLoader::requestResource):
3250
3251         * loader/cache/CachedResourceRequest.cpp:
3252         (WebCore::CachedResourceRequest::setInitiator):
3253         * loader/cache/CachedResourceRequest.h:
3254         (WebCore::CachedResourceRequest::initiatingDocumentLoader):
3255
3256         * page/UserContentController.cpp:
3257         (WebCore::UserContentController::globalDisplayNoneStyleSheet):
3258         (WebCore::UserContentController::displayNoneCSSRule):
3259         * page/UserContentController.h:
3260
3261 2015-03-23  Anders Carlsson  <andersca@apple.com>
3262
3263         -[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
3264         https://bugs.webkit.org/show_bug.cgi?id=142990
3265         rdar://problem/20241645
3266
3267         Reviewed by Andreas Kling.
3268
3269         Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.
3270
3271         * platform/network/cf/CookieJarCFNet.cpp:
3272         * platform/network/mac/CookieJarMac.mm:
3273
3274 2015-03-23  Conrad Shultz  <conrad_shultz@apple.com>
3275
3276         Replace uses of kCTFontSystemFontType
3277         https://bugs.webkit.org/show_bug.cgi?id=142984
3278
3279         Reviewed by Tim Horton.
3280
3281         * rendering/RenderThemeMac.mm:
3282         (WebCore::AttachmentLayout::layOutTitle):
3283         (WebCore::AttachmentLayout::layOutSubtitle):
3284
3285 2015-03-23  Dean Jackson  <dino@apple.com>
3286
3287         kCTFontSystemFontType is deprecated in CoreText
3288         https://bugs.webkit.org/show_bug.cgi?id=142981
3289         <rdar://problem/20261171>
3290
3291         Reviewed by Beth Dakin.
3292
3293         Update to the non-deprecated version.
3294
3295         * rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem
3296         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
3297
3298 2015-03-23  Eric Carlson  <eric.carlson@apple.com>
3299
3300         [Mac] Enable fullscreen for MSE-based videos
3301         https://bugs.webkit.org/show_bug.cgi?id=142971
3302
3303         Reviewed by Jer Noble.
3304
3305         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3306         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;
3307
3308 2015-03-23  Alex Christensen  <achristensen@webkit.org>
3309
3310         [MediaFoundation] Implement seek.
3311         https://bugs.webkit.org/show_bug.cgi?id=142594
3312
3313         Reviewed by Darin Adler.
3314
3315         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3316         (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
3317         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
3318         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
3319         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3320
3321 2015-03-23  Dan Bernstein  <mitz@apple.com>
3322
3323         Fixed the build.
3324
3325         * platform/graphics/cocoa/FontCocoa.mm:
3326         (WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
3327         (WebCore::Font::platformWidthForGlyph): Ditto.
3328
3329 2015-03-23  Jer Noble  <jer.noble@apple.com>
3330
3331         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
3332         https://bugs.webkit.org/show_bug.cgi?id=142970
3333
3334         Reviewed by Eric Carlson.
3335
3336         Return early after synchronously calling to the main thread to allocate the volume
3337         view, to avoid re-allocating the volume view again on the web thread.
3338
3339         * platform/audio/ios/MediaSessionManagerIOS.mm:
3340         (-[WebMediaSessionHelper allocateVolumeView]):
3341
3342 2015-03-23  Tim Horton  <timothy_horton@apple.com>
3343
3344         Add a share item to the link action menu
3345         https://bugs.webkit.org/show_bug.cgi?id=142961
3346         <rdar://problem/19198374>
3347
3348         Reviewed by Beth Dakin.
3349
3350         * English.lproj/Localizable.strings:
3351         Remove some now-unused strings.
3352
3353         * platform/spi/mac/NSMenuSPI.h:
3354         Add some SPI.
3355
3356 2015-03-23  David Kilzer  <ddkilzer@apple.com>
3357
3358         [iOS] Build fix: CoreText deprecated kCTFontSystemFontType
3359
3360         Fix tracked by:  <rdar://problem/20261171>
3361
3362         * rendering/RenderThemeIOS.mm:
3363         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
3364         Add clang pragmas.
3365
3366 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
3367
3368         Unreviewed test fix.
3369
3370         * css/CSSParser.cpp:
3371         (WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.
3372
3373 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
3374
3375         scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
3376         https://bugs.webkit.org/show_bug.cgi?id=142552
3377         <rdar://problem/20114743>
3378
3379         Reviewed by Dean Jackson.
3380
3381         Revise the snap point logic as follows:
3382         (1) Put the snap point destination handling in a helper function to make the rest of the code
3383             easier to read.
3384         (2) Make sure we always have a left-hand snap point (i.e., position 0), but don't add multiple
3385             left-hand snap points.
3386         (3) Create a helper function to determine if we should be working with the scroll snap 'elements'
3387             behavior. We want to use this for scroll-snap-destination/scroll-snap-coordinate markup.
3388         (4) Create per-element snap point offsets when using scroll-snap-destination/scroll-snap-coordinate.
3389
3390         * css/CSSParser.cpp:
3391         (WebCore::CSSParser::parseScrollSnapDestination): Add assertion to try to catch bad parser state.
3392         * page/scrolling/AxisScrollSnapOffsets.cpp:
3393         (WebCore::destinationOffsetForViewSize): Added helper function to consolidate logic for handling
3394         destination coordinates.
3395         (WebCore::updateFromStyle): Make sure a left-hand snap point is always provided.
3396         (WebCore::styleUsesElements): Added helper function.
3397         (WebCore::updateSnapOffsetsForScrollableArea): Revise logic to generate 'per-element' snap point
3398         offsets.
3399
3400 2015-03-23  Yoav Weiss  <yoav@yoav.ws>
3401
3402         Refactor ImageLoader's setting of CachedImage
3403         https://bugs.webkit.org/show_bug.cgi?id=142825
3404
3405         Reviewed by Chris Dumez.
3406
3407         No new tests, since there's no functional change.
3408
3409         setImage and setImageWithoutConsideringPendingLoadEvent were not called with new
3410         CachedImages and were not used as originally intended. That resulted in some dead code,
3411         and confusion when going over the code.
3412         This patch renames these methods into equivalent clearImage* methods, and deletes resulting dead code.
3413
3414         * html/HTMLObjectElement.cpp:
3415         (WebCore::HTMLObjectElement::renderFallbackContent): Changed setImage call to clearImage.
3416         * loader/ImageLoader.cpp:
3417         (WebCore::ImageLoader::clearImage):
3418         (WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
3419         (WebCore::ImageLoader::notifyFinished):
3420         (WebCore::ImageLoader::elementDidMoveToNewDocument):
3421         (WebCore::ImageLoader::setImage): Deleted.
3422         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Deleted.
3423         * loader/ImageLoader.h:
3424
3425 2015-03-22  Benjamin Poulain  <benjamin@webkit.org>
3426
3427         CSS Selectors: fix attribute case-insensitive matching of Contain and List
3428         https://bugs.webkit.org/show_bug.cgi?id=142932
3429
3430         Reviewed by Darin Adler.
3431
3432         Fix the last two attribute selectors that were using full case-insensitive
3433         match:
3434             -Contain ([foo*=bar]).
3435             -List (foo~=bar]).
3436
3437         Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
3438                fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html
3439
3440         * css/SelectorChecker.cpp:
3441         (WebCore::attributeValueMatches):
3442         * cssjit/SelectorCompiler.cpp:
3443         (WebCore::SelectorCompiler::attributeValueContains):
3444         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
3445
3446 2015-03-22  Benjamin Poulain  <bpoulain@apple.com>
3447
3448         Detect when url filter pattern with groups match the empty string
3449         https://bugs.webkit.org/show_bug.cgi?id=142930
3450
3451         Reviewed by Sam Weinig.
3452
3453         The previous test was only accounting for simple atoms. This patch extends
3454         it to groups.
3455
3456         * contentextensions/URLFilterParser.cpp:
3457         (WebCore::ContentExtensions::Term::quantify):
3458         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
3459         (WebCore::ContentExtensions::GraphBuilder::finalize):
3460         (WebCore::ContentExtensions::Term::quantifier): Deleted.
3461
3462 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
3463
3464         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
3465         https://bugs.webkit.org/show_bug.cgi?id=142940
3466
3467         Reviewed by Sam Weinig.
3468
3469         * dom/Document.cpp:
3470         (WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.
3471         * dom/Document.h:
3472
3473         * html/HTMLMediaSession.cpp:
3474         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.
3475         * html/HTMLMediaSession.h:
3476
3477         * page/Page.cpp:
3478         (WebCore::Page::didChoosePlaybackTarget):  Ditto.
3479         * page/Page.h:
3480
3481         * platform/audio/MediaSession.h:
3482         * platform/graphics/MediaPlaybackTargetPickerClient.h:
3483         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: 
3484         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):  Ditto.
3485
3486 2015-03-22  Anders Carlsson  <andersca@apple.com>
3487
3488         _WKWebsiteDataStore should clear WebSQL databases
3489         https://bugs.webkit.org/show_bug.cgi?id=142947
3490
3491         Reviewed by Sam Weinig.
3492
3493         * Modules/webdatabase/DatabaseTracker.cpp:
3494         (WebCore::DatabaseTracker::trackerWithDatabasePath):
3495         Add a hack so we can get at a tracker from the UI process.
3496
3497         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
3498         New function that deletes all databases modified after a given time.
3499
3500         * Modules/webdatabase/DatabaseTracker.h:
3501         Add new members and export the ones we want to call from WebKit2.
3502
3503         * Modules/webdatabase/OriginLock.h:
3504         Export the destructor.
3505
3506 2015-03-21  Dean Jackson  <dino@apple.com>
3507
3508         Remove the prefix for CSS Transforms
3509         https://bugs.webkit.org/show_bug.cgi?id=142927
3510         <rdar://problem/11568151>
3511
3512         Reviewed by Simon Fraser.
3513
3514         Support the bare form of:
3515         - transform
3516         - transform-style
3517         - transform-origin
3518         - perspective
3519         - perspective-origin
3520
3521         For transform-style, we also still differentiate the prefixed property
3522         because we may want to use that as an indicator of legacy content.
3523
3524         This is mostly a find and replace, but with some related naming
3525         changes. The DOM interface for WebKitCSSTransformValue remains
3526         unchanged.
3527
3528         Tests: transforms/2d/transform-2d-prefixed.html
3529                transforms/3d/general/prefixed-3dtransform-values.html
3530
3531         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3532         (WebCore::propertyChangeMayRepaintNonDescendants):
3533         * css/CSSComputedStyleDeclaration.cpp:
3534         (WebCore::isLayoutDependent):
3535         (WebCore::ComputedStyleExtractor::propertyValue):
3536         * css/CSSParser.cpp:
3537         (WebCore::isValidKeywordPropertyAndValue):
3538         (WebCore::isKeywordPropertyID):
3539         (WebCore::parseTranslateTransformValue):
3540         (WebCore::CSSParser::parseValue):
3541         (WebCore::CSSParser::parseTransformOrigin):
3542         (WebCore::CSSParser::parsePerspectiveOrigin):
3543         * css/CSSPropertyNames.in:
3544         * css/StyleProperties.cpp:
3545         (WebCore::StyleProperties::getPropertyValue):
3546         (WebCore::StyleProperties::asText):
3547         * css/WebKitCSSMatrix.cpp:
3548         (WebCore::WebKitCSSMatrix::setMatrixValue):
3549         * html/track/VTTCue.cpp:
3550         (WebCore::VTTCueBox::applyCSSProperties):
3551         * page/animation/AnimationController.cpp:
3552         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
3553         * page/animation/CSSPropertyAnimation.cpp:
3554         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
3555         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3556         * page/animation/CompositeAnimation.cpp:
3557         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
3558         * page/animation/ImplicitAnimation.cpp:
3559         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
3560         * page/animation/KeyframeAnimation.cpp:
3561         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
3562         (WebCore::KeyframeAnimation::validateTransformFunctionList):
3563         * platform/graphics/GraphicsLayer.cpp:
3564         (WebCore::GraphicsLayer::validateTransformOperations):
3565         * platform/graphics/GraphicsLayerClient.h:
3566         * platform/graphics/ca/GraphicsLayerCA.cpp:
3567         (WebCore::propertyIdToString):
3568         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
3569         (WebCore::GraphicsLayerCA::addAnimation):
3570         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
3571         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
3572         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
3573         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3574         (WebCore::GraphicsLayerTextureMapper::addAnimation):
3575         * platform/graphics/texmap/TextureMapperAnimation.cpp:
3576         (WebCore::TextureMapperAnimation::applyInternal):
3577         * platform/graphics/texmap/TextureMapperLayer.cpp:
3578         (WebCore::TextureMapperLayer::syncAnimations):
3579         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3580         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
3581         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
3582         (WebCore::CoordinatedGraphicsLayer::addAnimation):
3583         * rendering/RenderLayerBacking.cpp:
3584         (WebCore::RenderLayerBacking::updateGeometry):
3585         (WebCore::RenderLayerBacking::startAnimation):
3586         (WebCore::RenderLayerBacking::startTransition):
3587         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
3588         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
3589         * rendering/RenderLayerCompositor.cpp:
3590         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3591         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
3592         * svg/SVGElement.cpp:
3593         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3594
3595 2015-03-21  Commit Queue  <commit-queue@webkit.org>
3596
3597         Unreviewed, rolling out r181824.
3598         https://bugs.webkit.org/show_bug.cgi?id=142935
3599
3600         Broke Windows build (Requested by ap on #webkit).
3601
3602         Reverted changeset:
3603
3604         "Remove the prefix for CSS Transforms"
3605         https://bugs.webkit.org/show_bug.cgi?id=142927
3606         http://trac.webkit.org/changeset/181824
3607
3608 2015-03-20  Dean Jackson  <dino@apple.com>
3609
3610         Remove the prefix for CSS Transforms
3611         https://bugs.webkit.org/show_bug.cgi?id=142927
3612         <rdar://problem/11568151>
3613
3614         Reviewed by Simon Fraser.
3615
3616         Support the bare form of:
3617         - transform
3618         - transform-style
3619         - transform-origin
3620         - perspective
3621         - perspective-origin
3622
3623         For transform-style, we also still differentiate the prefixed property
3624         because we may want to use that as an indicator of legacy content.
3625
3626         This is mostly a find and replace, but with some related naming
3627         changes. The DOM interface for WebKitCSSTransformValue remains
3628         unchanged.
3629
3630         Tests: transforms/2d/transform-2d-prefixed.html
3631                transforms/3d/general/prefixed-3dtransform-values.html
3632
3633         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3634         (WebCore::propertyChangeMayRepaintNonDescendants):
3635         * css/CSSComputedStyleDeclaration.cpp:
3636         (WebCore::isLayoutDependent):
3637         (WebCore::ComputedStyleExtractor::propertyValue):
3638         * css/CSSParser.cpp:
3639         (WebCore::isValidKeywordPropertyAndValue):
3640         (WebCore::isKeywordPropertyID):
3641         (WebCore::parseTranslateTransformValue):
3642         (WebCore::CSSParser::parseValue):
3643         (WebCore::CSSParser::parseTransformOrigin):
3644         (WebCore::CSSParser::parsePerspectiveOrigin):
3645         * css/CSSPropertyNames.in:
3646         * css/StyleProperties.cpp:
3647         (WebCore::StyleProperties::getPropertyValue):
3648         (WebCore::StyleProperties::asText):
3649         * css/WebKitCSSMatrix.cpp:
3650         (WebCore::WebKitCSSMatrix::setMatrixValue):
3651         * html/track/VTTCue.cpp:
3652         (WebCore::VTTCueBox::applyCSSProperties):
3653         * page/animation/AnimationController.cpp:
3654         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
3655         * page/animation/CSSPropertyAnimation.cpp:
3656         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
3657         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3658         * page/animation/CompositeAnimation.cpp:
3659         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
3660         * page/animation/ImplicitAnimation.cpp:
3661         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
3662         * page/animation/KeyframeAnimation.cpp:
3663         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
3664         (WebCore::KeyframeAnimation::validateTransformFunctionList):
3665         * platform/graphics/GraphicsLayer.cpp:
3666         (WebCore::GraphicsLayer::validateTransformOperations):
3667         * platform/graphics/GraphicsLayerClient.h:
3668         * platform/graphics/ca/GraphicsLayerCA.cpp:
3669         (WebCore::propertyIdToString):
3670         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
3671         (WebCore::GraphicsLayerCA::addAnimation):
3672         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
3673         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
3674         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
3675         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3676         (WebCore::GraphicsLayerTextureMapper::addAnimation):
3677         * platform/graphics/texmap/TextureMapperAnimation.cpp:
3678         (WebCore::TextureMapperAnimation::applyInternal):
3679         * platform/graphics/texmap/TextureMapperLayer.cpp:
3680         (WebCore::TextureMapperLayer::syncAnimations):
3681         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3682         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
3683         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
3684         (WebCore::CoordinatedGraphicsLayer::addAnimation):
3685         * rendering/RenderLayerBacking.cpp:
3686         (WebCore::RenderLayerBacking::updateGeometry):
3687         (WebCore::RenderLayerBacking::startAnimation):
3688         (WebCore::RenderLayerBacking::startTransition):
3689         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
3690         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
3691         * rendering/RenderLayerCompositor.cpp:
3692         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3693         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
3694         * svg/SVGElement.cpp:
3695         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3696
3697 2015-03-20  Yusuke Suzuki  <utatane.tea@gmail.com>
3698
3699         REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
3700         https://bugs.webkit.org/show_bug.cgi?id=142410
3701
3702         Reviewed by Geoffrey Garen.
3703
3704         The same issues are found in the existing code; PropertyName does not have ownership.
3705         This patch rewrite the point that should have ownership to Identifier.
3706
3707         * bindings/js/JSDOMWindowCustom.cpp:
3708         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3709         (WebCore::JSDOMWindow::putByIndex):
3710         * bindings/js/ReadableStreamJSSource.cpp:
3711         (WebCore::getInternalSlotFromObject):
3712         * bindings/scripts/CodeGeneratorJS.pm:
3713         (GenerateImplementation):
3714         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3715         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
3716         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3717         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
3718         * bindings/scripts/test/JS/JSTestInterface.cpp:
3719         (WebCore::JSTestInterface::putByIndex):
3720
3721 2015-03-20  Simon Fraser  <simon.fraser@apple.com>
3722
3723         Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
3724         https://bugs.webkit.org/show_bug.cgi?id=142917
3725
3726         Reviewed by Beth Dakin.
3727         
3728         The scrollperf test would fail to detect transitions between slow and fast scrolling
3729         for new pages, because there was no logging when slow-scrolling scrolling tree was
3730         torn down, and a new fast-scrolling tree constructed.
3731         
3732         Fix by always logging the slow-scrolling reasons in the first update of the
3733         ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
3734         changed.
3735
3736         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3737         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3738         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
3739         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
3740
3741 2015-03-19  Geoffrey Garen  <ggaren@apple.com>
3742
3743         Function.prototype.toString should not decompile the AST
3744         https://bugs.webkit.org/show_bug.cgi?id=142853
3745
3746         Reviewed by Sam Weinig.
3747
3748         * bindings/js/JSLazyEventListener.cpp:
3749         (WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
3750         number of attribute event listeners to account for the leading newline
3751         now added by JavaScriptCore.
3752
3753         This solution is not perfect, but there are a lot of pre-existing problems
3754         with line and column reporting for attribute event listeners, and this
3755         preserves existing behavior with reasonable reliability.
3756
3757 2015-03-20  Alex Christensen  <achristensen@webkit.org>
3758
3759         Progress towards CMake on Mac.
3760         https://bugs.webkit.org/show_bug.cgi?id=136003
3761
3762         Reviewed by Chris Dumez.
3763
3764         * PlatformMac.cmake:
3765         Added some directories to create forwarding headers from.
3766         Generate ObjC bindings.
3767
3768 2015-03-20  Per Arne Vollan  <peavo@outlook.com>
3769
3770         [WinCairo] Crash when leaving page while video is playing.
3771         https://bugs.webkit.org/show_bug.cgi?id=142578
3772
3773         Reviewed by Alex Christensen.
3774
3775         This can happen when there is an asynchronous event invoked from a video worker
3776         thread, accessing the media player object after it has been deleted.
3777         This is solved by resetting the media player pointer in the event object,
3778         when the media player is deleted.
3779
3780         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3781         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
3782         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
3783         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
3784         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
3785         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
3786         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
3787         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
3788         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
3789         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3790         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::MediaPlayerListener):
3791         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::~MediaPlayerListener):
3792         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::onMediaPlayerDeleted):
3793
3794 2015-03-20  Chris Dumez  <cdumez@apple.com>
3795
3796         Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
3797         https://bugs.webkit.org/show_bug.cgi?id=142911
3798
3799         Reviewed by Antti Koivisto.
3800
3801         Drop the isBackForwardLoadType(m_loadType) assertion in
3802         FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
3803         used to hold true when goToBackForwardItem() was only called with
3804         history navigation load types. However, after r181782, we use a Standard
3805         load in the cases where we do not wish to display stale content (e.g.
3806         restoring session state).
3807
3808         The assertion comment says "We only use cache-only loads to avoid
3809         resubmitting forms". However, we then call loadDifferentDocumentItem()
3810         which already takes care of using the ReturnCacheDataElseLoad cache
3811         policy as the HistoryItem has form data and we pass
3812         MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.
3813
3814         No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
3815         API test.
3816
3817         * loader/FrameLoader.cpp:
3818         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
3819
3820 2015-03-20  Andy Estes  <aestes@apple.com>
3821
3822         [Content Filtering] Adopt NEFilterSource unblock handling
3823         https://bugs.webkit.org/show_bug.cgi?id=142904
3824
3825         Reviewed by Andreas Kling.
3826
3827         * platform/cocoa/NetworkExtensionContentFilter.mm:
3828         (WebCore::NetworkExtensionContentFilter::unblockHandler):
3829         Returned an unblock handler that calls -[NEFilterSource remediateWithDecisionHandler:].
3830         * platform/cocoa/ParentalControlsContentFilter.mm:
3831         (WebCore::ParentalControlsContentFilter::unblockHandler): Used ASCIILiteral.
3832
3833 2015-03-19  Andy Estes  <aestes@apple.com>
3834
3835         [Content Filtering] Add tests for unblock requests
3836         https://bugs.webkit.org/show_bug.cgi?id=142900
3837
3838         Reviewed by Andreas Kling.
3839
3840         Currently the iOS Parental Controls content filter has a mechanism for requesting that a page be unblocked.
3841         WebKit implements this by listening for navigations originating from the filter's error page to a special URL,
3842         and requesting the page be unblocked via platform API, which might cause UI to be displayed. If the unblock is
3843         successful then we schedule a reload of the frame in order to display the unblocked document.
3844
3845         NetworkExtension also supports unblock requests, so in preparation for adopting its API, this patch allows
3846         content filters to specify their own unblock request method, teaches MockContentFilter to provide such a method,
3847         and writes tests to cover both allowed and denied unblock requests.
3848
3849         The content filter that blocks a load creates a ContentFilterUnblockHandler, passing it a lambda that is executed
3850         when a navigation matches the filter's special unblock URL. Filters can also specify that a script be executed in
3851         the context of its error page if the unblock is denied.
3852
3853         All platform content filters can handle unblock requests like this with the exception of iOS Parental Controls in WebKit2.
3854         Since UI can be displayed by the system in this case, the request must be made from within the UI process. Therefore the
3855         existing method is retained of serializing a WebFilterEvaluator and intercepting navigation policy calls in the UI process.
3856
3857         Tests: contentfiltering/allow-after-unblock-request.html
3858                contentfiltering/block-after-unblock-request.html
3859
3860         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
3861         (WebCore::JSMockContentFilterSettings::decisionPoint): Added some using statements for clarity.
3862         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
3863         (WebCore::toJSValue): Returns a JSValue from a Decision.
3864         (WebCore::toDecision): Returns a Decision from a JSValue.
3865         (WebCore::JSMockContentFilterSettings::decision): Used toJSValue.
3866         (WebCore::JSMockContentFilterSettings::setDecision): Used toDecision.
3867         (WebCore::JSMockContentFilterSettings::unblockRequestDecision): Used toJSValue.
3868         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision): Used toDecision.
3869         * loader/ContentFilter.cpp:
3870         (WebCore::ContentFilter::createIfNeeded): Passed a reference to the owning DocumentLoader.
3871         (WebCore::ContentFilter::ContentFilter): Ditto.
3872         (WebCore::ContentFilter::unblockHandler): If the unblockHandler requests that a script be executed when an
3873         unblock request is denied, create a wrapper unblockHandler that executes that script in m_documentLoader's frame.
3874         * loader/ContentFilter.h:
3875         * loader/DocumentLoader.cpp:
3876         (WebCore::DocumentLoader::responseReceived): Passed this to ContentFilter::createIfNeeded.
3877         * loader/FrameLoader.cpp:
3878         (WebCore::FrameLoader::prepareForLoadStart): Called PolicyChecker::prepareForLoadStart.
3879         * loader/PolicyChecker.cpp:
3880         (WebCore::PolicyChecker::prepareForLoadStart): Reset m_contentFilterUnblockHandler.
3881         (WebCore::PolicyChecker::checkNavigationPolicy): Moved logic to here from WebKit1's WebFrameLoaderClient.
3882         Placing it here allows it to be shared between WebKit1 and WebKit2 (when the unblock handler does not need to
3883         be called in the UI process).
3884         * loader/PolicyChecker.h:
3885         (WebCore::PolicyChecker::setContentFilterUnblockHandler): Added.
3886         * page/Frame.h: Made Frame ThreadSafeRefCounted, since RefPtr<Frames> are captured in lambdas that can be
3887         copied by background threads managed by the underlying platform.
3888         * platform/ContentFilterUnblockHandler.h:
3889         (WebCore::ContentFilterUnblockHandler::unblockURLScheme): Returned the Apple content filter scheme.
3890         (WebCore::ContentFilterUnblockHandler::unblockURLHost): Returned the unblock URL host.
3891         (WebCore::ContentFilterUnblockHandler::clear): Deleted.
3892         * platform/PlatformContentFilter.h:
3893         (WebCore::PlatformContentFilter::unblockRequestDeniedScript): Returned the unblock request denied script.
3894         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
3895         (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler): Added a constructor that takes an
3896         unblockURLHost and a UnblockRequesterFunction. Added an alternate constructor for iOS Parental Controls on
3897         WebKit2 that takes an unblockURLHost and a WebFilterEvaluator.
3898         (WebCore::ContentFilterUnblockHandler::needsUIProcess): Returned true if m_webFilterEvaluator is non-null.
3899         (WebCore::ContentFilterUnblockHandler::encode): Encoded m_unblockURLHost in addition to m_webFilterEvaluator.
3900         (WebCore::ContentFilterUnblockHandler::decode): Decoded m_unblockURLHost in addition to m_webFilterEvaluator.
3901         (WebCore::ContentFilterUnblockHandler::canHandleRequest): Returned true if there is a either a m_unblockRequester
3902         or a m_webFilterEvaluator and the request's host and scheme match those of the unblock request URL.
3903         (WebCore::dispatchToMainThread): Added a helper to dispatch a block to the main thread. Then if the web thread
3904         is enabled on iOS, dispatch it there.
3905         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Renamed from handleUnblockRequestAndDispatchIfSuccessful.
3906         Requested an unblock using either m_unblockRequester or m_webFilterEvaluator, then called decisionHandler with the response.
3907         (WebCore::scheme): Moved to ContentFilterUnblockHandler::unblockURLScheme.
3908         (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful): Renamed to requestUnblockAsync.
3909         * platform/cocoa/ParentalControlsContentFilter.mm:
3910         (WebCore::ParentalControlsContentFilter::unblockHandler): Returned an unblock handler using the WebFilterEvaluator constructor.
3911         * testing/MockContentFilter.cpp: Added using statments for clarity.
3912         (WebCore::settings): Added a helper to get MockContentFilterSettings::singleton().
3913         (WebCore::MockContentFilter::canHandleResponse): Used the helper.
3914         (WebCore::MockContentFilter::MockContentFilter): Took advantage of the using statements.
3915         (WebCore::MockContentFilter::addData): Ditto.
3916         (WebCore::MockContentFilter::finishedAddingData): Ditto.
3917         (WebCore::MockContentFilter::unblockHandler): Returned a ContentFilterUnblockHandler that checks settings() for its decision.
3918         (WebCore::MockContentFilter::unblockRequestDeniedScript): Returned the script to execute in MockContentFilter's
3919         error page when an unblock request is denied.
3920         (WebCore::MockContentFilter::maybeDetermineStatus): Took advantage of settings() and using statements.
3921         * testing/MockContentFilterSettings.cpp:
3922         (WebCore::MockContentFilterSettings::unblockRequestURL): Constructed a static unblock URL and returned it.
3923         * testing/MockContentFilterSettings.h:
3924         (WebCore::MockContentFilterSettings::unblockURLHost): Returned the filter's unblock URL host.
3925         (WebCore::MockContentFilterSettings::unblockRequestDecision): Returns the decision to make for an unblock request.
3926         (WebCore::MockContentFilterSettings::setUnblockRequestDecision): Sets the decision to make for an unblock request.
3927         * testing/MockContentFilterSettings.idl: Added the unblockRequestDecision and unblockRequestURL attributes.
3928
3929 2015-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3930
3931         [GTK] Crash due to empty drag image during drag-and-drop
3932         https://bugs.webkit.org/show_bug.cgi?id=142671
3933
3934         Reviewed by Philippe Normand.
3935
3936         Return early from ImageBuffer constructor if an empty size is
3937         given. This is a speculative fix for a crash while starting a drag
3938         and drop operation, that I haven't been able to reproduce.
3939
3940         * platform/graphics/cairo/ImageBufferCairo.cpp:
3941         (WebCore::ImageBuffer::ImageBuffer):
3942
3943 2015-03-19  Chris Dumez  <cdumez@apple.com>
3944
3945         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
3946         https://bugs.webkit.org/show_bug.cgi?id=142893
3947         <rdar://problem/19633737>
3948         <rdar://problem/19869257>
3949
3950         Reviewed by Antti Koivisto.
3951
3952         Always use ReturnCacheDataElseLoad cache policy for history navigations.
3953         Previously, we would use the default protocol cache policy for history
3954         navigations if m_stateMachine.committedFirstRealDocumentLoad() returned
3955         false so that we do not display stale content when restoring the session
3956         state of Safari statup (rdar://problem/8131355). This is now handled
3957         before reaching this method by no longer using "IndexedBackForward"
3958         FrameLoadType when restoring session tabs, and using "Standard" load
3959         type instead.
3960
3961         * loader/FrameLoader.cpp:
3962         (WebCore::FrameLoader::loadDifferentDocumentItem):
3963
3964 2015-03-19  Andy Estes  <aestes@apple.com>
3965
3966         [Content Filtering] Move ContentFilter to from platform/ to loader/
3967         https://bugs.webkit.org/show_bug.cgi?id=142897
3968
3969         Reviewed by Dan Bernstein.
3970
3971         ContentFilterCollection never contained any platform code, so it doesn't make sense for it to be in platform.
3972         Move it to loader/, since ContentFilters are owned by DocumentLoaders, and just call it ContentFilter. Extract
3973         the abstract part of ContentFilter into a new base class called PlatformContentFilter that each of the
3974         individual filters inherit from.
3975
3976         * WebCore.xcodeproj/project.pbxproj:
3977         * loader/ContentFilter.cpp: Renamed from Source/WebCore/platform/ContentFilter.cpp.
3978         (WebCore::ContentFilter::types): Moved from ContentFilterCollection.
3979         (WebCore::ContentFilter::createIfNeeded): Ditto.
3980         (WebCore::ContentFilter::ContentFilter): Ditto.
3981         (WebCore::ContentFilter::addData): Ditto.
3982         (WebCore::ContentFilter::finishedAddingData): Ditto.
3983         (WebCore::ContentFilter::needsMoreData): Ditto.
3984         (WebCore::ContentFilter::didBlockData): Ditto.
3985         (WebCore::ContentFilter::getReplacementData): Ditto.
3986         (WebCore::ContentFilter::unblockHandler): Ditto.
3987         * loader/ContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
3988         (WebCore::ContentFilter::type): Replaced a use of ContentFilterCollection.
3989         * platform/PlatformContentFilter.h: Renamed from Source/WebCore/platform/ContentFilter.h.
3990         * platform/cocoa/NetworkExtensionContentFilter.h: Inherited from PlatformContentFilter.
3991         * platform/cocoa/ParentalControlsContentFilter.h: Ditto.
3992         * testing/MockContentFilter.h: Ditto.
3993
3994 2015-03-19  Dean Jackson  <dino@apple.com>
3995
3996         CSS Animations with triggers should map scroll position to duration
3997         https://bugs.webkit.org/show_bug.cgi?id=142870
3998         <rdar://problem/20227244>
3999
4000         Reviewed by Simon Fraser.
4001
4002         Expose a prototype implementation of what will eventually be called
4003         animation-timebase, mapping the scroll location to the duration of an
4004         animation. This only applies if the animation has a start and end
4005         trigger.
4006
4007         Test: animations/trigger-container-scroll-boundaries.html
4008
4009         * css/CSSComputedStyleDeclaration.cpp:
4010         (WebCore::createAnimationTriggerValue): Change to downcast.
4011
4012         * css/CSSToStyleMap.cpp:
4013         (WebCore::CSSToStyleMap::mapAnimationTrigger): Fix a bug where I wasn't
4014         telling the ScrollAnimationTrigger object whether or not it had
4015         an end value. This wasn't visible before because we were not using
4016         the end value.
4017
4018         * page/animation/AnimationBase.cpp:
4019         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): Add a comment and
4020         change to using a downcast.
4021         (WebCore::AnimationBase::timeToNextService): Change to downcast.
4022         (WebCore::AnimationBase::freezeAtTime): Whitespace cleanup.
4023         (WebCore::AnimationBase::getElapsedTime): Calculate the elapsedTime based
4024         on the scroll position relative to the start and end trigger spots.
4025
4026         * page/animation/AnimationController.cpp:
4027         (WebCore::AnimationControllerPrivate::updateAnimations): Since this
4028         can potentially call into beginAnimationUpdateTime, it should have
4029         an update blocker. This fixes the assert we were seeing in tests.
4030         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Keep track of the scroll
4031         position so we don't need to ask for it all the time.
4032         * page/animation/AnimationControllerPrivate.h:
4033         (WebCore::AnimationControllerPrivate::scrollPosition): New accessor.
4034
4035         * platform/animation/AnimationTrigger.h: Add downcast macros.
4036         (WebCore::ScrollAnimationTrigger::create): Calculate hasEndValue from the passed
4037         parameters rather than a separate value.
4038         (WebCore::ScrollAnimationTrigger::hasEndValue):
4039         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
4040         (WebCore::ScrollAnimationTrigger::setHasEndValue): Deleted.
4041
4042         * platform/graphics/ca/GraphicsLayerCA.cpp:
4043         (WebCore::GraphicsLayerCA::animationCanBeAccelerated): If we have an
4044         animation of this sort, we can't use a CAAnimation.
4045
4046 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
4047
4048         [Mac] Move MediaPlaybackTargetPicker
4049         https://bugs.webkit.org/show_bug.cgi?id=142889
4050
4051         Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicke