1 2017-07-22 Dan Bernstein <mitz@apple.com>
3 Fixed building for macOS 10.12 with the macOS 10.13 SDK after r219644.
5 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
6 (WebCore::CDMSessionAVStreamSession::update): Suppress the objc-literal-conversion warning
7 in one place where we are calling a class method on a Class and the compiler can’t tell
8 which class it is, so it chooses wrong and emits a warning.
10 2017-07-22 Chris Dumez <cdumez@apple.com>
12 Merge ExceptionBase into DOMException and drop custom toString
13 https://bugs.webkit.org/show_bug.cgi?id=174755
15 Reviewed by Sam Weinig.
17 Merge ExceptionBase into DOMException and drop custom toString, now that DOMException
18 is the only remaining exception type.
21 * Modules/mediastream/MediaStream.h:
22 * WebCore.xcodeproj/project.pbxproj:
23 * bindings/js/JSDOMExceptionHandling.cpp:
24 (WebCore::retrieveErrorMessage):
25 * dom/DOMAllInOne.cpp:
26 * dom/DOMException.cpp:
27 (WebCore::DOMException::DOMException):
28 (WebCore::DOMException::initializeDescription):
30 (WebCore::DOMException::code):
31 (WebCore::DOMException::name):
32 (WebCore::DOMException::message):
33 * dom/ExceptionBase.cpp: Removed.
34 * dom/ExceptionBase.h: Removed.
36 2017-07-14 Filip Pizlo <fpizlo@apple.com>
38 It should be easy to decide how WebKit yields
39 https://bugs.webkit.org/show_bug.cgi?id=174298
41 Reviewed by Saam Barati.
43 No new tests because the WebCore change is just a change to how we #include things.
45 * inspector/InspectorPageAgent.h:
46 * inspector/TimelineRecordFactory.h:
48 * workers/WorkerGlobalScopeProxy.h:
49 * workers/WorkerMessagingProxy.h:
51 2017-07-22 Said Abou-Hallawa <sabouhallawa@apple.com>
53 REGRESSION(r219045): A partially loaded image may not be repainted when its complete frame finishes decoding
54 https://bugs.webkit.org/show_bug.cgi?id=174230
56 Reviewed by Simon Fraser.
58 Because of r219045, we now only repaint the CachedImageClinets which tried
59 to draw the image but they could not because they have to wait for the image
60 decoding to finish. This was done by keeping a HashSet of these clients
61 and make CachedImage own it. This HashSet is cleared once the image frame
62 finishes decoding and all the waited clients are repainted.
64 But Multiple asynchronous image decoding requests are allowed for the same
65 frame if new data is added to the image source. If we tried to draw the
66 same image twice before it finishes decoding the first request, we will
67 not be to record this second request since the HashSet will not add the
68 same client twice. When he second request finishes decoding, CachedImage
69 will not repaint any client since its HashSet is empty.
71 To fix this problem we can do the following. When an image frame finishes
72 decoding, CachedImage will keep its HashSet of pending drawing clients as
73 long as the image frame is a partially loaded frame.
75 * loader/cache/CachedImage.cpp:
76 (WebCore::CachedImage::CachedImageObserver::imageFrameAvailable):
77 (WebCore::CachedImage::imageFrameAvailable):
78 * loader/cache/CachedImage.h:
79 * platform/graphics/BitmapImage.cpp:
80 (WebCore::BitmapImage::destroyDecodedData):
81 (WebCore::BitmapImage::dataChanged):
82 (WebCore::BitmapImage::setCurrentFrameDecodingStatusIfNecessary):
83 (WebCore::BitmapImage::draw):
84 (WebCore::BitmapImage::internalStartAnimation):
85 (WebCore::BitmapImage::internalAdvanceAnimation):
86 (WebCore::BitmapImage::imageFrameAvailableAtIndex):
87 * platform/graphics/BitmapImage.h:
88 * platform/graphics/ImageFrame.cpp:
89 (WebCore::ImageFrame::decodingStatus):
90 * platform/graphics/ImageFrame.h: Move DecodingStatus out of this class
91 to ImageTypes.h to avoid adding other header files to ImageObvsever.h
92 * platform/graphics/ImageFrameCache.cpp:
93 (WebCore::ImageFrameCache::setNativeImage):
94 (WebCore::ImageFrameCache::cacheMetadataAtIndex):
95 (WebCore::ImageFrameCache::cacheNativeImageAtIndex):
96 (WebCore::ImageFrameCache::cacheNativeImageAtIndexAsync):
97 (WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
98 (WebCore::ImageFrameCache::frameDecodingStatusAtIndex):
99 * platform/graphics/ImageFrameCache.h:
100 * platform/graphics/ImageObserver.h:
101 * platform/graphics/ImageSource.h:
102 (WebCore::ImageSource::frameDecodingStatusAtIndex):
103 * platform/graphics/ImageTypes.h:
104 * platform/image-decoders/bmp/BMPImageReader.cpp:
105 (WebCore::BMPImageReader::decodeBMP):
106 * platform/image-decoders/gif/GIFImageDecoder.cpp:
107 (WebCore::GIFImageDecoder::frameComplete):
108 (WebCore::GIFImageDecoder::initFrameBuffer):
109 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
110 (WebCore::JPEGImageDecoder::outputScanlines):
111 (WebCore::JPEGImageDecoder::jpegComplete):
112 * platform/image-decoders/png/PNGImageDecoder.cpp:
113 (WebCore::PNGImageDecoder::rowAvailable):
114 (WebCore::PNGImageDecoder::pngComplete):
115 (WebCore::PNGImageDecoder::frameComplete):
116 * platform/image-decoders/webp/WEBPImageDecoder.cpp:
117 (WebCore::WEBPImageDecoder::decode):
118 * rendering/RenderBoxModelObject.cpp:
119 (WebCore::RenderBoxModelObject::decodingModeForImageDraw):
121 2017-07-22 Timothy Horton <timothy_horton@apple.com>
123 Drag and Drop preview image for Twitter link is the wrong shape
124 https://bugs.webkit.org/show_bug.cgi?id=174731
125 <rdar://problem/33335616>
128 (WebCore::Range::absoluteRectsForRangeInText):
129 * page/TextIndicator.cpp:
130 (WebCore::initializeIndicator):
131 Apply some post-landing review feedback for r219756.
133 2017-07-21 Chris Dumez <cdumez@apple.com>
135 Drop IDBDatabaseException class
136 https://bugs.webkit.org/show_bug.cgi?id=174743
138 Reviewed by Darin Adler.
140 Drop IDBDatabaseException class and use DOMException directly. IDBDatabaseException was
141 only an internal concept and was already exposed to the Web as a DOMException. This
142 simplifies the code a bit and will allow for further simplification in a follow-up patch.
144 No new tests, no Web-facing behavior change, except for some exception messages
145 being slightly different.
148 * Modules/indexeddb/IDBCursor.cpp:
149 (WebCore::IDBCursor::update):
150 (WebCore::IDBCursor::advance):
151 (WebCore::IDBCursor::continuePrimaryKey):
152 (WebCore::IDBCursor::continueFunction):
153 (WebCore::IDBCursor::deleteFunction):
154 * Modules/indexeddb/IDBDatabase.cpp:
155 (WebCore::IDBDatabase::createObjectStore):
156 (WebCore::IDBDatabase::transaction):
157 (WebCore::IDBDatabase::deleteObjectStore):
158 * Modules/indexeddb/IDBDatabaseError.h: Removed.
159 * Modules/indexeddb/IDBDatabaseException.cpp: Removed.
160 * Modules/indexeddb/IDBDatabaseException.h: Removed.
161 * Modules/indexeddb/IDBFactory.cpp:
162 (WebCore::IDBFactory::cmp):
163 * Modules/indexeddb/IDBIndex.cpp:
164 (WebCore::IDBIndex::setName):
165 (WebCore::IDBIndex::openCursor):
166 (WebCore::IDBIndex::openKeyCursor):
167 (WebCore::IDBIndex::count):
168 (WebCore::IDBIndex::doCount):
169 (WebCore::IDBIndex::get):
170 (WebCore::IDBIndex::doGet):
171 (WebCore::IDBIndex::getKey):
172 (WebCore::IDBIndex::doGetKey):
173 (WebCore::IDBIndex::getAll):
174 (WebCore::IDBIndex::getAllKeys):
175 * Modules/indexeddb/IDBKeyRange.cpp:
176 (WebCore::IDBKeyRange::only):
177 (WebCore::IDBKeyRange::lowerBound):
178 (WebCore::IDBKeyRange::upperBound):
179 (WebCore::IDBKeyRange::bound):
180 (WebCore::IDBKeyRange::includes):
181 * Modules/indexeddb/IDBObjectStore.cpp:
182 (WebCore::IDBObjectStore::setName):
183 (WebCore::IDBObjectStore::openCursor):
184 (WebCore::IDBObjectStore::openKeyCursor):
185 (WebCore::IDBObjectStore::get):
186 (WebCore::IDBObjectStore::getKey):
187 (WebCore::IDBObjectStore::putOrAdd):
188 (WebCore::IDBObjectStore::doDelete):
189 (WebCore::IDBObjectStore::deleteFunction):
190 (WebCore::IDBObjectStore::clear):
191 (WebCore::IDBObjectStore::createIndex):
192 (WebCore::IDBObjectStore::index):
193 (WebCore::IDBObjectStore::deleteIndex):
194 (WebCore::IDBObjectStore::count):
195 (WebCore::IDBObjectStore::doCount):
196 (WebCore::IDBObjectStore::getAll):
197 (WebCore::IDBObjectStore::getAllKeys):
198 * Modules/indexeddb/IDBOpenDBRequest.cpp:
199 (WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
200 * Modules/indexeddb/IDBRequest.cpp:
201 (WebCore::IDBRequest::result):
202 (WebCore::IDBRequest::error):
203 (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
204 * Modules/indexeddb/IDBTransaction.cpp:
205 (WebCore::IDBTransaction::objectStore):
206 (WebCore::IDBTransaction::abort):
207 (WebCore::IDBTransaction::abortOnServerAndCancelRequests):
208 (WebCore::IDBTransaction::didCreateIndexOnServer):
209 (WebCore::IDBTransaction::putOrAddOnServer):
210 * Modules/indexeddb/server/IndexValueStore.cpp:
211 (WebCore::IDBServer::IndexValueStore::addRecord):
212 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
213 (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
214 (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
215 (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
216 (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
217 (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
218 (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
219 (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
220 (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
221 (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
222 (WebCore::IDBServer::MemoryIDBBackingStore::renameIndex):
223 (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
224 (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
225 (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
226 (WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords):
227 (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
228 (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
229 (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber):
230 (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
231 (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
232 * Modules/indexeddb/server/MemoryIndex.cpp:
233 (WebCore::IDBServer::MemoryIndex::putIndexKey):
234 * Modules/indexeddb/server/MemoryObjectStore.cpp:
235 (WebCore::IDBServer::MemoryObjectStore::createIndex):
236 (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
237 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
238 (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
239 (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
240 (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
241 (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
242 (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
243 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
244 (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
245 (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
246 (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
247 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
248 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
249 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
250 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
251 (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
252 (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
253 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords):
254 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
255 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
256 (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
257 (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
258 (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
259 (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
260 (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
261 (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
262 (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
263 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
264 (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
265 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
266 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
267 (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
268 (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
269 (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
270 (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
271 (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
272 * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
273 (WebCore::IDBServer::SQLiteIDBTransaction::begin):
274 (WebCore::IDBServer::SQLiteIDBTransaction::commit):
275 (WebCore::IDBServer::SQLiteIDBTransaction::abort):
276 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
277 (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
278 (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
279 (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
280 (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
281 (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
282 (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
283 (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
284 (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
285 * Modules/indexeddb/shared/IDBError.cpp:
286 (WebCore::IDBError::name):
287 (WebCore::IDBError::message):
288 (WebCore::IDBError::toDOMError):
289 * Modules/indexeddb/shared/IDBError.h:
290 (WebCore::IDBError::userDeleteError):
291 (WebCore::IDBError::isNull):
292 * WebCore.xcodeproj/project.pbxproj:
293 * bindings/js/JSDOMExceptionHandling.cpp:
294 (WebCore::createDOMException):
296 * dom/DOMException.cpp:
297 (WebCore::DOMException::initializeDescription):
298 Initialize description->code from using the actual error codes in the
299 coreExceptions table, instead of initializing it using |ec|. |ec| is
300 the index in the ExceptionCode enumeration and it matches the error
301 code only for legacy exceptions. New exceptions such as DataError
302 should have a code of 0. Without this change, w3c for IDB would start
305 * dom/ExceptionCodeDescription.cpp:
306 (WebCore::ExceptionCodeDescription::ExceptionCodeDescription):
307 * dom/ExceptionCodeDescription.h:
309 2017-07-21 Sam Weinig <sam@webkit.org>
311 [WebIDL] Simplify XMLHttpRequest bindings by removing built-ins
312 https://bugs.webkit.org/show_bug.cgi?id=174740
314 Reviewed by Chris Dumez.
316 The behavior we were getting from XMLHttpRequest.js can be implemented
317 with the [CachedAttribute] extended attribute. This reduces the number
318 of JS -> C++ jumps required and makes the code more similar to other
319 bindings that need caching of an IDL any value.
322 * DerivedSources.make:
323 * xml/XMLHttpRequest.js: Removed.
324 Remove XMLHttpRequest.js.
326 * bindings/js/JSXMLHttpRequestCustom.cpp:
327 (WebCore::JSXMLHttpRequest::response):
328 (WebCore::JSXMLHttpRequest::retrieveResponse): Deleted.
329 * xml/XMLHttpRequest.idl:
330 Replace builtin with a [CachedAttribute] and [CustomGetter]
331 for the response property.
333 2017-07-21 Timothy Horton <timothy_horton@apple.com>
335 Drag and Drop preview image for Twitter link is the wrong shape
336 https://bugs.webkit.org/show_bug.cgi?id=174731
337 <rdar://problem/33335616>
339 Reviewed by Zalan Bujtas.
341 TextIndicator uses Range::borderAndTextQuads and ::absoluteTextRects
342 in order to get the rects of the indicated text. Currently, these
343 functions do not respect clipping, so clipped-out text (e.g. as seen
344 inside links on Twitter) generates lots of meaningless indicated rects.
346 * page/TextIndicator.cpp:
347 (WebCore::estimatedBackgroundColorForRange):
348 (WebCore::hasAnyIllegibleColors):
349 Change adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary
350 to instead be hasAnyIllegibleColors, and referred to in the same place
351 as hasNonInlineOrReplacedElements, so that it follows the same
352 upgrade path (leaving textRects empty, so that it is later filled in
353 with the absoluteBoundingRect). This was a mistake in r219033, which
354 instead would end up painting all content, but filling in textRects
355 with the actual individual text rects.
357 This alone changes the behavior on Twitter from lots of jagged misplaced
358 rects to a too-large bounding rect. Combined with the following changes,
359 the bounding rect is reduced to the right size:
361 (WebCore::initializeIndicator):
362 Adopt the new Range::borderAndTextQuads and ::absoluteTextRects parameter
363 and opt-in to respecting clipping for text rects.
365 * dom/DOMRectList.cpp:
366 (WebCore::DOMRectList::DOMRectList):
368 (WebCore::DOMRectList::create):
369 Add a DOMRectList constructor and create() that take FloatRects, similar
370 to the one that takes FloatQuads, but without the boundingRect() calls.
374 (WebCore::Document::convertAbsoluteToClientRects):
375 Add convertAbsoluteToClientRects, similar to covertAbsoluteToClientQuads,
376 except acting on rects instead of quads.
379 (WebCore::Range::absoluteRectsForRangeInText):
380 (WebCore::Range::absoluteTextRects):
381 (WebCore::Range::getClientRects):
382 (WebCore::Range::borderAndTextRects):
383 (WebCore::Range::boundingRect):
384 (WebCore::Range::absoluteBoundingRect):
385 (WebCore::Range::borderAndTextQuads): Deleted.
387 Replace borderAndTextQuads with borderAndTextRects, because all callers
388 just ended up calling boundingBox() on the quads.
390 Factor absoluteRectsForRangeInText out of absoluteTextRects and
391 borderAndTextQuads, and teach it to optionally intersect the text rects
392 with their renderer's absoluteClippedOverflowRect.
394 2017-07-21 Per Arne Vollan <pvollan@apple.com>
396 Round-tripping stroke-width styles through getComputedStyle cause the text to gain a stroke.
397 https://bugs.webkit.org/show_bug.cgi?id=174701
398 <rdar://problem/32903679>
400 Reviewed by Simon Fraser.
402 The initial value of stroke-color should be transparent, see https://www.w3.org/TR/fill-stroke-3/#stroke-color.
403 Also, there is no need to set the graphics context in text stroke mode, if the stroke color is not visible.
405 Test: fast/css/round-trip-stroke-width-using-computed-style.html
407 * rendering/TextPaintStyle.cpp:
408 (WebCore::updateGraphicsContext):
409 * rendering/style/RenderStyle.h:
410 (WebCore::RenderStyle::initialStrokeWidth):
411 (WebCore::RenderStyle::initialStrokeColor):
412 * rendering/style/StyleRareInheritedData.cpp:
413 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
415 2017-07-21 Timothy Horton <timothy_horton@apple.com>
417 Remove an inaccurate comment from RenderTextLineBoxes
419 * rendering/RenderTextLineBoxes.cpp:
420 (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
421 This comment has been wrong for at least 4 years.
423 2017-07-21 Timothy Horton <timothy_horton@apple.com>
425 TextIndicator::estimatedTextColorsForRange asserts inside HashSet code (inserting reserved value)
426 https://bugs.webkit.org/show_bug.cgi?id=174733
428 Reviewed by Wenson Hsieh.
430 * page/TextIndicator.cpp:
431 (WebCore::estimatedTextColorsForRange):
432 (WebCore::adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary):
433 RGBA32 isn't a valid hash key, because we have no traits that define the
434 empty or deleted values, nor do we have any bits we could feasibly
435 use -- the full range of RGBA32 is easy to reach with various colors.
437 Instead, hash Color directly.
439 2017-07-21 Nan Wang <n_wang@apple.com>
441 AX: Expose form validation on iOS as hint
442 https://bugs.webkit.org/show_bug.cgi?id=174722
443 <rdar://problem/33459761>
445 Reviewed by Chris Fleizach.
447 Adding the validation message to the hint of the form control element.
449 Test: accessibility/ios-simulator/form-control-validation-message.html
451 * accessibility/AccessibilityObject.cpp:
452 (WebCore::AccessibilityObject::isShowingValidationMessage):
453 (WebCore::AccessibilityObject::validationMessage):
454 * accessibility/AccessibilityObject.h:
455 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
456 (-[WebAccessibilityObjectWrapper accessibilityHint]):
457 (-[WebAccessibilityObjectWrapper accessibilityIsShowingValidationMessage]):
458 * html/HTMLFormControlElement.cpp:
459 (WebCore::HTMLFormControlElement::isShowingValidationMessage):
460 * html/HTMLFormControlElement.h:
462 2017-07-21 Konstantin Tokarev <annulen@yandex.ru>
464 [cmake][Mac] Unreviewed, fix linking WebKitSystemInterface
466 After r219560 link_directories() in PlatformXXX.cmake files does not
467 affect corresponding targets.
471 2017-07-21 Sam Weinig <sam@webkit.org>
473 [WebIDL] Remove the need for the side map of DeprecatedCSSOMValue roots
474 https://bugs.webkit.org/show_bug.cgi?id=174713
476 Reviewed by Andreas Kling.
478 We used to not want to bloat the size of CSSValues with a pointer to the
479 owner CSSStyleDeclaration, so, for GC purposes we need kept a mapping of
480 them on DOMWrapperWorld that only got set if a wrapper was made. Now that
481 we have DeprecatedCSSOMValue, a wrapper for CSSValue that only gets created
482 for the bindings, we no longer need the side table, and simply have the
483 DeprecatedCSSOMValue maintain a reference to the CSSStyleDeclaration.
485 * bindings/js/DOMWrapperWorld.h:
486 (WebCore::DOMWrapperWorld::wrappers):
487 Remove m_deprecatedCSSOMValueRoots and make m_wrappers private with a getter.
489 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
490 (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Deleted.
491 Remove custom implementation of getPropertyCSSValue, now that it no longer
492 needs to update m_deprecatedCSSOMValueRoots.
494 * bindings/js/JSDOMWindowBase.cpp:
495 (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
496 * bindings/js/JSDOMWrapperCache.h:
497 (WebCore::getCachedWrapper):
498 (WebCore::cacheWrapper):
499 (WebCore::uncacheWrapper):
500 * bindings/js/JSNodeCustom.cpp:
501 (WebCore::getOutOfLineCachedWrapper):
502 Use wrappers getter rather than direct member variable.
504 * bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
505 (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
506 Rather than checking the side table for roots, now get the root
507 via the reference CSSStyleDeclaration.
509 (WebCore::JSDeprecatedCSSOMValueOwner::finalize): Deleted.
510 Remove custom finalize now that we don't have to remove ourself
511 from m_deprecatedCSSOMValueRoots.
513 * css/CSSStyleDeclaration.idl:
514 Remove [Custom] from getPropertyCSSValue.
516 * css/DeprecatedCSSOMValue.idl:
517 Remove [JSCustomFinalize].
519 * css/CSSComputedStyleDeclaration.cpp:
520 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
521 * css/CSSImageValue.cpp:
522 (WebCore::CSSImageValue::createDeprecatedCSSOMWrapper):
523 * css/CSSImageValue.h:
524 * css/CSSPrimitiveValue.cpp:
525 (WebCore::CSSPrimitiveValue::createDeprecatedCSSOMPrimitiveWrapper):
526 * css/CSSPrimitiveValue.h:
527 * css/CSSStyleDeclaration.h:
529 (WebCore::CSSValue::createDeprecatedCSSOMWrapper):
531 * css/DeprecatedCSSOMCounter.h:
532 * css/DeprecatedCSSOMPrimitiveValue.cpp:
533 (WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue):
534 (WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue):
535 (WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue):
536 * css/DeprecatedCSSOMPrimitiveValue.h:
537 (WebCore::DeprecatedCSSOMPrimitiveValue::create):
538 (WebCore::DeprecatedCSSOMPrimitiveValue::DeprecatedCSSOMPrimitiveValue):
539 * css/DeprecatedCSSOMRGBColor.h:
540 * css/DeprecatedCSSOMRect.h:
541 * css/DeprecatedCSSOMValue.h:
542 (WebCore::DeprecatedCSSOMValue::owner):
543 (WebCore::DeprecatedCSSOMValue::DeprecatedCSSOMValue):
544 (WebCore::DeprecatedCSSOMComplexValue::create):
545 (WebCore::DeprecatedCSSOMComplexValue::DeprecatedCSSOMComplexValue):
546 * css/DeprecatedCSSOMValueList.h:
547 (WebCore::DeprecatedCSSOMValueList::create):
548 (WebCore::DeprecatedCSSOMValueList::DeprecatedCSSOMValueList):
549 * css/PropertySetCSSStyleDeclaration.cpp:
550 (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM):
551 * css/PropertySetCSSStyleDeclaration.h:
552 * svg/SVGElement.cpp:
553 (WebCore::SVGElement::getPresentationAttribute):
554 Pass owning CSSStyleDeclaration to DeprecatedCSSOMValue and derived classes.
556 2017-07-21 Andreas Kling <akling@apple.com>
558 Use more references in event dispatch code
559 https://bugs.webkit.org/show_bug.cgi?id=174681
561 Reviewed by Geoffrey Garen.
563 Make EventListener::handleEvent() take a ScriptExecutionContext&, Event&.
564 Then make everything build again. Various null checks and assertions
565 disappear in the process.
567 * bindings/js/JSErrorHandler.cpp:
568 (WebCore::JSErrorHandler::handleEvent):
569 * bindings/js/JSErrorHandler.h:
570 * bindings/js/JSEventListener.cpp:
571 (WebCore::JSEventListener::initializeJSFunction):
572 (WebCore::JSEventListener::handleEvent):
573 (WebCore::eventHandlerAttribute):
574 * bindings/js/JSEventListener.h:
575 (WebCore::JSEventListener::jsFunction):
576 * bindings/js/JSLazyEventListener.cpp:
577 (WebCore::JSLazyEventListener::initializeJSFunction):
578 * bindings/js/JSLazyEventListener.h:
579 * dom/EventListener.h:
580 * dom/EventTarget.cpp:
581 (WebCore::EventTarget::fireEventListeners):
582 * html/HTMLPlugInElement.cpp:
583 (WebCore::HTMLPlugInElement::defaultEventHandler):
584 * html/ImageDocument.cpp:
585 (WebCore::ImageEventListener::handleEvent):
586 * inspector/CommandLineAPIHost.cpp:
587 (WebCore::listenerEntriesFromListenerInfo):
588 * inspector/InspectorDOMAgent.cpp:
589 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
590 * inspector/InspectorIndexedDBAgent.cpp:
592 (WebCore::Widget::handleEvent):
593 * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
594 * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
595 (WebCore::WebPlaybackSessionModelMediaElement::handleEvent):
596 * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
597 * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
598 (WebVideoFullscreenModelVideoElement::handleEvent):
599 * svg/SVGTRefElement.cpp:
600 (WebCore::SVGTRefTargetEventListener::handleEvent):
601 * svg/animation/SVGSMILElement.cpp:
602 (WebCore::ConditionEventListener::handleEvent):
603 (WebCore::SVGSMILElement::handleConditionEvent):
604 * svg/animation/SVGSMILElement.h:
606 2017-07-21 Zalan Bujtas <zalan@apple.com>
608 iBooks: Overlapping/missing content at beginning/end of paragraph.
609 https://bugs.webkit.org/show_bug.cgi?id=174717
610 <rdar://problem/33117912>
612 Reviewed by Simon Fraser.
614 By definiton simple and normal line layout should always produce the exact same lineboxes. It enables us not
615 to force repaint while swapping between these 2 line layouts.
616 However in certain cases (font size pixel rounding as an example) they don't agree on how much content fits the line and
617 that could result in missing/overlapping content due to the lack of repaint.
621 * rendering/RenderBlockFlow.cpp:
622 (WebCore::RenderBlockFlow::ensureLineBoxes):
624 2017-07-21 Chris Dumez <cdumez@apple.com>
626 Drop make_dom_exceptions.pl script that we only have DOMException
627 https://bugs.webkit.org/show_bug.cgi?id=174699
629 Reviewed by Darin Adler.
631 Drop make_dom_exceptions.pl script that we only have DOMException.
634 * DerivedSources.make:
635 * WebCore.xcodeproj/project.pbxproj:
636 * WebCoreMacros.cmake:
637 * bindings/js/JSDOMExceptionHandling.cpp:
638 * css/FontFaceSet.cpp:
639 * dom/DOMAllInOne.cpp:
640 * dom/DOMExceptions.in: Removed.
641 * dom/ExceptionCodeDescription.cpp: Added.
642 (WebCore::ExceptionCodeDescription::ExceptionCodeDescription):
643 * dom/ExceptionCodeDescription.h: Added.
644 * dom/make_dom_exceptions.pl: Removed.
645 * inspector/WebInjectedScriptHost.cpp:
646 (WebCore::WebInjectedScriptHost::subtype):
648 2017-07-21 Said Abou-Hallawa <sabouhallawa@apple.com>
650 [CG] An image should not invoke many system calls before confirming its format is supported
651 https://bugs.webkit.org/show_bug.cgi?id=174692
653 Reviewed by Tim Horton.
655 We should be careful when invoking system calls before confirming that the
656 image type is available and it is one of the whitelist formats. Otherwise
657 we will be calling the parsers of the unsupported formats.
659 * loader/cache/CachedImage.cpp:
660 (WebCore::CachedImage::setImageDataBuffer): The check isAllowedImageUTI()
661 is now done in ImageDecoder::encodedDataStatus() which will return Error
662 if there is an error in the data or "isAllowedImageUTI() returns false."
664 * platform/graphics/BitmapImage.cpp:
665 (WebCore::BitmapImage::dataChanged): Avoid calling canUseAsyncDecodingForLargeImages()
666 before confirming the image type is available and it's supported by WebKit.
667 canUseAsyncDecodingForLargeImages() tries to cache the first frame of the
668 image to know its size. Asking the ImageFrameCache to destroy its decoded
669 frames is not needed unless ImageFrameCache::decodedSize() is not zero.
671 * platform/graphics/cg/ImageDecoderCG.cpp:
672 (WebCore::ImageDecoder::encodedDataStatus): Avoid calling CGImageSourceGetStatus()
673 before knowing the UTI of the image. When knowing it, we call CGImageSourceGetStatus()
674 and if it returns kCGImageStatusIncomplete or kCGImageStatusComplete, we
675 check whether isAllowedImageUTI() or not. If isAllowedImageUTI() returns
676 false, return Error which will make the CachedImage cancel loading the
679 2017-07-21 Jeremy Jones <jeremyj@apple.com>
681 AudioTrackPrivateMediaStreamCocoa shouldn't set AudioSession::setPreferredBufferSize
682 https://bugs.webkit.org/show_bug.cgi?id=174707
683 rdar://problem/33446809
685 Reviewed by Eric Carlson.
687 Manually tested for audio side effects.
689 AudioChannel::copyFrom fails when AudioChannel lengths don't match.
691 This happens because PlatformMediaSessionManager::updateSessionState() owns and sets
692 AudioSession::setPreferredBufferSize().
694 However, AudioTrackPrivateMediaStreamCocoa::createAudioUnit, when it creates an input
695 audio unit is setting AudioSession::setPreferredBufferSize() directly to its own arbitrary value.
697 AudioSession::setPreferredBufferSize() should be managed by the higher level
698 PlatformMediaSessionManager, and not modified by audio unit creation, in order to keep harmony
699 within the audio pipeline.
701 * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
702 (WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit):
704 2017-07-21 Jeremy Jones <jeremyj@apple.com>
706 Noise when AudioChannel lengths don't match.
707 https://bugs.webkit.org/show_bug.cgi?id=174706
708 rdar://problem/33389856
710 Reviewed by Eric Carlson.
712 When AudioChannel lengths don't match, copyFrom() returns early leaving uninitialized data in the audio buffer.
713 This change zeros out the data, so there isn't objectionable noise sent to the speaker.
715 * platform/audio/AudioChannel.cpp:
716 (WebCore::AudioChannel::copyFrom):
718 2017-07-21 Sam Weinig <sam@webkit.org>
720 [WebIDL] Make a few parameters non-nullable in inspector IDL files
721 https://bugs.webkit.org/show_bug.cgi?id=174719
723 Reviewed by Joseph Pecoraro.
725 * inspector/CommandLineAPIHost.cpp:
726 (WebCore::CommandLineAPIHost::databaseId):
727 (WebCore::CommandLineAPIHost::storageId):
728 * inspector/CommandLineAPIHost.h:
729 * inspector/CommandLineAPIHost.idl:
730 * inspector/InspectorDOMStorageAgent.cpp:
731 (WebCore::InspectorDOMStorageAgent::storageId):
732 * inspector/InspectorDOMStorageAgent.h:
733 * inspector/InspectorDatabaseAgent.cpp:
734 (WebCore::InspectorDatabaseAgent::databaseId):
735 * inspector/InspectorDatabaseAgent.h:
736 * inspector/InspectorFrontendHost.cpp:
737 (WebCore::InspectorFrontendHost::showContextMenu):
738 (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
739 * inspector/InspectorFrontendHost.h:
740 * inspector/InspectorFrontendHost.idl:
741 Remove nullability from arguments that should never be null.
743 2017-07-21 Brady Eidson <beidson@apple.com>
745 Get rid of WebCore IconDatabase code.
746 https://bugs.webkit.org/show_bug.cgi?id=174700
748 Reviewed by Tim Horton.
750 No new tests (No behavior change).
754 No further explanation.
757 * WebCore.xcodeproj/project.pbxproj:
759 (WebCore::Document::implicitClose):
760 * history/HistoryItem.cpp:
761 (WebCore::HistoryItem::HistoryItem):
762 (WebCore::HistoryItem::~HistoryItem):
763 (WebCore::HistoryItem::reset):
764 (WebCore::HistoryItem::setURLString):
765 * inspector/InspectorNetworkAgent.cpp:
766 (WebCore::InspectorNetworkAgent::willSendRequest):
767 * loader/DocumentLoader.cpp:
768 (WebCore::DocumentLoader::~DocumentLoader):
769 (WebCore::DocumentLoader::startIconLoading):
770 (WebCore::DocumentLoader::iconLoadDecisionAvailable): Deleted.
771 (WebCore::iconLoadDecisionCallback): Deleted.
772 (WebCore::DocumentLoader::getIconLoadDecisionForIconURL): Deleted.
773 (WebCore::DocumentLoader::continueIconLoadWithDecision): Deleted.
774 (WebCore::iconDataCallback): Deleted.
775 (WebCore::DocumentLoader::getIconDataForIconURL): Deleted.
776 * loader/DocumentLoader.h:
777 (WebCore::DocumentLoader::linkIcons):
778 * loader/FrameLoader.cpp:
779 (WebCore::FrameLoader::FrameLoader):
780 (WebCore::FrameLoader::stop):
781 * loader/FrameLoader.h:
782 (WebCore::FrameLoader::subframeLoader):
783 (WebCore::FrameLoader::icon): Deleted.
784 * loader/FrameLoaderClient.h:
785 * loader/archive/cf/LegacyWebArchive.cpp:
786 (WebCore::LegacyWebArchive::create):
787 * loader/icon/IconController.cpp: Removed.
788 * loader/icon/IconController.h: Removed.
789 * loader/icon/IconDatabase.cpp: Removed.
790 * loader/icon/IconDatabase.h: Removed.
791 * loader/icon/IconDatabaseBase.cpp: Removed.
792 * loader/icon/IconDatabaseBase.h: Removed.
793 * loader/icon/IconDatabaseClient.h: Removed.
794 * loader/icon/IconLoader.cpp:
795 (WebCore::IconLoader::IconLoader):
796 (WebCore::IconLoader::startLoading):
797 (WebCore::IconLoader::notifyFinished):
798 * loader/icon/IconLoader.h:
799 * loader/icon/IconRecord.cpp: Removed.
800 * loader/icon/IconRecord.h: Removed.
801 * loader/icon/PageURLRecord.cpp: Removed.
802 * loader/icon/PageURLRecord.h: Removed.
803 * testing/Internals.cpp:
804 (WebCore::Internals::shortcutIconURLs):
806 2017-07-21 Chris Dumez <cdumez@apple.com>
808 Rename DOMCoreException class to DOMException
809 https://bugs.webkit.org/show_bug.cgi?id=174698
811 Reviewed by Darin Adler.
813 Rename DOMCoreException class to DOMException to match its Web-exposed name.
816 * DerivedSources.cpp:
817 * DerivedSources.make:
818 * Modules/quota/StorageErrorCallback.cpp:
819 (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
820 * Modules/quota/StorageErrorCallback.h:
821 * Modules/quota/StorageErrorCallback.idl:
822 * WebCore.xcodeproj/project.pbxproj:
823 * bindings/js/JSDOMExceptionHandling.cpp:
824 (WebCore::retrieveErrorMessage):
825 (WebCore::createDOMException):
826 * bindings/scripts/CodeGeneratorJS.pm:
827 (GenerateOverloadDispatcher):
828 * css/FontFaceSet.cpp:
830 * dom/DOMAllInOne.cpp:
831 * dom/DOMException.cpp: Renamed from Source/WebCore/dom/DOMCoreException.cpp.
832 (WebCore::DOMException::create):
833 (WebCore::DOMException::DOMException):
834 (WebCore::DOMException::initializeDescription):
835 * dom/DOMException.h: Renamed from Source/WebCore/dom/DOMCoreException.h.
836 (WebCore::DOMException::create):
837 (WebCore::DOMException::DOMException):
838 * dom/DOMException.idl: Renamed from Source/WebCore/dom/DOMCoreException.idl.
839 * dom/DOMExceptions.in:
840 * dom/make_dom_exceptions.pl:
841 (generateImplementation):
843 2017-07-21 Sam Weinig <sam@webkit.org>
845 Follow up to https://bugs.webkit.org/show_bug.cgi?id=174659.
847 * inspector/InspectorFrontendHost.idl:
848 Remove unnecessary JSGenerateToJSObject noticed in review.
850 2017-07-20 Chris Dumez <cdumez@apple.com>
852 Drop legacy SVGException type
853 https://bugs.webkit.org/show_bug.cgi?id=174695
855 Reviewed by Darin Adler.
857 Drop legacy SVGException type and use DOMException instead, as per the latest
858 SVG specification. Both Chrome and Firefox no longer expose the SVGException
862 * DerivedSources.cpp:
863 * DerivedSources.make:
864 * WebCore.xcodeproj/project.pbxproj:
865 * bindings/js/JSDOMExceptionHandling.cpp:
866 (WebCore::createDOMException):
867 * bindings/js/JSExceptionBase.cpp:
868 (WebCore::toExceptionBase):
869 * dom/DOMExceptions.in:
870 * svg/SVGAllInOne.cpp:
871 * svg/SVGCircleElement.cpp:
872 * svg/SVGException.cpp: Removed.
873 * svg/SVGException.h: Removed.
874 * svg/SVGException.idl: Removed.
875 * svg/SVGGraphicsElement.idl:
876 * svg/SVGLocatable.cpp:
877 (WebCore::SVGLocatable::getTransformToElement):
878 * svg/SVGMatrixValue.h:
879 * svg/SVGPathSegList.cpp:
880 (WebCore::SVGPathSegList::getItem):
881 (WebCore::SVGPathSegList::replaceItem):
882 (WebCore::SVGPathSegList::removeItem):
883 * svg/SVGPathSegList.h:
884 * svg/SVGPathSegList.idl:
885 * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
886 * svg/properties/SVGListProperty.h:
888 2017-07-20 Chris Dumez <cdumez@apple.com>
890 Hook up ITP quirks to the needsSiteSpecificQuirks setting
891 https://bugs.webkit.org/show_bug.cgi?id=174691
893 Reviewed by Darin Adler.
895 Hook up ITP quirks to the needsSiteSpecificQuirks setting to make it easier for
896 Web-developers to test their fixes.
898 * loader/ResourceLoadObserver.cpp:
899 (WebCore::shouldEnableSiteSpecificQuirks):
900 (WebCore::areDomainsAssociated):
901 (WebCore::ResourceLoadObserver::logFrameNavigation):
902 (WebCore::resourceNeedsSSOQuirk):
903 (WebCore::ResourceLoadObserver::logSubresourceLoading):
904 (WebCore::ResourceLoadObserver::logWebSocketLoading):
906 2017-07-20 Matt Lewis <jlewis3@apple.com>
908 Unreviewed, rolling out r219700.
910 This revision caused consistent timouts on iOS.
914 "Turn tests at media/modern-media-controls/start-support back
916 https://bugs.webkit.org/show_bug.cgi?id=174683
917 http://trac.webkit.org/changeset/219700
919 2017-07-20 David Quesada <david_quesada@apple.com>
921 Add SPI to notify WKNavigationDelegate about client redirects
922 https://bugs.webkit.org/show_bug.cgi?id=174680
923 rdar://problem/33184886
925 Reviewed by Brady Eidson.
927 * loader/FrameLoader.cpp:
928 (WebCore::FrameLoader::performClientRedirect):
929 * loader/FrameLoader.h:
930 Add a convenience method for NavigationScheduler that handles a FrameLoadRequest
931 as a client redirect. Currently this means loading the request and informing the
934 * loader/FrameLoaderClient.h:
935 Add FrameLoaderClient::dispatchDidPerformClientRedirect() to inform the client when
936 a client redirect occurs.
938 * loader/NavigationScheduler.cpp:
939 Removed ScheduledURLNavigation::fire(). This class was never instantiated directly,
940 and all subclasses override fire(), so this was unused code.
941 For ScheduledRedirects and ScheduledLocationChange, use FrameLoader's new method to
942 load the request as a client redirect.
944 2017-07-20 Chris Dumez <cdumez@apple.com>
946 Drop legacy XPathException type
947 https://bugs.webkit.org/show_bug.cgi?id=174679
949 Reviewed by Sam Weinig.
951 Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
952 no longer expose XPathException.
954 Test: fast/dom/DOMException/XPathException-obsolete.html
957 * DerivedSources.cpp:
958 * DerivedSources.make:
959 * WebCore.xcodeproj/project.pbxproj:
960 * bindings/js/JSDOMExceptionHandling.cpp:
961 (WebCore::createDOMException):
962 * bindings/js/JSExceptionBase.cpp:
963 (WebCore::toExceptionBase):
964 * dom/DOMExceptions.in:
965 * xml/XPathException.cpp: Removed.
966 * xml/XPathException.h: Removed.
967 * xml/XPathException.idl: Removed.
968 * xml/XPathExpression.cpp:
969 (WebCore::XPathExpression::evaluate):
970 * xml/XPathParser.cpp:
971 (WebCore::XPath::Parser::parseStatement):
972 * xml/XPathResult.cpp:
973 (WebCore::XPathResult::convertTo):
974 (WebCore::XPathResult::numberValue):
975 (WebCore::XPathResult::stringValue):
976 (WebCore::XPathResult::booleanValue):
977 (WebCore::XPathResult::singleNodeValue):
978 (WebCore::XPathResult::snapshotLength):
979 (WebCore::XPathResult::iterateNext):
980 (WebCore::XPathResult::snapshotItem):
982 2017-07-20 Chris Dumez <cdumez@apple.com>
984 Unreviewed, rolling out r219706.
990 "Drop legacy XPathException type"
991 https://bugs.webkit.org/show_bug.cgi?id=174679
992 http://trac.webkit.org/changeset/219706
994 2017-07-20 Chris Dumez <cdumez@apple.com>
996 Drop legacy XPathException type
997 https://bugs.webkit.org/show_bug.cgi?id=174679
999 Reviewed by Sam Weinig.
1001 Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
1002 no longer expose XPathException.
1004 Test: fast/dom/DOMException/XPathException-obsolete.html
1007 * DerivedSources.cpp:
1008 * DerivedSources.make:
1009 * WebCore.xcodeproj/project.pbxproj:
1010 * bindings/js/JSDOMExceptionHandling.cpp:
1011 (WebCore::createDOMException):
1012 * bindings/js/JSExceptionBase.cpp:
1013 (WebCore::toExceptionBase):
1014 * dom/DOMExceptions.in:
1015 * xml/XPathException.cpp: Removed.
1016 * xml/XPathException.h: Removed.
1017 * xml/XPathException.idl: Removed.
1018 * xml/XPathExpression.cpp:
1019 (WebCore::XPathExpression::evaluate):
1020 * xml/XPathParser.cpp:
1021 (WebCore::XPath::Parser::parseStatement):
1022 * xml/XPathResult.cpp:
1023 (WebCore::XPathResult::convertTo):
1024 (WebCore::XPathResult::numberValue):
1025 (WebCore::XPathResult::stringValue):
1026 (WebCore::XPathResult::booleanValue):
1027 (WebCore::XPathResult::singleNodeValue):
1028 (WebCore::XPathResult::snapshotLength):
1029 (WebCore::XPathResult::iterateNext):
1030 (WebCore::XPathResult::snapshotItem):
1032 2017-07-20 Chris Dumez <cdumez@apple.com>
1034 Regression(ITP): May get frequently logged out of wsj.com
1035 https://bugs.webkit.org/show_bug.cgi?id=174661
1036 <rdar://problem/32343256>
1038 Reviewed by Geoffrey Garen.
1040 Add the concept of associated domains in the ResourceLoadObserver. We
1041 previously ignore loads to and from the same domains. We now do the same
1042 if the to and from domains are associated (i.e. owned by the same entity).
1044 For now, only add domains owned by Dow Jones & Company, Inc. to the list,
1045 to address login issues on wsj.com.
1047 No new tests, verified manually on wsj.com.
1049 * loader/ResourceLoadObserver.cpp:
1050 (WebCore::areDomainsAssociated):
1051 (WebCore::ResourceLoadObserver::logFrameNavigation):
1052 (WebCore::ResourceLoadObserver::logSubresourceLoading):
1053 (WebCore::ResourceLoadObserver::logWebSocketLoading):
1055 2017-07-20 Chris Dumez <cdumez@apple.com>
1057 Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable
1058 https://bugs.webkit.org/show_bug.cgi?id=174660
1060 Reviewed by Geoffrey Garen.
1062 Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable.
1063 This essentially replaces a branch to figure out if the new size is less or greater than the
1064 current size by an assertion.
1066 * Modules/gamepad/Gamepad.cpp:
1067 (WebCore::Gamepad::Gamepad):
1068 * Modules/webaudio/AudioContext.cpp:
1069 (WebCore::AudioContext::addReaction):
1070 * Modules/websockets/WebSocketChannel.cpp:
1071 (WebCore::WebSocketChannel::skipBuffer):
1072 * Modules/websockets/WebSocketDeflater.cpp:
1073 (WebCore::WebSocketDeflater::finish):
1074 * contentextensions/ContentExtensionCompiler.cpp:
1075 (WebCore::ContentExtensions::serializeSelector):
1076 * contentextensions/DFABytecodeCompiler.cpp:
1077 (WebCore::ContentExtensions::append):
1078 * crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:
1079 (WebCore::gcryptEncrypt):
1080 (WebCore::gcryptDecrypt):
1081 * crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp:
1082 (WebCore::gcryptDerive):
1083 * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
1084 (WebCore::GameControllerGamepadProvider::controllerDidConnect):
1085 * platform/gamepad/mac/HIDGamepadProvider.cpp:
1086 (WebCore::HIDGamepadProvider::deviceAdded):
1087 * platform/graphics/ImageBackingStore.h:
1088 (WebCore::ImageBackingStore::setSize):
1089 * platform/graphics/WOFFFileFormat.cpp:
1090 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
1091 (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
1092 (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
1093 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1094 (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
1095 (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer):
1096 * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
1097 (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer):
1098 * platform/graphics/cg/ImageBufferCG.cpp:
1100 * platform/image-decoders/bmp/BMPImageDecoder.cpp:
1101 (WebCore::BMPImageDecoder::frameBufferAtIndex):
1102 * platform/image-decoders/ico/ICOImageDecoder.cpp:
1103 (WebCore::ICOImageDecoder::decode):
1104 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1105 (WebCore::JPEGImageDecoder::frameBufferAtIndex):
1106 * platform/image-decoders/png/PNGImageDecoder.cpp:
1107 (WebCore::PNGImageDecoder::frameBufferAtIndex):
1108 (WebCore::PNGImageDecoder::readChunks):
1109 * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1110 (WebCore::WEBPImageDecoder::frameBufferAtIndex):
1111 * platform/image-encoders/JPEGImageEncoder.cpp:
1112 (WebCore::compressRGBABigEndianToJPEG):
1113 * platform/text/DecodeEscapeSequences.h:
1114 (WebCore::URLEscapeSequence::decodeRun):
1115 * platform/text/SuffixTree.h:
1116 (WebCore::SuffixTree::Node::Node):
1117 * rendering/Grid.cpp:
1118 (WebCore::Grid::setNeedsItemsPlacement):
1119 * rendering/RenderTable.cpp:
1120 (WebCore::RenderTable::invalidateCachedColumns):
1122 2017-07-20 Chris Dumez <cdumez@apple.com>
1124 Regression(ITP): Can no longer log in on abc.go.com
1125 https://bugs.webkit.org/show_bug.cgi?id=174533
1126 <rdar://problem/33325881>
1128 Reviewed by Geoffrey Garen.
1130 Add quirk for sp.auth.adobe.com which is used for SSO by web sites such as
1131 abc.go.com. This would otherwise cause adobe.com to be identified as a
1132 tracker and log in on abc.go.com would break.
1134 No new tests, tested manually on abc.go.com.
1136 * loader/ResourceLoadObserver.cpp:
1137 (WebCore::resourceNeedsSSOQuirk):
1138 (WebCore::ResourceLoadObserver::logSubresourceLoading):
1140 2017-07-20 Antoine Quint <graouts@apple.com>
1142 Turn tests at media/modern-media-controls/start-support back on
1143 https://bugs.webkit.org/show_bug.cgi?id=174683
1145 Reviewed by Dean Jackson.
1147 Turning those tests back on revealed a small bug that is unlikely to really affect content
1148 on the Web. In the case where the size of the video is known right away, without the need
1149 for loading its metadata, as is the case in the start-support-click-to-start.html test with
1150 a local media resource, all queued layouts are flushed at once and we may call the layout()
1151 method of the left ButtonsContainer which originally is set to contain the play/pause button,
1152 which would remove the play/pause button from the center of the media. So before we potentially
1153 set the play/pause button as the central button, we first assign the default button set for
1154 the two ButtonsContainer instances and only add the play/pause button when we're not showing
1155 the prominent play/pause button.
1157 * Modules/modern-media-controls/controls/inline-media-controls.js:
1158 (InlineMediaControls.prototype.layout):
1159 (InlineMediaControls.prototype._leftContainerButtons):
1161 2017-07-20 Chris Dumez <cdumez@apple.com>
1163 Drop legacy FileException type
1164 https://bugs.webkit.org/show_bug.cgi?id=174676
1166 Reviewed by Alex Christensen.
1168 Drop legacy FileException type and use DOMException instead, as per the latest
1169 File API specification:
1170 - https://w3c.github.io/FileAPI/#ErrorAndException
1172 Both Firefox and Chrome no longer expose FileException.
1175 * DerivedSources.cpp:
1176 * DerivedSources.make:
1177 * WebCore.xcodeproj/project.pbxproj:
1178 * bindings/js/JSDOMExceptionHandling.cpp:
1179 (WebCore::createDOMException):
1180 * dom/DOMExceptions.in:
1181 * fileapi/FileException.cpp: Removed.
1182 * fileapi/FileException.h: Removed.
1183 * fileapi/FileException.idl: Removed.
1184 * fileapi/FileReaderLoader.cpp:
1185 (WebCore::FileReaderLoader::FileReaderLoader):
1186 (WebCore::FileReaderLoader::failed):
1187 * fileapi/FileReaderLoader.h:
1188 (WebCore::FileReaderLoader::errorCode):
1189 * fileapi/FileReaderSync.cpp:
1190 (WebCore::errorCodeToExceptionCode):
1191 (WebCore::FileReaderSync::startLoading):
1193 2017-07-20 Sam Weinig <sam@webkit.org>
1195 [WebIDL] Remove custom bindings for InspectorFrontendHost
1196 https://bugs.webkit.org/show_bug.cgi?id=174659
1198 Reviewed by Chris Dumez.
1201 * WebCore.xcodeproj/project.pbxproj:
1202 * bindings/js/JSBindingsAllInOne.cpp:
1203 * bindings/js/JSInspectorFrontendHostCustom.cpp: Removed.
1204 Remove JSInspectorFrontendHostCustom.cpp.
1206 * inspector/InspectorFrontendHost.cpp:
1207 (WebCore::populateContextMenu):
1208 (WebCore::InspectorFrontendHost::showContextMenu):
1209 * inspector/InspectorFrontendHost.h:
1210 * inspector/InspectorFrontendHost.idl:
1211 Re-implement showContextMenu by using an IDL defined ContextMenuItem dictionary
1212 and converting from that to a WebCore::ContextMenu in the implementation.
1214 2017-07-20 Charlie Turner <cturner@igalia.com>
1216 [GTK] Layout Test http/tests/media/hls/hls-progress.html is failing
1217 https://bugs.webkit.org/show_bug.cgi?id=141469
1219 Reviewed by Xabier Rodriguez-Calvar.
1221 A work-around for getting progress information in a timely manner from
1222 live pipelines. We cannot rely on getting BUFFERING messages within
1223 the stalled time window (3s), so we have to poll for progress
1224 information somehow.
1226 Makes the following pass reliably
1227 http/tests/media/hls/hls-audio-tracks-has-audio.html passed unexpectedly
1228 http/tests/media/hls/hls-audio-tracks.html passed unexpectedly
1229 http/tests/media/hls/hls-progress.html passed unexpectedly
1231 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1232 (WebCore::findHLSQueue):
1233 (WebCore::isHLSProgressing):
1234 (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
1236 2017-07-20 Andreas Kling <akling@apple.com>
1238 Minor Node->Element type tightening fixes
1239 https://bugs.webkit.org/show_bug.cgi?id=174651
1241 Reviewed by Sam Weinig.
1243 Tighten up some Node* into Element* or even better, Element&.
1246 (WebCore::acceptsEditingFocus): Take a const Element&.
1247 (WebCore::Document::setFocusedElement):
1248 * editing/Editor.cpp:
1249 (WebCore::Editor::findEventTargetFrom): Return an Element*.
1250 (WebCore::Editor::findEventTargetFromSelection): Ditto.
1251 (WebCore::Editor::pasteAsPlainText):
1252 (WebCore::Editor::pasteAsFragment):
1253 (WebCore::Editor::dispatchCPPEvent):
1255 * page/DragController.cpp:
1256 (WebCore::DragController::dispatchTextInputEventFor):
1258 2017-07-20 Brady Eidson <beidson@apple.com>
1260 WKHTTPCookieStore API tests fail on High Sierra.
1261 <rdar://problem/33410271> and https://bugs.webkit.org/show_bug.cgi?id=174666
1263 Reviewed by Andy Estes.
1265 Covered by existing API tests.
1267 In r219567 I'd moved cookie storage observation off of NSHTTPCookieStorage and NSNotificationCenter
1268 to CFHTTPCookieStorage observation callbacks.
1270 This is because notifications were only sent for the default [NSHTTPCookieStorage sharedHTTPCookieStorage]
1271 and not any of the other ones we keep in flight.
1273 Unfortunately that SPI has been disabled in High Sierra.
1274 Fortunately we found a way we can get non-shared NSHTTPCookieStorages to send notifications that works everywhere.
1276 * platform/network/cocoa/CookieStorageObserver.h:
1277 * platform/network/cocoa/CookieStorageObserver.mm:
1278 (-[WebCookieObserverAdapter initWithObserver:]):
1279 (-[WebCookieObserverAdapter cookiesChangedNotificationHandler:]):
1280 (WebCore::CookieStorageObserver::create):
1281 (WebCore::CookieStorageObserver::CookieStorageObserver):
1282 (WebCore::CookieStorageObserver::~CookieStorageObserver):
1283 (WebCore::CookieStorageObserver::startObserving): Use a trick to call some SPI on non-shared NSHTTPCookieStorages
1284 to get them to send notifications.
1285 (WebCore::CookieStorageObserver::stopObserving):
1286 (WebCore::cookiesChanged): Deleted.
1288 * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
1289 (WebCore::NetworkStorageSession::cookieStorageObserver):
1291 2017-07-20 Miguel Gomez <magomez@igalia.com>
1293 [GStreamer] Some layout tests issue "g_mutex_clear() called on uninitialised or locked mutex" and flaky crash in ~MediaPlayerPrivateGStreamerBase
1294 https://bugs.webkit.org/show_bug.cgi?id=173952
1296 Reviewed by Carlos Garcia Campos.
1298 Adjust MediaPlayerPrivateGStreamerBase to avoid concurrence problems with the GStreamer thread when
1299 destroying the object.
1301 Covered by existent tests.
1303 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1304 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1305 (WebCore::MediaPlayerPrivateGStreamerBase::repaint):
1306 (WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint):
1308 2017-07-19 Zan Dobersek <zdobersek@igalia.com>
1310 [EME] Push CDMInstance, CDMPrivate and associated types into the Platform layer
1311 https://bugs.webkit.org/show_bug.cgi?id=174496
1313 Reviewed by Xabier Rodriguez-Calvar.
1315 Move the CDMInstance and CDMPrivate interfaces into the platform layer, enabling
1316 implementations of specific key systems at that level, as well as integration with
1317 the MediaPlayerPrivate stack without any layering violations.
1319 While the platform layer still uses the WebCore namespace, the two interface files
1320 have now been moved under the platform/encryptedmedia/ directory and out of the
1321 Modules/encryptedmedia/ directory where the Web-facing API implementation resides.
1323 The two interfaces integrated closely with the Web-facing enumerations and
1324 dictionaries: MediaKeyMessageType, MediaKeySessionType, MediaKeyStatus,
1325 MediaKeySystemConfiguration, MediaKeySystemCapability, MediaKeysRequirement
1326 and MediaKeysRestrictions. Definitions of these types are also moved to the
1327 platform layer without any changes (apart from renaming), and the previous
1328 types now alias against the types now located in the platform layer.
1330 No new tests -- no change in behavior.
1333 * Modules/encryptedmedia/CDM.cpp:
1334 * Modules/encryptedmedia/CDM.h:
1335 * Modules/encryptedmedia/MediaKeyMessageType.h:
1336 * Modules/encryptedmedia/MediaKeySessionType.h:
1337 * Modules/encryptedmedia/MediaKeyStatus.h:
1338 * Modules/encryptedmedia/MediaKeySystemAccess.cpp:
1339 * Modules/encryptedmedia/MediaKeySystemAccess.h:
1340 * Modules/encryptedmedia/MediaKeySystemConfiguration.h:
1341 * Modules/encryptedmedia/MediaKeySystemMediaCapability.h:
1342 * Modules/encryptedmedia/MediaKeysRequirement.h:
1343 * Modules/encryptedmedia/MediaKeysRestrictions.h:
1344 * platform/encryptedmedia/CDMInstance.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMInstance.h.
1345 * platform/encryptedmedia/CDMKeyStatus.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyStatus.h.
1346 * platform/encryptedmedia/CDMKeySystemConfiguration.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.h.
1347 * platform/encryptedmedia/CDMMediaCapability.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.h.
1348 * platform/encryptedmedia/CDMMessageType.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageType.h.
1349 * platform/encryptedmedia/CDMPrivate.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivate.h.
1350 * platform/encryptedmedia/CDMRequirement.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeysRequirement.h.
1351 * platform/encryptedmedia/CDMRestrictions.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeysRestrictions.h.
1352 * platform/encryptedmedia/CDMSessionType.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeySessionType.h.
1354 2017-07-19 Zan Dobersek <zdobersek@igalia.com>
1356 Unreviewed follow-up to r219674.
1358 * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1359 Remove the AsyncScrollingCoordinator.h header include that was added by accident.
1361 2017-07-19 Zan Dobersek <zdobersek@igalia.com>
1363 [CMake] Clean up Web Crypto build targets
1364 https://bugs.webkit.org/show_bug.cgi?id=174253
1366 Reviewed by Alex Christensen.
1368 Gather the common WebCrypto source files in CMakeLists.txt, including them
1369 in the build unconditionally and instead relying on ENABLE_SUBTLE_CRYPTO
1370 build guards to exclude the code from compilation if the feature is disabled.
1372 PlatformGTK.cmake, PlatformMac.cmake and PlatformWPE.cmake can then remove
1373 duplicated build targets. PlatformMac.cmake still lists all the Mac-specific
1374 Web Crypto build targets.
1376 PlatformGTK.cmake and PlatformWPE.cmake now include GCrypt.cmake if the
1377 USE_GCRYPT variable is enabled. Both ports at the moment enable that variable
1378 though as they by default leverage a libgcrypt-based CrpytoDigest implementation
1381 The new GCrypt.cmake file adds the libgcrypt-specific Web Crypto build targets to
1382 the build and also sets up libgcrypt include directiories and libraries.
1384 No new tests -- no change in behavior.
1387 * PlatformGTK.cmake:
1388 * PlatformMac.cmake:
1389 * PlatformWPE.cmake:
1390 * platform/GCrypt.cmake: Added.
1392 2017-07-19 Sam Weinig <sam@webkit.org>
1394 [WebIDL] Remove custom bindings for CommandLineAPIHost
1395 https://bugs.webkit.org/show_bug.cgi?id=174642
1397 Reviewed by Joseph Pecoraro.
1400 * WebCore.xcodeproj/project.pbxproj:
1401 * bindings/js/JSBindingsAllInOne.cpp:
1402 * bindings/js/JSCommandLineAPIHostCustom.cpp: Removed.
1403 Remove JSCommandLineAPIHostCustom.cpp.
1405 * bindings/js/JSDOMConvertObject.h:
1406 (WebCore::JSConverter<IDLObject>::convert):
1407 Add missing JSConverter specialization for IDLObject.
1409 * inspector/CommandLineAPIHost.cpp:
1410 (WebCore::CommandLineAPIHost::inspect):
1411 (WebCore::listenerEntriesFromListenerInfo):
1412 (WebCore::CommandLineAPIHost::inspectedObject):
1413 (WebCore::CommandLineAPIHost::databaseId):
1414 (WebCore::CommandLineAPIHost::storageId):
1415 (WebCore::CommandLineAPIHost::inspectImpl): Deleted.
1416 (WebCore::CommandLineAPIHost::getEventListenersImpl): Deleted.
1417 (WebCore::CommandLineAPIHost::databaseIdImpl): Deleted.
1418 (WebCore::CommandLineAPIHost::storageIdImpl): Deleted.
1419 * inspector/CommandLineAPIHost.h:
1420 * inspector/CommandLineAPIHost.idl:
1421 Replace custom bindings with modern bindings affordances: dictionaries, records and sequences.
1423 2017-07-19 Zan Dobersek <zdobersek@igalia.com>
1425 Unreviewed CoordGraphics build fix.
1427 * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1428 (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateNodeViewportConstraints):
1429 This should be defined for the ScrollingCoordinatorCoordinatedGraphics class.
1430 Also fix the setFixedToViewport() call, fishing out the GraphicsLayer object from
1431 the ScrollingStateNode's LayerRepresentation.
1432 (WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints): Deleted.
1434 2017-07-19 Chris Dumez <cdumez@apple.com>
1436 Drop SQLException type
1437 https://bugs.webkit.org/show_bug.cgi?id=174665
1439 Reviewed by Sam Weinig.
1441 Drop SQLException type. We never throw such exception. Also, Firefox
1442 and Chrome no longer expose this type.
1445 * DerivedSources.cpp:
1446 * DerivedSources.make:
1447 * Modules/webdatabase/SQLException.cpp: Removed.
1448 * Modules/webdatabase/SQLException.h: Removed.
1449 * Modules/webdatabase/SQLException.idl: Removed.
1450 * WebCore.xcodeproj/project.pbxproj:
1451 * bindings/js/JSDOMExceptionHandling.cpp:
1452 (WebCore::createDOMException):
1453 * bindings/js/JSExceptionBase.cpp:
1454 (WebCore::toExceptionBase):
1455 * dom/DOMExceptions.in:
1457 2017-07-19 Wenson Hsieh <wenson_hsieh@apple.com>
1459 Unreviewed, tweak a comment above TemporarySelectionOptionIgnoreSelectionChanges in Editor.cpp.
1461 The comment references the UI process, but it describes an entity in WebCore. This should have been generalized
1462 to instead refer to the client layer in general (i.e. WebKit1 or WebKit2).
1466 2017-07-19 Simon Fraser <simon.fraser@apple.com>
1468 getBoundingClientRects not updated for programmatic scrolls
1469 https://bugs.webkit.org/show_bug.cgi?id=174538
1470 rdar://problem/33049012
1472 Reviewed by Tim Horton.
1474 Baidu.com has two event handlers on its <input>, and both query the input location with getBoundingClientRect()
1475 and the current pageYOffset (via jQuery), then try to scroll the input to the top of the screen. The bug is that
1476 programmatic scrolls did not immediately update the layout viewport rect, so the second call to
1477 getBoundingClientRect() would return stale coordinates, triggering an extra scroll.
1479 To fix this, undo the fix for r219320 which tried to keep getBoundingClientRect() current during unstable scroll
1480 updates by adding a shadow layout viewport rect. Instead, almost always update the layout viewport rect on
1481 FrameView, even during unstable visible rect updates, but not if content insets are being changed interactively,
1482 since changing viewport heights cause problems with bottom-fixed elements. Also, we need to compute a new layout
1483 viewport rect in FrameView::updateLayoutViewport() for programmatic scrolls.
1485 However, always updating the layout viewport triggered issues with the scrolling tree. The scrolling state tree
1486 fossilizes layer positions relative to a specific viewport rect, and that relationship has to be maintained.
1487 There are code paths that recompute fixed/sticky viewport constraints when the layout viewport has changed but
1488 we haven't done layout or recomputed layer positions (e.g. updating viewport-constrained layers via
1489 updateScrollCoordinatedLayersAfterFlush()) and in these cases using a new layout viewport for those computations
1490 results in an inconsistent scrolling tree.
1492 Fix this by not updating scrolling constraints every time we have to re-register scrolling nodes.
1493 updateScrollCoordinatedLayersAfterFlush() only needs to update the layer on the scrolling node (to handle
1494 tiled/non-tiled switches), so make updateScrollCoordinatedLayer() a little more fine-grained, and only update
1495 constraints when we've just computed layer geometry. This allows for different scrolling nodes to have
1496 constraints computed at different times, with different layout viewports, which happens.
1498 Two additional fixes were required to make bottom-fixed bars behave correctly.
1500 First, FrameView::computeLayoutViewportOrigin() had a bug where rounding of half-pixel values would cause it to
1501 fall into the if (visualViewport.height() > layoutViewport.height()) clause, but then fail to clamp for
1504 Second, the FrameView::unscaledMaximumScrollPosition() was wrong after zooming on iOS, since it uses visibleSize()
1505 which is affected by page scale on iOS only (and the function wants scale-independent values). Fix with a hack that
1506 should be cleaned up via webkit.org/b/174648.
1508 Tested by existing tests.
1510 * page/FrameView.cpp:
1511 (WebCore::FrameView::computeUpdatedLayoutViewportRect):
1512 (WebCore::FrameView::computeLayoutViewportOrigin):
1513 (WebCore::FrameView::setLayoutViewportOverrideRect):
1514 (WebCore::FrameView::updateLayoutViewport):
1515 (WebCore::FrameView::unscaledMaximumScrollPosition):
1516 (WebCore::FrameView::documentToClientOffset):
1517 (WebCore::FrameView::setUnstableLayoutViewportRect): Deleted.
1519 * page/scrolling/AsyncScrollingCoordinator.cpp:
1520 (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
1521 (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
1522 (WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
1523 (WebCore::AsyncScrollingCoordinator::updateNodeLayer):
1524 (WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints):
1525 (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode): Deleted.
1526 * page/scrolling/AsyncScrollingCoordinator.h:
1527 * page/scrolling/ScrollingCoordinator.cpp:
1528 (WebCore::operator<<):
1529 * page/scrolling/ScrollingCoordinator.h:
1530 (WebCore::ScrollingCoordinator::reconcileScrollingState):
1531 (WebCore::ScrollingCoordinator::updateNodeLayer):
1532 (WebCore::ScrollingCoordinator::updateNodeViewportConstraints):
1533 (WebCore::ScrollingCoordinator::updateViewportConstrainedNode): Deleted.
1534 * page/scrolling/ScrollingStateFixedNode.cpp:
1535 (WebCore::ScrollingStateFixedNode::updateConstraints):
1536 * page/scrolling/ScrollingStateStickyNode.cpp:
1537 (WebCore::ScrollingStateStickyNode::updateConstraints):
1538 (WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect):
1539 * page/scrolling/ScrollingTree.cpp:
1540 (WebCore::ScrollingTree::commitTreeState):
1541 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1542 (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
1543 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1544 (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
1545 * rendering/RenderLayerBacking.cpp:
1546 (WebCore::RenderLayerBacking::updateGeometry):
1547 * rendering/RenderLayerCompositor.cpp:
1548 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
1549 (WebCore::RenderLayerCompositor::updateBacking):
1550 (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
1551 (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1552 (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1553 (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
1554 (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
1555 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1556 (WebCore::RenderLayerCompositor::didAddScrollingLayer):
1557 * rendering/RenderLayerCompositor.h:
1559 2017-07-19 Megan Gardner <megan_gardner@apple.com>
1561 Don't write file URLs to iOS Pasteboard
1562 https://bugs.webkit.org/show_bug.cgi?id=174647
1563 <rdar://problem/33199730>
1565 Reviewed by Wenson Hsieh.
1567 Tests updated to reflect the changes. We are no longer vending file URLs in Drag & Drop and Copy/Paste.
1569 * editing/ios/EditorIOS.mm:
1570 (WebCore::Editor::writeImageToPasteboard):
1571 * platform/ios/PlatformPasteboardIOS.mm:
1572 (WebCore::PlatformPasteboard::write):
1574 2017-07-19 Myles C. Maxfield <mmaxfield@apple.com>
1576 Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap
1577 https://bugs.webkit.org/show_bug.cgi?id=174406
1579 Reviewed by Simon Fraser.
1580 <rdar://problem/10139227>
1584 When the minimumFontSize API preference is set, we will increase the font size without increasing
1585 the line height. If the content specifies line-height as an absolute value, there can be two
1586 unfortunate results:
1588 - Adjacent lines in a paragraph can overlap
1589 - If the paragraph (or containin block or whatever) uses overflow: hidden, the first and last lines
1590 can be cut off and potentially indecipherable.
1592 Instead, we should use the minimum font size preference as a signal that we should increase the
1593 line-height as well as the font-size. Eventually, we will want to increase it by an amount
1594 proportional to the increase in font-size (which can be due to minimumFontSize, minimumLogicalFontSize,
1595 text autosizing, etc.). However, because minimumLogicalFontSize is on by default, this would cause
1596 a behavior change on many webpages which use small text, so such a change would be too risky right now.
1597 Instead, we can pretend that minimumFontSize is the only cause that text increases, and use this as the
1598 only signal to boost the corresponding line-height.
1600 Tests: fast/text/line-height-minimumFontSize-text-zoom.html
1601 fast/text/line-height-minimumFontSize-visual.html
1602 fast/text/line-height-minimumFontSize-zoom.html
1603 fast/text/line-height-minimumFontSize.html
1604 fast/text/line-height-minimumFontSize-autosize.html
1606 * css/StyleBuilderCustom.h:
1607 (WebCore::computeBaseSpecifiedFontSize):
1608 (WebCore::computeLineHeightMultiplierDueToFontSize):
1609 (WebCore::StyleBuilderCustom::applyValueLineHeight):
1610 (WebCore::StyleBuilderCustom::applyValueFill):
1611 (WebCore::StyleBuilderCustom::applyValueStroke):
1612 (WebCore::StyleBuilderCustom::applyValueContent):
1613 * rendering/TextAutoSizing.cpp:
1615 2017-07-18 Myles C. Maxfield <mmaxfield@apple.com>
1617 Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap
1618 https://bugs.webkit.org/show_bug.cgi?id=174406
1619 <rdar://problem/10139227>
1621 Reviewed by Simon Fraser.
1623 When the minimumFontSize API preference is set, we will increase the font size without increasing
1624 the line height. If the content specifies line-height as an absolute value, there can be two
1625 unfortunate results:
1627 - Adjacent lines in a paragraph can overlap
1628 - If the paragraph (or containin block or whatever) uses overflow: hidden, the first and last lines
1629 can be cut off and potentially indecipherable.
1631 Instead, we should use the minimum font size preference as a signal that we should increase the
1632 line-height as well as the font-size. Eventually, we will want to increase it by an amount
1633 proportional to the increase in font-size (which can be due to minimumFontSize, minimumLogicalFontSize,
1634 text autosizing, etc.). However, because minimumLogicalFontSize is on by default, this would cause
1635 a behavior change on many webpages which use small text, so such a change would be too risky right now.
1636 Instead, we can pretend that minimumFontSize is the only cause that text increases, and use this as the
1637 only signal to boost the corresponding line-height.
1639 Tests: fast/text/line-height-minimumFontSize-text-zoom.html
1640 fast/text/line-height-minimumFontSize-visual.html
1641 fast/text/line-height-minimumFontSize-zoom.html
1642 fast/text/line-height-minimumFontSize.html
1643 fast/text/line-height-minimumFontSize-autosize.html
1645 * css/StyleBuilderCustom.h:
1646 (WebCore::computeBaseSpecifiedFontSize):
1647 (WebCore::computeLineHeightMultiplierDueToFontSize):
1648 (WebCore::StyleBuilderCustom::applyValueLineHeight):
1649 (WebCore::StyleBuilderCustom::applyValueFill):
1650 (WebCore::StyleBuilderCustom::applyValueStroke):
1651 (WebCore::StyleBuilderCustom::applyValueContent):
1652 * rendering/TextAutoSizing.cpp:
1654 2017-07-19 Chris Dumez <cdumez@apple.com>
1656 DOMException should not have its own toString()
1657 https://bugs.webkit.org/show_bug.cgi?id=174630
1659 Reviewed by Sam Weinig.
1661 DOMException should not have its own toString() and should use the one from Error.prototype.toString()
1663 - https://heycam.github.io/webidl/#idl-DOMException
1665 No new tests, rebaselined existing tests.
1667 * dom/DOMCoreException.idl:
1669 2017-07-19 Antoine Quint <graouts@apple.com>
1671 [iOS] REGRESSION: Scrubbing media using built-in controls does not pause media
1672 https://bugs.webkit.org/show_bug.cgi?id=174650
1673 <rdar://problem/33401877>
1675 Reviewed by Dean Jackson.
1677 We would only pause when scrubbing on macOS because we only listened to "mousedown" events on the
1678 scrubber's backing <input> element to identify that the user had started interacting with the
1681 Implementing the same technique on iOS required a little more work than just listening to "touchstart"
1682 events on the same element. On top of that, we needed to make sure that we would only respond to
1683 "touchstart" events on the slider's thumb, and not on the track, since only on macOS should the user
1684 be able to click anywhere on the track to scrub. So we turn off pointer-events for the <input> on iOS
1685 only, and turn them back on specifically for the thumb.
1687 There is also some finessing when dealing with touch events where we need to track the identifier of
1688 the touch that started the user interaction. So we keep track of it in an ivar and wait until we get
1689 a "touchend" event where the changedTouches list contains a touch with that same identifier to ensure
1690 the same touch that initiates and ends the scrubbing interaction.
1692 Finally, we fix another issue that was uncovered while turning back on the ScrubbingSupport tests
1693 where we would not trash the cached _value ivar when we initiated scrubbing, which was important since
1694 we would mistakenly use the pre-srubbing value during a scrub.
1696 * Modules/modern-media-controls/controls/slider.css:
1697 (.ios .slider > input):
1698 (.slider > input::-webkit-slider-thumb):
1699 * Modules/modern-media-controls/controls/slider.js:
1700 (Slider.prototype.handleEvent):
1701 (Slider.prototype._handleMousedownEvent):
1702 (Slider.prototype._interactionEndTarget):
1703 (Slider.prototype._handleTouchstartEvent):
1704 (Slider.prototype._valueWillStartChanging):
1705 (Slider.prototype._valueDidStopChanging):
1706 (Slider.prototype._handleMouseupEvent):
1707 (Slider.prototype._handleTouchendEvent):
1709 2017-07-19 Nan Wang <n_wang@apple.com>
1711 AX: Web page reloaded when a node is labelling multiple childnodes
1712 https://bugs.webkit.org/show_bug.cgi?id=174655
1714 Reviewed by Chris Fleizach.
1716 When we are asking for the aria-labelledby attribute of a node and its
1717 sibling is also labelled by the same node, we get into an infinite loop
1718 in textUnderElement since we only ignore one child. Added checks for
1719 siblings to avoid such loop.
1721 Test: accessibility/mac/aria-labelledby-multiple-child-crash.html
1723 * accessibility/AccessibilityNodeObject.cpp:
1724 (WebCore::AccessibilityNodeObject::textUnderElement):
1726 2017-07-19 Andy Estes <aestes@apple.com>
1728 Use a cast to work around clang's false -Wobjc-literal-conversion warnings
1729 https://bugs.webkit.org/show_bug.cgi?id=174631
1731 Reviewed by Dan Bernstein.
1733 Instead of ignoring -Wobjc-literal-conversion, use a cast to work around rdar://problem/33383354.
1735 * platform/ios/PlatformPasteboardIOS.mm:
1736 (WebCore::PlatformPasteboard::write):
1738 2017-07-19 Chris Dumez <cdumez@apple.com>
1740 Make cross-origin properties enumerable
1741 https://bugs.webkit.org/show_bug.cgi?id=174576
1743 Reviewed by Darin Adler.
1745 Makes cross-origin properties enumerable on Window and Location objects
1747 - https://github.com/whatwg/html/pull/2777
1749 This simplifies our code quite a bit.
1751 No new tests, updated existing tests.
1753 * bindings/js/JSDOMWindowCustom.cpp:
1754 (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
1755 (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1756 (WebCore::JSDOMWindow::getOwnPropertyNames):
1757 * bindings/js/JSLocationCustom.cpp:
1758 (WebCore::getOwnPropertySlotCommon):
1759 (WebCore::JSLocation::getOwnPropertyNames):
1760 * bindings/scripts/CodeGeneratorJS.pm:
1763 2017-07-18 Carlos Alberto Lopez Perez <clopez@igalia.com>
1765 [EME] Build failure with Clang-3.8 on InitDataRegistry.cpp
1766 https://bugs.webkit.org/show_bug.cgi?id=174628
1768 Reviewed by Žan Doberšek.
1770 * Modules/encryptedmedia/InitDataRegistry.cpp:
1771 (WebCore::extractKeyIDsKeyids): Add an explicit cast to unsigned.
1773 2017-07-19 Matt Lewis <jlewis3@apple.com>
1775 Unreviewed, rolling out r219646.
1777 The test added are failing on all platforms
1781 "Setting the minimum font size preference doesn’t affect
1782 absolute line-height values, so lines overlap"
1783 https://bugs.webkit.org/show_bug.cgi?id=174406
1784 http://trac.webkit.org/changeset/219646
1786 2017-07-19 Yusuke Suzuki <utatane.tea@gmail.com>
1788 [WTF] Implement WTF::ThreadGroup
1789 https://bugs.webkit.org/show_bug.cgi?id=174081
1791 Reviewed by Mark Lam.
1793 * page/ResourceUsageThread.h:
1795 2017-07-18 Andy Estes <aestes@apple.com>
1797 [Xcode] Enable CLANG_WARN_RANGE_LOOP_ANALYSIS
1798 https://bugs.webkit.org/show_bug.cgi?id=174631
1800 Reviewed by Tim Horton.
1802 * Configurations/Base.xcconfig:
1803 * rendering/Grid.cpp:
1804 (WebCore::Grid::insert):
1805 * rendering/RenderTreeAsText.cpp:
1807 * rendering/SimpleLineLayoutCoverage.cpp:
1808 (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
1810 2017-07-18 Yusuke Suzuki <utatane.tea@gmail.com>
1812 WTF::Thread should have the threads stack bounds.
1813 https://bugs.webkit.org/show_bug.cgi?id=173975
1815 Reviewed by Mark Lam.
1817 When creating WebThread, we first allocate WebCore::ThreadGlobalData in UI thread
1818 and share it with WebThread.
1819 The problem is that WebCore::ThreadGlobalData has CachedResourceRequestInitiators.
1820 It allocates AtomicString, which requires WTFThreadData.
1822 In this patch, we call WTF::initializeThreading() before allocating WebCore::ThreadGlobalData.
1823 And we also call AtomicString::init() before calling WebCore::ThreadGlobalData since
1824 WebCore::ThreadGlobalData allocates AtomicString.
1826 * platform/ios/wak/WebCoreThread.mm:
1829 2017-07-18 Myles C. Maxfield <mmaxfield@apple.com>
1831 Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap
1832 https://bugs.webkit.org/show_bug.cgi?id=174406
1833 <rdar://problem/10139227>
1835 Reviewed by Simon Fraser.
1837 When the minimumFontSize API preference is set, we will increase the font size without increasing
1838 the line height. If the content specifies line-height as an absolute value, there can be two
1839 unfortunate results:
1841 - Adjacent lines in a paragraph can overlap
1842 - If the paragraph (or containin block or whatever) uses overflow: hidden, the first and last lines
1843 can be cut off and potentially indecipherable.
1845 Instead, we should use the minimum font size preference as a signal that we should increase the
1846 line-height as well as the font-size. Eventually, we will want to increase it by an amount
1847 proportional to the increase in font-size (which can be due to minimumFontSize, minimumLogicalFontSize,
1848 text autosizing, etc.). However, because minimumLogicalFontSize is on by default, this would cause
1849 a behavior change on many webpages which use small text, so such a change would be too risky right now.
1850 Instead, we can pretend that minimumFontSize is the only cause that text increases, and use this as the
1851 only signal to boost the corresponding line-height.
1853 Tests: fast/text/line-height-minimumFontSize-text-zoom.html
1854 fast/text/line-height-minimumFontSize-visual.html
1855 fast/text/line-height-minimumFontSize-zoom.html
1856 fast/text/line-height-minimumFontSize.html
1857 fast/text/line-height-minimumFontSize-autosize.html
1859 * css/StyleBuilderCustom.h:
1860 (WebCore::computeBaseSpecifiedFontSize):
1861 (WebCore::computeLineHeightMultiplierDueToFontSize):
1862 (WebCore::StyleBuilderCustom::applyValueLineHeight):
1863 (WebCore::StyleBuilderCustom::applyValueFill):
1864 (WebCore::StyleBuilderCustom::applyValueStroke):
1865 (WebCore::StyleBuilderCustom::applyValueContent):
1866 * rendering/TextAutoSizing.cpp:
1868 2017-07-18 Zalan Bujtas <zalan@apple.com>
1870 Media controls are missing content in fullscreen when document has scroll offset.
1871 https://bugs.webkit.org/show_bug.cgi?id=174644
1872 <rdar://problem/32415323>
1874 Reviewed by Simon Fraser.
1876 If a non-user initiated scrolling (result of resize for example) is processed asynchronously, it might
1877 leapfrog other, programatic scrollings and trigger unintentional scroll offsets (and turn into unwanted clippings).
1878 This patch ensures that both resize and top content inset change are translated into programatic scrolling.
1880 Unable to test full screen video.
1882 * page/FrameView.cpp:
1883 (WebCore::FrameView::setFrameRect):
1884 (WebCore::FrameView::topContentInsetDidChange):
1886 2017-07-18 Andy Estes <aestes@apple.com>
1888 [Xcode] Enable CLANG_WARN_OBJC_LITERAL_CONVERSION
1889 https://bugs.webkit.org/show_bug.cgi?id=174631
1891 Reviewed by Sam Weinig.
1893 * Configurations/Base.xcconfig:
1894 * platform/ios/PlatformPasteboardIOS.mm:
1895 (WebCore::PlatformPasteboard::write):
1897 2017-07-18 Ali Juma <ajuma@chromium.org>
1899 Align quirky number parsing with other browsers
1900 https://bugs.webkit.org/show_bug.cgi?id=155874
1902 Reviewed by Simon Fraser.
1904 Parse unit-less non-zero values for animation-duration and transition-duration
1905 as invalid time values in quirks mode.
1907 Test: fast/css/animation-transition-duration-quirksmode.html
1909 * css/parser/CSSPropertyParser.cpp:
1910 (WebCore::consumeAnimationValue):
1912 2017-07-18 Chris Dumez <cdumez@apple.com>
1914 HysteresisActivity cannot be used in the UIProcess
1915 https://bugs.webkit.org/show_bug.cgi?id=174643
1916 <rdar://problem/33086442>
1918 Reviewed by Tim Horton.
1920 Port HysteresisActivity to RunLoop::Timer so that it can safely be used in
1921 the UIProcess as well.
1923 * platform/HysteresisActivity.h:
1925 2017-07-18 Joseph Pecoraro <pecoraro@apple.com>
1927 Web Inspector: Modernize InjectedScriptSource
1928 https://bugs.webkit.org/show_bug.cgi?id=173890
1930 Reviewed by Brian Burg.
1932 Covered by existing tests.
1934 * inspector/CommandLineAPIModuleSource.js:
1935 (CommandLineAPIImpl.prototype.copy):
1936 (CommandLineAPIImpl.prototype._inspect):
1937 Use RemoteObject, a new parameter.
1939 2017-07-18 Ryosuke Niwa <rniwa@webkit.org>
1941 REGRESSION(r218910): Crash when password field changes to text field
1942 https://bugs.webkit.org/show_bug.cgi?id=174560
1944 Reviewed by Zalan Bujtas.
1946 The crash was caused by textMarkerDataForFirstPositionInTextControl accessing a nullptr returned by getOrCreate.
1947 Unfortunately, in order to this fix bug while preserving the exact behavior would require synchronously creating
1948 a renderer for the editing host when the input type changed since we can't create an accessbility object out of
1949 a renderer-less node.
1951 Instead, revert back to pre-r218910 behavior of always using the text control element's axID when notifying
1952 the value change. While this is inconsistent with the way editing commands report content changes, I've since
1953 learned that VoiceOver has code to deal with this exact situation.
1955 Test: accessibility/mac/input-type-change-crash-2.html
1957 * accessibility/AXObjectCache.cpp:
1958 (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
1960 2017-07-18 Matt Baker <mattbaker@apple.com>
1962 Web Inspector: Refactoring: replace InspectorCanvasAgent::CanvasEntry with a helper class
1963 https://bugs.webkit.org/show_bug.cgi?id=174311
1965 Reviewed by Devin Rousso.
1967 This patch adds a helper class for tracking canvases and their data. The
1968 current approach of defining a helper structure in the agent's header is
1969 awkward to use and maintain, and won't scale well as more canvas instrumentation
1970 points and data are added.
1973 * WebCore.xcodeproj/project.pbxproj:
1976 * inspector/InspectorCanvas.cpp: Added.
1977 (WebCore::InspectorCanvas::create):
1978 (WebCore::InspectorCanvas::InspectorCanvas):
1979 (WebCore::InspectorCanvas::buildObjectForCanvas):
1980 * inspector/InspectorCanvas.h: Added.
1982 * inspector/InspectorCanvasAgent.cpp:
1983 (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
1984 (WebCore::InspectorCanvasAgent::enable):
1985 (WebCore::InspectorCanvasAgent::requestNode):
1986 (WebCore::InspectorCanvasAgent::requestContent):
1987 (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes):
1988 (WebCore::InspectorCanvasAgent::resolveCanvasContext):
1989 (WebCore::InspectorCanvasAgent::frameNavigated):
1990 (WebCore::InspectorCanvasAgent::didCreateCSSCanvas):
1991 (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
1992 (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
1993 (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
1994 (WebCore::InspectorCanvasAgent::canvasDestroyed):
1995 (WebCore::InspectorCanvasAgent::canvasDestroyedTimerFired):
1996 (WebCore::InspectorCanvasAgent::clearCanvasData):
1997 (WebCore::InspectorCanvasAgent::unbindCanvas):
1998 (WebCore::InspectorCanvasAgent::assertInspectorCanvas):
1999 (WebCore::InspectorCanvasAgent::findInspectorCanvas):
2000 (WebCore::InspectorCanvasAgent::getCanvasEntry): Deleted.
2001 (WebCore::InspectorCanvasAgent::buildObjectForCanvas): Deleted.
2002 * inspector/InspectorCanvasAgent.h:
2004 * inspector/InspectorController.cpp:
2005 (WebCore::InspectorController::InspectorController):
2006 Remove unused constructor argument.
2008 2017-07-18 Basuke Suzuki <Basuke.Suzuki@sony.com>
2010 [Curl] Move detail implementation from ResourceHandle to ResourceHandleInternal
2011 https://bugs.webkit.org/show_bug.cgi?id=174641
2013 After moving stuff from ResourceHandleManager to ResourceHandle on
2014 https://bugs.webkit.org/show_bug.cgi?id=173630, still there're many violation
2015 remains between ResourceHandle and ResourceHandleInternal classes.
2016 Many of implementation detail should be move to ResourceHandleInternal
2017 to improve build speed.
2019 Reviewed by Alex Christensen.
2021 * platform/network/ResourceHandle.h:
2022 * platform/network/ResourceHandleInternal.h:
2023 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2024 * platform/network/curl/ResourceHandleCurl.cpp:
2025 (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2026 (WebCore::ResourceHandle::start):
2027 (WebCore::ResourceHandle::cancel):
2028 (WebCore::ResourceHandleInternal::initialize):
2029 (WebCore::ResourceHandleInternal::applyAuthentication):
2030 (WebCore::ResourceHandleInternal::setupPUT):
2031 (WebCore::ResourceHandleInternal::setupPOST):
2032 (WebCore::ResourceHandleInternal::setupFormData):
2033 (WebCore::ResourceHandle::platformSetDefersLoading):
2034 (WebCore::ResourceHandleInternal::didFinish):
2035 (WebCore::ResourceHandleInternal::didFail):
2036 (WebCore::ResourceHandleInternal::calculateWebTimingInformations):
2037 (WebCore::ResourceHandleInternal::handleLocalReceiveResponse):
2038 (WebCore::ResourceHandleInternal::willPrepareSendData):
2039 (WebCore::ResourceHandleInternal::didReceiveHeaderLine):
2040 (WebCore::ResourceHandleInternal::didReceiveAllHeaders):
2041 (WebCore::ResourceHandleInternal::didReceiveContentData):
2042 (WebCore::ResourceHandleInternal::readCallback):
2043 (WebCore::ResourceHandleInternal::headerCallback):
2044 (WebCore::ResourceHandleInternal::writeCallback):
2045 (WebCore::ResourceHandle::platformLoadResourceSynchronously):
2046 (WebCore::ResourceHandleInternal::dispatchSynchronousJob):
2047 (WebCore::ResourceHandleInternal::handleDataURL):
2048 (WebCore::ResourceHandle::initialize): Deleted.
2049 (WebCore::ResourceHandle::applyAuthentication): Deleted.
2050 (WebCore::ResourceHandle::setupPUT): Deleted.
2051 (WebCore::ResourceHandle::setupPOST): Deleted.
2052 (WebCore::ResourceHandle::setupFormData): Deleted.
2053 (WebCore::ResourceHandle::didFinish): Deleted.
2054 (WebCore::ResourceHandle::didFail): Deleted.
2055 (WebCore::ResourceHandle::calculateWebTimingInformations): Deleted.
2056 (WebCore::ResourceHandle::handleLocalReceiveResponse): Deleted.
2057 (WebCore::ResourceHandle::willPrepareSendData): Deleted.
2058 (WebCore::ResourceHandle::didReceiveHeaderLine): Deleted.
2059 (WebCore::ResourceHandle::didReceiveAllHeaders): Deleted.
2060 (WebCore::ResourceHandle::didReceiveContentData): Deleted.
2061 (WebCore::ResourceHandle::readCallback): Deleted.
2062 (WebCore::ResourceHandle::headerCallback): Deleted.
2063 (WebCore::ResourceHandle::writeCallback): Deleted.
2064 (WebCore::ResourceHandle::dispatchSynchronousJob): Deleted.
2065 (WebCore::ResourceHandle::handleDataURL): Deleted.
2067 2017-07-18 Andy Estes <aestes@apple.com>
2069 [Xcode] Enable CLANG_WARN_NON_LITERAL_NULL_CONVERSION
2070 https://bugs.webkit.org/show_bug.cgi?id=174631
2072 Reviewed by Dan Bernstein.
2074 * Configurations/Base.xcconfig:
2076 2017-07-18 Antoine Quint <graouts@apple.com>
2078 [macOS] Mouse pointer does not hide during fullscreen playback
2079 https://bugs.webkit.org/show_bug.cgi?id=174638
2080 <rdar://problem/33244399>
2082 Reviewed by Dean Jackson.
2084 Test: media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html
2086 The user-agent stylesheet sets the "-webkit-cursor-visibility" to "auto-hide" for fullscreen <video>
2087 elements. Since we reset the page styles, including UA styles, on .media-controls-container, we need
2088 to explicitly inherit this style property from the page to ensure the mouse pointer automatically
2089 hides in fullscreen.
2091 * Modules/modern-media-controls/controls/media-controls.css:
2092 (.media-controls-container):
2094 2017-07-18 Sam Weinig <sam@webkit.org>
2096 [WebIDL] Remove custom bindings for MockContentFilterSettings
2097 https://bugs.webkit.org/show_bug.cgi?id=174606
2099 Reviewed by Andy Estes.
2101 * PlatformMac.cmake:
2102 * WebCore.xcodeproj/project.pbxproj:
2103 * bindings/js/JSMockContentFilterSettingsCustom.cpp: Removed.
2104 Remove JSMockContentFilterSettingsCustom.
2106 * testing/MockContentFilterSettings.h:
2107 * testing/MockContentFilterSettings.idl:
2108 Switch from constants to IDL enums to make the bindings and tests simpler.
2110 2017-07-18 Sam Weinig <sam@webkit.org>
2112 [WebIDL] Replace some custom bindings code in JSCSSStyleDeclarationCustom.cpp with named getters/setters
2113 https://bugs.webkit.org/show_bug.cgi?id=174529
2115 Reviewed by Chris Dumez.
2118 * WebCore.xcodeproj/project.pbxproj:
2119 * css/CSSAllInOne.cpp:
2120 Add CSSStyleDeclaration.cpp
2122 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2123 Move getter / setter / getOwnProperties logic from here to CSSStyleDeclaration.cpp.
2125 * bindings/scripts/CodeGeneratorJS.pm:
2126 (GenerateGetOwnPropertySlot):
2127 (GenerateGetOwnPropertySlotByIndex):
2128 (InstanceOverridesGetOwnPropertySlot):
2130 Remove support for no longer needed [CustomGetOwnPropertySlotAndDescriptor].
2131 Add support for [PutOnlyForSupportedProperties], which allows named setters to behave
2132 a bit more like normal setters by allowing the implementation to note which properties
2133 are supported which in turn, allows the bindings to continue down the normal put path
2134 for unsupported properties. This is necessary to mimic the behavior of CSSStyleDeclaration
2135 which is using named setters in place hundreds of additional properties.
2137 (InstanceOverridesDefineOwnProperty):
2138 Add [DefaultDefineOwnProperty] to allow disabling defineOwnProperty overriding that comes
2139 automatically with named setters. We need this for CSSStyleDeclaration since the named
2140 setter usage modeling real properties, not a dictionary style setter. We may want to
2141 revisit this, and add support for DefineOwnProperty here, but this allows us to maintain
2144 (GenerateDefineOwnProperty):
2145 Fix the case when you have a named setter, an indexed getter, but no indexed setter. In that
2146 case, we would get a compile error, due to the index variable being unused.
2148 * bindings/scripts/IDLAttributes.json:
2149 Remove support for no longer needed [CustomGetOwnPropertySlotAndDescriptor], add
2150 [PutOnlyForSupportedProperties] and [DefaultDefineOwnProperty].
2152 * css/CSSStyleDeclaration.h:
2153 * css/CSSStyleDeclaration.cpp: Added.
2154 (WebCore::CSSStyleDeclaration::namedItem):
2155 (WebCore::CSSStyleDeclaration::setNamedItem):
2156 (WebCore::CSSStyleDeclaration::isSupportedPropertyName):
2157 (WebCore::CSSStyleDeclaration::supportedPropertyNames):
2158 Use standard getter / setter functions to implement CSS property name getting and setting.
2159 Convert from Identifier to AtomicString, which are now bridgeable.
2161 * css/CSSStyleDeclaration.idl:
2162 Add named getter and setter. Remove [CustomGetOwnPropertyNames], [CustomGetOwnPropertySlotAndDescriptor]
2163 and [CustomPut], add [DefaultDefineOwnProperty].
2165 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: Added.
2166 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h: Added.
2167 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: Added.
2168 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h: Added.
2169 * bindings/scripts/test/TestNamedSetterWithIndexedGetter.idl: Added.
2170 * bindings/scripts/test/TestNamedSetterWithIndexedGetterAndSetter.idl: Added.
2171 Add tests for improved behavior when using named setters with variations of indexed getters and setters as well.
2173 2017-07-18 Antoine Quint <graouts@apple.com>
2175 [iOS] WebKit media controls are sometimes shown after exiting full screen on vimeo.com
2176 https://bugs.webkit.org/show_bug.cgi?id=174627
2177 <rdar://problem/33301005>
2179 Reviewed by Dean Jackson, provisionally reviewed by Jeremy Jones.
2181 On iOS 11, both the WebKit media controls and the Vimeo custom controls would appear sometimes when exiting
2182 from fullscreen when the video was playing and the user would tap the X button, which would pause the video
2183 as well as exit fullscreen.
2185 The reason this happens is that the ControlsVisibilitySupport object, which governs whether the WebKit media
2186 controls should be displayed for a given video, woud listen to "pause" and "webkitfullscreenchange" events
2187 and determine whether to show the WebKit media controls. We listen to the "pause" event because when media
2188 pauses, and the video has the "controls" attribute set, we should show the controls and suspend the controls
2189 auto-hide timer. And we're interested in knowing when we enter and exit fullscreen because we want to override
2190 the "controls" attribute not being set when we enter fullscreen.
2192 However, on iOS 11, it appears that the "webkitfullscreenchange" event is not reliably fired as the user enters
2193 and exits fullscreen, which is tracked by webkit.org/b/174626. So, when the user exits fullscreen, we would be
2194 informed of the video being paused via a "pause" event, but not of the video exiting fullscreen. And because
2195 media events are asynchronous, the "pause" event would sometimes be fired before we exited fullscreen, and when
2196 the _updateControls() would run, we would sometimes determine that we are in fullscreen still and determine
2197 that the WebKit media controls should be shown.
2199 Of course, on iOS, the WebKit media controls are not shown and instead we delegate to AVKit to display media controls.
2200 So we could simply disregard this whole logic in iOS. But we choose to instead use the "webkitpresentationmodechanged"
2201 when the presentation mode API is supported, as is the case on iOS 11, to determine changes of media fullscreen state.
2202 This way, should we ever choose to support fullscreen media controls provided by WebKit on iOS, this logic is already
2203 correct and we write less platform-specific code.
2205 This, alas, cannot be tested since we can't force the X button to be tapped within the AVKit fullscreen controls.
2207 * Modules/modern-media-controls/media/controls-visibility-support.js:
2208 (ControlsVisibilitySupport.prototype.get mediaEvents):
2209 * Modules/modern-media-controls/media/media-controller.js:
2211 * Modules/modern-media-controls/media/start-support.js:
2212 (StartSupport.prototype.get mediaEvents):
2214 2017-07-18 Matt Lewis <jlewis3@apple.com>
2216 Unreviewed, rolling out r219610.
2218 This caused an api failure on all platforms for the test
2219 SnapshotImageLargeAsyncDecoding
2223 "Async image decoding for large images should be disabled
2224 after the first time a tile is painted"
2225 https://bugs.webkit.org/show_bug.cgi?id=174451
2226 http://trac.webkit.org/changeset/219610
2228 2017-07-18 Devin Rousso <drousso@apple.com>
2230 Add CanvasRenderingContext2D::getTransform
2231 https://bugs.webkit.org/show_bug.cgi?id=174278
2233 Reviewed by Dean Jackson.
2235 Tests: fast/canvas/2d.getTransform.modification.html
2236 fast/canvas/2d.getTransform.newobject.html
2237 fast/canvas/2d.setTransform.matrix.html
2239 * css/DOMMatrixReadOnly.h:
2240 Make DOMMatrixReadOnly::validateAndFixup public so that values of DOMMatrixInit are still
2241 usable without having to construct a DOMMatrixReadOnly. This is beneficial in the case that
2242 an exception is thrown, as the validateAndFixup check can happen without any allocations.
2244 * html/canvas/CanvasRenderingContext2D.idl:
2245 * html/canvas/CanvasRenderingContext2D.h:
2246 * html/canvas/CanvasRenderingContext2D.cpp:
2247 (WebCore::CanvasRenderingContext2D::getTransform):
2248 (WebCore::CanvasRenderingContext2D::setTransform):
2250 2017-07-18 Andy Estes <aestes@apple.com>
2252 [Xcode] Enable CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING
2253 https://bugs.webkit.org/show_bug.cgi?id=174631
2255 Reviewed by Darin Adler.
2257 * Configurations/Base.xcconfig:
2259 2017-07-18 Jonathan Bedard <jbedard@apple.com>
2261 Unreviewed build fix after r219595
2263 * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
2264 (WebCore::makeNeverDestroyed): Remove duplicate makeNeverDestroyed definition.
2265 * platform/ios/DragImageIOS.mm:
2266 (WebCore::cascadeForSystemFont): Return correct FontCascade object.
2267 (WebCore::createDragImageForLink): Fix compiler error.
2269 2017-07-18 Daniel Bates <dabates@apple.com>
2271 Cleanup: Remove AlternativeTextInfo and use Variant to represent alternative text info details
2272 https://bugs.webkit.org/show_bug.cgi?id=174604
2274 I inadvertently did not commit some of my local changes.
2276 * editing/AlternativeTextController.cpp:
2277 (WebCore::AlternativeTextController::startAlternativeTextUITimer):
2278 (WebCore::AlternativeTextController::stopAlternativeTextUITimer):
2279 (WebCore::AlternativeTextController::applyPendingCorrection):
2280 (WebCore::AlternativeTextController::hasPendingCorrection):
2281 (WebCore::AlternativeTextController::show):
2282 (WebCore::AlternativeTextController::handleCancelOperation):
2283 (WebCore::AlternativeTextController::dismiss):
2284 (WebCore::AlternativeTextController::dismissSoon):
2285 (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
2286 (WebCore::AlternativeTextController::timerFired):
2287 (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
2288 (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
2289 (WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText):
2291 2017-07-17 Daniel Bates <dabates@apple.com>
2293 Cleanup: Remove AlternativeTextInfo and use Variant to represent alternative text info details
2294 https://bugs.webkit.org/show_bug.cgi?id=174604
2296 Reviewed by Darin Adler.
2298 Remove struct AlternativeTextInfo and represent the alternative text info as instance variables
2299 using Variant to hold either an autocorrection replacement string or the alternative dictation
2302 Not functionality changed. So, no new tests.
2304 * editing/AlternativeTextController.cpp: Remove header Event.h as it is ultimately included by TextEvent.h.
2305 (WebCore::AlternativeTextController::show): Update code as needed.
2306 (WebCore::AlternativeTextController::timerFired): Ditto.
2307 (WebCore::AlternativeTextController::alternativeTextClient): Substitute nullptr for 0.
2308 (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord): Update code as needed.
2309 (WebCore::AutocorrectionAlternativeDetails::create): Deleted.
2310 (WebCore::AutocorrectionAlternativeDetails::replacementString): Deleted.
2311 (WebCore::AutocorrectionAlternativeDetails::AutocorrectionAlternativeDetails): Deleted.
2312 (WebCore::DictationAlternativeDetails::create): Deleted.
2313 (WebCore::DictationAlternativeDetails::dictationContext): Deleted.
2314 (WebCore::DictationAlternativeDetails::DictationAlternativeDetails): Deleted.
2315 * editing/AlternativeTextController.h: Remove header Range.h and forward declare Range. Include header
2316 Position.h and wtf/Variant.h. Sort forward declarations.
2317 (WebCore::AlternativeTextDetails::~AlternativeTextDetails): Deleted.
2319 2017-07-18 Said Abou-Hallawa <sabouhallawa@apple.com>
2321 Async image decoding for large images should be disabled after the first time a tile is painted
2322 https://bugs.webkit.org/show_bug.cgi?id=174451
2324 Reviewed by Simon Fraser.
2326 Flashing because of DOM mutation can be fixed by disabling the asynchronous
2327 image decoding after the first time a tile was painted.
2329 We can detect this by consulting the tile repaintCount. If it is zero, then
2330 it is safe to use asynchronous image decoded. If the tile repaintCount is
2331 greater than zero, we are not sure if the renderer rectangle has an image
2332 drawn in it already or not. In this case we have to use the synchronous
2333 image decoding to avoid causing a flash.
2335 Tests: fast/images/async-image-background-change.html
2336 fast/images/async-image-src-change.html
2337 http/tests/multipart/multipart-async-image.html
2339 * page/PageOverlayController.cpp:
2340 (WebCore::PageOverlayController::paintContents):
2341 * page/PageOverlayController.h:
2342 * page/linux/ResourceUsageOverlayLinux.cpp:
2343 * page/mac/ServicesOverlayController.h:
2344 * page/mac/ServicesOverlayController.mm:
2345 (WebCore::ServicesOverlayController::Highlight::paintContents):
2346 * platform/graphics/BitmapImage.h:
2347 * platform/graphics/GraphicsLayer.cpp:
2348 (WebCore::GraphicsLayer::paintGraphicsLayerContents):
2349 * platform/graphics/GraphicsLayer.h:
2350 * platform/graphics/GraphicsLayerClient.h:
2351 (WebCore::GraphicsLayerClient::paintContents):
2352 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2353 (WebCore::LayerClient::platformCALayerPaintContents):
2354 * platform/graphics/ca/GraphicsLayerCA.cpp:
2355 (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
2356 * platform/graphics/ca/GraphicsLayerCA.h:
2357 * platform/graphics/ca/PlatformCALayer.h:
2358 * platform/graphics/ca/PlatformCALayerClient.h:
2359 (WebCore::PlatformCALayerClient::platformCALayerRepaintCount):
2360 * platform/graphics/ca/TileCoverageMap.cpp:
2361 (WebCore::TileCoverageMap::platformCALayerPaintContents):
2362 * platform/graphics/ca/TileCoverageMap.h:
2363 * platform/graphics/ca/TileGrid.cpp:
2364 (WebCore::TileGrid::platformCALayerPaintContents):
2365 (WebCore::TileGrid::platformCALayerRepaintCount):
2366 * platform/graphics/ca/TileGrid.h:
2367 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2368 (PlatformCALayer::drawLayerContents):
2369 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2370 (PlatformCALayer::drawLayerContents):
2371 * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2372 (PlatformCALayerWinInternal::displayCallback):
2373 * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
2374 (WebTiledBackingLayerWin::displayCallback):
2375 * platform/graphics/mac/WebLayer.mm:
2376 (-[WebLayer drawInContext:]):
2377 (-[WebSimpleLayer drawInContext:]):
2378 * rendering/RenderBoxModelObject.cpp:
2379 (WebCore::RenderBoxModelObject::decodingModeForImageDraw):
2380 * rendering/RenderElement.h:
2381 * rendering/RenderLayerBacking.cpp:
2382 (WebCore::RenderLayerBacking::paintContents):
2383 * rendering/RenderLayerBacking.h:
2384 * rendering/RenderLayerCompositor.cpp:
2385 (WebCore::RenderLayerCompositor::paintContents):
2386 * rendering/RenderLayerCompositor.h:
2387 * testing/Internals.cpp:
2388 (WebCore::imageFromImageElement):
2389 (WebCore::bitmapImageFromImageElement):
2390 (WebCore::Internals::imageFrameIndex):
2391 (WebCore::Internals::setImageFrameDecodingDuration):
2392 (WebCore::Internals::resetImageAnimation):
2393 (WebCore::Internals::isImageAnimating):
2394 (WebCore::Internals::setClearDecoderAfterAsyncFrameRequestForTesting):
2395 (WebCore::Internals::imageDecodeCount):
2396 (WebCore::Internals::setLargeImageAsyncDecodingEnabledForTesting):
2397 * testing/Internals.h:
2398 * testing/Internals.idl:
2400 2017-07-18 Chris Dumez <cdumez@apple.com>
2402 DOMException should have its properties on the prototype
2403 https://bugs.webkit.org/show_bug.cgi?id=174597
2405 Reviewed by Alex Christensen.
2407 DOMException should have its properties on the prototype, as other interfaces:
2408 - https://heycam.github.io/webidl/#idl-DOMException
2410 No new tests, rebaselined existing tests.
2412 * bindings/scripts/CodeGeneratorJS.pm:
2413 (InterfaceRequiresAttributesOnInstance):
2415 2017-07-18 Basuke Suzuki <Basuke.Suzuki@sony.com>
2417 [Curl] Unify ResourceHandleManager into CurlJobManager.
2418 https://bugs.webkit.org/show_bug.cgi?id=173991
2420 Use CurlJobManager to make ResourceHandle run in background.
2421 CurlJobManager::start() now accept callback to manage life cycle
2422 of the resource easily in a same context.
2423 Actual management tasks of CurlJobManager is now private class
2424 in CurlJobManager which is better thread safeness.
2425 ResourceHandleManager is deleted at all.
2427 Reviewed by Alex Christensen.
2429 * platform/Curl.cmake:
2430 * platform/network/ResourceHandle.h:
2431 * platform/network/curl/CookieJarCurl.cpp:
2432 (WebCore::cookiesForSession):
2433 * platform/network/curl/CurlContext.cpp:
2434 (WebCore::CurlHandle::CurlHandle):
2435 (WebCore::CurlHandle::~CurlHandle):
2436 (WebCore::CurlHandle::errorDescription):
2437 (WebCore::CurlHandle::perform):
2438 (WebCore::CurlHandle::pause):
2439 (WebCore::CurlHandle::appendRequestHeaders):
2440 (WebCore::CurlHandle::appendRequestHeader):
2441 (WebCore::CurlHandle::enableRequestHeaders):
2442 (WebCore::CurlHandle::fetchCookieList):
2443 (WebCore::CurlHandle::getEffectiveURL):
2444 (WebCore::CurlHandle::setPrivateData): Deleted.
2445 (WebCore::CurlHandle::clearRequestHeaders): Deleted.
2446 (WebCore::CurlHandle::getCookieList): Deleted.
2447 (WebCore::CurlHandle::clearCookieList): Deleted.
2448 * platform/network/curl/CurlContext.h:
2449 (WebCore::CurlSList::CurlSList):
2450 (WebCore::CurlSList::~CurlSList):
2451 (WebCore::CurlSList::operator struct curl_slist** ):
2452 (WebCore::CurlSList::head):
2453 (WebCore::CurlSList::isEmpty):
2454 (WebCore::CurlSList::clear):
2455 (WebCore::CurlSList::append):
2456 (WebCore::CurlHandle::errorCode):
2457 (WebCore::CurlHandle::setErrorCode):
2458 (WebCore::CurlHandle::privateData):
2459 (WebCore::CurlHandle::setPrivateData):
2460 * platform/network/curl/CurlDownload.cpp:
2461 (WebCore::CurlDownload::start):
2462 (WebCore::CurlDownload::cancel):
2463 (WebCore::CurlDownload::addHeaders):
2464 (WebCore::CurlDownload::didReceiveData):
2465 (WebCore::CurlDownload::didFail):
2466 (WebCore::CurlDownload::handleCurlMsg): Deleted.
2467 * platform/network/curl/CurlDownload.h:
2468 * platform/network/curl/CurlJobManager.cpp:
2469 (WebCore::CurlJobList::append):
2470 (WebCore::CurlJobList::cancel):
2471 (WebCore::CurlJobList::complete):
2472 (WebCore::CurlJobList::isEmpty):
2473 (WebCore::CurlJobList::withJob):
2474 (WebCore::CurlJobList::withCurlHandle):
2475 (WebCore::CurlJob::invoke):
2476 (WebCore::CurlJobManager::add):
2477 (WebCore::CurlJobManager::cancel):
2478 (WebCore::CurlJobManager::callOnJobThread):
2479 (WebCore::CurlJobManager::startThreadIfNeeded):
2480 (WebCore::CurlJobManager::stopThreadIfNoMoreJobRunning):
2481 (WebCore::CurlJobManager::stopThread):
2482 (WebCore::CurlJobManager::updateJobs):
2483 (WebCore::CurlJobManager::workerThread):
2484 (WebCore::CurlJobManager::CurlJobManager): Deleted.
2485 (WebCore::CurlJobManager::~CurlJobManager): Deleted.
2486 (WebCore::CurlJobManager::remove): Deleted.
2487 (WebCore::CurlJobManager::getActiveCount): Deleted.
2488 (WebCore::CurlJobManager::getPendingCount): Deleted.
2489 (WebCore::CurlJobManager::stopThreadIfIdle): Deleted.
2490 (WebCore::CurlJobManager::updateHandleList): Deleted.
2491 (WebCore::CurlJobManager::addToCurl): Deleted.
2492 (WebCore::CurlJobManager::removeFromCurl): Deleted.
2493 * platform/network/curl/CurlJobManager.h:
2494 (WebCore::CurlJob::CurlJob):
2495 (WebCore::CurlJob::~CurlJob):
2496 (WebCore::CurlJob::operator=):
2497 (WebCore::CurlJob::curlHandle):
2498 (WebCore::CurlJob::ticket):
2499 (WebCore::CurlJob::finished):
2500 (WebCore::CurlJob::error):
2501 (WebCore::CurlJob::cancel):
2502 (WebCore::CurlJobManager::singleton):
2503 (WebCore::CurlJobManager::~CurlJobManager):
2504 (WebCore::CurlJobManager::isActiveJob):
2505 (WebCore::CurlJobManager::runThread): Deleted.
2506 (WebCore::CurlJobManager::setRunThread): Deleted.
2507 * platform/network/curl/ResourceError.h:
2508 (WebCore::ResourceError::ResourceError):
2509 * platform/network/curl/ResourceHandleCurl.cpp:
2510 (WebCore::ResourceHandle::~ResourceHandle):
2511 (WebCore::ResourceHandle::start):
2512 (WebCore::ResourceHandle::cancel):
2513 (WebCore::ResourceHandle::initialize):
2514 (WebCore::ResourceHandle::applyAuthentication):
2515 (WebCore::getFormElementsCount):
2516 (WebCore::ResourceHandle::setupPUT):
2517 (WebCore::ResourceHandle::setupPOST):
2518 (WebCore::ResourceHandle::setupFormData):
2519 (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
2520 (WebCore::ResourceHandle::setClientCertificateInfo):
2521 (WebCore::ResourceHandle::platformSetDefersLoading):
2522 (WebCore::ResourceHandle::didFinish):
2523 (WebCore::ResourceHandle::didFail):
2524 (WebCore::ResourceHandle::shouldUseCredentialStorage):
2525 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2526 (WebCore::ResourceHandle::receivedCredential):
2527 (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2528 (WebCore::ResourceHandle::receivedCancellation):
2529 (WebCore::ResourceHandle::calculateWebTimingInformations):
2530 (WebCore::ResourceHandle::handleLocalReceiveResponse):
2531 (WebCore::ResourceHandle::willPrepareSendData):
2532 (WebCore::ResourceHandle::didReceiveHeaderLine):
2533 (WebCore::ResourceHandle::didReceiveAllHeaders):
2534 (WebCore::ResourceHandle::didReceiveContentData):
2535 (WebCore::ResourceHandle::readCallback):
2536 (WebCore::ResourceHandle::headerCallback):
2537 (WebCore::ResourceHandle::writeCallback):
2538 (WebCore::ResourceHandle::platformLoadResourceSynchronously):
2539 (WebCore::ResourceHandle::dispatchSynchronousJob):
2540 (WebCore::calculateWebTimingInformations): Deleted.
2541 (WebCore::handleLocalReceiveResponse): Deleted.
2542 (WebCore::writeCallback): Deleted.
2543 (WebCore::headerCallback): Deleted.
2544 (WebCore::readCallback): Deleted.
2545 (WebCore::setupFormData): Deleted.
2546 (WebCore::ResourceHandle::handleCurlMsg): Deleted.
2547 * platform/network/curl/ResourceHandleManager.cpp: Removed.
2548 * platform/network/curl/ResourceHandleManager.h: Removed.
2550 2017-07-17 Konstantin Tokarev <annulen@yandex.ru>
2552 Unreviewed fix to Mac CMake build after r219474.
2554 * PlatformMac.cmake:
2556 2017-07-17 Konstantin Tokarev <annulen@yandex.ru>
2558 [cmake] Set library types before their targets are created
2559 https://bugs.webkit.org/show_bug.cgi?id=174600
2561 Reviewed by Michael Catanzaro.
2563 Since r219560 library targets are created before PlatformXXX.cmake
2564 files are processed, however library type must be passed in
2565 add_library() call and cannot be changed afterwards. Set these
2566 variables in OptionsXXX.cmake.
2568 No new tests needed.
2570 * PlatformMac.cmake:
2572 2017-07-17 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
2574 Move USE_AVFOUNDATION definition on Windows to wtf/Platform.h
2575 https://bugs.webkit.org/show_bug.cgi?id=174356
2577 Reviewed by Brent Fulgham.
2579 Move the definition of USE_AVFOUNDATION on Windows to wtf/platform.h
2581 Rename WebCoreHeaderDetection.h to AVFoundationHeaderDetection.h
2583 * AVFoundationSupport.py: Moved to Source/WTF/AVFoundationSupport.py.
2584 * DerivedSources.make:
2585 * PlatformWin.cmake:
2587 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2588 * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2590 2017-07-17 Sam Weinig <sam@webkit.org>
2592 [WebIDL] Remove custom bindings that require non-caching JS strings
2593 https://bugs.webkit.org/show_bug.cgi?id=174552
2595 Reviewed by Darin Adler.
2597 Adds two new types, UncachedString and OwnedString (both of which
2598 are simple structs that wrap a String) to communicate to the bindings
2599 layer which function to use when converting to a JS string.
2601 * bindings/IDLTypes.h:
2602 (WebCore::IDLString::isNullValue):
2603 Add overloads of isNullValue for UncachedString and OwnedString.
2605 * bindings/js/JSDOMConvertStrings.h:
2606 (WebCore::JSConverter<IDLDOMString>::convert):
2607 (WebCore::JSConverter<IDLByteString>::convert):
2608 (WebCore::JSConverter<IDLUSVString>::convert):
2609 Add overloads of convert for UncachedString that uses JSC::jsString
2610 and for OwnedString that uses JSC::jsOwnedString.
2612 * bindings/js/JSHTMLCanvasElementCustom.cpp:
2613 (WebCore::JSHTMLCanvasElement::toDataURL): Deleted.
2614 Remove custom binding for toDataURL.
2616 * bindings/js/JSXMLHttpRequestCustom.cpp:
2617 (WebCore::JSXMLHttpRequest::retrieveResponse):
2618 (WebCore::JSXMLHttpRequest::responseText): Deleted.
2619 Remove custom binding for responseText. Replace the caller of the
2620 binding function with a simple conversion that will do the same thing.
2622 * bindings/js/StringAdaptors.h: Added.
2623 Add UncachedString and OwnedString adaptors.
2625 * html/HTMLCanvasElement.cpp:
2626 (WebCore::HTMLCanvasElement::toDataURL):
2627 Move quality conversion here, matching toBlob and the spec. Return a UncachedString
2628 to instruct the bindings to use JSC::jsString and not JSC::jsStringWithCache.
2630 (WebCore::HTMLCanvasElement::toBlob):
2631 Use asNumber() rather than toNumber(), since we just checked that it is a number.
2633 * html/HTMLCanvasElement.h:
2634 Update header to account for returning an UncachedString.
2636 * html/HTMLCanvasElement.idl:
2637 Remove [Custom] and make the signature of toDataURL match the spec (and what we have been doing).
2639 * inspector/InspectorCanvasAgent.cpp:
2640 (WebCore::InspectorCanvasAgent::requestContent):
2641 Update to account for UncachedString.
2643 * xml/XMLHttpRequest.cpp:
2644 (WebCore::XMLHttpRequest::responseText):
2645 * xml/XMLHttpRequest.h:
2646 Update responseText to return OwnedString. OwnedString instruct the bindings to
2647 use JSC::jsOwnedString and not JSC::jsStringWithCache.
2649 * xml/XMLHttpRequest.idl:
2650 Remove [CustomGetter].
2652 2017-07-17 Daniel Bates <dabates@apple.com>
2654 Cleanup: Use OptionSet to represent marker types
2655 https://bugs.webkit.org/show_bug.cgi?id=174594
2657 Reviewed by Darin Adler.
2659 Remove class DocumentMarker::MarkerTypes that duplicates most of functionality of OptionSet
2660 and use OptionSet directly to represent a set of marker types.
2662 No functionality changed. So, no new tests.
2665 (WebCore::Document::updateLayout):
2666 * dom/DocumentMarker.h:
2667 (WebCore::DocumentMarker::MarkerTypes::MarkerTypes): Deleted.
2668 (WebCore::DocumentMarker::MarkerTypes::contains): Deleted.
2669 (WebCore::DocumentMarker::MarkerTypes::intersects): Deleted.
2670 (WebCore::DocumentMarker::MarkerTypes::operator==): Deleted.
2671 (WebCore::DocumentMarker::MarkerTypes::add): Deleted.
2672 (WebCore::DocumentMarker::MarkerTypes::remove): Deleted.
2673 (WebCore::DocumentMarker::AllMarkers::AllMarkers): Deleted.
2674 * dom/DocumentMarkerController.cpp:
2675 (WebCore::DocumentMarkerController::possiblyHasMarkers):
2676 (WebCore::DocumentMarkerController::detach):
2677 (WebCore::DocumentMarkerController::removeMarkers):
2678 (WebCore::DocumentMarkerController::addMarker):
2679 (WebCore::DocumentMarkerController::copyMarkers):
2680 (WebCore::DocumentMarkerController::markersFor):
2681 (WebCore::DocumentMarkerController::markersInRange):
2682 (WebCore::DocumentMarkerController::removeMarkersFromList):
2683 (WebCore::DocumentMarkerController::repaintMarkers):
2684 (WebCore::DocumentMarkerController::shiftMarkers):
2685 (DocumentMarkerController::setMarkersActive):
2686 (DocumentMarkerController::hasMarkers):
2687 (DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
2688 Update code as needed.
2690 * dom/DocumentMarkerController.h:
2691 (WebCore::DocumentMarkerController::hasMarkers):
2692 Update code as needed.
2694 * editing/AlternativeTextController.cpp:
2695 (WebCore::markerTypesForAutocorrection):
2696 (WebCore::markerTypesForReplacement):
2697 (WebCore::markerTypesForAppliedDictationAlternative):
2698 Marked as inline and returns an OptionSet<DocumentMarker::MarkerType>. It is unnecessary to use NeverDestroyed
2699 in these functions as constructing an OptionSet and copying/moving it is very efficient. Such operations are
2700 effectively equivalent to an integral assignment and copy of an integral value, respectively.
2702 (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2703 (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
2704 (WebCore::AlternativeTextController::markCorrection):
2705 Update code as needed.
2707 * editing/AlternativeTextController.h: While I am here, remove some unnecessary #includes and group
2708 forward declarations of structs.
2709 * editing/CompositeEditCommand.cpp:
2710 (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers): Update code as needed.
2711 * editing/Editor.cpp:
2712 (WebCore::Editor::updateMarkersForWordsAffectedByEditing): Ditto.
2713 * editing/SpellChecker.cpp:
2714 (WebCore::SpellChecker::didCheckSucceed): Ditto.
2715 * page/ios/FrameIOS.mm:
2716 (WebCore::Frame::interpretationsForCurrentRoot): Ditto.
2717 * testing/Internals.cpp:
2718 (WebCore::markerTypesFrom): Ditto.
2719 (WebCore::Internals::markerCountForNode): Ditto.
2720 (WebCore::Internals::markerAt): Ditto.
2722 2017-07-17 Devin Rousso <drousso@apple.com>
2724 Web Inspector: overlay page highlight doesn't disappear when a page is constantly updating
2725 https://bugs.webkit.org/show_bug.cgi?id=174468
2727 Reviewed by Simon Fraser.
2729 Do not allow the PageOverlay to start another fade animation of the same type if one has
2730 already started. As an example, if the PageOverlay is fading out, startFadeOutAnimation
2733 * page/PageOverlay.cpp:
2734 (WebCore::PageOverlay::startFadeInAnimation):
2735 (WebCore::PageOverlay::startFadeOutAnimation):
2737 2017-07-17 Darin Adler <darin@apple.com>
2739 Improve use of NeverDestroyed
2740 https://bugs.webkit.org/show_bug.cgi?id=174348
2742 Reviewed by Sam Weinig.
2744 * Modules/encryptedmedia/MediaKeySession.cpp: Removed unneeded include of
2747 * Modules/encryptedmedia/legacy/LegacyCDM.cpp:
2748 (WebCore::installedCDMFactories): Use makeNeverDestroyed and a lambda rather
2749 than a separate boolean for initialization.
2751 * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
2752 (WebCore::clearKeyVM): Removed unneeded use of NeverDestroyed to hold a
2753 RefPtr. Simple to just use leakRef instead.
2755 * Modules/gamepad/GamepadManager.cpp: Added an include of NeverDestroyed.h.
2757 * Modules/indexeddb/IDBTransaction.cpp: Removed unneeded include of
2759 * Modules/indexeddb/server/MemoryObjectStore.cpp: Ditto.
2761 * Modules/mediasession/MediaSessionManager.cpp: Moved include of
2762 NeverDestroyed.h here ...
2763 * Modules/mediasession/MediaSessionManager.h: ... from here.
2765 * Modules/mediasource/MediaSourceRegistry.cpp: Moved include of
2766 NeverDestroyed.h here ...
2767 * Modules/mediasource/MediaSourceRegistry.h: ... from here.
2769 * Modules/mediasource/SourceBuffer.cpp: Removed unneeded include of
2772 * Modules/plugins/QuickTimePluginReplacement.h: Initialize
2773 m_scriptObject in the class definition.
2775 * Modules/plugins/QuickTimePluginReplacement.mm:
2776 (WebCore::QuickTimePluginReplacement::supportsMimeType): Use
2777 makeNeverDestroyed and the HashSet constructor instead of a loop.
2778 (WebCore::QuickTimePluginReplacement::supportsFileExtension): Ditto.
2779 (WebCore::QuickTimePluginReplacement::QuickTimePluginReplacement): Did a
2780 slight cleanup of the initializers.
2781 (WebCore::QuickTimePluginReplacement::~QuickTimePluginReplacement): Added
2782 a FIXME; unclear why there is code here at all.
2784 * accessibility/AccessibilityRenderObject.cpp:
2785 (WebCore::AccessibilityRenderObject::inheritsPresentationalRole): Use
2786 makeNeverDestroyed and the Vector constructor instead of using empty
2787 vector checks and Vector::add. Use std::any_of rather than Vector::contains
2788 since we now are matching against pointers.
2790 * bindings/scripts/CodeGeneratorJS.pm:
2791 (GenerateEnumerationImplementationContent): Use const NeverDestroyed.
2793 * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
2794 * bindings/scripts/test/JS/JSTestObj.cpp:
2795 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
2796 * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
2799 * css/CSSProperty.cpp:
2800 (WebCore::borderDirections): Removed unnecesssary use of NeverDestroyed
2801 for a global object that has a trivial destructor.
2803 * css/ElementRuleCollector.cpp:
2804 (WebCore::leftToRightDeclaration): Removed unneeded use of NeverDestroyed to hold a
2805 Ref. Simple to just use leakRef instead. Also use a lambda instead of an explicit
2806 isEmpty check each time this is called.
2807 (WebCore::rightToLeftDeclaration): Ditto.
2809 * css/makeprop.pl: Removed unneeded include of NeverDestroyed.h and the
2810 uneeded global emptyShorthand. Constructing an empty StylePropertyShorthand
2811 is no less efficient than copying a global empty one was.
2813 * dom/CustomElementReactionQueue.cpp: Added an include of NeverDestroyed.h.
2815 * dom/DOMImplementation.cpp: Removed unneeded include of NeverDestroyed.h.
2816 * dom/InputEvent.cpp: Ditto.
2818 * dom/Microtasks.cpp: Moved include of NeverDestroyed.h here ...
2819 * dom/Microtasks.h: ... from here.
2821 * dom/MutationObserver.cpp: Added an include of NeverDestroyed.h.
2823 * dom/ScopedEventQueue.cpp: Moved include of NeverDestroyed.h here ...
2824 * dom/ScopedEventQueue.h: ... from here. Added Forward.h.
2826 * dom/ScriptElement.cpp:
2827 (WebCore::isLegacySupportedJavaScriptLanguage): Use makeNeverDestroyed
2828 and the HashSet constructor rather than an isEmpty check and a lot of
2829 add function calls. Also removed comments that don't have value any more,
2830 with dubious no longer relevant claims about the behavior of old web browsers.
2831 The function that calls this one already has sufficient comments about why we
2832 hope some day this function can be eliminated.
2834 * dom/SecurityContext.cpp: Removed unneeded include of NeverDestroyed.h.
2836 * dom/make_names.pl:
2837 (printFactoryCppFile): Instead of using a "populate" function, use a function
2838 that creates as HashMap. Then use const auto and makeNeverDestroyed.
2839 (printWrapperFactoryCppFile): Ditto.
2841 * editing/AlternativeTextController.cpp:
2842 (WebCore::markerTypesForAutocorrection): Use makeNeverDestroyed
2843 and the Vector constructor rather than an isEmpty check and a lot of
2844 append function calls.
2845 (WebCore::markerTypesForReplacement): Ditto.
2846 (WebCore::markerTypesForAppliedDictationAlternative): Ditto.
2848 * editing/EditingStyle.cpp:
2849 (WebCore::htmlElementEquivalents): Use const auto, makeNeverDestroyed,
2850 the Vector constructor, and new rather than make_unique. Changed return
2851 type to use const pointers rather than unique_ptr with non-const type.
2852 (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement): Updated
2853 for the above change to htmlElementEquivalents.
2854 (WebCore::htmlAttributeEquivalents): Same approach as above.
2855 (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes): Ditto.
2856 (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Take
2857 references instead of pointers.
2858 (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement): Updated
2861 * editing/FormatBlockCommand.cpp:
2862 (WebCore::isElementForFormatBlock): Use const auto, makeNeverDestroyed,
2863 and the HashSet constructor rather than isEmpty and a lot of calls to add.
2864 * editing/RemoveFormatCommand.cpp:
2865 (WebCore::isElementForRemoveFormatCommand): Ditto.
2867 * editing/ReplaceSelectionCommand.cpp:
2868 (WebCore::isProhibitedParagraphChild): Use const auto, makeNeverDestroyed,
2869 and a lambda, rather than isEmpty and a lot of calls to add.
2871 * html/Autofill.cpp:
2872 (WebCore::fieldNameMap): Changed return type to be const. Use const auto,
2873 makeNeverDestroyed, a lambda, and an array of values rather than isEmpty
2874 and a lot of calls to add. Stopped doing the ConstructFromLiteral
2875 optimization here. (Easy to add it back if that is a mistake.)
2877 * html/HTMLObjectElement.cpp:
2878 (WebCore::isRecognizedTagName): Use const auto, makeNeverDestroyed, and
2879 a lambda rather than isEmpty.
2881 * html/HTMLStyleElement.cpp: Added include of NeverDestroyed.h.
2883 * html/HTMLVideoElement.cpp: Removed uneeded include of NeverDestroyed.h.
2885 * html/InputType.cpp:
2886 (WebCore::createInputTypeFactoryMap): Replaced the populate function
2887 with this create function.
2888 (WebCore::InputType::create): Use const auto and makeNeverDestroyed
2889 istead of isEmpty. Also put the map right where it is used so it's
2890 not initialized in code path where not needed.
2892 * html/parser/HTMLParserIdioms.cpp: Removed uneeded include of
2895 * inspector/InspectorApplicationCacheAgent.cpp:
2896 (WebCore::InspectorApplicationCacheAgent::networkStateChanged):
2897 Merged into a single line.
2899 * loader/ContentFilter.cpp:
2900 (WebCore::blockedPageURL): Use const auto and makeNeverDestroyed
2901 rather than std::call_once. Since this is a URL and has a non-thread-safe
2902 reference count, this was not thread safe before, so no need to use the
2903 more roundabout and less efficient idiom for its thread safety.
2905 * loader/CrossOriginAccessControl.cpp:
2906 (WebCore::isOnAccessControlResponseHeaderWhitelist): Deleted.
2907 * loader/CrossOriginAccessControl.h: Deleted unused function
2908 isOnAccessControlResponseHeaderWhitelist.
2910 * loader/EmptyClients.cpp: Use leakRef instead of NeverDestroyed<Ref>.
2912 * loader/appcache/ApplicationCacheStorage.cpp: Removed unneeded include of
2914 * page/CaptionUserPreferences.cpp: Ditto.
2916 * page/DebugPageOverlays.cpp:
2917 (WebCore::touchEventRegionColors): Changed the return type to const, since
2918 the callers do not modify the map. Use const auto, makeNeverDestroyed, and
2919 a lambda rather than isEmpty and repeated calls to add.
2921 * page/MainFrame.cpp: Removed unneeded include of NeverDestroyed.h.
2923 * page/MemoryRelease.cpp:
2924 (WebCore::releaseMemory): Use a function directly instead of calling it
2927 * page/NavigatorBase.cpp:
2928 (WebCore::NavigatorBase::onLine): Updated to call
2929 NetworkStateNotifier::singleton.
2932 (WebCore::allPages): Made this a function instead of a global to use the
2933 normal idiom for such globals.
2934 (WebCore::Page::forEachPage): Updated for change to allPages.
2935 (WebCore::networkStateChanged): Ditto. Also removed a bit of unnecessary
2936 churn by using const AtomicString& instead of AtomicString.
2937 (WebCore::Page::Page): Moved initialization of most data members to the
2938 class definition. Removed initialiation of allPages. Updated the use of
2939 NetworkStateNotifier for its new slightly changed interface.
2940 (WebCore::Page::~Page): Updated for change to allPages.
2941 (WebCore::Page::clearPreviousItemFromAllPages): Ditto.
2942 (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment): Ditto.
2943 (WebCore::Page::refreshPlugins): Ditto.
2945 * page/Page.h: Moved initialization of most data members here.
2947 * page/PerformanceUserTiming.cpp: Removed many unneded includes.
2948 (WebCore::restrictedMarkFunction): Use const auto, makeNeverDestroyed, and
2949 a lambda instead of isEmpty. Also use an array rather than std::array and
2950 got rid fo the unneeded use of anonymous namespace since this is fine in
2951 the top level WebCore namespace.
2952 (WebCore::clearPerformanceEntries): Tweaked coding style.
2953 (WebCore::UserTiming::mark): Ditto.
2954 (WebCore::UserTiming::findExistingMarkStartTime): Got rid of double hash
2955 table lookup by using find instead of using contains followed by get.
2956 removed unneeded explicit cast to double. Tweaked coding style.
2957 (WebCore::convertToEntrySequence): Tweaked coding style.
2958 (WebCore::getEntrySequenceByName): Deleted.
2959 (WebCore::UserTiming::getMarks): Call get directly instead of getEntrySequenceByName.
2960 (WebCore::UserTiming::getMeasures): Ditto.
2962 * page/RuntimeEnabledFeatures.cpp: Moved include of NeverDestroyed.h here ...
2963 * page/RuntimeEnabledFeatures.h: ... from here. Added Forward.h and Noncopyable.h.
2965 * platform/LocalizedStrings.cpp: Removed unneeded include of NeverDestroyed.h.
2967 * platform/MIMETypeRegistry.cpp:
2968 (WebCore::initializeSupportedImageMIMETypes): Added a missing const for a global
2970 (WebCore::initializeSupportedJavaScriptMIMETypes): Ditto.
2971 (WebCore::initializeSupportedNonImageMimeTypes): Ditto.
2972 (WebCore::typesForCommonExtension): Replaced the old mediaMIMETypeMap function
2973 with this one. Moved the common media types array here since it's only used here.
2974 Use const auto, makeNeverDestroyed, and a lambda instead of using an isEmpty check.
2975 Iterate the array using a mdoern for loop. Use HashMap::ensure to avoid the
2976 double hashing that the old code was doing. And moved the code to find an entry
2977 in the map in here from the client functions.
2978 (WebCore::MIMETypeRegistry::getMediaMIMETypeForExtension): Updated to use the
2979 typesForCommonExtension, and changed logic to use this first, and only call
2980 getMIMETypeForExtension for extensions not in the map. This gives the same
2981 result but should be slightly more efficient.
2982 (WebCore::MIMETypeRegistry::getMediaMIMETypesForExtension): Updated to use the
2983 typesForCommonExtension function. Comment about strategy is now in there.
2984 (WebCore::initializeUnsupportedTextMIMETypes): Added a missing const for a global
2985 constant array. Also started using ASCIILiteral.
2987 * platform/MainThreadSharedTimer.cpp: Moved include of NeverDestroyed.h here ...
2988 * platform/MainThreadSharedTimer.h: ... from here. Added Forward.h.
2990 * platform/SchemeRegistry.cpp:
2991 (WebCore::add): Added helper functions to keep code below simpler.
2992 (WebCore::makeNeverDestroyedSchemeSet): Ditto.
2993 (WebCore::allBuiltinSchemes): Use const auto, makeNeverDestroyed, a lambda,
2994 and the helper functions above, rather than isEmpty.
2995 (WebCore::builtinLocalURLSchemes): Use const auto, makeNeverDestroyed, and
2996 the HashSet constructor instead of isEmpty and add calls. Also changed the
2997 return type to be const.
2998 (WebCore::localURLSchemes): Copy the map using assignment instead of an
2999 isEmpty function and a loop with calls to add.
3000 (WebCore::builtinSecureSchemes): Use const auto, makeNeverDestroyed, and
3001 the Vector constructor rather than isEmpty, repeated calls to append,
3003 (WebCore::secureSchemes): Use auto and makeNeverDestroyedSchemeSet rather
3004 than isEmpty and repeated calls to add.
3005 (WebCore::builtinSchemesWithUniqueOrigins): More of the same.
3006 (WebCore::schemesWithUniqueOrigins): Ditto.
3007 (WebCore::builtinEmptyDocumentSchemes): Ditto.
3008 (WebCore::emptyDocumentSchemes): Ditto.
3009 (WebCore::schemesForbiddenFromDomainRelaxation): Ditto.
3010 (WebCore::builtinCanDisplayOnlyIfCanRequestSchemes): Ditto.
3011 (WebCore::canDisplayOnlyIfCanRequestSchemes): Ditto.
3012 (WebCore::builtinCORSEnabledSchemes): Ditto.
3013 (WebCore::CORSEnabledSchemes): Ditto.
3014 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal): Replaced check for
3015 empty string with check for null string, since that's slightly more efficient
3016 for non-null, non-empty strings, and the hash table can handle empty strings
3018 (WebCore::SchemeRegistry::registerURLSchemeAsNoAccess): Added null check here.
3019 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNoAccess): Ditto.
3020 (WebCore::SchemeRegistry::registerURLSchemeAsDisplayIsolated): Ditto.
3021 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated): Ditto.
3022 (WebCore::SchemeRegistry::registerURLSchemeAsSecure): Ditto.
3023 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure): Ditto.
3024 (WebCore::SchemeRegistry::registerURLSchemeAsEmptyDocument): Ditto.
3025 (WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument): Ditto.
3026 (WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme): Ditto.
3027 (WebCore::SchemeRegistry::isDomainRelaxationForbiddenForURLScheme): Ditto.
3028 (WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest): Ditto.
3029 (WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest): Ditto.
3030 (WebCore::SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs): Ditto.
3031 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs): Ditto.
3032 (WebCore::SchemeRegistry::registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing): Ditto.
3033 (WebCore::SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing): Ditto.
3034 (WebCore::SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing): Ditto.
3035 (WebCore::SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing): Ditto.
3036 (WebCore::SchemeRegistry::registerURLSchemeAsCORSEnabled): Ditto.
3037 (WebCore::SchemeRegistry::shouldTreatURLSchemeAsCORSEnabled): Ditto.
3038 (WebCore::SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy): Ditto.
3039 (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy): Ditto.
3040 (WebCore::SchemeRegistry::schemeShouldBypassContentSecurityPolicy): Ditto.
3041 (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated): Ditto.
3042 (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme): Ditto.
3043 (WebCore::SchemeRegistry::registerURLSchemeAsCachePartitioned): Ditto.
3044 (WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme): Ditto.
3045 (WebCore::SchemeRegistry::isUserExtensionScheme): Tweaked #if a bit.
3046 (WebCore::SchemeRegistry::isBuiltinScheme): Added null check.
3048 * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
3049 (WebVideoFullscreenModelVideoElement::observedEventNames): Use const auto,
3050 makeNeverDestroyed, and the Vector constructor rather than a call to size
3051 and then append eacn time this funciton is called.
3053 * platform/gamepad/cocoa/GameControllerGamepadProvider.h: Moved include of
3054 NeverDestroyed.h from here ...
3055 * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: ... to here.
3057 * platform/gamepad/mac/HIDGamepadProvider.cpp: Moved include of
3058 NeverDestroyed.h here ...
3059 * platform/gamepad/mac/HIDGamepadProvider.h: ... from here.
3061 * platform/graphics/FontCascade.cpp:
3062 (WebCore::FontCascade::hasValidAverageCharWidth): Use const auto,
3063 makeNeverDestroyed, and the HashSet constructor.
3065 * platform/graphics/ImageBuffer.cpp:
3066 (WebCore::ImageBuffer::transformColorSpace): Removed unneeded use of
3067 NeverDestroyed<Vector<int>> here, instead using const std::array.
3069 * platform/graphics/ImageBuffer.h: Changed platformTransformColorSpace to take
3070 const std::array<uint8_t, 256>& instead of const Vector<int>&, since the whole
3071 pointer of the argument is that it's a table to map bytes onto other bytes.
3073 * platform/graphics/MediaPlaybackTarget.h: Removed unneeded include of
3074 NeverDestroyed.h, unneeded unused noMediaPlaybackTargetContext function,
3075 and unneeded include of MediaPlaybackTargetContext.h, forward declaring instead.
3076 Made most functions in this class pure virtual instead of having default
3079 * platform/graphics/avfoundation/MediaPlaybackTargetMac.h: Added include
3080 of MediaPlaybackTargetContext.h now that it was removed above.
3082 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3083 (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Use const auto,
3084 makeNeverDestroyed, and the HashSet constructor.
3086 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3087 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Reversed the sense
3088 of the boolean logic here to make this simpler and easier to read.
3089 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes): Changed
3090 the implementation here, which empties out the passed in hash set, to use
3091 the clear function rather than assignment from a global empty hash set. Added
3092 a FIXME because it seems peculiar that this would be considered OK.
3093 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType): Used ? : to make
3094 this a little more terse; I think it's clearer.
3096 * platform/graphics/cairo/ImageBufferCairo.cpp:
3097 (WebCore::ImageBuffer::platformTransformColorSpace): Updated for change to
3100 * platform/graphics/cg/ImageDecoderCG.cpp: Removed unneeded include of
3102 (WebCore::appendImageSourceOption): Streamlined code using auto with
3103 adoptCF; there is no need to write out the type of the RetainPtr.
3104 (WebCore::imageSourceOptions): Instead of NeverDestroyed<RetainPtr>, just use
3105 const auto and leakRef.
3106 (WebCore::imageSourceAsyncOptions): Ditto.
3108 * platform/graphics/gtk/GdkCairoUtilities.cpp:
3109 (WebCore::getDefaultCairoFontOptions): Instead of using LazyNeverDestroyed
3110 on a pointer, just use a global pointer. There is no need to use any kind
3111 of NeverDestroyed on a type with a trivial destructor such as a pointer.
3113 * platform/graphics/ios/FontCacheIOS.mm:
3114 (WebCore::platformFontWithFamilySpecialCase): Instead of using
3115 NeverDestroyed<RetainPtr> just use a raw pointer global.
3116 * platform/graphics/mac/FontCacheMac.mm:
3117 (WebCore::platformFontWithFamilySpecialCase): Ditto.
3119 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3120 (WebCore::createFileTypesSet): Return the HashSet instead of adding to it.
3121 Use Objective-C for/in syntax for an NSArray, not C++ for syntax, although
3122 it seems the C++ syntax was working fine.
3123 (WebCore::mimeCommonTypesCache): Fixed return type so we won't copy the
3124 HashMap every time this function is called. Use const auto and makeNeverDestroyed
3125 instead of using a boolean to do one time initialization.
3126 (WebCore::mimeModernTypesCache): Ditto.
3127 (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): Marked a
3128 constant array const.
3130 * platform/ios/Device.cpp:
3131 (WebCore::deviceClass): Use a lambda to initialize a variable here instead
3132 of using std::call_once. This function does not need to be thread safe.
3133 (WebCore::deviceName): Use const NeverDestroyed instead of LazyNeverDestroyed
3134 and std::call_once. This function does not need to be thread safe.
3136 * platform/ios/DragImageIOS.mm: Make defaultLinkIndicatorOptions be a
3137 constant instead of a variable.
3138 (WebCore::cascadeForSystemFont): Added helper function.
3139 (WebCore::createDragImageForLink): Use const auto and makeNeverDestroyed
3140 instead of LazyNeverDestroyed and dispatch_once. This code does not need
3141 to be thread safe since its arguments include, for example, a DOM element.
3143 * platform/ios/LegacyTileLayerPool.h: Removed unneeded include of
3146 * platform/ios/QuickLook.mm:
3147 (WebCore::QLPreviewGetSupportedMIMETypesSet): Use a global raw pointer
3148 instead of NeverDestroyed<RetainPtr<NSSet>>.
3149 (WebCore::createQLPreviewProtocol): Deleted.
3150 (WebCore::QLPreviewProtocol): Use a global raw pointer instead of
3151 a NeverDestroyed<Vector<char>>. It's cleaner to use fastStrdup instead
3152 of appending to an array, and less wasteful of memory too.
3154 * platform/ios/WebCoreMotionManager.mm: Removed unneeded include of
3156 * platform/ios/WebSQLiteDatabaseTrackerClient.h: Ditto.
3157 * platform/mac/DragImageMac.mm: Ditto.
3158 * platform/mediastream/CaptureDeviceManager.cpp: Ditto.
3159 * platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp: Ditto.
3161 * platform/mock/MockRealtimeMediaSource.cpp:
3162 (WebCore::MockRealtimeMediaSource::audioDevices): Use auto,
3163 makeNeverDestroyed, and a lambda instead of checking size each time.
3164 (WebCore::MockRealtimeMediaSource::videoDevices): Ditto.
3166 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3167 (WebCore::mimeTypeCache): Use const auto, makeNeverDestroyed, and the
3168 HashSet constructor instead of an explicit boolean to initialize.
3170 * platform/network/BlobRegistryImpl.cpp:
3171 (WebCore::blobUtilityQueue): Use a global with a raw reference instead
3172 of a NeverDestroyed<Ref>.
3174 * platform/network/NetworkStateNotifier.cpp:
3175 (WebCore::NetworkStateNotifier::singleton): Renamed this from
3176 networkStateNotifier. We must have missed this when we changed to use the
3177 singleton idiom consistently. Also changed to use normal NeverDestroyed
3178 rather than using LazyNeverDestroyed and call_once, because this is not
3179 used from multiple threads and has no special thread safety requirements.
3180 (WebCore::NetworkStateNotifier::NetworkStateNotifier): Moved the constructor
3181 here and construct the timer. Before the timer was used only on the Mac
3182 platform but now it is there for all platforms.
3183 (WebCore::NetworkStateNotifier::onLine): Moved function here from the header.
3184 It's a littlel less trivial than before because it now triggers a call to
3185 updateState as needed.
3186 (WebCore::NetworkStateNotifier::addListener): Renamed from
3187 addNetworkStateChangeListener since there is only one kind of listener and
3188 the old name was too wordy. Changed to call the new startObserving function,
3189 and guaranteed to call it onlh once. The platform-specific logic for iOS is
3190 now inside the iOS version of that function instead of here.
3191 (WebCore::NetworkStateNotifier::updateState): Moved here now that it is the
3192 same for all platforms. The actual state updating is done in a function named
3193 updateStateWithoutNotifying, which is implemented for each platform.
3194 (WebCore::NetworkStateNotifier::updateStateSoon): New function which takes
3195 advantage of the timer to coalesce network state updates.
3196 (WebCore::NetworkStateNotifier::updateStateWithoutNotifying): Empty stub
3197 version of this function.
3198 (WebCore::NetworkStateNotifier::startObserving): Ditto.
3199 (WebCore::NetworkStateNotifier::notifyNetworkStateChange): Deleted. Code from
3200 this has moved into updateState.
3202 * platform/network/NetworkStateNotifier.h: Greatly cut down what part of this
3203 class is platform-specific.
3205 * platform/network/ios/NetworkStateNotifierIOS.mm:
3206 (-[WebNetworkStateObserver initWithBlock:]): Simplified this class so it
3207 takes a block, rather than using a pointer to the C++ notifier and doing
3209 (-[WebNetworkStateObserver dealloc]): Ditto.
3210 (-[WebNetworkStateObserver networkStateChanged:]): Ditto.
3211 (WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
3212 This now calls isNetworkReachable.
3213 (WebCore::NetworkStateNotifier::startObserving): Check the
3214 Settings::shouldOptOutOfNetworkStateObservation function, and if it's OK
3215 to observe, then create the observer. This code now takes care of the
3216 WebThreadRun and calls updateStateSoon.
3217 (WebCore::NetworkStateNotifier::NetworkStateNotifier): Deleted. The
3218 constructor is now platform independent.
3219 (WebCore::NetworkStateNotifier::~NetworkStateNotifier): Deleted. This
3220 object is never destroyed so we should not write a destructor for it.
3221 (WebCore::NetworkStateNotifier::registerObserverIfNecessary): Deleted.
3222 Replaced by startObserving.
3223 (WebCore::NetworkStateNotifier::onLine): Deleted. This function is now
3224 platform-independent.
3225 (WebCore::setOnLine): Deleted. The logic from this is now in
3226 updateState and updateStateWithoutNotifying.
3228 * platform/network/mac/NetworkStateNotifierMac.cpp:
3229 (WebCore::NetworkStateNotifier::updateStateWithoutNotifying): Renamed
3230 this from updateState and tightened up the code a bit. Also changed
3231 to not assume anything. If there is an error, we leave m_isOnLine alone.
3232 Default behavior is now in the platform-independent code, and the default
3233 is to treat things as on-line if updateStateWithoutNotifying was called
3234 and it was never able to update the state even once.
3235 (WebCore::NetworkStateNotifier::startObserving): Moved most of the code
3236 from the constructor into this function.
3237 (WebCore::NetworkStateNotifier::dynamicStoreCallback): Deleted. This is
3238 now a lambda inside startObserving.
3239 (WebCore::NetworkStateNotifier::networkStateChangeTimerFired): Deleted.
3240 This function is now platform-independent and is named updateState.
3242 * platform/network/win/NetworkStateNotifierWin.cpp:
3243 (WebCore::NetworkStateNotifier::updateStateWithoutNotifying): Renamed
3244 from updateState and tightened the code up a bit. Also changed
3245 to not assume anything. If there is an error, we leave m_isOnLine alone.
3246 Default behavior is now in the platform-independent code, and the default
3247 is to treat things as on-line if updateStateWithoutNotifying was called
3248 and it was never able to update the state even once.
3249 (WebCore::NetworkStateNotifier::addressChanged): Deleted.
3250 This function is now platform-independent and is named updateState.
3251 (WebCore::NetworkStateNotifier::addressChangeCallback): Renamed from
3252 addrChangeCallback. Simplified by using the singleton function instead
3253 of relying on the context pointer.
3254 (WebCore::NetworkStateNotifier::startObserving): Moved most of the code
3255 from the constructor here.
3257 * platform/text/LocaleToScriptMappingDefault.cpp:
3258 (WebCore::scriptNameToCode): Use makeNeverDestroyed.
3259 (WebCore::localeToScriptCodeForFontSelection): Ditto.
3261 * platform/text/ios/LocalizedDateCache.h: Moved include of
3262 NeverDestroyed.h from here ...
3263 * platform/text/ios/LocalizedDateCache.mm: ... to here.
3265 * platform/wpe/RenderThemeWPE.cpp:
3266 (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
3267 rather than Ref that is never destroyed.
3269 * platform/wpe/RenderThemeWPE.h: Use friend NeverDestroyed rather than
3270 a create function since RenderTheme is no longer reference counted.
3272 * rendering/RenderTheme.h: Made RenderTheme no longer reference counted.
3274 * rendering/RenderThemeGtk.cpp:
3275 (WebCore::RenderThemeGtk::create): Deleted.
3276 (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
3277 rather than Ref that is never destroyed.
3279 * rendering/RenderThemeGtk.h: Use friend NeverDestroyed rather than
3280 a create function since RenderTheme is no longer reference counted.
3281 * rendering/RenderThemeIOS.h: Ditto.
3283 * rendering/RenderThemeIOS.mm:
3284 (WebCore::RenderThemeIOS::create): Deleted.
3285 (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
3286 rather than Ref that is never destroyed.
3288 * rendering/RenderThemeMac.h: Use friend NeverDestroyed rather than
3289 a create function since RenderTheme is no longer reference counted.
3290 Also marked a lot of functions final rather than override and initialized
3291 data members in the class deifnition.
3293 * rendering/RenderThemeMac.mm: Moved some SPI interfaces to the top of the
3294 file. They should really go into SPI headers.
3295 (-[WebCoreRenderThemeNotificationObserver init]): Removed the theme argument
3296 here because the theme is a singleton and we don't need a pointer to it.
3297 Add the observer here instead of doing it in the caller.
3298 (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]): Call
3299 platformColorsDidChange through the singleton rather than using a pointer.
3300 (-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
3301 Tightened up the code a bit by using CFAutorelease instead of using a
3302 combination of NSMakeCollectable, autorelease, and a typecast to accomplish
3304 (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
3305 rather than Ref that is never destroyed.
3306 (WebCore::RenderThemeMac::create): Deleted.
3307 (WebCore::RenderThemeMac::RenderThemeMac): Moved initialization into the
3308 class definition and observing into the WebCoreRenderThemeNotificationObserver
3310 (WebCore::RenderThemeMac::~RenderThemeMac): Deleted. No need for this since
3311 the object will never be destroyed.
3312 (WebCore::RenderThemeMac::mediaControlsBase64StringForIconNameAndType):
3313 Removed an unnecessary conversion from C string literal to WTF::String and
3314 then to NSString. Instead, just use an NSString literal.
3316 * rendering/RenderThemeWin.cpp:
3317 (WebCore::RenderThemeWin::create): Deleted.
3318 (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
3319 rather than Ref that is never destroyed.
3321 * rendering/RenderThemeWin.h: Use friend NeverDestroyed rather than
3322 a create function since RenderTheme is no longer reference counted.
3324 * rendering/svg/RenderSVGResource.cpp:
3325 (WebCore::removeFromCacheAndInvalidateDependencies): Moved a global into
3326 the code where it is used.
3328 * svg/SVGAnimatedLength.cpp: Removed unneeded include of NeverDestroyed.h.
3330 * svg/SVGAnimationElement.cpp:
3331 (WebCore::SVGAnimationElement::isSupportedAttribute): Use const auto,
3332 makeNeverDestroyed, a lambda, and the new HashSet::add overload instead of
3333 an isEmpty check and lots of separate add function calls.
3334 * svg/SVGClipPathElement.cpp:
3335 (WebCore::SVGClipPathElement::isSupportedAttribute): Ditto.
3336 * svg/SVGComponentTransferFunctionElement.cpp:
3337 (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute): Ditto.
3338 * svg/SVGCursorElement.cpp:
3339 (WebCore::SVGCursorElement::isSupportedAttribute): Ditto.
3341 * svg/SVGElement.cpp:
3342 (WebCore::createAttributeNameToCSSPropertyIDMap): Replaced the populate
3343 function with this create function.
3344 (WebCore::createAttributeNameToAnimatedPropertyTypeMap): Ditto.
3345 (WebCore::attributeNameToAnimatedPropertyTypeMap): Changed return type to
3346 const reference. Use const auto and makeNeverDestroyed instead of using
3347 isEmpty and a populate function.
3348 (WebCore::createCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
3350 (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Ditto.
3351 (WebCore::SVGElement::childShouldCreateRenderer): Use an array instead of
3352 a HashSet since we are checking against only 3 or 4 values.
3353 (WebCore::addQualifiedName): Deleted.
3354 (WebCore::SVGElement::animatableAttributeForName): Use const auto,
3355 makeNeverDestroyed, and a lambda to efficiently build the map in this function.
3356 (WebCore::SVGElement::cssPropertyIdForSVGAttributeName): Use const auto and
3357 makeNeverDestroyed instead of using isEmpty and a populate function.
3359 * svg/SVGFilterElement.cpp:
3360 (WebCore::SVGFilterElement::isSupportedAttribute): Use const auto,
3361 makeNeverDestroyed, a lambda, and the new HashSet::add overload instead of
3362 an isEmpty check and lots of separate add function calls.
3363 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3364 (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute): Ditto.
3365 * svg/SVGForeignObjectElement.cpp:
3366 (WebCore::SVGForeignObjectElement::isSupportedAttribute): Ditto.
3367 * svg/SVGGElement.cpp:
3368 (WebCore::SVGGElement::isSupportedAttribute): Ditto.
3369 * svg/SVGGradientElement.cpp:
3370 (WebCore::SVGGradientElement::isSupportedAttribute): Ditto.
3371 * svg/SVGGraphicsElement.cpp:
3372 (WebCore::SVGGraphicsElement::isSupportedAttribute): Ditto.
3373 * svg/SVGImageElement.cpp:
3374 (WebCore::SVGImageElement::isSupportedAttribute): Ditto.
3375 * svg/SVGLangSpace.cpp:
3376 (WebCore::addWithAndWithoutXMLPrefix): Added helper. Uses xmlAtom instead
3377 of making our own NeverDestroyed local xmlPrefix.
3378 (WebCore::SVGLangSpace::addSupportedAttributes): Rewrote to use helper.
3379 * svg/SVGLineElement.cpp:
3380 (WebCore::SVGLineElement::isSupportedAttribute): Use const auto,
3381 makeNeverDestroyed, a lambda, and the new HashSet::add overload instead of
3382 an isEmpty check and lots of separate add function calls.
3383 * svg/SVGLinearGradientElement.cpp:
3384 (WebCore::SVGLinearGradientElement::isSupportedAttribute): Ditto.
3385 * svg/SVGMarkerElement.cpp:
3386 (WebCore::SVGMarkerElement::isSupportedAttribute): Ditto.
3387 * svg/SVGMaskElement.cpp:
3388 (WebCore::SVGMaskElement::isSupportedAttribute): Ditto.
3389 * svg/SVGPathElement.cpp:
3390 (WebCore::SVGPathElement::isSupportedAttribute): Ditto.
3391 * svg/SVGPatternElement.cpp:
3392 (WebCore::SVGPatternElement::isSupportedAttribute): Ditto.
3393 * svg/SVGRadialGradientElement.cpp:
3394 (WebCore::SVGRadialGradientElement::isSupportedAttribute): Ditto.
3395 * svg/SVGTextContentElement.cpp:
3396 (WebCore::SVGTextContentElement::isSupportedAttribute): Ditto.
3397 * svg/SVGTextPathElement.cpp:
3398 (WebCore::SVGTextPathElement::isSupportedAttribute): Ditto.
3399 * svg/animation/SVGSMILElement.cpp:
3400 (WebCore::SVGSMILElement::isSupportedAttribute): Ditto.
3402 * testing/MockContentFilterSettings.h: Removed unneeded include of
3405 * testing/MockGamepadProvider.cpp: Moved include of
3406 NeverDestroyed.h here ...
3407 * testing/MockGamepadProvider.h: ... from here.
3409 * testing/MockPreviewLoaderClient.h: Removed unneeded include of
3412 * workers/Worker.cpp:
3413 (WebCore::allWorkers): Changed this from a global to a function.
3414 (WebCore::Worker::networkStateChanged): Updated for above change and
3415 made this a member function.
3416 (WebCore::Worker::Worker): Updated for above change and
3417 change to NetworkStateNotifier.
3418 (WebCore::Worker::~Worker): Ditto.
3419 * workers/Worker.h: Made networkStateChanged a static member instead of
3420 a friend since that is a cleaner way to give it access to private member
3423 * xml/XPathFunctions.cpp:
3424 (WebCore::XPath::createFunctionMap): Use create instead of populate style.
3425 (WebCore::XPath::Function::create): Use const auto and makeNeverDestroyed
3426 instead of an isEmpty check.
3428 * xml/XPathParser.cpp:
3429 (WebCore::XPath::createAxisNamesMap): Use create instead of populate style.
3430 (WebCore::XPath::parseAxisName): Use const auto and makeNeverDestroyed
3431 instead of an isEmpty check.
3433 2017-07-17 Brady Eidson <beidson@apple.com>
3435 REGRESSION(r219298): imported/w3c/IndexedDB-private-browsing/idbfactory_open.html is crashing occassionaly (UniqueIDBDatabase being taken from the IDBServer set twice).
3436 <rdar://problem/33294987> and https://bugs.webkit.org/show_bug.cgi?id=174354
3438 Reviewed by Alex Christensen.
3440 No new tests (Covered by existing tests).
3442 * Modules/indexeddb/server/IDBServer.cpp:
3443 (WebCore::IDBServer::IDBServer::postDatabaseTaskReply): Remove a now invalid ASSERT
3445 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3446 (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose): Add a RELEASE_ASSERT.
3447 (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): Instead of an ad-hoc main thread dispatch, use the "schedule task reply" system
3448 to keep dispatch ordering in tact.
3449 (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply): Remove a now invalid ASSERT
3450 (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete): Only take the owning pointer if the object doesn't already own itself.
3452 2017-07-17 Wenson Hsieh <wenson_hsieh@apple.com>
3454 [iOS DnD] Web process uses too much memory when beginning a drag on a very large image
3455 https://bugs.webkit.org/show_bug.cgi?id=174585
3456 <rdar://problem/33302541>
3458 Reviewed by Tim Horton.
3460 Currently, attempting to drag a very large image fails, either due to us telling CoreGraphics to create an image
3461 buffer that is too large, or because the web process exceeds its memory limit and gets jetsamed. There are two
3462 places where we can optimize our memory use during the drag initialization sequence, and this patch improves
3465 First, on iOS, we attempt to encode and send over a WebCore::Image in the PasteboardImage when writing to the
3466 item providers upon starting a drag. Currently, this Image is only used in the drag and drop codepath, in
3467 PlatformPasteboard::writeObjectRepresentations, to grab the size of the image being written for the purpose of
3468 specifying estimated display size. Serializing and deserializing an Image calls into Image::nativeImage, which
3469 attempts to draw the contents of the image into a buffer so that it can be shipped across to the UI process.
3470 Instead, we can simply compute the size in the web process while we already have the Image, and simply send that
3471 across. For copy/paste, this doesn't result in any behavior change, since we don't use the PasteboardImage's
3472 image in the first place.
3474 Secondly, when starting a drag, we try to allocate create an image buffer the size of the WebCore::Image for the
3475 purpose of generating the drag preview. Instead, this patch establishes a limit on the size of this drag preview
3476 image, such that if the Image's size is larger, we'll scale down the drag preview image to be the maximum
3479 Test: DataInteractionTests.CanStartDragOnEnormousImage.
3481 * editing/ios/EditorIOS.mm:
3482 (WebCore::Editor::writeImageToPasteboard):
3483 * platform/Pasteboard.h:
3484 * platform/graphics/GeometryUtilities.cpp:
3485 (WebCore::sizeWithAreaAndAspectRatio):
3487 Introduce a new helper function to compute a size with the given aspect ratio and area.
3489 * platform/graphics/GeometryUtilities.h:
3490 * platform/ios/DragImageIOS.mm:
3491 (WebCore::createDragImageFromImage):
3492 * platform/ios/PlatformPasteboardIOS.mm:
3493 (WebCore::PlatformPasteboard::writeObjectRepresentations):
3495 2017-07-17 Michael Catanzaro <mcatanzaro@igalia.com>
3497 [CMake] Include most CMake modules from WebKitCommon.cmake
3498 https://bugs.webkit.org/show_bug.cgi?id=174546
3500 Reviewed by Konstantin Tokarev.
3502 * WebCoreMacros.cmake:
3504 2017-07-17 Michael Catanzaro <mcatanzaro@igalia.com>
3506 [CMake] Macros in WebKitMacros.cmake should be prefixed with WEBKIT_ namespace
3507 https://bugs.webkit.org/show_bug.cgi?id=174547
3509 Reviewed by Alex Christensen.
3512 * WebCoreMacros.cmake:
3514 2017-07-17 Alex Christensen <achristensen@webkit.org>
3516 Modernize content extension code
3517 https://bugs.webkit.org/show_bug.cgi?id=174588
3519 Reviewed by Sam Weinig.
3521 No change in behavior. Just use Ref instead of RefPtr where possible.
3523 * contentextensions/ContentExtension.cpp:
3524 (WebCore::ContentExtensions::ContentExtension::create):
3525 * contentextensions/ContentExtension.h:
3526 * contentextensions/ContentExtensionsBackend.cpp:
3527 (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
3528 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3529 * contentextensions/ContentExtensionsBackend.h:
3531 2017-07-17 Simon Fraser <simon.fraser@apple.com>
3533 clientX/clientY on TouchEvent.touches are wrong
3534 https://bugs.webkit.org/show_bug.cgi?id=174561
3535 rdar://problem/33336041
3537 Reviewed by Tim Horton.
3539 Do some refactoring so that WebKitAdditions code that computes Touch coordinates can use
3540 the same code that MouseRelatedEvent uses.
3542 There is no behavior change in this patch, but the test exercises a behavior change in
3543 WebKitAdditions code.
3545 Test: fast/events/touch/ios/touches-client-coords-after-zoom.html
3547 * dom/MouseRelatedEvent.cpp:
3548 (WebCore::MouseRelatedEvent::init):
3549 (WebCore::MouseRelatedEvent::frameViewFromDOMWindow):
3550 (WebCore::MouseRelatedEvent::pagePointToClientPoint):
3551 (WebCore::MouseRelatedEvent::pagePointToAbsolutePoint):
3552 (WebCore::MouseRelatedEvent::initCoordinates):
3553 (WebCore::MouseRelatedEvent::documentToAbsoluteScaleFactor):
3554 (WebCore::MouseRelatedEvent::computePageLocation):
3555 (WebCore::MouseRelatedEvent::locationInRootViewCoordinates):
3556 (WebCore::MouseRelatedEvent::frameView): Deleted.
3557 * dom/MouseRelatedEvent.h:
3559 2017-07-17 Jeremy Jones <jeremyj@apple.com>
3561 Add video fullscreen transition logging.
3562 https://bugs.webkit.org/show_bug.cgi?id=174474
3564 Reviewed by Jer Noble.
3566 No new tests, because there is no functional change.
3568 This change just adds logging.
3570 * html/HTMLVideoElement.cpp:
3571 (WebCore::HTMLVideoElement::webkitEnterFullscreen):
3572 (WebCore::HTMLVideoElement::webkitExitFullscreen):
3573 (WebCore::HTMLVideoElement::webkitSetPresentationMode):
3575 2017-07-17 Chris Dumez <cdumez@apple.com>
3577 click event does not dispatch to parent when child target stops hit testing after mousedown
3578 https://bugs.webkit.org/show_bug.cgi?id=174564
3579 <rdar://problem/33340234>
3581 Reviewed by Simon Fraser.
3583 As per [1], if the mouse down node and the mouse release node differ, then we are supposed to
3584 fire the click event at their common ancestor, if such node exists. This patch implements this
3585 logic. This also aligns our behavior with Blink.
3587 [1] https://w3c.github.io/uievents/#events-mouseevent-event-order
3589 Test: fast/events/mouse-click-different-mouseDown-mouseUp-nodes.html
3591 * page/EventHandler.cpp:
3592 (WebCore::targetNodeForClickEvent):
3594 2017-07-17 Brady Eidson <beidson@apple.com>
3596 WKHTTPCookieStore observing only works on the default cookie store.
3597 <rdar://problem/33330724> and https://bugs.webkit.org/show_bug.cgi?id=174580
3599 Reviewed by Sam Weinig.
3601 Covered by new API tests.
3603 startObservingCookieChanges and stopObservingCookieChanges are passed a NetworkStorageSession to observe.
3604 On Mac/iOS, the passed-in storage session was ignored and the shared cookie storage was assumed.
3607 Also, since using NSNotification based observing only works reliably for the shared cookie storage,
3608 switch to direct CFHTTPCookieStorageRef observing.
3610 * WebCore.xcodeproj/project.pbxproj:
3612 * platform/network/NetworkStorageSession.h:
3614 * platform/network/cocoa/CookieStorageObserver.h: Added.
3615 * platform/network/cocoa/CookieStorageObserver.mm: Added.
3616 (WebCore::cookiesChanged):
3617 (WebCore::CookieStorageObserver::create):
3618 (WebCore::CookieStorageObserver::CookieStorageObserver):
3619 (WebCore::CookieStorageObserver::~CookieStorageObserver):
3620 (WebCore::CookieStorageObserver::startObserving):
3621 (WebCore::CookieStorageObserver::stopObserving):
3622 (WebCore::CookieStorageObserver::cookiesDidChange):
3624 * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
3625 (WebCore::NetworkStorageSession::cookieStorageObserver):
3627 * platform/network/mac/CookieStorageMac.mm:
3628 (WebCore::startObservingCookieChanges):
3629 (WebCore::stopObservingCookieChanges):
3630 (-[WebCookieStorageObjCAdapter notifyCookiesChangedOnMainThread]): Deleted.
3631 (-[WebCookieStorageObjCAdapter cookiesChangedNotificationHandler:]): Deleted.
3632 (-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]): Deleted.
3633 (-[WebCookieStorageObjCAdapter stopListeningForCookieChangeNotifications]): Deleted.
3635 * platform/spi/cf/CFNetworkSPI.h:
3637 2017-07-17 Sam Weinig <sam@webkit.org>
3639 [WebIDL] Rename JSCSSValueCustom.cpp to JSDeprecatedCSSOMValueCustom.cpp to match the underlying class
3640 https://bugs.webkit.org/show_bug.cgi?id=174550
3642 Reviewed by Brady Eidson.
3645 * WebCore.xcodeproj/project.pbxproj:
3646 * bindings/js/JSBindingsAllInOne.cpp:
3647 * bindings/js/JSCSSValueCustom.cpp: Removed.
3648 * bindings/js/JSDeprecatedCSSOMValueCustom.cpp: Renamed from bindings/js/JSCSSValueCustom.cpp.
3649 Rename file and update references.
3651 2017-07-17 Antoine Quint <graouts@apple.com>
3653 REGRESSION: order of AirPlay and volume controls is inconsistent between <audio> and <video>
3654 https://bugs.webkit.org/show_bug.cgi?id=174581
3655 <rdar://problem/33297519>
3657 Reviewed by Sam Weinig.
3659 We had an inconsistency between <audio> and <video> controls for the relative order of the
3660 volume and AirPlay buttons. The <video> layout was correct (volume first and AirPlay after)
3661 and the <audio> layout now is the same.
3663 * Modules/modern-media-controls/controls/inline-media-controls.js:
3664 (InlineMediaControls.prototype._rightContainerButtons):
3666 2017-07-17 Konstantin Tokarev <annulen@yandex.ru>
3668 [CMake] Create targets before WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS is called
3669 https://bugs.webkit.org/show_bug.cgi?id=174557
3671 Reviewed by Michael Catanzaro.
3673 No new tests needed.
3677 2017-07-17 Michael Catanzaro <mcatanzaro@igalia.com>
3679 Unreviewed, rolling out r219556.
3681 Broke build without WebCrypto
3685 "[CMake] Clean up Web Crypto build targets"
3686 https://bugs.webkit.org/show_bug.cgi?id=174253
3687 http://trac.webkit.org/changeset/219556
3689 2017-07-17 Antoine Quint <graouts@apple.com>
3691 Media controls draw behind captions
3692 https://bugs.webkit.org/show_bug.cgi?id=174579
3693 <rdar://problem/33295427>
3695 Reviewed by Dean Jackson.
3697 Ensure the captions container is added as a previous sibling to the controls container.
3699 Test: media/modern-media-controls/media-controls/media-controls-display-above-captions.html
3701 * Modules/modern-media-controls/media/media-controller.js:
3704 2017-07-17 Zan Dobersek <zdobersek@igalia.com>
3706 [CMake] Clean up Web Crypto build targets
3707 https://bugs.webkit.org/show_bug.cgi?id=174253
3709 Reviewed by Michael Catanzaro.
3711 Gather the common WebCrypto source files in CMakeLists.txt, including them
3712 in the build unconditionally and instead relying on ENABLE_SUBTLE_CRYPTO
3713 build guards to exclude the code from compilation if the feature is disabled.
3715 PlatformGTK.cmake, PlatformMac.cmake and PlatformWPE.cmake can then remove
3716 duplicated build targets. PlatformMac.cmake still lists all the Mac-specific
3717 Web Crypto build targets.
3719 PlatformGTK.cmake and PlatformWPE.cmake now include GCrypt.cmake if the build
3720 was configured to enable the use of libgcrypt. The new CMake file adds the
3721 libgcrypt-specific Web Crypto build targets to the build if the feature was
3722 enabled, and also sets up libgcrypt include directiories and libraries.
3724 No new tests -- no change in behavior.
3727 * PlatformGTK.cmake:
3728 * PlatformMac.cmake:
3729 * PlatformWPE.cmake:
3730 * platform/GCrypt.cmake: Added.
3732 2017-07-16 Michael Catanzaro <mcatanzaro@igalia.com>
3734 -Wreorder warning caused by GraphicsContext3D cleanup
3735 https://bugs.webkit.org/show_bug.cgi?id=174511
3737 Reviewed by Carlos Garcia Campos.
3739 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3740 (WebCore::GraphicsContext3D::GraphicsContext3D):
3741 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
3742 (WebCore::GraphicsContext3D::GraphicsContext3D):
3744 2017-07-16 Antoine Quint <graouts@apple.com>
3746 Dismissing the captions panel using the mouse is too eager to remove the captions panel and media controls
3747 https://bugs.webkit.org/show_bug.cgi?id=174571
3748 <rdar://problem/33294968>
3750 Reviewed by Eric Carlson.
3752 We did several things wrong when dismissing the tracks panel:
3754 - we did not check whether we were hosted in a shadow root when figuring if a click was on the tracks panel
3755 - we did not check whether we clicked over the media when dismissing the tracks panel
3756 - we did not check whether auto-hide was on before fading the media controls out when we clicked outside
3757 the media controls bounds
3759 We now correctly account for all of those cases and implement the following behavior when clickng as the tracks
3762 - dismiss the panel if the click is outside of the panel
3763 - dismiss the panel and the media controls if the click is outside the video and the media controls have
3764 auto-hide on (ie. media is playing)
3765 - dismiss the panel and the media controls after the track selection animation is finished if a track is selected
3767 Tests: media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused.html
3768 media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing.html
3770 * Modules/modern-media-controls/controls/media-controls.js:
3771 (MediaControls.prototype.hideTracksPanel): Only hide the media controls if we clicked outside of the media
3772 controls bounds and if we have auto-hide on when idle (ie. the media is playing).
3773 (MediaControls.prototype.isPointInControls): Add an option to specify whether the container should be
3774 considered when checking if a point is contained within the media controls bounds.
3775 * Modules/modern-media-controls/controls/tracks-panel.js:
3776 (TracksPanel.prototype._handleMousedown):
3777 (TracksPanel.prototype._isPointInTracksPanel): Correctly check whether the element that we started pressing
3778 on is contained within the tracks panel, accounting for the case where we are presented within a shadow root
3779 (ie. always when runing inside a Web page).
3781 2017-07-16 Ali Juma <ajuma@chromium.org>
3783 DisallowUserAgentShadowContent moves out of non-UA shadow roots
3784 https://bugs.webkit.org/show_bug.cgi?id=165647
3786 Reviewed by Ryosuke Niwa.
3788 Make rect-based hit-testing include nodes in non-UA shadow trees when the
3789 HitTestRequest has type DisallowUserAgentShadowContent.
3791 Test: fast/dom/nodesFromRect/nodesFromRect-shadow.html
3793 * rendering/HitTestResult.cpp:
3794 (WebCore::HitTestResult::addNodeToRectBasedTestResult):
3795 * testing/Internals.cpp:
3796 (WebCore::Internals::nodesFromRect):
3797 * testing/Internals.h:
3799 2017-07-16 Antoine Quint <graouts@apple.com>
3801 Clicking edges of media control buttons changes visual state of button (pressed) but doesn't execute action
3802 https://bugs.webkit.org/show_bug.cgi?id=174565
3803 <rdar://problem/33294833>
3805 Reviewed by Dean Jackson.
3807 WebCore doesn't dispatch a "click" event to a parent element when a child that was the original target when
3808 the "mousedown" occured is no longer hit-testing at the location where the mouse pointer is at when the "mouseup"
3809 occurs (see webkit.org/b/174564). Since button icons, which are a <picture> element that is a child of the
3810 <button> element for media controls buttons, shrink to 89% of their size when the ":active" pseudo-class matches,
3811 clicking on the edges of the media controls buttons would not trigger the expected action.
3813 Test: media/modern-media-controls/button/button-click-on-edges.html
3815 * Modules/modern-media-controls/controls/button.css:
3818 2017-07-16 Said Abou-Hallawa <sabouhallawa@apple.com>
3820 Make the decision for asynchronously decoding an image be in one place
3821 https://bugs.webkit.org/show_bug.cgi?id=174479
3823 Reviewed by Tim Horton.
3825 Move all the logic of whether a large image should be asynchronously decoded
3826 or not be in one place: RenderBoxModelObject::decodingModeForImageDraw().
3828 * loader/cache/CachedImage.cpp:
3829 (WebCore::CachedImage::addPendingImageDrawingClient): Fixing unrelated
3831 * platform/RuntimeApplicationChecks.h:
3832 * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3833 (WebCore::IOSApplication::isIBooks):
3834 (WebCore::IOSApplication::isIBooksStorytime):
3835 * platform/graphics/BitmapImage.cpp:
3836 (WebCore::BitmapImage::updateFromSettings): Remove reading the setting
3837 largeImageAsyncDecodingEnabled from this function because it will be read
3838 by RenderBoxModelObject::decodingModeForImageDraw().
3839 (WebCore::BitmapImage::dataChanged):
3840 (WebCore::BitmapImage::draw):
3841 (WebCore::BitmapImage::shouldAnimate):
3842 (WebCore::BitmapImage::canAnimate):
3843 (WebCore::BitmapImage::canUseAsyncDecodingForLargeImages):
3844 (WebCore::BitmapImage::shouldUseAsyncDecodingForAnimatedImages):
3845 (WebCore::BitmapImage::canDestroyDecodedData):
3846 (WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImages): Deleted.
3847 * platform/graphics/BitmapImage.h:
3848 * platform/graphics/ImageSource.cpp:
3849 (WebCore::ImageSource::canUseAsyncDecoding): It is okay to keep the
3850 decoded frame if canUseAsyncDecodingForLargeImages() is true by the setting
3851 largeImageAsyncDecodingEnabled is false.
3852 (WebCore::ImageSource::shouldUseAsyncDecoding): Deleted.
3853 * platform/graphics/ImageSource.h:
3854 * rendering/RenderBoxModelObject.cpp:
3855 (WebCore::RenderBoxModelObject::decodingModeForImageDraw): The plan is to
3856 add a new Internal settings to force asynchronous image decoding regardless
3857 of the image size and the settings.
3858 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3859 * rendering/RenderBoxModelObject.h:
3860 * rendering/RenderImage.cpp:
3861 (WebCore::RenderImage::paintIntoRect):
3863 2017-07-16 Michael Catanzaro <mcatanzaro@igalia.com>
3865 [CMake] Raise minimum CMake requirement
3866 https://bugs.webkit.org/show_bug.cgi?id=174545
3868 Reviewed by Konstantin Tokarev.
3870 * WebCoreMacros.cmake:
3872 2017-07-15 Brady Eidson <beidson@apple.com>
3874 Make sure all CFHTTPCookieStorageRefs we create are scheduled.
3875 <rdar://problem/33221110> and https://bugs.webkit.org/show_bug.cgi?id=174513
3877 Reviewed by Tim Horton.
3879 * platform/spi/cf/CFNetworkSPI.h:
3881 2017-07-15 Myles C. Maxfield <mmaxfield@apple.com>
3883 Rename RenderStyle::fontSize() to RenderStyle::computedFontPixelSize()
3884 https://bugs.webkit.org/show_bug.cgi?id=174509
3886 Reviewed by Simon Fraser.
3888 We have three font size functions:
3889 - computedFontSize(): returns a float
3890 - specifiedFontSize(): also returns a float
3891 - fontSize(): returns the rounded computedFontSize()
3893 FontDescription uses the convention of labelling rounded values as "pixel",
3894 so a better name font fontSize() is computedFontPixelSize().
3896 Also, because font sizes can never be negative, switch the type from an int
3899 No new tests because there is no behavior change.
3901 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3902 (getAttributeSetForAccessibilityObject):
3903 * css/StyleResolver.cpp:
3904 (WebCore::StyleResolver::adjustRenderStyle):
3905 * platform/graphics/FontDescription.h:
3906 (WebCore::FontDescription::computedPixelSize):
3907 (WebCore::FontDescription::fontSelectionRequest):
3908 * rendering/RenderBlock.cpp:
3909 (WebCore::styleForFirstLetter):
3910 * rendering/RenderRubyRun.cpp:
3911 (WebCore::shouldOverhang):
3912 (WebCore::RenderRubyRun::getOverhang):
3913 * rendering/RenderRubyText.cpp:
3914 (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
3915 * rendering/RenderThemeGtk.cpp:
3916 (WebCore::adjustSearchFieldIconStyle):
3917 (WebCore::paintSearchFieldIcon):
3918 * rendering/RenderThemeIOS.mm:
3919 (WebCore::RenderThemeIOS::adjustCheckboxStyle):
3920 (WebCore::RenderThemeIOS::adjustRadioStyle):
3921 * rendering/RenderThemeMac.mm:
3922 (WebCore::RenderThemeMac::controlSizeForFont):
3923 (WebCore::RenderThemeMac::controlSizeForSystemFont):
3924 (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
3925 (WebCore::RenderThemeMac::popupInternalPaddingBox):
3926 (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
3927 * rendering/RenderThemeWin.cpp:
3928 (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
3929 (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
3930 (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
3931 * rendering/TextDecorationPainter.cpp:
3932 (WebCore::TextDecorationPainter::paintTextDecoration):
3933 * rendering/mathml/RenderMathMLRow.cpp:
3934 (WebCore::RenderMathMLRow::computeLineVerticalStretch):
3935 * rendering/style/RenderStyle.cpp:
3936 (WebCore::RenderStyle::computedFontPixelSize):
3937 (WebCore::RenderStyle::computedLineHeight):
3938 (WebCore::RenderStyle::fontSize): Deleted.
3939 * rendering/style/RenderStyle.h:
3940 * style/InlineTextBoxStyle.cpp:
3941 (WebCore::visualOverflowForDecorations):
3942 * style/StyleTreeResolver.cpp:
3943 (WebCore::Style::TreeResolver::resolveElement):
3944 * svg/SVGLengthContext.cpp:
3945 (WebCore::SVGLengthContext::convertValueFromUserUnitsToEMS):