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