19671ed1454d7ebdb7f1193c13136fb6fdc19647
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-11-30  Jiewen Tan  <jiewen_tan@apple.com>
2
3         Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html
4         https://bugs.webkit.org/show_bug.cgi?id=149309
5         <rdar://problem/22748363>
6
7         Reviewed by Brent Fulgham.
8
9         A weird order of event execution introduced by the test case will kill the webpage in a
10         subframe of the page while executing its |frame.loader().checkLoadCompleteForThisFrame()|.
11         Therefore, any frames comes after the failing subframe will have no page. Check it before
12         calling to those frames' |frame.loader().checkLoadCompleteForThisFrame()|, otherwise the
13         assertion in |frame.loader().checkLoadCompleteForThisFrame()| will fail.
14
15         Test: http/tests/misc/detach-during-notifyDone.html
16
17         * loader/FrameLoader.cpp:
18         (WebCore::FrameLoader::checkLoadComplete):
19
20 2015-11-30  Commit Queue  <commit-queue@webkit.org>
21
22         Unreviewed, rolling out r192819.
23         https://bugs.webkit.org/show_bug.cgi?id=151681
24
25         This change broke existing layout tests on Windows (Requested
26         by ryanhaddad on #webkit).
27
28         Reverted changeset:
29
30         "Unify font-variant-* with font-variant shorthand"
31         https://bugs.webkit.org/show_bug.cgi?id=149773
32         http://trac.webkit.org/changeset/192819
33
34 2015-11-30  Darin Adler  <darin@apple.com>
35
36         Use Optional instead of isNull out argument for nullable getters
37         https://bugs.webkit.org/show_bug.cgi?id=151676
38
39         Reviewed by Anders Carlsson.
40
41         No behavior change, just cleaner code.
42
43         * Modules/geolocation/Coordinates.cpp:
44         (WebCore::Coordinates::altitude): Return an Optional.
45         (WebCore::Coordinates::altitudeAccuracy): Ditto.
46         (WebCore::Coordinates::heading): Ditto.
47         (WebCore::Coordinates::speed): Ditto.
48         * Modules/geolocation/Coordinates.h: Ditto.
49
50         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
51         (WebCore::IDBVersionChangeEvent::create): Added. The code before was calling
52         through to Event::create, which is clearly not what was wanted. Also removed
53         unneeded explicit destructor.
54         * Modules/indexeddb/IDBVersionChangeEvent.h: Changed return type of newVersion
55         to Optional and updated for above change.
56
57         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
58         (WebCore::IDBClient::IDBVersionChangeEvent::newVersion): Changed to return
59         an Optional.
60         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h: Removed unused
61         default argument values; the event type one, at least, was clearly incorrect.
62         Made more things private, got rid of unneeded destructor, marked class final
63         instead of marking all functions final.
64
65         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp:
66         (WebCore::LegacyVersionChangeEvent::newVersion): Same as above.
67         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Ditto.
68
69         * Modules/mediastream/MediaTrackConstraints.cpp:
70         (WebCore::MediaTrackConstraints::optional): Removed bogus bool value. If we
71         come back to finish later we will have to implement optional return values
72         for arrays in the JavaScript bindings generator, which should be straightforward.
73         * Modules/mediastream/MediaTrackConstraints.h: Ditto.
74
75         * bindings/js/JSDOMBinding.h:
76         (WebCore::toNullableJSNumber): Added. This function template is used for
77         return values that are nullable numbers.
78
79         * bindings/scripts/CodeGeneratorGObject.pm:
80         (GenerateFunction): Replaced some existing bogus code to handle nullables with
81         new equally-bogus code that should be no worse and will compile.
82
83         * bindings/scripts/CodeGeneratorJS.pm:
84         (GenerateImplementation): Removed old support for nullables.
85         (NativeToJSValue): Added new support for nullable numbers.
86
87         * bindings/scripts/CodeGeneratorObjC.pm:
88         (GenerateImplementation): Removed support for nullables. We almost certainly
89         won't need it for Objective-C bindings.
90
91         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Updated.
92         * bindings/scripts/test/JS/JSTestObj.cpp: Updated.
93         * bindings/scripts/test/ObjC/DOMTestObj.mm: Updated.
94
95 2015-11-30  Wenson Hsieh  <wenson_hsieh@apple.com>
96
97         Split platform-independent logic in AVCaptureDeviceManager out into a new class
98         https://bugs.webkit.org/show_bug.cgi?id=151388
99         <rdar://problem/23593980>
100
101         Reviewed by Eric Carlson.
102
103         To prepare for creating a MockCaptureDeviceManager to be able to test
104         MediaDevices.getUserMedia, we create a platform-independent capture device manager
105         which all platforms should extend and add platform-specific logic to.
106
107         The methods CaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints and
108         CaptureDeviceManager::captureDeviceList should be overridden by each platform
109         CaptureDeviceManager to respectively create a RealtimeMediaSource and return a list of
110         capture devices. createMediaSourceForCaptureDeviceWithConstraints attempts to create
111         a media source for a given device with some constraints; if the contraints cannot be
112         satisfied, this returns null.
113
114         The refactored capture device manager also introduces the notion of a platform-
115         independent capture session which may be extended by platform device managers for
116         determining whether a given constraint name, value and media type is valid.
117
118         A platform-independent CaptureDeviceInfo now represents either the video or audio
119         component of a capture device, but not both at once. This means a capture device that
120         supports both video and audio will emit two separate capture devices.
121
122         No new tests, since there should be no behavior change.
123
124         * Modules/mediastream/CaptureDeviceInfo.h: Added.
125         (WebCore::CaptureSessionInfo::~CaptureSessionInfo):
126         (WebCore::CaptureSessionInfo::supportsVideoSize):
127         (WebCore::CaptureSessionInfo::bestSessionPresetForVideoDimensions):
128         * Modules/mediastream/CaptureDeviceManager.cpp: Added.
129         (CaptureDeviceManager::~CaptureDeviceManager):
130         (CaptureDeviceManager::getSourcesInfo):
131         (CaptureDeviceManager::captureDeviceFromDeviceID):
132         (CaptureDeviceManager::verifyConstraintsForMediaType):
133         (CaptureDeviceManager::bestSourcesForTypeAndConstraints):
134         (CaptureDeviceManager::sourceWithUID):
135         (CaptureDeviceManager::bestDeviceForFacingMode):
136         (facingModeFromString):
137         (CaptureDeviceManager::sessionSupportsConstraint):
138         (CaptureDeviceManager::isSupportedFrameRate):
139         * Modules/mediastream/CaptureDeviceManager.h: Added.
140         (WebCore::CaptureDeviceManager::refreshCaptureDeviceList):
141         (WebCore::CaptureDeviceManager::defaultCaptureSession):
142         * WebCore.xcodeproj/project.pbxproj:
143         * platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp: Added.
144         (WebCore::RealtimeMediaSourceSupportedConstraints::nameForConstraint):
145         (WebCore::RealtimeMediaSourceSupportedConstraints::constraintFromName):
146         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsConstraint):
147         * platform/mediastream/RealtimeMediaSourceSupportedConstraints.h:
148         * platform/mediastream/mac/AVCaptureDeviceManager.h:
149         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
150         (WebCore::AVCaptureSessionInfo::AVCaptureSessionInfo):
151         (WebCore::AVCaptureSessionInfo::supportsVideoSize):
152         (WebCore::AVCaptureSessionInfo::bestSessionPresetForVideoDimensions):
153         (WebCore::AVCaptureDeviceManager::captureDeviceList):
154         (WebCore::shouldConsiderDeviceInDeviceList):
155         (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList):
156         (WebCore::AVCaptureDeviceManager::AVCaptureDeviceManager):
157         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
158         (WebCore::AVCaptureDeviceManager::sourceWithUID):
159         (WebCore::AVCaptureDeviceManager::getSourcesInfo):
160         (WebCore::AVCaptureDeviceManager::verifyConstraintsForMediaType):
161         (WebCore::AVCaptureDeviceManager::defaultCaptureSession):
162         (WebCore::AVCaptureDeviceManager::sessionSupportsConstraint):
163         (WebCore::AVCaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints):
164         (WebCore::AVCaptureDeviceManager::deviceDisconnected):
165         (WebCore::AVCaptureDeviceManager::isSupportedFrameRate):
166         (WebCore::CaptureDevice:::m_enabled): Deleted.
167         (WebCore::captureDeviceList): Deleted.
168         (WebCore::captureDeviceFromDeviceID): Deleted.
169         (WebCore::refreshCaptureDeviceList): Deleted.
170         (WebCore::AVCaptureDeviceManager::bestSessionPresetForVideoSize): Deleted.
171         (WebCore::AVCaptureDeviceManager::deviceSupportsFacingMode): Deleted.
172         (WebCore::AVCaptureDeviceManager::bestDeviceForFacingMode): Deleted.
173         (WebCore::AVCaptureDeviceManager::isValidConstraint): Deleted.
174         (WebCore::AVCaptureDeviceManager::validConstraintNames): Deleted.
175         (WebCore::AVCaptureDeviceManager::validFacingModes): Deleted.
176         * platform/mediastream/mac/AVVideoCaptureSource.mm:
177         (WebCore::AVVideoCaptureSource::applyConstraints):
178         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
179         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
180         (WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
181
182 2015-11-30  Brady Eidson  <beidson@apple.com>
183
184         Modern IDB: Set the correct source on the IDBRequest for cursor updates
185         https://bugs.webkit.org/show_bug.cgi?id=151665
186
187         Reviewed by Andy Estes.
188
189         No new tests (At least one existing failing test now passes).
190
191         * Modules/indexeddb/client/IDBCursorImpl.cpp:
192         (WebCore::IDBClient::IDBCursor::update):
193         
194         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
195         (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate):
196         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
197         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
198         
199         * Modules/indexeddb/client/IDBRequestImpl.cpp:
200         (WebCore::IDBClient::IDBRequest::IDBRequest):
201         (WebCore::IDBClient::IDBRequest::setSource):
202         * Modules/indexeddb/client/IDBRequestImpl.h:
203
204 2015-11-30  Tim Horton  <timothy_horton@apple.com>
205
206         Get rid of the legacy TextIndicatorWindow style
207         https://bugs.webkit.org/show_bug.cgi?id=151674
208
209         Reviewed by Anders Carlsson.
210
211         * page/TextIndicator.h:
212         * page/mac/TextIndicatorWindow.mm:
213         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): Deleted.
214
215 2015-11-30  Brady Eidson  <beidson@apple.com>
216
217         Modern IDB: Correct handling of cursors finishing iteration.
218         https://bugs.webkit.org/show_bug.cgi?id=151664
219
220         Reviewed by Andy Estes.
221
222         No new tests (At least one previously failing test now passes).
223
224         * Modules/indexeddb/client/IDBCursorImpl.cpp:
225         (WebCore::IDBClient::IDBCursor::setGetResult):
226         
227         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
228         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
229
230 2015-11-30  Myles C. Maxfield  <mmaxfield@apple.com>
231
232         Unify font-variant-* with font-variant shorthand
233         https://bugs.webkit.org/show_bug.cgi?id=149773
234
235         Reviewed by Darin Adler.
236
237         This patch makes font-variant a shorthand for the following properties:
238         font-variant-ligatures
239         font-variant-position
240         font-variant-caps
241         font-variant-numeric
242         font-variant-alternates
243         font-variant-east-asian
244
245         This is consistent with the CSS Fonts Level 3 spec.
246
247         This patch also migrates the "font" longhand to use the font-variant-caps
248         property.
249
250         Test: fast/text/font-variant-shorthand.html
251
252         * css/CSSComputedStyleDeclaration.cpp:
253         (WebCore::fontVariantEastAsianPropertyValue): Rename FontVariantEastAsian values.
254         (WebCore::fontVariantFromStyle): We must consult with the longhand properties to determine
255         font-variant computed style.
256         (WebCore::ComputedStyleExtractor::propertyValue): Don't put any-old font-variant-caps inside
257         the font shorthand.
258         * css/CSSFontSelector.cpp:
259         (WebCore::CSSFontSelector::addFontFaceRule): Guard against incorrect downcasts (due to inherit
260         of the new shorthand property).
261         * css/CSSParser.cpp: Parse font-variant as a shorthand. Also implement its "normal" and "none" values.
262         (WebCore::CSSParser::parseValue):
263         (WebCore::CSSParser::parseFont):
264         (WebCore::CSSParser::parseSystemFont):
265         (WebCore::CSSParser::parseFontVariantLigatures):
266         (WebCore::CSSParser::parseFontVariantNumeric):
267         (WebCore::CSSParser::parseFontVariantEastAsian):
268         (WebCore::CSSParser::parseFontVariant):
269         (WebCore::isValidKeywordPropertyAndValue): Deleted.
270         (WebCore::isKeywordPropertyID): Deleted.
271         * css/CSSParser.h:
272         * css/CSSPropertyNames.in: Turn font-variant into a shorthand property.
273         * css/FontVariantBuilder.h: Guard against incorrect downcasts. Also update for renamed
274         FontVariantEastAsian type.
275         (WebCore::applyValueFontVariantLigatures):
276         (WebCore::applyValueFontVariantNumeric):
277         (WebCore::applyValueFontVariantEastAsian):
278         * css/StyleProperties.cpp: Update to use the more specific property.
279         (WebCore::StyleProperties::appendFontLonghandValueIfExplicit):
280         (WebCore::StyleProperties::fontValue):
281         (WebCore::StyleProperties::asText):
282         * css/StyleResolver.cpp: Ditto.
283         (WebCore::StyleResolver::isValidCueStyleProperty):
284         * editing/EditingStyle.cpp: Ditto.
285         * editing/cocoa/HTMLConverter.mm: Ditto.
286         (HTMLConverterCaches::propertyValueForNode):
287         (HTMLConverter::computedAttributesForElement):
288         * editing/ios/EditorIOS.mm: Ditto.
289         (WebCore::Editor::removeUnchangeableStyles):
290         * html/canvas/CanvasRenderingContext2D.cpp: Ditto.
291         (WebCore::CanvasRenderingContext2D::font):
292         (WebCore::CanvasRenderingContext2D::setFont):
293         * platform/graphics/FontCache.h: Removing duplicate cache key value.
294         (WebCore::FontDescriptionKey::makeFlagsKey):
295         * platform/graphics/FontCascade.cpp: Migrate to the new font-variant-caps from the old member variable.
296         (WebCore::FontCascade::glyphDataForCharacter):
297         * platform/graphics/FontCascade.h: Ditto.
298         (WebCore::FontCascade::isSmallCaps):
299         * platform/graphics/FontDescription.cpp: Ditto.
300         (WebCore::FontDescription::FontDescription):
301         * platform/graphics/FontDescription.h: Ditto.
302         (WebCore::FontCascadeDescription::equalForTextAutoSizing):
303         (WebCore::FontDescription::smallCaps): Deleted.
304         (WebCore::FontDescription::setSmallCaps): Deleted.
305         (WebCore::FontDescription::setIsSmallCaps): Deleted.
306         (WebCore::FontDescription::operator==): Deleted.
307         * platform/graphics/cocoa/FontCacheCoreText.cpp: Rename FontVariantEastAsianWidth.
308         (WebCore::computeFeatureSettingsFromVariants):
309         * platform/text/TextFlags.h: Ditto.
310         (WebCore::FontVariantSettings::operator==):
311         * rendering/RenderText.cpp: Migrage to the new font-variant-caps from the old member variable.
312         (WebCore::RenderText::widthFromCache):
313
314 2015-11-30  Brady Eidson  <beidson@apple.com>
315
316         Modern IDB: After versionchange transactions abort, fire onerror on the original IDBOpenDBRequest.
317         https://bugs.webkit.org/show_bug.cgi?id=151648
318
319         Reviewed by Andy Estes.
320
321         No new tests. Covered by at least one existing failing test which now passes, and many
322         other tests updated to fix their incorrect behavior.
323
324         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
325         (WebCore::IDBClient::IDBDatabase::transaction):
326         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
327         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
328         
329         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
330         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort):
331         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
332         
333         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
334         (WebCore::IDBClient::IDBTransaction::notifyDidAbort):
335         (WebCore::IDBClient::IDBTransaction::didAbort):
336         (WebCore::IDBClient::IDBTransaction::didCommit):
337         * Modules/indexeddb/client/IDBTransactionImpl.h:
338
339 2015-11-30  Chris Dumez  <cdumez@apple.com>
340
341         location.origin is undefined in a web worker
342         https://bugs.webkit.org/show_bug.cgi?id=151614
343
344         Reviewed by Darin Adler.
345
346         Expose location.origin to web workers, as per:
347         https://html.spec.whatwg.org/multipage/workers.html#workerlocation
348
349         This behavior is consistent with the behavior of Firefox and Chrome.
350
351         Test: fast/workers/worker-location.html
352
353         * workers/WorkerLocation.cpp:
354         (WebCore::WorkerLocation::origin):
355         * workers/WorkerLocation.h:
356         * workers/WorkerLocation.idl:
357
358 2015-11-30  Brady Eidson  <beidson@apple.com>
359
360         Modern IDB: Support updating cursor values when the object store uses inline keys.
361         https://bugs.webkit.org/show_bug.cgi?id=151647
362
363         Reviewed by Andy Estes.
364
365         No new tests (At least two previously failing tests now pass and are unskipped).
366
367         * Modules/indexeddb/client/IDBCursorImpl.cpp:
368         (WebCore::IDBClient::IDBCursor::update): Use putForCursorUpdate() instead of put()
369         
370         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
371         (WebCore::IDBClient::IDBObjectStore::add):
372         (WebCore::IDBClient::IDBObjectStore::put):
373         (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate): Use the flag to skip the inline-key check.
374         (WebCore::IDBClient::IDBObjectStore::putOrAdd): Add a flag to skip the inline-key check.
375         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
376
377 2015-11-30  Brady Eidson  <beidson@apple.com>
378
379         Modern IDB: Resolve flaky GC-vs-wrapper issue with IDBOpenDBRequest.
380         https://bugs.webkit.org/show_bug.cgi?id=151645
381
382         Reviewed by Andy Estes.
383
384         No new tests (Resolves flakiness with hundreds of existing IDB tests).
385
386         Do to improper management of the m_hasPendingActivity flag on IDBRequestImpl,
387         the request wrapper for an IDBOpenDBRequest might be garbage collected in between the
388         onUpgradeNeeded event and onSuccess event.
389         
390         This manifested as flakiness in many tests, some more than others.
391         
392         I tried to write a targeted 100% reproducible case manually forcing GC, but could not get
393         the timing right.
394         
395         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
396         (WebCore::IDBClient::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
397         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
398         
399         * Modules/indexeddb/client/IDBRequestImpl.cpp:
400         (WebCore::IDBClient::IDBRequest::dispatchEvent):
401         (WebCore::IDBClient::IDBRequest::willIterateCursor):
402         * Modules/indexeddb/client/IDBRequestImpl.h:
403         (WebCore::IDBClient::IDBRequest::isOpenDBRequest):
404
405 2015-11-30  Per Arne Vollan  <peavo@outlook.com>
406
407         [WinCairo][MediaFoundation] Implement seek.
408         https://bugs.webkit.org/show_bug.cgi?id=151609
409
410         Reviewed by Alex Christensen.
411
412         The methods maxTimeSeekable() and buffered() needs to be implemented.
413
414         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
415         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
416         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
417         (WebCore::MediaPlayerPrivateMediaFoundation::readyState):
418         (WebCore::MediaPlayerPrivateMediaFoundation::maxTimeSeekable):
419         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
420         (WebCore::MediaPlayerPrivateMediaFoundation::didLoadingProgress):
421         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::currentTime):
422         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isActive):
423         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
424         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::maxTimeLoaded):
425
426 2015-11-30  Brady Eidson  <beidson@apple.com>
427
428         Modern IDB: openCursor() fix resulting in at least 4 more passing tests.
429         https://bugs.webkit.org/show_bug.cgi?id=151630
430
431         Reviewed by Andy Estes.
432
433         No new tests (At least 4 failing tests now pass, and 9 other incorrect tests updated).
434
435         * Modules/indexeddb/IDBGetResult.cpp:
436         (WebCore::IDBGetResult::isolatedCopy):
437         * Modules/indexeddb/IDBGetResult.h:
438         (WebCore::IDBGetResult::IDBGetResult):
439         (WebCore::IDBGetResult::isDefined):
440
441         * Modules/indexeddb/client/IDBRequestImpl.cpp:
442         (WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor): If the IDBGetResult is undefined,
443           do not expose the cursor as the result property of the IDBRequest.
444
445 2015-11-30  Brady Eidson  <beidson@apple.com>
446
447         Modern IDB: Support keyPath injection into object store records.
448         https://bugs.webkit.org/show_bug.cgi?id=151640
449
450         Reviewed by Andy Estes.
451
452         No new tests (At least one existing failure now passes and is unskipped,
453         while many other existing failures are now closer to passing).
454
455         * Modules/indexeddb/server/MemoryObjectStore.cpp:
456         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord): Use the new UniqueIDBDatabase VM/ExecState.
457         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords): Ditto
458         (WebCore::IDBServer::indexVM): Deleted.
459         (WebCore::IDBServer::indexGlobalExec): Deleted.
460         
461         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
462         (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM):
463         (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState):
464         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): If appropriate, inject the key that will be used into
465           the value before storing the record.
466         * Modules/indexeddb/server/UniqueIDBDatabase.h:
467
468         Add modern JSValue/ExecState& version of some binding utilities, for use today and in preparation of getting 
469         rid of the DOMRequestState and Deprecated::ScriptValue versions later:
470         * bindings/js/IDBBindingUtilities.cpp:
471         (WebCore::idbKeyToJSValue):
472         (WebCore::injectIDBKeyIntoScriptValue):
473         (WebCore::deserializeIDBValueData):
474         (WebCore::deserializeIDBValueDataToJSValue):
475         * bindings/js/IDBBindingUtilities.h:
476
477 2015-11-25  Andy Estes  <aestes@apple.com>
478
479         [Content Filtering] Avoid creating a ContentFilter when loading the empty document
480         https://bugs.webkit.org/show_bug.cgi?id=151615
481
482         Reviewed by Daniel Bates.
483
484         It's expensive to create the first ContentFilter since two frameworks must be soft-linked. There's no reason to
485         pay this cost if we're just loading the empty document.
486
487         No new tests. It's not possible to write a test that would fail without this change since ContentFilter is not
488         notified of empty document loads.
489
490         * loader/DocumentLoader.cpp:
491         (WebCore::DocumentLoader::startLoadingMainResource): Don't initialize m_contentFilter until we know we aren't
492         loading the empty document.
493         (WebCore::DocumentLoader::DocumentLoader):
494
495 2015-11-29  Antoine Quint  <graouts@apple.com>
496
497         Browser does not fall back to SVG attribute value when CSS style value is invalid or not supported
498         https://bugs.webkit.org/show_bug.cgi?id=147932
499
500         Reviewed by Dean Jackson.
501
502         Instead of returning an SVGPaint object of type SVG_PAINTTYPE_UNKNOWN when we encounter an SVG paint
503         value that cannot be parsed, we now return `nullptr` which will cause that value to be ignored and
504         let another paint value in the cascade be used instead. This is the same approach used for SVGColor.
505         Since we're removing the only call site for `SVGPaint::createUnknown()`, we remove that function entirely.
506
507         Tests: svg/css/invalid-color-cascade.svg
508                svg/css/invalid-paint-cascade.svg
509
510         * css/SVGCSSParser.cpp:
511         (WebCore::CSSParser::parseSVGPaint):
512         * svg/SVGPaint.h:
513         (WebCore::SVGPaint::createUnknown): Deleted.
514
515 2015-11-29  Simon Fraser  <simon.fraser@apple.com>
516
517         Use SVGTransform::SVGTransformType instead of an unsigned short
518         https://bugs.webkit.org/show_bug.cgi?id=151637
519
520         Reviewed by Brady Eidson.
521
522         Make 'type' more strongly typed.
523
524         * svg/SVGTransformable.cpp:
525         (WebCore::SVGTransformable::parseTransformValue):
526         (WebCore::parseAndSkipType):
527         (WebCore::SVGTransformable::parseTransformType):
528         (WebCore::SVGTransformable::parseTransformAttribute):
529         * svg/SVGTransformable.h:
530
531 2015-11-27  Brady Eidson  <beidson@apple.com>
532
533         Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
534         https://bugs.webkit.org/show_bug.cgi?id=151627
535
536         Reviewed by Alexey Proskuryakov.
537
538         No new tests (No change in behavior).
539
540         * CMakeLists.txt:
541         * WebCore.xcodeproj/project.pbxproj:
542
543         * Modules/indexeddb/IDBGetResult.cpp: Added.
544         (WebCore::IDBGetResult::dataFromBuffer):
545         (WebCore::IDBGetResult::isolatedCopy):
546         * Modules/indexeddb/IDBGetResult.h:
547         (WebCore::IDBGetResult::IDBGetResult):
548         (WebCore::IDBGetResult::valueBuffer):
549         (WebCore::IDBGetResult::keyData):
550         (WebCore::IDBGetResult::primaryKeyData):
551         (WebCore::IDBGetResult::keyPath):
552         (WebCore::IDBGetResult::setValueBuffer):
553         (WebCore::IDBGetResult::setKeyData):
554         (WebCore::IDBGetResult::setPrimaryKeyData):
555         (WebCore::IDBGetResult::setKeyPath):
556         (WebCore::IDBGetResult::dataFromBuffer): Deleted.
557         (WebCore::IDBGetResult::isolatedCopy): Deleted.
558
559         * Modules/indexeddb/client/IDBCursorImpl.cpp:
560         (WebCore::IDBClient::IDBCursor::setGetResult):
561         * Modules/indexeddb/client/IDBCursorImpl.h:
562
563         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
564         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
565
566         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
567         (WebCore::GetOperation::perform):
568
569         * Modules/indexeddb/server/IDBBackingStore.h:
570
571         * Modules/indexeddb/server/MemoryCursor.h:
572
573         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
574         (WebCore::IDBServer::MemoryIndexCursor::currentData):
575
576         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
577         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
578
579         * platform/CrossThreadCopier.h:
580
581 2015-11-27  Carlos Garcia Campos  <cgarcia@igalia.com>
582
583         [GTK] Do not use the WebCore garbage collector timer
584         https://bugs.webkit.org/show_bug.cgi?id=151623
585
586         Reviewed by Martin Robinson.
587
588         Now that garbage collector timers have been implemented in
589         JavaScriptCore for glib, we don't need to use another Timer in WebCore.
590
591         * bindings/js/GCController.cpp:
592         (WebCore::GCController::garbageCollectSoon):
593         (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
594
595 2015-11-18  Andy Estes  <aestes@apple.com>
596
597         [Content Filtering] Crash in DocumentLoader::notifyFinished() when allowing a media document to load
598         https://bugs.webkit.org/show_bug.cgi?id=151433
599         rdar://problem/23506594
600
601         Reviewed by Alexey Proskuryakov.
602
603         When the main resource of a media document commits, WebKit cancels its load since the plug-in or media engine
604         will do its own loading. If content filtering is enabled, and the filter waits allow the load until the entire
605         resource is downloaded, then ContentFilter will attempt to call DocumentLoader::notifyFinished() immediately
606         after delivering the buffered resource data to DocumentLoader. However, delivering the data will have nulled out
607         DocumentLoader's m_mainResource when the load was cancelled, leading to a crash in notifyFinished().
608
609         To resolve this, add a new Stopped state to ContentFilter. Set this state if DocumentLoader clears its main
610         resource or detaches from its frame. If ContentFilter is in the Stopped state after calling
611         DocumentLoader::dataReceived(), do not proceed to call DocumentLoader::notifyFinished().
612
613         Test: contentfiltering/allow-media-document.html
614
615         * loader/ContentFilter.cpp:
616         (WebCore::ContentFilter::stopFilteringMainResource): Set m_state to Stopped. If m_mainResource is non-null,
617         removed ContentFilter as a client and set m_mainResource to null.
618         (WebCore::ContentFilter::notifyFinished): Stopped calling DocumentLoader::notifyFinished() if m_state is Stopped
619         after calling DocumentLoader::dataReceived().
620         * loader/ContentFilter.h:
621         * loader/DocumentLoader.cpp:
622         (WebCore::DocumentLoader::detachFromFrame): Called ContentFilter::stopFilteringMainResource() instead of setting
623         m_contentFilter to null.
624         (WebCore::DocumentLoader::clearMainResource): Ditto.
625
626 2015-11-25  Pranjal Jumde  <pjumde@apple.com>
627
628         Checks for buffer-overflows when reading characters from textRun
629         https://bugs.webkit.org/show_bug.cgi?id=151055
630         <rdar://problem/23251789>
631
632         Reviewed by Myles C. Maxfield.
633
634         Prevents an off by one error when adding the last font data to the GlyphBuffer.
635
636         * Source/WebCore/platform/graphics/WidthIterator.cpp:
637         * Source/WebCore/platform/graphics/FontCascade.cpp:
638
639 2015-11-24  Xabier Rodriguez Calvar  <calvaris@igalia.com>
640
641         [Streams API] Implement pipeTo method in readable Stream
642         https://bugs.webkit.org/show_bug.cgi?id=151588
643
644         Reviewed by Darin Adler.
645
646         Implemented pipeTo method according to the reference implementation in the spec as the spec is not written
647         yet. It can be found at https://github.com/whatwg/streams/blob/632b26a05f3106650b1ec91239ad5b012e6c64af/reference-implementation/lib/readable-stream.js#L75.
648
649         Tests: streams/pipe-to.html
650                streams/reference-implementation/brand-checks.html
651                streams/reference-implementation/pipe-through.html
652                streams/reference-implementation/pipe-to.html
653                streams/reference-implementation/pipe-to-options.html
654                streams/reference-implementation/readable-stream-templated
655
656         * Modules/streams/ReadableStream.js:
657         (doPipe): Internal function of pipeTo.
658         (closeDest): Internal function of pipeTo.
659         (abortDest): Internal function of pipeTo.
660         (pipeTo): Implemented as per spec with some other internal functions as helpers.
661
662 2015-11-24  Antti Koivisto  <antti@apple.com>
663
664         REGRESSION (r190983): Non-element, non-text nodes should not be distributed to slots
665         https://bugs.webkit.org/show_bug.cgi?id=151566
666         rdar://problem/23430177
667
668         Reviewed by Zalan Bujtas.
669
670         We don't invalidate slot assignments except for text or element children. Fix by not
671         not assigning other nodes to slots as it is not useful.
672
673         Test: fast/html/details-comment-crash.html
674
675         * dom/SlotAssignment.cpp:
676         (WebCore::slotNameFromSlotAttribute):
677         (WebCore::SlotAssignment::findAssignedSlot):
678         (WebCore::SlotAssignment::assignSlots):
679
680 2015-11-23  David Kilzer  <ddkilzer@apple.com>
681
682         Hardening against CSSSelector double frees
683         <http://webkit.org/b/56124>
684         <rdar://problem/9119036>
685
686         Reviewed by Antti Koivisto.
687
688         Add some security assertions to catch this issue if it ever
689         happens in Debug builds, and make changes in
690         CSSSelector::~CSSSelector() and
691         CSSSelectorList::deleteSelectors() to prevent obvious issues if
692         they're ever called twice in Release builds.
693
694         No new tests because we don't know how to reproduce this.
695
696         * css/CSSSelector.cpp:
697         (WebCore::CSSSelector::CSSSelector): Initialize
698         m_destructorHasBeenCalled.
699         * css/CSSSelector.h:
700         (WebCore::CSSSelector::m_destructorHasBeenCalled): Add bitfield.
701         (WebCore::CSSSelector::CSSSelector): Initialize
702         m_destructorHasBeenCalled.
703         (WebCore::CSSSelector::~CSSSelector): Add security assertion
704         that this is never called twice.  Clear out any fields that
705         would have caused us to dereference an object twice.
706
707         * css/CSSSelectorList.cpp:
708         (WebCore::CSSSelectorList::deleteSelectors): Clear
709         m_selectorArray when freeing the memory to which it was
710         pointing.  This prevents re-entrancy issues or calling this
711         method twice on the same thread.  Also restructure the for()
712         loop to prevent calling CSSSelector::isLastInSelectorList()
713         after CSSSelector::~CSSSelector() has been called (via CRBug
714         241892).
715
716 2015-11-23  Brian Burg  <bburg@apple.com>
717
718         Web Inspector: inspector settings should not be shared between different inspection levels
719         https://bugs.webkit.org/show_bug.cgi?id=151151
720
721         Reviewed by Timothy Hatcher.
722
723         InspectorController and InspectorFrontendClient should know how to compute their
724         inspection levels, so that this level can be exposed to the Inspector frontend for
725         preference disambiguation by inspection level.
726
727          - A Page with normal web content has an inspection level of 0.
728          - The first Web Inspector has an inspection level of 1.
729          - The second Web Inspector that inspects the Inspector has an inspection level of 2.
730          - And so forth...
731
732         For local frontend clients (WK1 and the ProtocolTestStub), the inspection level of
733         a Page computed as follows:
734
735         - If the page's inspector controller has no frontend client, then the Page
736         is normal web content (level 0).
737         - If the page's inspector controller has a frontend client, ask for its inspection level.
738         A frontend client looks at the inspection level reported by inspected page's inspector
739         controller and increments by one to account for the crossed inspection boundary.
740
741         No new tests, this is blocked by test infrastructure fixes (https://webkit.org/b/151573).
742
743         * inspector/InspectorController.cpp:
744         (WebCore::InspectorController::inspectionLevel): Added.
745         (WebCore::InspectorController::hasInspectorFrontendClient): Deleted.
746         * inspector/InspectorController.h:
747         * inspector/InspectorFrontendClient.h:
748         * inspector/InspectorFrontendClientLocal.cpp:
749         (WebCore::InspectorFrontendClientLocal::canAttachWindow): Check inspectionLevel().
750         (WebCore::InspectorFrontendClientLocal::inspectionLevel): Added.
751         * inspector/InspectorFrontendClientLocal.h:
752         * inspector/InspectorFrontendHost.cpp:
753         (WebCore::InspectorFrontendHost::inspectionLevel): Added.
754         * inspector/InspectorFrontendHost.h:
755         * inspector/InspectorFrontendHost.idl:
756         * page/ContextMenuController.cpp:
757         (WebCore::ContextMenuController::populate): Check inspectionLevel().
758
759 2015-11-20  Brian Burg  <bburg@apple.com>
760
761         Web Inspector: RemoteInspector should track targets and connections for remote automation
762         https://bugs.webkit.org/show_bug.cgi?id=151042
763
764         Reviewed by Joseph Pecoraro.
765
766         Use the new RemoteControllableTarget API method names.
767
768         No new tests, no behavior change.
769
770         * page/PageDebuggable.cpp:
771         (WebCore::PageDebuggable::connect):
772         (WebCore::PageDebuggable::dispatchMessageFromRemote):
773         (WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend): Deleted.
774         * page/PageDebuggable.h:
775
776 2015-11-23  Brady Eidson  <beidson@apple.com>
777
778         Modern IDB: Unskip all indexeddb/mozilla tests that pass.
779         https://bugs.webkit.org/show_bug.cgi?id=151568
780         
781         Reviewed by Alex Christensen.
782
783         No new tests (Lots of skipped existing tests now pass).
784
785         * Modules/indexeddb/shared/IDBError.h:
786
787 2015-11-23  Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
788
789         Add WebCore namespace for generated bindings for supplemental method calls
790         https://bugs.webkit.org/show_bug.cgi?id=151431
791
792         Reviewed by Alex Christensen.
793
794         Address build failures for generated supplemental method calls which are in the WebCore namespace. 
795         The bindings are outside the WebCore namespace - so add WebCore namespace specifier where required.
796
797         * bindings/scripts/CodeGeneratorJS.pm:
798         (GenerateHeader):
799         (GenerateImplementation):
800         (GenerateParametersCheck):
801         * bindings/scripts/CodeGeneratorObjC.pm:
802         (GenerateImplementation):
803         * bindings/scripts/test/JS/JSTestInterface.cpp:
804         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
805         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
806         (WebCore::jsTestInterfaceSupplementalStr1):
807         (WebCore::jsTestInterfaceSupplementalStr2):
808         (WebCore::jsTestInterfaceSupplementalNode):
809         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
810         (WebCore::setJSTestInterfaceSupplementalStr2):
811         (WebCore::setJSTestInterfaceSupplementalNode):
812         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
813         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
814         (WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4):
815         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
816         (-[DOMTestInterface supplementalStr1]):
817         (-[DOMTestInterface supplementalStr2]):
818         (-[DOMTestInterface setSupplementalStr2:]):
819         (-[DOMTestInterface supplementalStr3]):
820         (-[DOMTestInterface setSupplementalStr3:]):
821         (-[DOMTestInterface supplementalNode]):
822         (-[DOMTestInterface setSupplementalNode:]):
823         (-[DOMTestInterface builtinAttribute]):
824         (-[DOMTestInterface setBuiltinAttribute:]):
825         (-[DOMTestInterface supplementalMethod1]):
826         (-[DOMTestInterface supplementalMethod2:objArg:]):
827         (-[DOMTestInterface supplementalMethod3]):
828         (-[DOMTestInterface supplementalMethod4]):
829         (-[DOMTestInterface builtinFunction]):
830
831 2015-11-23  Brady Eidson  <beidson@apple.com>
832
833         Modern IDB: When a transaction is aborted, call onerror handlers for all in-progress requests.
834         https://bugs.webkit.org/show_bug.cgi?id=151550
835
836         Reviewed by Alex Christensen.
837
838         Test: storage/indexeddb/modern/abort-requests-cancelled.html
839               storage/indexeddb/modern/idbtransaction-objectstore-failures.html (with changes)
840               storage/indexeddb/modern/index-5.html (with changes)
841               Various (currently skipped) legacy IDB tests.
842
843         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
844         (WebCore::IDBClient::IDBDatabase::transaction):
845         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
846         (WebCore::IDBClient::IDBDatabase::didStartTransaction):
847         (WebCore::IDBClient::IDBDatabase::willCommitTransaction):
848         (WebCore::IDBClient::IDBDatabase::didCommitTransaction):
849         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
850         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
851         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
852         
853         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
854         (WebCore::IDBClient::IDBTransaction::abort):
855         (WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
856         (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
857         (WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
858         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
859         (WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
860         (WebCore::IDBClient::IDBTransaction::didDeleteIndexOnServer):
861         (WebCore::IDBClient::IDBTransaction::immediateAbort): Deleted.
862         (WebCore::IDBClient::IDBTransaction::abortOnServer): Deleted.
863         * Modules/indexeddb/client/IDBTransactionImpl.h:
864         
865         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
866         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
867         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
868         
869         * Modules/indexeddb/shared/IDBError.cpp:
870         (WebCore::idbErrorName):
871         (WebCore::idbErrorDescription):
872         * Modules/indexeddb/shared/IDBError.h:
873         
874         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
875         (WebCore::IDBResourceIdentifier::loggingString):
876         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
877
878 2015-11-23  Brady Eidson  <beidson@apple.com>
879
880         Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
881         https://bugs.webkit.org/show_bug.cgi?id=151557
882
883         Reviewed by Alex Christensen.
884
885         No new tests (Unskipping existing test storage/indexeddb/mozilla/global-data.html).
886
887         - Reworking some invalid ASSERTS
888         - Actually opening pending open-database-requests after a version change transaction completes
889         - Allow starting new transactions when the version change transaction has *started* finishing, 
890           but before it finishes finishing.
891
892         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
893         (WebCore::IDBClient::IDBDatabase::transaction):
894         
895         * Modules/indexeddb/client/IDBTransactionImpl.h:
896         
897         * Modules/indexeddb/server/MemoryObjectStore.cpp:
898         (WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
899         
900         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
901         (WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded): Deleted.
902         
903         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
904         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
905         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
906         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
907         * Modules/indexeddb/server/UniqueIDBDatabase.h:
908
909 2015-11-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
910
911         Remove DOMPromiseWithCallback
912         https://bugs.webkit.org/show_bug.cgi?id=151565
913
914         Reviewed by Eric Carlson.
915
916         DOMPromiseWithCallback is no longer used as WebCore JS built-ins are used to the cases where DOMPromiseWithCallback made sense.
917
918         No change in behavior.
919
920         * Modules/mediastream/MediaDevices.h: Moved from DOMPromiseWithCallback to DOMPromise since the API is now called by JS built-ins.
921         * bindings/js/JSDOMPromise.h:
922         (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback): Deleted.
923         (WebCore::DOMPromiseIteratorWithCallback::DOMPromiseIteratorWithCallback): Deleted.
924         (WebCore::Error>::resolve): Deleted.
925         (WebCore::Error>::reject): Deleted.
926         (WebCore::Error>::resolveEnd): Deleted.
927
928 2015-11-23  Brian Burg  <bburg@apple.com>
929
930         Web Inspector: when inspecting the inspector, add the inspection level to the title bar
931         https://bugs.webkit.org/show_bug.cgi?id=151555
932
933         Reviewed by Timothy Hatcher.
934
935         * English.lproj/Localizable.strings: add new localized string for alternate inspector title.
936
937 2015-11-23  Zan Dobersek  <zdobersek@igalia.com>
938
939         [GStreamer] No need to assert the pipeline's bus presence in MediaPlayerPrivateGStreamerBase dtor
940         https://bugs.webkit.org/show_bug.cgi?id=151558
941
942         Reviewed by Carlos Garcia Campos.
943
944         In the MediaPlayerPrivateGStreamerBase destructor, there's some leftover code
945         that acquires a reference to the GStreamer pipeline's bus object and then
946         just asserts that it's not null. Not very useful, so remove it.
947
948         Also use nullptr to null out the m_player member.
949
950         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
951         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
952
953 2015-11-17  Sergio Villar Senin  <svillar@igalia.com>
954
955         ASSERTION FAILED: freeSpace >= 0 in WebCore::RenderGrid::computeTrackSizesForDirection
956         https://bugs.webkit.org/show_bug.cgi?id=151254
957
958         Reviewed by Darin Adler.
959
960         When in quirks mode, abnormally huge margins could lead to
961         negative computations of available logical sizes. We could add
962         an !document.inQuirksMode() check in the assertion but since
963         negative freeSpace values are valid (i.e. the condition is not
964         really part of the contract and everything will work as
965         expected) I've decided to simply remove it.
966
967         Test: fast/css-grid-layout/grid-quirks-mode-huge-margin-crash.html
968
969         * rendering/RenderGrid.cpp:
970         (WebCore::RenderGrid::computeTrackSizesForDirection): Deleted.
971
972 2015-11-22  Myles C. Maxfield  <mmaxfield@apple.com>
973
974         Font selection should not consult font-variant property
975         https://bugs.webkit.org/show_bug.cgi?id=151537
976
977         Reviewed by Simon Fraser.
978
979         In section 4.7 of the CSS Fonts Level 3 spec, it says "[The font-variant and
980         font-feature-settings] do not affect font selection."
981
982         All the other browsers (Chrome, Firefox, and Edge) all obey the spec here. We
983         are the only one who misbehaves. This patch aligns our behavior with the other
984         browsers.
985
986         Test: fast/text/font-selection-font-variant.html
987
988         * css/CSSFontSelector.cpp:
989         (WebCore::computeTraitsMask): Deleted.
990         (WebCore::compareFontFaces): Deleted.
991         (WebCore::CSSFontSelector::getFontFace): Deleted.
992         * css/CSSParser.cpp:
993         (WebCore::isValidKeywordPropertyAndValue):
994         (WebCore::isKeywordPropertyID):
995         (WebCore::CSSParser::createFontFaceRule):
996         (WebCore::CSSParser::CSSParser): Deleted.
997         (WebCore::CSSParser::parseValue): Deleted.
998         (WebCore::CSSParser::parseDeclaration): Deleted.
999         (WebCore::CSSParser::clearProperties): Deleted.
1000         (WebCore::CSSParser::parseFontVariant): Deleted.
1001         (WebCore::CSSParser::createStyleRule): Deleted.
1002         (WebCore::CSSParser::deleteFontFaceOnlyValues): Deleted.
1003         * css/CSSParser.h:
1004         * platform/graphics/FontDescription.cpp:
1005         (WebCore::FontDescription::traitsMask): Deleted.
1006         * platform/graphics/win/FontCacheWin.cpp:
1007         (WebCore::traitsInFamilyEnumProc):
1008         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1009         (WebCore::toTraitsMask):
1010         * platform/text/TextFlags.h:
1011
1012 2015-11-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1013
1014         Unreviewed, rolling out r192727.
1015
1016         It made the selections transparent again and broke
1017         /webkit2/WebKitWebView/snapshot
1018
1019         Reverted changeset:
1020
1021         "[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor,
1022         et. al. should not clobber state of cached GtkStyleContexts"
1023         https://bugs.webkit.org/show_bug.cgi?id=151533
1024         http://trac.webkit.org/changeset/192727
1025
1026 2015-11-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1027
1028         [GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not clobber state of cached GtkStyleContexts
1029         https://bugs.webkit.org/show_bug.cgi?id=151533
1030
1031         Reviewed by Carlos Garcia Campos.
1032
1033         platformActiveSelectionBackgroundColor(), platformInactiveSelectionBackgroundColor(), etc.
1034         are const functions intended only to return a color used for painting, but since r174929
1035         they also change the state of the cached style contexts we use for GTK_TYPE_ENTRY and
1036         GTK_TYPE_TREE_VIEW. That's wrong; those style contexts should not have any state set. This
1037         could cause theme colors returned by those GtkStyleContexts to change unexpectedly,
1038         depending on whether the state is explicitly set before each use, or whether the theme
1039         actually uses the states.
1040
1041         This didn't cause any regression only because every place using these style contexts
1042         explicitly sets the state of the style contexts before use. In fact, the GtkTreeView style
1043         context is not used anywhere else, and the GtkEntry style context is only used in
1044         paintTextField, which does set the state before use (and then reverts it using
1045         save/restore), so this cannot have broken anything in practice. But it's a landmine waiting
1046         for the next programmer to trip it.
1047
1048         Fix this with a gtk_style_context_save()/gtk_style_context_restore() pair.
1049
1050         * rendering/RenderThemeGtk.cpp:
1051         (WebCore::styleColor):
1052
1053 2015-11-21  Myles C. Maxfield  <mmaxfield@apple.com>
1054
1055         Tiny cleanup in ComplexTextController::collectComplexTextRuns()
1056         https://bugs.webkit.org/show_bug.cgi?id=151534
1057
1058         Reviewed by Zalan Bujtas.
1059
1060         The isMissingGlyph boolean is completely unnecessary. Its entire
1061         responsiblity is duplicated by the "font" pointer.
1062
1063         No new tests because there is no behavior change.
1064
1065         * platform/graphics/mac/ComplexTextController.cpp:
1066         (WebCore::ComplexTextController::collectComplexTextRuns):
1067
1068 == Rolled over to ChangeLog-2015-11-21 ==