Use SVGTransform::SVGTransformType instead of an unsigned short
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-11-29  Simon Fraser  <simon.fraser@apple.com>
2
3         Use SVGTransform::SVGTransformType instead of an unsigned short
4         https://bugs.webkit.org/show_bug.cgi?id=151637
5
6         Reviewed by Brady Eidson.
7
8         Make 'type' more strongly typed.
9
10         * svg/SVGTransformable.cpp:
11         (WebCore::SVGTransformable::parseTransformValue):
12         (WebCore::parseAndSkipType):
13         (WebCore::SVGTransformable::parseTransformType):
14         (WebCore::SVGTransformable::parseTransformAttribute):
15         * svg/SVGTransformable.h:
16
17 2015-11-27  Brady Eidson  <beidson@apple.com>
18
19         Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
20         https://bugs.webkit.org/show_bug.cgi?id=151627
21
22         Reviewed by Alexey Proskuryakov.
23
24         No new tests (No change in behavior).
25
26         * CMakeLists.txt:
27         * WebCore.xcodeproj/project.pbxproj:
28
29         * Modules/indexeddb/IDBGetResult.cpp: Added.
30         (WebCore::IDBGetResult::dataFromBuffer):
31         (WebCore::IDBGetResult::isolatedCopy):
32         * Modules/indexeddb/IDBGetResult.h:
33         (WebCore::IDBGetResult::IDBGetResult):
34         (WebCore::IDBGetResult::valueBuffer):
35         (WebCore::IDBGetResult::keyData):
36         (WebCore::IDBGetResult::primaryKeyData):
37         (WebCore::IDBGetResult::keyPath):
38         (WebCore::IDBGetResult::setValueBuffer):
39         (WebCore::IDBGetResult::setKeyData):
40         (WebCore::IDBGetResult::setPrimaryKeyData):
41         (WebCore::IDBGetResult::setKeyPath):
42         (WebCore::IDBGetResult::dataFromBuffer): Deleted.
43         (WebCore::IDBGetResult::isolatedCopy): Deleted.
44
45         * Modules/indexeddb/client/IDBCursorImpl.cpp:
46         (WebCore::IDBClient::IDBCursor::setGetResult):
47         * Modules/indexeddb/client/IDBCursorImpl.h:
48
49         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
50         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
51
52         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
53         (WebCore::GetOperation::perform):
54
55         * Modules/indexeddb/server/IDBBackingStore.h:
56
57         * Modules/indexeddb/server/MemoryCursor.h:
58
59         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
60         (WebCore::IDBServer::MemoryIndexCursor::currentData):
61
62         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
63         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
64
65         * platform/CrossThreadCopier.h:
66
67 2015-11-27  Carlos Garcia Campos  <cgarcia@igalia.com>
68
69         [GTK] Do not use the WebCore garbage collector timer
70         https://bugs.webkit.org/show_bug.cgi?id=151623
71
72         Reviewed by Martin Robinson.
73
74         Now that garbage collector timers have been implemented in
75         JavaScriptCore for glib, we don't need to use another Timer in WebCore.
76
77         * bindings/js/GCController.cpp:
78         (WebCore::GCController::garbageCollectSoon):
79         (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
80
81 2015-11-18  Andy Estes  <aestes@apple.com>
82
83         [Content Filtering] Crash in DocumentLoader::notifyFinished() when allowing a media document to load
84         https://bugs.webkit.org/show_bug.cgi?id=151433
85         rdar://problem/23506594
86
87         Reviewed by Alexey Proskuryakov.
88
89         When the main resource of a media document commits, WebKit cancels its load since the plug-in or media engine
90         will do its own loading. If content filtering is enabled, and the filter waits allow the load until the entire
91         resource is downloaded, then ContentFilter will attempt to call DocumentLoader::notifyFinished() immediately
92         after delivering the buffered resource data to DocumentLoader. However, delivering the data will have nulled out
93         DocumentLoader's m_mainResource when the load was cancelled, leading to a crash in notifyFinished().
94
95         To resolve this, add a new Stopped state to ContentFilter. Set this state if DocumentLoader clears its main
96         resource or detaches from its frame. If ContentFilter is in the Stopped state after calling
97         DocumentLoader::dataReceived(), do not proceed to call DocumentLoader::notifyFinished().
98
99         Test: contentfiltering/allow-media-document.html
100
101         * loader/ContentFilter.cpp:
102         (WebCore::ContentFilter::stopFilteringMainResource): Set m_state to Stopped. If m_mainResource is non-null,
103         removed ContentFilter as a client and set m_mainResource to null.
104         (WebCore::ContentFilter::notifyFinished): Stopped calling DocumentLoader::notifyFinished() if m_state is Stopped
105         after calling DocumentLoader::dataReceived().
106         * loader/ContentFilter.h:
107         * loader/DocumentLoader.cpp:
108         (WebCore::DocumentLoader::detachFromFrame): Called ContentFilter::stopFilteringMainResource() instead of setting
109         m_contentFilter to null.
110         (WebCore::DocumentLoader::clearMainResource): Ditto.
111
112 2015-11-25  Pranjal Jumde  <pjumde@apple.com>
113
114         Checks for buffer-overflows when reading characters from textRun
115         https://bugs.webkit.org/show_bug.cgi?id=151055
116         <rdar://problem/23251789>
117
118         Reviewed by Myles C. Maxfield.
119
120         Prevents an off by one error when adding the last font data to the GlyphBuffer.
121
122         * Source/WebCore/platform/graphics/WidthIterator.cpp:
123         * Source/WebCore/platform/graphics/FontCascade.cpp:
124
125 2015-11-22  Andy Estes  <aestes@apple.com>
126
127         Teach MiniBrowser how to enable the mock content filter
128         https://bugs.webkit.org/show_bug.cgi?id=151540
129
130         Reviewed by Andreas Kling.
131
132         Moved the implementation of MockContentFilterEnabler from TestWebKitAPI to here, renamed it to
133         WebMockContentFilterEnabler, and made it compatible with the legacy Objective-C runtime. Renamed Decision and
134         DecisionPoint to WebMockContentFilterDecision and WebMockContentFilterDecisionPoint, and changed them from enum
135         classes to CF_ENUMs so that they can be used by both C++ and Objective-C source files.
136
137         * WebCore.xcodeproj/project.pbxproj:
138         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
139         (WebCore::JSMockContentFilterSettings::decisionPoint):
140         (WebCore::JSMockContentFilterSettings::setDecisionPoint):
141         (WebCore::toDecision):
142         (WebCore::JSMockContentFilterSettings::decision):
143         (WebCore::JSMockContentFilterSettings::setDecision):
144         (WebCore::JSMockContentFilterSettings::unblockRequestDecision):
145         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision):
146         (WebCore::toJSValue): Deleted.
147         * testing/MockContentFilter.cpp:
148         (WebCore::MockContentFilter::willSendRequest):
149         (WebCore::MockContentFilter::responseReceived):
150         (WebCore::MockContentFilter::addData):
151         (WebCore::MockContentFilter::finishedAddingData):
152         (WebCore::MockContentFilter::unblockHandler):
153         (WebCore::MockContentFilter::maybeDetermineStatus):
154         * testing/MockContentFilter.h:
155         * testing/MockContentFilterEnabler.h: Added.
156         * testing/MockContentFilterEnabler.mm: Added.
157         (-[WebMockContentFilterEnabler initWithDecision:decisionPoint:blockedString:]):
158         (-[WebMockContentFilterEnabler initWithCoder:]):
159         (-[WebMockContentFilterEnabler encodeWithCoder:]):
160         (-[WebMockContentFilterEnabler enable]):
161         (-[WebMockContentFilterEnabler dealloc]):
162         (+[WebMockContentFilterEnabler supportsSecureCoding]):
163         (-[WebMockContentFilterEnabler copyWithZone:]):
164         * testing/MockContentFilterSettings.h:
165         (WebCore::MockContentFilterSettings::decisionPoint):
166         (WebCore::MockContentFilterSettings::setDecisionPoint):
167         (WebCore::MockContentFilterSettings::decision):
168         (WebCore::MockContentFilterSettings::setDecision):
169         (WebCore::MockContentFilterSettings::unblockRequestDecision):
170         (WebCore::MockContentFilterSettings::setUnblockRequestDecision):
171
172 2015-11-24  Xabier Rodriguez Calvar  <calvaris@igalia.com>
173
174         [Streams API] Implement pipeTo method in readable Stream
175         https://bugs.webkit.org/show_bug.cgi?id=151588
176
177         Reviewed by Darin Adler.
178
179         Implemented pipeTo method according to the reference implementation in the spec as the spec is not written
180         yet. It can be found at https://github.com/whatwg/streams/blob/632b26a05f3106650b1ec91239ad5b012e6c64af/reference-implementation/lib/readable-stream.js#L75.
181
182         Tests: streams/pipe-to.html
183                streams/reference-implementation/brand-checks.html
184                streams/reference-implementation/pipe-through.html
185                streams/reference-implementation/pipe-to.html
186                streams/reference-implementation/pipe-to-options.html
187                streams/reference-implementation/readable-stream-templated
188
189         * Modules/streams/ReadableStream.js:
190         (doPipe): Internal function of pipeTo.
191         (closeDest): Internal function of pipeTo.
192         (abortDest): Internal function of pipeTo.
193         (pipeTo): Implemented as per spec with some other internal functions as helpers.
194
195 2015-11-24  Antti Koivisto  <antti@apple.com>
196
197         REGRESSION (r190983): Non-element, non-text nodes should not be distributed to slots
198         https://bugs.webkit.org/show_bug.cgi?id=151566
199         rdar://problem/23430177
200
201         Reviewed by Zalan Bujtas.
202
203         We don't invalidate slot assignments except for text or element children. Fix by not
204         not assigning other nodes to slots as it is not useful.
205
206         Test: fast/html/details-comment-crash.html
207
208         * dom/SlotAssignment.cpp:
209         (WebCore::slotNameFromSlotAttribute):
210         (WebCore::SlotAssignment::findAssignedSlot):
211         (WebCore::SlotAssignment::assignSlots):
212
213 2015-11-23  David Kilzer  <ddkilzer@apple.com>
214
215         Hardening against CSSSelector double frees
216         <http://webkit.org/b/56124>
217         <rdar://problem/9119036>
218
219         Reviewed by Antti Koivisto.
220
221         Add some security assertions to catch this issue if it ever
222         happens in Debug builds, and make changes in
223         CSSSelector::~CSSSelector() and
224         CSSSelectorList::deleteSelectors() to prevent obvious issues if
225         they're ever called twice in Release builds.
226
227         No new tests because we don't know how to reproduce this.
228
229         * css/CSSSelector.cpp:
230         (WebCore::CSSSelector::CSSSelector): Initialize
231         m_destructorHasBeenCalled.
232         * css/CSSSelector.h:
233         (WebCore::CSSSelector::m_destructorHasBeenCalled): Add bitfield.
234         (WebCore::CSSSelector::CSSSelector): Initialize
235         m_destructorHasBeenCalled.
236         (WebCore::CSSSelector::~CSSSelector): Add security assertion
237         that this is never called twice.  Clear out any fields that
238         would have caused us to dereference an object twice.
239
240         * css/CSSSelectorList.cpp:
241         (WebCore::CSSSelectorList::deleteSelectors): Clear
242         m_selectorArray when freeing the memory to which it was
243         pointing.  This prevents re-entrancy issues or calling this
244         method twice on the same thread.  Also restructure the for()
245         loop to prevent calling CSSSelector::isLastInSelectorList()
246         after CSSSelector::~CSSSelector() has been called (via CRBug
247         241892).
248
249 2015-11-23  Brian Burg  <bburg@apple.com>
250
251         Web Inspector: inspector settings should not be shared between different inspection levels
252         https://bugs.webkit.org/show_bug.cgi?id=151151
253
254         Reviewed by Timothy Hatcher.
255
256         InspectorController and InspectorFrontendClient should know how to compute their
257         inspection levels, so that this level can be exposed to the Inspector frontend for
258         preference disambiguation by inspection level.
259
260          - A Page with normal web content has an inspection level of 0.
261          - The first Web Inspector has an inspection level of 1.
262          - The second Web Inspector that inspects the Inspector has an inspection level of 2.
263          - And so forth...
264
265         For local frontend clients (WK1 and the ProtocolTestStub), the inspection level of
266         a Page computed as follows:
267
268         - If the page's inspector controller has no frontend client, then the Page
269         is normal web content (level 0).
270         - If the page's inspector controller has a frontend client, ask for its inspection level.
271         A frontend client looks at the inspection level reported by inspected page's inspector
272         controller and increments by one to account for the crossed inspection boundary.
273
274         No new tests, this is blocked by test infrastructure fixes (https://webkit.org/b/151573).
275
276         * inspector/InspectorController.cpp:
277         (WebCore::InspectorController::inspectionLevel): Added.
278         (WebCore::InspectorController::hasInspectorFrontendClient): Deleted.
279         * inspector/InspectorController.h:
280         * inspector/InspectorFrontendClient.h:
281         * inspector/InspectorFrontendClientLocal.cpp:
282         (WebCore::InspectorFrontendClientLocal::canAttachWindow): Check inspectionLevel().
283         (WebCore::InspectorFrontendClientLocal::inspectionLevel): Added.
284         * inspector/InspectorFrontendClientLocal.h:
285         * inspector/InspectorFrontendHost.cpp:
286         (WebCore::InspectorFrontendHost::inspectionLevel): Added.
287         * inspector/InspectorFrontendHost.h:
288         * inspector/InspectorFrontendHost.idl:
289         * page/ContextMenuController.cpp:
290         (WebCore::ContextMenuController::populate): Check inspectionLevel().
291
292 2015-11-20  Brian Burg  <bburg@apple.com>
293
294         Web Inspector: RemoteInspector should track targets and connections for remote automation
295         https://bugs.webkit.org/show_bug.cgi?id=151042
296
297         Reviewed by Joseph Pecoraro.
298
299         Use the new RemoteControllableTarget API method names.
300
301         No new tests, no behavior change.
302
303         * page/PageDebuggable.cpp:
304         (WebCore::PageDebuggable::connect):
305         (WebCore::PageDebuggable::dispatchMessageFromRemote):
306         (WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend): Deleted.
307         * page/PageDebuggable.h:
308
309 2015-11-23  Brady Eidson  <beidson@apple.com>
310
311         Modern IDB: Unskip all indexeddb/mozilla tests that pass.
312         https://bugs.webkit.org/show_bug.cgi?id=151568
313         
314         Reviewed by Alex Christensen.
315
316         No new tests (Lots of skipped existing tests now pass).
317
318         * Modules/indexeddb/shared/IDBError.h:
319
320 2015-11-23  Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
321
322         Add WebCore namespace for generated bindings for supplemental method calls
323         https://bugs.webkit.org/show_bug.cgi?id=151431
324
325         Reviewed by Alex Christensen.
326
327         Address build failures for generated supplemental method calls which are in the WebCore namespace. 
328         The bindings are outside the WebCore namespace - so add WebCore namespace specifier where required.
329
330         * bindings/scripts/CodeGeneratorJS.pm:
331         (GenerateHeader):
332         (GenerateImplementation):
333         (GenerateParametersCheck):
334         * bindings/scripts/CodeGeneratorObjC.pm:
335         (GenerateImplementation):
336         * bindings/scripts/test/JS/JSTestInterface.cpp:
337         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
338         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
339         (WebCore::jsTestInterfaceSupplementalStr1):
340         (WebCore::jsTestInterfaceSupplementalStr2):
341         (WebCore::jsTestInterfaceSupplementalNode):
342         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
343         (WebCore::setJSTestInterfaceSupplementalStr2):
344         (WebCore::setJSTestInterfaceSupplementalNode):
345         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
346         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
347         (WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4):
348         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
349         (-[DOMTestInterface supplementalStr1]):
350         (-[DOMTestInterface supplementalStr2]):
351         (-[DOMTestInterface setSupplementalStr2:]):
352         (-[DOMTestInterface supplementalStr3]):
353         (-[DOMTestInterface setSupplementalStr3:]):
354         (-[DOMTestInterface supplementalNode]):
355         (-[DOMTestInterface setSupplementalNode:]):
356         (-[DOMTestInterface builtinAttribute]):
357         (-[DOMTestInterface setBuiltinAttribute:]):
358         (-[DOMTestInterface supplementalMethod1]):
359         (-[DOMTestInterface supplementalMethod2:objArg:]):
360         (-[DOMTestInterface supplementalMethod3]):
361         (-[DOMTestInterface supplementalMethod4]):
362         (-[DOMTestInterface builtinFunction]):
363
364 2015-11-23  Brady Eidson  <beidson@apple.com>
365
366         Modern IDB: When a transaction is aborted, call onerror handlers for all in-progress requests.
367         https://bugs.webkit.org/show_bug.cgi?id=151550
368
369         Reviewed by Alex Christensen.
370
371         Test: storage/indexeddb/modern/abort-requests-cancelled.html
372               storage/indexeddb/modern/idbtransaction-objectstore-failures.html (with changes)
373               storage/indexeddb/modern/index-5.html (with changes)
374               Various (currently skipped) legacy IDB tests.
375
376         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
377         (WebCore::IDBClient::IDBDatabase::transaction):
378         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
379         (WebCore::IDBClient::IDBDatabase::didStartTransaction):
380         (WebCore::IDBClient::IDBDatabase::willCommitTransaction):
381         (WebCore::IDBClient::IDBDatabase::didCommitTransaction):
382         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
383         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
384         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
385         
386         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
387         (WebCore::IDBClient::IDBTransaction::abort):
388         (WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
389         (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
390         (WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
391         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
392         (WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
393         (WebCore::IDBClient::IDBTransaction::didDeleteIndexOnServer):
394         (WebCore::IDBClient::IDBTransaction::immediateAbort): Deleted.
395         (WebCore::IDBClient::IDBTransaction::abortOnServer): Deleted.
396         * Modules/indexeddb/client/IDBTransactionImpl.h:
397         
398         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
399         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
400         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
401         
402         * Modules/indexeddb/shared/IDBError.cpp:
403         (WebCore::idbErrorName):
404         (WebCore::idbErrorDescription):
405         * Modules/indexeddb/shared/IDBError.h:
406         
407         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
408         (WebCore::IDBResourceIdentifier::loggingString):
409         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
410
411 2015-11-23  Brady Eidson  <beidson@apple.com>
412
413         Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
414         https://bugs.webkit.org/show_bug.cgi?id=151557
415
416         Reviewed by Alex Christensen.
417
418         No new tests (Unskipping existing test storage/indexeddb/mozilla/global-data.html).
419
420         - Reworking some invalid ASSERTS
421         - Actually opening pending open-database-requests after a version change transaction completes
422         - Allow starting new transactions when the version change transaction has *started* finishing, 
423           but before it finishes finishing.
424
425         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
426         (WebCore::IDBClient::IDBDatabase::transaction):
427         
428         * Modules/indexeddb/client/IDBTransactionImpl.h:
429         
430         * Modules/indexeddb/server/MemoryObjectStore.cpp:
431         (WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
432         
433         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
434         (WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded): Deleted.
435         
436         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
437         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
438         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
439         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
440         * Modules/indexeddb/server/UniqueIDBDatabase.h:
441
442 2015-11-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
443
444         Remove DOMPromiseWithCallback
445         https://bugs.webkit.org/show_bug.cgi?id=151565
446
447         Reviewed by Eric Carlson.
448
449         DOMPromiseWithCallback is no longer used as WebCore JS built-ins are used to the cases where DOMPromiseWithCallback made sense.
450
451         No change in behavior.
452
453         * Modules/mediastream/MediaDevices.h: Moved from DOMPromiseWithCallback to DOMPromise since the API is now called by JS built-ins.
454         * bindings/js/JSDOMPromise.h:
455         (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback): Deleted.
456         (WebCore::DOMPromiseIteratorWithCallback::DOMPromiseIteratorWithCallback): Deleted.
457         (WebCore::Error>::resolve): Deleted.
458         (WebCore::Error>::reject): Deleted.
459         (WebCore::Error>::resolveEnd): Deleted.
460
461 2015-11-23  Brian Burg  <bburg@apple.com>
462
463         Web Inspector: when inspecting the inspector, add the inspection level to the title bar
464         https://bugs.webkit.org/show_bug.cgi?id=151555
465
466         Reviewed by Timothy Hatcher.
467
468         * English.lproj/Localizable.strings: add new localized string for alternate inspector title.
469
470 2015-11-23  Zan Dobersek  <zdobersek@igalia.com>
471
472         [GStreamer] No need to assert the pipeline's bus presence in MediaPlayerPrivateGStreamerBase dtor
473         https://bugs.webkit.org/show_bug.cgi?id=151558
474
475         Reviewed by Carlos Garcia Campos.
476
477         In the MediaPlayerPrivateGStreamerBase destructor, there's some leftover code
478         that acquires a reference to the GStreamer pipeline's bus object and then
479         just asserts that it's not null. Not very useful, so remove it.
480
481         Also use nullptr to null out the m_player member.
482
483         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
484         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
485
486 2015-11-17  Sergio Villar Senin  <svillar@igalia.com>
487
488         ASSERTION FAILED: freeSpace >= 0 in WebCore::RenderGrid::computeTrackSizesForDirection
489         https://bugs.webkit.org/show_bug.cgi?id=151254
490
491         Reviewed by Darin Adler.
492
493         When in quirks mode, abnormally huge margins could lead to
494         negative computations of available logical sizes. We could add
495         an !document.inQuirksMode() check in the assertion but since
496         negative freeSpace values are valid (i.e. the condition is not
497         really part of the contract and everything will work as
498         expected) I've decided to simply remove it.
499
500         Test: fast/css-grid-layout/grid-quirks-mode-huge-margin-crash.html
501
502         * rendering/RenderGrid.cpp:
503         (WebCore::RenderGrid::computeTrackSizesForDirection): Deleted.
504
505 2015-11-22  Myles C. Maxfield  <mmaxfield@apple.com>
506
507         Font selection should not consult font-variant property
508         https://bugs.webkit.org/show_bug.cgi?id=151537
509
510         Reviewed by Simon Fraser.
511
512         In section 4.7 of the CSS Fonts Level 3 spec, it says "[The font-variant and
513         font-feature-settings] do not affect font selection."
514
515         All the other browsers (Chrome, Firefox, and Edge) all obey the spec here. We
516         are the only one who misbehaves. This patch aligns our behavior with the other
517         browsers.
518
519         Test: fast/text/font-selection-font-variant.html
520
521         * css/CSSFontSelector.cpp:
522         (WebCore::computeTraitsMask): Deleted.
523         (WebCore::compareFontFaces): Deleted.
524         (WebCore::CSSFontSelector::getFontFace): Deleted.
525         * css/CSSParser.cpp:
526         (WebCore::isValidKeywordPropertyAndValue):
527         (WebCore::isKeywordPropertyID):
528         (WebCore::CSSParser::createFontFaceRule):
529         (WebCore::CSSParser::CSSParser): Deleted.
530         (WebCore::CSSParser::parseValue): Deleted.
531         (WebCore::CSSParser::parseDeclaration): Deleted.
532         (WebCore::CSSParser::clearProperties): Deleted.
533         (WebCore::CSSParser::parseFontVariant): Deleted.
534         (WebCore::CSSParser::createStyleRule): Deleted.
535         (WebCore::CSSParser::deleteFontFaceOnlyValues): Deleted.
536         * css/CSSParser.h:
537         * platform/graphics/FontDescription.cpp:
538         (WebCore::FontDescription::traitsMask): Deleted.
539         * platform/graphics/win/FontCacheWin.cpp:
540         (WebCore::traitsInFamilyEnumProc):
541         * platform/graphics/cocoa/FontCacheCoreText.cpp:
542         (WebCore::toTraitsMask):
543         * platform/text/TextFlags.h:
544
545 2015-11-22  Carlos Garcia Campos  <cgarcia@igalia.com>
546
547         Unreviewed, rolling out r192727.
548
549         It made the selections transparent again and broke
550         /webkit2/WebKitWebView/snapshot
551
552         Reverted changeset:
553
554         "[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor,
555         et. al. should not clobber state of cached GtkStyleContexts"
556         https://bugs.webkit.org/show_bug.cgi?id=151533
557         http://trac.webkit.org/changeset/192727
558
559 2015-11-22  Michael Catanzaro  <mcatanzaro@igalia.com>
560
561         [GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not clobber state of cached GtkStyleContexts
562         https://bugs.webkit.org/show_bug.cgi?id=151533
563
564         Reviewed by Carlos Garcia Campos.
565
566         platformActiveSelectionBackgroundColor(), platformInactiveSelectionBackgroundColor(), etc.
567         are const functions intended only to return a color used for painting, but since r174929
568         they also change the state of the cached style contexts we use for GTK_TYPE_ENTRY and
569         GTK_TYPE_TREE_VIEW. That's wrong; those style contexts should not have any state set. This
570         could cause theme colors returned by those GtkStyleContexts to change unexpectedly,
571         depending on whether the state is explicitly set before each use, or whether the theme
572         actually uses the states.
573
574         This didn't cause any regression only because every place using these style contexts
575         explicitly sets the state of the style contexts before use. In fact, the GtkTreeView style
576         context is not used anywhere else, and the GtkEntry style context is only used in
577         paintTextField, which does set the state before use (and then reverts it using
578         save/restore), so this cannot have broken anything in practice. But it's a landmine waiting
579         for the next programmer to trip it.
580
581         Fix this with a gtk_style_context_save()/gtk_style_context_restore() pair.
582
583         * rendering/RenderThemeGtk.cpp:
584         (WebCore::styleColor):
585
586 2015-11-21  Myles C. Maxfield  <mmaxfield@apple.com>
587
588         Tiny cleanup in ComplexTextController::collectComplexTextRuns()
589         https://bugs.webkit.org/show_bug.cgi?id=151534
590
591         Reviewed by Zalan Bujtas.
592
593         The isMissingGlyph boolean is completely unnecessary. Its entire
594         responsiblity is duplicated by the "font" pointer.
595
596         No new tests because there is no behavior change.
597
598         * platform/graphics/mac/ComplexTextController.cpp:
599         (WebCore::ComplexTextController::collectComplexTextRuns):
600
601 == Rolled over to ChangeLog-2015-11-21 ==