Modern IDB: Support IDBDatabase.close().
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-15  Brady Eidson  <beidson@apple.com>
2
3         Modern IDB: Support IDBDatabase.close().
4         https://bugs.webkit.org/show_bug.cgi?id=150150
5
6         Reviewed by Alex Christensen.
7
8         No new tests (Covered by changes to storage/indexeddb/modern/opendatabase-versions.html).
9
10         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
11         (WebCore::IDBClient::IDBConnectionToServer::databaseConnectionClosed):
12         * Modules/indexeddb/client/IDBConnectionToServer.h:
13         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
14
15         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
16         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
17         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
18         (WebCore::IDBClient::IDBDatabase::close):
19         (WebCore::IDBClient::IDBDatabase::maybeCloseInServer):
20         (WebCore::IDBClient::IDBDatabase::commitTransaction):
21         * Modules/indexeddb/client/IDBDatabaseImpl.h:
22         (WebCore::IDBClient::IDBDatabase::databaseConnectionIdentifier):
23
24         * Modules/indexeddb/client/IDBRequestImpl.cpp:
25         (WebCore::IDBClient::IDBRequest::result):
26
27         * Modules/indexeddb/server/IDBServer.cpp:
28         (WebCore::IDBServer::IDBServer::databaseConnectionClosed):
29         * Modules/indexeddb/server/IDBServer.h:
30
31         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
32         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
33         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
34         * Modules/indexeddb/server/UniqueIDBDatabase.h:
35
36         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
37         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
38         (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
39         (WebCore::IDBServer::UniqueIDBDatabaseConnection::hasNonFinishedTransactions):
40         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
41         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
42
43         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
44         (WebCore::InProcessIDBServer::databaseConnectionClosed):
45         * Modules/indexeddb/shared/InProcessIDBServer.h:
46
47 2015-10-15  David Hyatt  <hyatt@apple.com>
48
49         Patch parseKeywordValue to accept "unset" so that it goes down the faster parsing path.
50         https://bugs.webkit.org/show_bug.cgi?id=150213
51
52         Reviewed by Dean Jackson.
53
54         No new tests as correctness doesn't change (just speed).
55
56         * css/CSSParser.cpp:
57         (WebCore::parseKeywordValue):
58
59 2015-10-15  David Hyatt  <hyatt@apple.com>
60
61         Add support for the CSS 'unset' keyword.
62         https://bugs.webkit.org/show_bug.cgi?id=148614
63
64         Reviewed by Dean Jackson.
65
66         Added new test in fast/css, and existing variables tests also use unset in several tests.
67
68         * WebCore.xcodeproj/project.pbxproj:
69         Add CSSUnsetValue.cpp to the project.
70
71         * bindings/objc/DOMCSS.mm:
72         (kitClass):
73         Make sure UNSET is handled in the switch.
74
75         * css/CSSParser.cpp:
76         (WebCore::parseKeywordValue):
77         (WebCore::CSSParser::parseValue):
78         (WebCore::CSSParser::parseCustomPropertyDeclaration):
79         Add cases to create a CSSUnsetValue properly.
80
81         * css/CSSToStyleMap.cpp:
82         (WebCore::CSSToStyleMap::styleImage):
83         (WebCore::CSSToStyleMap::mapFillAttachment):
84         (WebCore::CSSToStyleMap::mapFillClip):
85         (WebCore::CSSToStyleMap::mapFillComposite):
86         (WebCore::CSSToStyleMap::mapFillBlendMode):
87         (WebCore::CSSToStyleMap::mapFillOrigin):
88         (WebCore::CSSToStyleMap::mapFillImage):
89         (WebCore::CSSToStyleMap::mapFillRepeatX):
90         (WebCore::CSSToStyleMap::mapFillRepeatY):
91         (WebCore::convertToLengthSize):
92         (WebCore::CSSToStyleMap::mapFillSize):
93         (WebCore::CSSToStyleMap::mapFillXPosition):
94         (WebCore::CSSToStyleMap::mapFillYPosition):
95         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
96         (WebCore::CSSToStyleMap::mapAnimationDelay):
97         (WebCore::CSSToStyleMap::mapAnimationDirection):
98         (WebCore::CSSToStyleMap::mapAnimationDuration):
99         (WebCore::CSSToStyleMap::mapAnimationFillMode):
100         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
101         (WebCore::CSSToStyleMap::mapAnimationName):
102         (WebCore::CSSToStyleMap::mapAnimationPlayState):
103         (WebCore::CSSToStyleMap::mapAnimationProperty):
104         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
105         (WebCore::CSSToStyleMap::mapAnimationTrigger):
106         The background and animation functions need to check for unset and be able to map it properly to initial. This is done
107         with a new treatAsInitial method on CSSValue that can take the property ID and check for both initial
108         or unset on a non-inherited property.
109
110         * css/CSSUnsetValue.cpp: Added.
111         (WebCore::CSSUnsetValue::customCSSText):
112         * css/CSSUnsetValue.h: Added.
113         (WebCore::CSSUnsetValue::create):
114         (WebCore::CSSUnsetValue::equals):
115         (WebCore::CSSUnsetValue::CSSUnsetValue):
116         This new value looks exactly like CSSInheritedValue and CSSInitialValue.
117
118         * css/CSSValue.cpp:
119         (WebCore::CSSValue::cssValueType):
120         (WebCore::CSSValue::cssText):
121         (WebCore::CSSValue::destroy):
122         (WebCore::CSSValue::isInvalidCustomPropertyValue):
123         (WebCore::CSSValue::treatAsInheritedValue):
124         (WebCore::CSSValue::treatAsInitialValue):
125         * css/CSSValue.h:
126         (WebCore::CSSValue::isUnsetValue):
127         Add isUnsetValue and the UnsetClass. Add support for treatAsInheritedValue and treatAsInitialValue to have
128         a way to query for initial/inherit or the matching unset type.
129
130         * css/CSSValueKeywords.in:
131         Add the unset keyword.
132
133         * css/CSSValuePool.cpp:
134         (WebCore::CSSValuePool::CSSValuePool):
135         * css/CSSValuePool.h:
136         (WebCore::CSSValuePool::createUnsetValue):
137         Have a singleton model for unset just like we do for inherit/initial.
138
139         * css/StyleResolver.cpp:
140         (WebCore::StyleResolver::applyProperty):
141         Handle unset correctly. It maps to inherit for inherited properties and initial for non-inherited ones.
142
143 2015-10-15  Myles C. Maxfield  <mmaxfield@apple.com>
144
145         Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
146         https://bugs.webkit.org/show_bug.cgi?id=150155
147
148         Reviewed by Tim Horton.
149
150         No new tests because there is no behavior change.
151
152         * platform/graphics/cg/GraphicsContextCG.cpp:
153         (WebCore::GraphicsContext::drawPattern):
154         (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
155         * platform/graphics/cg/ImageBufferCG.cpp:
156         (WebCore::ImageBuffer::putByteArray):
157         * platform/ios/WebCoreSystemInterfaceIOS.mm:
158         * platform/mac/WebCoreSystemInterface.h:
159         * platform/mac/WebCoreSystemInterface.mm:
160
161 2015-10-15  Dan Bernstein  <mitz@apple.com>
162
163         Fixed the build.
164
165         * platform/network/mac/ResourceHandleMac.mm:
166
167 2015-10-15  Dan Bernstein  <mitz@apple.com>
168
169         [Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
170         https://bugs.webkit.org/show_bug.cgi?id=150189
171
172         Reviewed by Anders Carlsson.
173
174         * platform/ios/WebCoreSystemInterfaceIOS.mm: Removed definition.
175         * platform/mac/WebCoreSystemInterface.h: Removed declaration.
176         * platform/mac/WebCoreSystemInterface.mm: Removed definition.
177
178         * platform/network/mac/ResourceHandleMac.mm:
179         (WebCore::ResourceHandle::start): Changed to use -[NSURLConnection setDefersLoading:].
180         (WebCore::ResourceHandle::platformSetDefersLoading): Ditto.
181
182         * platform/spi/cocoa/NSURLConnectionSPI.h: Added declaration of
183           -[NSURLConnection setDefersLoading:].
184
185 2015-10-15  Dean Jackson  <dino@apple.com>
186
187         CSSKeyframesRule::appendRule is deprecated, but is actually the spec
188         https://bugs.webkit.org/show_bug.cgi?id=150113
189
190         Reviewed by Simon Fraser.
191
192         I stupidly deprecated the wrong function in
193         http://trac.webkit.org/changeset/174469
194
195         * css/CSSKeyframesRule.cpp:
196         (WebCore::CSSKeyframesRule::insertRule): Swap the code between these two.
197         (WebCore::CSSKeyframesRule::appendRule):
198
199 2015-10-14  David Hyatt  <hyatt@apple.com>
200
201         Implement CSS Variables.
202         https://bugs.webkit.org/show_bug.cgi?id=19660
203
204         Reviewed by Dean Jackson.
205
206         Added new tests in fast/css/custom-properties and fast/css/variables.
207
208         * CMakeLists.txt:
209         * WebCore.xcodeproj/project.pbxproj:
210         Add CSSVariableValue.cpp and CSSVariableDependentValue.cpp to builds.
211
212         * css/CSSCalculationValue.cpp:
213         (WebCore::hasDoubleValue):
214         Handle the new CSS_PARSER_WHITESPACE value.
215
216         * css/CSSComputedStyleDeclaration.cpp:
217         (WebCore::ComputedStyleExtractor::customPropertyValue):
218         Patched to make sure style is updated so that dynamic changes to custom properties are reflected
219         immediately when querying values.
220
221         (WebCore::CSSComputedStyleDeclaration::length):
222         (WebCore::CSSComputedStyleDeclaration::item):
223         The custom properties table is a reference and not a pointer now.
224
225         * css/CSSCustomPropertyValue.h:
226         (WebCore::CSSCustomPropertyValue::create):
227         (WebCore::CSSCustomPropertyValue::createInvalid):
228         (WebCore::CSSCustomPropertyValue::customCSSText):
229         (WebCore::CSSCustomPropertyValue::equals):
230         (WebCore::CSSCustomPropertyValue::isInvalid):
231         (WebCore::CSSCustomPropertyValue::containsVariables):
232         (WebCore::CSSCustomPropertyValue::value):
233         (WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
234         The CSSCustomPropertyValue represents a custom property/value pair in the back end. It holds on
235         to both the property name and a CSSValueList that has the original parser terms. This class also
236         doubles as the invalid-at-compute-time value for custom properties when they contain cycles, etc.
237
238         * css/CSSFunctionValue.cpp:
239         (WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
240          * css/CSSFunctionValue.h:
241         (WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
242         Hands back a CSSParserValue for a function with variables replaced with their real values (or fallback).
243
244         * css/CSSGrammar.y.in:
245         Many changes to support the var() syntax and to handle error conditions and cases.
246
247         * css/CSSParser.cpp:
248         (WebCore::filterProperties):
249         Null check the value here. Shouldn't happen, but being paranoid.
250
251         (WebCore::CSSParser::parseVariableDependentValue):
252         This function converts a CSSValueList back into a CSSParserValueList and then passes
253         it off to the parser. If the result parses, successfully, then the parsed CSSValue is handed back.
254
255         (WebCore::CSSParser::parseValue):
256         Detect when a property value contains variables and simply make a CSSVariableDependentValue to hold
257         a copy of the parser value list (as a CSSValueList). We defer parsing the list until compute-time
258         when we know the values of the variables to use.
259
260         (WebCore::CSSParser::parseCustomPropertyDeclaration):
261         Add support for inherit, initial and variable references in custom properties.
262
263         (WebCore::CSSParser::detectFunctionTypeToken):
264         Add support for detection of the "var" token.
265
266         (WebCore::CSSParser::realLex):
267         Fix the parsing of custom properties to allow "--" and to allow them to start with digits, e.g., "--0".
268
269         * css/CSSParser.h:
270         Add parseVariableDependentValue function for handling variable substitution and subsequent parsing
271         of the resolved parser value list.
272
273         * css/CSSParserValues.cpp:
274         (WebCore::CSSParserValueList::containsVariables):
275         Get rid of the toString() function (no longer needed) and replace it with containsVariables(). This
276         check is used to figure out if a parser value list has variables and thus needs to defer parsing
277         until later.
278
279         (WebCore::CSSParserValue::createCSSValue):
280         Add support for the creation of values for variables, CSSVariableValues.
281
282         (WebCore::CSSParserValueList::toString): Deleted.
283         No longer needed.
284
285         * css/CSSParserValues.h:
286         Add CSSParserVariable as a new kind of parser value. This represents a var() that is encountered
287         during parsing. It is similar to a function except it has to hold both the reference (custom property name)
288         and fallback arguments.
289
290         * css/CSSPrimitiveValue.cpp:
291         (WebCore::isValidCSSUnitTypeForDoubleConversion):
292         (WebCore::CSSPrimitiveValue::cleanup):
293         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
294         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
295         (WebCore::CSSPrimitiveValue::equals):
296         Add support for CSS_PARSER_WHITESPACE as a way of preserving whitespace as a parsed item (variables can
297         be only whitespace, and this has to be retained).
298
299         (WebCore::CSSPrimitiveValue::buildParserValue):
300         Conversion from a CSSPrimitiveValue back into a parser value is handled by this function.
301
302         * css/CSSPrimitiveValue.h:
303         (WebCore::CSSPrimitiveValue::isParserOperator):
304         (WebCore::CSSPrimitiveValue::parserOperator):
305         Add ability to get parser operator info. Add the buildParserValue declaration.
306
307         * css/CSSValue.cpp:
308         (WebCore::CSSValue::equals):
309         (WebCore::CSSValue::cssText):
310         (WebCore::CSSValue::destroy):
311         (WebCore::CSSValue::cloneForCSSOM):
312         (WebCore::CSSValue::isInvalidCustomPropertyValue):
313         * css/CSSValue.h:
314         Add support for variable values and variable dependent values.
315
316         * css/CSSValueList.cpp:
317         (WebCore::CSSValueList::customCSSText):
318         Improve serialization to not output extra spaces when a comma operator is a value.
319
320         (WebCore::CSSValueList::containsVariables):
321         Whether or not a CSSVariableValue can be found somewhere within the list (or its descendants).
322
323         (WebCore::CSSValueList::checkVariablesForCycles):
324         Called to check variables for cycles.
325
326         (WebCore::CSSValueList::buildParserValueSubstitutingVariables):
327         (WebCore::CSSValueList::buildParserValueListSubstitutingVariables):
328         Functions that handle converting the value list to a parser value list while making
329         variable substitutions along the way.
330
331         * css/CSSValueList.h:
332         Add the new buildParserXXX functions.
333
334         * css/CSSVariableDependentValue.cpp: Added.
335         (WebCore::CSSVariableDependentValue::checkVariablesForCycles):
336         * css/CSSVariableDependentValue.h: Added.
337         (WebCore::CSSVariableDependentValue::create):
338         (WebCore::CSSVariableDependentValue::customCSSText):
339         (WebCore::CSSVariableDependentValue::equals):
340         (WebCore::CSSVariableDependentValue::propertyID):
341         (WebCore::CSSVariableDependentValue::valueList):
342         (WebCore::CSSVariableDependentValue::CSSVariableDependentValue):
343         This value represents a list of terms that have not had variables substituted yet. The list
344         is held by the value so that it can be converted back into a parser value list once the
345         variable values are known.
346
347         * css/CSSVariableValue.cpp: Added.
348         (WebCore::CSSVariableValue::CSSVariableValue):
349         (WebCore::CSSVariableValue::customCSSText):
350         (WebCore::CSSVariableValue::equals):
351         (WebCore::CSSVariableValue::buildParserValueListSubstitutingVariables):
352         * css/CSSVariableValue.h: Added.
353         (WebCore::CSSVariableValue::create):
354         (WebCore::CSSVariableValue::name):
355         (WebCore::CSSVariableValue::fallbackArguments):
356         This value represents a var() itself. It knows how to do the substitution of the variable
357         value and to apply fallback if that value is not present.
358
359         * css/StyleProperties.cpp:
360         (WebCore::StyleProperties::getPropertyValue):
361         (WebCore::StyleProperties::borderSpacingValue):
362         (WebCore::StyleProperties::getLayeredShorthandValue):
363         (WebCore::StyleProperties::getShorthandValue):
364         (WebCore::StyleProperties::getCommonValue):
365         (WebCore::StyleProperties::getPropertyCSSValue):
366         (WebCore::StyleProperties::getPropertyCSSValueInternal):
367         (WebCore::StyleProperties::asText):
368         (WebCore::StyleProperties::copyPropertiesInSet):
369         * css/StyleProperties.h:
370         Patched to factor property fetching into an internal method so that variables can work with shorthands
371         in the CSS OM.
372
373         * css/StyleResolver.cpp:
374         (WebCore::StyleResolver::applyProperty):
375         Resolve variable values at compute time. If they fail to resolve, use inherit or initial as the
376         value (depending on whether the property inherits by default).
377
378         (WebCore::StyleResolver::resolvedVariableValue):
379         Helper function that calls parseVariableDependentValue and gets the resolved result.
380
381         (WebCore::StyleResolver::applyCascadedProperties):
382         After custom properties have been collected, we check for cycles and perform variable substitutions.
383         This way we get all the variables replaced before we inherit down the style tree.
384
385         * css/StyleResolver.h:
386         Add resolvedVariableValue declaration.
387
388         * css/makeprop.pl:
389         Make sure custom properties are inherited by default.
390
391         * rendering/style/RenderStyle.cpp:
392         (WebCore::RenderStyle::checkVariablesInCustomProperties):
393         This function handles updating variables with cycles to be invalid in the RenderStyle. It then also
394         handles the replacement of variables found in custom properties with resolved values. All custom
395         properties are either invalid or are real non-variable-dependent value lists after this function
396         completes.
397
398         * rendering/style/RenderStyle.h:
399         Add checkVariablesInCustomProperties declaration.
400
401         * rendering/style/StyleCustomPropertyData.h:
402         (WebCore::StyleCustomPropertyData::create):
403         (WebCore::StyleCustomPropertyData::copy):
404         (WebCore::StyleCustomPropertyData::operator==):
405         (WebCore::StyleCustomPropertyData::operator!=):
406         (WebCore::StyleCustomPropertyData::setCustomPropertyValue):
407         (WebCore::StyleCustomPropertyData::getCustomPropertyValue):
408         (WebCore::StyleCustomPropertyData::values):
409         (WebCore::StyleCustomPropertyData::hasCustomProperty):
410         (WebCore::StyleCustomPropertyData::containsVariables):
411         (WebCore::StyleCustomPropertyData::setContainsVariables):
412         (WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
413         Miscellaneous cleanup, and the addition of whether or not the properties still contain variable
414         dependent values that need to be resolved.
415
416 2015-10-15  Csaba Osztrogonác  <ossy@webkit.org>
417
418         Fix the !(ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)) build after r191112
419         https://bugs.webkit.org/show_bug.cgi?id=150175
420
421         Reviewed by Antti Koivisto.
422
423         * dom/ComposedTreeAncestorIterator.h:
424         (WebCore::ComposedTreeAncestorIterator::traverseParent):
425         * dom/ComposedTreeIterator.cpp:
426         (WebCore::ComposedTreeIterator::initializeShadowStack):
427         * dom/Element.cpp:
428         (WebCore::Element::childrenChanged):
429
430 2015-10-15  Csaba Osztrogonác  <ossy@webkit.org>
431
432         Get rid of the only once used isIntegerArray function
433         https://bugs.webkit.org/show_bug.cgi?id=150170
434
435         Reviewed by Geoffrey Garen.
436
437         * page/Crypto.cpp:
438         (WebCore::Crypto::getRandomValues):
439
440 2015-10-15  Tim Horton  <timothy_horton@apple.com>
441
442         Try to fix the iOS build.
443
444         * page/EventHandler.h:
445
446 2015-10-15  Zalan Bujtas  <zalan@apple.com>
447
448         Anonymous table objects: Collapse anonymous table rows.
449         https://bugs.webkit.org/show_bug.cgi?id=150154
450
451         Reviewed by David Hyatt.
452
453         Merge anonymous table rows when they are not needed anymore.
454         Generated table rows can be collapsed into one when there's no
455         non-generated sibling table row left in the tree.
456
457         Import W3C CSS2.1 anonymous table tests.
458
459         * rendering/RenderObject.cpp:
460         (WebCore::collapseAnonymousTableRowsIfNeeded):
461         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
462
463 2015-10-15  Simon Fraser  <simon.fraser@apple.com>
464
465         Un-indent contents of the WebCore namespace
466         in GraphicsContext.h. No code changes.
467
468         * platform/graphics/GraphicsContext.h:
469
470 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
471
472         Move ImageBuffer:clip() into GraphicsContextCG
473         https://bugs.webkit.org/show_bug.cgi?id=150140
474
475         Reviewed by Zalan Bujtas.
476
477         Move the guts of CG's ImageBuffer:clip() into GraphicsContextCG.
478
479         * platform/graphics/GraphicsContext.h:
480         * platform/graphics/cg/GraphicsContextCG.cpp:
481         (WebCore::GraphicsContext::clipToNativeImage):
482         * platform/graphics/cg/ImageBufferCG.cpp:
483         (WebCore::ImageBuffer::clip):
484
485 2015-10-14  Brady Eidson  <beidson@apple.com>
486
487         Modern IDB: Add basic transaction committing.
488         https://bugs.webkit.org/show_bug.cgi?id=150147
489
490         Reviewed by Alex Christensen.
491
492         Test: storage/indexeddb/modern/opendatabase-versions.html
493
494         * Modules/indexeddb/IDBTransaction.h:
495
496         * Modules/indexeddb/IndexedDB.h:
497
498         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
499         (WebCore::IDBClient::IDBConnectionToServer::commitTransaction):
500         (WebCore::IDBClient::IDBConnectionToServer::didCommitTransaction):
501         * Modules/indexeddb/client/IDBConnectionToServer.h:
502         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
503
504         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
505         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
506         (WebCore::IDBClient::IDBDatabase::commitTransaction):
507         (WebCore::IDBClient::IDBDatabase::didCommitTransaction):
508         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
509         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
510         * Modules/indexeddb/client/IDBDatabaseImpl.h:
511
512         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
513         (WebCore::IDBClient::IDBFactory::open):
514
515         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
516         (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
517         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
518
519         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
520         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
521         (WebCore::IDBClient::IDBTransaction::db):
522         (WebCore::IDBClient::IDBTransaction::hasPendingActivity):
523         (WebCore::IDBClient::IDBTransaction::isActive):
524         (WebCore::IDBClient::IDBTransaction::scheduleOperationTimer):
525         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
526         (WebCore::IDBClient::IDBTransaction::commit):
527         (WebCore::IDBClient::IDBTransaction::didCommit):
528         (WebCore::IDBClient::IDBTransaction::fireOnComplete):
529         (WebCore::IDBClient::IDBTransaction::fireOnAbort):
530         (WebCore::IDBClient::IDBTransaction::enqueueEvent):
531         (WebCore::IDBClient::IDBTransaction::dispatchEvent):
532         * Modules/indexeddb/client/IDBTransactionImpl.h:
533         (WebCore::IDBClient::IDBTransaction::database):
534         
535         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
536         (WebCore::LegacyTransaction::db):
537         * Modules/indexeddb/legacy/LegacyTransaction.h:
538         
539         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
540         (WebCore::IDBServer::IDBConnectionToClient::didCommitTransaction):
541         * Modules/indexeddb/server/IDBConnectionToClient.h:
542         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
543         
544         * Modules/indexeddb/server/IDBServer.cpp:
545         (WebCore::IDBServer::IDBServer::registerTransaction):
546         (WebCore::IDBServer::IDBServer::unregisterTransaction):
547         (WebCore::IDBServer::IDBServer::commitTransaction):
548         * Modules/indexeddb/server/IDBServer.h:
549         
550         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
551         (WebCore::IDBServer::generateUniqueCallbackIdentifier):
552         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
553         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
554         (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
555         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
556         (WebCore::IDBServer::UniqueIDBDatabase::performErrorCallback):
557         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction): Deleted.
558         * Modules/indexeddb/server/UniqueIDBDatabase.h:
559         (WebCore::IDBServer::UniqueIDBDatabase::server):
560         
561         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
562         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
563         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):
564         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
565         
566         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
567         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
568         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
569         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
570         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
571         
572         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
573         (WebCore::IDBDatabaseInfo::setVersion):
574         
575         * Modules/indexeddb/shared/IDBError.cpp:
576         (WebCore::IDBError::isolatedCopy):
577         * Modules/indexeddb/shared/IDBError.h:
578
579         * Modules/indexeddb/shared/IDBRequestData.h:
580
581         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
582         (WebCore::IDBResourceIdentifier::isolatedCopy):
583         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
584
585         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
586         (WebCore::InProcessIDBServer::didCommitTransaction):
587         (WebCore::InProcessIDBServer::commitTransaction):
588         * Modules/indexeddb/shared/InProcessIDBServer.h:
589
590         * WebCore.xcodeproj/project.pbxproj:
591
592         * platform/CrossThreadCopier.cpp:
593         (WebCore::IDBResourceIdentifier>::copy):
594         (WebCore::IDBError>::copy):
595         * platform/CrossThreadCopier.h:
596
597 2015-10-15  Daniel Bates  <dabates@apple.com>
598
599         [iOS] DOM click event may not be dispatched when page has :active style and <input type="search">
600         https://bugs.webkit.org/show_bug.cgi?id=144451
601         <rdar://problem/23099482>
602
603         Reviewed by Simon Fraser.
604
605         Fixes an issue where a DOM click event is not dispatched to an element in a subframe on a page
606         that has a <input type="search"> and defines a CSS :active pseudo-class for the HTML body element.
607
608         On iOS we only dispatch a DOM click event if the content does not change as part
609         of dispatching a DOM mousemove event at the tapped element. In particular, we do not
610         dispatch a DOM click event if there is a visibility change to some element on the page
611         as part of dispatching a mousemove event at the tapped element. For a web page
612         that specifies CSS :active pseudo-class and contains a search field, applying/unapplying
613         this pseudo-class as part of dispatching a DOM mousemove event may cause the
614         visibility of the search field cancel button to change; => a DOM click event will not
615         be dispatched to the tapped element.
616
617         Tests: fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html
618                fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html
619                fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html
620                fast/forms/search/search-cancel-in-formerly-invisible-element.html
621                fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html
622                fast/forms/search/search-cancel-toggle-visibility-initially-visible.html
623
624         * rendering/RenderSearchField.cpp:
625         (WebCore::RenderSearchField::updateCancelButtonVisibility): Write logic for determining
626         whether the visibility of the cancel button changed in terms of m_isCancelButtonVisible
627         instead of querying for the current style data as the latter is overwritten on a full
628         style recalculation.
629         (WebCore::RenderSearchField::RenderSearchField): Deleted.
630         (WebCore::RenderSearchField::visibilityForCancelButton): Deleted.
631         * rendering/RenderSearchField.h: Define instance variable m_isCancelButtonVisible to
632         store the visibility state of the cancel button.
633
634 2015-10-15  Antti Koivisto  <antti@apple.com>
635
636         Implement iterator for traversing composed ancestors
637         https://bugs.webkit.org/show_bug.cgi?id=150162
638
639         Reviewed by Andreas Kling.
640
641         The existing general purpose ComposedTreeIterator can traverse parent chain but not efficiently
642         (since it builds stack). Add a separate stackless iterator for ancestor chain traversal.
643
644         * WebCore.xcodeproj/project.pbxproj:
645         * dom/ComposedTreeAncestorIterator.h: Added.
646         (WebCore::ComposedTreeAncestorIterator::operator*):
647         (WebCore::ComposedTreeAncestorIterator::operator->):
648         (WebCore::ComposedTreeAncestorIterator::operator==):
649         (WebCore::ComposedTreeAncestorIterator::operator!=):
650         (WebCore::ComposedTreeAncestorIterator::operator++):
651         (WebCore::ComposedTreeAncestorIterator::get):
652         (WebCore::ComposedTreeAncestorIterator::ComposedTreeAncestorIterator):
653         (WebCore::ComposedTreeAncestorIterator::traverseParent):
654         (WebCore::ComposedTreeAncestorAdapter::ComposedTreeAncestorAdapter):
655         (WebCore::ComposedTreeAncestorAdapter::begin):
656         (WebCore::ComposedTreeAncestorAdapter::end):
657         (WebCore::ComposedTreeAncestorAdapter::first):
658         (WebCore::composedTreeAncestors):
659         * dom/ComposedTreeIterator.h:
660         * dom/ContainerNode.h:
661         (WebCore::Node::highestAncestor):
662         (WebCore::Node::isTreeScope):
663         (WebCore::Node::needsNodeRenderingTraversalSlowPath): Deleted.
664
665             With NodeRenderingTraversal::parent removed this bit is no longer used.
666
667         * dom/Element.cpp:
668         (WebCore::Element::shadowRoot):
669         (WebCore::Element::addShadowRoot):
670         (WebCore::shouldUseNodeRenderingTraversalSlowPath): Deleted.
671         (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath): Deleted.
672         * dom/Element.h:
673         (WebCore::Element::didAddUserAgentShadowRoot):
674         (WebCore::Element::alwaysCreateUserAgentShadowRoot):
675         * dom/Node.cpp:
676         (WebCore::Node::derefEventTarget):
677         (WebCore::Node::updateAncestorsForStyleRecalc):
678         (WebCore::traverseStyleParent): Deleted.
679         (WebCore::traverseFirstStyleParent): Deleted.
680
681             Switch to iterator interface.
682
683         * dom/Node.h:
684         (WebCore::Node::isDocumentFragment):
685         (WebCore::Node::isShadowRoot):
686         (WebCore::Node::isNamedFlowContentNode):
687         (WebCore::Node::hasCustomStyleResolveCallbacks):
688         (WebCore::Node::setHasCustomStyleResolveCallbacks):
689         (WebCore::Node::setTreeScope):
690         (WebCore::Node::setStyleChange):
691         (WebCore::Node::setNeedsNodeRenderingTraversalSlowPath): Deleted.
692         * dom/NodeRenderingTraversal.cpp:
693         (WebCore::NodeRenderingTraversal::traverseParent):
694         (WebCore::NodeRenderingTraversal::traverseFirstChild):
695         (WebCore::NodeRenderingTraversal::traverseLastChild):
696         (WebCore::NodeRenderingTraversal::traversePreviousSibling):
697         (WebCore::NodeRenderingTraversal::nextInScope):
698         (WebCore::NodeRenderingTraversal::previousInScope):
699         (WebCore::NodeRenderingTraversal::parentInScope):
700         (WebCore::NodeRenderingTraversal::lastChildInScope):
701         (WebCore::NodeRenderingTraversal::parentSlow): Deleted.
702         * dom/NodeRenderingTraversal.h:
703         (WebCore::NodeRenderingTraversal::parent): Deleted.
704
705             No longer used.
706
707         * html/HTMLSummaryElement.cpp:
708         * rendering/RenderNamedFlowThread.cpp:
709         (WebCore::RenderNamedFlowThread::isChildAllowed):
710
711             Switch to iterator interface.
712
713         * style/RenderTreePosition.cpp:
714         * style/StyleResolveTree.cpp:
715         (WebCore::Style::updateTextRendererAfterContentChange):
716
717             Switch to iterator interface.
718
719 2015-10-14  Zhuo Li  <zachli@apple.com>
720
721         Augment <input type=search>’s recent search history with the time each entry was added,
722         in order to allow time-based clearing of search history.
723         https://bugs.webkit.org/show_bug.cgi?id=148388.
724
725         Reviewed by Darin Adler.
726
727         Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
728         that consists search string and time, for recent searches in order to store additional time
729         information.
730
731         * WebCore.xcodeproj/project.pbxproj: Added SearchPopupMenuCocoa.h and SearchPopupMenuCocoa.mm
732         and sort the project file.
733         * loader/EmptyClients.cpp:
734         (WebCore::EmptySearchPopupMenu::saveRecentSearches):
735         (WebCore::EmptySearchPopupMenu::loadRecentSearches):
736         * platform/SearchPopupMenu.h:
737         * platform/cocoa/SearchPopupMenuCocoa.h: Added methods for SeachPopupMenuMac in WebKit
738         and WebPageProxyCocoa in WebKit2 to call.
739         * platform/cocoa/SearchPopupMenuCocoa.mm: Added.
740         (WebCore::searchFieldRecentSearchesStorageDirectory): Recent searches with the new structure
741         are stored in a new location.
742         (WebCore::searchFieldRecentSearchesPlistPath): Get the path for the plist of the recent
743         searches entries.
744         (WebCore::RetainPtr<NSMutableDictionary> readSearchFieldRecentSearchesPlist): Return the
745         recent searches plist as NSMutableDictionary.
746         (WebCore::fromNSDatetoSystemClockTime): Convert from NSDate to system_clock::time_point.
747         (WebCore::fromSystemClockTimetoNSDate): Convert from system_clock::time_point to NSDate.
748         (WebCore::SearchPopupMenuCocoa::saveRecentSearches): Add a dictionary where it has two pairs
749         that the first one is the search string and the second one is the time.
750         (WebCore::SearchPopupMenuCocoa::loadRecentSearches): We expect the recent search item in the
751         plist to be a two-pair dictionary, and convert the dictionary to the struct RecentSearch.
752         * platform/win/SearchPopupMenuWin.cpp:
753         (WebCore::SearchPopupMenuWin::saveRecentSearches): Only save the RecentSearch's search
754         string on Windows platform, which is what we used to do.
755         (WebCore::SearchPopupMenuWin::loadRecentSearches): Since we need to construct a
756         RecentSearch, we get the string from the app's preferences, and set the time to be
757         std::chrono::system_clock::time_point::min().
758         * platform/win/SearchPopupMenuWin.h:
759         * rendering/RenderSearchField.cpp: Now that m_recentSearches are Vector<RecentSearch>,
760         we cannot use -removeAll with a search string. Use -removeAllMatching instead to remove the
761         item that has its member search string equal to the search string user inputs.
762         (WebCore::RenderSearchField::addSearchResult):
763         (WebCore::RenderSearchField::itemText):
764
765 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
766
767         Use RefPtr<Image> return type for StyleImage::image()
768         https://bugs.webkit.org/show_bug.cgi?id=150112
769
770         Reviewed by Andreas Kling.
771         
772         Change StyleImage::image() and subclasses to return RefPtr<Image>
773         instead of a PassRefPtr<Image>.
774
775         * WebCore.xcodeproj/project.pbxproj:
776         * rendering/RenderImageResource.cpp:
777         (WebCore::RenderImageResource::image):
778         * rendering/RenderImageResource.h:
779         * rendering/RenderImageResourceStyleImage.cpp:
780         (WebCore::RenderImageResourceStyleImage::image):
781         * rendering/RenderImageResourceStyleImage.h:
782         * rendering/style/StyleCachedImage.cpp:
783         (WebCore::StyleCachedImage::image):
784         * rendering/style/StyleCachedImage.h:
785         * rendering/style/StyleCachedImageSet.cpp:
786         (WebCore::StyleCachedImageSet::image):
787         * rendering/style/StyleCachedImageSet.h:
788         * rendering/style/StyleGeneratedImage.cpp:
789         (WebCore::StyleGeneratedImage::image):
790         * rendering/style/StyleGeneratedImage.h:
791         * rendering/style/StyleImage.h:
792         * rendering/style/StylePendingImage.h:
793
794 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
795
796         Give subclasses of CSSImageGeneratorValue a consistent image() return type
797         https://bugs.webkit.org/show_bug.cgi?id=150111
798
799         Reviewed by Andreas Kling.
800         
801         CSSImageGeneratorValue and subclasses had signatures of the non-virtual image() function
802         with mistmatched return types; some returned RefPtr<Image>, and others PassRefPtr<Image>. Make
803         them all the same.
804
805         * css/CSSImageGeneratorValue.cpp:
806         (WebCore::CSSImageGeneratorValue::image):
807         * css/CSSImageGeneratorValue.h:
808         * css/CSSNamedImageValue.cpp:
809         (WebCore::CSSNamedImageValue::image):
810         * css/CSSNamedImageValue.h:
811
812 2015-10-14  Tim Horton  <timothy_horton@apple.com>
813
814         Move some EventHandler initialization to the header
815         https://bugs.webkit.org/show_bug.cgi?id=150139
816
817         Reviewed by Andreas Kling.
818
819         No new tests, just cleanup.
820
821         * page/EventHandler.cpp:
822         (WebCore::EventHandler::EventHandler): Deleted.
823         * page/EventHandler.h:
824         Also found one member which was unused, and a few that were uninitialized.
825         It's likely the uninitialized ones didn't actually cause any trouble because
826         they are reset in lots of places, but this seems better.
827
828 2015-10-14  Alex Christensen  <achristensen@webkit.org>
829
830         [Content Extensions] Make blocked async XHR call onerror
831         https://bugs.webkit.org/show_bug.cgi?id=146706
832
833         Reviewed by Brady Eidson.
834
835         Test: http/tests/contentextensions/async-xhr-onerror.html
836
837         * xml/XMLHttpRequest.cpp:
838         (WebCore::XMLHttpRequest::XMLHttpRequest):
839         (WebCore::XMLHttpRequest::createRequest):
840         (WebCore::XMLHttpRequest::networkError):
841         (WebCore::XMLHttpRequest::networkErrorTimerFired):
842         (WebCore::XMLHttpRequest::abortError):
843         * xml/XMLHttpRequest.h:
844         Make a timer that calls networkError in 0 time if a content blocker blocks the asynchronous load.
845         It is necessary to call setPendingActivity and dropProtection (which calls unsetPendingActivity)
846         to keep a reference to the XMLHttpRequest alive.
847
848 2015-10-14  Andy Estes  <aestes@apple.com>
849
850         [iOS] QuickLook documents loaded over https do not load their subresources
851         https://bugs.webkit.org/show_bug.cgi?id=150145
852         <rdar://problem/22884521>
853
854         Reviewed by Alexey Proskuryakov.
855
856         When QuickLook generates an HTML preview of a document, subresources are referenced using the x-apple-ql-id scheme,
857         for which QuickLook installs an NSURLProtocol. If a document is loaded over https, then this scheme needs to be
858         considered secure in order to avoid mixed content errors.
859
860         Test: http/tests/quicklook/secure-document-with-subresources.html
861
862         * platform/SchemeRegistry.cpp:
863         (WebCore::secureSchemes): Registered QLPreviewProtocol() as a secure scheme.
864
865 2015-10-14  Jiewen Tan  <jiewen_tan@apple.com>
866
867         Postpone mutation events before invoke Editor::Command command(Document*, const String&, bool).
868         https://bugs.webkit.org/show_bug.cgi?id=149299
869         <rdar://problem/22746995>
870
871         Reviewed by Andreas Kling.
872
873         Test: editing/inserting/insert-with-mutation-event.html
874
875         This is a merge of a part of Blink r166294:
876         https://codereview.chromium.org/141103006
877
878         * dom/Document.cpp:
879         (WebCore::Document::execCommand):
880
881 2015-10-14  Dean Jackson  <dino@apple.com>
882
883         Implement CanvasRenderingContext2D::commit
884         https://bugs.webkit.org/show_bug.cgi?id=150110
885         <rdar://problem/23057398>
886
887         Reviewed by Anders Carlsson.
888
889         As part of getting as close as possible to the HTML5 specification,
890         implement the commit() method on 2d canvas, even though it doesn't
891         do anything.
892
893         Test: fast/canvas/commit.html
894
895         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
896         (WebCore::JSCanvasRenderingContext2D::commit): Intercept it here to
897         avoid adding a method to the actual implementation.
898         * html/canvas/CanvasRenderingContext2D.idl: Add commit.
899
900 2015-10-14  Alex Christensen  <achristensen@webkit.org>
901
902         Add SPI for reloading without content blockers
903         https://bugs.webkit.org/show_bug.cgi?id=150058
904         rdar://problem/22742222
905
906         Reviewed by Sam Weinig.
907
908         * loader/FrameLoader.cpp:
909         (WebCore::FrameLoader::reloadWithOverrideEncoding):
910         (WebCore::FrameLoader::reload):
911         * loader/FrameLoader.h:
912         * page/Page.h:
913         (WebCore::Page::userContentController):
914         (WebCore::Page::userContentExtensionsEnabled): Deleted.
915         (WebCore::Page::setUserContentExtensionsEnabled): Deleted.
916         * replay/UserInputBridge.cpp:
917         (WebCore::UserInputBridge::loadRequest):
918         (WebCore::UserInputBridge::reloadFrame):
919         (WebCore::UserInputBridge::stopLoadingFrame):
920         * replay/UserInputBridge.h:
921         Pass a bool from the reloadWithoutContentBlockers call to the DocumentLoader, 
922         which stores the state of whether the content blockers are enabled or not.
923         Remove the state from the Page and copying the state from the Page to the DocumentLoader
924         because that caused issues with the content blockers being re-enabled at the wrong time.
925
926 2015-10-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
927
928         Rename JSDOMWrapper to JSDOMObject and JSDOMWrapperWithImplementation to JSDOMWrapper
929         https://bugs.webkit.org/show_bug.cgi?id=150120
930
931         Reviewed by Sam Weinig.
932
933         No change in behavior.
934
935         * bindings/js/DOMWrapperWorld.h:
936         * bindings/js/JSDOMBinding.h:
937         (WebCore::DOMConstructorObject::DOMConstructorObject):
938         (WebCore::getInlineCachedWrapper):
939         (WebCore::setInlineCachedWrapper):
940         (WebCore::clearInlineCachedWrapper):
941         (WebCore::createWrapper):
942         (WebCore::getStaticValueSlotEntryWithoutCaching<JSDOMObject>):
943         * bindings/js/JSDOMWrapper.cpp:
944         * bindings/js/JSDOMWrapper.h:
945         (WebCore::JSDOMObject::JSDOMObject):
946         (WebCore::JSDOMWrapper::~JSDOMWrapper):
947         (WebCore::JSDOMWrapper::JSDOMWrapper):
948         * bindings/js/JSElementCustom.cpp:
949         (WebCore::toJSNewlyCreated):
950         * bindings/js/JSNodeCustom.cpp:
951         (WebCore::createWrapperInline):
952         * bindings/js/ScriptWrappable.h:
953         * bindings/js/ScriptWrappableInlines.h:
954         (WebCore::ScriptWrappable::wrapper):
955         (WebCore::ScriptWrappable::setWrapper):
956         (WebCore::ScriptWrappable::clearWrapper):
957         * bindings/scripts/CodeGeneratorJS.pm:
958         (GetParentClassName):
959         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
960         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
961         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
962         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
963         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
964         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
965         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
966         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
967         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
968         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
969         (WebCore::JSTestEventConstructor::JSTestEventConstructor):
970         * bindings/scripts/test/JS/JSTestEventConstructor.h:
971         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
972         (WebCore::JSTestEventTarget::JSTestEventTarget):
973         * bindings/scripts/test/JS/JSTestEventTarget.h:
974         * bindings/scripts/test/JS/JSTestException.cpp:
975         (WebCore::JSTestException::JSTestException):
976         * bindings/scripts/test/JS/JSTestException.h:
977         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
978         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
979         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
980         * bindings/scripts/test/JS/JSTestInterface.cpp:
981         (WebCore::JSTestInterface::JSTestInterface):
982         * bindings/scripts/test/JS/JSTestInterface.h:
983         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
984         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
985         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
986         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
987         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
988         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
989         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
990         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
991         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
992         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
993         (WebCore::JSTestNondeterministic::JSTestNondeterministic):
994         * bindings/scripts/test/JS/JSTestNondeterministic.h:
995         * bindings/scripts/test/JS/JSTestObj.cpp:
996         (WebCore::JSTestObj::JSTestObj):
997         * bindings/scripts/test/JS/JSTestObj.h:
998         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
999         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
1000         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1001         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1002         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
1003         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
1004         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1005         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
1006         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1007         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1008         (WebCore::JSTestTypedefs::JSTestTypedefs):
1009         * bindings/scripts/test/JS/JSTestTypedefs.h:
1010         * bindings/scripts/test/JS/JSattribute.cpp:
1011         (WebCore::JSattribute::JSattribute):
1012         * bindings/scripts/test/JS/JSattribute.h:
1013         * bindings/scripts/test/JS/JSreadonly.cpp:
1014         (WebCore::JSreadonly::JSreadonly):
1015         * bindings/scripts/test/JS/JSreadonly.h:
1016         * dom/make_names.pl:
1017         (printWrapperFunctions):
1018         (printWrapperFactoryCppFile):
1019         (printWrapperFactoryHeaderFile):
1020
1021 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
1022
1023         Change GraphicsContext image-drawing functions to take references
1024         https://bugs.webkit.org/show_bug.cgi?id=150108
1025
1026         Reviewed by Tim Horton and Sam Weinig.
1027
1028         Change GraphicsContext::drawImage(), drawTiledImage(), drawImageBuffer(), clipToImageBuffer()
1029         and isCompatibleWithBuffer() to take references, and adjust calling code, adding
1030         null-checks where necessary.
1031
1032         * css/CSSCrossfadeValue.cpp:
1033         (WebCore::CSSCrossfadeValue::image):
1034         * css/CSSFilterImageValue.cpp:
1035         (WebCore::CSSFilterImageValue::image):
1036         * html/HTMLCanvasElement.cpp:
1037         (WebCore::HTMLCanvasElement::paint):
1038         * html/canvas/CanvasRenderingContext2D.cpp:
1039         (WebCore::CanvasRenderingContext2D::drawImage):
1040         (WebCore::CanvasRenderingContext2D::compositeBuffer):
1041         (WebCore::drawImageToContext):
1042         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
1043         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1044         * html/canvas/CanvasRenderingContext2D.h:
1045         * html/canvas/WebGL2RenderingContext.cpp:
1046         (WebCore::WebGL2RenderingContext::texSubImage2D):
1047         * html/canvas/WebGLRenderingContext.cpp:
1048         (WebCore::WebGLRenderingContext::texSubImage2D):
1049         * html/canvas/WebGLRenderingContextBase.cpp:
1050         (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
1051         (WebCore::WebGLRenderingContextBase::texImage2D):
1052         * html/canvas/WebGLRenderingContextBase.h:
1053         * platform/ScrollView.cpp:
1054         (WebCore::ScrollView::paintPanScrollIcon):
1055         * platform/graphics/CrossfadeGeneratedImage.cpp:
1056         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
1057         (WebCore::drawCrossfadeSubimage):
1058         (WebCore::CrossfadeGeneratedImage::drawCrossfade):
1059         * platform/graphics/CrossfadeGeneratedImage.h:
1060         * platform/graphics/GradientImage.cpp:
1061         (WebCore::GradientImage::drawPattern):
1062         * platform/graphics/GraphicsContext.cpp:
1063         (WebCore::GraphicsContext::drawImage):
1064         (WebCore::GraphicsContext::drawTiledImage):
1065         (WebCore::GraphicsContext::drawImageBuffer):
1066         (WebCore::GraphicsContext::clipToImageBuffer):
1067         (WebCore::GraphicsContext::isCompatibleWithBuffer):
1068         * platform/graphics/GraphicsContext.h:
1069         * platform/graphics/ShadowBlur.cpp:
1070         (WebCore::ShadowBlur::drawShadowBuffer):
1071         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
1072         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
1073         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
1074         (WebCore::ShadowBlur::drawRectShadowWithTiling):
1075         (WebCore::ShadowBlur::drawLayerPieces):
1076         (WebCore::ShadowBlur::endShadowLayer):
1077         * platform/graphics/cairo/ImageBufferCairo.cpp:
1078         (WebCore::ImageBuffer::draw):
1079         * platform/graphics/cg/PDFDocumentImage.cpp:
1080         (WebCore::PDFDocumentImage::draw):
1081         * platform/graphics/filters/FEBlend.cpp:
1082         (WebCore::FEBlend::platformApplySoftware):
1083         * platform/graphics/filters/FEColorMatrix.cpp:
1084         (WebCore::FEColorMatrix::platformApplySoftware):
1085         * platform/graphics/filters/FEComposite.cpp:
1086         (WebCore::FEComposite::platformApplySoftware):
1087         * platform/graphics/filters/FEDropShadow.cpp:
1088         (WebCore::FEDropShadow::platformApplySoftware):
1089         * platform/graphics/filters/FEMerge.cpp:
1090         (WebCore::FEMerge::platformApplySoftware):
1091         * platform/graphics/filters/FEOffset.cpp:
1092         (WebCore::FEOffset::platformApplySoftware):
1093         * platform/graphics/filters/FETile.cpp:
1094         (WebCore::FETile::platformApplySoftware):
1095         * platform/graphics/filters/SourceAlpha.cpp:
1096         (WebCore::SourceAlpha::platformApplySoftware):
1097         * platform/graphics/filters/SourceGraphic.cpp:
1098         (WebCore::SourceGraphic::platformApplySoftware):
1099         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1100         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1101         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
1102         (WebCore::ImageBackingSurfaceClient::ImageBackingSurfaceClient):
1103         (WebCore::CoordinatedImageBacking::update):
1104         * platform/mac/ThemeMac.mm:
1105         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
1106         * rendering/FilterEffectRenderer.cpp:
1107         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
1108         * rendering/ImageQualityController.cpp:
1109         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1110         * rendering/ImageQualityController.h:
1111         * rendering/RenderBoxModelObject.cpp:
1112         (WebCore::RenderBoxModelObject::shouldPaintAtLowQuality):
1113         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1114         * rendering/RenderBoxModelObject.h:
1115         * rendering/RenderEmbeddedObject.cpp:
1116         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
1117         (WebCore::RenderEmbeddedObject::paintContents):
1118         * rendering/RenderEmbeddedObject.h:
1119         * rendering/RenderImage.cpp:
1120         (WebCore::RenderImage::paintReplaced):
1121         (WebCore::RenderImage::paintIntoRect):
1122         * rendering/RenderImageResourceStyleImage.cpp:
1123         (WebCore::RenderImageResourceStyleImage::shutdown):
1124         (WebCore::RenderImageResourceStyleImage::image):
1125         * rendering/RenderLayer.cpp:
1126         (WebCore::RenderLayer::drawPlatformResizerImage):
1127         * rendering/RenderListMarker.cpp:
1128         (WebCore::RenderListMarker::paint):
1129         * rendering/RenderSnapshottedPlugIn.cpp:
1130         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1131         * rendering/RenderThemeMac.mm:
1132         (WebCore::RenderThemeMac::paintProgressBar):
1133         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
1134         * rendering/RenderThemeWin.cpp:
1135         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
1136         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
1137         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
1138         * rendering/shapes/Shape.cpp:
1139         (WebCore::Shape::createRasterShape):
1140         * rendering/shapes/ShapeOutsideInfo.cpp:
1141         (WebCore::ShapeOutsideInfo::createShapeForImage): Deleted.
1142         * rendering/style/NinePieceImage.cpp:
1143         (WebCore::NinePieceImage::paint):
1144         * rendering/svg/RenderSVGImage.cpp:
1145         (WebCore::RenderSVGImage::paintForeground):
1146         * rendering/svg/RenderSVGResourceFilter.cpp:
1147         (WebCore::RenderSVGResourceFilter::postApplyResource):
1148         * rendering/svg/SVGRenderingContext.cpp:
1149         (WebCore::SVGRenderingContext::clipToImageBuffer):
1150         (WebCore::SVGRenderingContext::bufferForeground):
1151         * svg/graphics/filters/SVGFEImage.cpp:
1152         (WebCore::FEImage::platformApplySoftware):
1153
1154 2015-10-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
1155
1156         REGRESSION(r53318): background-repeat: space with gradients doesn't render correctly
1157         https://bugs.webkit.org/show_bug.cgi?id=150068
1158
1159         Reviewed by Simon Fraser.
1160
1161         This is a regression of r53318 in which we were trying to make the pattern
1162         of the gradient image as small as possible: 1-pixel wide or tall. But this
1163         broke the rendering of the background image when container element has the
1164         style background-repeat: space. The reason for this is tiling the gradient
1165         image is done completely by CG. To do the tiling, we start by creating a
1166         CGPattern by calling CGPatternCreate() which takes the rect of the pattern
1167         and the step. If the width or the height of the pattern image is adjusted
1168         to be 1-pixel wide or tall, that will force CG to leave a space after every
1169         it draws the pattern image which is 1-pixel wide or tall which is wrong.
1170         
1171         The fix is to disable this optimization altogether if the container element
1172         has the style background-repeat: space.
1173
1174         Test: fast/gradients/background-image-repeat-space.html
1175
1176         * platform/graphics/Gradient.cpp:
1177         (WebCore::Gradient::adjustParametersForTiledDrawing):
1178         * platform/graphics/Gradient.h:
1179         * platform/graphics/GradientImage.cpp:
1180         (WebCore::GradientImage::drawPattern):
1181
1182 2015-10-13  Simon Fraser  <simon.fraser@apple.com>
1183
1184         Add helper funtion for checking pointer equivalency and use it
1185         https://bugs.webkit.org/show_bug.cgi?id=150022
1186
1187         Reviewed by Darin Adler.
1188
1189         A common pattern in WebCore code is to check for equivalency of two pointers,
1190         either both null, or both non-null and with equal values. This was written in
1191         several different ways in different places.
1192         
1193         Add arePointingToEqualData() to standardize this pattern.
1194
1195         This obviates the need for StyleImage::imagesEquivalent(), counterDataEquivalent()
1196         etc.
1197         
1198         Also change some comparisons of DataRef<> which checked the pointer and then the
1199         values to use DataRef<>::operator== which does the same thing. Comparisons of
1200         m_grid and m_gridItem only checked pointer equality, so this is probably a bug fix there.
1201
1202         * page/animation/CSSPropertyAnimation.cpp: if ((!a && !b) || a == b) is redundant so fix,
1203         and add checks for a and b RenderStyle* first.
1204         (WebCore::PropertyWrapperGetter::equals):
1205         (WebCore::StyleImagePropertyWrapper::equals):
1206         (WebCore::PropertyWrapperShadow::equals):
1207         (WebCore::PropertyWrapperMaybeInvalidColor::equals):
1208         (WebCore::FillLayerPropertyWrapperGetter::equals):
1209         (WebCore::FillLayerStyleImagePropertyWrapper::equals):
1210         (WebCore::FillLayersPropertyWrapper::equals):
1211         (WebCore::ShorthandPropertyWrapper::equals):
1212         (WebCore::PropertyWrapperFlex::equals):
1213         (WebCore::PropertyWrapperSVGPaint::equals):
1214         * platform/network/ResourceRequestBase.cpp:
1215         (WebCore::equalIgnoringHeaderFields):
1216         * rendering/style/FillLayer.cpp:
1217         (WebCore::FillLayer::operator==):
1218         * rendering/style/NinePieceImage.cpp:
1219         (WebCore::NinePieceImageData::operator==):
1220         * rendering/style/RenderStyle.cpp: Some nullptr cleanup.
1221         (WebCore::RenderStyle::getCachedPseudoStyle):
1222         (WebCore::RenderStyle::addCachedPseudoStyle):
1223         (WebCore::RenderStyle::changeAffectsVisualOverflow):
1224         (WebCore::RenderStyle::changeRequiresLayout):
1225         (WebCore::RenderStyle::changeRequiresLayerRepaint):
1226         (WebCore::RenderStyle::setWillChange):
1227         * rendering/style/SVGRenderStyleDefs.cpp:
1228         (WebCore::StyleShadowSVGData::operator==):
1229         * rendering/style/ShadowData.cpp:
1230         (WebCore::ShadowData::operator==):
1231         * rendering/style/StyleImage.h:
1232         (WebCore::StyleImage::imagesEquivalent): Deleted.
1233         * rendering/style/StyleRareInheritedData.cpp:
1234         (WebCore::StyleRareInheritedData::operator==):
1235         (WebCore::cursorDataEquivalent): Deleted.
1236         (WebCore::quotesDataEquivalent): Deleted.
1237         (WebCore::StyleRareInheritedData::shadowDataEquivalent): Deleted.
1238         * rendering/style/StyleRareInheritedData.h:
1239         * rendering/style/StyleRareNonInheritedData.cpp:
1240         (WebCore::StyleRareNonInheritedData::operator==):
1241         (WebCore::StyleRareNonInheritedData::counterDataEquivalent): Deleted.
1242         (WebCore::StyleRareNonInheritedData::shadowDataEquivalent): Deleted.
1243         (WebCore::StyleRareNonInheritedData::willChangeDataEquivalent): Deleted.
1244         (WebCore::StyleRareNonInheritedData::reflectionDataEquivalent): Deleted.
1245         (WebCore::StyleRareNonInheritedData::animationDataEquivalent): Deleted.
1246         (WebCore::StyleRareNonInheritedData::transitionDataEquivalent): Deleted.
1247         * rendering/style/StyleRareNonInheritedData.h:
1248
1249 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
1250
1251         Split TypesettingFeatures into kerning and ligatures bools
1252         https://bugs.webkit.org/show_bug.cgi?id=150074
1253
1254         Reviewed by Simon Fraser.
1255
1256         Our TypesettingFeatures type represents whether kerning or ligatures are enabled
1257         when laying out text. However, now that I have implemented font-feature-settings
1258         and font-variant-*, this type is wildly inadequate. There are now multiple kinds
1259         of ligatures, and many other features which are neither kerning nor ligatures.
1260         Adding tons of information to this type doesn't make sense because 1) We already
1261         have a FontVariantSettings struct which contains this information, and 2) None
1262         of the users of TypesettingFeatures care about most of these new features.
1263
1264         In this new world of font features, the font-kerning property isn't changing.
1265         Therefore, all the code which relies only on the Kerning value in
1266         TypesettingFeatures doesn't need to change. The places which rely on Ligatures,
1267         however, need to be updated to understand that there are many different kinds
1268         of ligatures.
1269
1270         Indeed, after inspection, all of the places which inspect ligatures are more
1271         interested in a high-level concept of whether or not we can trust some simple
1272         computation. Therefore, we really have two things we care about: Kerning, and
1273         this high-level concept.
1274
1275         This patch is the second step to update our view of the world to include
1276         font-feature-settings and font-variant-*. In particular, this patch simply
1277         splits TypesettingFeatures into two Booleans, one for Kerning, and one for
1278         Ligatures (which has no behavior change). Then, once they are separated, I can
1279         migrate the Ligatures Boolean to take on its new meaning.
1280
1281         This change is purely mechanical.
1282
1283         No new tests because there is no behavior change.
1284
1285         * WebCore.xcodeproj/project.pbxproj:
1286         * css/CSSPrimitiveValueMappings.h:
1287         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1288         (WebCore::CSSPrimitiveValue::operator FontCascadeDescription::Kerning):
1289         * platform/graphics/Font.cpp:
1290         (WebCore::Font::applyTransforms):
1291         * platform/graphics/Font.h:
1292         * platform/graphics/FontCascade.cpp:
1293         (WebCore::FontCascade::FontCascade):
1294         (WebCore::FontCascade::operator=):
1295         (WebCore::FontCascade::update):
1296         (WebCore::FontCascade::drawText):
1297         (WebCore::FontCascade::drawEmphasisMarks):
1298         (WebCore::FontCascade::width):
1299         (WebCore::FontCascade::adjustSelectionRectForText):
1300         (WebCore::FontCascade::offsetForPosition):
1301         (WebCore::FontCascade::setDefaultKerning):
1302         (WebCore::FontCascade::setDefaultLigatures):
1303         (WebCore::FontCascade::codePath):
1304         (WebCore::FontCascade::floatWidthForSimpleText):
1305         (WebCore::FontCascade::setDefaultTypesettingFeatures): Deleted.
1306         (WebCore::FontCascade::defaultTypesettingFeatures): Deleted.
1307         * platform/graphics/FontCascade.h:
1308         (WebCore::FontCascade::enableKerning):
1309         (WebCore::FontCascade::enableLigatures):
1310         (WebCore::FontCascade::computeEnableKerning):
1311         (WebCore::FontCascade::computeEnableLigatures):
1312         (WebCore::FontCascade::typesettingFeatures): Deleted.
1313         (WebCore::FontCascade::computeTypesettingFeatures): Deleted.
1314         * platform/graphics/FontDescription.cpp:
1315         (WebCore::FontCascadeDescription::FontCascadeDescription):
1316         * platform/graphics/FontDescription.h:
1317         (WebCore::FontCascadeDescription::setKerning):
1318         (WebCore::FontCascadeDescription::initialKerning):
1319         * platform/graphics/TypesettingFeatures.h: Removed.
1320         * platform/graphics/WidthIterator.cpp:
1321         (WebCore::WidthIterator::WidthIterator):
1322         (WebCore::WidthIterator::applyFontTransforms):
1323         (WebCore::WidthIterator::advanceInternal):
1324         * platform/graphics/WidthIterator.h:
1325         * platform/graphics/cocoa/FontCocoa.mm:
1326         (WebCore::Font::canRenderCombiningCharacterSequence):
1327         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1328         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
1329         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
1330         (WebCore::Font::getCFStringAttributes):
1331         * rendering/RenderBlockLineLayout.cpp:
1332         (WebCore::setLogicalWidthForTextRun):
1333         * rendering/line/BreakingContext.h:
1334         (WebCore::WordTrailingSpace::width):
1335         * svg/SVGFontData.h:
1336
1337 2015-10-13  Zalan Bujtas  <zalan@apple.com>
1338
1339         Anonymous table objects: inline parent box requires inline-table child.
1340         https://bugs.webkit.org/show_bug.cgi?id=150090
1341
1342         Reviewed by David Hyatt.
1343
1344         According to the CSS2.1 specification, if a child needs anonymous table wrapper
1345         and the child's parent is an inline box, the generated table needs to be inline-table.
1346         (inline-block and block parents generate non-inline table) 
1347
1348         Import W3C CSS2.1 anonymous table tests.
1349
1350         * rendering/RenderElement.cpp:
1351         (WebCore::RenderElement::childRequiresTable):
1352         (WebCore::RenderElement::addChild):
1353         * rendering/RenderElement.h:
1354         * rendering/RenderInline.cpp:
1355         (WebCore::RenderInline::newChildIsInline):
1356         (WebCore::RenderInline::addChildIgnoringContinuation):
1357         (WebCore::RenderInline::addChildToContinuation):
1358         * rendering/RenderInline.h:
1359         * rendering/RenderTable.cpp:
1360         (WebCore::RenderTable::createAnonymousWithParentRenderer):
1361
1362 2015-10-13  Dean Jackson  <dino@apple.com>
1363
1364         Device motion and orientation should only be visible from the main frame's security origin
1365         https://bugs.webkit.org/show_bug.cgi?id=150072
1366         <rdar://problem/23082036>
1367
1368         Reviewed by Brent Fulgham.
1369
1370         There are reports that gyroscope and accelerometer information can
1371         be used to detect keyboard entry. One initial step to reduce the
1372         risk is to forbid device motion and orientation events from
1373         being fired in frames that are a different security origin from the main page.
1374
1375         Manual test: deviceorientation-main-frame-only.html
1376
1377         * page/DOMWindow.cpp:
1378         (WebCore::DOMWindow::isSameSecurityOriginAsMainFrame): New helper function.
1379         (WebCore::DOMWindow::addEventListener): Check if we are the main frame, or the
1380         same security origin as the main frame. If not, don't add the event
1381         listeners.
1382
1383 2015-10-12  Dean Jackson  <dino@apple.com>
1384
1385         ASSERT(m_motionManager) on emgn.com page
1386         https://bugs.webkit.org/show_bug.cgi?id=150070
1387         <rdar://problem/18383732>
1388
1389         Reviewed by Simon Fraser.
1390
1391         In the WebCoreMotionManager init method, we call
1392         into another setup method on the main thread.
1393         However, if a listener was attached before that
1394         ran, we'd ASSERT. This wasn't actually causing a bug
1395         because the main thread initialization would
1396         check the listeners once it got a chance to run.
1397
1398         The fix is to only check status when we've
1399         actually initialized.
1400
1401         * platform/ios/WebCoreMotionManager.h: New m_initialized boolean.
1402         * platform/ios/WebCoreMotionManager.mm: Check m_initialized before doing real work.
1403         (-[WebCoreMotionManager init]):
1404         (-[WebCoreMotionManager addMotionClient:]):
1405         (-[WebCoreMotionManager removeMotionClient:]):
1406         (-[WebCoreMotionManager addOrientationClient:]):
1407         (-[WebCoreMotionManager removeOrientationClient:]):
1408         (-[WebCoreMotionManager initializeOnMainThread]):
1409
1410 2015-10-13  Chris Dumez  <cdumez@apple.com>
1411
1412         Avoid useless copies in range-loops that are using 'auto'
1413         https://bugs.webkit.org/show_bug.cgi?id=150091
1414
1415         Reviewed by Sam Weinig.
1416
1417         Avoid useless copies in range-loops that are using 'auto'. Also use
1418         'auto*' instead of 'auto' when range values are pointers for clarity.
1419
1420 2015-10-13  Simon Fraser  <simon.fraser@apple.com>
1421
1422         Move Image::drawPattern for CG into GraphicsContext
1423         https://bugs.webkit.org/show_bug.cgi?id=150077
1424
1425         Reviewed by Myles C. Maxfield.
1426
1427         In order to consolidate code that calls into Core Graphics inside
1428         GraphicsContext, move the body of Image::drawPattern() into
1429         GraphicsContextCG.cpp, and do the same for Cairo.
1430
1431         * platform/graphics/GraphicsContext.h:
1432         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1433         (WebCore::GraphicsContext::drawPattern):
1434         * platform/graphics/cairo/ImageCairo.cpp:
1435         (WebCore::Image::drawPattern):
1436         * platform/graphics/cg/GraphicsContextCG.cpp:
1437         (WebCore::drawPatternCallback):
1438         (WebCore::patternReleaseCallback):
1439         (WebCore::GraphicsContext::drawPattern):
1440         * platform/graphics/cg/ImageCG.cpp:
1441         (WebCore::Image::drawPattern):
1442         (WebCore::drawPatternCallback): Deleted.
1443         (WebCore::patternReleaseCallback): Deleted.
1444
1445 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
1446
1447         Unprefix font-kerning
1448         https://bugs.webkit.org/show_bug.cgi?id=150080
1449
1450         Reviewed by Sam Weinig.
1451
1452         This is the last property in CSS3 Fonts which is prefixed.
1453
1454         Test: fast/text/font-kerning.html
1455
1456         * css/CSSPropertyNames.in:
1457
1458 2015-10-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
1459
1460         Add debug settings for using giant tiles (4096x4096)
1461         https://bugs.webkit.org/show_bug.cgi?id=149977
1462         <rdar://problem/23017093>
1463
1464         Reviewed by Tim Horton.
1465
1466         Instead of creating the GraphicsLayer with a fixed size 512x512, we need
1467         to read the useGiantTiles setting. If its value is true, we set the layer
1468         tileSize to 4096x4096.
1469
1470         * page/Settings.in:
1471         Define the name of the setting and its default value.
1472         
1473         * platform/graphics/GraphicsLayerClient.h:
1474         (WebCore::GraphicsLayerClient::tileSize):
1475         Define tileSize() in the base class GraphicsLayerClient. This is going to
1476         be overridden RenderLayerBacking.
1477         
1478         * platform/graphics/TiledBacking.h:
1479         (WebCore::defaultTileSize):
1480         Define the default tileSize which will depend on the useGiantTiles
1481         setting.
1482
1483         * platform/graphics/ca/GraphicsLayerCA.cpp:
1484         (WebCore::GraphicsLayerCA::platformCALayerTileSize):
1485         Implement the virtual function GraphicsLayerCA::platformCALayerTileSize().
1486         It passes the call to client GraphicsLayerClient which can be RenderLayerBacking
1487         in our case.
1488
1489         * platform/graphics/ca/GraphicsLayerCA.h:
1490         Override base class function PlatformCALayerClient::PlatformCALayerClient().
1491
1492         * platform/graphics/ca/PlatformCALayerClient.h:
1493         (WebCore::PlatformCALayerClient::platformCALayerTileSize):
1494         Define platformCALayerTileSize() in the base class PlatformCALayerClient.
1495         This is going to be overridden GraphicsLayerCA.
1496
1497         * platform/graphics/ca/TileController.cpp:
1498         (WebCore::TileController::TileController):
1499         No need for the member m_tileSize.
1500         
1501         (WebCore::TileController::computeTileCoverageRect):
1502         Use the function tileSize() instead of using the static values.
1503         
1504         (WebCore::TileController::tileSize):
1505         The tileSize will be retrieved from the owning graphics layer.
1506         
1507         * platform/graphics/ca/TileController.h:
1508         No need for the member m_tileSize. The tileSize will be retrieved from the owning graphics layer.
1509
1510         * rendering/RenderLayerBacking.cpp:
1511         (WebCore::RenderLayerBacking::setTiledBackingHasMargins):
1512         Use the function tileSize() instead of using the static values.
1513         
1514         (WebCore::RenderLayerBacking::tileSize):
1515         Override base class function GraphicsLayerClient::tileSize().
1516         
1517         * rendering/RenderLayerBacking.h:
1518         Define the concrete method RenderLayerBacking::tilSize().
1519
1520 2015-10-13  Antti Koivisto  <antti@apple.com>
1521
1522         Try to fix ENABLE(DETAILS_ELEMENT) with SHADOW_DOM disabled.
1523
1524         * dom/Element.cpp:
1525         (WebCore::Element::attributeChanged):
1526         * dom/Node.cpp:
1527         (WebCore::traverseStyleParent):
1528
1529 2015-10-13  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1530
1531         Fix license and copyrights of WebCore js binding builtin files
1532         https://bugs.webkit.org/show_bug.cgi?id=150027
1533
1534         Reviewed by Darin Adler.
1535
1536         Fixing copyright on all three files.
1537         Moving to BSD-like license as they should have been in the first place.
1538         Ordering lexicographically the builtin names in WebCoreBuiltinNames.h.
1539
1540         No change in behaviour.
1541
1542         * bindings/js/WebCoreBuiltinNames.h:
1543         * bindings/js/WebCoreJSBuiltins.cpp:
1544         * bindings/js/WebCoreJSBuiltins.h:
1545         * bindings/js/WebCoreJSBuiltinInternals.h:
1546
1547 2015-10-12  Antti Koivisto  <antti@apple.com>
1548
1549         Implement iterator for traversing composed DOM
1550         https://bugs.webkit.org/show_bug.cgi?id=149997
1551
1552         Reviewed by Ryosuke Niwa.
1553
1554         ComposedTreeIterator traverses the DOM in composed tree order. This means it enters
1555         shadow trees and follows slots created by Shadow DOM API correctly.
1556
1557         auto children = composedTreeChildren(containerNode);
1558         for (auto& composedChild : children)
1559             ...
1560
1561         auto descendants = composedTreeDescendants(containerNode);
1562         for (auto& composedDescendant : descendants)
1563             ...
1564
1565         * WebCore.xcodeproj/project.pbxproj:
1566         * dom/ComposedTreeIterator.cpp: Added.
1567         (WebCore::ComposedTreeIterator::initializeShadowStack):
1568         (WebCore::ComposedTreeIterator::traverseNextInShadowTree):
1569         (WebCore::ComposedTreeIterator::traverseNextSiblingSlot):
1570         (WebCore::ComposedTreeIterator::traversePreviousSiblingSlot):
1571         (WebCore::ComposedTreeIterator::traverseParentInShadowTree):
1572         * dom/ComposedTreeIterator.h: Added.
1573         (WebCore::ComposedTreeIterator::operator*):
1574         (WebCore::ComposedTreeIterator::operator->):
1575         (WebCore::ComposedTreeIterator::operator==):
1576         (WebCore::ComposedTreeIterator::operator!=):
1577         (WebCore::ComposedTreeIterator::ShadowContext::ShadowContext):
1578         (WebCore::ComposedTreeIterator::ComposedTreeIterator):
1579         (WebCore::ComposedTreeIterator::traverseNext):
1580         (WebCore::ComposedTreeIterator::traverseNextSibling):
1581         (WebCore::ComposedTreeIterator::traversePreviousSibling):
1582         (WebCore::ComposedTreeIterator::traverseParent):
1583         (WebCore::ComposedTreeChildAdapter::Iterator::Iterator):
1584         (WebCore::ComposedTreeChildAdapter::Iterator::operator++):
1585         (WebCore::ComposedTreeChildAdapter::Iterator::operator--):
1586         (WebCore::ComposedTreeChildAdapter::ComposedTreeChildAdapter):
1587         (WebCore::ComposedTreeChildAdapter::begin):
1588         (WebCore::ComposedTreeChildAdapter::end):
1589         (WebCore::ComposedTreeChildAdapter::at):
1590         (WebCore::composedTreeChildren):
1591         * dom/NodeRenderingTraversal.cpp:
1592         (WebCore::NodeRenderingTraversal::parentSlow):
1593         (WebCore::NodeRenderingTraversal::nextInScope):
1594         (WebCore::NodeRenderingTraversal::firstChildSlow): Deleted.
1595         (WebCore::NodeRenderingTraversal::nextSiblingSlow): Deleted.
1596         (WebCore::NodeRenderingTraversal::previousSiblingSlow): Deleted.
1597         * dom/NodeRenderingTraversal.h:
1598         (WebCore::NodeRenderingTraversal::parent):
1599         (WebCore::NodeRenderingTraversal::firstChild): Deleted.
1600         (WebCore::NodeRenderingTraversal::nextSibling): Deleted.
1601         (WebCore::NodeRenderingTraversal::previousSibling): Deleted.
1602         * style/RenderTreePosition.cpp:
1603         (WebCore::RenderTreePosition::computeNextSibling):
1604
1605             Restore the full assert.
1606
1607         (WebCore::RenderTreePosition::invalidateNextSibling):
1608         (WebCore::RenderTreePosition::previousSiblingRenderer):
1609         (WebCore::RenderTreePosition::nextSiblingRenderer):
1610
1611             Make these member functions.
1612             Use the iterator. This is fixes some bugs and allows enabling a test case.
1613
1614         * style/RenderTreePosition.h:
1615         * style/StyleResolveTree.cpp:
1616         (WebCore::Style::textRendererIsNeeded):
1617
1618 2015-10-13  ChangSeok Oh  <changseok.oh@collabora.com>
1619
1620         [GTK] Use GUniquePtr for GtkIconInfo
1621         https://bugs.webkit.org/show_bug.cgi?id=150082
1622
1623         Reviewed by Carlos Garcia Campos.
1624
1625         GtkIconInfo cab be wrapped by a smart pointer, GUniqueptr.
1626
1627         No new test required since no functionality changed.
1628
1629         * rendering/RenderThemeGtk.cpp:
1630         (WebCore::getStockSymbolicIconForWidgetType):
1631
1632 2015-10-12  Jaehun Lim  <ljaehun.lim@samsung.com>
1633
1634         Unreviewed, fix debug build warning.
1635
1636         %llu needs 'long long unsigned int'.
1637
1638         Type casting unit64_t to long long unsigned int.
1639
1640         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
1641         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
1642         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1643         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
1644
1645 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
1646
1647         Speculative Cairo build fixes after r190910.
1648
1649         * platform/graphics/cairo/ImageBufferCairo.cpp:
1650         (WebCore::ImageBuffer::drawPattern):
1651         * platform/graphics/cairo/ImageCairo.cpp:
1652         (WebCore::Image::drawPattern):
1653
1654 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
1655
1656         Fix iOS and Efl builds.
1657
1658         * platform/graphics/NamedImageGeneratedImage.cpp:
1659         (WebCore::NamedImageGeneratedImage::drawPattern):
1660
1661 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
1662
1663         Remove Image::spaceSize() and ImageBuffer::spaceSize()
1664         https://bugs.webkit.org/show_bug.cgi?id=150064
1665
1666         Reviewed by Tim Horton.
1667
1668         Image spacing when tiled should not be a property of the image; but a description
1669         of how it's drawn, like tile size. So remove spacing from Image and ImageBuffer,
1670         and pass it in as an argument.
1671
1672         * platform/graphics/BitmapImage.cpp:
1673         (WebCore::BitmapImage::drawPattern):
1674         * platform/graphics/BitmapImage.h:
1675         * platform/graphics/CrossfadeGeneratedImage.cpp:
1676         (WebCore::CrossfadeGeneratedImage::drawPattern):
1677         * platform/graphics/CrossfadeGeneratedImage.h:
1678         * platform/graphics/GeneratedImage.h:
1679         * platform/graphics/GradientImage.cpp:
1680         (WebCore::GradientImage::drawPattern):
1681         * platform/graphics/GradientImage.h:
1682         * platform/graphics/GraphicsContext.cpp:
1683         (WebCore::GraphicsContext::drawTiledImage):
1684         * platform/graphics/GraphicsContext.h:
1685         * platform/graphics/Image.cpp:
1686         (WebCore::Image::drawTiled):
1687         * platform/graphics/Image.h:
1688         (WebCore::Image::spaceSize): Deleted.
1689         (WebCore::Image::setSpaceSize): Deleted.
1690         * platform/graphics/ImageBuffer.h:
1691         (WebCore::ImageBuffer::spaceSize): Deleted.
1692         (WebCore::ImageBuffer::setSpaceSize): Deleted.
1693         * platform/graphics/NamedImageGeneratedImage.cpp:
1694         (WebCore::NamedImageGeneratedImage::drawPattern):
1695         * platform/graphics/NamedImageGeneratedImage.h:
1696         * platform/graphics/cg/ImageBufferCG.cpp:
1697         (WebCore::ImageBuffer::copyImage):
1698         (WebCore::ImageBuffer::drawPattern):
1699         * platform/graphics/cg/ImageCG.cpp:
1700         (WebCore::Image::drawPattern):
1701         * rendering/RenderBoxModelObject.cpp:
1702         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1703         * svg/graphics/SVGImage.cpp:
1704         (WebCore::SVGImage::drawPatternForContainer):
1705         * svg/graphics/SVGImage.h:
1706         * svg/graphics/SVGImageForContainer.cpp:
1707         (WebCore::SVGImageForContainer::drawPattern):
1708         * svg/graphics/SVGImageForContainer.h:
1709
1710 2015-10-12  Andreas Kling  <akling@apple.com>
1711
1712         Have TransformState::mappedSecondaryQuad() return an Optional<FloatQuad>.
1713         <https://webkit.org/b/150057>
1714
1715         Reviewed by Simon Fraser.
1716
1717         Using Optional instead of std::unique_ptr allows us to signal the absence of a
1718         secondary quad without incurring a heap allocation in cases where one is present.
1719
1720         This dodges ~132000 malloc/free pairs on loading thelocal.se
1721
1722         * platform/graphics/ca/GraphicsLayerCA.cpp:
1723         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
1724         * platform/graphics/transforms/TransformState.cpp:
1725         (WebCore::TransformState::mappedSecondaryQuad):
1726         * platform/graphics/transforms/TransformState.h:
1727
1728 2015-10-12  Brady Eidson  <beidson@apple.com>
1729
1730         Followup to:
1731         Modern IDB: Start version change transaction for connections to new database.
1732         https://bugs.webkit.org/show_bug.cgi?id=150033
1733
1734         Reviewed by NOBODY (Fixing existing test flakiness)
1735
1736         No new tests (Covered by existing tests)
1737
1738         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1739         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Early return if a version change transaction
1740           is already in progress.
1741
1742 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
1743
1744         [Font Features] Tiny cleanup regarding FontCascade::typesettingFeatures()
1745         https://bugs.webkit.org/show_bug.cgi?id=150051
1746
1747         Reviewed by Simon Fraser.
1748
1749         There are no typesetting features which aren't kerning nor ligatures.
1750
1751         No new tests because there is no behavior difference.
1752
1753         * platform/graphics/FontCascade.cpp:
1754         (WebCore::FontCascade::codePath):
1755         * platform/graphics/WidthIterator.h:
1756         (WebCore::WidthIterator::supportsTypesettingFeatures): Deleted.
1757
1758 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
1759
1760         Add a CGContextStateSaver and use it
1761         https://bugs.webkit.org/show_bug.cgi?id=150049
1762
1763         Reviewed by Tim Horton.
1764
1765         Add a stack-based graphics state save/restore class for CGContext,
1766         like the one we have for GraphicsContext, and use it in GraphicsContextCG.
1767         
1768         * platform/graphics/cg/GraphicsContextCG.cpp:
1769         (WebCore::GraphicsContext::drawNativeImage):
1770         (WebCore::GraphicsContext::drawLine):
1771         (WebCore::GraphicsContext::drawJoinedLines):
1772         (WebCore::GraphicsContext::fillPath):
1773         (WebCore::GraphicsContext::strokePath):
1774         (WebCore::GraphicsContext::fillRect):
1775         (WebCore::GraphicsContext::platformFillRoundedRect):
1776         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1777         (WebCore::GraphicsContext::strokeRect):
1778         * platform/graphics/cg/GraphicsContextCG.h:
1779         (WebCore::CGContextStateSaver::CGContextStateSaver):
1780         (WebCore::CGContextStateSaver::~CGContextStateSaver):
1781         (WebCore::CGContextStateSaver::save):
1782         (WebCore::CGContextStateSaver::restore):
1783
1784 2015-10-12  Zalan Bujtas  <zalan@apple.com>
1785
1786         display: table-cell; bug when resizing window
1787         https://bugs.webkit.org/show_bug.cgi?id=138167
1788
1789         Reviewed by David Hyatt.
1790
1791         Clean up anonymous table wrappers all the way up to RenderTable.
1792         This patch ensures that we don't keep the generated RenderTable/RenderSection/RenderCaption/RenderRow
1793         objects around in the tree anymore when the last child is destroyed.
1794
1795         Import W3C CSS2.1 anonymous table tests.
1796
1797         * rendering/RenderObject.cpp:
1798         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
1799
1800 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
1801
1802         REGRESSION(r182192): Ligatures do not interact correctly with SHY in some fonts
1803         https://bugs.webkit.org/show_bug.cgi?id=150006
1804
1805         Reviewed by Simon Fraser.
1806
1807         When performing font transforms and we encounter kCGFontIndexInvalid, we filter it out of the
1808         GlyphBuffer. However, this filter was only interacting with part of the GlyphBuffer instead
1809         of the whole thing. This causes glyph IDs from one font to be rendered with other fonts,
1810         thereby showing garbage glyphs.
1811
1812         However, now that <rdar://problem/20230073> is fixed, we don't need to perform this filter in
1813         the first place.
1814
1815         Test: fast/text/undefined-glyph-with-ligature.html
1816
1817         * platform/graphics/GlyphBuffer.h:
1818         (WebCore::GlyphBuffer::copyItem):
1819         (WebCore::GlyphBuffer::swap):
1820         * platform/graphics/WidthIterator.cpp:
1821         (WebCore::WidthIterator::applyFontTransforms):
1822
1823 2015-10-12  Antoine Quint  <graouts@apple.com>
1824
1825         [SVG] Handle endEvent for svg animations
1826         https://bugs.webkit.org/show_bug.cgi?id=121587
1827
1828         Reviewed by Dean Jackson.
1829
1830         Add support for the "endEvent" SVG event triggered when an animation completes, as
1831         specified in http://www.w3.org/TR/SMIL3/smil-timing.html#q135. This event doesn't
1832         bubble and can't be canceled. Added test coverage for the event through the DOM
1833         Events API as well as the declarative SMIL Animation syntax.
1834
1835         Adapted from a Chromium patch by pavan.e@samsung.com
1836         https://chromium.googlesource.com/chromium/blink/+/4d415ca0268231aa80e3552fe21bf3480a6978f8
1837
1838         Tests: svg/animations/end-event-declarative-expected.svg
1839                svg/animations/end-event-declarative.svg
1840                svg/animations/end-event-script-expected.svg
1841                svg/animations/end-event-script.svg
1842
1843         * svg/animation/SMILTimeContainer.cpp:
1844         (WebCore::SMILTimeContainer::updateAnimations):
1845         * svg/animation/SVGSMILElement.cpp:
1846         (WebCore::smilEndEventSender):
1847         (WebCore::SVGSMILElement::~SVGSMILElement):
1848         (WebCore::SVGSMILElement::progress):
1849         (WebCore::SVGSMILElement::dispatchPendingEvent):
1850         * svg/animation/SVGSMILElement.h:
1851         (WebCore::SVGSMILElement::hasConditionsConnected):
1852
1853 2015-10-12  Per Arne Vollan  <peavo@outlook.com>
1854
1855         [Curl] Increase limit of parallel network requests.
1856         https://bugs.webkit.org/show_bug.cgi?id=150035
1857
1858         Reviewed by Alex Christensen.
1859
1860         If the limit is too low, other network requests will often be blocked until
1861         active requests finishes. This can affect performance in a negative way.
1862
1863         * platform/network/curl/ResourceHandleManager.cpp:
1864
1865 2015-10-12  Brady Eidson  <beidson@apple.com>
1866
1867         Modern IDB: Start version change transaction for connections to new database.
1868         https://bugs.webkit.org/show_bug.cgi?id=150033
1869
1870         Reviewed by Alex Christensen.
1871
1872         No new tests (Covered by changes to existing tests).
1873
1874         * CMakeLists.txt:
1875         * Modules/indexeddb/IDBDatabase.h:
1876         
1877         * Modules/indexeddb/client/IDBAnyImpl.cpp:
1878         (WebCore::IDBClient::IDBAny::IDBAny):
1879         (WebCore::IDBClient::IDBAny::~IDBAny):
1880         (WebCore::IDBClient::IDBAny::idbDatabase):
1881         (WebCore::IDBClient::IDBAny::domStringList):
1882         (WebCore::IDBClient::IDBAny::idbCursor):
1883         (WebCore::IDBClient::IDBAny::idbCursorWithValue):
1884         (WebCore::IDBClient::IDBAny::idbFactory):
1885         (WebCore::IDBClient::IDBAny::idbIndex):
1886         (WebCore::IDBClient::IDBAny::idbObjectStore):
1887         (WebCore::IDBClient::IDBAny::idbTransaction):
1888         (WebCore::IDBClient::IDBAny::scriptValue):
1889         (WebCore::IDBClient::IDBAny::integer):
1890         (WebCore::IDBClient::IDBAny::string):
1891         (WebCore::IDBClient::IDBAny::keyPath):
1892         * Modules/indexeddb/client/IDBAnyImpl.h:
1893         (WebCore::IDBClient::IDBAny::create):
1894         
1895         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1896         (WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
1897         (WebCore::IDBClient::IDBConnectionToServer::registerDatabaseConnection):
1898         (WebCore::IDBClient::IDBConnectionToServer::unregisterDatabaseConnection):
1899         * Modules/indexeddb/client/IDBConnectionToServer.h:
1900         
1901         * Modules/indexeddb/client/IDBDatabaseImpl.cpp: Added.
1902         (WebCore::IDBClient::IDBDatabase::create):
1903         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
1904         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
1905         (WebCore::IDBClient::IDBDatabase::name):
1906         (WebCore::IDBClient::IDBDatabase::version):
1907         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
1908         (WebCore::IDBClient::IDBDatabase::createObjectStore):
1909         (WebCore::IDBClient::IDBDatabase::transaction):
1910         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
1911         (WebCore::IDBClient::IDBDatabase::close):
1912         (WebCore::IDBClient::IDBDatabase::activeDOMObjectName):
1913         (WebCore::IDBClient::IDBDatabase::canSuspendForPageCache):
1914         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
1915         * Modules/indexeddb/client/IDBDatabaseImpl.h: Added.
1916         (WebCore::IDBClient::IDBDatabase::info):
1917         
1918         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
1919         (WebCore::IDBClient::IDBOpenDBRequest::onError):
1920         (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
1921         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
1922         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
1923         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
1924         
1925         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1926         (WebCore::IDBClient::IDBRequest::IDBRequest):
1927         (WebCore::IDBClient::IDBRequest::result):
1928         (WebCore::IDBClient::IDBRequest::source):
1929         (WebCore::IDBClient::IDBRequest::transaction):
1930         * Modules/indexeddb/client/IDBRequestImpl.h:
1931         (WebCore::IDBClient::IDBRequest::connection):
1932         
1933         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1934         (WebCore::IDBClient::IDBTransaction::create):
1935         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
1936         (WebCore::IDBClient::IDBTransaction::~IDBTransaction):
1937         (WebCore::IDBClient::IDBTransaction::mode):
1938         (WebCore::IDBClient::IDBTransaction::db):
1939         (WebCore::IDBClient::IDBTransaction::error):
1940         (WebCore::IDBClient::IDBTransaction::objectStore):
1941         (WebCore::IDBClient::IDBTransaction::abort):
1942         (WebCore::IDBClient::IDBTransaction::activeDOMObjectName):
1943         (WebCore::IDBClient::IDBTransaction::canSuspendForPageCache):
1944         * Modules/indexeddb/client/IDBTransactionImpl.h:
1945         (WebCore::IDBClient::IDBTransaction::info):
1946         
1947         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
1948         (WebCore::IDBClient::IDBVersionChangeEvent::IDBVersionChangeEvent):
1949         (WebCore::IDBClient::IDBVersionChangeEvent::eventInterface):
1950         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
1951         (WebCore::IDBClient::IDBVersionChangeEvent::create):
1952         
1953         * Modules/indexeddb/legacy/LegacyDatabase.h:
1954         
1955         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1956         (WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
1957         * Modules/indexeddb/server/IDBConnectionToClient.h:
1958         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1959         
1960         * Modules/indexeddb/server/IDBServer.cpp:
1961         (WebCore::IDBServer::IDBServer::registerDatabaseConnection):
1962         (WebCore::IDBServer::IDBServer::unregisterDatabaseConnection):
1963         (WebCore::IDBServer::IDBServer::deleteDatabase):
1964         * Modules/indexeddb/server/IDBServer.h:
1965         
1966         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1967         (WebCore::IDBServer::UniqueIDBDatabase::info):
1968         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
1969         (WebCore::IDBServer::UniqueIDBDatabase::hasAnyOpenConnections):
1970         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
1971         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
1972         (WebCore::IDBServer::UniqueIDBDatabase::addOpenDatabaseConnection):
1973         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1974         
1975         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: 
1976         (WebCore::IDBServer::nextDatabaseConnectionIdentifier):
1977         (WebCore::IDBServer::UniqueIDBDatabaseConnection::create):
1978         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
1979         (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
1980         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
1981
1982         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
1983         (WebCore::IDBServer::UniqueIDBDatabaseConnection::identifier):
1984         (WebCore::IDBServer::UniqueIDBDatabaseConnection::database):
1985         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionToClient):
1986         (WebCore::IDBServer::UniqueIDBDatabaseConnection::closePending):
1987         
1988         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1989         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::create):
1990         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
1991         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1992         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::databaseConnection):
1993         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::info):
1994         
1995         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
1996         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
1997         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
1998         (WebCore::IDBDatabaseInfo::name):
1999         (WebCore::IDBDatabaseInfo::version):
2000         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo): Deleted.
2001         
2002         * Modules/indexeddb/shared/IDBError.h:
2003         
2004         * Modules/indexeddb/shared/IDBRequestData.cpp:
2005         (WebCore::IDBRequestData::IDBRequestData):
2006         (WebCore::IDBRequestData::requestedVersion):
2007         * Modules/indexeddb/shared/IDBRequestData.h:
2008         
2009         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
2010         (WebCore::nextClientResourceNumber):
2011         (WebCore::nextServerResourceNumber):
2012         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
2013         (WebCore::IDBResourceIdentifier::emptyValue):
2014         (WebCore::IDBResourceIdentifier::deletedValue):
2015         (WebCore::nextResourceNumber): Deleted.
2016         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
2017         
2018         * Modules/indexeddb/shared/IDBResultData.cpp:
2019         (WebCore::IDBResultData::IDBResultData):
2020         (WebCore::IDBResultData::error):
2021         (WebCore::IDBResultData::openDatabaseSuccess):
2022         (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
2023         (WebCore::IDBResultData::databaseInfo):
2024         (WebCore::IDBResultData::transactionInfo):
2025         * Modules/indexeddb/shared/IDBResultData.h:
2026         (WebCore::IDBResultData::type):
2027         (WebCore::IDBResultData::databaseConnectionIdentifier):
2028         
2029         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
2030         (WebCore::IDBTransactionInfo::IDBTransactionInfo):
2031         (WebCore::IDBTransactionInfo::versionChange):
2032         (WebCore::IDBTransactionInfo::isolatedCopy):
2033         * Modules/indexeddb/shared/IDBTransactionInfo.h:
2034         (WebCore::IDBTransactionInfo::identifier):
2035         (WebCore::IDBTransactionInfo::mode):
2036         (WebCore::IDBTransactionInfo::newVersion):
2037         
2038         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2039         (WebCore::InProcessIDBServer::fireVersionChangeEvent):
2040         * Modules/indexeddb/shared/InProcessIDBServer.h:
2041         
2042         * WebCore.xcodeproj/project.pbxproj:
2043         
2044         * platform/CrossThreadCopier.cpp:
2045         (WebCore::IDBTransactionInfo>::copy):
2046         * platform/CrossThreadCopier.h:
2047
2048 2015-10-12  Said Abou-Hallawa  <sabouhallawa@apple.com>
2049
2050         REGRESSION(r184895): border-image should always slice the SVG image to nine pieces when drawing it in the container element
2051         https://bugs.webkit.org/show_bug.cgi?id=149901
2052         <rdar://problem/21995596>
2053
2054         Reviewed by Darin Adler.
2055
2056         The nine-pieces algorithm should be applied to the border-image regardless
2057         whether the image has an intrinsic size or not. It is not guaranteed to have
2058         a meaningful border-image in all the cases of non-intrinsic size images. But
2059         it should work as expected in most of the cases. 
2060
2061         * rendering/RenderBoxModelObject.cpp:
2062         * rendering/RenderBoxModelObject.h:
2063         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
2064         Revert the changes which were added to return whether the image has
2065         intrinsic size or not.
2066         
2067         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2068         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2069         Size of the image is now the return value of calculateImageIntrinsicDimensions().
2070         
2071         * rendering/RenderListMarker.cpp:
2072         (WebCore::RenderListMarker::updateContent):
2073         * rendering/shapes/ShapeOutsideInfo.cpp:
2074         (WebCore::ShapeOutsideInfo::createShapeForImage):
2075         Size of the image is now the return value of calculateImageIntrinsicDimensions().
2076         
2077         * rendering/style/NinePieceImage.cpp:
2078         * rendering/style/NinePieceImage.h:
2079         (WebCore::NinePieceImage::paint):
2080         Delete the logic for the non-intrinsic case. Both intrinsic and non-intrinsic
2081         cases will be treated the same.
2082
2083         (WebCore::NinePieceImage::computeNineRects):
2084         (WebCore::NinePieceImage::computeSideTileScale):
2085         (WebCore::NinePieceImage::computeMiddleTileScale):
2086         (WebCore::NinePieceImage::computeTileScales):
2087         (WebCore::NinePieceImage::computeIntrinsicRects): Deleted.
2088         (WebCore::NinePieceImage::computeIntrinsicSideTileScale): Deleted.
2089         (WebCore::NinePieceImage::computeIntrinsicMiddleTileScale): Deleted.
2090         (WebCore::NinePieceImage::computeIntrinsicTileScales): Deleted.
2091         Remove *Intrinsic* from the name of the functions.
2092
2093         (WebCore::NinePieceImage::computeNonIntrinsicRects): Deleted.
2094         (WebCore::NinePieceImage::computeNonIntrinsicTileScales): Deleted.
2095         Delete the *NonIntrinsic* functions.
2096
2097 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
2098
2099         Clip-path transitions sometimes trigger endless animation timers
2100         https://bugs.webkit.org/show_bug.cgi?id=150018
2101
2102         Reviewed by Tim Horton.
2103         
2104         Transitioning -webkit-clip-path could trigger endless animation
2105         timers, because when CompositeAnimation::updateTransitions() calls
2106         isTargetPropertyEqual(), a false negative answer triggers canceling the
2107         current transition and starting a new one over and over.
2108         
2109         This happened because StyleRareNonInheritedData simply tested pointer
2110         equality for m_clipPath and m_shapeOutside. Both of these need to do deep
2111         equality testing, requiring the implementation of operator== in BasicShapes
2112         classes.
2113         
2114         In addition, the PropertyWrappers in CSSPropertyAnimation need equals()
2115         implementations that also do more than pointer equality testing.
2116
2117         Tests: transitions/clip-path-transitions.html
2118                transitions/shape-outside-transitions.html
2119
2120         * page/animation/CSSPropertyAnimation.cpp:
2121         (WebCore::PropertyWrapperClipPath::equals):
2122         (WebCore::PropertyWrapperShape::equals):
2123         * rendering/ClipPathOperation.h:
2124         * rendering/style/BasicShapes.cpp:
2125         (WebCore::BasicShapeCircle::operator==):
2126         (WebCore::BasicShapeEllipse::operator==):
2127         (WebCore::BasicShapePolygon::operator==):
2128         (WebCore::BasicShapeInset::operator==):
2129         * rendering/style/BasicShapes.h:
2130         (WebCore::BasicShapeCenterCoordinate::operator==):
2131         (WebCore::BasicShapeRadius::operator==):
2132         * rendering/style/ShapeValue.cpp:
2133         (WebCore::pointersOrValuesEqual):
2134         (WebCore::ShapeValue::operator==):
2135         * rendering/style/ShapeValue.h:
2136         (WebCore::ShapeValue::operator!=):
2137         (WebCore::ShapeValue::operator==): Deleted.
2138         (WebCore::ShapeValue::ShapeValue): Deleted.
2139         * rendering/style/StyleRareNonInheritedData.cpp:
2140         (WebCore::StyleRareNonInheritedData::operator==):
2141         (WebCore::StyleRareNonInheritedData::clipPathOperationsEquivalent):
2142         (WebCore::StyleRareNonInheritedData::shapeOutsideDataEquivalent):
2143         * rendering/style/StyleRareNonInheritedData.h:
2144
2145 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
2146
2147         Test font-variant-* and font-feature-settings on Yosemite and Mavericks
2148         https://bugs.webkit.org/show_bug.cgi?id=149778
2149
2150         Reviewed by Simon Fraser.
2151
2152         We can simply call the function which enables features on Yosemite and Mavericks.
2153
2154         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2155         (WebCore::platformFontLookupWithFamily):
2156         (WebCore::fontWithFamily):
2157
2158 2015-10-09  Anders Carlsson  <andersca@apple.com>
2159
2160         Don't allow plug-ins to override image types for <embed> elements
2161         https://bugs.webkit.org/show_bug.cgi?id=149979
2162
2163         Reviewed by Tim Horton.
2164
2165         Stop allowing plug-ins to take over image types for <embed> elements. We already do this
2166         for <object> elements, but had to make <embed> elements exempt because of webkit.org/b/49016.
2167         The QuickTime plug-in hasn't supported image types since Lion, so there's no point in keeping this code around.
2168
2169         * html/HTMLAppletElement.cpp:
2170         (WebCore::HTMLAppletElement::HTMLAppletElement):
2171         * html/HTMLEmbedElement.cpp:
2172         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
2173         * html/HTMLObjectElement.cpp:
2174         (WebCore::HTMLObjectElement::HTMLObjectElement):
2175         (WebCore::HTMLObjectElement::parametersForPlugin):
2176         * html/HTMLPlugInImageElement.cpp:
2177         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2178         (WebCore::HTMLPlugInImageElement::isImageType):
2179         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
2180         * html/HTMLPlugInImageElement.h:
2181         (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages): Deleted.
2182         * loader/EmptyClients.h:
2183         * loader/FrameLoaderClient.h:
2184         * loader/SubframeLoader.cpp:
2185         (WebCore::SubframeLoader::resourceWillUsePlugin):
2186         (WebCore::SubframeLoader::requestObject):
2187         (WebCore::SubframeLoader::shouldUsePlugin):
2188         * loader/SubframeLoader.h:
2189
2190 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
2191
2192         Unreviewed, fixing debug builds with Clang on Linux
2193         by including the stdio.h header where it's required
2194         under a debug configuration.
2195
2196         * page/scrolling/ScrollingStateTree.cpp:
2197         (WebCore::ScrollingStateTree::ScrollingStateTree):
2198         * rendering/SimpleLineLayoutFunctions.cpp:
2199
2200 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
2201
2202         Unreviewed, followup to r190643.
2203
2204         Inline the std::function<> constructor wrappings around lambdas
2205         into a single line, instead of spanning it across four lines.
2206
2207         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2208         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
2209         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
2210         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
2211         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2212         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
2213         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
2214         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2215         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
2216         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
2217         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
2218         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
2219         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2220         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
2221         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
2222         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
2223         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2224         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
2225         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
2226         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
2227         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2228         (webkitVideoSinkRender):
2229         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2230         (webKitWebSrcChangeState):
2231         (webKitWebSrcNeedDataCb):
2232         (webKitWebSrcEnoughDataMainCb):
2233         (webKitWebSrcEnoughDataCb):
2234         (webKitWebSrcSeekMainCb):
2235         (webKitWebSrcSeekDataCb):
2236
2237 2015-10-11  Brian Burg  <bburg@apple.com>
2238
2239         Add missing builtins files to the Xcode projects
2240         https://bugs.webkit.org/show_bug.cgi?id=150015
2241
2242         Reviewed by Yusuke Suzuki.
2243
2244         * WebCore.xcodeproj/project.pbxproj:
2245
2246 2015-10-11  Simon Fraser  <simon.fraser@apple.com>
2247
2248         Cleanup and simplification of SVG path-related classes
2249         https://bugs.webkit.org/show_bug.cgi?id=150011
2250
2251         Reviewed by Zalan Bujtas.
2252
2253         Many SVG path-related subclasses were stateful, but only because code in
2254         SVGPathUtilities kept global copies around for no reason. A microbenchmark
2255         showed that there was no benefit to keeping global singletons of SVGPathBuilder,
2256         SVGPathSegListBuilder, SVGPathByteStreamBuilder, SVGPathStringBuilder,
2257         SVGPathTraversalStateBuilder, SVGPathParser and SVGPathBlender.
2258         
2259         Making these classes not be re-usable makes the code much simpler, allowing
2260         their SVGPathSources, SVGPathConsumers, SVGPathByteStream etc. to be stored
2261         by reference, and eliminating the cleanup() function which created annoying
2262         ordering issues.
2263         
2264         Code that uses SVGPathParser and SVGPathBlender is further simplified by having
2265         these classes expose only static functions, hiding any internal statefulness.
2266
2267         * svg/SVGPathBlender.cpp: Remove the m_progress member variable and instead
2268         pass progress to the various blend functions, as we do for other blend functions.
2269         Expose two only static functions. Pointers to references.
2270         (WebCore::SVGPathBlender::addAnimatedPath):
2271         (WebCore::SVGPathBlender::blendAnimatedPath):
2272         (WebCore::SVGPathBlender::SVGPathBlender):
2273         (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
2274         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
2275         (WebCore::SVGPathBlender::blendMoveToSegment):
2276         (WebCore::SVGPathBlender::blendLineToSegment):
2277         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
2278         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
2279         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
2280         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
2281         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
2282         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
2283         (WebCore::SVGPathBlender::blendArcToSegment):
2284         (WebCore::SVGPathBlender::cleanup): Deleted.
2285         * svg/SVGPathBlender.h: Make the constructor take a ref to the destination Path,
2286         which is stored by reference.
2287         * svg/SVGPathBuilder.cpp:
2288         (WebCore::SVGPathBuilder::SVGPathBuilder):
2289         (WebCore::SVGPathBuilder::moveTo):
2290         (WebCore::SVGPathBuilder::lineTo):
2291         (WebCore::SVGPathBuilder::curveToCubic):
2292         (WebCore::SVGPathBuilder::closePath):
2293         * svg/SVGPathBuilder.h:
2294         (WebCore::SVGPathBuilder::setCurrentPath): Deleted.
2295         * svg/SVGPathByteStreamBuilder.cpp: References, assertions removed.
2296         (WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder):
2297         * svg/SVGPathByteStreamBuilder.h:
2298         (WebCore::SVGPathByteStreamBuilder::writeType):
2299         (WebCore::SVGPathByteStreamBuilder::setCurrentByteStream): Deleted.
2300         * svg/SVGPathConsumer.h:
2301         * svg/SVGPathElement.cpp:
2302         * svg/SVGPathParser.cpp: Expose some static helper functions for parsing
2303         to byte streams and strings. References.
2304         (WebCore::SVGPathParser::parse):
2305         (WebCore::SVGPathParser::parseToByteStream):
2306         (WebCore::SVGPathParser::parseToString):
2307         (WebCore::SVGPathParser::SVGPathParser):
2308         (WebCore::SVGPathParser::parseClosePathSegment):
2309         (WebCore::SVGPathParser::parseMoveToSegment):
2310         (WebCore::SVGPathParser::parseLineToSegment):
2311         (WebCore::SVGPathParser::parseLineToHorizontalSegment):
2312         (WebCore::SVGPathParser::parseLineToVerticalSegment):
2313         (WebCore::SVGPathParser::parseCurveToCubicSegment):
2314         (WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
2315         (WebCore::SVGPathParser::parseCurveToQuadraticSegment):
2316         (WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
2317         (WebCore::SVGPathParser::parseArcToSegment):
2318         (WebCore::SVGPathParser::parsePathData):
2319         (WebCore::SVGPathParser::decomposeArcToCubic):
2320         (WebCore::SVGPathParser::parsePathDataFromSource): Deleted.
2321         (WebCore::SVGPathParser::cleanup): Deleted.
2322         * svg/SVGPathParser.h:
2323         (WebCore::SVGPathParser::setCurrentConsumer): Deleted.
2324         (WebCore::SVGPathParser::setCurrentSource): Deleted.
2325         * svg/SVGPathSegListBuilder.cpp:
2326         (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
2327         (WebCore::SVGPathSegListBuilder::moveTo):
2328         (WebCore::SVGPathSegListBuilder::lineTo):
2329         (WebCore::SVGPathSegListBuilder::lineToHorizontal):
2330         (WebCore::SVGPathSegListBuilder::lineToVertical):
2331         (WebCore::SVGPathSegListBuilder::curveToCubic):
2332         (WebCore::SVGPathSegListBuilder::curveToCubicSmooth):
2333         (WebCore::SVGPathSegListBuilder::curveToQuadratic):
2334         (WebCore::SVGPathSegListBuilder::curveToQuadraticSmooth):
2335         (WebCore::SVGPathSegListBuilder::arcTo):
2336         (WebCore::SVGPathSegListBuilder::closePath):
2337         * svg/SVGPathSegListBuilder.h:
2338         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathElement): Deleted.
2339         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegList): Deleted.
2340         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegRole): Deleted.
2341         * svg/SVGPathStringBuilder.cpp:
2342         (WebCore::SVGPathStringBuilder::cleanup): Deleted.
2343         * svg/SVGPathStringBuilder.h:
2344         * svg/SVGPathTraversalStateBuilder.cpp:
2345         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
2346         (WebCore::SVGPathTraversalStateBuilder::moveTo):
2347         (WebCore::SVGPathTraversalStateBuilder::lineTo):
2348         (WebCore::SVGPathTraversalStateBuilder::curveToCubic):
2349         (WebCore::SVGPathTraversalStateBuilder::closePath):
2350         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
2351         (WebCore::SVGPathTraversalStateBuilder::totalLength):
2352         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
2353         (WebCore::SVGPathTraversalStateBuilder::setDesiredLength): Deleted.
2354         * svg/SVGPathTraversalStateBuilder.h:
2355         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
2356         (WebCore::SVGPathTraversalStateBuilder::setCurrentTraversalState): Deleted.
2357         * svg/SVGPathUtilities.cpp: Remove globals accessors, making things on the stack
2358         instead. Use SVGPathParser helper functions where possible.
2359         (WebCore::buildPathFromString):
2360         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
2361         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
2362         (WebCore::buildPathFromByteStream):
2363         (WebCore::buildSVGPathSegListFromByteStream):
2364         (WebCore::buildStringFromByteStream):
2365         (WebCore::buildStringFromSVGPathSegList):
2366         (WebCore::buildSVGPathByteStreamFromString):
2367         (WebCore::buildAnimatedSVGPathByteStream):
2368         (WebCore::addToSVGPathByteStream):
2369         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
2370         (WebCore::getTotalLengthOfSVGPathByteStream):
2371         (WebCore::getPointAtLengthOfSVGPathByteStream):
2372         (WebCore::buildStringFromPath):
2373         (WebCore::globalSVGPathBuilder): Deleted.
2374         (WebCore::globalSVGPathSegListBuilder): Deleted.
2375         (WebCore::globalSVGPathByteStreamBuilder): Deleted.
2376         (WebCore::globalSVGPathStringBuilder): Deleted.
2377         (WebCore::globalSVGPathTraversalStateBuilder): Deleted.
2378         (WebCore::globalSVGPathParser): Deleted.
2379         (WebCore::globalSVGPathBlender): Deleted.
2380         * svg/SVGPathUtilities.h:
2381         * svg/SVGToOTFFontConversion.cpp: CFFBuilder no longer inherits from SVGPathBuilder.
2382         It did nothing with the Path, re-implemented all the functions, and only made use of
2383         the m_current member var, so just make it inherit from SVGPathConsumer, and have
2384         its own m_current.
2385         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
2386
2387 2015-10-10  Antti Koivisto  <antti@apple.com>
2388
2389         Remove InsertionPoint and ContentDistributor
2390         https://bugs.webkit.org/show_bug.cgi?id=150004
2391
2392         Rubber-stamped by Sam Weinig.
2393
2394         Now that <details> is on top of the modern Shadow DOM remove the last vestiges of the V0 Shadow DOM API.
2395
2396         * CMakeLists.txt:
2397         * WebCore.vcxproj/WebCore.vcxproj:
2398         * WebCore.xcodeproj/project.pbxproj:
2399         * css/SelectorChecker.cpp:
2400         * css/StyleResolver.cpp:
2401         * dom/ContainerNode.cpp:
2402         * dom/Element.cpp:
2403         (WebCore::shouldUseNodeRenderingTraversalSlowPath):
2404         (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath):
2405         * dom/Node.cpp:
2406         (WebCore::Node::parentOrShadowHostElement):
2407         (WebCore::Node::insertedInto):
2408         (WebCore::Node::insertionParentForBinding): Deleted.
2409         * dom/Node.h:
2410         (WebCore::Node::isCharacterDataNode):
2411         (WebCore::Node::isFrameOwnerElement):
2412         (WebCore::Node::isPluginElement):
2413         (WebCore::Node::isImageControlsRootElement):
2414         (WebCore::Node::isImageControlsButtonElement):
2415         (WebCore::Node::isDocumentFragment):
2416         (WebCore::Node::isShadowRoot):
2417         (WebCore::Node::isInsertionPointNode): Deleted.
2418         (WebCore::Node::isInsertionPoint): Deleted.
2419         * dom/NodeRenderingTraversal.cpp:
2420         (WebCore::NodeRenderingTraversal::traverseParent):
2421         (WebCore::NodeRenderingTraversal::traverseFirstChild):
2422         (WebCore::NodeRenderingTraversal::traverseLastChild):
2423         (WebCore::NodeRenderingTraversal::traverseNextSibling):
2424         (WebCore::NodeRenderingTraversal::traversePreviousSibling):
2425         (WebCore::NodeRenderingTraversal::parentSlow):
2426         (WebCore::NodeRenderingTraversal::nextInScope):
2427         (WebCore::NodeRenderingTraversal::previousInScope):
2428         (WebCore::NodeRenderingTraversal::parentInScope):
2429         (WebCore::NodeRenderingTraversal::lastChildInScope):
2430         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed): Deleted.
2431         (WebCore::NodeRenderingTraversal::findFirstSiblingEnteringInsertionPoints): Deleted.
2432         (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints): Deleted.
2433         (WebCore::NodeRenderingTraversal::findFirstFromDistributedNode): Deleted.
2434         (WebCore::NodeRenderingTraversal::findLastSiblingEnteringInsertionPoints): Deleted.
2435         (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints): Deleted.
2436         (WebCore::NodeRenderingTraversal::findLastFromDistributedNode): Deleted.
2437         * dom/ShadowRoot.h:
2438         (WebCore::ShadowRoot::distributor): Deleted.
2439         * html/HTMLInputElement.cpp:
2440         * html/HTMLSlotElement.cpp:
2441         * html/HTMLSlotElement.h:
2442         * html/shadow/ContentDistributor.cpp: Removed.
2443         * html/shadow/ContentDistributor.h: Removed.
2444         * html/shadow/InsertionPoint.cpp: Removed.
2445         * html/shadow/InsertionPoint.h: Removed.
2446         * page/FocusController.cpp:
2447         (WebCore::FocusController::previousFocusableElement):
2448         * testing/Internals.cpp:
2449
2450 2015-10-10  Simon Fraser  <simon.fraser@apple.com>
2451
2452         Use references and more const in SVGPathUtilities
2453         https://bugs.webkit.org/show_bug.cgi?id=150007
2454
2455         Reviewed by Zalan Bujtas.
2456         
2457         SVGPathUtilities had lots of pointers whose non-nullness was asserted,
2458         little const, and was very trigger-happy with stack allocations. Clean
2459         that all up.
2460
2461         * svg/SVGAnimatedPath.cpp:
2462         (WebCore::SVGAnimatedPathAnimator::constructFromString):
2463         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
2464         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
2465         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
2466         * svg/SVGPathByteStream.h:
2467         (WebCore::SVGPathByteStream::begin):
2468         (WebCore::SVGPathByteStream::end):
2469         (WebCore::SVGPathByteStream::append):
2470         * svg/SVGPathByteStreamSource.cpp:
2471         (WebCore::SVGPathByteStreamSource::SVGPathByteStreamSource):
2472         * svg/SVGPathByteStreamSource.h:
2473         * svg/SVGPathElement.cpp:
2474         (WebCore::SVGPathElement::getTotalLength):
2475         (WebCore::SVGPathElement::getPointAtLength):
2476         (WebCore::SVGPathElement::getPathSegAtLength):
2477         (WebCore::SVGPathElement::parseAttribute):
2478         (WebCore::SVGPathElement::svgAttributeChanged):
2479         (WebCore::SVGPathElement::pathByteStream):
2480         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
2481         (WebCore::SVGPathElement::pathSegListChanged):
2482         (WebCore::SVGPathElement::SVGPathElement): Deleted.
2483         * svg/SVGPathElement.h:
2484         * svg/SVGPathUtilities.cpp:
2485         (WebCore::globalSVGPathBuilder):
2486         (WebCore::globalSVGPathSegListBuilder):
2487         (WebCore::globalSVGPathByteStreamBuilder):
2488         (WebCore::globalSVGPathStringBuilder):
2489         (WebCore::globalSVGPathTraversalStateBuilder):
2490         (WebCore::globalSVGPathParser):
2491         (WebCore::globalSVGPathBlender):
2492         (WebCore::buildPathFromString):
2493         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
2494         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
2495         (WebCore::buildPathFromByteStream):
2496         (WebCore::buildSVGPathSegListFromByteStream):
2497         (WebCore::buildStringFromByteStream):
2498         (WebCore::buildStringFromSVGPathSegList):
2499         (WebCore::buildSVGPathByteStreamFromString):
2500         (WebCore::buildAnimatedSVGPathByteStream):
2501         (WebCore::addToSVGPathByteStream):
2502         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
2503         (WebCore::getTotalLengthOfSVGPathByteStream):
2504         (WebCore::getPointAtLengthOfSVGPathByteStream):
2505         (WebCore::buildStringFromPath):
2506         * svg/SVGPathUtilities.h:
2507         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
2508         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
2509
2510 2015-10-10  Andreas Kling  <akling@apple.com>
2511
2512         Reduce pointless malloc traffic in ElementRuleCollector.
2513         <https://webkit.org/b/150003>
2514
2515         Reviewed by Antti Koivisto.
2516
2517         Don't use a unique_ptr for the m_matchedRules vector in ElementRuleCollector.
2518         This is one of our heaviest sources of transient allocations, with ~88000
2519         malloc/free pairs on loading theverge.com.
2520
2521         * css/ElementRuleCollector.cpp:
2522         (WebCore::ElementRuleCollector::addMatchedRule):
2523         (WebCore::ElementRuleCollector::clearMatchedRules):
2524         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
2525         (WebCore::ElementRuleCollector::sortMatchedRules):
2526         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
2527         * css/ElementRuleCollector.h:
2528         (WebCore::ElementRuleCollector::hasMatchedRules):
2529
2530 2015-10-10  Dan Bernstein  <mitz@apple.com>
2531
2532         [iOS] Remove unnecessary iOS version checks
2533         https://bugs.webkit.org/show_bug.cgi?id=150002
2534
2535         Reviewed by Alexey Proskuryakov.
2536
2537         * loader/cache/CachedFont.cpp:
2538         (WebCore::CachedFont::ensureCustomFontData):
2539         * loader/cocoa/DiskCacheMonitorCocoa.h:
2540         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
2541         * page/mac/SettingsMac.mm:
2542         (WebCore::sansSerifTraditionalHanFontFamily):
2543         (WebCore::sansSerifSimplifiedHanFontFamily):
2544         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2545         (WebCore::appendOpenTypeFeature):
2546         * platform/graphics/ios/FontCacheIOS.mm:
2547         (WebCore::getSystemFontFallbackForCharacters):
2548         (WebCore::platformLookupFallbackFont):
2549         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
2550         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
2551         * platform/ios/WebCoreSystemInterfaceIOS.h:
2552         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2553         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2554         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2555         * platform/ios/wak/WAKWindow.mm:
2556         (+[WAKWindow hasLandscapeOrientation]):
2557         (-[WAKWindow hostLayer]):
2558         * platform/network/cf/CookieJarCFNet.cpp:
2559         (WebCore::copyCookiesForURLWithFirstPartyURL):
2560         (WebCore::createCookies):
2561         * platform/network/mac/CertificateInfoMac.mm:
2562         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
2563         * platform/spi/cf/CFNetworkSPI.h:
2564         * platform/spi/cocoa/AVKitSPI.h:
2565         * platform/spi/cocoa/CoreTextSPI.h:
2566         * platform/spi/cocoa/NEFilterSourceSPI.h:
2567         * platform/spi/cocoa/QuartzCoreSPI.h:
2568         * platform/spi/cocoa/SecuritySPI.h:
2569         * platform/spi/ios/LaunchServicesSPI.h:
2570         * platform/spi/mac/AVFoundationSPI.h:
2571         * platform/text/TextBreakIterator.cpp:
2572         * platform/text/TextFlags.h:
2573         * platform/text/ios/LocalizedDateCache.mm:
2574         (WebCore::LocalizedDateCache::calculateMaximumWidth):
2575         * platform/text/mac/LocaleMac.mm:
2576         (WebCore::LocaleMac::LocaleMac):
2577         * rendering/RenderThemeIOS.mm:
2578         (WebCore::RenderThemeIOS::cachedSystemFontDescription):
2579         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2580         * svg/SVGToOTFFontConversion.cpp:
2581         (WebCore::SVGToOTFFontConverter::appendKERNTable):
2582         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
2583
2584 2015-10-10  Antti Koivisto  <antti@apple.com>
2585
2586         Rewrite HTMLDetailsElement using HTMLSlotElement
2587         https://bugs.webkit.org/show_bug.cgi?id=149698
2588
2589         Reviewed by Andreas Kling.
2590
2591         Use the modern Shadow DOM to implement <details> element. After this the legacy InsertionPoint and
2592         related code can be removed.
2593
2594         Based on a patch by Ryosuke.
2595
2596         * dom/Element.cpp:
2597         (WebCore::Element::childrenChanged):
2598         * dom/EventDispatcher.cpp:
2599         (WebCore::EventPath::EventPath):
2600         * dom/ShadowRoot.cpp:
2601         (WebCore::ShadowRoot::ShadowRoot):
2602         (WebCore::ShadowRoot::~ShadowRoot):
2603         (WebCore::ShadowRoot::removeAllEventListeners):
2604         (WebCore::ShadowRoot::findAssignedSlot):
2605         (WebCore::ShadowRoot::addSlotElementByName):
2606         (WebCore::ShadowRoot::removeSlotElementByName):
2607         (WebCore::ShadowRoot::invalidateSlotAssignments):
2608         (WebCore::ShadowRoot::invalidateDefaultSlotAssignments):
2609         (WebCore::ShadowRoot::assignedNodesForSlot):
2610         * dom/ShadowRoot.h:
2611         (WebCore::ShadowRoot::create):
2612         (WebCore::ShadowRoot::distributor):
2613         (WebCore::ShadowRoot::isOrphan):
2614         * dom/SlotAssignment.cpp:
2615         (WebCore::slotNameFromAttributeValue):
2616
2617             Rename for clarity.
2618
2619         (WebCore::slotNameFromSlotAttribute):
2620
2621             SlotAssignment can now be specialized by providing function that maps from node to slot name.
2622             This is the default function that gets the name from the slot attribute.
2623
2624         (WebCore::SlotAssignment::SlotAssignment):
2625         (WebCore::SlotAssignment::findAssignedSlot):
2626
2627             Use the name mapping function.
2628             Ensure that the slots are assigned.
2629
2630         (WebCore::SlotAssignment::addSlotElementByName):
2631         (WebCore::SlotAssignment::removeSlotElementByName):
2632         (WebCore::SlotAssignment::assignedNodesForSlot):
2633         (WebCore::SlotAssignment::invalidate):
2634         (WebCore::SlotAssignment::invalidateDefaultSlot):
2635         (WebCore::SlotAssignment::resolveAllSlotElements):
2636         (WebCore::SlotAssignment::assignSlots):
2637
2638             Use the name mapping function.
2639
2640         (WebCore::SlotAssignment::assignToSlot):
2641
2642             Factor into function.
2643
2644         (WebCore::treatNullAsEmpty): Deleted.
2645         * dom/SlotAssignment.h:
2646         (WebCore::SlotAssignment::~SlotAssignment):
2647         (WebCore::SlotAssignment::defaultSlotName):
2648
2649             Add static getter for emptyAtom for clarity.
2650
2651         (WebCore::SlotAssignment::SlotAssignment): Deleted.
2652         * html/HTMLDetailsElement.cpp:
2653         (WebCore::summarySlotName):
2654         (WebCore::slotNameFunction):
2655
2656             Slot name function for <details>. It assigns the first <summary> child to the summary slot and others
2657             to the default content slot if the element is open.
2658
2659         (WebCore::HTMLDetailsElement::create):
2660         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
2661         (WebCore::HTMLDetailsElement::isActiveSummary):
2662         (WebCore::HTMLDetailsElement::parseAttribute):
2663         (WebCore::HTMLDetailsElement::toggleOpen):
2664         (WebCore::summaryQuerySelector): Deleted.
2665         (WebCore::DetailsContentElement::create): Deleted.
2666         (WebCore::DetailsSummaryElement::create): Deleted.
2667         (WebCore::HTMLDetailsElement::findMainSummary): Deleted.
2668         (WebCore::HTMLDetailsElement::childShouldCreateRenderer): Deleted.
2669         * html/HTMLDetailsElement.h:
2670         * html/HTMLSummaryElement.cpp:
2671         (WebCore::HTMLSummaryElement::create):
2672         (WebCore::HTMLSummaryElement::createElementRenderer):
2673         (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
2674         (WebCore::HTMLSummaryElement::detailsElement):
2675         (WebCore::HTMLSummaryElement::isActiveSummary):
2676         (WebCore::isClickableControl):
2677         (WebCore::HTMLSummaryElement::supportsFocus):
2678         (WebCore::HTMLSummaryElement::defaultEventHandler):
2679         (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
2680         (WebCore::SummaryContentElement::create): Deleted.
2681         (WebCore::HTMLSummaryElement::childShouldCreateRenderer): Deleted.
2682         (WebCore::HTMLSummaryElement::isMainSummary): Deleted.
2683         * html/HTMLSummaryElement.h:
2684         * html/shadow/DetailsMarkerControl.cpp:
2685         (WebCore::DetailsMarkerControl::rendererIsNeeded):
2686         * style/RenderTreePosition.cpp:
2687         (WebCore::RenderTreePosition::computeNextSibling):
2688
2689             Skip the verification assert for shadow host children. Getting this right requires
2690             better shadow-aware traversal code.
2691
2692         * style/StyleResolveTree.cpp:
2693         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
2694         (WebCore::Style::attachChildren):
2695         (WebCore::Style::attachShadowRoot):
2696         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
2697         (WebCore::Style::attachSlotAssignees):
2698         (WebCore::Style::attachRenderTree):
2699         (WebCore::Style::detachChildren):
2700         (WebCore::Style::detachShadowRoot):
2701         (WebCore::Style::detachSlotAssignees):
2702         (WebCore::Style::detachRenderTree):
2703         (WebCore::Style::resolveChildren):
2704         (WebCore::Style::resolveSlotAssignees):
2705         (WebCore::Style::resolveTree):
2706         (WebCore::Style::attachDistributedChildren): Deleted.
2707         (WebCore::Style::detachDistributedChildren): Deleted.
2708
2709             Remove InsertionPoint related code paths.
2710
2711 2015-10-10  Andreas Kling  <akling@apple.com>
2712
2713         SerializedScriptValue should use a compact encoding for 8-bit strings.
2714         <https://webkit.org/b/149934>
2715
2716         Reviewed by Antti Koivisto.
2717
2718         We were encoding known 8-bit strings in a 16-bit format when serializing script values.
2719
2720         Extend the format to support 8-bit strings. The 8-bittiness is encoded in the highest bit
2721         of the string length. This is possible while supporting all older formats due to string
2722         lengths >= 0x7FFFFFFF being disallowed.
2723
2724         This patch knocks ~1 MB off of theverge.com, where some ad or tracker or whatever likes to
2725         do a ton of postMessage() business.
2726
2727         * bindings/js/SerializedScriptValue.cpp:
2728         (WebCore::CurrentVersion): Bump the serialization format version. Also updated the grammar
2729         comment to describe the new format. Artistic license applied in description of bitfield.
2730
2731         (WebCore::writeLittleEndianUInt16): Deleted.
2732
2733         (WebCore::CloneSerializer::serialize):
2734         (WebCore::CloneSerializer::write):
2735         (WebCore::CloneDeserializer::deserializeString):
2736         (WebCore::CloneDeserializer::readString):
2737         (WebCore::CloneDeserializer::readStringData): Support 8-bit strings. I kept the string
2738         length limit at UINT_MAX/sizeof(UChar) since the highest bit of the length is no longer
2739         available. Besides, it seems flimsy to support longer strings if they happen to have all
2740         8-bit characters.
2741
2742 2015-10-10  Dan Bernstein  <mitz@apple.com>
2743
2744         [iOS] Remove project support for iOS 8
2745         https://bugs.webkit.org/show_bug.cgi?id=149993
2746
2747         Reviewed by Alexey Proskuryakov.
2748
2749         * Configurations/WebCore.xcconfig:
2750         * Configurations/WebCoreTestSupport.xcconfig:
2751
2752 2015-10-09  Zalan Bujtas  <zalan@apple.com>
2753
2754         Check if start and end positions are still valid after updating them through VisibleSelection.
2755         https://bugs.webkit.org/show_bug.cgi?id=149982
2756
2757         Reviewed by Ryosuke Niwa.
2758
2759         This patch is required to be able to clean up anonymous tables structure.
2760         In certain edge cases, start/end positions could become nullptr after various text splitting
2761         operations. 
2762
2763         Covered by editing/execCommand/crash-137961.html
2764
2765         * editing/ApplyStyleCommand.cpp:
2766         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2767         (WebCore::ApplyStyleCommand::applyInlineStyle):
2768
2769 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
2770
2771         Rename RenderObject::isRoot() to isDocumentElementRenderer()
2772         https://bugs.webkit.org/show_bug.cgi?id=149976
2773
2774         Reviewed by Zalan Bujtas.
2775
2776         RenderObject::isRoot() was confusingly named, because it returns true for
2777         the document element's renderer, not for the actual root (the RenderView).
2778         In this way it mismatched RenderLayer::isRootLayer(), which returned true
2779         for the RenderView's layer.
2780         
2781         Rename it to the more accurate isDocumentElementRenderer().
2782
2783         * dom/Node.cpp:
2784         (WebCore::Node::renderRect):
2785         * page/ios/FrameIOS.mm:
2786         (WebCore::Frame::renderRectForPoint):
2787         * rendering/RenderBlock.cpp:
2788         (WebCore::RenderBlock::paint):
2789         (WebCore::RenderBlock::isSelectionRoot):
2790         (WebCore::RenderBlock::selectionGaps):
2791         * rendering/RenderBlockFlow.cpp:
2792         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
2793         (WebCore::RenderBlockFlow::layoutBlock):
2794         (WebCore::RenderBlockFlow::requiresColumns):
2795         * rendering/RenderBox.cpp:
2796         (WebCore::RenderBox::styleWillChange):
2797         (WebCore::RenderBox::styleDidChange):
2798         (WebCore::RenderBox::updateFromStyle):
2799         (WebCore::RenderBox::paintBackground):
2800         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
2801         (WebCore::RenderBox::repaintLayerRectsForImage):
2802         (WebCore::RenderBox::computeLogicalHeight):
2803         (WebCore::RenderBox::computePercentageLogicalHeight):
2804         (WebCore::RenderBox::createsNewFormattingContext):
2805         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
2806         * rendering/RenderBox.h:
2807         (WebCore::RenderBox::stretchesToViewport):
2808         * rendering/RenderBoxModelObject.cpp:
2809         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2810         (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
2811         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2812         * rendering/RenderBoxModelObject.h:
2813         * rendering/RenderDeprecatedFlexibleBox.cpp:
2814         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2815         * rendering/RenderElement.cpp:
2816         (WebCore::RenderElement::styleWillChange):
2817         (WebCore::RenderElement::rendererForRootBackground):
2818         (WebCore::shouldRepaintForImageAnimation):
2819         * rendering/RenderElement.h:
2820         * rendering/RenderFlexibleBox.cpp:
2821         (WebCore::RenderFlexibleBox::layoutBlock):
2822         * rendering/RenderGrid.cpp:
2823         (WebCore::RenderGrid::layoutBlock):
2824         * rendering/RenderLayer.cpp:
2825         (WebCore::shouldSuppressPaintingLayer):
2826         (WebCore::paintForFixedRootBackground):
2827         (WebCore::RenderLayer::paintLayerContents):
2828         (WebCore::RenderLayer::calculateClipRects):
2829         * rendering/RenderLayer.h:
2830         * rendering/RenderLayerBacking.cpp:
2831         (WebCore::RenderLayerBacking::rendererBackgroundColor):
2832         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2833         * rendering/RenderLayerModelObject.cpp:
2834         (WebCore::RenderLayerModelObject::styleDidChange):
2835         * rendering/RenderObject.cpp:
2836         (WebCore::RenderObject::repaintSlowRepaintObject):
2837         (WebCore::RenderObject::offsetParent):
2838         * rendering/RenderObject.h:
2839         (WebCore::RenderObject::isDocumentElementRenderer):
2840         (WebCore::RenderObject::isRoot): Deleted.
2841         * rendering/RenderTable.cpp:
2842         (WebCore::RenderTable::paint):
2843         * rendering/svg/RenderSVGRoot.cpp:
2844         (WebCore::RenderSVGRoot::layout):
2845         (WebCore::RenderSVGRoot::shouldApplyViewportClip):
2846         * rendering/svg/SVGRenderSupport.cpp:
2847         (WebCore::SVGRenderSupport::isOverflowHidden):
2848
2849 2015-10-09  Nan Wang  <n_wang@apple.com>
2850
2851         AX: ARIA 1.1 implement aria-colcount, aria-colindex, aria-colspan, aria-rowcount, aria-rowindex and aria-rowspan
2852         https://bugs.webkit.org/show_bug.cgi?id=148967
2853
2854         Reviewed by Chris Fleizach.
2855
2856         Added support for ARIA 1.1 table/grid related attributes. Created new attributes for mac, so
2857         VoiceOver can pick up the information and speak accordingly.
2858
2859         Test: accessibility/mac/aria-table-attributes.html
2860
2861         * accessibility/AccessibilityARIAGridCell.cpp:
2862         (WebCore::AccessibilityARIAGridCell::AccessibilityARIAGridCell):
2863         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
2864         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
2865         (WebCore::AccessibilityARIAGridCell::parentRowGroup):
2866         * accessibility/AccessibilityARIAGridCell.h:
2867         * accessibility/AccessibilityObject.cpp:
2868         (WebCore::initializeRoleMap):
2869         * accessibility/AccessibilityObject.h:
2870         * accessibility/AccessibilityTable.cpp:
2871         (WebCore::AccessibilityTable::title):
2872         (WebCore::AccessibilityTable::ariaColumnCount):
2873         (WebCore::AccessibilityTable::ariaRowCount):
2874         * accessibility/AccessibilityTable.h:
2875         * accessibility/AccessibilityTableCell.cpp:
2876         (WebCore::AccessibilityTableCell::AccessibilityTableCell):
2877         (WebCore::AccessibilityTableCell::titleUIElement):
2878         (WebCore::AccessibilityTableCell::ariaColumnIndex):
2879         (WebCore::AccessibilityTableCell::ariaRowIndex):
2880         (WebCore::AccessibilityTableCell::ariaColumnSpan):
2881         (WebCore::AccessibilityTableCell::ariaRowSpan):
2882         * accessibility/AccessibilityTableCell.h:
2883         (WebCore::AccessibilityTableCell::setARIAColIndexFromRow):
2884         * accessibility/AccessibilityTableRow.cpp:
2885         (WebCore::AccessibilityTableRow::headerObject):
2886         (WebCore::AccessibilityTableRow::addChildren):
2887         (WebCore::AccessibilityTableRow::ariaColumnIndex):
2888         (WebCore::AccessibilityTableRow::ariaRowIndex):
2889         * accessibility/AccessibilityTableRow.h:
2890         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2891         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2892         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2893         * html/HTMLAttributeNames.in:
2894
2895 2015-10-09  Anders Carlsson  <andersca@apple.com>
2896
2897         Remove hack that allowed plug-ins to always take over certain image formats
2898         https://bugs.webkit.org/show_bug.cgi?id=149972
2899
2900         Reviewed by Tim Horton.
2901
2902         This hack was added 8 years ago to allow a certain plug-in to show multi-page TIFF images on uspto.gov. 
2903         We now support said TIFFs natively, and the plug-in has been discontinued so it's safe to get rid of this.
2904
2905         * loader/SubframeLoader.cpp:
2906         (WebCore::SubframeLoader::shouldUsePlugin): Deleted.
2907
2908 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
2909
2910         Garbage texture data with composited table row
2911         https://bugs.webkit.org/show_bug.cgi?id=148984
2912
2913         Reviewed by Zalan Bujtas.
2914         
2915         Don't pretend to know if the layer for a table header, section or cell is
2916         opaque, since table painting is special.
2917
2918         Test: compositing/contents-opaque/table-parts.html
2919
2920         * rendering/RenderLayer.cpp:
2921         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2922
2923 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
2924
2925         Garbage pixels on enphaseenergy.com site
2926         https://bugs.webkit.org/show_bug.cgi?id=149915
2927         rdar://problem/22976184
2928
2929         Reviewed by Darin Adler.
2930         
2931         When the <html> gets a composited RenderLayer, and we ask whether its background
2932         is opaque, return false, since the document element's background propagates
2933         to the root, and is painted by the RenderView.
2934         
2935         Also improve the compositing logging to indicate when fore- and background layers
2936         are present.
2937
2938         Test: compositing/contents-opaque/negative-z-before-html.html
2939
2940         * rendering/RenderLayerBacking.cpp:
2941         (WebCore::RenderLayerBacking::updateGeometry):
2942         * rendering/RenderLayerCompositor.cpp:
2943         (WebCore::RenderLayerCompositor::logLayerInfo):
2944
2945 2015-10-09  Antoine Quint  <graouts@apple.com>
2946
2947         Dynamic background color changes do not update until a layout is forced
2948         https://bugs.webkit.org/show_bug.cgi?id=131623
2949
2950         Compute correct repaint rect for decorated RenderSVGRoots.
2951
2952         The current implementation of clippedOverflowRectForRepaint() uses the
2953         generic repaint-rect calculations in SVGRenderSupport. Those in turn make
2954         use of repaintRectInLocalCoordinates(), which for RenderSVGRoot is the
2955         union of the painted children (w/ some expansion). If there're no children,
2956         or they do not fill the entire content box, then a repaint would not
2957         repaint the correct parts.
2958         Fix by calculating the union of the border-box and the SVG content
2959         when the SVG root is decorated (has background/border/etc.)
2960
2961         Adapted from a Chromium patch by fs@opera.com
2962         https://src.chromium.org/viewvc/blink?revision=170890&view=revision
2963
2964         Reviewed by Darin Adler.
2965
2966         Tests: svg/repaint/add-background-property-on-root.html
2967                svg/repaint/add-border-property-on-root.html
2968                svg/repaint/add-outline-property-on-root.html
2969                svg/repaint/change-background-color.html
2970                svg/repaint/remove-background-property-on-root.html
2971                svg/repaint/remove-border-property-on-root.html
2972                svg/repaint/remove-outline-property-on-root.html
2973
2974         * rendering/svg/RenderSVGRoot.cpp:
2975         (WebCore::RenderSVGRoot::layout):
2976         (WebCore::RenderSVGRoot::styleDidChange):
2977         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
2978
2979 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
2980
2981         [iOS WK2] Fix assertion in ViewportConfiguration::setDefaultConfiguration seen in testing
2982         https://bugs.webkit.org/show_bug.cgi?id=149959
2983
2984         Reviewed by Tim Horton.
2985
2986         When loading tests which set a flexible viewport, ViewportConfiguration::setDefaultConfiguration()
2987         is called first with testingParameters() and then with webpageParameters(). This
2988         would trigger the assertion that m_defaultConfiguration.initialScaleIsSet but
2989         the new initial scale is zero.
2990         
2991         The assertion seems wrong anyway; it's consulting m_defaultConfiguration.initialScaleIsSet
2992         but defaultConfiguration.initialScale, so fix it to test defaultConfiguration.initialScaleIsSet.
2993
2994         * page/ViewportConfiguration.cpp:
2995         (WebCore::ViewportConfiguration::setDefaultConfiguration):
2996
2997 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
2998
2999         Fix the !ENABLE(STREAM_API) build after r190794
3000         https://bugs.webkit.org/show_bug.cgi?id=149955
3001
3002         Reviewed by Darin Adler.
3003
3004         * bindings/js/WebCoreJSBuiltinInternals.h:
3005         (WebCore::JSBuiltinInternalFunctions::visit):
3006         (WebCore::JSBuiltinInternalFunctions::init):
3007
3008 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
3009
3010         Fix the binding generator after r190785
3011         https://bugs.webkit.org/show_bug.cgi?id=149956
3012
3013         Reviewed by Darin Adler.
3014
3015         * bindings/scripts/CodeGeneratorJS.pm:
3016         (GenerateConstructorHelperMethods):
3017         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3018         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
3019         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3020         (WebCore::JSTestEventConstructorConstructor::getConstructData):
3021         * bindings/scripts/test/JS/JSTestInterface.cpp:
3022         (WebCore::JSTestInterfaceConstructor::getConstructData):
3023         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3024         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
3025         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3026         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
3027         * bindings/scripts/test/JS/JSTestNode.cpp:
3028         (WebCore::JSTestNodeConstructor::getConstructData):
3029         * bindings/scripts/test/JS/JSTestObj.cpp:
3030         (WebCore::JSTestObjConstructor::getConstructData):
3031         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3032         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
3033         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3034         (WebCore::JSTestTypedefsConstructor::getConstructData):
3035
3036 2015-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>
3037
3038         Backgrounds bleed out of natively rendered text fields
3039         https://bugs.webkit.org/show_bug.cgi?id=149843
3040         <rdar://problem/22896977>
3041
3042         Reviewed by Darin Adler.
3043
3044         When natively rendering a text field with a background on Mac, the background bleeds out
3045         of the text field's border when the graphics context is scaled (as a result of a retina
3046         display or zoom/scale effects). This is because when we render the text field in bezeled
3047         style within a certain frame, AppKit adds 1 device pixel insets on all sides of the frame,
3048         which renders a text field that is slightly smaller than the frame. To adjust for this, we
3049         inflate the paint rect.
3050
3051         Test: fast/forms/hidpi-textfield-background-bleeding.html
3052
3053         * rendering/RenderThemeMac.mm:
3054         (WebCore::RenderThemeMac::paintTextField):
3055
3056 2015-10-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3057
3058         Refactor WebCore JS builtins to prepare for automatic generation
3059         https://bugs.webkit.org/show_bug.cgi?id=149751
3060
3061         Reviewed by Darin Adler.
3062
3063         Adding annotations to JS files to know whether they should be under a compilation flag and
3064         whether they are JS internals or JS tied to WebIDL.
3065         If a file is said as JS internals, all function names should be exported automatically.
3066         Added WebCoreJSBuiltins.h to simplify handling of builtins in JSVMClientData.
3067         Added WebCoreJSInternals.h to simplify handling of builtin private function in JSDOMWindowBase.
3068         Renamed WebCoreJSClientData to JSVMClientData.
3069
3070         Covered by existing tests.
3071
3072         * CMakeLists.txt:
3073         * Modules/streams/ByteLengthQueuingStrategy.js:
3074         * Modules/streams/CountQueuingStrategy.js:
3075         * Modules/streams/ReadableStream.js:
3076         * Modules/streams/ReadableStreamController.js:
3077         * Modules/streams/ReadableStreamInternals.js:
3078         * Modules/streams/ReadableStreamReader.js:
3079         * WebCore.order:
3080         * WebCore.xcodeproj/project.pbxproj:
3081         * bindings/js/DOMWrapperWorld.cpp:
3082         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
3083         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
3084         (WebCore::normalWorld):
3085         * bindings/js/JSDOMWindowBase.cpp:
3086         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
3087         (WebCore::JSDOMWindowBase::finishCreation):
3088         (WebCore::JSDOMWindowBase::visitChildren):
3089         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
3090         (WebCore::JSDOMWindowBase::destroy): Deleted.
3091         * bindings/js/JSDOMWindowBase.h:
3092         * bindings/js/ScriptController.cpp:
3093         (WebCore::ScriptController::getAllWorlds):
3094         * bindings/js/SerializedScriptValue.cpp:
3095         (WebCore::SerializedScriptValue::transferArrayBuffers):
3096         * bindings/js/WebCoreJSBuiltinInternals.h: Added.
3097         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
3098         (WebCore::JSBuiltinInternalFunctions::readableStreamInternals):
3099         (WebCore::JSBuiltinInternalFunctions::visit):
3100         (WebCore::JSBuiltinInternalFunctions::init):
3101         * bindings/js/WebCoreJSBuiltins.cpp:
3102         * bindings/js/WebCoreJSBuiltins.h: Added.
3103         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
3104         (WebCore::JSBuiltinFunctions::byteLengthQueuingStrategyBuiltins):
3105         (WebCore::JSBuiltinFunctions::countQueuingStrategyBuiltins):
3106         (WebCore::JSBuiltinFunctions::readableStreamBuiltins):
3107         (WebCore::JSBuiltinFunctions::readableStreamControllerBuiltins):
3108         (WebCore::JSBuiltinFunctions::readableStreamInternalsBuiltins):
3109         (WebCore::JSBuiltinFunctions::readableStreamReaderBuiltins):
3110         * bindings/js/WebCoreJSClientData.h:
3111         (WebCore::JSVMClientData::JSVMClientData):
3112         (WebCore::JSVMClientData::~JSVMClientData):
3113         (WebCore::JSVMClientData::builtinFunctions):
3114         (WebCore::initNormalWorldClientData):
3115         (WebCore::JSVMClientData::normalWorld): Deleted.
3116         (WebCore::JSVMClientData::getAllWorlds): Deleted.
3117
3118 2015-10-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3119
3120         Rationalize JSXXConstructor class definition
3121         https://bugs.webkit.org/show_bug.cgi?id=149923
3122
3123         Reviewed by Darin Adler.
3124
3125         Declaration of JSXXConstructor::construct and JSXXConstructor::getConstructData
3126         as long as JSXX is constructable from JavaScript.
3127
3128         Previously, JSXXConstructor::construct was not generated in case of CustomConstructor.
3129         It is now generated and directly calls the custom constructor function.
3130
3131         getConstructData was declared conditionally with #if in case of ConstructorConditional.
3132         The #if are now within getConstructData body.
3133
3134         Covered by binding tests.
3135
3136         * bindings/scripts/CodeGeneratorJS.pm:
3137         (GenerateConstructorDeclaration):
3138         (GenerateOverloadedConstructorDefinition):
3139         (GenerateConstructorDefinition):
3140         (GenerateConstructorHelperMethods):
3141         (GenerateConstructorDefinitions):.
3142         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3143         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct):
3144         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
3145         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):.
3146         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3147         (WebCore::JSTestEventConstructorConstructor::construct):
3148         (WebCore::JSTestEventConstructorConstructor::getConstructData):
3149         * bindings/scripts/test/JS/JSTestInterface.cpp:
3150         (WebCore::JSTestInterfaceConstructor::construct):
3151         (WebCore::JSTestInterfaceConstructor::getConstructData):
3152         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3153         (WebCore::JSTestJSBuiltinConstructorConstructor::construct):
3154         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
3155         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3156         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
3157         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
3158         * bindings/scripts/test/JS/JSTestNode.cpp:
3159         (WebCore::JSTestNodeConstructor::construct):
3160         (WebCore::JSTestNodeConstructor::getConstructData):
3161         * bindings/scripts/test/JS/JSTestObj.cpp:
3162         (WebCore::JSTestObjConstructor::construct):
3163         (WebCore::JSTestObjConstructor::getConstructData):
3164         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3165         (WebCore::constructJSTestOverloadedConstructors1):
3166         (WebCore::constructJSTestOverloadedConstructors2):
3167         (WebCore::constructJSTestOverloadedConstructors3):
3168         (WebCore::constructJSTestOverloadedConstructors4):
3169         (WebCore::constructJSTestOverloadedConstructors5):
3170         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
3171         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
3172         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3173         (WebCore::JSTestTypedefsConstructor::construct):
3174         (WebCore::JSTestTypedefsConstructor::getConstructData):
3175
3176 2015-10-07  Sergio Villar Senin  <svillar@igalia.com>
3177
3178         [css-grid] Include freeSpace in GridSizingData struct
3179         https://bugs.webkit.org/show_bug.cgi?id=149876
3180
3181         Reviewed by Darin Adler.
3182
3183         During the layout process we keep the free space for rows and
3184         columns in two variables that are passed to a few methods
3185         along with the GridSizingData struct. Those two variables
3186         should clearly be part of GridSizingData as they're temporary
3187         values used just for the sake of the layout.
3188
3189         No new tests required as this is just a refactoring.
3190
3191         * rendering/RenderGrid.cpp:
3192         (WebCore::RenderGrid::GridSizingData::GridSizingData):
3193         (WebCore::RenderGrid::GridSizingData::freeSpaceForDirection):
3194         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
3195         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3196         (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
3197         (WebCore::RenderGrid::layoutGridItems):
3198         (WebCore::RenderGrid::populateGridPositions):
3199         (WebCore::contentDistributionOffset):
3200         (WebCore::RenderGrid::computeContentPositionAndDistributionOffset):
3201         * rendering/RenderGrid.h:
3202
3203 2015-10-08  Sergio Villar Senin  <svillar@igalia.com>
3204
3205         [css-grid] Remove unneeded calls to compute(Content)LogicalWidth(Height)
3206         https://bugs.webkit.org/show_bug.cgi?id=149926
3207
3208         Reviewed by Darin Adler.
3209
3210         In order to resolve a Length to a LayoutUnit we need to
3211         provide a maximum value so that i.e. percentages are correctly
3212         computed. That maximum value was computeLogicalWidth() for
3213         columns and computeContentLogicalHeight() for rows. We were
3214         calling it for every single track with a definite size instead
3215         of computing it once and reusing it multiple times.
3216
3217         This brings some nice performance improvements:
3218         - 2.9%  in /Layout/fixed-grid-lots-of-data
3219         - 2.95% in /Layout/fixed-grid-lots-of-stretched-data
3220
3221         No new tests required as there is no change in functionality.
3222
3223         * rendering/RenderGrid.cpp:
3224         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3225         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
3226         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
3227         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
3228         * rendering/RenderGrid.h:
3229
3230 2015-10-08  Chris Dumez  <cdumez@apple.com>
3231
3232         Unreviewed, build fix for ENABLE(MEDIA_SESSION) after r190030.
3233
3234         * dom/Document.cpp:
3235         (WebCore::Document::updateIsPlayingMedia):
3236
3237 2015-10-08  Chris Dumez  <cdumez@apple.com>
3238
3239         Unreviewed, build fixes for ENABLE(MEDIA_SESSION) after r190030.
3240
3241         * Modules/mediasession/HTMLMediaElementMediaSession.cpp:
3242         (WebCore::HTMLMediaElementMediaSession::session):
3243         * Modules/mediasession/HTMLMediaElementMediaSession.h:
3244         * Modules/mediasession/MediaSession.cpp:
3245         (WebCore::MediaSession::controls):
3246         * Modules/mediasession/MediaSession.h:
3247
3248 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
3249
3250         Gracefully handle XMLDocumentParser being detached by mutation events.
3251         https://bugs.webkit.org/show_bug.cgi?id=149485
3252         <rdar://problem/22811489>
3253
3254         This is a merge of Blink change 200026,
3255         https://codereview.chromium.org/1267283002
3256
3257         Reviewed by Darin Adler.
3258
3259         Test: fast/parser/xhtml-dom-character-data-modified-crash.html
3260
3261         * xml/parser/XMLDocumentParser.cpp:
3262         (WebCore::XMLDocumentParser::createLeafTextNode):
3263         Renamed from enterText() to make it more descriptive. 
3264
3265         (WebCore::XMLDocumentParser::updateLeafTextNode):
3266         Renamed from exitText to firm up this stage.
3267
3268         (WebCore::XMLDocumentParser::end):
3269         Gracefully handle stopped states.
3270
3271         (WebCore::XMLDocumentParser::enterText): Deleted.
3272         (WebCore::XMLDocumentParser::exitText): Deleted.
3273
3274         * xml/parser/XMLDocumentParser.h:
3275         Rename enterText to createLeafTextNode.
3276         Rename exitText to updateLeafTextNode.
3277
3278         * xml/parser/XMLDocumentParserLibxml2.cpp:
3279         (WebCore::XMLDocumentParser::startElementNs):
3280         (WebCore::XMLDocumentParser::endElementNs):
3281         (WebCore::XMLDocumentParser::characters):
3282         (WebCore::XMLDocumentParser::processingInstruction):
3283         (WebCore::XMLDocumentParser::cdataBlock):
3284         (WebCore::XMLDocumentParser::comment):
3285         (WebCore::XMLDocumentParser::endDocument):
3286         Rename function calls and firm up updateLeafTextNode stage accordingly.
3287
3288 2015-10-08  Chris Dumez  <cdumez@apple.com>
3289
3290         data: URLs should not be preloaded
3291         https://bugs.webkit.org/show_bug.cgi?id=149829
3292
3293         Reviewed by Darin Adler.
3294
3295         Fix review comments after r190605:
3296         Use protocolIs() instead of String::startsWith().
3297
3298         * html/parser/HTMLPreloadScanner.cpp:
3299         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
3300
3301 2015-10-08  Chris Dumez  <cdumez@apple.com>
3302
3303         Revert r187626 (and r188025) as it caused a PLT regression
3304         https://bugs.webkit.org/show_bug.cgi?id=149898
3305         <rdar://problem/22657123>
3306
3307         Reviewed by Myles Maxfield.
3308
3309         * css/CSSPropertyNames.in:
3310         * css/StyleBuilderCustom.h:
3311         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
3312         * platform/graphics/Font.cpp:
3313         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
3314         (WebCore::CharacterFallbackMapKey::operator==):
3315         (WebCore::CharacterFallbackMapKeyHash::hash):
3316         (WebCore::Font::systemFallbackFontForCharacter):
3317         * platform/graphics/FontCache.h:
3318         (WebCore::FontDescriptionKey::operator==):
3319         (WebCore::FontDescriptionKey::FontDescriptionKey): Deleted.
3320         (WebCore::FontDescriptionKey::computeHash): Deleted.
3321         * platform/graphics/FontDescription.cpp:
3322         (WebCore::FontDescription::FontDescription):
3323         (WebCore::FontDescription::traitsMask): Deleted.
3324         (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
3325         * platform/graphics/FontDescription.h:
3326         (WebCore::FontDescription::setScript):
3327         (WebCore::FontDescription::operator==):
3328         (WebCore::FontDescription::setFeatureSettings): Deleted.
3329         (WebCore::FontCascadeDescription::initialVariantAlternates): Deleted.
3330         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3331         (WebCore::FontCache::systemFallbackForCharacters):
3332         * rendering/style/RenderStyle.cpp:
3333         (WebCore::RenderStyle::changeRequiresLayout):
3334         * rendering/style/RenderStyle.h:
3335         * rendering/style/StyleRareInheritedData.cpp:
3336         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3337         (WebCore::StyleRareInheritedData::operator==):
3338         * rendering/style/StyleRareInheritedData.h:
3339         * style/StyleResolveForDocument.cpp:
3340         (WebCore::Style::resolveForDocument):
3341
3342 2015-10-08  Andreas Kling  <akling@apple.com>
3343
3344         Generated frame tree names should be kept reasonably long.
3345         <https://webkit.org/b/149874>
3346
3347         Reviewed by Darin Adler.
3348
3349         Some clumsy advertising script is going around assigning JavaScript source code
3350         to the "name" attribute of iframes. This is causing WebKit to generate way too huge
3351         names for anonymous descendants of such iframes.
3352
3353         Previously, the generated name of an anonymous subframe would be its slash-separated
3354         path from the root frame, with the "name" attribute of each ancestor between the
3355         slashes, or "<!--frame${index in parent}-->" for anonymous ancestors.
3356
3357         These ad scripts are often over 100kB in size, with multiple subframes, so we'd end
3358         up with frame names looking like this:
3359
3360         "<!--framePath //<MONSTER BLOB OF JAVASCRIPT FROM HELL>/<!--frame0--><!--frame0-->-->"
3361
3362         While this is worth fixing for the memory usage alone, we've been making it way
3363         worse by also using these paths when recording the back/forward history parts of
3364         WebKit session state.
3365
3366         This patch makes generated paths always use index-in-parent as the "directory name"
3367         for ancestors of anonymous subframes. The above example path will now instead be:
3368
3369         "<!--framePath //<!--frame0-->/<!--frame0-->/<!--frame0-->-->"
3370
3371         Test: fast/frames/long-names-in-nested-subframes.html
3372
3373         * page/FrameTree.cpp:
3374         (WebCore::FrameTree::indexInParent):
3375         (WebCore::FrameTree::uniqueChildName):
3376         * page/FrameTree.h:
3377
3378 2015-10-08  Commit Queue  <commit-queue@webkit.org>
3379
3380         Unreviewed, rolling out r190701.
3381         https://bugs.webkit.org/show_bug.cgi?id=149937
3382
3383         "It did not help, will try a full roll out instead" (Requested
3384         by cdumez on #webkit).
3385
3386         Reverted changeset:
3387
3388         "Partial revert of r187626 as it caused a PLT regression"
3389         https://bugs.webkit.org/show_bug.cgi?id=149898
3390         http://trac.webkit.org/changeset/190701
3391
3392 2015-10-08  Zalan Bujtas  <zalan@apple.com>
3393
3394         Fallback to the RenderView when repaint container is null.
3395         https://bugs.webkit.org/show_bug.cgi?id=149903
3396
3397         Reviewed by Simon Fraser.
3398
3399         Reduces code complexity at the calling sites.
3400
3401         No change in functionality.
3402
3403         * rendering/RenderObject.cpp:
3404         (WebCore::RenderObject::repaintUsingContainer):
3405         (WebCore::RenderObject::repaint):
3406         (WebCore::RenderObject::repaintRectangle):
3407
3408 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
3409
3410         Add NULL check for renderBox::layer() on applying zoom level change
3411         https://bugs.webkit.org/show_bug.cgi?id=149302
3412         <rdar://problem/22747292>
3413
3414         Reviewed by Darin Adler.
3415
3416         Test: fast/css/zoom-on-nested-scroll-crash.html
3417
3418         This is a merge of Blink r158238:
3419         https://chromiumcodereview.appspot.com/23526081
3420
3421         * rendering/RenderBox.cpp:
3422         (WebCore::RenderBox::styleDidChange):
3423
3424 2015-10-08  Brady Eidson  <beidson@apple.com>
3425
3426         Update Inspector to only work with Legacy IDB (for now).
3427         https://bugs.webkit.org/show_bug.cgi?id=149928.
3428
3429         Reviewed by Tim Horton.
3430
3431         * Modules/indexeddb/IDBAny.h:
3432         (WebCore::IDBAny::isLegacy):
3433         
3434         * Modules/indexeddb/legacy/LegacyAny.h:
3435         * inspector/InspectorIndexedDBAgent.cpp:
3436
3437 2015-10-08  Antti Koivisto  <antti@apple.com>
3438
3439         CrashTracer: [USER] com.apple.WebKit.WebContent at …Core::S