c3effd525834b0776a612b888e281632d883204a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-01-22  Jer Noble  <jer.noble@apple.com>
2
3         [Mac][EME] Adopt changes to AVStreamSession class methods
4         https://bugs.webkit.org/show_bug.cgi?id=140778
5         rdar://problem/19458200
6
7         Reviewed by Eric Carlson.
8
9         AVStreamSession class methods have added a "storageDirectoryAtURL:" parameter so as to be able to
10         read and modify records stored at non-default storage locations.
11
12         * Modules/encryptedmedia/MediaKeySession.cpp:
13         (WebCore::MediaKeySession::mediaKeysStorageDirectory): Implement client method by querying document and settings.
14         * Modules/encryptedmedia/MediaKeySession.h:
15         * platform/graphics/CDMSession.h:
16         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
17         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
18         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Check whether the AVStreamSession class responds to new selector before calling.
19         (WebCore::CDMSessionMediaSourceAVFObjC::update): Ditto.
20         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage): Ditto.
21         (WebCore::CDMSessionMediaSourceAVFObjC::storagePath): Fetch the storage path from the client.
22
23 2015-01-22  Michael Saboff  <msaboff@apple.com>
24
25         REGRESSION (174847): can't view NHK(Japan's national public broadcasting organization)’s news pages
26         https://bugs.webkit.org/show_bug.cgi?id=140794
27
28         Reviewed by Anders Carlsson.
29
30         If a document.open has been set, return it instead of always returning a new,
31         non-cached instance of jsHTMLDocumentPrototypeFunctionOpen.
32
33         Test: js/dom/document-overwrite-open.html
34
35         * bindings/js/JSHTMLDocumentCustom.cpp:
36         (WebCore::JSHTMLDocument::getOwnPropertySlot):
37
38 2015-01-22  Zalan Bujtas  <zalan@apple.com>
39
40         Simple line layout: Reset LineState when starting a new line.
41         https://bugs.webkit.org/show_bug.cgi?id=140789
42
43         Reviewed by Antti Koivisto.
44
45         Reset LineState when starting a new line to ensure we always
46         start with a clean state.
47
48         No change in functionality.
49
50         * rendering/SimpleLineLayout.cpp:
51         (WebCore::SimpleLineLayout::updateLineConstrains):
52         (WebCore::SimpleLineLayout::initializeNewLine):
53         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
54         (WebCore::SimpleLineLayout::createTextRuns):
55
56 2015-01-22  Roger Fong  <roger_fong@apple.com>
57
58         [WebGL2] Create empty interface files for new WebGL2 objects.
59         https://bugs.webkit.org/show_bug.cgi?id=140779.
60         <rdar://problem/15002288>
61
62         Reviewed by Dean Jackson.
63
64         * CMakeLists.txt:
65         * DerivedSources.cpp:
66         * DerivedSources.make:
67         * WebCore.vcxproj/WebCore.vcxproj:
68         * WebCore.vcxproj/WebCore.vcxproj.filters:
69         * WebCore.xcodeproj/project.pbxproj:
70         * html/canvas/WebGLQuery.cpp: Added.
71         (WebCore::WebGLQuery::create):
72         (WebCore::WebGLQuery::~WebGLQuery):
73         (WebCore::WebGLQuery::WebGLQuery):
74         (WebCore::WebGLQuery::deleteObjectImpl):
75         * html/canvas/WebGLQuery.h: Added.
76         * html/canvas/WebGLQuery.idl: Added.
77         * html/canvas/WebGLSampler.cpp: Added.
78         (WebCore::WebGLSampler::create):
79         (WebCore::WebGLSampler::~WebGLSampler):
80         (WebCore::WebGLSampler::WebGLSampler):
81         (WebCore::WebGLSampler::deleteObjectImpl):
82         * html/canvas/WebGLSampler.h: Added.
83         * html/canvas/WebGLSampler.idl: Added.
84         * html/canvas/WebGLSharedObject.h:
85         (WebCore::WebGLSharedObject::isQuery):
86         (WebCore::WebGLSharedObject::isSampler):
87         (WebCore::WebGLSharedObject::isSync):
88         (WebCore::WebGLSharedObject::isTransformFeedback):
89         (WebCore::WebGLSharedObject::isVertexArrayObject):
90         * html/canvas/WebGLSync.cpp: Added.
91         (WebCore::WebGLSync::create):
92         (WebCore::WebGLSync::~WebGLSync):
93         (WebCore::WebGLSync::WebGLSync):
94         (WebCore::WebGLSync::deleteObjectImpl):
95         * html/canvas/WebGLSync.h: Added.
96         * html/canvas/WebGLSync.idl: Added.
97         * html/canvas/WebGLTransformFeedback.cpp: Added.
98         (WebCore::WebGLTransformFeedback::create):
99         (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback):
100         (WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
101         (WebCore::WebGLTransformFeedback::deleteObjectImpl):
102         * html/canvas/WebGLTransformFeedback.h: Added.
103         * html/canvas/WebGLTransformFeedback.idl: Added.
104         * html/canvas/WebGLVertexArrayObject.cpp: Added.
105         (WebCore::WebGLVertexArrayObject::create):
106         (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject):
107         (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):
108         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
109         * html/canvas/WebGLVertexArrayObject.h: Added.
110         * html/canvas/WebGLVertexArrayObject.idl: Added.
111
112 2015-01-22  Chris Dumez  <cdumez@apple.com>
113
114         Fix remaining multiple targets per rule issues in DerivedSources.make
115         https://bugs.webkit.org/show_bug.cgi?id=140790
116
117         Reviewed by David Kilzer.
118
119         Fix remaining multiple target per rule issues in DerivedSources.make,
120         similarly to Bug 140784 and Bug 140756.
121
122         This was causing us to run scripts several times to generate the same
123         files and may lead to malformed files in case of concurrency.
124
125         * DerivedSources.make:
126
127 2015-01-22  Ryosuke Niwa  <rniwa@webkit.org>
128
129         Add a build flag for ES6 class syntax
130         https://bugs.webkit.org/show_bug.cgi?id=140760
131
132         Reviewed by Michael Saboff.
133
134         * Configurations/FeatureDefines.xcconfig:
135
136 2015-01-22  Chris Dumez  <cdumez@apple.com>
137
138         SVGNames.cpp and HTMLNames.cpp are sometimes malformed
139         https://bugs.webkit.org/show_bug.cgi?id=140784
140         <rdar://problem/17701233>
141
142         Reviewed by David Kilzer.
143
144         Due to bad rules in DerivedSources.make, make_names.pl was called
145         several times with the same arguments during build. This is because
146         SVG/HTML/MathML each had several targets associated to the same
147         command. This would cause the command (make_names.pl) to be called
148         once per target. However, make_names.pl only needs to be executed
149         once to generate all of the files currently marked as target.
150
151         Calling make_names.pl several times for the same files is not only
152         wasteful, but it can also lead to malformed generated files if the
153         scripts instances are executed in parallel as they will read / write
154         from / to the same files.
155
156         This patch uses INTERMEDIATE targets instead so that we can still
157         indicate which files are generated by make_names.pl but only run
158         the script once.
159
160         This is a similar fix as for Bug 140756. There may several other
161         similar issues in DerivedSources.make but this patch focuses on
162         make_names.pl. I will take care of other in follow-ups if needed.
163
164         * DerivedSources.make:
165
166 2015-01-22  Chris Dumez  <cdumez@apple.com>
167
168         Have Counter::create() return a Ref<Counter>
169         https://bugs.webkit.org/show_bug.cgi?id=140777
170
171         Reviewed by Andreas Kling.
172
173         Have Counter::create() return a Ref<Counter> instead of a PassRefPtr.
174
175         The CSSPrimitiveValue class needed some updates as well to support
176         constructing a CSSPrimitiveValue object from a Ref<>.
177
178         * css/CSSPrimitiveValue.cpp:
179         (WebCore::CSSPrimitiveValue::init):
180         * css/CSSPrimitiveValue.h:
181         (WebCore::CSSPrimitiveValue::create):
182         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
183         * css/Counter.h:
184         (WebCore::Counter::create):
185         (WebCore::Counter::cloneForCSSOM):
186
187 2015-01-22  Chris Dumez  <cdumez@apple.com>
188
189         Drop the legacy FeatureCounter class
190         https://bugs.webkit.org/show_bug.cgi?id=140749
191
192         Reviewed by Andreas Kling.
193
194         Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
195         instead.
196
197         * CMakeLists.txt:
198         * Configurations/WebCore.xcconfig:
199         * WebCore.exp.in:
200         * WebCore.vcxproj/WebCore.vcxproj:
201         * WebCore.vcxproj/WebCore.vcxproj.filters:
202         * WebCore.xcodeproj/project.pbxproj:
203         * html/HTMLMediaElement.cpp:
204         (WebCore::HTMLMediaElement::parseAttribute):
205         * loader/SubresourceLoader.cpp:
206         (WebCore::SubresourceLoader::willSendRequest):
207         (WebCore::SubresourceLoader::didReceiveResponse):
208         * loader/cache/CachedResource.cpp:
209         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
210         * loader/cache/CachedResourceLoader.cpp:
211         (WebCore::logMemoryCacheResourceRequest):
212         (WebCore::CachedResourceLoader::requestResource):
213         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
214         * page/DiagnosticLoggingKeys.cpp:
215         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey):
216         (WebCore::DiagnosticLoggingKeys::playedKey):
217         (WebCore::DiagnosticLoggingKeys::noCacheKey):
218         (WebCore::DiagnosticLoggingKeys::noStoreKey):
219         (WebCore::DiagnosticLoggingKeys::notInMemoryCacheKey):
220         (WebCore::DiagnosticLoggingKeys::mediaKey):
221         (WebCore::DiagnosticLoggingKeys::isExpiredKey):
222         (WebCore::DiagnosticLoggingKeys::loadingKey):
223         (WebCore::DiagnosticLoggingKeys::inMemoryCacheKey):
224         (WebCore::DiagnosticLoggingKeys::reasonKey):
225         (WebCore::DiagnosticLoggingKeys::audioKey):
226         (WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationKey):
227         (WebCore::DiagnosticLoggingKeys::resourceRequestKey):
228         (WebCore::DiagnosticLoggingKeys::revalidatingKey):
229         (WebCore::DiagnosticLoggingKeys::unusedKey):
230         (WebCore::DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey):
231         (WebCore::DiagnosticLoggingKeys::unusedReasonErrorKey):
232         (WebCore::DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey):
233         (WebCore::DiagnosticLoggingKeys::unusedReasonNoStoreKey):
234         (WebCore::DiagnosticLoggingKeys::unusedReasonRedirectChainKey):
235         (WebCore::DiagnosticLoggingKeys::unusedReasonReloadKey):
236         (WebCore::DiagnosticLoggingKeys::unusedReasonTypeMismatchKey):
237         (WebCore::DiagnosticLoggingKeys::usedKey):
238         (WebCore::DiagnosticLoggingKeys::userKey):
239         (WebCore::DiagnosticLoggingKeys::videoKey):
240         (WebCore::DiagnosticLoggingKeys::webViewKey):
241         (WebCore::DiagnosticLoggingKeys::zoomedKey):
242         * page/DiagnosticLoggingKeys.h:
243         * page/Settings.in:
244         * platform/FeatureCounter.cpp: Removed.
245         * platform/FeatureCounter.h: Removed.
246         * platform/FeatureCounterKeys.h: Removed.
247         * platform/ios/FeatureCounter.mm: Removed.
248
249 2015-01-22  Benjamin Poulain  <benjamin@webkit.org>
250
251         When extending the fallback transitions with their closure, we are modifying the Set while iterating it
252         https://bugs.webkit.org/show_bug.cgi?id=140785
253
254         Reviewed by Andreas Kling.
255
256         * contentextensions/NFAToDFA.cpp:
257         (WebCore::ContentExtensions::populateTransitions):
258         Make that in two steps: accumulate the fallback transitions then add the closure
259         of every element.
260
261 2015-01-21  Antti Koivisto  <antti@apple.com>
262
263         Rename SimpleFontData to Font
264         https://bugs.webkit.org/show_bug.cgi?id=140496
265
266         Reviewed by Zalan Bujtas.
267
268         The fallback supporting Font type was renamed FontCascade.
269         We can now rename SimpleFontData to Font matching the usual definition.
270
271 2015-01-22  Zalan Bujtas  <zalan@apple.com>
272
273         Simple line layout: Make trailing whitespace handling more explicit.
274         https://bugs.webkit.org/show_bug.cgi?id=140776
275
276         Reviewed by Antti Koivisto.
277
278         Differentiate between committed and uncommitted trailing whitespace.
279         This enables further cleanup in removeTrailingWhitespace().
280
281         No change in functionality.
282
283         * rendering/SimpleLineLayout.cpp:
284         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
285         (WebCore::SimpleLineLayout::LineState::addUncommitted):
286         (WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
287         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
288         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
289         (WebCore::SimpleLineLayout::LineState::LineState): Deleted.
290         (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): Deleted.
291         (WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace): Deleted.
292
293 2015-01-22  Alexey Proskuryakov  <ap@apple.com>
294
295         Crash in URL::protocol() after appcache load fails
296         https://bugs.webkit.org/show_bug.cgi?id=140755
297         rdar://problem/7881290
298
299         Reviewed by Dan Bates.
300
301         Test: http/tests/appcache/404-resource-with-slow-main-resource.php
302
303         Not every cache that isn't being updated is complete. It could also be in a zombie
304         state after failing to load. We get rid of the cache once the main resource finishes
305         loading, but while it's being loaded, the zombie still looks like a regular
306         candidate application cache.
307
308         * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::isComplete):
309         * loader/appcache/ApplicationCache.h:
310         Removed const from isComplete(), because otherwise we couldn't use ApplicationCacheGroup::m_caches.contains().
311         Constness doesn't make a lot of sense for these objects anyway.
312
313         * loader/appcache/ApplicationCacheGroup.cpp:
314         (WebCore::ApplicationCacheGroup::failedLoadingMainResource): Toned down an assertion.
315         We can fail a main resource load when the document has a zombie appcache, too.
316
317         * loader/appcache/ApplicationCacheGroup.h:
318         (WebCore::ApplicationCacheGroup::cacheIsComplete):
319         (WebCore::ApplicationCacheGroup::cacheIsBeingUpdated): Deleted.
320         These functions are only used in ApplicationCache::isComplete().
321
322 2015-01-22  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
323
324         Avoid defining always empty Vector<TextCheckingResult>
325         https://bugs.webkit.org/show_bug.cgi?id=140765
326
327         Reviewed by Alexey Proskuryakov.
328
329         Pass an empty vector direclty instead.
330
331         No new tests. No behavior change.
332
333         * editing/SpellChecker.cpp:
334         (WebCore::SpellChecker::didCheckCancel):
335
336 2015-01-22  Chris Dumez  <cdumez@apple.com>
337
338         makeprop.pl script is called too many times during build
339         https://bugs.webkit.org/show_bug.cgi?id=140756
340         <rdar://problem/19467942>
341
342         Reviewed by David Kilzer.
343
344         The makeprop.pl script was called 4 times (instead of once) during
345         build due to a bad Makefile rule in DerivedSources.make. makeprop.pl
346         had 4 associated targets and thus was called 4 times (with the same
347         parameter). Calling it once is sufficient to generate all 4 files
348         that were marked as target. This patch uses an INTERMEDIATE target
349         instead so that we can indicate that several files are generated
350         by the same command.
351
352         I believe this may be the reason for the sporatic build failures
353         that look like:
354         """
355         CSSPropertyNames.gperf: No keywords in input file!
356         calling gperf failed: 256 at WebCore/css/makeprop.pl line 1036.
357         """
358         The makeprop.pl script is generating gperf's input file and calling the
359         gperf executable on this file. If the script is executed several times
360         in parallel, it would explain the build failures as several instances
361         of makeprop.pl may be writing / reading from the same
362         CSSPropertyNames.gperf file.
363
364         * DerivedSources.make:
365
366 2015-01-22  Commit Queue  <commit-queue@webkit.org>
367
368         Unreviewed, rolling out r178894.
369         https://bugs.webkit.org/show_bug.cgi?id=140775
370
371         Broke JSC and bindings tests (Requested by ap_ on #webkit).
372
373         Reverted changeset:
374
375         "put_by_val_direct need to check the property is index or not
376         for using putDirect / putDirectIndex"
377         https://bugs.webkit.org/show_bug.cgi?id=140426
378         http://trac.webkit.org/changeset/178894
379
380 2015-01-22  David Kilzer  <ddkilzer@apple.com>
381
382         [iOS] Fix iphoneos SDK builds for ios-ews queue
383         <http://webkit.org/b/140748>
384
385         Reviewed by Daniel Bates.
386
387         * WebCore.xcodeproj/project.pbxproj: Add new SPI headers.
388         * platform/graphics/cg/ImageBufferCG.cpp: Switch to using
389         "IOSurfaceSPI.h" from <IOSurface/IOSurface.h>.
390         * platform/graphics/cg/ImageBufferDataCG.cpp: Ditto.
391         * platform/graphics/cocoa/IOSurface.mm: Ditto.  Move definitions
392         in <IOSurface/IOSurfacePrivate.h> into "IOSurfaceSPI.h".
393         * platform/spi/cg/CoreGraphicsSPI.h: Switch to
394         WTF_EXTERN_C_{BEGIN,END}.  Add
395         CGContextGetFontAntialiasingStyle() and
396         CGContextSetFontAntialiasingStyle().
397         * platform/spi/cocoa/IOPMLibSPI.h: Switch to use IOReturnSPI.h.
398         * platform/spi/cocoa/IOReturnSPI.h: Add.
399         * platform/spi/cocoa/IOSurfaceSPI.h: Add.
400         * platform/spi/cocoa/IOTypesSPI.h: Add.
401
402 2015-01-21  Sergio Villar Senin  <svillar@igalia.com>
403
404         [CSS Grid Layout] Skip items spanning flex tracks when sizing content based tracks
405         https://bugs.webkit.org/show_bug.cgi?id=140720
406
407         Reviewed by David Hyatt.
408
409         Section "11.5. Resolve Intrinsic Track Sizes" of the specs forces
410         us to ignore items spanning tracks with flex sizing functions when
411         resolving the content-based track sizing functions. Items with
412         span < 2 are not affected by this rule (as they will belong to a
413         single track). This way the algorithm ensures that min-content and
414         max-content restrictions are fulfilled before distributing the
415         extra space.
416
417         Test: fast/css-grid-layout/flex-and-content-sized-resolution-columns.html
418
419         * rendering/RenderGrid.cpp:
420         (WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
421         (WebCore::integerSpanForDirection):
422         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
423         * rendering/RenderGrid.h:
424
425 2015-01-22  Yusuke Suzuki  <utatane.tea@gmail.com>
426
427         put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
428         https://bugs.webkit.org/show_bug.cgi?id=140426
429
430         Reviewed by Geoffrey Garen.
431
432         Test: js/dfg-put-by-val-direct-with-edge-numbers.html
433
434         * bindings/js/JSDOMWindowCustom.cpp:
435         (WebCore::JSDOMWindow::getOwnPropertySlot):
436         * bindings/js/JSHTMLAllCollectionCustom.cpp:
437         (WebCore::callHTMLAllCollection):
438         (WebCore::JSHTMLAllCollection::item):
439         * bindings/scripts/CodeGeneratorJS.pm:
440         (GenerateGetOwnPropertySlotBody):
441         (GenerateImplementation):
442         * bindings/scripts/test/JS/JSFloat64Array.cpp:
443         (WebCore::JSFloat64Array::getOwnPropertySlot):
444         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
445         (WebCore::JSFloat64Array::put):
446         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
447         (WebCore::JSTestEventTarget::getOwnPropertySlot):
448         * bridge/runtime_array.cpp:
449         (JSC::RuntimeArray::getOwnPropertySlot):
450         (JSC::RuntimeArray::put):
451
452 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
453
454         [CSS Grid Layout] Size tracks using a list of all items sorted by span
455         https://bugs.webkit.org/show_bug.cgi?id=140615
456
457         Reviewed by Andreas Kling.
458
459         In r173620 we fixed
460         RenderGrid::resolveContentBasedTrackSizingFunctions() so that it
461         now collects all items spanning content-sized tracks and process
462         them one by one after sorting them by ascending span.
463
464         The problem is that it was incorrectly implemented, it has two
465         important bugs. First one is that the hash table that collects
466         items is regenerated after processing each track, so it's actually
467         doing nothing. Secondly we're only sorting the items on each
468         track, instead of all the items in the grid.
469
470         * rendering/RenderGrid.cpp:
471         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
472
473 2015-01-21  Daniel Bates  <dabates@apple.com>
474
475         Fix the iOS release build after <http://trac.webkit.org/changeset/178868>
476         (https://bugs.webkit.org/show_bug.cgi?id=140742)
477
478         Substitute ASSERT_UNUSED() for ASSERT() since the parameter layer is used only in the assertion expression.
479
480         * rendering/RenderLayerBacking.cpp:
481         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack):
482
483 2015-01-21  Daniel Bates  <dabates@apple.com>
484
485         [iOS] Many compositing tests fail in DumpRenderTree due to contentsOpaque difference
486         https://bugs.webkit.org/show_bug.cgi?id=140742
487
488         Reviewed by Simon Fraser.
489
490         Make RenderLayerBacking::layerTreeAsText() (including internals.layerTreeAsText()) always
491         report that the main frame's RenderView layer is opaque when running iOS DumpRenderTree to
492         avoid test failures and the need to maintain for iOS WebKit1 an almost identical copy of the
493         platform-independent compositing test results.
494
495         The main frame's RenderView layer is always transparent in iOS WebKit1 since it does
496         not make use of a tiled cache layer and defers to UIKit to handle the final compositing
497         of the web view, including applying the page scale factor.
498
499         * platform/RuntimeApplicationChecksIOS.mm:
500         (WebCore::applicationIsDumpRenderTree): The app bundle identifier of DumpRenderTree has
501         the form org.webkit.DumpRenderTreeX where X is some non-negative integer.
502         * platform/graphics/GraphicsLayer.cpp:
503         (WebCore::GraphicsLayer::dumpProperties): Modified to report that a layer is opaque when
504         GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack() returns true.
505         * platform/graphics/GraphicsLayerClient.h:
506         (WebCore::GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added
507         default implementation (returns false).
508         * rendering/RenderLayerBacking.cpp:
509         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added;
510         returns true when running in DumpRenderTree and the passed GraphicsLayer corresponds to the main frame's
511         RenderView layer.
512         * rendering/RenderLayerBacking.h:
513
514 2015-01-21  Roger Fong  <roger_fong@apple.com>
515
516         WebGL2 (spec section 3.1): Add new types to WebGL2 API.
517         https://bugs.webkit.org/show_bug.cgi?id=140741.
518         <rdar://problem/19552962>
519
520         Reviewed by Dean Jackson.
521
522         * html/canvas/WebGL2RenderingContext.idl:
523
524 2015-01-21  Zalan Bujtas  <zalan@apple.com>
525
526         Simple line layout: Move nextTextFragment() to FlowContents class.
527         https://bugs.webkit.org/show_bug.cgi?id=140738
528
529         Reviewed by Antti Koivisto.
530
531         This is in preparation to make FlowContents an iterator class.
532         
533         No change in functionality.
534
535         * rendering/SimpleLineLayout.cpp:
536         (WebCore::SimpleLineLayout::LineState::addUncommitted):
537         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
538         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
539         (WebCore::SimpleLineLayout::initializeNewLine):
540         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
541         (WebCore::SimpleLineLayout::createLineRuns):
542         (WebCore::SimpleLineLayout::TextFragment::TextFragment): Deleted.
543         (WebCore::SimpleLineLayout::TextFragment::isEmpty): Deleted.
544         (WebCore::SimpleLineLayout::nextFragment): Deleted.
545         * rendering/SimpleLineLayoutFlowContents.cpp:
546         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
547         * rendering/SimpleLineLayoutFlowContents.h:
548         (WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment):
549         (WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty):
550
551 2015-01-21  Andreas Kling  <akling@apple.com>
552
553         DocumentLoader::timing() should return a reference.
554         <https://webkit.org/b/128272>
555
556         Reviewed by Antti Koivisto.
557
558         There is always a DocumentLoadTiming object, so return it by
559         reference since it can never be null.
560
561         * Modules/gamepad/NavigatorGamepad.cpp:
562         (WebCore::NavigatorGamepad::from):
563         * dom/ScriptedAnimationController.cpp:
564         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
565         * html/HTMLMediaElement.cpp:
566         (WebCore::HTMLMediaElement::parseAttribute):
567         * inspector/InspectorResourceAgent.cpp:
568         (WebCore::buildObjectForTiming):
569         * loader/DocumentLoader.cpp:
570         (WebCore::DocumentLoader::finishedLoading):
571         (WebCore::DocumentLoader::willSendRequest):
572         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
573         (WebCore::DocumentLoader::startLoadingMainResource):
574         * loader/DocumentLoader.h:
575         (WebCore::DocumentLoader::timing):
576         * loader/FrameLoader.cpp:
577         (WebCore::FrameLoader::stopLoading):
578         (WebCore::FrameLoader::commitProvisionalLoad):
579         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
580         * page/DOMWindow.cpp:
581         (WebCore::DOMWindow::dispatchLoadEvent):
582         * page/Performance.cpp:
583         (WebCore::Performance::now):
584         * page/PerformanceNavigation.cpp:
585         (WebCore::PerformanceNavigation::redirectCount):
586         * page/PerformanceResourceTiming.cpp:
587         (WebCore::monotonicTimeToDocumentMilliseconds):
588         (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
589         * page/PerformanceTiming.cpp:
590         (WebCore::PerformanceTiming::documentLoadTiming):
591
592 2015-01-21  Benjamin Poulain  <benjamin@webkit.org>
593
594         Handle the transition on any character as a separate type of transition
595         https://bugs.webkit.org/show_bug.cgi?id=140711
596
597         Reviewed by Andreas Kling.
598
599         Instead of considering the universal transition as 127 transitions, it is now
600         handled as a separate type of transition.
601
602         The goal is to reduce the number of exit edge to consider for each node. Instead
603         of having 127 for any partition containing one universal transition, we have
604         as few exit edges as necessary + one universal transition.
605
606         In the NFA, the universal transition is stored directly on NFANode in a new
607         HashSet (transitionsOnAnyCharacter).
608         The target nodes are made exclusive between "transitionsOnAnyCharacter" and "transitions"
609         by construction. That is not strictly needed but it simplify debugging at the moment.
610
611         When converting a NFA to a DFA, we first find all the node that transition on any character.
612         Then, when we iterate over "real" transition, we also augment that set with the set on
613         any character.
614
615         When creating the DFA node, we first consider each "real" transition, then we have a single
616         "fallback" transition for any character that has not been handled yet.
617
618         When matching, we first search for any real transition. If there is none but a fallback exists,
619         we take the fallback.
620
621         * contentextensions/DFA.cpp:
622         (WebCore::ContentExtensions::DFA::nextState):
623         (WebCore::ContentExtensions::printTransitions):
624         (WebCore::ContentExtensions::DFA::debugPrintDot):
625         (WebCore::ContentExtensions::printTransition): Deleted.
626         * contentextensions/DFANode.h:
627         * contentextensions/NFA.cpp:
628         (WebCore::ContentExtensions::NFA::addTransition):
629         (WebCore::ContentExtensions::NFA::addTransitionsOnAnyCharacter):
630         (WebCore::ContentExtensions::printTransitions):
631         (WebCore::ContentExtensions::NFA::debugPrintDot):
632         (WebCore::ContentExtensions::printTransition): Deleted.
633         * contentextensions/NFA.h:
634         * contentextensions/NFANode.h:
635         * contentextensions/NFAToDFA.cpp:
636         (WebCore::ContentExtensions::populateTransitions):
637         (WebCore::ContentExtensions::getOrCreateDFANode):
638         (WebCore::ContentExtensions::NFAToDFA::convert):
639         * contentextensions/URLFilterParser.cpp:
640         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
641
642 2015-01-20  Antti Koivisto  <antti@apple.com>
643
644         REGRESSION(r178180): Membuster regressed ~4%
645         https://bugs.webkit.org/show_bug.cgi?id=140495
646
647         Reviewed by Andreas Kling.
648
649         After r178180 we keep system fallback fonts that are used on glyph pages alive.
650         Previously we would traverse the glyph pages and remove entries referencing system fallbacks.
651
652         * platform/graphics/FontCache.cpp:
653         (WebCore::FontCache::purgeInactiveFontData):
654         * platform/graphics/FontCascade.cpp:
655         (WebCore::pruneUnreferencedEntriesFromFontGlyphsCache):
656         (WebCore::pruneSystemFallbackFonts):
657         * platform/graphics/FontCascade.h:
658         * platform/graphics/FontGlyphs.cpp:
659         (WebCore::FontGlyphs::pruneSystemFallbacks):
660
661             When clearing the font cache also remove the cached glyph pages that may contain system fallback fonts
662             and release the fallbacks.
663
664         * platform/graphics/FontGlyphs.h:
665
666 2015-01-21  Manuel Rego Casasnovas  <rego@igalia.com>
667
668         first-letter pseudo-element from ancestors is not being ignored in grids and flexboxes
669         https://bugs.webkit.org/show_bug.cgi?id=138424
670
671         Reviewed by Benjamin Poulain.
672
673         Source/WebCore:
674
675         According to the grid and flexbox specs:
676         "::first-letter pseudo-element do not apply to grid/flex containers".
677         http://dev.w3.org/csswg/css-grid/#grid-containers
678         http://dev.w3.org/csswg/css-flexbox/#flex-containers
679
680         Check also the CSS WG mailing list discussion:
681         http://lists.w3.org/Archives/Public/www-style/2014Dec/0305.html
682
683         This was almost working right, except in the case that an ancestor was
684         setting the ::first-letter pseudo-element.
685
686         Added a few more cases to the current tests in order to check this
687         behavior.
688         Also created some new tests to increase coverage
689
690         Tests: fast/css/first-letter-from-ancestors-not-apply-inline-elements.html
691                fast/css/first-letter-ignores-display-property.html
692
693         * rendering/RenderBlock.cpp:
694         (WebCore::RenderBlock::getFirstLetter): Go to the next sibling when
695         looking for the first text child if you reach a grid or flexbox.
696
697 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
698
699         Fix cast-align warning in Source/WebCore/platform/efl/EflScreenUtilities.cpp
700         https://bugs.webkit.org/show_bug.cgi?id=140670
701
702         Reviewed by Darin Adler.
703
704         * platform/efl/EflScreenUtilities.cpp:
705         (WebCore::createCustomCursor):
706
707 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
708
709         Remove ENABLE(INSPECTOR) ifdef guards
710         https://bugs.webkit.org/show_bug.cgi?id=140668
711
712         Reviewed by Darin Adler.
713
714         * Configurations/FeatureDefines.xcconfig:
715         * WebCore.exp.in:
716         * bindings/js/JSCommandLineAPIHostCustom.cpp:
717         * bindings/js/JSDOMWindowBase.cpp:
718         (WebCore::JSDOMWindowBase::supportsProfiling):
719         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
720         * bindings/js/JSInspectorFrontendHostCustom.cpp:
721         * bindings/js/ScriptController.cpp:
722         (WebCore::ScriptController::collectIsolatedContexts):
723         * bindings/js/ScriptController.h:
724         * bindings/js/ScriptGlobalObject.cpp:
725         (WebCore::ScriptGlobalObject::set):
726         * bindings/js/ScriptGlobalObject.h:
727         * bindings/js/WorkerScriptDebugServer.cpp:
728         * bindings/js/WorkerScriptDebugServer.h:
729         * dom/Node.cpp:
730         (WebCore::Node::inspect):
731         * inspector/CommandLineAPIHost.cpp:
732         * inspector/CommandLineAPIHost.idl:
733         * inspector/CommandLineAPIModule.cpp:
734         * inspector/CommandLineAPIModule.h:
735         * inspector/DOMEditor.cpp:
736         * inspector/DOMEditor.h:
737         * inspector/DOMPatchSupport.cpp:
738         * inspector/DOMPatchSupport.h:
739         * inspector/InspectorApplicationCacheAgent.cpp:
740         * inspector/InspectorApplicationCacheAgent.h:
741         * inspector/InspectorCSSAgent.cpp:
742         * inspector/InspectorCSSAgent.h:
743         * inspector/InspectorClient.cpp:
744         * inspector/InspectorConsoleInstrumentation.h:
745         (WebCore::InspectorInstrumentation::addMessageToConsole):
746         (WebCore::InspectorInstrumentation::consoleCount):
747         (WebCore::InspectorInstrumentation::startConsoleTiming):
748         (WebCore::InspectorInstrumentation::stopConsoleTiming):
749         (WebCore::InspectorInstrumentation::consoleTimeStamp):
750         (WebCore::InspectorInstrumentation::startProfiling):
751         (WebCore::InspectorInstrumentation::stopProfiling):
752         * inspector/InspectorController.cpp:
753         * inspector/InspectorController.h:
754         * inspector/InspectorDOMAgent.cpp:
755         * inspector/InspectorDOMAgent.h:
756         * inspector/InspectorDOMDebuggerAgent.cpp:
757         * inspector/InspectorDOMDebuggerAgent.h:
758         * inspector/InspectorDOMStorageAgent.cpp:
759         * inspector/InspectorDatabaseAgent.cpp:
760         * inspector/InspectorDatabaseAgent.h:
761         * inspector/InspectorDatabaseInstrumentation.h:
762         (WebCore::InspectorInstrumentation::didOpenDatabase):
763         * inspector/InspectorDatabaseResource.cpp:
764         * inspector/InspectorDatabaseResource.h:
765         * inspector/InspectorFrontendClientLocal.cpp:
766         * inspector/InspectorFrontendHost.cpp:
767         * inspector/InspectorFrontendHost.idl:
768         * inspector/InspectorHistory.cpp:
769         * inspector/InspectorHistory.h:
770         * inspector/InspectorIndexedDBAgent.cpp:
771         * inspector/InspectorIndexedDBAgent.h:
772         * inspector/InspectorInstrumentation.cpp:
773         * inspector/InspectorInstrumentation.h:
774         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
775         (WebCore::InspectorInstrumentation::isDebuggerPaused):
776         (WebCore::InspectorInstrumentation::willInsertDOMNode):
777         (WebCore::InspectorInstrumentation::didInsertDOMNode):
778         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
779         (WebCore::InspectorInstrumentation::didRemoveDOMNode):
780         (WebCore::InspectorInstrumentation::willModifyDOMAttr):
781         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
782         (WebCore::InspectorInstrumentation::didRemoveDOMAttr):
783         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
784         (WebCore::InspectorInstrumentation::frameWindowDiscarded):
785         (WebCore::InspectorInstrumentation::mediaQueryResultChanged):
786         (WebCore::InspectorInstrumentation::didPushShadowRoot):
787         (WebCore::InspectorInstrumentation::willPopShadowRoot):
788         (WebCore::InspectorInstrumentation::didCreateNamedFlow):
789         (WebCore::InspectorInstrumentation::willRemoveNamedFlow):
790         (WebCore::InspectorInstrumentation::didChangeRegionOverset):
791         (WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
792         (WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
793         (WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
794         (WebCore::InspectorInstrumentation::handleTouchEvent):
795         (WebCore::InspectorInstrumentation::handleMousePress):
796         (WebCore::InspectorInstrumentation::forcePseudoState):
797         (WebCore::InspectorInstrumentation::characterDataModified):
798         (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
799         (WebCore::InspectorInstrumentation::didInstallTimer):
800         (WebCore::InspectorInstrumentation::didRemoveTimer):
801         (WebCore::InspectorInstrumentation::willCallFunction):
802         (WebCore::InspectorInstrumentation::didCallFunction):
803         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
804         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent):
805         (WebCore::InspectorInstrumentation::willDispatchEvent):
806         (WebCore::InspectorInstrumentation::didDispatchEvent):
807         (WebCore::InspectorInstrumentation::willHandleEvent):
808         (WebCore::InspectorInstrumentation::didHandleEvent):
809         (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
810         (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
811         (WebCore::InspectorInstrumentation::willEvaluateScript):
812         (WebCore::InspectorInstrumentation::didEvaluateScript):
813         (WebCore::InspectorInstrumentation::scriptsEnabled):
814         (WebCore::InspectorInstrumentation::willFireTimer):
815         (WebCore::InspectorInstrumentation::didFireTimer):
816         (WebCore::InspectorInstrumentation::didInvalidateLayout):
817         (WebCore::InspectorInstrumentation::willLayout):
818         (WebCore::InspectorInstrumentation::didLayout):
819         (WebCore::InspectorInstrumentation::didScroll):
820         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
821         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent):
822         (WebCore::InspectorInstrumentation::willPaint):
823         (WebCore::InspectorInstrumentation::didPaint):
824         (WebCore::InspectorInstrumentation::willScrollLayer):
825         (WebCore::InspectorInstrumentation::didScrollLayer):
826         (WebCore::InspectorInstrumentation::willRecalculateStyle):
827         (WebCore::InspectorInstrumentation::didRecalculateStyle):
828         (WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
829         (WebCore::InspectorInstrumentation::applyEmulatedMedia):
830         (WebCore::InspectorInstrumentation::willSendRequest):
831         (WebCore::InspectorInstrumentation::continueAfterPingLoader):
832         (WebCore::InspectorInstrumentation::markResourceAsCached):
833         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
834         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
835         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
836         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
837         (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
838         (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
839         (WebCore::InspectorInstrumentation::didReceiveData):
840         (WebCore::InspectorInstrumentation::didFinishLoading):
841         (WebCore::InspectorInstrumentation::didFailLoading):
842         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient):
843         (WebCore::InspectorInstrumentation::willLoadXHR):
844         (WebCore::InspectorInstrumentation::didFailXHRLoading):
845         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
846         (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
847         (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
848         (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
849         (WebCore::InspectorInstrumentation::scriptImported):
850         (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
851         (WebCore::InspectorInstrumentation::didReceiveScriptResponse):
852         (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
853         (WebCore::InspectorInstrumentation::loadEventFired):
854         (WebCore::InspectorInstrumentation::frameDetachedFromParent):
855         (WebCore::InspectorInstrumentation::didCommitLoad):
856         (WebCore::InspectorInstrumentation::frameDocumentUpdated):
857         (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
858         (WebCore::InspectorInstrumentation::frameStartedLoading):
859         (WebCore::InspectorInstrumentation::frameStoppedLoading):
860         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
861         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
862         (WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
863         (WebCore::InspectorInstrumentation::didRunJavaScriptDialog):
864         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
865         (WebCore::InspectorInstrumentation::willWriteHTML):
866         (WebCore::InspectorInstrumentation::didWriteHTML):
867         (WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
868         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
869         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
870         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
871         (WebCore::InspectorInstrumentation::didCreateWebSocket):
872         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
873         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
874         (WebCore::InspectorInstrumentation::didCloseWebSocket):
875         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
876         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
877         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
878         (WebCore::InspectorInstrumentation::sessionCreated):
879         (WebCore::InspectorInstrumentation::sessionLoaded):
880         (WebCore::InspectorInstrumentation::sessionModified):
881         (WebCore::InspectorInstrumentation::segmentCreated):
882         (WebCore::InspectorInstrumentation::segmentCompleted):
883         (WebCore::InspectorInstrumentation::segmentLoaded):
884         (WebCore::InspectorInstrumentation::segmentUnloaded):
885         (WebCore::InspectorInstrumentation::captureStarted):
886         (WebCore::InspectorInstrumentation::captureStopped):
887         (WebCore::InspectorInstrumentation::playbackStarted):
888         (WebCore::InspectorInstrumentation::playbackPaused):
889         (WebCore::InspectorInstrumentation::playbackFinished):
890         (WebCore::InspectorInstrumentation::playbackHitPosition):
891         (WebCore::InspectorInstrumentation::networkStateChanged):
892         (WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
893         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
894         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
895         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
896         (WebCore::InspectorInstrumentation::didFireAnimationFrame):
897         (WebCore::InspectorInstrumentation::layerTreeDidChange):
898         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
899         (WebCore::InspectorInstrumentation::pseudoElementDestroyed):
900         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
901         (WebCore::InspectorInstrumentation::hasFrontends): Deleted.
902         (WebCore::InspectorInstrumentation::consoleAgentEnabled): Deleted.
903         (WebCore::InspectorInstrumentation::runtimeAgentEnabled): Deleted.
904         (WebCore::InspectorInstrumentation::timelineAgentEnabled): Deleted.
905         (WebCore::InspectorInstrumentation::replayAgentEnabled): Deleted.
906         * inspector/InspectorLayerTreeAgent.cpp:
907         * inspector/InspectorLayerTreeAgent.h:
908         * inspector/InspectorOverlay.cpp:
909         * inspector/InspectorPageAgent.cpp:
910         * inspector/InspectorPageAgent.h:
911         * inspector/InspectorReplayAgent.cpp:
912         * inspector/InspectorReplayAgent.h:
913         * inspector/InspectorResourceAgent.cpp:
914         * inspector/InspectorResourceAgent.h:
915         * inspector/InspectorStyleSheet.cpp:
916         * inspector/InspectorStyleSheet.h:
917         * inspector/InspectorStyleTextEditor.cpp:
918         * inspector/InspectorStyleTextEditor.h:
919         * inspector/InspectorTimelineAgent.cpp:
920         * inspector/InspectorTimelineAgent.h:
921         * inspector/InspectorWorkerAgent.cpp:
922         * inspector/InspectorWorkerResource.h:
923         * inspector/InstrumentingAgents.cpp:
924         * inspector/NetworkResourcesData.cpp:
925         * inspector/NetworkResourcesData.h:
926         * inspector/PageConsoleAgent.cpp:
927         * inspector/PageConsoleAgent.h:
928         * inspector/PageDebuggerAgent.cpp:
929         * inspector/PageDebuggerAgent.h:
930         * inspector/PageRuntimeAgent.cpp:
931         * inspector/PageRuntimeAgent.h:
932         * inspector/PageScriptDebugServer.cpp:
933         * inspector/PageScriptDebugServer.h:
934         * inspector/TimelineRecordFactory.cpp:
935         * inspector/WebConsoleAgent.cpp:
936         * inspector/WebConsoleAgent.h:
937         * inspector/WebDebuggerAgent.cpp:
938         * inspector/WebDebuggerAgent.h:
939         * inspector/WebInjectedScriptHost.cpp:
940         * inspector/WebInjectedScriptHost.h:
941         * inspector/WebInjectedScriptManager.cpp:
942         * inspector/WebInjectedScriptManager.h:
943         * inspector/WorkerConsoleAgent.cpp:
944         * inspector/WorkerConsoleAgent.h:
945         * inspector/WorkerDebuggerAgent.cpp:
946         * inspector/WorkerDebuggerAgent.h:
947         * inspector/WorkerInspectorController.cpp:
948         * inspector/WorkerInspectorController.h:
949         * inspector/WorkerRuntimeAgent.cpp:
950         * inspector/WorkerRuntimeAgent.h:
951         * loader/DocumentThreadableLoader.cpp:
952         (WebCore::DocumentThreadableLoader::didReceiveResponse):
953         (WebCore::DocumentThreadableLoader::loadRequest):
954         * loader/FrameLoader.cpp:
955         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
956         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
957         * loader/appcache/ApplicationCacheGroup.cpp:
958         (WebCore::ApplicationCacheGroup::createResourceHandle):
959         (WebCore::ApplicationCacheGroup::didReceiveResponse):
960         * loader/appcache/ApplicationCacheHost.cpp:
961         (WebCore::ApplicationCacheHost::applicationCacheInfo):
962         * loader/appcache/ApplicationCacheHost.h:
963         * loader/cache/CachedResourceLoader.cpp:
964         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
965         * page/ContextMenuController.cpp:
966         (WebCore::ContextMenuController::showContextMenu):
967         (WebCore::ContextMenuController::contextMenuItemSelected):
968         (WebCore::ContextMenuController::populate):
969         (WebCore::ContextMenuController::addInspectElementItem):
970         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
971         * page/FrameView.cpp:
972         (WebCore::FrameView::sendResizeEventIfNeeded):
973         * page/Page.cpp:
974         (WebCore::Page::Page):
975         (WebCore::Page::~Page):
976         * page/Page.h:
977         * platform/ContextMenuItem.h:
978         * platform/efl/EflInspectorUtilities.cpp:
979         * platform/efl/EflInspectorUtilities.h:
980         * platform/network/ResourceRequestBase.h:
981         (WebCore::ResourceRequestBase::ResourceRequestBase):
982         * platform/network/cf/ResourceRequestCFNet.cpp:
983         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
984         * platform/network/cocoa/ResourceRequestCocoa.mm:
985         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
986         * testing/Internals.cpp:
987         (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend):
988         (WebCore::Internals::resetToConsistentState):
989         (WebCore::Internals::inspectorHighlightRects):
990         (WebCore::Internals::inspectorHighlightObject):
991         (WebCore::Internals::setInspectorIsUnderTest):
992         * testing/Internals.h:
993         * testing/Internals.idl:
994         * workers/WorkerGlobalScope.cpp:
995         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
996         * workers/WorkerGlobalScope.h:
997         * workers/WorkerGlobalScopeProxy.h:
998         * workers/WorkerMessagingProxy.cpp:
999         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
1000         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
1001         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
1002         * workers/WorkerMessagingProxy.h:
1003         * workers/WorkerReportingProxy.h:
1004         * workers/WorkerThread.cpp:
1005         (WebCore::WorkerThread::workerThread):
1006
1007 2015-01-20  Chris Dumez  <cdumez@apple.com>
1008
1009         Simplify DiagnosticLoggingClient call sites
1010         https://bugs.webkit.org/show_bug.cgi?id=140701
1011
1012         Reviewed by Andreas Kling.
1013
1014         Simplify DiagnosticLoggingClient call sites by:
1015         - Moving the Settings::diagnosticLoggingEnabled() check inside the
1016           MainFrame::diagnosticLoggingClient() getter.
1017         - Having MainFrame::diagnosticLoggingClient() return a reference
1018           instead of a pointer (returning a dummy client if necessary).
1019
1020         Otherwise, each call site needs to both check the setting and do a
1021         null-check on the client which is a bit annoying.
1022
1023         * history/PageCache.cpp:
1024         (WebCore::logPageCacheFailureDiagnosticMessage):
1025         (WebCore::logCanCacheFrameDecision):
1026         (WebCore::logCanCachePageDecision):
1027         * html/HTMLMediaElement.cpp:
1028         (WebCore::HTMLMediaElement::parseAttribute):
1029         * loader/EmptyClients.h:
1030         * loader/FrameLoader.cpp:
1031         (WebCore::logNavigation):
1032         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1033         * loader/SubframeLoader.cpp:
1034         (WebCore::logPluginRequest):
1035         * loader/SubresourceLoader.cpp:
1036         (WebCore::logResourceLoaded):
1037         * page/DiagnosticLoggingClient.h:
1038         (WebCore::DiagnosticLoggingClient::logDiagnosticMessage): Deleted.
1039         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithResult): Deleted.
1040         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithValue): Deleted.
1041         * page/MainFrame.cpp:
1042         (WebCore::MainFrame::diagnosticLoggingClient):
1043         * page/MainFrame.h:
1044
1045 2015-01-20  Joseph Pecoraro  <pecoraro@apple.com>
1046
1047         Web Inspector: Should show dynamic specificity values
1048         https://bugs.webkit.org/show_bug.cgi?id=140647
1049
1050         Reviewed by Benjamin Poulain.
1051
1052         Test: inspector/css/selector-dynamic-specificity.html
1053
1054         * inspector/InspectorCSSAgent.h:
1055         * inspector/InspectorCSSAgent.cpp:
1056         (WebCore::InspectorCSSAgent::setRuleSelector):
1057         (WebCore::InspectorCSSAgent::addRule):
1058         (WebCore::InspectorCSSAgent::buildObjectForRule):
1059         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1060         When building a response for a particular element, pass the element along.
1061
1062         * inspector/InspectorStyleSheet.h:
1063         * inspector/InspectorStyleSheet.cpp:
1064         (WebCore::hasDynamicSpecificity):
1065         (WebCore::buildObjectForSelectorHelper):
1066         (WebCore::selectorsFromSource):
1067         (WebCore::InspectorStyleSheet::buildObjectForSelector):
1068         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
1069         (WebCore::InspectorStyleSheet::buildObjectForRule):
1070         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
1071         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
1072         When building a response for a Selector, include the specificity if we know
1073         the element in context.
1074
1075 2015-01-20  Brent Fulgham  <bfulgham@apple.com>
1076
1077         [Win] Build fix after r178760.
1078
1079         Windows will not accept a variable as the size declaration for an array.
1080
1081         * svg/SVGToOTFFontConversion.cpp:
1082         (WebCore::SVGToOTFFontConverter::appendGSUBTable): Make size argument a const.
1083
1084 2015-01-20  Brent Fulgham  <bfulgham@apple.com>
1085
1086         [Win] Unreviewed Windows project file gardening.
1087
1088         * WebCore.vcxproj/WebCore.vcxproj: Add missing SVG files and put things in their proper
1089         folders.
1090         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1091
1092 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
1093
1094         URLFilterParser dismisses the last atom when parsing a builtin character class
1095         https://bugs.webkit.org/show_bug.cgi?id=140695
1096
1097         Reviewed by Andreas Kling.
1098
1099         The pending atom was not sunk before creating the new atom.
1100
1101         * contentextensions/URLFilterParser.cpp:
1102         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
1103
1104 2015-01-20  Andreas Kling  <akling@apple.com>
1105
1106         Fast path for casting JSValue to JSDocument*.
1107         <https://webkit.org/b/134655>
1108
1109         Add a custom JSType bit for JSDocument so we can quickly cast to it
1110         from JSValue in the DocumentPrototype functions. This removes a bunch
1111         of grunt work and branches from common functions like getElementById.
1112
1113         Also removed GetCastingHelperForBaseObject and replace it with
1114         simple jsCasts since we don't need dynamic type checks for the base.
1115
1116         Reviewed by Darin Adler.
1117
1118         * WebCore.xcodeproj/project.pbxproj:
1119         * bindings/js/JSDOMWrapper.h:
1120         * bindings/js/JSDocumentCustom.h:
1121         * bindings/scripts/CodeGeneratorJS.pm:
1122         (GenerateHeader):
1123         (GetCastingHelperForThisObject):
1124         (GenerateImplementation):
1125         (GetCastingHelperForBaseObject): Deleted.
1126         * dom/Document.idl:
1127
1128 2015-01-20  Commit Queue  <commit-queue@webkit.org>
1129
1130         Unreviewed, rolling out r178751.
1131         https://bugs.webkit.org/show_bug.cgi?id=140694
1132
1133         Caused 32-bit JSC test failures (Requested by JoePeck on
1134         #webkit).
1135
1136         Reverted changeset:
1137
1138         "put_by_val_direct need to check the property is index or not
1139         for using putDirect / putDirectIndex"
1140         https://bugs.webkit.org/show_bug.cgi?id=140426
1141         http://trac.webkit.org/changeset/178751
1142
1143 2015-01-20  Zalan Bujtas  <zalan@apple.com>
1144
1145         Simple line layout: Use FlowContents::Segment::text instead of renderer when possible.
1146         https://bugs.webkit.org/show_bug.cgi?id=140692
1147
1148         Reviewed by Myles C. Maxfield.
1149
1150         No change in functionality.
1151
1152         * rendering/SimpleLineLayoutResolver.cpp:
1153         (WebCore::SimpleLineLayout::RunResolver::Run::text):
1154
1155 2015-01-20  David Kilzer  <ddkilzer@apple.com>
1156
1157         Switch to comparing PLATFORM_NAME in terms of macosx
1158         <http://webkit.org/b/139516>
1159
1160         Reviewed by Timothy Hatcher.
1161
1162         * bindings/scripts/preprocessor.pm:
1163         (applyPreprocessor):
1164         * generate-export-file:
1165         (preprocessorMacros):
1166
1167 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
1168
1169         Attempt to fix 32bits builds after r178743
1170
1171         * contentextensions/ContentExtensionsBackend.cpp:
1172         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
1173
1174 2015-01-20  Yusuke Suzuki  <utatane.tea@gmail.com>
1175
1176         put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
1177         https://bugs.webkit.org/show_bug.cgi?id=140426
1178
1179         Reviewed by Geoffrey Garen.
1180
1181         Test: js/dfg-put-by-val-direct-with-edge-numbers.html
1182
1183         * bindings/js/JSDOMWindowCustom.cpp:
1184         (WebCore::JSDOMWindow::getOwnPropertySlot):
1185         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1186         (WebCore::callHTMLAllCollection):
1187         (WebCore::JSHTMLAllCollection::item):
1188         * bindings/scripts/CodeGeneratorJS.pm:
1189         (GenerateGetOwnPropertySlotBody):
1190         (GenerateImplementation):
1191         * bindings/scripts/test/JS/JSFloat64Array.cpp:
1192         (WebCore::JSFloat64Array::getOwnPropertySlot):
1193         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
1194         (WebCore::JSFloat64Array::put):
1195         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1196         (WebCore::JSTestEventTarget::getOwnPropertySlot):
1197         * bridge/runtime_array.cpp:
1198         (JSC::RuntimeArray::getOwnPropertySlot):
1199         (JSC::RuntimeArray::put):
1200
1201 2015-01-20  Chris Dumez  <cdumez@apple.com>
1202
1203         Drop width / height shorthands code from StylePropertyShorthand.*
1204         https://bugs.webkit.org/show_bug.cgi?id=140686
1205
1206         Reviewed by Andreas Kling.
1207
1208         Drop width / height shorthands code from StylePropertyShorthand.*.
1209         width / height are not shorthands for min-width/max-width and
1210         min-height/max-height. Also, only matchingCustomShorthandsForLonghand()
1211         treats these as shorthands. For e.g, the reverse method
1212         (indexOfShorthandForLonghand()) does not.
1213
1214         * css/StylePropertyShorthand.cpp:
1215         (WebCore::widthShorthand): Deleted.
1216         (WebCore::heightShorthand): Deleted.
1217         * css/StylePropertyShorthand.h:
1218         (WebCore::matchingCustomShorthandsForLonghand):
1219
1220 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
1221
1222         Add a mechanism to ignore previous content extension rules
1223         https://bugs.webkit.org/show_bug.cgi?id=140663
1224
1225         Reviewed by Andreas Kling.
1226
1227         * contentextensions/ContentExtensionRule.h:
1228         * contentextensions/ContentExtensionsBackend.cpp:
1229         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
1230         * contentextensions/ContentExtensionsManager.cpp:
1231         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
1232
1233 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
1234
1235         Resolve the epsilon transitions for each state upfront instead of dynamically
1236         https://bugs.webkit.org/show_bug.cgi?id=140654
1237
1238         Reviewed by Andreas Kling.
1239
1240         Instead of recomputing the epsilon-closure for each set, we compute the closure
1241         of every element at the beginning of the transformation.
1242
1243         We then remove the epsilon transitions from the NFA to simplify populateTransitions().
1244         The epsilon transitions are still there, but they are now in a separate graph we use
1245         in parallel.
1246
1247         * contentextensions/NFAToDFA.cpp:
1248         (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
1249         (WebCore::ContentExtensions::resolveEpsilonClosures):
1250         (WebCore::ContentExtensions::extendSetWithClosure):
1251         (WebCore::ContentExtensions::populateTransitions):
1252         (WebCore::ContentExtensions::NFAToDFA::convert):
1253         (WebCore::ContentExtensions::epsilonClosure): Deleted.
1254         (WebCore::ContentExtensions::populateTransitionsExcludingEpsilon): Deleted.
1255         * contentextensions/NFAToDFA.h:
1256
1257 2015-01-20  Chris Dumez  <cdumez@apple.com>
1258
1259         Log types of resources being loaded using DiagnosticLoggingClient
1260         https://bugs.webkit.org/show_bug.cgi?id=140682
1261
1262         Reviewed by Andreas Kling.
1263
1264         Log types of resources being loaded using DiagnosticLoggingClient
1265         instead of the legacy FeatureCounter.
1266
1267         * loader/SubresourceLoader.cpp:
1268         (WebCore::logResourceLoaded):
1269         (WebCore::SubresourceLoader::didFinishLoading):
1270         (WebCore::logResourceLoadedUsingFeatureCounter): Deleted.
1271         * page/DiagnosticLoggingKeys.cpp:
1272         (WebCore::DiagnosticLoggingKeys::otherKey):
1273         (WebCore::DiagnosticLoggingKeys::mainResourceKey):
1274         (WebCore::DiagnosticLoggingKeys::loadedKey):
1275         (WebCore::DiagnosticLoggingKeys::imageKey):
1276         (WebCore::DiagnosticLoggingKeys::rawKey):
1277         (WebCore::DiagnosticLoggingKeys::resourceKey):
1278         (WebCore::DiagnosticLoggingKeys::scriptKey):
1279         (WebCore::DiagnosticLoggingKeys::styleSheetKey):
1280         (WebCore::DiagnosticLoggingKeys::svgDocumentKey):
1281         (WebCore::DiagnosticLoggingKeys::fontKey):
1282         * page/DiagnosticLoggingKeys.h:
1283         * platform/FeatureCounterKeys.h:
1284
1285 2015-01-20  Zalan Bujtas  <zalan@apple.com>
1286
1287         Simple line layout: Remove redundant style.preserveNewline check when collapsing trailing whitespace.
1288         https://bugs.webkit.org/show_bug.cgi?id=140684
1289
1290         Reviewed by Antti Koivisto.
1291
1292         FlowContents::isLineBreak() checks whether we are at a hard newline.
1293
1294         No change in functionality.
1295
1296         * rendering/SimpleLineLayout.cpp:
1297         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
1298
1299 2015-01-19  Simon Fraser  <simon.fraser@apple.com>
1300
1301         Add a way to collect scrolling performance data (viewport tile coverage) with UI-side compositing
1302         https://bugs.webkit.org/show_bug.cgi?id=140474
1303
1304         Reviewed by Tim Horton.
1305
1306         Add accessors for standard names for container CALayer for each of the tile grids,
1307         and when tile grids are swapped, update those names as appropriate.
1308         
1309         * WebCore.exp.in:
1310         * platform/graphics/ca/TileController.cpp:
1311         (WebCore::TileController::tileGridContainerLayerName):
1312         (WebCore::TileController::zoomedOutTileGridContainerLayerName):
1313         (WebCore::TileController::setContentsScale):
1314         * platform/graphics/ca/TileController.h:
1315         * platform/graphics/ca/TileGrid.cpp:
1316         (WebCore::TileGrid::TileGrid):
1317         (WebCore::TileGrid::setIsZoomedOutTileGrid):
1318         * platform/graphics/ca/TileGrid.h:
1319
1320 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1321
1322         Fix unused-private-field warning in IconEfl.cpp
1323         https://bugs.webkit.org/show_bug.cgi?id=140676
1324
1325         Reviewed by Darin Adler.
1326
1327         * platform/graphics/Icon.h:
1328         * platform/graphics/efl/IconEfl.cpp:
1329         (WebCore::Icon::Icon): Deleted.
1330
1331 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1332
1333         Fix unused-private-field warning in FontCustomPlatformDataFreeType.cpp
1334         https://bugs.webkit.org/show_bug.cgi?id=140677
1335
1336         Reviewed by Martin Robinson.
1337
1338         * platform/graphics/cairo/FontCustomPlatformData.h:
1339         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1340         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1341         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1342
1343 2015-01-20  peavo@outlook.com  <peavo@outlook.com>
1344
1345         Plugin content not loaded.
1346         https://bugs.webkit.org/show_bug.cgi?id=140672
1347
1348         Reviewed by Brent Fulgham.
1349
1350         It seems this is caused by a std::unique_ptr in CClass::methodNamed being moved,
1351         resetting its raw pointer. The raw pointer, which now is null, is then returned
1352         from the method.
1353
1354         * bridge/c/c_class.cpp:
1355         (JSC::Bindings::CClass::methodNamed):
1356         (JSC::Bindings::CClass::fieldNamed):
1357
1358 2015-01-20  Darin Adler  <darin@apple.com>
1359
1360         Remove SVGElementInstanceList, m_instanceUnderMouse, DUMP_INSTANCE_TREE, DUMP_SHADOW_TREE
1361         https://bugs.webkit.org/show_bug.cgi?id=140679
1362
1363         Reviewed by Anders Carlsson.
1364
1365         First step in removing the SVG instance tree.
1366         All based on redoing the same excellent work Rob Buis did to remove this in Blink in crbug.com/313438.
1367
1368         * CMakeLists.txt: Removed the source files.
1369         * DerivedSources.cpp: Ditto.
1370         * DerivedSources.make: Ditto.
1371         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1372         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1373         * WebCore.xcodeproj/project.pbxproj: Ditto.
1374
1375         * page/EventHandler.cpp:
1376         (WebCore::EventHandler::clear): Removed code to set unused m_instanceUnderMouse.
1377         (WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
1378         * page/EventHandler.h: Removed m_instanceUnderMouse.
1379
1380         * svg/SVGAllInOne.cpp: Removed the source files.
1381         * svg/SVGElementInstance.cpp:
1382         (WebCore::SVGElementInstance::childNodes): Deleted.
1383         * svg/SVGElementInstance.h: Removed childNodes.
1384         * svg/SVGElementInstance.idl: Ditto.
1385         * svg/SVGElementInstanceList.cpp: Removed.
1386         * svg/SVGElementInstanceList.h: Removed.
1387         * svg/SVGElementInstanceList.idl: Removed.
1388         * svg/SVGUseElement.cpp:
1389         (WebCore::dumpInstanceTree): Deleted.
1390         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Removed DUMP_INSTANCE_TREE and
1391         DUMP_SHADOW_TREE code.
1392
1393 2015-01-19  Brian J. Burg  <burg@cs.washington.edu>
1394
1395         Web Replay: code generator should take supplemental specifications and allow cross-framework references
1396         https://bugs.webkit.org/show_bug.cgi?id=136312
1397
1398         Reviewed by Joseph Pecoraro.
1399
1400         Changes covered by existing input generator tests.
1401
1402         * DerivedSources.make: Add JSInputs.json as supplemental specification.
1403         * replay/WebInputs.json: Moved common types to JSInputs.json.
1404
1405 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1406
1407         Fix unused-const-variable warning in RenderLayerCompositor.cpp
1408         https://bugs.webkit.org/show_bug.cgi?id=140678
1409
1410         Reviewed by Simon Fraser.
1411
1412         * rendering/RenderLayerCompositor.cpp:
1413
1414 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1415
1416         [gstreamer] Fix expression result unused warning in GRefPtrGStreamer.cpp
1417         https://bugs.webkit.org/show_bug.cgi?id=140671
1418
1419         Reviewed by Philippe Normand.
1420
1421         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1422         (WTF::refGPtr<GstToc>):
1423
1424 2015-01-19  Dean Jackson  <dino@apple.com>
1425
1426         Support "plus-darker" in mix-blend mode
1427         https://bugs.webkit.org/show_bug.cgi?id=140646
1428         <rdar://problem/19523370>
1429
1430         Reviewed by Simon Fraser.
1431
1432         Support the "plus-darker" blending mode to CSS.
1433         See: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html
1434
1435         Test: css3/blending/svg-blend-plus-darker.html
1436
1437         * css/CSSParser.cpp:
1438         (WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept
1439         the new keyword.
1440         * css/CSSPrimitiveValueMappings.h: Add the mappings.
1441         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1442         (WebCore::CSSPrimitiveValue::operator BlendMode):
1443         * platform/graphics/GraphicsTypes.cpp: Add the new GraphicsType.
1444         * platform/graphics/GraphicsTypes.h:
1445         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA compositing filter.
1446         (PlatformCAFilters::setBlendingFiltersOnLayer):
1447         * platform/graphics/cg/GraphicsContextCG.cpp:
1448         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG blending flag.
1449
1450 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1451
1452         Fix 'register' storage class specifier is deprecated warning
1453         https://bugs.webkit.org/show_bug.cgi?id=140669
1454
1455         Reviewed by Carlos Garcia Campos.
1456
1457         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1458         (webKitWebAudioSrcLoop):
1459
1460 2015-01-20  Chris Dumez  <cdumez@apple.com>
1461
1462         Use DiagnosticLoggingClient to log page cache failures
1463         https://bugs.webkit.org/show_bug.cgi?id=140650
1464
1465         Reviewed by Andreas Kling.
1466
1467         Use DiagnosticLoggingClient to log page cache failures instead of the
1468         legacy FeatureCounter.
1469
1470         * history/PageCache.cpp:
1471         (WebCore::logPageCacheFailureDiagnosticMessage):
1472         (WebCore::logCanCacheFrameDecision):
1473         (WebCore::logCanCachePageDecision):
1474         (WebCore::PageCache::canCache):
1475         (WebCore::pruningReasonToDiagnosticLoggingKey):
1476         (WebCore::PageCache::take):
1477         (WebCore::PageCache::get):
1478         (WebCore::pruningReasonToFeatureCounterKey): Deleted.
1479         * page/DiagnosticLoggingKeys.cpp:
1480         (WebCore::DiagnosticLoggingKeys::successKey):
1481         (WebCore::DiagnosticLoggingKeys::failureKey):
1482         (WebCore::DiagnosticLoggingKeys::pageLoadedKey):
1483         (WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
1484         (WebCore::DiagnosticLoggingKeys::navigationKey):
1485         (WebCore::DiagnosticLoggingKeys::pageCacheKey):
1486         (WebCore::DiagnosticLoggingKeys::noDocumentLoaderKey):
1487         (WebCore::DiagnosticLoggingKeys::mainDocumentErrorKey):
1488         (WebCore::DiagnosticLoggingKeys::isErrorPageKey):
1489         (WebCore::DiagnosticLoggingKeys::hasPluginsKey):
1490         (WebCore::DiagnosticLoggingKeys::httpsNoStoreKey):
1491         (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey):
1492         (WebCore::DiagnosticLoggingKeys::noCurrentHistoryItemKey):
1493         (WebCore::DiagnosticLoggingKeys::quirkRedirectComingKey):
1494         (WebCore::DiagnosticLoggingKeys::loadingAPISenseKey):
1495         (WebCore::DiagnosticLoggingKeys::documentLoaderStoppingKey):
1496         (WebCore::DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey):
1497         (WebCore::DiagnosticLoggingKeys::applicationCacheKey):
1498         (WebCore::DiagnosticLoggingKeys::deniedByClientKey):
1499         (WebCore::DiagnosticLoggingKeys::deviceMotionKey):
1500         (WebCore::DiagnosticLoggingKeys::deviceOrientationKey):
1501         (WebCore::DiagnosticLoggingKeys::deviceProximityKey):
1502         (WebCore::DiagnosticLoggingKeys::reloadKey):
1503         (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey):
1504         (WebCore::DiagnosticLoggingKeys::sameLoadKey):
1505         (WebCore::DiagnosticLoggingKeys::expiredKey):
1506         (WebCore::DiagnosticLoggingKeys::prunedDueToMemoryPressureKey):
1507         (WebCore::DiagnosticLoggingKeys::prunedDueToCapacityReached):
1508         (WebCore::DiagnosticLoggingKeys::prunedDueToProcessSuspended):
1509         (WebCore::DiagnosticLoggingKeys::passKey): Deleted.
1510         (WebCore::DiagnosticLoggingKeys::failKey): Deleted.
1511         (WebCore::DiagnosticLoggingKeys::noopKey): Deleted.
1512         * page/DiagnosticLoggingKeys.h:
1513         * platform/FeatureCounterKeys.h:
1514
1515 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
1516
1517         [CSS Grid Layout] Wrong arguments passed to computeNormalizedFractionBreadth
1518         https://bugs.webkit.org/show_bug.cgi?id=139058
1519
1520         Reviewed by Andreas Kling.
1521
1522         The method RenderGrid::computeNormalizedFractionBreadth() is
1523         supposed to get as fourth argument either the grid element's
1524         content box size or the max-size of a particular grid item. For
1525         the former we were incorrectly passing the free space after
1526         distributing the available space to tracks.
1527
1528         Apart from that, that method has a bug in its implementation. As
1529         we were using the free space instead of the grid element's content
1530         box size, we didn't have to subtract the usedBreadth of grid
1531         tracks from the passed in value. That did not work for the case of
1532         the caller passing the max-size of a particular item.
1533
1534         * rendering/RenderGrid.cpp:
1535         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1536         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
1537
1538 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
1539
1540         [SVG -> OTF Converter] Flip the switch on
1541         https://bugs.webkit.org/show_bug.cgi?id=140592
1542
1543         Reviewed by Antti Koivisto.
1544
1545         * Configurations/FeatureDefines.xcconfig:
1546
1547 2015-01-19  Commit Queue  <commit-queue@webkit.org>
1548
1549         Unreviewed, rolling out r178683.
1550         https://bugs.webkit.org/show_bug.cgi?id=140657
1551
1552         Lots of asserts in tests. (Requested by JoePeck on #webkit).
1553
1554         Reverted changeset:
1555
1556         "LayoutState and subtree layout code should use
1557         RenderElement."
1558         https://bugs.webkit.org/show_bug.cgi?id=126878
1559         http://trac.webkit.org/changeset/178683
1560
1561 2015-01-19  Brent Fulgham  <bfulgham@apple.com>
1562
1563         [Win] Unreviewed gardening.
1564
1565         Avoid compiling files twice when they are included in an 'AllInOne.cpp' file.
1566
1567         * WebCore.vcxproj/WebCore.vcxproj: Mark several files as 'not to be built', since
1568         they are also build as part of an 'AllInOne.cpp' file.
1569
1570 2015-01-19  Chris Dumez  <cdumez@apple.com>
1571
1572         Stop using FeatureCounter to log navigation types
1573         https://bugs.webkit.org/show_bug.cgi?id=140642
1574
1575         Reviewed by Andreas Kling.
1576
1577         Stop using FeatureCounter to log navigation types now that
1578         DiagnosticLoggingClient is working on iOS.
1579
1580         * loader/FrameLoader.cpp:
1581         (WebCore::logNavigation):
1582         * platform/FeatureCounterKeys.h:
1583
1584 2015-01-19  Andreas Kling  <akling@apple.com>
1585
1586         LayoutState and subtree layout code should use RenderElement.
1587         <https://webkit.org/b/126878>
1588
1589         Subtree layout will never begin at a RenderText, so tighten up
1590         the code to operate on RenderElements instead of RenderObjects.
1591
1592         Reviewed by Antti Koivisto.
1593
1594         * inspector/InspectorTimelineAgent.cpp:
1595         (WebCore::InspectorTimelineAgent::willLayout):
1596         * page/FrameView.cpp:
1597         (WebCore::FrameView::layoutRoot):
1598         (WebCore::FrameView::layout):
1599         * page/FrameView.h:
1600
1601             Make FrameView::layoutRoot() return RenderElement*.
1602
1603         * rendering/RenderElement.cpp:
1604         (WebCore::RenderElement::willBeDestroyed):
1605         * rendering/RenderObject.cpp:
1606         (WebCore::RenderObject::willBeDestroyed):
1607         * rendering/RenderObject.h:
1608
1609             Move subtree layout root clearing logic in willBeDestroyed()
1610             from RenderObject to RenderElement.
1611
1612         * rendering/LayoutState.cpp:
1613         (WebCore::LayoutState::LayoutState):
1614         * rendering/LayoutState.h:
1615         * rendering/RenderView.h:
1616         * rendering/RenderView.cpp:
1617         (WebCore::RenderView::pushLayoutState):
1618         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
1619
1620             Make all of these functions take RenderElement instead of
1621             RenderObject since layout never starts from a RenderText.
1622
1623         (WebCore::RenderView::shouldDisableLayoutStateForSubtree):
1624
1625             Tweak loop since it's never null on first iteration.
1626
1627 2015-01-19  Beth Dakin  <bdakin@apple.com>
1628
1629         Speculative build fix.
1630
1631         * platform/spi/mac/NSViewSPI.h:
1632
1633 2015-01-19  Timothy Horton  <timothy_horton@apple.com>
1634
1635         Adjust naming of action menu SPI
1636         https://bugs.webkit.org/show_bug.cgi?id=140644
1637         <rdar://problem/19448129>
1638
1639         Reviewed by Brian Weinstein.
1640
1641         * platform/spi/mac/NSViewSPI.h:
1642         Add an underscore.
1643
1644 2015-01-19  Dhi Aurrahman  <diorahman@rockybars.com>
1645
1646         Canonicalization of :lang() should preserve the :lang()'s arguments representations
1647         https://bugs.webkit.org/show_bug.cgi?id=139928
1648
1649         Reviewed by Benjamin Poulain.
1650
1651         Preserve the representation of IDENT and STRING when serializing the
1652         :lang(). For example, :lang(foo,"bar", baz) should be serialize as
1653         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
1654     
1655         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
1656         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
1657         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList
1658         respectively, since those methods are being exclusively used in respect
1659         with :lang().
1660
1661         Update the test of serializing :lang() with IDENT and STRING arguments.
1662
1663         * css/CSSGrammar.y.in:
1664         * css/CSSParserValues.cpp:
1665         (WebCore::CSSParserSelector::setLangArgumentList):
1666         (WebCore::CSSParserSelector::setArgumentList): Deleted.
1667         * css/CSSParserValues.h:
1668         (WebCore::CSSParserString::tokenType):
1669         (WebCore::CSSParserString::setTokenType):
1670         * css/CSSSelector.cpp:
1671         (WebCore::appendLangArgumentList):
1672         (WebCore::CSSSelector::selectorText):
1673         (WebCore::CSSSelector::setLangArgumentList):
1674         (WebCore::appendArgumentList): Deleted.
1675         (WebCore::CSSSelector::setArgumentList): Deleted.
1676         * css/CSSSelector.h:
1677         (WebCore::CSSSelector::langArgumentList):
1678         (WebCore::CSSSelector::argumentList): Deleted.
1679         * css/SelectorChecker.cpp:
1680         (WebCore::SelectorChecker::checkOne):
1681         * css/SelectorCheckerTestFunctions.h:
1682         (WebCore::matchesLangPseudoClass):
1683
1684 2015-01-16  Roger Fong  <roger_fong@apple.com>
1685
1686         WebGL2: Support webgl2 context creation.
1687         https://bugs.webkit.org/show_bug.cgi?id=126408
1688         <rdar://problem/15002170>
1689
1690         Reviewed by Dean Jackson.
1691
1692         Tests covered by existing Khronos tests for WebGL 1.0 conformance.
1693
1694         Create a WebGLRenderingContextBase class that extends to a WebGLRenderingContext and WebGL2RenderingContext.
1695         Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
1696         As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
1697
1698         * CMakeLists.txt:
1699         * DerivedSources.cpp:
1700         * DerivedSources.make:
1701         * WebCore.vcxproj/WebCore.vcxproj:
1702         * WebCore.vcxproj/WebCore.vcxproj.filters:
1703         * WebCore.xcodeproj/project.pbxproj:
1704         * bindings/js/JSBindingsAllInOne.cpp:
1705         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1706         (WebCore::toJS):
1707         * bindings/js/JSDocumentCustom.cpp:
1708         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1709         * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
1710         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
1711         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
1712         * bindings/js/JSWebGLRenderingContextCustom.cpp: Move code to JSWebGLRenderingContextBaseCustom.cpp.
1713         * bindings/scripts/CodeGeneratorJS.pm:
1714         (GenerateImplementation):
1715         * html/HTMLCanvasElement.cpp:
1716         (WebCore::HTMLCanvasElement::getContext):
1717         (WebCore::HTMLCanvasElement::reset):
1718         (WebCore::HTMLCanvasElement::paint):
1719         (WebCore::HTMLCanvasElement::getImageData):
1720         * html/canvas/ANGLEInstancedArrays.cpp:
1721         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
1722         (WebCore::ANGLEInstancedArrays::supported):
1723         * html/canvas/ANGLEInstancedArrays.h:
1724         * html/canvas/CanvasRenderingContext.h:
1725         (WebCore::CanvasRenderingContext::isWebGL1):
1726         (WebCore::CanvasRenderingContext::isWebGL2):
1727         (WebCore::CanvasRenderingContext::is3d):
1728         * html/canvas/EXTBlendMinMax.cpp:
1729         (WebCore::EXTBlendMinMax::EXTBlendMinMax):
1730         * html/canvas/EXTBlendMinMax.h:
1731         * html/canvas/EXTFragDepth.cpp:
1732         (WebCore::EXTFragDepth::EXTFragDepth):
1733         * html/canvas/EXTFragDepth.h:
1734         * html/canvas/EXTShaderTextureLOD.cpp:
1735         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
1736         * html/canvas/EXTShaderTextureLOD.h:
1737         * html/canvas/EXTTextureFilterAnisotropic.cpp:
1738         (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
1739         * html/canvas/EXTTextureFilterAnisotropic.h:
1740         * html/canvas/EXTsRGB.cpp:
1741         (WebCore::EXTsRGB::EXTsRGB):
1742         * html/canvas/EXTsRGB.h:
1743         * html/canvas/OESElementIndexUint.cpp:
1744         (WebCore::OESElementIndexUint::OESElementIndexUint):
1745         * html/canvas/OESElementIndexUint.h:
1746         * html/canvas/OESStandardDerivatives.cpp:
1747         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
1748         * html/canvas/OESStandardDerivatives.h:
1749         * html/canvas/OESTextureFloat.cpp:
1750         (WebCore::OESTextureFloat::OESTextureFloat):
1751         * html/canvas/OESTextureFloat.h:
1752         * html/canvas/OESTextureFloatLinear.cpp:
1753         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
1754         * html/canvas/OESTextureFloatLinear.h:
1755         * html/canvas/OESTextureHalfFloat.cpp:
1756         (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
1757         * html/canvas/OESTextureHalfFloat.h:
1758         * html/canvas/OESTextureHalfFloatLinear.cpp:
1759         (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
1760         * html/canvas/OESTextureHalfFloatLinear.h:
1761         * html/canvas/OESVertexArrayObject.cpp:
1762         (WebCore::OESVertexArrayObject::OESVertexArrayObject):
1763         * html/canvas/OESVertexArrayObject.h:
1764         * html/canvas/WebGL2RenderingContext.cpp: Added.
1765         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
1766         * html/canvas/WebGL2RenderingContext.h: Added.
1767         * html/canvas/WebGL2RenderingContext.idl: Added.
1768         * html/canvas/WebGLBuffer.cpp:
1769         (WebCore::WebGLBuffer::create):
1770         (WebCore::WebGLBuffer::WebGLBuffer):
1771         * html/canvas/WebGLBuffer.h:
1772         * html/canvas/WebGLCompressedTextureATC.cpp:
1773         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
1774         (WebCore::WebGLCompressedTextureATC::supported):
1775         * html/canvas/WebGLCompressedTextureATC.h:
1776         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
1777         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
1778         (WebCore::WebGLCompressedTexturePVRTC::supported):
1779         * html/canvas/WebGLCompressedTexturePVRTC.h:
1780         * html/canvas/WebGLCompressedTextureS3TC.cpp:
1781         (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
1782         (WebCore::WebGLCompressedTextureS3TC::supported):
1783         * html/canvas/WebGLCompressedTextureS3TC.h:
1784         * html/canvas/WebGLContextGroup.cpp:
1785         (WebCore::WebGLContextGroup::getAGraphicsContext3D):
1786         (WebCore::WebGLContextGroup::addContext):
1787         (WebCore::WebGLContextGroup::removeContext):
1788         (WebCore::WebGLContextGroup::loseContextGroup):
1789         * html/canvas/WebGLContextGroup.h:
1790         * html/canvas/WebGLContextObject.cpp:
1791         (WebCore::WebGLContextObject::WebGLContextObject):
1792         * html/canvas/WebGLContextObject.h:
1793         (WebCore::WebGLContextObject::context):
1794         * html/canvas/WebGLDebugRendererInfo.cpp:
1795         (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
1796         * html/canvas/WebGLDebugRendererInfo.h:
1797         * html/canvas/WebGLDebugShaders.cpp:
1798         (WebCore::WebGLDebugShaders::WebGLDebugShaders):
1799         * html/canvas/WebGLDebugShaders.h:
1800         * html/canvas/WebGLDepthTexture.cpp:
1801         (WebCore::WebGLDepthTexture::WebGLDepthTexture):
1802         * html/canvas/WebGLDepthTexture.h:
1803         * html/canvas/WebGLDrawBuffers.cpp:
1804         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
1805         (WebCore::WebGLDrawBuffers::supported):
1806         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
1807         * html/canvas/WebGLDrawBuffers.h:
1808         * html/canvas/WebGLExtension.cpp:
1809         (WebCore::WebGLExtension::WebGLExtension):
1810         * html/canvas/WebGLExtension.h:
1811         (WebCore::WebGLExtension::context):
1812         * html/canvas/WebGLFramebuffer.cpp:
1813         (WebCore::WebGLFramebuffer::create):
1814         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
1815         * html/canvas/WebGLFramebuffer.h:
1816         * html/canvas/WebGLLoseContext.cpp:
1817         (WebCore::WebGLLoseContext::WebGLLoseContext):
1818         (WebCore::WebGLLoseContext::loseContext):
1819         * html/canvas/WebGLLoseContext.h:
1820         * html/canvas/WebGLObject.cpp:
1821         (WebCore::WebGLObject::WebGLObject):
1822         * html/canvas/WebGLObject.h:
1823         * html/canvas/WebGLProgram.cpp:
1824         (WebCore::WebGLProgram::create):
1825         (WebCore::WebGLProgram::WebGLProgram):
1826         * html/canvas/WebGLProgram.h:
1827         * html/canvas/WebGLRenderbuffer.cpp:
1828         (WebCore::WebGLRenderbuffer::create):
1829         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
1830         * html/canvas/WebGLRenderbuffer.h:
1831         * html/canvas/WebGLRenderingContext.cpp: Move implementation to WebGLRenderingContextBase.cpp.
1832         * html/canvas/WebGLRenderingContext.h:  Move implementation to WebGLRenderingContextBase.h.
1833         * html/canvas/WebGLRenderingContext.idl:  Move implementation to WebGLRenderingContextBase.idl.
1834         * html/canvas/WebGLRenderingContextBase.cpp: Added.
1835         * html/canvas/WebGLRenderingContextBase.h: Added.
1836         * html/canvas/WebGLRenderingContextBase.idl: Added.
1837         * html/canvas/WebGLShader.cpp:
1838         (WebCore::WebGLShader::create):
1839         (WebCore::WebGLShader::WebGLShader):
1840         * html/canvas/WebGLShader.h:
1841         * html/canvas/WebGLSharedObject.cpp:
1842         (WebCore::WebGLSharedObject::WebGLSharedObject):
1843         * html/canvas/WebGLSharedObject.h:
1844         * html/canvas/WebGLTexture.cpp:
1845         (WebCore::WebGLTexture::create):
1846         (WebCore::WebGLTexture::WebGLTexture):
1847         * html/canvas/WebGLTexture.h:
1848         * html/canvas/WebGLVertexArrayObjectOES.cpp:
1849         (WebCore::WebGLVertexArrayObjectOES::create):
1850         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
1851         * html/canvas/WebGLVertexArrayObjectOES.h:
1852
1853 2015-01-19  Antti Koivisto  <antti@apple.com>
1854
1855         REGRESSION(r178250): ~2% PLT regression
1856         https://bugs.webkit.org/show_bug.cgi?id=140640
1857
1858         Reviewed by Andreas Kling.
1859
1860         * platform/graphics/FontCache.cpp:
1861
1862         The patch accidentally contained a change to reduce the size of the cache (to verify that purgin works).
1863         Restore it back to the original value.
1864
1865 2015-01-19  peavo@outlook.com  <peavo@outlook.com>
1866
1867         [WinCairo][Video] Windows Media Foundation implementation is not completed.
1868         https://bugs.webkit.org/show_bug.cgi?id=140337
1869
1870         Reviewed by Alex Christensen.
1871
1872         This patch aims to complete some of the methods which are not implemented.
1873         Currently, only MP4 is supported.
1874         Video is rendered in a child window of the main window.
1875         We should eventually render the video directly in the main window,
1876         by reading and painting individual video frames from the stream.
1877
1878         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1879         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
1880         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
1881         (WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
1882         (WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
1883         (WebCore::MediaPlayerPrivateMediaFoundation::load):
1884         (WebCore::MediaPlayerPrivateMediaFoundation::play):
1885         (WebCore::MediaPlayerPrivateMediaFoundation::pause):
1886         (WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
1887         (WebCore::MediaPlayerPrivateMediaFoundation::hasVideo):
1888         (WebCore::MediaPlayerPrivateMediaFoundation::hasAudio):
1889         (WebCore::MediaPlayerPrivateMediaFoundation::setVisible):
1890         (WebCore::MediaPlayerPrivateMediaFoundation::paused):
1891         (WebCore::MediaPlayerPrivateMediaFoundation::readyState):
1892         (WebCore::MediaPlayerPrivateMediaFoundation::didLoadingProgress):
1893         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
1894         (WebCore::MediaPlayerPrivateMediaFoundation::paint):
1895         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
1896         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
1897         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
1898         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
1899         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
1900         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
1901         (WebCore::MediaPlayerPrivateMediaFoundation::addBranchToPartialTopology):
1902         (WebCore::MediaPlayerPrivateMediaFoundation::VideoViewWndProc):
1903         (WebCore::MediaPlayerPrivateMediaFoundation::registerVideoWindowClass):
1904         (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
1905         (WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow):
1906         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
1907         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
1908         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource):
1909         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
1910         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
1911         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
1912         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::QueryInterface):
1913         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AddRef):
1914         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Release):
1915         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::GetParameters):
1916         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
1917         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1918
1919 2015-01-19  Brian J. Burg  <burg@cs.washington.edu>
1920
1921         Web Replay: convert to is<T> and downcast<T> for decoding replay inputs
1922         https://bugs.webkit.org/show_bug.cgi?id=140512
1923
1924         Reviewed by Chris Dumez.
1925
1926         No new tests, no behavior changed.
1927
1928         * replay/EventLoopInput.h: Make overridden methods public.
1929         * replay/MemoizedDOMResult.h: Add type trait specialization here. It is
1930         special-cased because the input type parameter doesn't work with macros.
1931         * replay/SerializationMethods.cpp:
1932         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
1933         Use is() and downcast() when dispatching to encoders based on type.
1934
1935 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
1936
1937         Replace use of WTF::bind() in MemoryPressureHandlerLinux.cpp with a C++ lambda
1938         https://bugs.webkit.org/show_bug.cgi?id=140614
1939
1940         Reviewed by Carlos Garcia Campos.
1941
1942         Use a C++ lambda instead of WTF::bind() in the MemoryPressureHandler
1943         implementation for Linux.
1944
1945         * platform/linux/MemoryPressureHandlerLinux.cpp:
1946         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
1947
1948 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
1949
1950         Replace uses of WTF::bind() in MockMediaPlayerMediaSource with C++ lambdas
1951         https://bugs.webkit.org/show_bug.cgi?id=140612
1952
1953         Reviewed by Philippe Normand.
1954
1955         Use C++ lambdas in place of WTF::bind() in the MockMediaPlayerMediaSource class.
1956
1957         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1958         (WebCore::MockMediaPlayerMediaSource::play):
1959         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
1960         (WebCore::MockMediaPlayerMediaSource::seekCompleted):
1961
1962 2015-01-19  Commit Queue  <commit-queue@webkit.org>
1963
1964         Unreviewed, rolling out r178653.
1965         https://bugs.webkit.org/show_bug.cgi?id=140634
1966
1967         Broke multiple SVG tests on Mountain Lion (Requested by ap on
1968         #webkit).
1969
1970         Reverted changeset:
1971
1972         "[SVG -> OTF Converter] Flip the switch on"
1973         https://bugs.webkit.org/show_bug.cgi?id=140592
1974         http://trac.webkit.org/changeset/178653
1975
1976 2015-01-19  Brent Fulgham  <bfulgham@apple.com>
1977
1978         Layers need to be already updated before we call adjustViewSize
1979         https://bugs.webkit.org/show_bug.cgi?id=135514
1980
1981         Reviewed by Simon Fraser.
1982
1983         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
1984
1985         Defer painting operations until we have finished layout. This
1986         has a couple of benefits:
1987         (1) We do not attempt to modify render layers during layout.
1988         (2) In WK1 we do not attempt to paint during layout.
1989
1990         Add a new virtual predicate to ScrollView indicating when we are in
1991         layout so that calls to setContentsSize do not attempt
1992         to adjust scrollbars.
1993
1994         Modify FrameView to set its ScrollView state to block paint
1995         operations during layout. Also add a post-layout handler to
1996         complete the scrollbar updates after layout is finished.
1997
1998         * WebCore.exp.in: Move linker symbol to ScrollView (from FrameView).
1999         * page/FrameView.cpp:
2000         (WebCore::FrameView::layout):
2001         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
2002         (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Removed (Renamed).
2003         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added (Renamed)
2004         (WebCore::FrameView::paintContents): Do not paint if we are inside view size adjustment.
2005         * page/FrameView.h:
2006         * platform/ScrollView.cpp:
2007         (WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Added. Checks whether we need to defer
2008         painting, and calls virtual scrollPositionChangedViaPlatformWidgetImpl if we do not.
2009         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added.
2010         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
2011         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
2012         the scroll delta and apply it after the layout is complete.
2013         (WebCore::ScrollView::completeUpdatesAfterScrollTo): Split off part of 'scrollTo' into its own method
2014         so we can reuse it in handleDeferredScrollUpdateAfterContentSizeChange.
2015         * platform/ScrollView.h:
2016         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
2017
2018 2015-01-16  Ada Chan  <adachan@apple.com>
2019
2020         HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
2021         https://bugs.webkit.org/show_bug.cgi?id=140524
2022
2023         Reviewed by Andreas Kling.
2024
2025         Test: media/muted-video-is-playing-audio.html
2026
2027         * html/HTMLMediaElement.cpp:
2028         (WebCore::HTMLMediaElement::setMuted):
2029         Call Document::updateIsPlayingAudio() to recalculate the overall audio playing state.
2030         (WebCore::HTMLMediaElement::isPlayingAudio):
2031         HTMLMediaElement::isPlayingAudio() should return false if the media element is explicitly muted.
2032
2033 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
2034
2035         [SVG -> OTF Converter] Flip the switch on
2036         https://bugs.webkit.org/show_bug.cgi?id=140592
2037
2038         Reviewed by Antti Koivisto.
2039
2040         * Configurations/FeatureDefines.xcconfig:
2041
2042 2015-01-16  Alexey Proskuryakov  <ap@apple.com>
2043
2044         Console log sometimes prefixed with line number
2045         https://bugs.webkit.org/show_bug.cgi?id=105280
2046
2047         Reviewed by Darin Adler.
2048
2049         Improve the logic for determining whether a console message should be associated
2050         with a source code location.
2051
2052         * dom/ScriptableDocumentParser.h:
2053         * html/parser/HTMLDocumentParser.cpp:
2054         (WebCore::HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
2055         * html/parser/HTMLDocumentParser.h:
2056         * page/PageConsoleClient.cpp:
2057         (WebCore::getParserLocationForConsoleMessage):
2058         (WebCore::PageConsoleClient::addMessage):
2059         * xml/parser/XMLDocumentParser.cpp:
2060         (WebCore::XMLDocumentParser::pauseParsing):
2061         * xml/parser/XMLDocumentParser.h:
2062         * xml/parser/XMLDocumentParserLibxml2.cpp:
2063         (WebCore::XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
2064
2065 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
2066
2067         [SVG -> OTF Converter] Glyphs get clipped weirdly
2068         https://bugs.webkit.org/show_bug.cgi?id=137095
2069
2070         Reviewed by Antti Koivisto.
2071
2072         The Adobe CFF spec doesn't actually tell you how to serialize a
2073         "FontBBox." After trial and error, it seems to be (x, y, width,
2074         height).
2075
2076         Test: svg/text/kerning.svg
2077               svg/W3C-SVG-1.1/fonts-kern-01-t.svg
2078
2079         * svg/SVGToOTFFontConversion.cpp:
2080         (WebCore::SVGToOTFFontConverter::appendHEADTable):
2081         (WebCore::SVGToOTFFontConverter::appendCFFTable):
2082         (WebCore::SVGToOTFFontConverter::appendVHEATable):
2083         (WebCore::CFFBuilder::CFFBuilder):
2084         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
2085         (WebCore::SVGToOTFFontConverter::processGlyphElement):
2086
2087 2015-01-19  Csaba Osztrogonác  <ossy@webkit.org>
2088
2089         REGRESSION(r178486): It broke the !ENABLE(VIDEO) build
2090         https://bugs.webkit.org/show_bug.cgi?id=140611
2091
2092         Reviewed by Eric Carlson.
2093
2094         * testing/Internals.cpp:
2095         (WebCore::Internals::elementIsBlockingDisplaySleep):
2096         * testing/Internals.h:
2097
2098 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
2099
2100         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
2101         https://bugs.webkit.org/show_bug.cgi?id=139059
2102
2103         Reviewed by David Hyatt.
2104
2105         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
2106
2107         * rendering/RenderGrid.cpp:
2108         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2109
2110 2015-01-18  Alexey Proskuryakov  <ap@apple.com>
2111
2112         Update bindings generation test results after <https://trac.webkit.org/changeset/178633>.
2113
2114         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2115         (WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
2116         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2117         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
2118         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
2119         * bindings/scripts/test/JS/JSTestObj.cpp:
2120         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
2121         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
2122
2123 2015-01-18  Chris Dumez  <cdumez@apple.com>
2124
2125         Generate matchingShorthandsForLonghand() implementation from CSSPropertyNames.in
2126         https://bugs.webkit.org/show_bug.cgi?id=140599
2127
2128         Reviewed by Antti Koivisto.
2129
2130         Generate matchingShorthandsForLonghand() implementation from
2131         CSSPropertyNames.in. We already have all the information we need in
2132         CSSPropertyNames.in to generate the big switch() in
2133         matchingShorthandsForLonghand().
2134
2135         A few shorthands still aren't generated. I will look into getting rid
2136         of the custom code in a follow-up patch.
2137
2138         * css/StylePropertyShorthand.cpp:
2139         (WebCore::makeVector): Deleted.
2140         (WebCore::matchingShorthandsForLonghand): Deleted.
2141         * css/StylePropertyShorthand.h:
2142         (WebCore::matchingCustomShorthandsForLonghand):
2143         * css/makeprop.pl:
2144         (constructShorthandsVector):
2145
2146 2015-01-18  Dean Jackson  <dino@apple.com>
2147
2148         Out of bounds write in canvas.toDataURL
2149         https://bugs.webkit.org/show_bug.cgi?id=140594
2150         <rdar://problem/19449135>
2151
2152         Reviewed by Alexey Proskuryakov.
2153
2154         In the case where we have a canvas object that does
2155         not have premultiplied alpha (an option you can select
2156         when using WebGL) we have to multiply out the alpha when
2157         converting to JPEG via toDataURL.
2158
2159         For this we created a buffer, but were not accurately
2160         resizing it before flattening the alpha.
2161
2162         Test: fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html
2163
2164         * platform/graphics/cg/ImageBufferCG.cpp:
2165         (WebCore::ImageDataToDataURL): Call resize once we've
2166         determined we have enough space.
2167
2168 2015-01-17  Sam Weinig  <sam@webkit.org>
2169
2170         Add initial experimental user content filtering API
2171         https://bugs.webkit.org/show_bug.cgi?id=140584
2172
2173         Reviewed by Benjamin Poulain.
2174
2175         Change content extensions to be managed through the UserContentController.
2176
2177         * WebCore.exp.in:
2178         Update exports.
2179
2180         * WebCore.xcodeproj/project.pbxproj:
2181         Update for removed files.
2182
2183         * contentextensions/ContentExtensionsBackend.cpp:
2184         (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists):
2185         (WebCore::ContentExtensions::ContentExtensionsBackend::sharedInstance): Deleted.
2186         * contentextensions/ContentExtensionsBackend.h:
2187         Remove concept of a shared instance and add a removeAllRuleLists() function.
2188         
2189         * contentextensions/ContentExtensionsInterface.cpp: Removed.
2190         * contentextensions/ContentExtensionsInterface.h: Removed.
2191         Since there is no shared instance anymore, checking if a URL should be blocked
2192         now has to go directly to the backend.
2193         
2194         * contentextensions/ContentExtensionsManager.cpp:
2195         (WebCore::ContentExtensions::ExtensionsManager::createRuleList):
2196         (WebCore::ContentExtensions::ExtensionsManager::loadExtension): Deleted.
2197         * contentextensions/ContentExtensionsManager.h:
2198         Update interface to accommodate the lack of a shared instance. Now, all this
2199         file does is take a serialized rule list and outputs the Vector of ContentExtensionRules
2200
2201         * loader/cache/CachedResourceLoader.cpp:
2202         (WebCore::CachedResourceLoader::requestResource):
2203         Check with the UserContentController to see if the URL should be blocked.
2204
2205         * page/UserContentController.cpp:
2206         (WebCore::UserContentController::addUserContentFilter):
2207         (WebCore::UserContentController::removeAllUserContentFilters):
2208         (WebCore::UserContentController::contentFilterBlocksURL):
2209         * page/UserContentController.h:
2210         Add single point of interaction for both the WebKit level to add and remove
2211         content filters and WebCore to check to see if URLs should be blocked.
2212
2213 2015-01-18  Darin Adler  <darin@apple.com>
2214
2215         REGRESSION (r125251): wrapper lifetimes of SVGElementInstance are incorrect
2216         https://bugs.webkit.org/show_bug.cgi?id=132148
2217
2218         Reviewed by Anders Carlsson.
2219
2220         Test: svg/custom/use-instanceRoot-event-listeners.xhtml
2221
2222         * bindings/js/JSDOMWindowCustom.cpp:
2223         (WebCore::JSDOMWindow::addEventListener): Updated for the new return type
2224         of JSListener::create. For the event type, use JSString::toAtomicString instead of
2225         calling JSString::value and then converting to an AtomicString.
2226         (WebCore::JSDOMWindow::removeEventListener): Same changes as for addEventListener.
2227
2228         * bindings/js/JSEventListener.cpp:
2229         (WebCore::forwardsEventListeners): Added. Helper to detect the special case needed
2230         for SVGElementInstance. In the future, for better encapsulation, we could use virtual
2231         functions, but for now hard coding this single class seems fine.
2232         (WebCore::correspondingElementWrapper): Added. For use if forwardsEventListeners
2233         returns true, to find out where event listeners will be forwarded.
2234         (WebCore::createJSEventListenerForAttribute): Added. Replaces the old function
2235         createJSAttributeEventListener, for SVGElementInstance attributes only.
2236         (WebCore::createJSEventListenerForAdd): Added. Helper function to avoid repeated
2237         generated code in the addElementListener bindings other than the DOMWindow one.
2238
2239         * bindings/js/JSEventListener.h:
2240         (WebCore::JSEventListener::create): Changed to return a Ref instead of a PassRefPtr.
2241         (WebCore::createJSEventListenerForAttribute): Renamed from createJSAttributeEventListener,
2242         changed to return a RefPtr instead of a PassRefPtr and to take references rather than
2243         pointers for non-null things.
2244         (WebCore::createJSEventListenerForRemove): Added. Small wrapper that calls
2245         createJSEventListenerForAdd since they are currently identical.
2246
2247         * bindings/scripts/CodeGeneratorJS.pm:
2248         (GenerateAttributeEventListenerCall): Removed the special case for JSSVGElementInstance
2249         and updated to call the new createJSEventListenerForAttribute. The special case for
2250         SVGElementInstance is now in JSEventListener.h/cpp, which is nicer since we prefer to
2251         keep the generated code simpler if possible.
2252         (GenerateEventListenerCall): Removed the special case for JSSVGElementInstance. This
2253         has been dead code since the explicit definition of add/removeEventListener was removed
2254         from SVGElementInstance.idl, and was also a problem if someone were to use the
2255         addEventListener function from EventTarget on an SVGElementInstance object. The function
2256         needs to be generic at runtime. Use toAtomicString as in JSDOMWindow::addEventListener above.
2257         Call the two new functions, createJSEventListenerForAdd and createJSEventListenerForRemove.
2258         Those new functions properly handle SVGElementInstance.
2259         (GenerateImplementation): Don't pass the class name to GenerateAttributeEventListenerCall
2260         or GenerateEventListenerCall any more.
2261         (GenerateConstructorDefinition): Use JSString::toAtomicString instead of calling
2262         JSString::value and then converting to AtomicString.
2263
2264 2015-01-17  Brian J. Burg  <burg@cs.washington.edu>
2265
2266         Web Inspector: highlight data for overlay should use protocol type builders
2267         https://bugs.webkit.org/show_bug.cgi?id=129441
2268
2269         Reviewed by Timothy Hatcher.
2270
2271         As a first step towards cleaning up the inspector overlay, convert highlight
2272         data construction to use protocol type builders. It's now really obvious what
2273         data is being sent to the inspector overlay page.
2274
2275         This change paves the way towards using inspector protocol commands and events
2276         if we want to support more interactive functionality in the inspector overlay.
2277
2278         This patch makes a few style cleanups, such as standardizing variable names,
2279         using default member initializers, passing by reference, and fixing casts.
2280
2281         No new tests, no behavior changed.
2282
2283         * WebCore.exp.in:
2284         * inspector/InspectorController.cpp:
2285         (WebCore::InspectorController::getHighlight):
2286         (WebCore::InspectorController::buildObjectForHighlightedNode):
2287         (WebCore::InspectorController::inspect): Deleted.
2288         * inspector/InspectorController.h:
2289         * inspector/InspectorOverlay.cpp:
2290         (WebCore::buildRendererHighlight):
2291         (WebCore::buildNodeHighlight):
2292         (WebCore::buildQuadHighlight):
2293         (WebCore::InspectorOverlay::InspectorOverlay):
2294         (WebCore::InspectorOverlay::getHighlight):
2295         (WebCore::buildObjectForPoint):
2296         (WebCore::buildObjectForRect):
2297         (WebCore::buildArrayForQuad):
2298         (WebCore::buildObjectForHighlight):
2299         (WebCore::buildObjectForRegion):
2300         (WebCore::buildObjectForFlowRegions):
2301         (WebCore::buildObjectForSize):
2302         (WebCore::buildQuadObjectForCSSRegionContentClip):
2303         Simplify how the clipping area is encoded. It's now 'regionClippingArea'
2304         stored on a FragmentHighlightData instance.
2305
2306         (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
2307         (WebCore::InspectorOverlay::drawPaintRects):
2308         (WebCore::buildArrayForRendererFragments):
2309         (WebCore::appendPathCommandAndPoints):
2310         (WebCore::appendPathSegment):
2311         (WebCore::buildObjectForShapeOutside):
2312         (WebCore::buildObjectForElementData):
2313         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
2314         (WebCore::InspectorOverlay::drawNodeHighlight):
2315         (WebCore::InspectorOverlay::drawQuadHighlight):
2316         (WebCore::InspectorOverlay::reset):
2317         (WebCore::buildObjectForRegionHighlight): Deleted.
2318         (WebCore::buildObjectForCSSRegionsHighlight): Deleted.
2319         (WebCore::buildObjectForCSSRegionContentClip): Deleted.
2320         (WebCore::buildObjectForRendererFragments): Deleted.
2321         (WebCore::buildObjectForElementInfo): Deleted.
2322         * inspector/InspectorOverlay.h:
2323         (WebCore::Highlight::Highlight):
2324         * inspector/InspectorOverlayPage.js:
2325         (_createElementTitle):
2326         (_drawElementTitle):
2327         (_drawFragmentHighlight):
2328         (drawNodeHighlight):
2329         * testing/Internals.cpp:
2330         (WebCore::Internals::inspectorHighlightRects):
2331         (WebCore::Internals::inspectorHighlightObject):
2332
2333 2015-01-17  Myles C. Maxfield  <mmaxfield@apple.com>
2334
2335         [SVG -> OTF Converter] Crashes when SVG font is invalid
2336         https://bugs.webkit.org/show_bug.cgi?id=140378
2337
2338         Reviewed by Antti Koivisto.
2339
2340         Because CachedSVGFonts are cached, they have to be able to be used
2341         in subsequent documents regardless how the first document left it.
2342
2343         Tests: fast/css/font-face-svg-decoding-error.html
2344                svg/custom/svg-fonts-in-html.html
2345                svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
2346
2347         * loader/cache/CachedFont.cpp:
2348         (WebCore::CachedFont::ensureCustomFontData):
2349         * loader/cache/CachedFont.h:
2350         * loader/cache/CachedSVGFont.cpp:
2351         (WebCore::CachedSVGFont::getFontData):
2352         (WebCore::CachedSVGFont::ensureCustomFontData):
2353         (WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
2354         * loader/cache/CachedSVGFont.h:
2355
2356 2015-01-17  Chris Dumez  <cdumez@apple.com>
2357
2358         Converting time, angle and frequency units in CSS calc() function
2359         https://bugs.webkit.org/show_bug.cgi?id=138356
2360
2361         Reviewed by Darin Adler.
2362
2363         Update CSSPrimitiveValue::primitiveType() to actually query the
2364         primitiveType of the CSSCalcValue instead of assuming a given
2365         type based on its category (e.g. If category is CalcTime, then
2366         assume type is CSS_MS, even though it would be CSS_S as well).
2367
2368         This would like to calculation errors such as:
2369         calc(4s + 1s) -> 5ms
2370
2371         Because we would assume the unit is CSS_MS without actually
2372         checking.
2373
2374         This patch is inspired by the following Blink revision
2375         by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
2376         patch from <tmeszaros.u-szeged@partner.samsung.com>:
2377         https://src.chromium.org/viewvc/blink?view=rev&revision=179101
2378
2379         Test: fast/css/calc-with-angle-time-frequency.html
2380
2381         * css/CSSCalculationValue.h:
2382         (WebCore::CSSCalcValue::primitiveType):
2383         * css/CSSPrimitiveValue.cpp:
2384         (WebCore::CSSPrimitiveValue::primitiveType):
2385
2386 2015-01-17  Chris Dumez  <cdumez@apple.com>
2387
2388         Generate shorthandForProperty() implementation from CSSPropertyNames.in
2389         https://bugs.webkit.org/show_bug.cgi?id=140556
2390
2391         Reviewed by Darin Adler.
2392
2393         Generate shorthandForProperty() implementation from CSSPropertyNames.in.
2394         This is just a big switch() statement calling the right
2395         StylePropertyShorthand factory function for a given CSSPropertyID.
2396
2397         * css/StylePropertyShorthand.cpp:
2398         (WebCore::shorthandForProperty): Deleted.
2399         * css/StylePropertyShorthand.h:
2400         * css/makeprop.pl:
2401
2402 2015-01-16  Brent Fulgham  <bfulgham@apple.com>
2403
2404         [Mac] Correct infinite loop in Wheel Handler code in EventHandlerMac
2405         https://bugs.webkit.org/show_bug.cgi?id=140564
2406         <rdar://problem/19386426.
2407
2408         Reviewed by Dean Jackson.
2409
2410         * page/mac/EventHandlerMac.mm:
2411         (WebCore::latchingIsLockedToAncestorOfThisFrame): Put missing assignment
2412         back into the loop!
2413
2414 2015-01-16  Zalan Bujtas  <zalan@apple.com>
2415
2416         When border-radius is present, inset/outset/groove/ridge border color changes.
2417         https://bugs.webkit.org/show_bug.cgi?id=140551
2418
2419         Reviewed by Simon Fraser.
2420
2421         This patch applies the same color lighten/darken adjustment on the radius borders
2422         that we use for non-radius border.
2423
2424         Test: fast/borders/wrong-border-color-when-radius-is-present.html
2425
2426         * rendering/RenderBoxModelObject.cpp:
2427         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2428         * rendering/RenderObject.cpp:
2429         (WebCore::RenderObject::calculateBorderStyleColor):
2430         * rendering/RenderObject.h:
2431
2432 2015-01-16  Pratik Solanki  <psolanki@apple.com>
2433
2434         Web pages fail to load using public iOS WebKit; ASSERT(!isMainThread()) in
2435         -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
2436         https://bugs.webkit.org/show_bug.cgi?id=140470
2437
2438         Reviewed by Alexey Proskuryakov.
2439
2440         Fixes an issue where a web page would fail to load in iOS WebKit2 built with the public iOS SDK
2441         because NSURLConnection callbacks were always being scheduled on the main thread.
2442
2443         Currently we always schedule NSURLConnection callbacks to occur on the WebThread or the main
2444         thread depending on whether the WebThread was started. In iOS WebKit2, the callbacks were
2445         always being scheduled on the main thread regardless of whether we were using the NetworkProcess
2446         (since the WebThread is only started when using WebKit1). This led to an assertion failure.
2447         Instead we want to schedule callbacks to an NSOperationsQueue queue when using WebKit2 with the
2448         NetworkProcess (i.e. ResourceHandleClient::usesAsyncCallbacks() is true), on the main thread when
2449         using WebKit2 without the NetworkProcess and on the WebThread when using WebKit1.
2450
2451         * platform/network/mac/ResourceHandleMac.mm:
2452         (WebCore::operationQueueForAsyncClients): Remove PLATFORM(IOS)-guards as we want to make use
2453         of this code for iOS WebKit2 with the NetworkProcess.
2454         (WebCore::ResourceHandle::start): Modified to use the existing Mac code path to conditionally
2455         schedule NSURLConnection callbacks to an operation queue when ResourceHandleClient::usesAsyncCallbacks()
2456         is true. Otherwise, schedule the callbacks on the run loop returned by WebThreadNSRunLoop(),
2457         which is either the WebThread or the main thread run loop when using WebKit1 and WebKit2 without
2458         the NetworkProcess, respectively.
2459
2460 2015-01-16  Brian J. Burg  <burg@cs.washington.edu>
2461
2462         Web Replay: purge remaining PassRefPtr uses and minor cleanup
2463         https://bugs.webkit.org/show_bug.cgi?id=140456
2464
2465         Reviewed by Andreas Kling.
2466
2467         Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
2468         uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.
2469
2470         Remove mistaken uses of AtomicString that were not removed as part of r174113.
2471
2472         No new tests, no behavior changed.
2473
2474         * inspector/InspectorReplayAgent.cpp:
2475         (WebCore::SerializeInputToJSONFunctor::operator()):
2476         (WebCore::SerializeInputToJSONFunctor::returnValue):
2477         (WebCore::InspectorReplayAgent::sessionCreated):
2478         (WebCore::InspectorReplayAgent::sessionModified):
2479         (WebCore::InspectorReplayAgent::sessionLoaded):
2480         (WebCore::InspectorReplayAgent::segmentCreated):
2481         (WebCore::InspectorReplayAgent::segmentCompleted):
2482         (WebCore::InspectorReplayAgent::segmentLoaded):
2483         (WebCore::InspectorReplayAgent::switchSession):
2484         (WebCore::InspectorReplayAgent::insertSessionSegment):
2485         (WebCore::InspectorReplayAgent::removeSessionSegment):
2486         (WebCore::InspectorReplayAgent::findSession):
2487         (WebCore::InspectorReplayAgent::findSegment):
2488         * inspector/InspectorReplayAgent.h:
2489         * replay/CapturingInputCursor.cpp:
2490         (WebCore::CapturingInputCursor::CapturingInputCursor):
2491         (WebCore::CapturingInputCursor::create):
2492         (WebCore::CapturingInputCursor::loadInput):
2493         * replay/CapturingInputCursor.h:
2494         * replay/EventLoopInputDispatcher.cpp:
2495         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
2496         * replay/EventLoopInputDispatcher.h:
2497         * replay/FunctorInputCursor.h:
2498         (WebCore::FunctorInputCursor::FunctorInputCursor):
2499         (WebCore::FunctorInputCursor::loadInput):
2500         * replay/ReplayController.cpp:
2501         (WebCore::ReplayController::ReplayController):
2502         (WebCore::ReplayController::setForceDeterministicSettings):
2503         (WebCore::ReplayController::setSessionState):
2504         (WebCore::ReplayController::setSegmentState):
2505         (WebCore::ReplayController::switchSession):
2506         (WebCore::ReplayController::createSegment):
2507         (WebCore::ReplayController::completeSegment):
2508         (WebCore::ReplayController::loadSegmentAtIndex):
2509         (WebCore::ReplayController::unloadSegment):
2510         (WebCore::ReplayController::frameNavigated):
2511         (WebCore::ReplayController::loadedSession):
2512         (WebCore::ReplayController::loadedSegment):
2513         (WebCore::ReplayController::activeInputCursor):
2514         (WebCore::ReplayController::dispatcher):
2515         * replay/ReplayController.h:
2516         * replay/ReplaySession.cpp:
2517         (WebCore::ReplaySession::create):
2518         (WebCore::ReplaySession::at):
2519         (WebCore::ReplaySession::appendSegment):
2520         (WebCore::ReplaySession::insertSegment):
2521         (WebCore::ReplaySession::removeSegment):
2522         * replay/ReplaySession.h:
2523         * replay/ReplaySessionSegment.cpp:
2524         (WebCore::ReplaySessionSegment::create):
2525         (WebCore::ReplaySessionSegment::ReplaySessionSegment):
2526         * replay/ReplaySessionSegment.h:
2527         * replay/ReplayingInputCursor.cpp:
2528         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
2529         (WebCore::ReplayingInputCursor::create):
2530         (WebCore::ReplayingInputCursor::loadInput):
2531         * replay/ReplayingInputCursor.h:
2532         * replay/SegmentedInputStorage.cpp:
2533         (WebCore::SegmentedInputStorage::store):
2534         (WebCore::SegmentedInputStorage::queue):
2535         (WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
2536         * replay/SegmentedInputStorage.h:
2537
2538 2015-01-16  Andreas Kling  <akling@apple.com>
2539
2540         Remove assertion that Page::m_editorClient is non-null.
2541
2542         Unreviewed debug build fix. (It's a reference, it won't be null.)
2543
2544         * page/Page.cpp:
2545         (WebCore::Page::Page):
2546
2547 2015-01-16  Andreas Kling  <akling@apple.com>
2548
2549         Page::editorClient() should return a reference.
2550         <https://webkit.org/b/140552>
2551
2552         Reviewed by Chris Dumez.
2553
2554         Page always has an EditorClient, so make editorClient() return a reference.
2555
2556         * editing/AlternativeTextController.cpp:
2557         (WebCore::AlternativeTextController::editorClient):
2558         (WebCore::AlternativeTextController::textChecker):
2559         * editing/Editor.cpp:
2560         (WebCore::Editor::client):
2561         * editing/SpellChecker.cpp:
2562         (WebCore::SpellChecker::client):
2563         * page/FocusController.cpp:
2564         (WebCore::FocusController::setFocusedElement):
2565         * page/Page.cpp:
2566         (WebCore::Page::Page):
2567         (WebCore::Page::~Page):
2568         (WebCore::Page::clearUndoRedoOperations):
2569         * page/Page.h:
2570         (WebCore::Page::editorClient):
2571         * page/scrolling/AsyncScrollingCoordinator.cpp:
2572         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2573
2574 2015-01-16  Benjamin Poulain  <benjamin@webkit.org>
2575
2576         Make URL filters case-insensitive by default
2577         https://bugs.webkit.org/show_bug.cgi?id=140531
2578
2579         Reviewed by Andreas Kling.
2580
2581         Safari's filters were case-insensitive. Adopt that convention in the engine,
2582         and add a flag in case someone ever need a case-sensitive filter.
2583
2584         * contentextensions/ContentExtensionRule.h:
2585         * contentextensions/ContentExtensionsBackend.cpp:
2586         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2587         * contentextensions/ContentExtensionsManager.cpp:
2588         (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
2589         * contentextensions/URLFilterParser.cpp:
2590         (WebCore::ContentExtensions::trivialAtomFromASCIICharacter):
2591         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
2592         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2593         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
2594         (WebCore::ContentExtensions::URLFilterParser::addPattern):
2595         * contentextensions/URLFilterParser.h:
2596
2597 2015-01-16  Benjamin Poulain  <bpoulain@apple.com>
2598
2599         Add the alternative syntax for CSS Selector's descendant combinator (">>")
2600         https://bugs.webkit.org/show_bug.cgi?id=140525
2601
2602         Reviewed by Antti Koivisto.
2603
2604         The latest Selector spec introduces the combinator ">>" as an alias for the descendant
2605         relation: http://dev.w3.org/csswg/selectors-4/#descendant-combinators
2606
2607         This patch implements that combinator as an alias of the existing one. For CSSOM's selector
2608         serialization, I use one bit of CSSSelector to store if that alternative syntax was used.
2609
2610         Tests: fast/css/descendant-combinator-doubled-child-syntax-styling.html
2611                fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html
2612                fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html
2613                fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html
2614                fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html
2615
2616         * css/CSSGrammar.y.in:
2617         * css/CSSParserValues.cpp:
2618         (WebCore::CSSParserSelector::appendTagHistory):
2619         * css/CSSParserValues.h:
2620         (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax):
2621         * css/CSSSelector.cpp:
2622         (WebCore::CSSSelector::selectorText):
2623         * css/CSSSelector.h:
2624         (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax):
2625         (WebCore::CSSSelector::CSSSelector):
2626
2627 2015-01-16  Chris Dumez  <cdumez@apple.com>
2628
2629         Generate StylePropertyShorthand.* from CSSPropertyNames.in
2630         https://bugs.webkit.org/show_bug.cgi?id=140501
2631
2632         Reviewed by Darin Adler.
2633
2634         Add initial support for having makeprop.pl generate most of
2635         StylePropertyShorthand.* from CSSPropertyNames.in.
2636
2637         This patch replaces [Shorthand] parameter in CSSPropertyNames.in by a
2638         more descriptive [Longhands=property1|property2|...] parameter. With
2639         this information, makeprop.pl is now able to generate the
2640         StylePropertyShorthand factories for all CSS shorthand properties
2641         in a new StylePropertyShorthandFunctions.h header.
2642
2643         The switches in StylePropertyShorthand.cpp could also be generated
2644         but this will be taken care of in follow-up patches to reduce patch
2645         size.
2646
2647         * CMakeLists.txt:
2648         * DerivedSources.make:
2649         * WebCore.vcxproj/WebCore.vcxproj:
2650         * WebCore.vcxproj/WebCore.vcxproj.filters:
2651         * WebCore.xcodeproj/project.pbxproj:
2652         * css/CSSComputedStyleDeclaration.cpp:
2653         (WebCore::ComputedStyleExtractor::propertyValue):
2654         * css/CSSParser.cpp:
2655         (WebCore::CSSParser::parseValue):
2656         * css/CSSPropertyNames.in:
2657         * css/StyleProperties.cpp:
2658         (WebCore::StyleProperties::getPropertyValue):
2659         * css/StylePropertyShorthand.cpp:
2660         (WebCore::shorthandForProperty):
2661         (WebCore::matchingShorthandsForLonghand):
2662         (WebCore::backgroundShorthand): Deleted.
2663         (WebCore::backgroundPositionShorthand): Deleted.
2664         (WebCore::backgroundRepeatShorthand): Deleted.
2665         (WebCore::borderShorthand): Deleted.
2666         (WebCore::borderBottomShorthand): Deleted.
2667         (WebCore::borderColorShorthand): Deleted.
2668         (WebCore::borderImageShorthand): Deleted.
2669         (WebCore::borderLeftShorthand): Deleted.
2670         (WebCore::borderRadiusShorthand): Deleted.
2671         (WebCore::webkitBorderRadiusShorthand): Deleted.
2672         (WebCore::borderRightShorthand): Deleted.
2673         (WebCore::borderSpacingShorthand): Deleted.
2674         (WebCore::borderStyleShorthand): Deleted.
2675         (WebCore::borderTopShorthand): Deleted.
2676         (WebCore::borderWidthShorthand): Deleted.
2677         (WebCore::listStyleShorthand): Deleted.
2678         (WebCore::marginShorthand): Deleted.
2679         (WebCore::markerShorthand): Deleted.
2680         (WebCore::outlineShorthand): Deleted.
2681         (WebCore::overflowShorthand): Deleted.
2682         (WebCore::paddingShorthand): Deleted.
2683         (WebCore::transitionShorthand): Deleted.
2684         (WebCore::animationShorthand): Deleted.
2685         (WebCore::webkitAnimationShorthand): Deleted.
2686         (WebCore::webkitBorderAfterShorthand): Deleted.
2687         (WebCore::webkitBorderBeforeShorthand): Deleted.
2688         (WebCore::webkitBorderEndShorthand): Deleted.
2689         (WebCore::webkitBorderStartShorthand): Deleted.
2690         (WebCore::webkitColumnsShorthand): Deleted.
2691         (WebCore::webkitColumnRuleShorthand): Deleted.
2692         (WebCore::flexFlowShorthand): Deleted.
2693         (WebCore::flexShorthand): Deleted.
2694         (WebCore::webkitMarginCollapseShorthand): Deleted.
2695         (WebCore::webkitGridShorthand): Deleted.
2696         (WebCore::webkitGridTemplateShorthand): Deleted.
2697         (WebCore::webkitGridAreaShorthand): Deleted.
2698         (WebCore::webkitGridColumnShorthand): Deleted.
2699         (WebCore::webkitGridRowShorthand): Deleted.
2700         (WebCore::webkitMarqueeShorthand): Deleted.
2701         (WebCore::webkitMaskShorthand): Deleted.
2702         (WebCore::webkitMaskPositionShorthand): Deleted.
2703         (WebCore::webkitMaskRepeatShorthand): Deleted.
2704         (WebCore::webkitTextDecorationShorthand): Deleted.
2705         (WebCore::webkitTextEmphasisShorthand): Deleted.
2706         (WebCore::webkitTextStrokeShorthand): Deleted.
2707         (WebCore::webkitTransitionShorthand): Deleted.
2708         (WebCore::webkitPerspectiveOriginShorthand): Deleted.
2709         (WebCore::webkitTransformOriginShorthand): Deleted.
2710         * css/StylePropertyShorthand.h:
2711         * css/makeprop.pl:
2712
2713 2015-01-16  Commit Queue  <commit-queue@webkit.org>
2714
2715         Unreviewed, rolling out r178532.
2716         https://bugs.webkit.org/show_bug.cgi?id=140548
2717
2718         Broke fast/css/parsing-css-lang.html on some bots (Requested
2719         by ap on #webkit).
2720
2721         Reverted changeset:
2722
2723         "Canonicalization of :lang() should preserve the :lang()'s
2724         arguments representations"
2725         https://bugs.webkit.org/show_bug.cgi?id=139928
2726         http://trac.webkit.org/changeset/178532
2727
2728 2015-01-16  Commit Queue  <commit-queue@webkit.org>
2729
2730         Unreviewed, rolling out r178577.
2731         https://bugs.webkit.org/show_bug.cgi?id=140546
2732
2733         Broke fast/css-grid-layout/grid-content-sized-columns-
2734         resolution.html (Requested by ap on #webkit).
2735
2736         Reverted changeset:
2737
2738         "[CSS Grid Layout] Tracks shrink sometimes with indefinite
2739         remaining space"
2740         https://bugs.webkit.org/show_bug.cgi?id=139059
2741         http://trac.webkit.org/changeset/178577
2742
2743 2015-01-16  Andreas Kling  <akling@apple.com>
2744
2745         Some improvements to RuleSet shrinking.
2746         <https://webkit.org/b/140534>
2747
2748         Reviewed by Antti Koivisto.
2749
2750         Give an inline capacity (1) to the RuleData Vectors in RuleSet.
2751         The vast majority of Vectors have only a single entry, and this
2752         avoids having to allocate a separate Vector backing store for them.
2753
2754         Also make sure to shrink some Vectors that we weren't already,
2755         like those in RuleFeatureSet.
2756
2757         * css/ElementRuleCollector.cpp:
2758         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
2759         * css/ElementRuleCollector.h:
2760         * css/RuleFeature.cpp:
2761         (WebCore::RuleFeatureSet::shrinkToFit):
2762         * css/RuleFeature.h:
2763         * css/RuleSet.cpp:
2764         (WebCore::RuleSet::addToRuleSet):
2765         (WebCore::rulesCountForName):
2766         (WebCore::shrinkMapVectorsToFit):
2767         (WebCore::RuleSet::shrinkToFit):
2768         * css/RuleSet.h:
2769         (WebCore::RuleSet::idRules):
2770         (WebCore::RuleSet::classRules):
2771         (WebCore::RuleSet::tagRules):
2772         (WebCore::RuleSet::shadowPseudoElementRules):
2773         (WebCore::RuleSet::linkPseudoClassRules):
2774         (WebCore::RuleSet::cuePseudoRules):
2775         (WebCore::RuleSet::focusPseudoClassRules):
2776         (WebCore::RuleSet::universalRules):
2777
2778 2015-01-16  Antti Koivisto  <antti@apple.com>
2779
2780         Correct naming for FontCascade implementation files
2781         https://bugs.webkit.org/show_bug.cgi?id=140544
2782
2783         Reviewed by Zalan Bujtas.
2784
2785         Also reduce their number.
2786
2787         Merge FontFastPath.cpp into FontCascade.cpp
2788         Merge FontMac.mm and FontComplexTextMac.cpp into FontCascadeCocoa.mm
2789
2790         * CMakeLists.txt:
2791         * WebCore.vcxproj/WebCore.vcxproj:
2792         * WebCore.xcodeproj/project.pbxproj:
2793         * platform/graphics/FontCascade.cpp:
2794         (WebCore::FontCascade::getEmphasisMarkGlyphData):
2795         (WebCore::FontCascade::emphasisMarkAscent):
2796         (WebCore::FontCascade::emphasisMarkDescent):
2797         (WebCore::FontCascade::emphasisMarkHeight):
2798         (WebCore::FontCascade::getGlyphsAndAdvancesForSimpleText):
2799         (WebCore::FontCascade::drawSimpleText):
2800         (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
2801         (WebCore::FontCascade::drawGlyphBuffer):
2802         (WebCore::offsetToMiddleOfGlyph):
2803         (WebCore::offsetToMiddleOfGlyphAtIndex):
2804         (WebCore::FontCascade::drawEmphasisMarks):
2805         (WebCore::FontCascade::floatWidthForSimpleText):
2806         (WebCore::FontCascade::adjustSelectionRectForSimpleText):
2807         (WebCore::FontCascade::offsetForPositionForSimpleText):
2808         * platform/graphics/FontFastPath.cpp: Removed.
2809         * platform/graphics/cocoa/FontCascadeCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
2810         (WebCore::FontCascade::drawGlyphs):
2811         (WebCore::FontCascade::adjustSelectionRectForComplexText):
2812         (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
2813         (WebCore::FontCascade::drawComplexText):
2814         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
2815         (WebCore::FontCascade::floatWidthForComplexText):
2816         (WebCore::FontCascade::offsetForPositionForComplexText):
2817         (WebCore::FontCascade::fontDataForCombiningCharacterSequence):
2818         * platform/graphics/mac/FontComplexTextMac.cpp: Removed.
2819         * platform/graphics/mac/FontMac.mm: Removed.
2820
2821 2014-11-26  Sergio Villar Senin  <svillar@igalia.com>
2822
2823         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
2824         https://bugs.webkit.org/show_bug.cgi?id=139059
2825
2826         Reviewed by David Hyatt.
2827
2828         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
2829
2830         * rendering/RenderGrid.cpp:
2831         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2832
2833 2015-01-15  Csaba Osztrogonác  <ossy@webkit.org>
2834
2835         Remove ENABLE(SQL_DATABASE) guards
2836         https://bugs.webkit.org/show_bug.cgi?id=140434
2837
2838         Reviewed by Darin Adler.
2839
2840         * Configurations/FeatureDefines.xcconfig:
2841         * Modules/webdatabase/AbstractDatabaseServer.h:
2842         * Modules/webdatabase/ChangeVersionData.h:
2843         * Modules/webdatabase/ChangeVersionWrapper.cpp:
2844         * Modules/webdatabase/ChangeVersionWrapper.h:
2845         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
2846         * Modules/webdatabase/DOMWindowWebDatabase.h:
2847         * Modules/webdatabase/DOMWindowWebDatabase.idl:
2848         * Modules/webdatabase/Database.cpp:
2849         * Modules/webdatabase/Database.h:
2850         * Modules/webdatabase/Database.idl:
2851         * Modules/webdatabase/DatabaseBackend.cpp:
2852         * Modules/webdatabase/DatabaseBackend.h:
2853         * Modules/webdatabase/DatabaseBackendBase.cpp:
2854         * Modules/webdatabase/DatabaseBackendBase.h:
2855         * Modules/webdatabase/DatabaseBasicTypes.h:
2856         * Modules/webdatabase/DatabaseCallback.h:
2857         * Modules/webdatabase/DatabaseCallback.idl:
2858         * Modules/webdatabase/DatabaseContext.cpp:
2859         * Modules/webdatabase/DatabaseContext.h:
2860         * Modules/webdatabase/DatabaseDetails.h:
2861         * Modules/webdatabase/DatabaseError.h:
2862         * Modules/webdatabase/DatabaseManager.cpp:
2863         * Modules/webdatabase/DatabaseManager.h:
2864         * Modules/webdatabase/DatabaseManagerClient.h:
2865         * Modules/webdatabase/DatabaseServer.cpp:
2866         * Modules/webdatabase/DatabaseServer.h:
2867         * Modules/webdatabase/DatabaseTask.cpp:
2868         * Modules/webdatabase/DatabaseTask.h:
2869         * Modules/webdatabase/DatabaseThread.cpp:
2870         * Modules/webdatabase/DatabaseThread.h:
2871         * Modules/webdatabase/DatabaseTracker.cpp:
2872         * Modules/webdatabase/DatabaseTracker.h:
2873         * Modules/webdatabase/OriginLock.cpp:
2874         * Modules/webdatabase/OriginLock.h:
2875         * Modules/webdatabase/SQLCallbackWrapper.h:
2876         * Modules/webdatabase/SQLError.h:
2877         * Modules/webdatabase/SQLError.idl:
2878         * Modules/webdatabase/SQLException.cpp:
2879         * Modules/webdatabase/SQLException.h:
2880         * Modules/webdatabase/SQLException.idl:
2881         * Modules/webdatabase/SQLResultSet.cpp:
2882         * Modules/webdatabase/SQLResultSet.h:
2883         * Modules/webdatabase/SQLResultSet.idl:
2884         * Modules/webdatabase/SQLResultSetRowList.cpp:
2885         * Modules/webdatabase/SQLResultSetRowList.h:
2886         * Modules/webdatabase/SQLResultSetRowList.idl:
2887         * Modules/webdatabase/SQLStatement.cpp:
2888         * Modules/webdatabase/SQLStatement.h:
2889         * Modules/webdatabase/SQLStatementBackend.cpp:
2890         * Modules/webdatabase/SQLStatementBackend.h:
2891         * Modules/webdatabase/SQLStatementCallback.h:
2892         * Modules/webdatabase/SQLStatementCallback.idl:
2893         * Modules/webdatabase/SQLStatementErrorCallback.h:
2894         * Modules/webdatabase/SQLStatementErrorCallback.idl:
2895         * Modules/webdatabase/SQLTransaction.cpp:
2896         * Modules/webdatabase/SQLTransaction.h:
2897         * Modules/webdatabase/SQLTransaction.idl:
2898         * Modules/webdatabase/SQLTransactionBackend.cpp:
2899         * Modules/webdatabase/SQLTransactionBackend.h:
2900         * Modules/webdatabase/SQLTransactionCallback.h:
2901         * Modules/webdatabase/SQLTransactionCallback.idl:
2902         * Modules/webdatabase/SQLTransactionClient.cpp:
2903         * Modules/webdatabase/SQLTransactionClient.h:
2904         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
2905         * Modules/webdatabase/SQLTransactionCoordinator.h:
2906         * Modules/webdatabase/SQLTransactionErrorCallback.h:
2907         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
2908         * Modules/webdatabase/SQLTransactionState.h:
2909         * Modules/webdatabase/SQLTransactionStateMachine.cpp:
2910         * Modules/webdatabase/SQLTransactionStateMachine.h:
2911         * bindings/js/JSCommandLineAPIHostCustom.cpp:
2912         (WebCore::JSCommandLineAPIHost::databaseId):
2913         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2914         * bindings/js/JSExceptionBase.cpp:
2915         (WebCore::toExceptionBase):
2916         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2917         * bindings/js/JSSQLTransactionCustom.cpp:
2918         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2919         (webkit_dom_test_callback_finalize):
2920         (webkit_dom_test_callback_constructor):
2921         (webkit_dom_test_callback_callback_with_no_param):
2922         (webkit_dom_test_callback_callback_with_array_param):
2923         (webkit_dom_test_callback_callback_with_serialized_script_value_param):
2924         (webkit_dom_test_callback_callback_with_non_bool_return_type):
2925         (webkit_dom_test_callback_callback_with_string_list):
2926         (webkit_dom_test_callback_callback_with_boolean):
2927         (webkit_dom_test_callback_callback_requires_this_to_pass):
2928         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
2929         * bindings/scripts/test/JS/JSTestCallback.cpp:
2930         * bindings/scripts/test/JS/JSTestCallback.h:
2931         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
2932         * bindings/scripts/test/TestCallback.idl:
2933         * dom/DOMExceptions.in:
2934         * dom/ScriptExecutionContext.cpp:
2935         (WebCore::ScriptExecutionContext::setDatabaseContext):
2936         * dom/ScriptExecutionContext.h:
2937         * history/PageCache.cpp:
2938         (WebCore::logCanCacheFrameDecision):
2939         (WebCore::PageCache::canCachePageContainingThisFrame):
2940         * inspector/CommandLineAPIHost.cpp:
2941         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
2942         (WebCore::CommandLineAPIHost::disconnect):
2943         (WebCore::CommandLineAPIHost::databaseIdImpl):
2944         * inspector/CommandLineAPIHost.h:
2945         (WebCore::CommandLineAPIHost::init):
2946         * inspector/InspectorController.cpp:
2947         (WebCore::InspectorController::InspectorController):
2948         * inspector/InspectorDatabaseAgent.cpp:
2949         * inspector/InspectorDatabaseAgent.h:
2950         * inspector/InspectorDatabaseInstrumentation.h:
2951         (WebCore::InspectorInstrumentation::didOpenDatabase):
2952         * inspector/InspectorDatabaseResource.cpp:
2953         * inspector/InspectorDatabaseResource.h:
2954         * inspector/InspectorInstrumentation.cpp:
2955         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2956         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
2957         * inspector/InspectorInstrumentation.h:
2958         * inspector/InstrumentingAgents.cpp:
2959         (WebCore::InstrumentingAgents::InstrumentingAgents):
2960         (WebCore::InstrumentingAgents::reset):
2961         * inspector/InstrumentingAgents.h:
2962         * inspector/WorkerInspectorController.cpp:
2963         (WebCore::WorkerInspectorController::WorkerInspectorController):
2964         * loader/EmptyClients.h:
2965         * loader/FrameLoader.cpp:
2966         (WebCore::FrameLoader::stopLoading):
2967         * page/ChromeClient.h:
2968         * platform/FeatureCounterKeys.h:
2969
2970 2015-01-15  Zalan Bujtas  <zalan@apple.com>
2971
2972         Element appears correctly but does not receive event with a large translation.
2973         https://bugs.webkit.org/show_bug.cgi?id=139815
2974
2975         Reviewed by Simon Fraser.
2976
2977         When the hit point gets translated beyond the min/max value of LayoutRect (infiniteRect()),
2978         we fail to find the corresponding layer.
2979         When there's no clipping on a layer, we use min/max values to represent infiniteness.
2980         However it does not work well across types. With IntPoint(hittest) we can address a point that's outside
2981         of LayoutRect's boundary(clipping).
2982         This patch addresses the immediate issue of not being able to hittest transformed layers properly. 
2983         Fixing the representation of infiniteness is tracked here: webkit.org/b/140533
2984
2985         Test: transforms/hittest-translated-content-off-to-infinity-and-back.html
2986
2987         * rendering/ClipRect.cpp:
2988         (WebCore::ClipRect::intersects):
2989
2990 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
2991
2992         tables/mozilla/bugs/bug10633.html is flakey on Yosemite
2993         https://bugs.webkit.org/show_bug.cgi?id=140487
2994
2995         Reviewed by Simon Fraser.
2996
2997         The workaround in https://bugs.webkit.org/show_bug.cgi?id=140253 works
2998         on both OSes.
2999
3000         * platform/graphics/mac/SimpleFontDataMac.mm:
3001         (WebCore::SimpleFontData::platformInit):
3002
3003 2015-01-15  Ryosuke Niwa  <rniwa@webkit.org>
3004
3005         Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
3006         https://bugs.webkit.org/show_bug.cgi?id=140523
3007         <rdar://problem/19464329>
3008
3009         Reviewed by Chris Dumez.
3010
3011         The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
3012         unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.
3013
3014         Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
3015         we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".
3016
3017         See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.
3018
3019         * html/HTMLElement.cpp:
3020         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
3021
3022 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
3023
3024         RenderLayerCompositor: Strange comparison of opacity (float) to boolean.
3025         https://bugs.webkit.org/show_bug.cgi?id=140477.
3026
3027         Reviewed by Simon Fraser.
3028
3029         * rendering/RenderLayerCompositor.cpp:
3030         (WebCore::styleChangeRequiresLayerRebuild): Add a cast to make the meaning of this
3031         code clearer.
3032
3033 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
3034
3035         Unreviewed, rolling out r178531.
3036
3037         Caused LayoutTest ASSERTs/CRASHs on Debug Yosemite build-bot.
3038
3039         Reverted changeset:
3040
3041         "Layers need to be already updated before we call adjustViewSize."
3042         https://bugs.webkit.org/show_bug.cgi?id=135514
3043         http://trac.webkit.org/changeset/178531
3044
3045         * page/FrameView.cpp:
3046         (WebCore::FrameView::layout):
3047         (WebCore::FrameView::updateCompositingLayersAfterScrolling):
3048         (WebCore::FrameView::paintContents):
3049         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
3050         * page/FrameView.h:
3051         * platform/ScrollView.cpp:
3052         (WebCore::ScrollView::scrollTo):
3053         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Deleted.
3054         * platform/ScrollView.h:
3055         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
3056
3057 2015-01-15  Chris Dumez  <cdumez@apple.com>
3058
3059         [WK2] Wire diagnostic logging messages through the UIProcess
3060         https://bugs.webkit.org/show_bug.cgi?id=140486
3061
3062         Reviewed by Sam Weinig.
3063
3064         Wire diagnostic logging messages through the UIProcess.
3065         Eventually, the corresponding bundle API should go away.
3066
3067         * WebCore.vcxproj/WebCore.vcxproj:
3068         * WebCore.vcxproj/WebCore.vcxproj.filters:
3069         Add page/DiagnosticLoggingResultType.h to Windows project.
3070
3071         * WebCore.xcodeproj/project.pbxproj:
3072         Add page/DiagnosticLoggingResultType.h to XCode project.
3073
3074         * html/HTMLMediaElement.cpp:
3075         * loader/EmptyClients.h:
3076         * loader/FrameLoader.cpp:
3077         * page/DiagnosticLoggingClient.h:
3078         * page/DiagnosticLoggingResultType.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
3079         Use new DiagnosticLoggingResultType enum instead of old
3080         DiagnosticLoggingClient::LogType one.
3081
3082 2015-01-15  Zalan Bujtas  <zalan@apple.com>
3083
3084         Reduce LayoutRect::infiniteRect() usage.
3085         https://bugs.webkit.org/show_bug.cgi?id=140511
3086
3087         Reviewed by Simon Fraser.
3088
3089         This is in preparation to get rid of LayoutRect/FloatRect::infiniteRect().
3090
3091         No change in functionality.
3092
3093         * platform/graphics/LayoutRect.h:
3094         (WebCore::LayoutRect::isInfinite):
3095         * rendering/ClipRect.h:
3096         (WebCore::ClipRect::reset):
3097         (WebCore::ClipRect::isEmpty):
3098         (WebCore::ClipRect::isInfinite):
3099         (WebCore::ClipRect::setRect): Deleted.
3100         * rendering/PaintInfo.h:
3101         (WebCore::PaintInfo::applyTransform):
3102         * rendering/RenderLayer.cpp:
3103         (WebCore::RenderLayer::calculateClipRects):
3104         * rendering/RenderLayer.h:
3105         (WebCore::ClipRects::reset):
3106         * rendering/RenderLayerBacking.cpp:
3107         (WebCore::RenderLayerBacking::updateGeometry):
3108         * rendering/RenderLayerCompositor.cpp:
3109         (WebCore::RenderLayerCompositor::clippedByAncestor):
3110
3111 2015-01-15  Chris Dumez  <cdumez@apple.com>
3112
3113         Intermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input file! calling gperf failed: 256 at WebCore/css/makeprop.pl line 901
3114         https://bugs.webkit.org/show_bug.cgi?id=140521
3115
3116         Reviewed by Alexey Proskuryakov.
3117
3118         Close the CSSPropertyNames.gperf file before calling gperf on it
3119         to make sure the content we wrote was flushed. This was causing
3120         intermittent build failures.
3121
3122         * css/makeprop.pl:
3123
3124 2015-01-15  Zalan Bujtas  <zalan@apple.com>
3125
3126         LayerFragment should be able to intersect with ClipRect.
3127         https://bugs.webkit.org/show_bug.cgi?id=140498
3128
3129         Reviewed by Simon Fraser.
3130
3131         No change in functionality.
3132
3133         * rendering/LayerFragment.h:
3134         (WebCore::LayerFragment::intersect):
3135         * rendering/RenderLayer.cpp:
3136         (WebCore::RenderLayer::collectFragments):
3137
3138 2015-01-15  Zalan Bujtas  <zalan@apple.com>
3139
3140         Move ClipRects and ClipRectsCache classes to RenderLayer.cpp.
3141         https://bugs.webkit.org/show_bug.cgi?id=140461
3142
3143         Reviewed by Simon Fraser.
3144
3145         Move classes only used by RenderLayer to RenderLayer.cpp.
3146
3147         No change in functionality.
3148
3149         * rendering/RenderLayer.cpp:
3150         (WebCore::ClipRects::create):
3151         (WebCore::ClipRects::reset):
3152         (WebCore::ClipRects::overflowClipRect):
3153         (WebCore::ClipRects::setOverflowClipRect):
3154         (WebCore::ClipRects::fixedClipRect):
3155         (WebCore::ClipRects::setFixedClipRect):
3156         (WebCore::ClipRects::posClipRect):
3157         (WebCore::ClipRects::setPosClipRect):
3158         (WebCore::ClipRects::fixed):
3159         (WebCore::ClipRects::setFixed):
3160         (WebCore::ClipRects::ref):
3161         (WebCore::ClipRects::deref):
3162         (WebCore::ClipRects::operator==):
3163         (WebCore::ClipRects::operator=):
3164         (WebCore::ClipRects::ClipRects):
3165         (WebCore::ClipRectsCache::ClipRectsCache):
3166         (WebCore::ClipRectsCache::getClipRects):
3167         (WebCore::ClipRectsCache::setClipRects):
3168         (WebCore::ClipRectsCache::getIndex):
3169         (WebCore::RenderLayer::clipRects):
3170         (WebCore::RenderLayer::calculateClipRects):
3171         * rendering/RenderLayer.h:
3172         (WebCore::ClipRects::create): Deleted.
3173         (WebCore::ClipRects::ClipRects): Deleted.
3174         (WebCore::ClipRects::reset): Deleted.
3175         (WebCore::ClipRects::overflowClipRect): Deleted.
3176         (WebCore::ClipRects::setOverflowClipRect): Deleted.
3177         (WebCore::ClipRects::fixedClipRect): Deleted.
3178         (WebCore::ClipRects::setFixedClipRect): Deleted.
3179         (WebCore::ClipRects::posClipRect): Deleted.
3180         (WebCore::ClipRects::setPosClipRect): Deleted.
3181         (WebCore::ClipRects::fixed): Deleted.
3182         (WebCore::ClipRects::setFixed): Deleted.
3183         (WebCore::ClipRects::ref): Deleted.
3184         (WebCore::ClipRects::deref): Deleted.
3185         (WebCore::ClipRects::operator==): Deleted.
3186         (WebCore::ClipRects::operator=): Deleted.
3187         (WebCore::ClipRectsCache::ClipRectsCache): Deleted.
3188         (WebCore::ClipRectsCache::getClipRects): Deleted.
3189         (WebCore::ClipRectsCache::setClipRects): Deleted.
3190         (WebCore::ClipRectsCache::getIndex): Deleted.
3191
3192 2015-01-15  Dhi Aurrahman  <diorahman@rockybars.com>
3193
3194         Canonicalization of :lang() should preserve the :lang()'s arguments representations
3195         https://bugs.webkit.org/show_bug.cgi?id=139928
3196
3197         Reviewed by Benjamin Poulain.
3198
3199         Preserve the representation of IDENT and STRING when serializing the 
3200         :lang(). For example, :lang(foo,"bar"   ,baz) should be serialized as 
3201         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
3202
3203         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
3204         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
3205         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList 
3206         respectively, since those methods are being exclusively used in respect
3207         with :lang().
3208
3209         Update the test of serializing :lang() with IDENT and STRING arguments.
3210
3211         * css/CSSGrammar.y.in:
3212         * css/CSSParserValues.cpp:
3213         (WebCore::CSSParserSelector::setLangArgumentList):
3214         (WebCore::CSSParserSelector::setArgumentList): Deleted.
3215         * css/CSSParserValues.h:
3216         (WebCore::CSSParserString::init):
3217         (WebCore::CSSParserString::clear):
3218         (WebCore::CSSParserString::isParsedFromString):
3219         (WebCore::CSSParserString::setParsedFromString):
3220         * css/CSSSelector.cpp:
3221         (WebCore::appendLangArgumentList):
3222         (WebCore::CSSSelector::selectorText):
3223         (WebCore::CSSSelector::setLangArgumentList):
3224         (WebCore::appendArgumentList): Deleted.
3225         (WebCore::CSSSelector::setArgumentList): Deleted.
3226         * css/CSSSelector.h:
3227         (WebCore::CSSSelector::langArgumentList):
3228         (WebCore::CSSSelector::langArgumentParsedFromStringFlagList):
3229         (WebCore::CSSSelector::argumentList): Deleted.
3230         * css/SelectorChecker.cpp:
3231         (WebCore::SelectorChecker::checkOne):
3232
3233 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
3234
3235         Layers need to be already updated before we call adjustViewSize
3236         https://bugs.webkit.org/show_bug.cgi?id=135514
3237
3238         Reviewed by Simon Fraser.
3239
3240         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
3241
3242         Defer updating scrollbars until we have finished layout. This
3243         has a couple of benefits:
3244         (1) We do not attempt to modify render layers during layout.
3245         (2) In WK1 we do not attempt to paint during layout.
3246
3247         Add a new virtual predicate to ScrollView indicating when we are in
3248         layout so that calls to setContentsSize do not attempt
3249         to adjust scrollbars.
3250
3251         Modify FrameView to set its ScrollView state to block drawing
3252         scrollbar updates during layout. Also add a post-layout
3253         handler to complete the scrollbar updates after layout is
3254         finished.
3255
3256         * page/FrameView.cpp:
3257         (WebCore::FrameView::layout):
3258         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
3259         * page/FrameView.h:
3260         * platform/ScrollView.cpp:
3261         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
3262         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
3263         the scroll delta and apply it after the layout is complete.
3264         * platform/ScrollView.h:
3265         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
3266
3267 2015-01-15  Benjamin Poulain  <benjamin@webkit.org>
3268
3269         When building the NFA of the global disjunction, share the prefix subgraph of existing subpatterns
3270         https://bugs.webkit.org/show_bug.cgi?id=140465
3271
3272         Reviewed by Andreas Kling.
3273
3274         This patch updates the parser to produce smaller graphs when multiple patterns
3275         of the rule list share a common prefix.
3276
3277         Previously, GraphBuilder would generate subgraph in place of each parsed
3278         atom. We now only create subgraph if an atom does not appear in the prefix tree.
3279
3280         We accumulate the parsing information into small uint16_t named TrivialAtom.
3281         When generating the subgraph for an new atom, we first check if the prefix tree already
3282         has a corresponding subgraph for that atom. If it does, we do not generate anything and we extend the existing
3283         graph. If there is no existing prefix, we create the subgraph and extend the prefix tree.
3284
3285         Sharing prefix subtrees slows down the subtree generation a bit but the resulting graph is much
3286         simpler for many kind of inputs.
3287
3288         * WebCore.xcodeproj/project.pbxproj:
3289         * contentextensions/ContentExtensionsBackend.cpp:
3290         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
3291         The URLFilterParser now maintains states (the prefix tree) between patterns.
3292
3293         * contentextensions/DFA.cpp:
3294         (WebCore::ContentExtensions::DFA::debugPrintDot):
3295         * contentextensions/DFANode.h:
3296         Fix a typo :)
3297
3298         * contentextensions/NFA.cpp:
3299         (WebCore::ContentExtensions::NFA::createNode):
3300         (WebCore::ContentExtensions::NFA::setFinal):
3301         (WebCore::ContentExtensions::NFA::restoreToGraphSize):
3302         (WebCore::ContentExtensions::NFA::addRuleId):
3303         (WebCore::ContentExtensions::NFA::debugPrintDot):
3304         * contentextensions/NFA.h:
3305         (WebCore::ContentExtensions::NFA::addRuleId):
3306         * contentextensions/NFANode.cpp: Removed.
3307         * contentextensions/NFANode.h:
3308         NFA nodes from two patterns are now "merged" by construction, thus we need
3309         to keep track of multiple rules per node.
3310
3311         * contentextensions/NFAToDFA.cpp:
3312         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
3313         * contentextensions/URLFilterParser.cpp:
3314         (WebCore::ContentExtensions::trivialAtomFromAsciiCharacter):
3315         (WebCore::ContentExtensions::quantifyTrivialAtom):
3316         (WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin):
3317         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
3318         (WebCore::ContentExtensions::GraphBuilder::m_LastPrefixTreeEntry):
3319         (WebCore::ContentExtensions::GraphBuilder::finalize):
3320         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
3321         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
3322         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
3323         (WebCore::ContentExtensions::GraphBuilder::fail):
3324         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
3325         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
3326         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
3327         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
3328         (WebCore::ContentExtensions::URLFilterParser::addPattern):
3329         (WebCore::ContentExtensions::GraphBuilder::m_lastAtom): Deleted.
3330         (WebCore::ContentExtensions::URLFilterParser::parse): Deleted.
3331         * contentextensions/URLFilterParser.h:
3332         (WebCore::ContentExtensions::URLFilterParser::hasError): Deleted.
3333         (WebCore::ContentExtensions::URLFilterParser::errorMessage): Deleted.
3334
3335 2015-01-14  Alexey Proskuryakov  <ap@apple.com>
3336
3337         Web Inspector and regular console use different source code locations for messages
3338         https://bugs.webkit.org/show_bug.cgi?id=140478
3339
3340         Reviewed by Brian Burg.
3341
3342         We now create a ConsoleMessage object in a place where we can look at it and use
3343         the source location it computed in a client call.
3344
3345         * inspector/InspectorConsoleInstrumentation.h:
3346         (WebCore::InspectorInstrumentation::addMessageToConsole):
3347         * inspector/InspectorInstrumentation.cpp:
3348         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
3349         * inspector/InspectorInstrumentation.h:
3350         * inspector/WebConsoleAgent.cpp:
3351         (WebCore::WebConsoleAgent::didFinishXHRLoading):
3352         (WebCore::WebConsoleAgent::didReceiveResponse):
3353         (WebCore::WebConsoleAgent::didFailLoading):
3354         * page/PageConsoleClient.cpp:
3355         (WebCore::PageConsoleClient::addMessage):
3356         (WebCore::PageConsoleClient::messageWithTypeAndLevel):
3357         * workers/WorkerGlobalScope.cpp:
3358         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
3359
3360 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
3361
3362         [Win] Unreviewed Windows build fix.
3363
3364         More missing Font->FontCascade changes.
3365
3366         * platform/win/WebCoreTextRenderer.cpp:
3367         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
3368         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
3369
3370 2015-01-15  Antti Koivisto  <antti@apple.com>
3371
3372         REGRESSION(r178133): Membuster regressed ~4%
3373         https://bugs.webkit.org/show_bug.cgi?id=140495
3374
3375         Reviewed by Andreas Kling.
3376
3377         * platform/graphics/FontCache.cpp:
3378         (WebCore::FontCache::purgeInactiveFontData):
3379
3380             Fonts may ref other fonts. Keep clearing until there are no changes.
3381
3382 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
3383
3384         [Win] Unreviewed build fix.
3385
3386         * platform/graphics/win/FontCacheWin.cpp:
3387         * platform/win/DragImageWin.cpp:
3388         * platform/win/WebCoreTextRenderer.h:
3389
3390 2015-01-15  Antti Koivisto  <antti@apple.com>
3391
3392         Try to fix windows build.
3393
3394         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3395         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3396         (PlatformCALayerWinInternal::displayCallback):
3397         * platform/win/DragImageWin.cpp:
3398         (WebCore::dragLabelFont):
3399         (WebCore::createDragImageForLink):
3400         * platform/win/PopupMenuWin.cpp:
3401         (WebCore::PopupMenuWin::calculatePositionAndSize):
3402         (WebCore::PopupMenuWin::paint):
3403         * platform/win/WebCoreTextRenderer.cpp:
3404         (WebCore::doDrawTextAtPoint):
3405         (WebCore::WebCoreDrawDoubledTextAtPoint):
3406         (WebCore::WebCoreTextFloatWidth):
3407         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
3408         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
3409         * rendering/RenderThemeSafari.cpp:
3410         (WebCore::RenderThemeSafari::setFontFromControlSize):
3411
3412 2015-01-15  Antti Koivisto  <antti@apple.com>
3413
3414         Unreviewed, rolling out r178518.
3415
3416         Didn't mean to commit some of this
3417
3418         Reverted changeset:
3419
3420         "Try to fix windows build."
3421         http://trac.webkit.org/changeset/178518
3422
3423 2015-01-15  Antti Koivisto  <antti@apple.com>
3424
3425         Try to fix windows build.
3426
3427         * platform/graphics/Font.cpp: Copied from Source/WebCore/platform/graphics/SimpleFontData.cpp.
3428         * platform/graphics/Font.h: Copied from Source/WebCore/platform/graphics/SimpleFontData.h.
3429         * platform/graphics/FontCascadeFastPath.cpp: Copied from Source/WebCore/platform/graphics/FontFastPath.cpp.
3430         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3431         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3432         (PlatformCALayerWinInternal::displayCallback):
3433         * platform/graphics/ios/FontIOS.mm: Copied from Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm.
3434         * platform/graphics/mac/FontCascadeComplexTextMac.cpp: Copied from Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp.
3435         * platform/graphics/mac/FontCascadeMac.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
3436         * platform/graphics/mac/FontCoreText.cpp: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp.
3437         * platform/graphics/mac/FontMac.mm: Replaced with Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
3438         * platform/win/DragImageWin.cpp:
3439         (WebCore::dragLabelFont):
3440         (WebCore::createDragImageForLink):
3441         * platform/win/PopupMenuWin.cpp:
3442         (WebCore::PopupMenuWin::calculatePositionAndSize):
3443         (WebCore::PopupMenuWin::paint):
3444         * platform/win/WebCoreTextRenderer.cpp:
3445         (WebCore::doDrawTextAtPoint):
3446         (WebCore::WebCoreDrawDoubledTextAtPoint):
3447         (WebCore::WebCoreTextFloatWidth):
3448         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
3449         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
3450         * rendering/RenderThemeSafari.cpp:
3451         (WebCore::RenderThemeSafari::setFontFromControlSize):
3452
3453 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
3454
3455         http/tests/misc/acid3.html is flakey on Mavericks
3456         https://bugs.webkit.org/show_bug.cgi?id=140253
3457
3458         Reviewed by Alexey Proskuryakov.
3459
3460         CoreText has a bug <rdar://problem/19433490> in which kerning is not applied for a font
3461         if a CTTypesetter is created using that font before a call to CTFontTransformGlyphs. We
3462         often create typesetters in the complex code path, so it's not obvious when this bug
3463         might present itself. This patch simply makes a dummy invocation of
3464         CTFontTransformGlyphs() when creating a SimpleFontData.
3465
3466         No new tests because this is covered by http/tests/misc/acid3.html.
3467
3468         * platform/graphics/mac/SimpleFontDataMac.mm:
3469         (WebCore::SimpleFontData::platformInit):
3470
3471 2015-01-15  Chris Dumez  <cdumez@apple.com>
3472
3473         Get rid of custom StyleBuilder code for 'line-height' CSS property
3474         https://bugs.webkit.org/show_bug.cgi?id=140462
3475
3476         Reviewed by Antti Koivisto.
3477
3478         Get rid of custom StyleBuilder code for 'line-height' CSS property by
3479         using a conditional converter.
3480
3481         * css/CSSPropertyNames.in:
3482         * css/StyleBuilderConverter.h:
3483         (WebCore::StyleBuilderConverter::convertLineHeight):
3484         * css/StyleBuilderCustom.h:
3485         (WebCore::StyleBuilderCustom::applyValueLineHeight):
3486         (WebCore::StyleBuilderCustom::convertLineHeight): Deleted.
3487
3488 2015-01-15  Antti Koivisto  <antti@apple.com>
3489
3490         Rename Font to FontCascade
3491         https://bugs.webkit.org/show_bug.cgi?id=140442
3492
3493         Reviewed by Darin Adler.
3494
3495         We can then rename SimpleFontData to Font. This will match the usual definition of a "font".
3496
3497 2015-01-15  Mihnea Ovidenie  <mihnea@adobe.com>
3498
3499         [CSSRegions] Assert failure in RenderBlock::locateFlowThreadContainingBlock when showing the render tree debug info
3500         https://bugs.webkit.org/show_bug.cgi?id=140441
3501
3502         Reviewed by Andrei Bucur.
3503
3504         When showing the render tree debug information for an element inside a flow thread,
3505         we will display the region range information for all the render boxes. To avoid
3506         computation of flow thread containing block in these situations, we will use
3507         only the cached flow thread containing block information.
3508
3509         No new tests as this code path is only touched when using showRenderTree* methods.
3510
3511         * rendering/RenderObject.cpp:
3512         (WebCore::flowThreadContainingBlockFromRenderer):
3513         (WebCore::RenderObject::showRegionsInformation):
3514
3515 2015-01-14  Simon Fraser  <simon.fraser@apple.com>
3516
3517         Graphics corruption after Find on some pages
3518         https://bugs.webkit.org/show_bug.cgi?id=140489
3519
3520         Reviewed by Zalan Bujtas.
3521         
3522         After doing a Find on http://shop.outlier.cc/shop/retail/chino.html,
3523         garbage could appear on some parts of the page. This is caused by creating
3524         a compositing layer which is marked as opaque, yet failing to paint the entire
3525         layer contents.
3526         
3527         This was caused by a bug in RenderBox::computeBackgroundIsKnownToBeObscured()
3528         logic. On the page in question, doing a Find could cause overflow:hidden sections
3529         to get scrolled (since Find can reveal the selection by scrolling overflow).
3530         However, the render tree walking under RenderBox::foregroundIsKnownToBeOpaqueInRect()
3531         fails to take overflow scrolling into account, so gives the wrong answer
3532         in some content configurations. As a result, we'd think that the background
3533         is obscured, and never paint it.
3534         
3535         Conservative fix is to have isCandidateForOpaquenessTest() return false
3536         when the content has any non-zero scroll offset.
3537
3538         Tests: compositing/contents-opaque/opaque-with-scrolled.html
3539                fast/backgrounds/opaque-scrolled-paint-background.html
3540
3541         * rendering/RenderBox.cpp:
3542         (WebCore::isCandidateForOpaquenessTest):
3543
3544 2015-01-14  Jer Noble  <jer.noble@apple.com>
3545
3546         [Mac][MSE] Stalled YouTube playback does not allow display to sleep.
3547         https://bugs.webkit.org/show_bug.cgi?id=140468
3548         rdar://problem/19171162
3549
3550         Reviewed by Eric Carlson.
3551
3552         Test: media/media-source/media-source-stalled-holds-sleep-assertion.html
3553
3554         The unstated convention of MediaPlayerPrivate::paused() is that implementations should 
3555         return 'true' if the playback rate is 0. However, MediaPlayerPrivateMediaSourceAVFObjC
3556         was returning 'false' if it was supposed to be playing, regardless of the actual rate.
3557         This caused a check in HTMLMediaElement of whether to release the sleep assertion token
3558         to fail, thinking the media engine was still playing.
3559
3560         Add some testing infrastructure to allow us to test whether the media element is disabling
3561         display sleep from within layout tests.
3562
3563         * html/HTMLMediaElement.h:
3564         (WebCore::HTMLMediaElement::isDisablingSleep):
3565         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3566         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
3567         * testing/Internals.cpp:
3568         (WebCore::Internals::elementIsBlockingDisplaySleep):
3569         * testing/Internals.h:
3570         * testing/Internals.idl:
3571
3572 2015-01-14  Zalan Bujtas  <zalan@apple.com>
3573
3574         Move LayoutFragment and ClipRect to their own files.
3575         https://bugs.webkit.org/show_bug.cgi?id=140457
3576
3577         Reviewed by Simon Fraser.
3578
3579         Move these classes to their own files to to make RenderLayer.h less heavy.
3580
3581         No change in functionality.
3582
3583         * WebCore.xcodeproj/project.pbxproj:
3584         * rendering/ClipRect.cpp: Added.
3585         (WebCore::ClipRect::intersects):
3586         * rendering/ClipRect.h: Added.
3587         (WebCore::ClipRect::ClipRect):
3588         (WebCore::ClipRect::rect):
3589         (WebCore::ClipRect::setRect):
3590         (WebCore::ClipRect::affectedByRadius):
3591         (WebCore::ClipRect::setAffectedByRadius):
3592         (WebCore::ClipRect::operator==):
3593         (WebCore::ClipRect::operator!=):
3594         (WebCore::ClipRect::intersect):
3595         (WebCore::ClipRect::move):
3596         (WebCore::ClipRect::moveBy):
3597         (WebCore::ClipRect::isEmpty):
3598         (WebCore::ClipRect::intersects):
3599         (WebCore::ClipRect::inflateX):
3600         (WebCore::ClipRect::inflateY):
3601         (WebCore::ClipRect::inflate):
3602         (WebCore::intersection):
3603         * rendering/LayerFragment.h: Added.
3604         (WebCore::LayerFragment::setRects):
3605         (WebCore::LayerFragment::moveBy):
3606         (WebCore::LayerFragment::intersect):
3607         * rendering/RenderFlowThread.h:
3608         * rendering/RenderLayer.cpp:
3609         (WebCore::ClipRect::intersects): Deleted.
3610         * rendering/RenderLayer.h:
3611         (WebCore::ClipRect::ClipRect): Deleted.
3612         (WebCore::ClipRect::rect): Deleted.
3613         (WebCore::ClipRect::setRect): Deleted.
3614         (WebCore::ClipRect::affectedByRadius): Deleted.
3615         (WebCore::ClipRect::setAffectedByRadius): Deleted.
3616         (WebCore::ClipRect::operator==): Deleted.
3617         (WebCore::ClipRect::operator!=): Deleted.
3618         (WebCore::ClipRect::intersect): Deleted.
3619         (WebCore::ClipRect::move): Deleted.
3620         (WebCore::ClipRect::moveBy): Deleted.
3621         (WebCore::ClipRect::isEmpty): Deleted.
3622         (WebCore::ClipRect::intersects): Deleted.
3623         (WebCore::ClipRect::inflateX): Deleted.
3624         (WebCore::ClipRect::inflateY): Deleted.
3625         (WebCore::ClipRect::inflate): Deleted.
3626         (WebCore::intersection): Deleted.
3627         (WebCore::LayerFragment::LayerFragment): Deleted.
3628         (WebCore::LayerFragment::setRects): Deleted.
3629         (WebCore::LayerFragment::moveBy): Deleted.
3630         (WebCore::LayerFragment::intersect): Deleted.
3631         * rendering/RenderMultiColumnSet.h:
3632         * rendering/RenderRegion.h:
3633         * rendering/RenderTreeAsText.cpp:
3634
3635 2015-01-14  Commit Queue  <commit-queue@webkit.org>
3636
3637         Unreviewed, rolling out r178438.
3638         https://bugs.webkit.org/show_bug.cgi?id=140484
3639
3640         Broke a few MediaSource tests (Requested by JoePeck on
3641         #webkit).
3642
3643         Reverted changeset:
3644
3645         "[MSE] Implement per TrackBuffer buffered."
3646         https://bugs.webkit.org/show_bug.cgi?id=139813
3647         http://trac.webkit.org/changeset/178438
3648
3649 2015-01-14  Enrica Casucci  <enrica@apple.com>
3650
3651         REGRESSION (r165385): Crash when applying autocorrection exceeds maximum text area length.
3652         https://bugs.webkit.org/show_bug.cgi?id=137902
3653         rdar://problem/18568864
3654
3655         Reviewed by Darin Adler.
3656
3657         Test: editing/text-iterator/invalid-subrange.html
3658
3659         characterSubrange should check the iterator position after each advance.
3660         This changed adds a new method to the Internals object to be able to test this.
3661
3662         * editing/TextIterator.cpp:
3663         (WebCore::characterSubrange):
3664         (WebCore::TextIterator::subrange):
3665         (WebCore::findPlainText):
3666         * testing/Internals.cpp:
3667         (WebCore::Internals::subrange):
3668         * testing/Internals.h:
3669         * testing/Internals.idl:
3670
3671 2015-01-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
3672
3673         REGRESSION (r154769): Wrong <title> taken as a tooltip for SVG element.
3674         https://bugs.webkit.org/show_bug.cgi?id=139690.
3675
3676         Reviewed by Daniel Bates.
3677
3678         Before r154769, we were calling Traversal<SVGTitleElement>::firstWithin(), which returns
3679         the first immediate SVGTitleElement child. In r154769, Traversal<SVGTitleElement>::firstWithin()
3680         was replaced by descendantsOfType<SVGTitleElement> which returns all descendants SVGTitleElements.
3681         Then we were returning the first element of these descendants, which may not be an immediate
3682         child of the element, as the title of the SVGElement. This was the reason of this bug. The
3683         fix is to use childrenOfType<SVGTitleElement>() instead, which returns the immediate SVGTitleElement
3684         children of an SVGElement.
3685
3686         Also we were not following exactly the specs for the rootmost SVG element's title value.
3687         According to the W3C specs, for stand-alone SVG documents only, the rootmost SVG element
3688         should not return a title. But we were not returning a title for the rootmost SVG element
3689         always. The fix is to return a empty title for the rootmost SVG element only if topDocument()
3690         of the element isSVGDocument().
3691         
3692         NOTE: The main SVG specs http://www.w3.org/TR/SVG/interact.html#hit-testing (W3C Recommendation
3693         16 August 2011) and http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements (W3C
3694         Recommendation 16 August 2011) do not say how the tooltip of an SVG element is calculated. But
3695         the SVG tiny specs http://www.w3.org/TR/SVGTiny12/struct.html#uiTitleDescBehavior (W3C
3696         Recommendation 22 December 2008) however explains well the tooltip calculation for the embedded
3697         and the stand-alone SVG cases. And it seems this what we should rely on.
3698
3699         Test: svg/hittest/svg-standalone-tooltip.svg
3700               svg/hittest/svg-embedded-tooltip.html
3701
3702         * WebCore.exp.in:
3703         * rendering/HitTestResult.h:
3704         Make HitTestResult::setInnerNode be WEBCORE_EXPORT
3705         
3706         * svg/SVGElement.cpp:
3707         (WebCore::SVGElement::title):
3708         Replace descendantsOfType<SVGTitleElement>() by childrenOfType<SVGTitleElement>().
3709         Fix the title value of the rootmost SVG element.
3710         
3711         * testing/Internals.cpp:
3712         (WebCore::Internals::toolTipFromElement):
3713         * testing/Internals.h:
3714         * testing/Internals.idl:
3715         Add a new internal function toolTipFromElement() which returns the tooltip text for a
3716         given element.
3717
3718 2015-01-14  Csaba Osztrogonác  <ossy@webkit.org>
3719
3720         Buildfix after r178434
3721         https://bugs.webkit.org/show_bug.cgi?id=140467
3722
3723         Reviewed by Chris Dumez.
3724
3725         * css/StyleBuilderConverter.h:
3726         (WebCore::StyleBuilderConverter::convertPerspective):
3727
3728 2015-01-14  Benjamin Poulain  <bpoulain@apple.com>
3729
3730         Build fix for NFAToDFA on ARM
3731
3732         * contentextensions/NFAToDFA.cpp:
3733         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
3734         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
3735
3736 2015-01-14  Bartlomiej Gajda  <b.gajda@samsung.com>
3737
3738         [MSE] Implement per TrackBuffer buffered.
3739         https://bugs.webkit.org/show_bug.cgi?id=139813.
3740
3741         Reviewed by Jer Noble.
3742
3743         Added implementation of SourceBuffer buffered() algorithm as per specification,
3744         and caching mechanism called when samples are added, removed, or MediaSource
3745         readyState is changed.
3746
3747         Tests: media/media-source/media-source-multiple-trackBuffers-buffered-in-ended-state.html
3748                media/media-source/media-source-multiple-trackBuffers-buffered.html
3749
3750         * Modules/mediasource/MediaSource.cpp:
3751         (WebCore::MediaSource::setReadyState):
3752         * Modules/mediasource/SourceBuffer.cpp:
3753         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
3754         (WebCore::SourceBuffer::SourceBuffer):
3755         (WebCore::SourceBuffer::buffered):
3756         (WebCore::SourceBuffer::invalidateBuffered):
3757         (WebCore::SourceBuffer::recalculateBuffered):
3758         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
3759         (WebCore::SourceBuffer::removeCodedFrames):
3760         (WebCore::SourceBuffer::evictCodedFrames):
3761         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3762         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
3763         (WebCore::SourceBuffer::hasCurrentTime):
3764         * Modules/mediasource/SourceBuffer.h:
3765
3766 2015-01-14  Benjamin Poulain  <benjamin@webkit.org>
3767
3768         Do not create new set for every sub-operation when converting a NFA to DFA
3769         https://bugs.webkit.org/show_bug.cgi?id=140380
3770
3771         Reviewed by Andreas Kling.
3772
3773         This is the first step toward making the NFA-to-DFA conversion more scalable: instead
3774         of creating new sets for each step of the algorithm, we use two kinds of sets
3775         and never do any copy.
3776
3777         The first new tool to do that is UniqueNodeIdSetImpl. It represents a set of NFA state corresponding to a DFA
3778         state. It is unique per DFA state.
3779
3780         HashableNodeIdSet is a helper tool storing a UniqueNodeIdSetImpl.
3781
3782         The creation of new sets now goes like this:
3783         1) Get a NodeIdSet for each possible transition.
3784         2) For each transition:
3785            2a) Extend the NodeIdSet in place with its epsilon closure.
3786            2b) Get the UniqueNodeIdSetImpl corresponding to the new set we discovered.
3787            2c) If the UniqueNodeIdSetImpl is new, queue it for processing.
3788
3789         * WebCore.xcodeproj/project.pbxproj:
3790         * contentextensions/ContentExtensionsDebugging.h: Copied from Source/WebCore/contentextensions/DFANode.h.
3791         * contentextensions/ContentExtensionsBackend.cpp:
3792         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
3793         * contentextensions/ContentExtensionsManager.cpp:
3794         (WebCore::ContentExtensions::ExtensionsManager::loadExtension):
3795         Added some logging to inspect more easily what the clients are sending.
3796
3797         * contentextensions/DFA.cpp:
3798         * contentextensions/DFA.h:
3799         * contentextensions/DFANode.h:
3800         * contentextensions/NFA.cpp:
3801         * contentextensions/NFA.h:
3802         * contentextensions/NFAToDFA.cpp:
3803
3804         (WebCore::ContentExtensions::epsilonClosure):
3805         Instead of returning a new HashSet, extend the input HashSet.
3806
3807         (WebCore::ContentExtensions::UniqueNodeIdSetImpl::buffer):
3808         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
3809         (WebCore::ContentExtensions::UniqueNodeIdSet::operator=):
3810         (WebCore::ContentExtensions::UniqueNodeIdSet::~UniqueNodeIdSet):
3811         (WebCore::ContentExtensions::UniqueNodeIdSet::operator==):
3812         (WebCore::ContentExtensions::UniqueNodeIdSet::impl):
3813         (WebCore::ContentExtensions::UniqueNodeIdSet::hash):
3814         (WebCore::ContentExtensions::UniqueNodeIdSet::isEmptyValue):
3815         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
3816         (WebCore::ContentExtensions::UniqueNodeIdSetHash::hash):
3817         (WebCore::ContentExtensions::UniqueNodeIdSetHash::equal):
3818         UniqueNodeIdSetImpl is a compact representation of a NodeIdSet corresponding to a DFA node.
3819
3820         It is never built directly, it is only built on demand through NodeIdSetToUniqueNodeIdSetTranslator
3821         from a NodeIdSet.
3822
3823         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
3824         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::hash):
3825         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::equal):
3826         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
3827         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::operator[]):
3828         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::size):
3829         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::begin):
3830         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::end):
3831         (WebCore::ContentExtensions::populateTransitionsExcludingEpsilon):
3832         (WebCore::ContentExtensions::NFAToDFA::convert):
3833         (WebCore::ContentExtensions::setTransitionsExcludingEpsilon): Deleted.
3834         (WebCore::ContentExtensions::HashableNodeIdSet::HashableNodeIdSet): Deleted.
3835         (WebCore::ContentExtensions::HashableNodeIdSet::operator=): Deleted.
3836         (WebCore::ContentExtensions::HashableNodeIdSet::isEmptyValue): Deleted.
3837         (WebCore::ContentExtensions::HashableNodeIdSet::isDeletedValue): Deleted.
3838         (WebCore::ContentExtensions::HashableNodeIdSet::nodeIdSet): Deleted.
3839         (WebCore::ContentExtensions::HashableNodeIdSetHash::hash): Deleted.
3840         (WebCore::ContentExtensions::HashableNodeIdSetHash::equal): Deleted.
3841         (WebCore::ContentExtensions::addDFAState): Deleted.
3842
3843 2015-01-14  Chris Dumez  <cdumez@apple.com>
3844
3845         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
3846         https://bugs.webkit.org/show_bug.cgi?id=140347
3847
3848         Reviewed by Darin Adler.
3849
3850         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in by:
3851         - Removing the static_cast to the destination type in the generated
3852           StyleBuilder code and let compiler implicitly convert the
3853           CSSPrimitiveValue to the setter's argument type.
3854         - Updating conditional converters to return a WTF::Optional<>
3855           instead of returning a boolean and having an output argument
3856           passed by reference. This way, we can use "auto" in the generated
3857           StyleBuilder code to deduce the return type.
3858
3859         * css/CSSPropertyNames.in:
3860         Drop TypeName parameter from all properties as it is no longer needed.
3861
3862         * css/StyleBuilderConverter.h:
3863         (WebCore::StyleBuilderConverter::convertGridTrackSize):
3864         (WebCore::StyleBuilderConverter::convertGridPosition):
3865         (WebCore::StyleBuilderConverter::convertWordSpacing):
3866         (WebCore::StyleBuilderConverter::convertPerspective):
3867         (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
3868         (WebCore::StyleBuilderConverter::convertFilterOperations):
3869         (WebCore::StyleBuilderConverter::convertMaskImageOperations):
3870         Update conditional converters to return an Optional<>.
3871
3872         * css/makeprop.pl:
3873         (generateValueSetter):
3874         Drop support for TypeName, stop using static_cast to destination
3875         type and update the generated code now that the conditional
3876         converters return an Optional.
3877
3878         * platform/efl/RenderThemeEfl.cpp:
3879         (WebCore::RenderThemeEfl::systemFont):
3880         * platform/graphics/Font.cpp:
3881         (WebCore::Font::Font):
3882         * platform/graphics/FontDescription.h:
3883         (WebCore::FontDescription::setIsItalic):
3884         (WebCore::FontDescription::setIsSmallCaps):
3885         (WebCore::FontDescription::setItalic): Deleted.
3886         (WebCore::FontDescription::setSmallCaps): Deleted.
3887         * rendering/RenderThemeGtk.cpp:
3888         (WebCore::RenderThemeGtk::systemFont):
3889         * rendering/RenderThemeIOS.mm:
3890         (WebCore::RenderThemeIOS::systemFont):
3891         * rendering/RenderThemeMac.mm:
3892         (WebCore::RenderThemeMac::systemFont):
3893         * rendering/RenderThemeSafari.cpp:
3894         (WebCore::RenderThemeSafari::systemFont):
3895         * rendering/RenderThemeWin.cpp:
3896         (WebCore::fillFontDescription):
3897         * rendering/mathml/RenderMathMLToken.cpp:
3898         (WebCore::RenderMathMLToken::updateStyle):
3899         Now that we call the RenderStyle setters with a CSSPrimitiveValue
3900         and let it be implicitly converted to the right type, instead of
3901         doing an explicit static_cast, two setters on FontDescription
3902         were ambiguous: setItalic() / setSmallCaps(). Rename the overloads
3903         taking a boolean in argument to setIsItalic() / setIsSmallCaps()
3904         to resolve the ambiguity.
3905
3906 2015-01-14  Jer Noble  <jer.noble@apple.com>
3907
3908         Null-deref crash when seeking immediately before looping.
3909         https://bugs.webkit.org/show_bug.cgi?id=140394
3910
3911         Reviewed by Eric Carlson.
3912
3913         It is possible for finishSeek() to be called when a seek() has caused a pending seek task
3914         to be scheduled, but before that pending seek task is run. In this case, if a seek request
3915         is issued, the existing pending seek task will not be cancelled, which will cause a crash
3916         when the pending seek task is run.
3917
3918         When checking whether an existing seek task needs to be cancelled, check the actual timer,
3919         rather than the m_seeking boolean, so that this case is covered.
3920
3921         Test: media/video-ended-seek-crash.html
3922
3923         * html/HTMLMediaElement.cpp:
3924         (WebCore::HTMLMediaElement::seekWithTolerance):
3925
3926 2015-01-14  Brent Fulgham  <bfulgham@apple.com>
3927
3928         [Win] Layout Test fast/css/crash-on-custom-cursor-when-loading.html is failing
3929         https://bugs.webkit.org/show_bug.cgi?id=140425
3930
3931         Reviewed by Anders Carlsson.
3932
3933         * platform/win/CursorWin.cpp:
3934         (WebCore::createSharedCursor): Return nullptr when operating system
3935         cannot support the requested icon specification.
3936         (WebCore::Cursor::ensurePlatformCursor): Check for 'createSharedCursor'
3937         returning nullptr, and fall back to the default icon construction.
3938
3939 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3940
3941         REGRESSION(r178367): [GStreamer] Several media tests time out after r178367
3942         https://bugs.webkit.org/show_bug.cgi?id=140437
3943
3944         Reviewed by Philippe Normand.
3945
3946         Add implementation for MediaPlayerPrivate::rate() to GStreamer
3947         media backend.
3948
3949         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3950         (WebCore::MediaPlayerPrivateGStreamer::rate):
3951         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3952
3953 2015-01-13  Commit Queue  <commit-queue@webkit.org>
3954
3955         Unreviewed, rolling out r178390, r178392, r178398, r178400,
3956         r178402, and r178410.
3957         https://bugs.webkit.org/show_bug.cgi?id=140431
3958
3959         Way too many failures to skip (Requested by ap_ on #webkit).
3960
3961         Reverted changesets:
3962
3963         "WebGL2: Support webgl2 context creation."
3964         https://bugs.webkit.org/show_bug.cgi?id=126408
3965         http://trac.webkit.org/changeset/178390
3966
3967         "Unreviewed iOS build fix after r178390."
3968         http://trac.webkit.org/changeset/178392
3969
3970         "[Unreviewed] Windows build fix after r178390."
3971         http://trac.webkit.org/changeset/178398
3972
3973         "[Unreviewed] Speculative test fix after r178390."
3974         http://trac.webkit.org/changeset/178400
3975
3976         "[Unreviewed] Skip webgl tests for temporarily."
3977         https://bugs.webkit.org/show_bug.cgi?id=140423
3978         http://trac.webkit.org/changeset/178402
3979
3980         "[EFL] Fix build after r178390"
3981         https://bugs.webkit.org/show_bug.cgi?id=140424
3982         http://trac.webkit.org/changeset/178410
3983
3984 2015-01-13  Hunseop Jeong  <hs85.jeong@samsung.com>
3985
3986         [EFL] Fix build after r178390 
3987         https://bugs.webkit.org/show_bug.cgi?id=140424
3988
3989         Reviewed by Csaba Osztrogonác.
3990
3991         * CMakeLists.txt: 
3992
3993 2015-01-13  Zalan Bujtas  <zalan@apple.com>
3994
3995         Simple line layout: Refactor TextFragment class.
3996         https://bugs.webkit.org/show_bug.cgi?id=140417
3997
3998         Reviewed by Andreas Kling.
3999
4000         Introduce text fragment type and use class member initializers.
4001
4002         No change in functionality.
4003
4004         * rendering/SimpleLineLayout.cpp:
4005         (WebCore::SimpleLineLayout::TextFragment::TextFragment):
4006         (WebCore::SimpleLineLayout::LineState::addUncommitted):
4007         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
4008         (WebCore::SimpleLineLayout::nextFragment):
4009         (WebCore::SimpleLineLayout::createLineRuns):
4010
4011 2015-01-13  Commit Queue  <commit-queue@webkit.org>
4012
4013         Unreviewed, rolling out r178400.
4014         https://bugs.webkit.org/show_bug.cgi?id=140422
4015
4016         Test fix breaks build (Requested by rfong on #webkit).
4017
4018         Reverted changeset:
4019
4020         "[Unreviewed] Speculative test fix after r178390."
4021         http://trac.webkit.org/changeset/178400
4022
4023 2015-01-13  Roger Fong  <roger_fong@apple.com>
4024
4025         [Unreviewed] Speculative test fix after r178390.
4026
4027         * html/canvas/WebGL1RenderingContext.idl:
4028
4029 2015-01-13  Roger Fong  <roger_fong@apple.com>
4030
4031         [Unreviewed] Windows build fix after r178390.
4032
4033         * DerivedSources.cpp:
4034         * WebCore.vcxproj/WebCore.vcxproj:
4035         * WebCore.vcxproj/WebCore.vcxproj.filters:
4036         * bindings/js/JSBindingsAllInOne.cpp:
4037         * html/canvas/WebGLRenderingContextBase.cpp:
4038         (WebCore::WebGLRenderingContextBase::create):
4039
4040 2015-01-13  Joseph Pecoraro  <pecoraro@apple.com>
4041
4042         NSButtonCell leak allocated under WebCore::paintToggleButton
4043         https://bugs.webkit.org/show_bug.cgi?id=137014
4044
4045         Reviewed by Alexey Proskuryakov.
4046
4047         * platform/mac/ThemeMac.mm:
4048         (WebCore::createToggleButtonCell):
4049         Immediately adopt the NSButtonCell allocation.
4050
4051         (WebCore::sharedRadioCell):
4052         (WebCore::sharedCheckboxCell):
4053         Move from the RetainPtr into the static variable.
4054
4055         (WebCore::paintToggleButton):
4056         Use RetainPtr logic to better manage lifetimes.
4057
4058 2015-01-13  Zalan Bujtas &