760cd7def816cebb22ede3ddbe9135bd6171530e
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-10-03  Timothy Horton  <timothy_horton@apple.com>
2
3         Include a few widespread WTF headers in WebCorePrefix.h
4         https://bugs.webkit.org/show_bug.cgi?id=173481
5
6         * WebCorePrefix.h:
7         Turn this off on Windows because it doesn't work; needs further investigation.
8
9 2017-10-03  Tim Horton  <timothy_horton@apple.com>
10
11         Include a few widespread WTF headers in WebCorePrefix.h
12         https://bugs.webkit.org/show_bug.cgi?id=173481
13
14         Reviewed by Alex Christensen.
15
16         * WebCorePrefix.h:
17         These are four of the headers that contribute the most pre-processed
18         source to the WebCore build. They (and their dependents) change infrequently
19         enough that a world rebuild of WebCore when they change seems like an
20         acceptable tradeoff for the ~9% reduction in WebCore build time that I
21         measure from this change.
22
23         We can't do this on macOS 10.12 because of https://bugs.llvm.org/show_bug.cgi?id=33520.
24
25 2017-10-03  Daniel Bates  <dabates@apple.com>
26
27         XMLHttpRequest.setRequestHeader() should allow Content-Transfer-Encoding header; remove
28         duplicate logic to check for a forbidden XHR header field
29         https://bugs.webkit.org/show_bug.cgi?id=177829
30
31         Reviewed by Alexey Proskuryakov.
32
33         Use isForbiddenHeaderName() (defined in HTTPParsers.h) to check if the header field specified
34         to XMLHttpRequest.setRequestHeader() is allowed. Among other benefits this makes the behavior
35         of XMLHttpRequest.setRequestHeader() more closely aligned with the behavior of this method in
36         the XHR standard, <https://xhr.spec.whatwg.org> (8 September 2017). In particular, XMLHttpRequest.setRequestHeader()
37         no longer forbids setting the header Content-Transfer-Encoding. This header has not been
38         considered a forbidden header since <https://www.w3.org/TR/2012/WD-XMLHttpRequest-20121206/>.
39
40         * xml/XMLHttpRequest.cpp:
41         (WebCore::XMLHttpRequest::setRequestHeader):
42         (WebCore::isForbiddenRequestHeader): Deleted.
43         (WebCore::XMLHttpRequest::isAllowedHTTPHeader): Deleted.
44         * xml/XMLHttpRequest.h:
45
46 2017-10-03  Commit Queue  <commit-queue@webkit.org>
47
48         Unreviewed, rolling out r222686, r222695, and r222698.
49         https://bugs.webkit.org/show_bug.cgi?id=177835
50
51         Caused LayoutTests to crash in
52         WebCore::TimerBase::setNextFireTime (Requested by ryanhaddad
53         on #webkit).
54
55         Reverted changesets:
56
57         "[Settings] Replace SettingsMacros.h with a generated base
58         class for Settings"
59         https://bugs.webkit.org/show_bug.cgi?id=177681
60         http://trac.webkit.org/changeset/222686
61
62         "[Settings] Enums should not be passed by const reference"
63         https://bugs.webkit.org/show_bug.cgi?id=177727
64         http://trac.webkit.org/changeset/222695
65
66         "[Settings] Move remaining simple settings to Settings.in"
67         https://bugs.webkit.org/show_bug.cgi?id=177730
68         http://trac.webkit.org/changeset/222698
69
70 2017-10-03  Jer Noble  <jer.noble@apple.com>
71
72         Implement quality-of-service tiers in WebCoreDecompressionSession
73         https://bugs.webkit.org/show_bug.cgi?id=177769
74
75         Reviewed by Dean Jackson.
76
77         VTDecompressionSession will suggest quality-of-service tiers to be used when decompression
78         can't keep up with playback speed. Use a simple exponential-moving-average heuristic to
79         determine when to move up and down the tiers.
80
81         Drive-by fix: When frames are so late that they miss the display deadline, mark them as
82         dropped rather than just delayed.
83
84         * platform/graphics/cocoa/WebCoreDecompressionSession.h:
85         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
86         (WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):
87         (WebCore::WebCoreDecompressionSession::decodeSample):
88         (WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
89         (WebCore::WebCoreDecompressionSession::automaticDequeue):
90         (WebCore::WebCoreDecompressionSession::enqueueDecodedSample):
91         (WebCore::WebCoreDecompressionSession::resetQosTier):
92         (WebCore::WebCoreDecompressionSession::increaseQosTier):
93         (WebCore::WebCoreDecompressionSession::decreaseQosTier):
94         (WebCore::WebCoreDecompressionSession::updateQosWithDecodeTimeStatistics):
95         * platform/cocoa/VideoToolboxSoftLink.cpp:
96         * platform/cocoa/VideoToolboxSoftLink.h:
97
98 2017-10-03  Adrian Perez de Castro  <aperez@igalia.com>
99
100         [GTK] Support the "system" CSS font family
101         https://bugs.webkit.org/show_bug.cgi?id=177755
102
103         Reviewed by Carlos Garcia Campos.
104
105         Obtain the system UI font from the GtkSettings::gtk-font-name property
106
107         Test: platform/gtk/fonts/systemFont.html
108
109         * platform/graphics/freetype/FontCacheFreeType.cpp:
110         (WebCore::getFamilyNameStringFromFamily): Use defaultGtkSystemFont()
111         to handle -webkit-system-font and -webkit-system-ui.
112         (WebCore::isCommonlyUsedGenericFamily): Handle -webkit-system-font and
113         -webkit-system-ui as generic family names.
114         * platform/graphics/gtk/GtkUtilities.cpp:
115         (WebCore::defaultGtkSystemFont): Added.
116         * platform/graphics/gtk/GtkUtilities.h: Add prototype for defaultGtkSystemFont().
117
118 2017-10-03  Daniel Bates  <dabates@apple.com>
119
120         [XHR] Only exempt Dashboard widgets from XHR header restrictions
121         https://bugs.webkit.org/show_bug.cgi?id=177824
122         <rdar://problem/34384301>
123
124         Reviewed by Alexey Proskuryakov.
125
126         Currently we allow file URLs to set arbitrary XHR headers. In contrast, non-file URLs are
127         restricted from setting some XHR headers (e.g. COOKIE). Historically the relaxation for file
128         URL was for backwards compatibility to allow Dashboard widgets to work. Instead we should
129         apply the non-file URL policy to all URLs and only relax the policy for Dashboard widgets.
130
131         Tests: fast/xmlhttprequest/set-dangerous-headers-in-dashboard.html
132                fast/xmlhttprequest/set-dangerous-headers.html
133
134         * xml/XMLHttpRequest.cpp:
135         (WebCore::XMLHttpRequest::setRequestHeader):
136
137 2017-10-03  Fujii Hironori  <Hironori.Fujii@sony.com>
138
139         REGRESSION(r221909): Failing fast/text/international/iso-8859-8.html
140         https://bugs.webkit.org/show_bug.cgi?id=177364
141
142         Reviewed by Carlos Garcia Campos.
143
144         Range.getClientRects returned an incorrect rect for a last
145         collapsed space of RenderText in HarfBuzz port.
146
147         HarfBuzzShaper::selectionRect needs to return a valid value even
148         if the arguments 'from' and 'to' point to the just after the end
149         of the text run.
150
151         Tests: fast/text/international/iso-8859-8.html
152
153         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
154         (WebCore::HarfBuzzShaper::shape): Do not check the return value of
155         fillGlyphBuffer.
156         (WebCore::HarfBuzzShaper::fillGlyphBuffer): Change the return
157         value type from bool to void.
158         (WebCore::HarfBuzzShaper::selectionRect): Set the rightmost
159         position to fromX if foundFromX is false.
160         * platform/graphics/harfbuzz/HarfBuzzShaper.h: Change the return
161         value type of fillGlyphBuffer from bool to void.
162
163 2017-10-03  JF Bastien  <jfbastien@apple.com>
164
165         WebAssembly: no VM / JS version of everything but Instance
166         https://bugs.webkit.org/show_bug.cgi?id=177473
167
168         Reviewed by Filip Pizlo.
169
170         * ForwardingHeaders/wasm/WasmModule.h: Added. This used to be
171         included in JSWebAssemblyModule.h.
172         * bindings/js/SerializedScriptValue.cpp: Update postMessage code
173         according to C++ API changes.
174
175 2017-10-03  Zalan Bujtas  <zalan@apple.com>
176
177         [AX] Do not trigger redundant layout on tables.
178         https://bugs.webkit.org/show_bug.cgi?id=177781
179         <rdar://problem/34777030>
180
181         Reviewed by Antti Koivisto.
182
183         RenderTable::forceSectionsRecalc() marks the RenderTable dirty and schedules a layout.
184         Every time AccessibilityTable asks for the table element (including during construction),
185         we end up triggering a layout. This call was added (r191357) to ensure RenderTable's m_firstBody is always
186         up-to-date (in case of anonymous wrapper table renderer). Instead of relying on the m_firstBody,
187         let's just use the first child to find the table element. The first child always points to a valid
188         renderer (or nullptr), while m_firstBody is the result of section computation.
189
190         Covered by existing tests.
191
192         * accessibility/AccessibilityTable.cpp:
193         (WebCore::AccessibilityTable::tableElement const):
194
195 2017-10-03  Daniel Bates  <dabates@apple.com>
196
197         [CSP] Check policy before opening a new window to a JavaScript URL
198         https://bugs.webkit.org/show_bug.cgi?id=176815
199         <rdar://problem/34400057>
200
201         Reviewed by Brent Fulgham.
202
203         Ensure that the Content Security Policy of the page allows navigation to a JavaScript URL
204         before opening a new window to it.
205
206         Test: http/tests/security/contentSecurityPolicy/window-open-javascript-url-blocked.html
207
208         * loader/FrameLoader.cpp:
209         (WebCore::createWindow):
210
211 2017-10-03  Joanmarie Diggs  <jdiggs@igalia.com>
212
213         AX: [ATK] ARIA drag-and-drop attribute values should be exposed via AtkObject attributes
214         https://bugs.webkit.org/show_bug.cgi?id=177763
215
216         Reviewed by Chris Fleizach.
217
218         Expose the values of aria-grabbed and aria-dropeffect via the "grabbed" and "dropeffect"
219         AtkObject attributes.
220
221         Test: accessibility/gtk/aria-drag-and-drop.html
222
223         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
224         (webkitAccessibleGetAttributes):
225
226 2017-10-03  Brent Fulgham  <bfulgham@apple.com>
227
228         Unreviewed test fix after r222779.
229
230         * testing/cocoa/WebArchiveDumpSupport.mm:
231         (WebCoreTestSupport::createCFURLResponseFromResponseData): Setting NSSecureCoding in this test code should be
232         done based on build system, just like it is in the actual WebArchive handling code.
233
234 2017-10-03  Youenn Fablet  <youenn@apple.com>
235
236         Clean-up RealtimeIncomingVideoSource
237         https://bugs.webkit.org/show_bug.cgi?id=177782
238
239         Reviewed by Alejandro G. Castro.
240
241         No change of behavior.
242         Removing code that is no longer needed.
243
244         * platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
245         (WebCore::RealtimeIncomingVideoSource::create):
246         (WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
247         * platform/mediastream/mac/RealtimeIncomingVideoSource.h:
248
249 2017-10-03  Brent Fulgham  <bfulgham@apple.com>
250
251         [Mac] Use safer decoding practices for NSKeyedUnarchiver
252         https://bugs.webkit.org/show_bug.cgi?id=175887
253         <rdar://problem/33435281>
254
255         Reviewed by Daniel Bates.
256
257         * loader/archive/cf/LegacyWebArchiveMac.mm:
258         (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Use NSSecureCoding to unarchive.
259         (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto for archiving.
260         * testing/cocoa/WebArchiveDumpSupport.mm:
261         (WebCoreTestSupport::createCFURLResponseFromResponseData): Update to use NSSecureCoding if possible.
262
263 2017-10-03  Ryan Haddad  <ryanhaddad@apple.com>
264
265         Unreviewed, rolling out r222760.
266
267         This change caused LayoutTest crashes.
268
269         Reverted changeset:
270
271         "[Mac] Use safer decoding practices for NSKeyedUnarchiver"
272         https://bugs.webkit.org/show_bug.cgi?id=175887
273         http://trac.webkit.org/changeset/222760
274
275 2017-10-03  Michael Catanzaro  <mcatanzaro@igalia.com>
276
277         REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
278         https://bugs.webkit.org/show_bug.cgi?id=177449
279
280         Reviewed by Chris Dumez.
281
282         * platform/gtk/GtkUtilities.cpp:
283         (WebCore::wallTimeForEvent):
284         * platform/gtk/GtkUtilities.h:
285         (WebCore::wallTimeForEvent):
286         * platform/gtk/PlatformKeyboardEventGtk.cpp:
287         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
288         * platform/gtk/PlatformMouseEventGtk.cpp:
289         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
290         * platform/gtk/PlatformWheelEventGtk.cpp:
291         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
292
293 2017-10-03  Youenn Fablet  <youenn@apple.com>
294
295         Use vector map routine in WebCore CacheStorage implementation
296         https://bugs.webkit.org/show_bug.cgi?id=177002
297
298         Reviewed by Darin Adler.
299
300         No change of behavior.
301         Replacing use of reserveInitialCapacity/uncheckedAppend by use of map.
302
303         * Modules/cache/CacheStorage.cpp:
304         (WebCore::copyCache):
305         (WebCore::CacheStorage::match):
306         (WebCore::CacheStorage::retrieveCaches):
307         (WebCore::CacheStorage::keys):
308         (WebCore::copyCaches): Deleted.
309         * Modules/cache/DOMCache.cpp:
310         (WebCore::DOMCache::matchAll):
311         (WebCore::copyRequestRef):
312         (WebCore::DOMCache::keys):
313         * Modules/cache/DOMCacheEngine.cpp:
314         (WebCore::DOMCacheEngine::isolateCacheInfo):
315         (WebCore::DOMCacheEngine::CacheInfos::isolatedCopy):
316         * Modules/cache/WorkerCacheStorageConnection.cpp:
317         (WebCore::recordsDataFromRecords):
318         (WebCore::recordsFromRecordsData):
319
320 2017-10-02  Myles C. Maxfield  <mmaxfield@apple.com>
321
322         Move LineEnding.{h,cpp} from WebCore/platform/text to wtf/text
323         https://bugs.webkit.org/show_bug.cgi?id=176575
324
325         Reviewed by Alex Christensen.
326
327         No new tests because there is no behavior change.
328
329         * WebCore.xcodeproj/project.pbxproj:
330         * fileapi/BlobBuilder.cpp:
331         * html/FormDataList.cpp:
332
333 2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
334
335         Web Inspector: Rename methods ending in *Json() as *JSON()
336         https://bugs.webkit.org/show_bug.cgi?id=177793
337
338         Reviewed by Matt Baker.
339
340         * inspector/InspectorNetworkAgent.cpp:
341         (WebCore::InspectorNetworkAgent::buildObjectForCachedResource):
342         (WebCore::InspectorNetworkAgent::willSendRequest):
343         (WebCore::InspectorNetworkAgent::didReceiveResponse):
344         * inspector/InspectorPageAgent.cpp:
345         (WebCore::InspectorPageAgent::resourceTypeJSON):
346         (WebCore::InspectorPageAgent::cachedResourceTypeJSON):
347         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
348         (WebCore::InspectorPageAgent::resourceTypeJson): Deleted.
349         (WebCore::InspectorPageAgent::cachedResourceTypeJson): Deleted.
350         * inspector/InspectorPageAgent.h:
351
352 2017-10-02  Wenson Hsieh  <wenson_hsieh@apple.com>
353
354         REGRESSION(r222595): Intermittent crash while accessing DataTransferItemList
355         https://bugs.webkit.org/show_bug.cgi?id=177791
356         <rdar://problem/34781456>
357
358         Reviewed by Ryosuke Niwa.
359
360         DataTransfer::moveDragState() currently attempts to move the other DataTransfer's DataTransferItemList and
361         DragImageLoader as members of its own. This is incorrect, since both of these entities hold raw references of
362         some form to the other DataTransfer, yet they are held as unique_ptrs in the new DataTransfer. To fix this, we
363         (1) remove the line of code that moves the item list, since item lists will be lazily generated on the new
364         DataTransfer anyways, and (2) update the DataTransfer pointer on the old DataTransfer's DragImageLoader after
365         moving it to the new DataTransfer.
366
367         Test: editing/pasteboard/drag-end-crash-accessing-item-list.html
368
369         * dom/DataTransfer.cpp:
370         (WebCore::DragImageLoader::moveToDataTransfer):
371         (WebCore::DataTransfer::moveDragState):
372
373 2017-10-02  Chris Dumez  <cdumez@apple.com>
374
375         Rename computeSharedStringHash() overload taking a URL to computedVisitedLinkHash()
376         https://bugs.webkit.org/show_bug.cgi?id=177776
377
378         Reviewed by Alex Christensen.
379
380         * dom/VisitedLinkState.cpp:
381         (WebCore::linkHashForElement):
382         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
383         * html/HTMLAnchorElement.h:
384         (WebCore::HTMLAnchorElement::visitedLinkHash const):
385         * platform/SharedStringHash.cpp:
386         (WebCore::computeVisitedLinkHash):
387         * platform/SharedStringHash.h:
388
389 2017-10-02  Joanmarie Diggs  <jdiggs@igalia.com>
390
391         AX: [ATK] The value of aria-level is not exposed on non-heading roles
392         https://bugs.webkit.org/show_bug.cgi?id=177775
393
394         Reviewed by Chris Fleizach.
395
396         Expose the value of aria-level via the "level" AtkObject attribute, as is currently
397         done for headings.
398
399         Test: accessibility/gtk/aria-level.html
400
401         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
402         (webkitAccessibleGetAttributes):
403
404 2017-10-02  Andy Estes  <aestes@apple.com>
405
406         [Payment Request] Validate payment method identifiers
407         https://bugs.webkit.org/show_bug.cgi?id=177794
408
409         Reviewed by Sam Weinig.
410
411         * Modules/paymentrequest/PaymentRequest.cpp:
412         (WebCore::isValidStandardizedPaymentMethodIdentifier):
413         (WebCore::isValidURLBasedPaymentMethodIdentifier):
414         (WebCore::convertAndValidatePaymentMethodIdentifier):
415         (WebCore::PaymentRequest::create):
416         * Modules/paymentrequest/PaymentRequest.h:
417
418 2017-10-02  Ryosuke Niwa  <rniwa@webkit.org>
419
420         Move more code into PasteboardCustomData
421         https://bugs.webkit.org/show_bug.cgi?id=177795
422
423         Reviewed by Wenson Hsieh.
424
425         Moved sharedBufferFromCustomData, customDataFromSharedBuffer, and customWebKitPasteboardDataType into
426         PasteboardCustomData as createSharedBuffer, fromSharedBuffer, and cocoaType respectively.
427
428         * platform/Pasteboard.cpp:
429         (WebCore::PasteboardCustomData::createSharedBuffer const): Renamed from sharedBufferFromCustomData.
430         (WebCore::PasteboardCustomData::fromSharedBuffer): Renamed from customDataFromSharedBuffer.
431         * platform/Pasteboard.h:
432         * platform/StaticPasteboard.cpp:
433         (WebCore::StaticPasteboard::commitToPasteboard): Now initializes with an empty origin string.
434         * platform/cocoa/PasteboardCocoa.mm:
435         (WebCore::PasteboardCustomData::cocoaType): Moved here from Pasteboard.h
436         (WebCore::Pasteboard::readStringInCustomData):
437         * platform/ios/PlatformPasteboardIOS.mm:
438         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
439         (WebCore::PlatformPasteboard::write):
440         * platform/ios/WebItemProviderPasteboard.mm:
441         (-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentfiers:]):
442         * platform/mac/PlatformPasteboardMac.mm:
443         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
444         (WebCore::PlatformPasteboard::write):
445
446 2017-10-02  Brent Fulgham  <bfulgham@apple.com>
447
448         [Mac] Use safer decoding practices for NSKeyedUnarchiver
449         https://bugs.webkit.org/show_bug.cgi?id=175887
450         <rdar://problem/33435281>
451
452         Reviewed by Daniel Bates.
453
454         * loader/archive/cf/LegacyWebArchiveMac.mm:
455         (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Use NSSecureCoding to unarchive.
456         (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto for archiving.
457         * testing/cocoa/WebArchiveDumpSupport.mm:
458         (WebCoreTestSupport::createCFURLResponseFromResponseData): Update to use NSSecureCoding if possible.
459
460 2017-10-02  Daniel Bates  <dabates@apple.com>
461
462         Use InlineTextBox::lineFont() in more places
463         https://bugs.webkit.org/show_bug.cgi?id=177749
464
465         Reviewed by Zalan Bujtas.
466
467         Currently InlineTextBox::paint() calls InlineTextBox::lineFont() to compute the font for the
468         line and then passes this value to various paint helper functions. The computation is not
469         expensive and it is sufficient to have the individual paint helper functions compute it
470         directly. We should have the individual paint helper functions compute it directly. This
471         will help towards sharing more code throughout InlineTextBox by reducing the noise of
472         passing the font for the line.
473
474         No functionality changed. So, no new tests.
475
476         * rendering/InlineTextBox.cpp:
477         (WebCore::InlineTextBox::paint):
478         (WebCore::InlineTextBox::paintSelection):
479         (WebCore::InlineTextBox::paintTextSubrangeBackground):
480         (WebCore::InlineTextBox::paintCompositionBackground):
481         (WebCore::InlineTextBox::paintTextMatchMarker):
482         (WebCore::InlineTextBox::paintDecoration):
483         (WebCore::InlineTextBox::paintDocumentMarker):
484         (WebCore::InlineTextBox::paintDocumentMarkers):
485         * rendering/InlineTextBox.h:
486
487 2017-10-02  Basuke Suzuki  <Basuke.Suzuki@sony.com>
488
489         [Curl] Implement missing async method in RecourceHandle and make it actually async
490         https://bugs.webkit.org/show_bug.cgi?id=173964
491
492         Reviewed by Alex Christensen.
493
494         * platform/network/ResourceHandle.cpp:
495         (WebCore::ResourceHandle::continueWillSendRequest): Deleted.
496         (WebCore::ResourceHandle::continueDidReceiveResponse): Deleted.
497         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace): Deleted.
498         * platform/network/curl/CurlRequest.cpp:
499         (WebCore::CurlRequest::start):
500         (WebCore::CurlRequest::cancel):
501         (WebCore::CurlRequest::suspend):
502         (WebCore::CurlRequest::resume):
503         (WebCore::CurlRequest::didReceiveHeader):
504         (WebCore::CurlRequest::didReceiveData):
505         (WebCore::CurlRequest::didCompleteTransfer):
506         (WebCore::CurlRequest::didCancelTransfer):
507         (WebCore::CurlRequest::finalizeTransfer):
508         (WebCore::CurlRequest::invokeDidReceiveResponseForFile):
509         (WebCore::CurlRequest::invokeDidReceiveResponse):
510         (WebCore::CurlRequest::completeDidReceiveResponse):
511         (WebCore::CurlRequest::setRequestPaused):
512         (WebCore::CurlRequest::setCallbackPaused):
513         (WebCore::CurlRequest::pausedStatusChanged):
514         (WebCore::CurlRequest::setPaused): Deleted.
515         * platform/network/curl/CurlRequest.h:
516         (WebCore::CurlRequest::needToInvokeDidReceiveResponse const):
517         (WebCore::CurlRequest::isPaused const):
518         * platform/network/curl/ResourceHandleCurl.cpp:
519         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
520         (WebCore::ResourceHandle::continueDidReceiveResponse):
521         (WebCore::ResourceHandle::platformContinueSynchronousDidReceiveResponse):
522         * platform/network/curl/ResourceHandleCurlDelegate.cpp:
523         (WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
524         (WebCore::ResourceHandleCurlDelegate::continueDidReceiveResponse):
525         (WebCore::ResourceHandleCurlDelegate::platformContinueSynchronousDidReceiveResponse):
526         (WebCore::ResourceHandleCurlDelegate::continueAfterDidReceiveResponse):
527         (WebCore::ResourceHandleCurlDelegate::shouldRedirectAsGET):
528         * platform/network/curl/ResourceHandleCurlDelegate.h:
529         * platform/network/curl/ResourceResponseCurl.cpp:
530         (WebCore::ResourceResponse::shouldRedirect):
531         (WebCore::ResourceResponse::isMovedPermanently const):
532         (WebCore::ResourceResponse::isFound const):
533         (WebCore::ResourceResponse::isSeeOther const):
534         (WebCore::ResourceResponse::isNotModified const):
535         (WebCore::ResourceResponse::isUnauthorized const):
536
537 2017-10-02  Ryosuke Niwa  <rniwa@webkit.org>
538
539         PasteImage tests are failing on debug builds
540         https://bugs.webkit.org/show_bug.cgi?id=177778
541
542         Reviewed by Wenson Hsieh.
543
544         After r222702, PlatformPasteboard is no longer responsible for adding "Files" as a type"
545         as DataTransfer takes care of it now. Removed the code to do this from PlatformPasteboardIOS.mm
546         and PlatformPasteboardMac.mm so that we don't fail assertions in debug builds.
547
548         * platform/ios/PlatformPasteboardIOS.mm:
549         (WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
550         * platform/mac/PlatformPasteboardMac.mm:
551         (WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
552         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
553
554 2017-10-02  Daniel Bates  <dabates@apple.com>
555
556         No need to truncate text after calling InlineTextBox::text()
557         https://bugs.webkit.org/show_bug.cgi?id=177748
558
559         Reviewed by Zalan Bujtas.
560
561         Following r222670 it is no longer necessary to explicitly truncate the text run length
562         as InlineTextBox::text() returns a text run with respect to the truncation of the text box.
563
564         No functionality changed. So, no new tests.
565
566         * rendering/InlineTextBox.cpp:
567         (WebCore::InlineTextBox::paint):
568
569 2017-10-02  Antti Koivisto  <antti@apple.com>
570
571         Add makeWeakPtr variant that takes pointer
572         https://bugs.webkit.org/show_bug.cgi?id=177767
573
574         Reviewed by Zalan Bujtas.
575
576         Use it.
577
578         * rendering/SelectionRangeData.h:
579         (WebCore::SelectionRangeData::Context::Context):
580
581 2017-10-02  Antti Koivisto  <antti@apple.com>
582
583         Make RenderPtr a type alias of std::unique_ptr
584         https://bugs.webkit.org/show_bug.cgi?id=177739
585
586         Reviewed by Sam Weinig.
587
588         It just needs a custom deleter.
589
590         * page/FrameView.h:
591         * rendering/RenderElement.cpp:
592         (WebCore::RenderElement::insertChildInternal):
593         * rendering/RenderMultiColumnFlow.cpp:
594         (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
595         (WebCore::RenderMultiColumnFlow::handleSpannerRemoval):
596         * rendering/RenderObject.cpp:
597         (WebCore::RenderObjectDeleter::operator() const):
598         (WebCore::RenderObject::willBeDestroyed):
599         * rendering/RenderPtr.h:
600         (WebCore::createRenderer):
601         (WebCore::static_pointer_cast):
602
603             Make this safer with downcast.
604
605         (WebCore::RenderPtr::RenderPtr): Deleted.
606         (WebCore::RenderPtr::~RenderPtr): Deleted.
607         (WebCore::RenderPtr::get const): Deleted.
608         (WebCore::RenderPtr::operator* const): Deleted.
609         (WebCore::RenderPtr::operator-> const): Deleted.
610         (WebCore::RenderPtr::operator! const): Deleted.
611         (WebCore::RenderPtr::operator UnspecifiedBoolType const): Deleted.
612         (WebCore::RenderPtr::operator=): Deleted.
613         (WebCore::RenderPtr::swap): Deleted.
614         (WebCore::RenderPtr::operator==): Deleted.
615         (WebCore::RenderPtr::operator!=): Deleted.
616         (WebCore::RenderPtr<T>::clear): Deleted.
617         (WebCore::RenderPtr<T>::leakPtr): Deleted.
618         (WebCore::RenderPtr<T>::RenderPtr): Deleted.
619         (WebCore::=): Deleted.
620         (WebCore::swap): Deleted.
621         (WebCore::operator==): Deleted.
622         (WebCore::operator!=): Deleted.
623         (WebCore::getPtr): Deleted.
624         (WTF::HashTraits<WebCore::RenderPtr<T>>::emptyValue): Deleted.
625         (WTF::HashTraits<WebCore::RenderPtr<T>>::peek): Deleted.
626
627             We already have hash traits for std::unique_ptr.
628
629 2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
630
631         Web Inspector: Include Beacon and Ping requests in Network tab
632         https://bugs.webkit.org/show_bug.cgi?id=177641
633         <rdar://problem/33086839>
634
635         Reviewed by Chris Dumez.
636
637         Tests: http/tests/inspector/network/beacon-type.html
638                http/tests/inspector/network/ping-type.html
639
640         * Modules/beacon/NavigatorBeacon.cpp:
641         (WebCore::NavigatorBeacon::sendBeacon):
642         Fix a typo.
643
644         * loader/PingLoader.cpp:
645         (WebCore::PingLoader::startPingLoad):
646         * loader/cache/CachedResource.cpp:
647         (WebCore::CachedResource::load):
648         Include InspectorInstrumentation hooks for ping network loads.
649
650         * loader/LoaderStrategy.h:
651         * platform/network/PingHandle.h:
652         Include an optional ResourceResponse in the ping load completion callback.
653         If available this will be enough for Web Inspector to include details such
654         as the response statusCode.
655
656         * inspector/InspectorInstrumentation.cpp:
657         (WebCore::InspectorInstrumentation::willSendRequestOfTypeImpl):
658         (WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl): Deleted.
659         * inspector/InspectorInstrumentation.h:
660         (WebCore::InspectorInstrumentation::willSendRequestOfType):
661         (WebCore::InspectorInstrumentation::continueAfterPingLoader): Deleted.
662         * inspector/InspectorNetworkAgent.cpp:
663         (WebCore::resourceTypeForCachedResource):
664         (WebCore::resourceTypeForLoadType):
665         (WebCore::InspectorNetworkAgent::willSendRequest):
666         (WebCore::InspectorNetworkAgent::willSendRequestOfType):
667         * inspector/InspectorNetworkAgent.h:
668         Make a general willSendRequestOfType hook when sending a request that does
669         not go through normal CachedResource loading. The Ping and Beacon requests
670         go through this process, we may also use this path for Preflight requests.
671
672         * inspector/InspectorPageAgent.cpp:
673         (WebCore::InspectorPageAgent::resourceTypeJson):
674         (WebCore::InspectorPageAgent::cachedResourceType):
675         * inspector/InspectorPageAgent.h:
676         Small refactoring.
677
678 2017-10-02  Zalan Bujtas  <zalan@apple.com>
679
680         SelectionRangeData should not hold raw RenderObject pointers
681         https://bugs.webkit.org/show_bug.cgi?id=177677
682         <rdar://problem/34763060>
683
684         Reviewed by Sam Weinig.
685
686         SelectionRangeData::Context start and end renderers' lifetime is not strictly tied
687         to the lifetime of SelectionRangeData.
688
689         Covered by existing tests.
690
691         * editing/FrameSelection.cpp:
692         (WebCore::FrameSelection::updateAppearance):
693         * platform/DragImage.cpp:
694         (WebCore::createDragImageForRange):
695         * rendering/SelectionRangeData.cpp:
696         (WebCore::isValidRendererForSelection):
697         (WebCore::collect):
698         (WebCore::SelectionRangeData::set):
699         (WebCore::SelectionRangeData::clear):
700         (WebCore::SelectionRangeData::repaint const):
701         (WebCore::SelectionRangeData::collectBounds const):
702         (WebCore::SelectionRangeData::apply):
703         * rendering/SelectionRangeData.h:
704         (WebCore::SelectionRangeData::Context::Context):
705         (WebCore::SelectionRangeData::Context::start const):
706         (WebCore::SelectionRangeData::Context::end const):
707         (WebCore::SelectionRangeData::Context::startPosition const):
708         (WebCore::SelectionRangeData::Context::endPosition const):
709         (WebCore::SelectionRangeData::Context::operator== const):
710         (WebCore::SelectionRangeData::start const):
711         (WebCore::SelectionRangeData::end const):
712         (WebCore::SelectionRangeData::startPosition const):
713         (WebCore::SelectionRangeData::endPosition const):
714
715 2017-10-02  Olivier Blin  <olivier.blin@softathome.com>
716
717         [WPE] Remove GnuTLS dependency
718         https://bugs.webkit.org/show_bug.cgi?id=177750
719
720         Reviewed by Michael Catanzaro.
721
722         libgcrypt is used by default instead of GnuTLS.
723         See bug 163125
724
725         * PlatformWPE.cmake:
726
727 2017-10-02  Zalan Bujtas  <zalan@apple.com>
728
729         Addressing post-review comments after r222621
730         https://bugs.webkit.org/show_bug.cgi?id=177610
731
732         Reviewed by Darin Adler.
733
734         * rendering/RenderMenuList.cpp:
735         (RenderMenuList::didUpdateActiveOption):
736
737 2017-10-02  Daniel Bates  <dabates@apple.com>
738
739         Remove length argument from TextPainter::paint()
740         https://bugs.webkit.org/show_bug.cgi?id=177758
741
742         Reviewed by Alex Christensen.
743
744         Have TextPainter.paint() use the length of the specified TextRun as opposed to
745         taking an explicit argument for the length of the TextRun.
746
747         Following r222670 InlineTextBox creates a TextRun with respect to the truncated
748         line. Prior to r222670 InlineTextBox did not do this and hence it had to pass both
749         the TextRun and truncated length to TextPainter.paint() to have the line painted.
750         Code that needs to paint a substring of a TextRun can still do so by using TextPainter.paintRange().
751
752         No functionality changed. So, no new tests.
753
754         * rendering/InlineTextBox.cpp:
755         (WebCore::InlineTextBox::paint):
756         * rendering/SimpleLineLayoutFunctions.cpp:
757         (WebCore::SimpleLineLayout::paintFlow):
758         * rendering/TextPainter.cpp:
759         (WebCore::TextPainter::paint):
760         * rendering/TextPainter.h:
761
762 2017-10-02  Fujii Hironori  <Hironori.Fujii@sony.com>
763
764         [curl] Crashes in CurlRequest::setupPUT()
765         https://bugs.webkit.org/show_bug.cgi?id=177733
766
767         Reviewed by Alex Christensen.
768
769         Tests: http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html
770
771         * platform/network/curl/CurlRequest.cpp:
772         (WebCore::CurlRequest::setupPUT): Null-check the result of request.httpBody().
773
774 2017-10-02  Basuke Suzuki  <Basuke.Suzuki@sony.com>
775
776         [CURL] Should handle redirects in WebCore
777         https://bugs.webkit.org/show_bug.cgi?id=21242
778
779         Reviewed by Alex Christensen.
780
781         * platform/network/ResourceHandle.cpp:
782         * platform/network/curl/CurlContext.cpp:
783         (WebCore::CurlHandle::enableAutoReferer): Deleted.
784         * platform/network/curl/CurlContext.h:
785         * platform/network/curl/CurlRequest.cpp:
786         (WebCore::CurlRequest::setupTransfer):
787         (WebCore::CurlRequest::didReceiveHeader):
788         (WebCore::CurlRequest::didReceiveData):
789         * platform/network/curl/ResourceHandleCurl.cpp:
790         (WebCore::ResourceHandle::start):
791         (WebCore::ResourceHandle::continueDidReceiveResponse):
792         (WebCore::ResourceHandle::continueWillSendRequest):
793         * platform/network/curl/ResourceHandleCurlDelegate.cpp:
794         (WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
795         (WebCore::ResourceHandleCurlDelegate::shouldRedirectAsGET):
796         (WebCore::ResourceHandleCurlDelegate::willSendRequest):
797         (WebCore::ResourceHandleCurlDelegate::continueWillSendRequest):
798         (WebCore::ResourceHandleCurlDelegate::continueAfterWillSendRequest):
799         * platform/network/curl/ResourceHandleCurlDelegate.h:
800         * platform/network/curl/ResourceResponse.h:
801         * platform/network/curl/ResourceResponseCurl.cpp:
802         (WebCore::ResourceResponse::shouldRedirect):
803         (WebCore::ResourceResponse::isMovedPermanently const):
804         (WebCore::ResourceResponse::isFound const):
805         (WebCore::ResourceResponse::isSeeOther const):
806         (WebCore::ResourceResponse::isRedirection const): Deleted.
807
808 2017-10-02  Antti Koivisto  <antti@apple.com>
809
810         Crashes with guard malloc under RenderFullScreen::unwrapRenderer
811         https://bugs.webkit.org/show_bug.cgi?id=177760
812
813         Unreviewed.
814
815         * rendering/RenderFullScreen.cpp:
816         (WebCore::RenderFullScreen::unwrapRenderer):
817
818         The assert accesses 'this' after it has been deleted. It is not very valuable so remove the assert.
819
820 2017-10-02  Zan Dobersek  <zdobersek@igalia.com>
821
822         GraphicsContext: remove unused ENABLE(3D_TRANSFORMS) && USE(TEXTURE_MAPPER)
823         https://bugs.webkit.org/show_bug.cgi?id=177757
824
825         Reviewed by Michael Catanzaro.
826
827         Remove three methods from the GraphicsContext class that were conditioned
828         with the ENABLE(3D_TRANSFORMS) and USE(TEXTURE_MAPPER) guards. These aren't
829         used anywhere at this point, but apparently used to be in the TextureMapper
830         implementation.
831
832         * platform/graphics/GraphicsContext.h:
833         * platform/graphics/cairo/GraphicsContextCairo.cpp:
834         (WebCore::GraphicsContext::get3DTransform const): Deleted.
835         (WebCore::GraphicsContext::concat3DTransform): Deleted.
836         (WebCore::GraphicsContext::set3DTransform): Deleted.
837
838 2017-10-02  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
839
840         [GLib] NetworkStateNotifier implementation missing
841         https://bugs.webkit.org/show_bug.cgi?id=177741
842
843         Reviewed by Carlos Garcia Campos.
844
845         No new tests. The DOM support is already being tested, but we would need a way
846         of simulating a network outage to test GNetworkMonitor.
847
848         * PlatformGTK.cmake: add new file.
849         * PlatformWPE.cmake: add new file.
850         * platform/network/NetworkStateNotifier.cpp: no longer need the empty implementations, all platforms covered.
851         * platform/network/NetworkStateNotifier.h:
852         * platform/network/glib/NetworkStateNotifierGLib.cpp: Added.
853         (WebCore::NetworkStateNotifier::updateStateWithoutNotifying): update the network state using GNetworkMonitor's availability.
854         (WebCore::NetworkStateNotifier::networkChangedCallback): when network-changed is emitted, trigger a state update.
855         (WebCore::NetworkStateNotifier::startObserving): watch GNetworkMonitor's network-changed signal.
856
857 2017-10-02  Olivier Blin  <olivier.blin@softathome.com>
858
859         Fix build with MathML disabled
860         https://bugs.webkit.org/show_bug.cgi?id=177744
861
862         Reviewed by Michael Catanzaro.
863
864         These are regressions from r217549 (StyleResolver) and r221379 (RenderBlockFlow), which do not guard MathML usage.
865
866         * css/StyleResolver.cpp:
867         (WebCore::hasEffectiveDisplayNoneForDisplayContents):
868         * rendering/RenderBlockFlow.cpp:
869         (WebCore::RenderBlockFlow::willCreateColumns const):
870
871 2017-10-02  Yusuke Suzuki  <utatane.tea@gmail.com>
872
873         Use ThreadIdentifier instead of thread::this_thread::get_id
874         https://bugs.webkit.org/show_bug.cgi?id=177729
875
876         Reviewed by Sam Weinig.
877
878         We can use WTF::ThreadIdentifier instead of thread::this_thread::get_id
879         to make use of ThreadIdentifier consistent in WebKit. In the other places,
880         we use ThreadIdentifier for this debugging purpose. And this is the only
881         place using thread::this_thread::get_id for the exact same purpose.
882         Furthermore, thread::this_thread::get_id in Windows platform. So we prefer
883         using ThreadIdentifier than thread::this_thread::get_id.
884
885         * Modules/webdatabase/DatabaseDetails.h:
886         (WebCore::DatabaseDetails::DatabaseDetails):
887         (WebCore::DatabaseDetails::threadID const):
888         * Modules/webdatabase/DatabaseManager.cpp:
889         (WebCore::DatabaseManager::detailsForNameAndOrigin):
890
891 2017-10-02  Antti Koivisto  <antti@apple.com>
892
893         Fix memory leaks in RenderMultiColumnFlow
894         https://bugs.webkit.org/show_bug.cgi?id=177735
895
896         Reviewed by Zalan Bujtas.
897
898         * rendering/RenderMultiColumnFlow.cpp:
899         (WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
900
901             Switch from destroy() to removeFromParentAndDestroy() (they are currently equivalent in practice).
902
903         (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
904
905             Destroy the placeholders instead of leaking them.
906
907         (WebCore::RenderMultiColumnFlow::handleSpannerRemoval):
908
909             Destroy the placeholder instead of leaking it.
910
911 2017-10-02  Charles Turner  <cturner@igalia.com>
912
913         Try to play AVC codec even if H.264 decoder only advertises byte-stream profile.
914         https://bugs.webkit.org/show_bug.cgi?id=177550
915
916         GStreamer's element factory filters will claim they can't play videos with AVC
917         codec strings, but the elements really are capable of playing them when filters
918         like videoconvert are inserted by playbin. Videos of this variety are in the YouTube
919         2018 EME conformance tests.
920
921         Also replace std::array with a stack array, this saves having to count
922         the number of elements (the compiler does that now) and reduces braces.
923
924         Reviewed by Carlos Alberto Lopez Perez.
925
926         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
927         (WebCore::codecSet):
928
929 2017-10-02  Tomas Popela  <tpopela@redhat.com>
930
931         [SOUP] Default kerberos authentication credentials are used in ephemeral (private) mode
932         https://bugs.webkit.org/show_bug.cgi?id=177738
933
934         Reviewed by Carlos Garcia Campos.
935
936         If the session is ephemeral then don't enable the Negotiate support in
937         our SoupSession.
938
939         * platform/network/soup/NetworkStorageSessionSoup.cpp: Pass the
940         session ID if it's known to the SoupNetworkSession.
941         (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
942         (WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession const):
943         * platform/network/soup/SoupNetworkSession.cpp:
944         (WebCore::SoupNetworkSession::SoupNetworkSession): If the session is
945         ephemeral (based on given session ID) then don't activate the
946         Negotiate support in SoupSession.
947         * platform/network/soup/SoupNetworkSession.h:
948         Change the constructor to accept the PAL::SessionID with the default
949         value set to PAL::SessionID::emptySessionID.
950
951 2017-10-02  Joanmarie Diggs  <jdiggs@igalia.com>
952
953         REGRESSION(r222640) [GTK] Build broken with ATK 2.14
954         https://bugs.webkit.org/show_bug.cgi?id=177634
955
956         Reviewed by Michael Catanzaro.
957
958         Use ATK_CHECK_VERSION to prevent the build failure.
959
960         No new tests. This fixes a downstream build failure.
961
962         * accessibility/atk/AXObjectCacheAtk.cpp:
963         (WebCore::AXObjectCache::postPlatformNotification):
964
965 2017-10-01  Ryosuke Niwa  <rniwa@webkit.org>
966
967         Pasteboard shouldn't add "Files" as a type
968         https://bugs.webkit.org/show_bug.cgi?id=177731
969
970         Reviewed by Wenson Hsieh.
971
972         Removed the platform specific code to add "Files" when there is a file present in platform's pasteboard.
973         DataTransfer::types now adds "Files" automatically when Pasteboard::containsFiles returns true.
974
975         No new tests since there should be no behavioral change.
976
977         * dom/DataTransfer.cpp:
978         (WebCore::DataTransfer::types const):
979         * platform/gtk/PasteboardGtk.cpp:
980         (WebCore::Pasteboard::typesForLegacyUnsafeBindings):
981         * platform/ios/PasteboardIOS.mm:
982         (WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType):
983         * platform/mac/PasteboardMac.mm:
984         (WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType):
985         * platform/win/PasteboardWin.cpp:
986         (WebCore::addMimeTypesForFormat): Removed the code to add "Text" and "URL" as separate types since
987         this is not what the rest of ports do, and this type normalization is now taken care of by DataTransfer
988         since r221063.
989
990 2017-10-02  Ryosuke Niwa  <rniwa@webkit.org>
991
992         Another attempt to fix Windows build after r222697.
993
994         * editing/FrameSelection.cpp:
995         (WebCore::FrameSelection::updateAppearance):
996         * platform/DragImage.cpp:
997         (WebCore::createDragImageForRange):
998         * rendering/SelectionRangeData.cpp:
999         (WebCore::SelectionRangeData::clear):
1000         * rendering/SelectionRangeData.h:
1001         (WebCore::SelectionRangeData::Context::Context):
1002
1003 2017-10-02  Ryosuke Niwa  <rniwa@webkit.org>
1004
1005         Windows build fix attempt after r222697.
1006
1007         * platform/DragImage.cpp:
1008         (WebCore::createDragImageForRange):
1009
1010 2017-10-02  Ryosuke Niwa  <rniwa@webkit.org>
1011
1012         Merge readFilenames() and read(PasteboardFileReader)
1013         https://bugs.webkit.org/show_bug.cgi?id=177728
1014         <rdar://problem/34761725>
1015
1016         Reviewed by Sam Weinig.
1017
1018         Generalized PasteboardFileReader to return multiple files instead of just one file, and replaced the use
1019         of Pasteboard::readFilenames() with it. Because eliminates the need for finding the list of types to read
1020         as files in addition to file names, this patch also removes Pasteboard::typesTreatedAsFiles().
1021
1022         Note that Pasteboard::readFilenames() continues to exist in macOS and iOS as it's internally used by
1023         Pasteboard::read(PasteboardFileReader) in PasteboardCocoa.mm.
1024
1025         No new tests since there should be no behavioral change.
1026
1027         * dom/DataTransfer.cpp:
1028         (WebCore::DataTransfer::files const): Now makes a single call to Pasteboard::read(PasteboardFileReader)
1029         instead of reading filenames and then falling back to it. Also got rid of if-def for drag drop checks
1030         since forDrag() and forFileDrag() are always defined since r222688.
1031         (WebCore::PasteboardFileTypeReader): Added. Gets the list of all file types.
1032         (WebCore::PasteboardFileTypeReader::readFilename): Added. Gets the list of all file types.
1033         (WebCore::PasteboardFileTypeReader::readBuffer): Added. Gets the list of all file types.
1034         (WebCore::DataTransfer::hasFileOfType): Reimplemented using PasteboardFileTypeReader.
1035         * editing/WebCorePasteboardFileReader.cpp:
1036         (WebCore::WebCorePasteboardFileReader::readFilename): Added.
1037         (WebCore::WebCorePasteboardFileReader::readBuffer): Renamed from read.
1038         * editing/WebCorePasteboardFileReader.h:
1039         * platform/Pasteboard.h:
1040         (WebCore::PasteboardFileReader): Removed the constructor since we no longer specify a specific type to
1041         read off of pasteboard, and renamed the existing read function to readBuffer, and added a new variant
1042         which takes a filename.
1043         * platform/StaticPasteboard.h:
1044         * platform/cocoa/PasteboardCocoa.mm:
1045         (WebCore::imageTypeToFakeFilename): Return "image/png" for ImageType::TIFF (to do TIFF-to-PNG conversion;
1046         see r222656 for why this is needed) now that this function is used to convert directly from image type
1047         converted from cocoa type instead of the one reverse-converted from MIME type.
1048         (WebCore::mimeTypeToImageType): Deleted.
1049         (WebCore::Pasteboard::typesTreatedAsFiles): Deleted.
1050         (WebCore::Pasteboard::typesForLegacyUnsafeBindings): Use newly added readTypesWithSecurityCheck.
1051         (WebCore::convertTIFFToPNG): Extracted out of read(PasteboardFileReader).
1052         (WebCore::Pasteboard::read): Generalized to add filenames as well as image buffers as files. Because now
1053         we're concerting Cocoa types to ImageType, we no longer have to detect when TIFF-as-PNG conversion is
1054         happening here. We just treat ImageType::TIFF as PNG and do the conversion.
1055         (WebCore::Pasteboard::readStringInCustomData): Use newly added readBufferForTypeWithSecurityCheck.
1056         (WebCore::Pasteboard::readTypesWithSecurityCheck): Added.
1057         (WebCore::Pasteboard::readBufferForTypeWithSecurityCheck): Added.
1058         * platform/gtk/PasteboardGtk.cpp:
1059         (WebCore::Pasteboard::read): Implemented.
1060         (WebCore::Pasteboard::typesTreatedAsFiles): Deleted.
1061         (WebCore::Pasteboard::containsFiles): Implemented without calling readFilenames, which has been deleted.
1062         (WebCore::Pasteboard::readFilenames): Deleted.
1063         * platform/win/PasteboardWin.cpp:
1064         (WebCore::Pasteboard::typesTreatedAsFiles): Deleted.
1065         (WebCore::PasteboardFileCounter): Added. Used to counts the number of files in the pasteboard.
1066         (WebCore::PasteboardFileCounter::readFilename):
1067         (WebCore::PasteboardFileCounter::readBuffer):
1068         (WebCore::Pasteboard::containsFiles):
1069         (WebCore::Pasteboard::read): Moved the code to extract filenames out of readFilenames.
1070         (WebCore::Pasteboard::readFilenames): Deleted.
1071         * platform/wpe/PasteboardWPE.cpp:
1072         (WebCore::Pasteboard::typesTreatedAsFiles): Deleted.
1073         (WebCore::Pasteboard::readFilenames): Deleted.
1074
1075 2017-10-01  Sam Weinig  <sam@webkit.org>
1076
1077         [Settings] Move remaining simple settings to Settings.in
1078         https://bugs.webkit.org/show_bug.cgi?id=177730
1079
1080         Reviewed by Darin Adler.
1081
1082         - Adds new option type for Settings.in, 'getter', which allows you to specify
1083           a custom name for the setting's getter. For instance, the setting javaEnabled
1084           has a custom getter name, 'isJavaEnabled'.
1085         - Adds support for WTF::Seconds as a type of setting. Used by only 
1086           timeWithoutMouseMovementBeforeHidingControls at the moment.
1087         - Moves non-generated settings from Settings.h/cpp that don't require custom
1088           action when set, to Settings.in
1089
1090         * Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py:
1091         * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
1092         * Scripts/GenerateSettings/Settings.py:
1093
1094             Add support for 'getter' and the Seconds type.
1095
1096         * WebCore.xcodeproj/project.pbxproj:
1097         * platform/text/FontRenderingMode.h: Copied from Source/WebCore/platform/text/TextFlags.h.
1098         * platform/text/TextFlags.h:
1099         
1100             Add FontRenderingMode.h. Moved out of TextFlags.h to be accessible by
1101             the settings generator.
1102         
1103         * page/Settings.cpp:
1104         (WebCore::Settings::Settings):
1105         (WebCore::Settings::setJavaEnabled): Deleted.
1106         (WebCore::Settings::setJavaEnabledForLocalFiles): Deleted.
1107         (WebCore::Settings::setPreferMIMETypeForImages): Deleted.
1108         (WebCore::Settings::setForcePendingWebGLPolicy): Deleted.
1109         (WebCore::Settings::setNeedsAdobeFrameReloadingQuirk): Deleted.
1110         (WebCore::Settings::setFontRenderingMode): Deleted.
1111         (WebCore::Settings::fontRenderingMode const): Deleted.
1112         (WebCore::Settings::setShowTiledScrollingIndicator): Deleted.
1113         (WebCore::Settings::setFontFallbackPrefersPictographs): Deleted.
1114         (WebCore::Settings::setWebFontsAlwaysFallBack): Deleted.
1115         * page/Settings.h:
1116         (WebCore::Settings::isJavaEnabled const): Deleted.
1117         (WebCore::Settings::isJavaEnabledForLocalFiles const): Deleted.
1118         (WebCore::Settings::preferMIMETypeForImages const): Deleted.
1119         (WebCore::Settings::needsAcrobatFrameReloadingQuirk const): Deleted.
1120         (WebCore::Settings::showTiledScrollingIndicator const): Deleted.
1121         (WebCore::Settings::setTouchEventEmulationEnabled): Deleted.
1122         (WebCore::Settings::isTouchEventEmulationEnabled const): Deleted.
1123         (WebCore::Settings::setTimeWithoutMouseMovementBeforeHidingControls): Deleted.
1124         (WebCore::Settings::timeWithoutMouseMovementBeforeHidingControls const): Deleted.
1125         (WebCore::Settings::fontFallbackPrefersPictographs const): Deleted.
1126         (WebCore::Settings::webFontsAlwaysFallBack const): Deleted.
1127         (WebCore::Settings::setMediaKeysStorageDirectory): Deleted.
1128         (WebCore::Settings::mediaKeysStorageDirectory const): Deleted.
1129         (WebCore::Settings::setMediaDeviceIdentifierStorageDirectory): Deleted.
1130         (WebCore::Settings::mediaDeviceIdentifierStorageDirectory const): Deleted.
1131         (WebCore::Settings::applePayEnabled const): Deleted.
1132         (WebCore::Settings::setApplePayEnabled): Deleted.
1133         (WebCore::Settings::applePayCapabilityDisclosureAllowed const): Deleted.
1134         (WebCore::Settings::setApplePayCapabilityDisclosureAllowed): Deleted.
1135         (WebCore::Settings::isForcePendingWebGLPolicy const): Deleted.
1136         * page/Settings.in:
1137
1138             Moved hand-written settings to be Settings.in based.
1139
1140 2017-10-01  Zalan Bujtas  <zalan@apple.com>
1141
1142         RenderView does not need to be a SelectionSubtreeRoot
1143         https://bugs.webkit.org/show_bug.cgi?id=177713
1144
1145         Reviewed by Darin Adler and Antti Koivisto.
1146
1147         1. SelectionSubtreeRoot -> SelectionRangeData 
1148         2. Move all selection logic from RenderView to SelectionRangeData
1149         3. class RenderView : public SelectionSubtreeRoot -> SelectionRangeData m_selection;
1150         4. Remove redundant code
1151         5. General modernization
1152  
1153         No change in functionality.
1154
1155         * editing/FrameSelection.cpp:
1156         (WebCore::FrameSelection::setNeedsSelectionUpdate):
1157         (WebCore::DragCaretController::nodeWillBeRemoved):
1158         (WebCore::FrameSelection::respondToNodeModification):
1159         (WebCore::FrameSelection::prepareForDestruction):
1160         (WebCore::FrameSelection::focusedOrActiveStateChanged):
1161         (WebCore::FrameSelection::updateAppearance):
1162         (WebCore::FrameSelection::selectionBounds const):
1163         * page/FrameView.cpp:
1164         (WebCore::FrameView::paintContentsForSnapshot):
1165         * platform/DragImage.cpp:
1166         (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
1167         (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
1168         (WebCore::createDragImageForRange):
1169         * rendering/InlineTextBox.cpp:
1170         (WebCore::InlineTextBox::selectionState):
1171         (WebCore::InlineTextBox::selectionStartEnd const):
1172         * rendering/RenderBlock.cpp:
1173         (WebCore::RenderBlock::isSelectionRoot const):
1174         * rendering/RenderObject.cpp:
1175         (WebCore::RenderObject::isSelectionBorder const):
1176         * rendering/RenderObject.h:
1177         * rendering/RenderReplaced.cpp:
1178         (WebCore::RenderReplaced::isSelected const):
1179         * rendering/RenderText.cpp:
1180         (WebCore::RenderText::collectSelectionRectsForLineBoxes):
1181         * rendering/RenderTextLineBoxes.cpp:
1182         (WebCore::RenderTextLineBoxes::setSelectionState):
1183         * rendering/RenderView.cpp:
1184         (WebCore::RenderView::RenderView):
1185         (WebCore::SelectionIterator::SelectionIterator): Deleted.
1186         (WebCore::SelectionIterator::current const): Deleted.
1187         (WebCore::SelectionIterator::next): Deleted.
1188         (WebCore::SelectionIterator::checkForSpanner): Deleted.
1189         (WebCore::rendererAfterPosition): Deleted.
1190         (WebCore::RenderView::selectionBounds const): Deleted.
1191         (WebCore::RenderView::subtreeSelectionBounds const): Deleted.
1192         (WebCore::RenderView::repaintSelection const): Deleted.
1193         (WebCore::RenderView::repaintSubtreeSelection const): Deleted.
1194         (WebCore::RenderView::setSelection): Deleted.
1195         (WebCore::isValidObjectForNewSelection): Deleted.
1196         (WebCore::RenderView::clearSubtreeSelection const): Deleted.
1197         (WebCore::RenderView::applySubtreeSelection): Deleted.
1198         (WebCore::RenderView::getSelection const): Deleted.
1199         (WebCore::RenderView::clearSelection): Deleted.
1200         * rendering/RenderView.h:
1201         * rendering/SelectionSubtreeRoot.cpp:
1202         (WebCore::rendererAfterPosition):
1203         (WebCore::SelectionIterator::SelectionIterator):
1204         (WebCore::SelectionIterator::current const):
1205         (WebCore::SelectionIterator::next):
1206         (WebCore::SelectionIterator::checkForSpanner):
1207         (WebCore::SelectionRangeData::SelectionRangeData):
1208         (WebCore::SelectionRangeData::set):
1209         (WebCore::SelectionRangeData::clear):
1210         (WebCore::SelectionRangeData::repaint const):
1211         (WebCore::SelectionRangeData::bounds const):
1212         (WebCore::SelectionRangeData::collectAndClear const):
1213         (WebCore::SelectionRangeData::apply):
1214         (WebCore::SelectionRangeData::isValidRendererForNewSelection const):
1215         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot): Deleted.
1216         * rendering/SelectionSubtreeRoot.h:
1217         (WebCore::SelectionRangeData::Context::operator== const):
1218         (WebCore::SelectionRangeData::get const):
1219         (WebCore::SelectionRangeData::start const):
1220         (WebCore::SelectionRangeData::end const):
1221         (WebCore::SelectionRangeData::startPosition const):
1222         (WebCore::SelectionRangeData::endPosition const):
1223         (WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData): Deleted.
1224         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData): Deleted.
1225         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStart const): Deleted.
1226         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos const): Deleted.
1227         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEnd const): Deleted.
1228         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos const): Deleted.
1229         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartEndPositions const): Deleted.
1230         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection): Deleted.
1231         (WebCore::SelectionSubtreeRoot::selectionData): Deleted.
1232         (WebCore::SelectionSubtreeRoot::selectionData const): Deleted.
1233         (WebCore::SelectionSubtreeRoot::setSelectionData): Deleted.
1234
1235 2017-10-01  Sam Weinig  <sam@webkit.org>
1236
1237         [Settings] Enums should not be passed by const reference
1238         https://bugs.webkit.org/show_bug.cgi?id=177727
1239
1240         Reviewed by Darin Adler.
1241
1242         * Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:
1243         * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
1244         (printGetterAndSetter):
1245         
1246             Use the new typeIsAggregate predicate to determine whether to
1247             use const reference or not.
1248         
1249         (includeForSetting): Deleted.
1250
1251             Move includeForSetting to Settings.py with the rest of the Setting
1252             helpers.
1253
1254         * Scripts/GenerateSettings/Settings.py:
1255         (mapToIDLType):
1256         (typeIsPrimitive):
1257         (typeIsAggregate):
1258         
1259             Add predicate to determine if a setting's type is an aggregate (struct or class)
1260             or a primitive. Remove references to size_t, which is not used.
1261
1262 2017-10-01  Sam Weinig  <sam@webkit.org>
1263
1264         Add support for DOM aborting (https://dom.spec.whatwg.org/#aborting-ongoing-activities)
1265         https://bugs.webkit.org/show_bug.cgi?id=177718
1266
1267         Reviewed by Darin Adler.
1268
1269         Adds standalone support for AbortController and AbortSignal. No integration
1270         with other specs yet.
1271
1272         * CMakeLists.txt:
1273         * DerivedSources.make:
1274         * WebCore.xcodeproj/project.pbxproj:
1275         
1276             Add new files.
1277         
1278         * dom/AbortController.cpp: Added.
1279         * dom/AbortController.h: Added.
1280         * dom/AbortController.idl: Added.
1281         * dom/AbortSignal.cpp: Added.
1282         * dom/AbortSignal.h: Added.
1283         * dom/AbortSignal.idl: Added.
1284         
1285             Add basic support AbortController and AbortSignal.
1286         
1287         * dom/EventTargetFactory.in:
1288         
1289             Add AbortSignal to the list of EventTargets.
1290
1291 2017-10-01  Antti Koivisto  <antti@apple.com>
1292
1293         Use WeakPtr for first-letter memory management
1294         https://bugs.webkit.org/show_bug.cgi?id=177716
1295
1296         Reviewed by Darin Adler.
1297
1298         * rendering/RenderElement.cpp:
1299         (WebCore::RenderElement::destroyLeftoverChildren):
1300
1301             Remove first-letter special case.
1302             Use removeAndDestroyChild instead of calling destroy() directly. The latter should
1303             eventually stop calling takeChild and assert that the renderer is not in the tree.
1304
1305         * rendering/RenderTextFragment.cpp:
1306         (WebCore::RenderTextFragment::willBeDestroyed):
1307         (WebCore::RenderTextFragment::setText):
1308         * rendering/RenderTextFragment.h:
1309
1310             Use WeakPtr.
1311
1312 2017-10-01  Sam Weinig  <sam@webkit.org>
1313
1314         XMLHttpRequest's responseXML should be annotated with [Exposed=Window]
1315         https://bugs.webkit.org/show_bug.cgi?id=177714
1316
1317         Reviewed by Darin Adler.
1318
1319         Tests: imported/w3c/web-platform-tests/XMLHttpRequest/responseType-document-in-worker.html
1320                imported/w3c/web-platform-tests/XMLHttpRequest/responseXML-unavailable-in-worker.html
1321
1322         * xml/XMLHttpRequest.cpp:
1323         (WebCore::XMLHttpRequest::responseXML):
1324         
1325             Replace returning null for non-document contexts with an assertion now
1326             that the bindings layer ensures this doesn't get called.
1327         
1328         (WebCore::XMLHttpRequest::setResponseType):
1329         
1330             Match the spec and turn attempts to set a responseType of 'document' in
1331             non-documents contexts as a no-op.
1332         
1333         * xml/XMLHttpRequest.idl:
1334         
1335             Address FIXME and annotate responseXML with [Exposed=Window] now that it
1336             is supported.
1337
1338 2017-09-30  Ryosuke Niwa  <rniwa@webkit.org>
1339
1340         Don't reveal file URL when pasting an image
1341         https://bugs.webkit.org/show_bug.cgi?id=177710
1342         <rdar://problem/34757924>
1343
1344         Reviewed by Wenson Hsieh.
1345
1346         Fixed the bug by generalizing the code we had for drag & drop to hide string types when there is a file.
1347
1348         We don't hide string types when customPasteboardDataEnabled() is false to preserve the backwards compatiblity
1349         with apps that are relying on being able to read files URLs in the pasteboard.
1350
1351         Test: editing/pasteboard/paste-image-does-not-reveal-file-url.html
1352
1353         * dom/DataTransfer.cpp:
1354         (WebCore::DataTransfer::getData const): Pretend there is no string data when there is a file in the pasteboard
1355         custom pasteboard data is enabled.
1356         (WebCore::DataTransfer::setData): Ditto.
1357         (WebCore::DataTransfer::types const): Ditto.
1358         * dom/DataTransfer.h:
1359         (WebCore::DataTransfer::forDrag const): Added for when drag & drop support is disabled at compilation time.
1360         (WebCore::DataTransfer::forFileDrag const): Ditto.
1361         * platform/Pasteboard.h:
1362         * platform/StaticPasteboard.h:
1363         * platform/cocoa/PasteboardCocoa.mm:
1364         (WebCore::Pasteboard::containsFiles): Added.
1365         * platform/gtk/PasteboardGtk.cpp:
1366         (WebCore::Pasteboard::containsFiles): Added.
1367         * platform/win/PasteboardWin.cpp:
1368         (WebCore::Pasteboard::containsFiles): Added.
1369         * platform/wpe/PasteboardWPE.cpp:
1370         (WebCore::Pasteboard::containsFiles): Added.
1371         (WebCore::Pasteboard::readFilenames): Annotated this function with notImplemented().
1372
1373 2017-09-30  Sam Weinig  <sam@webkit.org>
1374
1375         [Settings] Replace SettingsMacros.h with a generated base class for Settings
1376         https://bugs.webkit.org/show_bug.cgi?id=177681
1377
1378         Reviewed by Darin Adler.
1379
1380         - Adds a SettingsGenerated class that Settings inherits from. The new class
1381           has the members and getters/setters for all the generated bindings.
1382         - Some default values for settings are literals in Settings.in, but rather
1383           constants or functions defined externally. These have all been moved to
1384           SettingsDefaultValues.h to allow for the script to include them all for
1385           SettingsGenerated.
1386         - Previously, a few enums were declared in Settings.h for use by Settings.
1387           Now that SettingsGenerated needs access, we standarize the same way that
1388           exists for the IDL generator; expecting the enum to be in a header of the
1389           same name.
1390
1391         * CMakeLists.txt:
1392         * DerivedSources.make:
1393         * WebCore.xcodeproj/project.pbxproj:
1394         * WebCoreMacros.cmake:
1395
1396             Add new files / generation steps.
1397         
1398         * Scripts/GenerateSettings.py:
1399         * Scripts/GenerateSettings/GenerateSettings.py:
1400         * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Added.
1401         * Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Added.
1402         * Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py: Removed.
1403         * Scripts/GenerateSettings/Settings.py:
1404         
1405             Replace script to generate SettingsMacros.h with scripts to generate a SettingsGenerated.{h,cpp}.
1406         
1407         * accessibility/ForcedAccessibilityValue.h: Added.
1408         * editing/EditableLinkBehavior.h: Added.
1409         * editing/EditingBehavior.h:
1410         * editing/EditingBehaviorType.h: Copied from editing/EditingBehaviorTypes.h.
1411         * editing/EditingBehaviorTypes.h: Removed.
1412         * editing/cocoa/DataDetection.h:
1413         * editing/cocoa/DataDetectorTypes.h: Added.
1414         * page/DebugOverlayRegions.h: Added.
1415         * page/FrameFlattening.h: Added.
1416         * page/PDFImageCachingPolicy.h: Added.
1417         * page/TextDirectionSubmenuInclusionBehavior.h: Added.
1418         * page/UserInterfaceDirectionPolicy.h: Added.
1419         * platform/text/TextDirection.h: Added.
1420         * platform/text/WritingMode.h:
1421
1422             Split out enums from Settings.h
1423
1424         * css/MediaQueryEvaluator.cpp:
1425
1426             Update for new name of ForcedAccessibilityValue.
1427
1428         * html/parser/HTMLParserOptions.cpp:
1429
1430             Update for new name of defaultMaximumHTMLParserDOMTreeDepth.
1431
1432         * page/Settings.cpp:
1433         * page/Settings.h:
1434         
1435             - Move defaults to SettingsDefaultValues.h (and SettingsDefaultValuesCocoa.mm for defaultTextAutosizingEnabled).
1436             - Move enums to their own files.
1437             - Inherit from SettingsGenerated.h
1438         
1439         * page/Settings.in:
1440         
1441             - Use new 'include' option for javaScriptRuntimeFlags setting to include <runtime/RuntimeFlags.h>,
1442               as it doesn't fit the normal idiomatic model.
1443             - Replace call to defaultMinimumZoomFontSize() with direct constant access.
1444
1445         * page/SettingsDefaultValues.h: Added.
1446         * page/cocoa/SettingsDefaultValuesCocoa.mm: Added.
1447
1448             Move default values from Settings to this new file.
1449
1450         * page/cocoa/SettingsCocoa.mm:
1451         
1452             Move defaultTextAutosizingEnabled() out of here and into SettingsDefaultValuesCocoa.mm.
1453         
1454         * style/StyleTreeResolver.cpp:
1455
1456             - Update for new scoping of defaultMaximumRenderTreeDepth.
1457             - Move defaultMaximumRenderTreeDepth from Settings here. This is the only use.
1458
1459         * testing/InternalSettings.cpp:
1460         (WebCore::InternalSettings::forcedColorsAreInvertedAccessibilityValue const):
1461         (WebCore::InternalSettings::setForcedColorsAreInvertedAccessibilityValue):
1462         (WebCore::InternalSettings::forcedDisplayIsMonochromeAccessibilityValue const):
1463         (WebCore::InternalSettings::setForcedDisplayIsMonochromeAccessibilityValue):
1464         (WebCore::InternalSettings::forcedPrefersReducedMotionAccessibilityValue const):
1465         (WebCore::InternalSettings::setForcedPrefersReducedMotionAccessibilityValue):
1466         (WebCore::settingsToInternalSettingsValue): Deleted.
1467         (WebCore::internalSettingsToSettingsValue): Deleted.
1468         * testing/InternalSettings.h:
1469         
1470             Replace duplicate definition of ForcedAccessibilityValue with a using declaration
1471             and simplify code now that it doesn't need to map between the two enums.
1472
1473 2017-09-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1474
1475         [iOS WK2] API test EditorStateTests.ContentViewHasTextInContentEditableElement is a flaky failure
1476         https://bugs.webkit.org/show_bug.cgi?id=177698
1477
1478         Reviewed by Ryosuke Niwa.
1479
1480         The WebKit2 API test EditorStateTests.ContentViewHasTextInContentEditableElement is currently hitting
1481         intermittent failures on test runners. After inserting just an image in the editable element, we would expect
1482         that -hasText should return NO because the text content is an empty string, but we find that -hasText is YES.
1483         This is because we're bailing on an early return in computeEditableRootHasContentAndPlainText because the
1484         EditorState's PostLayoutData contains non-zero characters near the selection, which is incorrect.
1485
1486         However, upon closer inspection, this is due to a latent bug in the charactersAroundPosition helper function.
1487         This function attempts to compute characters before and after the current selection by initializing a Vector
1488         of size 3 with the relevant character data, and then sets oneAfter, oneBefore and twoBefore to the UChar32
1489         values in the vector. However, in the case where there are less than three characters, we end up assigning
1490         the uninitialized values in the vector to one or more of oneAfter, oneBefore and twoBefore, which causes the
1491         helper added in r222654 to bail early when it should not.
1492
1493         To fix this, we initialize the values in `characters` to 0 (which is the initial value for the 3 corresponding
1494         members in the PostLayoutData struct). We also turn `characters` into a UChar32 array on the stack, to avoid the
1495         heap allocations using a Vector<UChar32>.
1496
1497         No new tests; fixes a flaky API test.
1498
1499         * editing/VisibleUnits.cpp:
1500         (WebCore::charactersAroundPosition):
1501
1502 2017-09-30  Antti Koivisto  <antti@apple.com>
1503
1504         Add makeWeakPtr for easier WeakPtr construction
1505         https://bugs.webkit.org/show_bug.cgi?id=177706
1506
1507         Reviewed by Sam Weinig.
1508
1509         Use it in render tree.
1510
1511         * loader/SubframeLoader.cpp:
1512         (WebCore::SubframeLoader::loadPlugin):
1513         * page/FrameView.cpp:
1514         (WebCore::FrameView::updateEmbeddedObject):
1515         * rendering/RenderMultiColumnFlow.cpp:
1516         (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
1517         * rendering/RenderObject.h:
1518         (WebCore::RenderObject::weakFactory const):
1519         (WebCore::RenderObject::createWeakPtr): Deleted.
1520         * rendering/RenderView.cpp:
1521         (WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator):
1522         * rendering/RenderWidget.cpp:
1523         (WebCore::RenderWidget::setWidgetGeometry):
1524         (WebCore::RenderWidget::setWidget):
1525         (WebCore::RenderWidget::updateWidgetPosition):
1526
1527 2017-09-30  Ryosuke Niwa  <rniwa@webkit.org>
1528
1529         Share more pasteboard code between iOS and macOS and remove dependency on Settings
1530         https://bugs.webkit.org/show_bug.cgi?id=177700
1531
1532         Reviewed by Wenson Hsieh.
1533
1534         Moved more code from PasteboardIOS.mm and PasteboardMac.mm into PasteboardCocoa.mm to share code.
1535
1536         This patch also removes the layering violation inadvertently introduced in r222595 whereby which
1537         Pasteboard code depends on Settings. To do this, this patch splits readStringForBindings is into
1538         readString and readStringInCustomData and typesForBindings into typesSafeForBindings and
1539         typesForLegacyUnsafeBindings, and moves the logic to decide whether a given type or string is read
1540         off of the native pasteboard entry or our custom data entry is moved to DataTransfer.
1541
1542         No new tests since there should be no behavioral change.
1543
1544         * dom/DataTransfer.cpp:
1545         (WebCore::DataTransfer::getData const): Moved the code to decide whether string is
1546         read off of custom data or native pasteboard from readStringForBindings.
1547         (WebCore::DataTransfer::types const): Ditto from typesForBindings.
1548         * platform/Pasteboard.cpp:
1549         (WebCore::Pasteboard::isSafeTypeForDOMToReadAndWrite): Moved into Pasteboard.
1550         * platform/Pasteboard.h:
1551         * platform/StaticPasteboard.cpp:
1552         (WebCore::StaticPasteboard::readString): Renamed from readStringForBindings.
1553         (WebCore::StaticPasteboard::readStringInCustomData): Added.
1554         (WebCore::StaticPasteboard::writeString):
1555         * platform/StaticPasteboard.h:
1556         * platform/cocoa/PasteboardCocoa.mm:
1557         (WebCore::Pasteboard::typesSafeForBindings): Extracted out of typesForBindings in PasteboardIOS.mm
1558         and PasteboardMac.mm.
1559         (WebCore::Pasteboard::typesForLegacyUnsafeBindings): Ditto.
1560         (WebCore::Pasteboard::readString): Ditto.
1561         (WebCore::Pasteboard::readStringInCustomData): Ditto.
1562         (WebCore::Pasteboard::writeCustomData): Moved here from PasteboardIOS.mm and PasteboardCocoa.mm.
1563         (WebCore::Pasteboard::changeCount const): Ditto.
1564         * platform/gtk/PasteboardGtk.cpp:
1565         (WebCore::Pasteboard::typesSafeForBindings): Added.
1566         (WebCore::Pasteboard::typesForLegacyUnsafeBindings): Renamed from readStringForBindings.
1567         (WebCore::Pasteboard::readString):
1568         (WebCore::Pasteboard::readStringInCustomData): Added.
1569         * platform/ios/PasteboardIOS.mm:
1570         (WebCore::Pasteboard::writeCustomData): Moved to PasteboardCocoa.mm.
1571         (WebCore::Pasteboard::changeCount const): Ditto.
1572         (WebCore::Pasteboard::readPlatformValueAsString): Moved into Pasteboard.
1573         (WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Ditto.
1574         (WebCore::Pasteboard::readStringForBindings): Moved to PasteboardCocoa.mm.
1575         (WebCore::Pasteboard::typesForBindings): Ditto.
1576         * platform/ios/PlatformPasteboardIOS.mm:
1577         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
1578         * platform/mac/PasteboardMac.mm:
1579         (WebCore::Pasteboard::changeCount const): Moved to PasteboardCocoa.mm.
1580         (WebCore::Pasteboard::writeCustomData): Ditto.
1581         (WebCore::Pasteboard::readPlatformValueAsString): Moved into Pasteboard.
1582         (WebCore::Pasteboard::readStringForBindings): Moved to PasteboardCocoa.mm.
1583         (WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Moved into Pasteboard.
1584         (WebCore::Pasteboard::typesForBindings): Moved to PasteboardCocoa.mm.
1585         * platform/mac/PlatformPasteboardMac.mm:
1586         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
1587         * platform/win/PasteboardWin.cpp:
1588         (WebCore::Pasteboard::typesSafeForBindings): Added.
1589         (WebCore::Pasteboard::typesForLegacyUnsafeBindings): Renamed from readStringForBindings.
1590         (WebCore::Pasteboard::readString): Renamed from readStringForBindings.
1591         (WebCore::Pasteboard::readStringInCustomData): Added.
1592         * platform/wpe/PasteboardWPE.cpp:
1593         (WebCore::Pasteboard::typesSafeForBindings): Added.
1594         (WebCore::PasteboardtypesForLegacyUnsafeBindings): Renamed from readStringForBindings.
1595         (WebCore::Pasteboard::readString): Renamed from readStringForBindings.
1596         (WebCore::Pasteboard::readStringInCustomData): Added.
1597
1598 2017-09-29  Antti Koivisto  <antti@apple.com>
1599
1600         Use smart pointers for creating, adding and removing renderers
1601         https://bugs.webkit.org/show_bug.cgi?id=177603
1602
1603         Reviewed by Zalan Bujtas.
1604
1605         With this patch RenderObject ownership is consistently managed using RenderPtrs. It also
1606         clarifies that in-tree renderers are always owned by the parent renderer.
1607
1608         - renderers are constructed with createRenderer<> which returns RenderPtr
1609         - addChild and related functions take RenderPtrs
1610         - removeChild is replaced with takeChild that returns a RenderPtr
1611         - only addChildInternal/takeChildInternal deal with raw ownder renderer pointers.
1612
1613         There are still a few exception left, noted below, to be fixed later.
1614
1615         * dom/Document.cpp:
1616         (WebCore::Document::webkitWillEnterFullScreenForElement):
1617         * rendering/RenderBlock.cpp:
1618         (WebCore::RenderBlock::addChildToContinuation):
1619         (WebCore::RenderBlock::addChild):
1620         (WebCore::RenderBlock::addChildIgnoringContinuation):
1621         (WebCore::RenderBlock::makeChildrenNonInline):
1622         (WebCore::RenderBlock::dropAnonymousBoxChild):
1623         (WebCore::RenderBlock::takeChild):
1624         (WebCore::RenderBlock::createAnonymousBlockWithStyleAndDisplay):
1625         (WebCore::RenderBlock::removeChild): Deleted.
1626         * rendering/RenderBlock.h:
1627         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
1628         (WebCore::RenderBlock::createAnonymousBoxWithSameTypeAs const):
1629         (WebCore::RenderBlock::createAnonymousBlock const):
1630         * rendering/RenderBlockFlow.cpp:
1631         (WebCore::RenderBlockFlow::addChild):
1632         (WebCore::RenderBlockFlow::takeChild):
1633         (WebCore::RenderBlockFlow::removeChild): Deleted.
1634         * rendering/RenderBlockFlow.h:
1635         * rendering/RenderBox.cpp:
1636         (WebCore::RenderBox::splitAnonymousBoxesAroundChild):
1637         * rendering/RenderBox.h:
1638         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs const):
1639         * rendering/RenderBoxModelObject.cpp:
1640         (WebCore::RenderBoxModelObject::moveChildTo):
1641         * rendering/RenderButton.cpp:
1642         (WebCore::RenderButton::addChild):
1643         (WebCore::RenderButton::takeChild):
1644         (WebCore::RenderButton::setText):
1645         (WebCore::RenderButton::removeChild): Deleted.
1646         * rendering/RenderButton.h:
1647         * rendering/RenderElement.cpp:
1648         (WebCore::RenderElement::addChild):
1649         (WebCore::RenderElement::takeChild):
1650         (WebCore::RenderElement::removeAndDestroyChild):
1651         (WebCore::RenderElement::destroyLeftoverChildren):
1652
1653             Keep the existing behavior and leak the firstLetter renderer. The comment claims they get destroyed by RenderTextFragment.
1654             To be cleaned up later.
1655
1656         (WebCore::RenderElement::insertChildInternal):
1657         (WebCore::RenderElement::takeChildInternal):
1658         (WebCore::RenderElement::handleDynamicFloatPositionChange):
1659         (WebCore::RenderElement::removeChild): Deleted.
1660         (WebCore::RenderElement::removeChildInternal): Deleted.
1661         * rendering/RenderElement.h:
1662         (WebCore::RenderElement::addChildIgnoringContinuation):
1663         * rendering/RenderFullScreen.cpp:
1664         (WebCore::RenderFullScreen::willBeDestroyed):
1665         (WebCore::RenderFullScreen::wrapNewRenderer):
1666         (WebCore::RenderFullScreen::wrapExistingRenderer):
1667
1668             Split wrapRenderer() into two functions, wrapNewRenderer() and wrapExistingRenderer().
1669             The first one deals with adding new renderers to the tree while the latter mutates
1670             existing render tree in-place.
1671
1672         (WebCore::RenderFullScreen::unwrapRenderer):
1673         (WebCore::RenderFullScreen::createPlaceholder):
1674         (WebCore::RenderFullScreen::wrapRenderer): Deleted.
1675         * rendering/RenderFullScreen.h:
1676         * rendering/RenderGrid.cpp:
1677         (WebCore::RenderGrid::addChild):
1678         (WebCore::RenderGrid::takeChild):
1679         (WebCore::RenderGrid::removeChild): Deleted.
1680         * rendering/RenderGrid.h:
1681         * rendering/RenderInline.cpp:
1682         (WebCore::RenderInline::addChild):
1683         (WebCore::RenderInline::addChildIgnoringContinuation):
1684         (WebCore::RenderInline::splitInlines):
1685         (WebCore::RenderInline::splitFlow):
1686         (WebCore::RenderInline::addChildToContinuation):
1687         (WebCore::RenderInline::childBecameNonInline):
1688         * rendering/RenderInline.h:
1689         * rendering/RenderMenuList.cpp:
1690         (WebCore::RenderMenuList::createInnerBlock):
1691         (RenderMenuList::addChild):
1692         (RenderMenuList::takeChild):
1693         (RenderMenuList::setText):
1694         (RenderMenuList::removeChild): Deleted.
1695         * rendering/RenderMenuList.h:
1696         * rendering/RenderMultiColumnFlow.cpp:
1697         (WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
1698         (WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant):
1699         (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
1700
1701             Keep the existing behavior and leak the placeholder renderer.
1702             To be cleaned up later.
1703
1704         (WebCore::RenderMultiColumnFlow::handleSpannerRemoval):
1705
1706             Keep the existing behavior and leak the placeholder renderer.
1707             To be cleaned up later.
1708
1709         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
1710         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
1711         * rendering/RenderMultiColumnSpannerPlaceholder.h:
1712         * rendering/RenderObject.cpp:
1713         (WebCore::RenderObject::removeFromParentAndDestroy):
1714         (WebCore::RenderObject::willBeDestroyed):
1715         (WebCore::RenderObject::destroy):
1716         (WebCore::RenderObject::removeFromParent): Deleted.
1717         * rendering/RenderObject.h:
1718         * rendering/RenderQuote.cpp:
1719         (WebCore::RenderQuote::updateTextRenderer):
1720         * rendering/RenderRuby.cpp:
1721         (WebCore::createAnonymousRubyInlineBlock):
1722         (WebCore::RenderRubyAsInline::addChild):
1723         (WebCore::RenderRubyAsInline::takeChild):
1724         (WebCore::RenderRubyAsBlock::addChild):
1725         (WebCore::RenderRubyAsBlock::takeChild):
1726         (WebCore::RenderRubyAsInline::removeChild): Deleted.
1727         (WebCore::RenderRubyAsBlock::removeChild): Deleted.
1728         * rendering/RenderRuby.h:
1729         * rendering/RenderRubyBase.cpp:
1730         (WebCore::RenderRubyBase::moveInlineChildren):
1731         * rendering/RenderRubyRun.cpp:
1732         (WebCore::RenderRubyRun::rubyBaseSafe):
1733         (WebCore::RenderRubyRun::addChild):
1734         (WebCore::RenderRubyRun::takeChild):
1735         (WebCore::RenderRubyRun::createRubyBase const):
1736         (WebCore::RenderRubyRun::staticCreateRubyRun):
1737         (WebCore::RenderRubyRun::removeChild): Deleted.
1738         * rendering/RenderRubyRun.h:
1739         * rendering/RenderTable.cpp:
1740         (WebCore::RenderTable::addChild):
1741         (WebCore::RenderTable::createTableWithStyle):
1742         (WebCore::RenderTable::createAnonymousWithParentRenderer):
1743         * rendering/RenderTable.h:
1744         (WebCore::RenderTable::createAnonymousBoxWithSameTypeAs const):
1745         * rendering/RenderTableCell.cpp:
1746         (WebCore::RenderTableCell::createTableCellWithStyle):
1747         (WebCore::RenderTableCell::createAnonymousWithParentRenderer):
1748         * rendering/RenderTableCell.h:
1749         (WebCore::RenderTableCell::createAnonymousBoxWithSameTypeAs const):
1750         * rendering/RenderTableRow.cpp:
1751         (WebCore::RenderTableRow::addChild):
1752         (WebCore::RenderTableRow::createTableRowWithStyle):
1753         (WebCore::RenderTableRow::createAnonymousWithParentRenderer):
1754         * rendering/RenderTableRow.h:
1755         (WebCore::RenderTableRow::createAnonymousBoxWithSameTypeAs const):
1756         * rendering/RenderTableSection.cpp:
1757         (WebCore::RenderTableSection::addChild):
1758         (WebCore::RenderTableSection::createTableSectionWithStyle):
1759         (WebCore::RenderTableSection::createAnonymousWithParentRenderer):
1760         * rendering/RenderTableSection.h:
1761         (WebCore::RenderTableSection::createAnonymousBoxWithSameTypeAs const):
1762         * rendering/mathml/RenderMathMLFenced.cpp:
1763         (WebCore::RenderMathMLFenced::makeFences):
1764         (WebCore::RenderMathMLFenced::addChild):
1765         * rendering/mathml/RenderMathMLFenced.h:
1766         * rendering/svg/RenderSVGContainer.cpp:
1767         (WebCore::RenderSVGContainer::addChild):
1768         (WebCore::RenderSVGContainer::takeChild):
1769         (WebCore::RenderSVGContainer::removeChild): Deleted.
1770         * rendering/svg/RenderSVGContainer.h:
1771         * rendering/svg/RenderSVGInline.cpp:
1772         (WebCore::RenderSVGInline::addChild):
1773         (WebCore::RenderSVGInline::takeChild):
1774         (WebCore::RenderSVGInline::removeChild): Deleted.
1775         * rendering/svg/RenderSVGInline.h:
1776         * rendering/svg/RenderSVGRoot.cpp:
1777         (WebCore::RenderSVGRoot::addChild):
1778         (WebCore::RenderSVGRoot::takeChild):
1779         (WebCore::RenderSVGRoot::removeChild): Deleted.
1780         * rendering/svg/RenderSVGRoot.h:
1781         * rendering/svg/RenderSVGText.cpp:
1782         (WebCore::RenderSVGText::addChild):
1783         (WebCore::RenderSVGText::takeChild):
1784         (WebCore::RenderSVGText::removeChild): Deleted.
1785         * rendering/svg/RenderSVGText.h:
1786         * style/RenderTreePosition.h:
1787         (WebCore::RenderTreePosition::insert):
1788         * style/RenderTreeUpdater.cpp:
1789         (WebCore::RenderTreeUpdater::createRenderer):
1790         (WebCore::createTextRenderer):
1791         * style/RenderTreeUpdaterFirstLetter.cpp:
1792         (WebCore::updateFirstLetterStyle):
1793         (WebCore::createFirstLetterRenderer):
1794         * style/RenderTreeUpdaterGeneratedContent.cpp:
1795         (WebCore::createContentRenderers):
1796         * style/RenderTreeUpdaterListItem.cpp:
1797         (WebCore::RenderTreeUpdater::ListItem::updateMarker):
1798         * style/RenderTreeUpdaterMultiColumn.cpp:
1799         (WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):
1800
1801 2017-09-29  Zalan Bujtas  <zalan@apple.com>
1802
1803         Remove redundant RenderObject::selectionRoot and dependencies
1804         https://bugs.webkit.org/show_bug.cgi?id=177696
1805
1806         Reviewed by Ryosuke Niwa.
1807
1808         There's only one selection root (RenderView).
1809
1810         * rendering/InlineTextBox.cpp:
1811         (WebCore::InlineTextBox::selectionState):
1812         (WebCore::InlineTextBox::selectionStartEnd const):
1813         * rendering/RenderObject.cpp:
1814         (WebCore::RenderObject::selectionRoot const): Deleted.
1815         (WebCore::RenderObject::selectionStartEnd const): Deleted.
1816         * rendering/RenderObject.h:
1817         * rendering/RenderReplaced.cpp:
1818         (WebCore::RenderReplaced::isSelected const):
1819         * rendering/RenderText.cpp:
1820         (WebCore::RenderText::collectSelectionRectsForLineBoxes):
1821         * rendering/RenderTextLineBoxes.cpp:
1822         (WebCore::RenderTextLineBoxes::setSelectionState):
1823         * rendering/RenderView.h:
1824         * rendering/SelectionSubtreeRoot.h:
1825
1826 2017-09-29  Chris Dumez  <cdumez@apple.com>
1827
1828         http/tests/preconnect/link-rel-preconnect-https.html is flaky
1829         https://bugs.webkit.org/show_bug.cgi?id=177673
1830
1831         Reviewed by Alex Christensen.
1832
1833         No new tests, unskipped test that is now passing consistently.
1834
1835         * loader/LinkLoader.cpp:
1836         (WebCore::LinkLoader::loadLink):
1837         * loader/LoaderStrategy.h:
1838
1839 2017-09-29  Daniel Bates  <dabates@apple.com>
1840
1841         Extract logic to compute text to render into common function
1842         https://bugs.webkit.org/show_bug.cgi?id=177607
1843
1844         Reviewed by Zalan Bujtas.
1845
1846         Currently we duplicate the logic to compute the text to render
1847         throughout InlineTextBox. Instead we should move this common
1848         code into a member function. This will allow us to audit the
1849         the code paths that render text and ensure such code paths
1850         account for hyphenation and combined text, if applicable.
1851
1852         Note that a TextRun does not own the text. The caller owns it.
1853
1854         No functionality changed. So, no new tests.
1855
1856         * rendering/InlineTextBox.cpp:
1857         (WebCore::InlineTextBox::localSelectionRect const): Modified to
1858         use text() and createTextRun() to compute the text to render
1859         and the text run for it.
1860         (WebCore::InlineTextBox::paint): Ditto.
1861         (WebCore::InlineTextBox::paintSelection): Ditto. Additionally query
1862         lineStyle() for the style of the line instead of requiring it to be
1863         passed as an argument.
1864         (WebCore::InlineTextBox::paintTextSubrangeBackground): Modified
1865         to use text() and createTextRun() to compute the text to render
1866         and the text run for it.
1867         (WebCore::InlineTextBox::paintDocumentMarker): Ditto.
1868         (WebCore::InlineTextBox::offsetForPosition const): Ditto.
1869         (WebCore::InlineTextBox::positionForOffset const): Ditto.
1870         (WebCore::InlineTextBox::createTextRun const): Added; formerly named constructTextRun.
1871         (WebCore::InlineTextBox::text const): Added.
1872         (WebCore::InlineTextBox::substringToRender const): Deleted.
1873         (WebCore::InlineTextBox::hyphenatedStringForTextRun const): Deleted.
1874         (WebCore::InlineTextBox::constructTextRun const): Deleted.
1875         * rendering/InlineTextBox.h:
1876         (WebCore::InlineTextBox::substringToRender): Deleted.
1877         (WebCore::InlineTextBox::hyphenatedStringForTextRun): Deleted.
1878         (WebCore::InlineTextBox::constructTextRun): Deleted; renamed to createTextRun.
1879
1880 2017-09-29  Zalan Bujtas  <zalan@apple.com>
1881
1882         Remove SelectionSubtreeRoot::RenderSubtreesMap
1883         https://bugs.webkit.org/show_bug.cgi?id=177685
1884
1885         Reviewed by Andy Estes.
1886
1887         This is in preparation of removing redundant SelectionSubtreeRoot.
1888         (Now that we removed regions, RenderView is the only selection root) 
1889
1890         No change in functionality.
1891
1892         * rendering/RenderView.cpp:
1893         (WebCore::RenderView::selectionBounds const):
1894         (WebCore::RenderView::subtreeSelectionBounds const):
1895         (WebCore::RenderView::repaintSelection const):
1896         (WebCore::RenderView::repaintSubtreeSelection const):
1897         (WebCore::RenderView::setSelection):
1898         (WebCore::isValidObjectForNewSelection):
1899         (WebCore::RenderView::clearSubtreeSelection const):
1900         (WebCore::RenderView::applySubtreeSelection):
1901         (WebCore::RenderView::updateSelectionForSubtrees): Deleted.
1902         * rendering/RenderView.h:
1903         * rendering/SelectionSubtreeRoot.h:
1904
1905 2017-09-29  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1906
1907         [Curl] Extract a features to manage HTTP communication from ResourceHandle
1908         https://bugs.webkit.org/show_bug.cgi?id=175148
1909
1910         Reviewed by Alex Christensen.
1911
1912         * platform/Curl.cmake:
1913         * platform/network/curl/CurlRequest.cpp: Added.
1914         (WebCore::CurlRequest::CurlRequest):
1915         (WebCore::CurlRequest::setUserPass):
1916         (WebCore::CurlRequest::start):
1917         (WebCore::CurlRequest::startWithJobManager):
1918         (WebCore::CurlRequest::cancel):
1919         (WebCore::CurlRequest::suspend):
1920         (WebCore::CurlRequest::resume):
1921         (WebCore::CurlRequest::callDelegate):
1922         (WebCore::CurlRequest::setupTransfer):
1923         (WebCore::CurlRequest::willSetupSslCtx):
1924         (WebCore::CurlRequest::willSendData):
1925         (WebCore::CurlRequest::didReceiveHeader):
1926         (WebCore::CurlRequest::didReceiveData):
1927         (WebCore::CurlRequest::didCompleteTransfer):
1928         (WebCore::CurlRequest::didCancelTransfer):
1929         (WebCore::CurlRequest::resolveBlobReferences):
1930         (WebCore::CurlRequest::setupPUT):
1931         (WebCore::CurlRequest::setupPOST):
1932         (WebCore::CurlRequest::setupFormData):
1933         (WebCore::CurlRequest::invokeDidReceiveResponseForFile):
1934         (WebCore::CurlRequest::invokeDidReceiveResponse):
1935         (WebCore::CurlRequest::setPaused):
1936         (WebCore::CurlRequest::willSetupSslCtxCallback):
1937         (WebCore::CurlRequest::willSendDataCallback):
1938         (WebCore::CurlRequest::didReceiveHeaderCallback):
1939         (WebCore::CurlRequest::didReceiveDataCallback):
1940         * platform/network/curl/CurlRequest.h: Added.
1941         (WebCore::CurlRequest::~CurlRequest):
1942         (WebCore::CurlRequest::setDelegate):
1943         (WebCore::CurlRequest::isSyncRequest):
1944         (WebCore::CurlRequest::getNetworkLoadMetrics):
1945         * platform/network/curl/CurlRequestDelegate.h: Added.
1946         * platform/network/curl/ResourceHandleCurl.cpp:
1947         (WebCore::ResourceHandle::cancel):
1948         (WebCore::ResourceHandle::platformSetDefersLoading):
1949         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1950         (WebCore::ResourceHandle::receivedCredential):
1951         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
1952         (WebCore::ResourceHandle::receivedCancellation):
1953         * platform/network/curl/ResourceHandleCurlDelegate.cpp:
1954         (WebCore::ResourceHandleCurlDelegate::ResourceHandleCurlDelegate):
1955         (WebCore::ResourceHandleCurlDelegate::~ResourceHandleCurlDelegate):
1956         (WebCore::ResourceHandleCurlDelegate::start):
1957         (WebCore::ResourceHandleCurlDelegate::cancel):
1958         (WebCore::ResourceHandleCurlDelegate::setDefersLoading):
1959         (WebCore::ResourceHandleCurlDelegate::setAuthentication):
1960         (WebCore::ResourceHandleCurlDelegate::dispatchSynchronousJob):
1961         (WebCore::ResourceHandleCurlDelegate::createCurlRequest):
1962         (WebCore::ResourceHandleCurlDelegate::cancelledOrClientless):
1963         (WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
1964         (WebCore::ResourceHandleCurlDelegate::curlDidReceiveBuffer):
1965         (WebCore::ResourceHandleCurlDelegate::curlDidComplete):
1966         (WebCore::ResourceHandleCurlDelegate::curlDidFailWithError):
1967         (WebCore::ResourceHandleCurlDelegate::response):
1968         (WebCore::ResourceHandleCurlDelegate::getCredential):
1969         (WebCore::ResourceHandleCurlDelegate::retain): Deleted.
1970         (WebCore::ResourceHandleCurlDelegate::release): Deleted.
1971         (WebCore::ResourceHandleCurlDelegate::setupTransfer): Deleted.
1972         (WebCore::ResourceHandleCurlDelegate::didCompleteTransfer): Deleted.
1973         (WebCore::ResourceHandleCurlDelegate::didCancelTransfer): Deleted.
1974         (WebCore::ResourceHandleCurlDelegate::setupAuthentication): Deleted.
1975         (WebCore::ResourceHandleCurlDelegate::didReceiveAllHeaders): Deleted.
1976         (WebCore::ResourceHandleCurlDelegate::didReceiveContentData): Deleted.
1977         (WebCore::ResourceHandleCurlDelegate::handleLocalReceiveResponse): Deleted.
1978         (WebCore::ResourceHandleCurlDelegate::prepareSendData): Deleted.
1979         (WebCore::ResourceHandleCurlDelegate::didFinish): Deleted.
1980         (WebCore::ResourceHandleCurlDelegate::didFail): Deleted.
1981         (WebCore::ResourceHandleCurlDelegate::setupPOST): Deleted.
1982         (WebCore::ResourceHandleCurlDelegate::setupPUT): Deleted.
1983         (WebCore::ResourceHandleCurlDelegate::getFormElementsCount): Deleted.
1984         (WebCore::ResourceHandleCurlDelegate::setupFormData): Deleted.
1985         (WebCore::ResourceHandleCurlDelegate::applyAuthentication): Deleted.
1986         (WebCore::ResourceHandleCurlDelegate::getNetworkLoadMetrics): Deleted.
1987         (WebCore::ResourceHandleCurlDelegate::willSetupSslCtx): Deleted.
1988         (WebCore::ResourceHandleCurlDelegate::didReceiveHeader): Deleted.
1989         (WebCore::ResourceHandleCurlDelegate::didReceiveData): Deleted.
1990         (WebCore::ResourceHandleCurlDelegate::willSendData): Deleted.
1991         (WebCore::ResourceHandleCurlDelegate::willSetupSslCtxCallback): Deleted.
1992         (WebCore::ResourceHandleCurlDelegate::didReceiveHeaderCallback): Deleted.
1993         (WebCore::ResourceHandleCurlDelegate::didReceiveDataCallback): Deleted.
1994         (WebCore::ResourceHandleCurlDelegate::willSendDataCallback): Deleted.
1995         * platform/network/curl/ResourceHandleCurlDelegate.h:
1996
1997 2017-09-29  Chris Dumez  <cdumez@apple.com>
1998
1999         Split some logic out of VisitedLinkStore and make it reusable
2000         https://bugs.webkit.org/show_bug.cgi?id=177575
2001
2002         Reviewed by Alex Christensen.
2003
2004         Rename LinkHash to SharedStringHash to make it more reusable.
2005
2006         * CMakeLists.txt:
2007         * WebCore.xcodeproj/project.pbxproj:
2008         * css/StyleResolver.cpp:
2009         * dom/VisitedLinkState.cpp:
2010         (WebCore::linkHashForElement):
2011         (WebCore::VisitedLinkState::invalidateStyleForLink):
2012         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
2013         * dom/VisitedLinkState.h:
2014         * html/HTMLAnchorElement.h:
2015         (WebCore::HTMLAnchorElement::visitedLinkHash const):
2016         * loader/EmptyClients.cpp:
2017         * loader/HistoryController.cpp:
2018         (WebCore::addVisitedLink):
2019         * page/Page.cpp:
2020         (WebCore::Page::invalidateStylesForLink):
2021         * page/Page.h:
2022         * page/VisitedLinkStore.cpp:
2023         (WebCore::VisitedLinkStore::invalidateStylesForLink):
2024         * page/VisitedLinkStore.h:
2025         * platform/SharedStringHash.cpp: Renamed from Source/WebCore/platform/LinkHash.cpp.
2026         (WebCore::needsTrailingSlash):
2027         (WebCore::computeSharedStringHashInline):
2028         (WebCore::computeSharedStringHash):
2029         * platform/SharedStringHash.h: Renamed from Source/WebCore/platform/LinkHash.h.
2030         (WebCore::SharedStringHashHash::hash):
2031         (WebCore::SharedStringHashHash::equal):
2032         (WebCore::SharedStringHashHash::avoidDeletedValue):
2033
2034 2017-09-29  Don Olmstead  <don.olmstead@sony.com>
2035
2036         [WinCairo] Fix build after rev 222610
2037         https://bugs.webkit.org/show_bug.cgi?id=177674
2038
2039         Reviewed by Per Arne Vollan.
2040
2041         No new tests. No change in behavior.
2042
2043         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2044
2045 2017-09-29  Wenson Hsieh  <wenson_hsieh@apple.com>
2046
2047         [iOS] Remove unused pre-iOS 11 codepaths for writing to the pasteboard
2048         https://bugs.webkit.org/show_bug.cgi?id=177669
2049
2050         Reviewed by Tim Horton.
2051
2052         Now that PlatformPasteboardIOS codepaths for writing data on drag and copy have been unified to both use
2053         NSItemProviders, we can remove the legacy codepath that called -setItems on UIPasteboard, since nothing uses it
2054         any more. No change in behavior.
2055
2056         * platform/ios/PlatformPasteboardIOS.mm:
2057         (WebCore::PlatformPasteboard::write):
2058         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
2059         (WebCore::PlatformPasteboard::allowReadingURLAtIndex const):
2060         (WebCore::PlatformPasteboard::readURL):
2061         (WebCore::richTextRepresentationsForPasteboardWebContent): Deleted.
2062
2063 2017-09-28  Ryosuke Niwa  <rniwa@webkit.org>
2064
2065         Image pasting is not working on tineye.com / gmail.com / GitHub.com due to lack of support for DataTransfer.items
2066         https://bugs.webkit.org/show_bug.cgi?id=170449
2067         <rdar://problem/31432525>
2068
2069         Reviewed by Wenson Hsieh.
2070
2071         The bug was caused by image types in NSPasteboard or UIPasteboard not being treated as file items in dataTransfer.
2072         Because there is no Web API to get binary data out of dataTransfer unlike text data, we need to treat any image
2073         data as files even if they're entirely in the memory.
2074
2075         This patch introduces the notion of pasteboard types to be treated as files and expose them on dataTransfer.files
2076         as well as dataTransfer.items of type "file". Because in-memory images are stored as TIFF in macOS and websites
2077         don't typically support image/tiff, we convert all such in-memory TIFF images into PNG images ourselves for
2078         a better web compatibility. This is done inside read(PasteboardFileReader&) in PasteboardCocoa.mm.
2079
2080         Note that PasteboardFileReader cannot directly have RefPtr<File> as a member variable as code in WebCore/platform
2081         including Pasteboard code is not supposed to depend on WebCore types. WebCorePasteboardFileReader, a subclass of
2082         PasteboardFileReader was introduced to resolve this reverse dependency.
2083
2084         In addition, this patch removes the restriction on dataTransfer.items that it only includes files of the supported
2085         MIME types. This was unwarranted since 1. we don't have any restriction on what an user can drag & drop into a web
2086         page via input element so there is no security benefit in this, and 2. the user should be able to copy & paste
2087         whatever file he/she desires regardless of the MIME type on websites like Google Drive.
2088
2089         Tests: PasteImage
2090
2091         * CMakeLists.txt:
2092         * WebCore.xcodeproj/project.pbxproj:
2093         * WebCore/PlatformMac.cmake:
2094         * dom/DataTransfer.cpp:
2095         (WebCore::DataTransfer::types const): Now excludes image/gif, image/png, image/jpeg, and image/tiff.
2096         (WebCore::DataTransfer::files const): Add fake files we create for in-memory images but only when there are no real
2097         files in the pasteboard since it's expensive to copy image data across UI/Web processes to create a blob URL.
2098         * dom/DataTransferItemList.cpp:
2099         (WebCore::DataTransferItemList::ensureItems const): Just expose every file type. If the user had decided to paste
2100         a file, it's okay for the page to access that file regardless of whether it's a zip file, JPEG image, etc...
2101         * editing/WebCorePasteboardFileReader.cpp:
2102         (WebCorePasteboardFileReader::~WebCorePasteboardFileReader):
2103         (WebCorePasteboardFileReader::read):
2104         * editing/WebCorePasteboardFileReader.h:
2105         (WebCorePasteboardFileReader):
2106         * platform/Pasteboard.cpp:
2107         (WebCore::PasteboardImage::PasteboardImage): Moved from platform specific translation units.
2108         (WebCore::PasteboardImage::~PasteboardImage): Ditto.
2109         * platform/Pasteboard.h:
2110         (PasteboardFileReader): Added.
2111         (* platform/StaticPasteboard.h:
2112         (StaticPasteboard::typesForBindings): Added.
2113         (StaticPasteboard::typesTreatedAsFiles): Added. Returns an empty list we don't support the web content writing image
2114         files into pasteboard at the moment.
2115         * platform/cocoa/PasteboardCocoa.mm: Added.
2116         (WebCore::PasteboardWebContent::PasteboardWebContent): Moved from PasteboardMac.mm and PasteboardIOS.mm.
2117         (WebCore::PasteboardWebContent::~PasteboardWebContent):
2118         (WebCore::cocoaTypeToImageType): Added.
2119         (WebCore::imageTypeToMIMEType): Added. Pretends to have image/png when the Cocoa type is image/tiff since most of
2120         websites don't support image/tiff.
2121         (WebCore::imageTypeToFakeFilename): Added.
2122         (WebCore::mimeTypeToImageType): Added.
2123         (WebCore::Pasteboard::shouldTreatCocoaTypeAsFile): Added. Pasteboard::typesForBindings excludes the type for which
2124         this function returns true.
2125         (WebCore::Pasteboard::typesTreatedAsFiles): Returns the list of all in-memory image types in the pasteboard.
2126         (WebCore::Pasteboard::read): Added. On macOS, we convert TIFF to PNG for web compatibility. We don't do this rather
2127         memory intensive coercion on iOS where most of apps like Photos put PNG file into the pasteboard in the first place.
2128         * platform/gtk/PasteboardGtk.cpp:
2129         (WebCore::PasteboardImage::PasteboardImage): Deleted.
2130         (WebCore::PasteboardImage::~PasteboardImage): Deleted.
2131         (WebCore::Pasteboard::read):
2132         (WebCore::Pasteboard::typesForBindings): Renamed from types.
2133         (WebCore::Pasteboard::typesTreatedAsFiles):
2134         * platform/ios/PasteboardIOS.mm:
2135         (WebCore::addHTMLClipboardTypesForCocoaType):
2136         (WebCore::Pasteboard::typesForBindings):
2137         (WebCore::PasteboardWebContent::PasteboardWebContent): Deleted.
2138         (WebCore::PasteboardWebContent::~PasteboardWebContent): Deleted.
2139         (WebCore::PasteboardImage::PasteboardImage): Deleted.
2140         (WebCore::PasteboardImage::~PasteboardImage): Deleted.
2141         (WebCore::Pasteboard::types): Deleted.
2142         * platform/ios/PlatformPasteboardIOS.mm:
2143         (WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Add "Files" to dataTransfer.types when there is an in-memory
2144         image type in the pasteboard.
2145         * platform/mac/PasteboardMac.mm:
2146         (WebCore::PasteboardWebContent::PasteboardWebContent): Deleted.
2147         (WebCore::PasteboardWebContent::~PasteboardWebContent): Deleted.
2148         (WebCore::PasteboardImage::PasteboardImage): Deleted.
2149         (WebCore::PasteboardImage::~PasteboardImage): Deleted.
2150         (WebCore::addHTMLClipboardTypesForCocoaType): Moved the check for the legacy NeXT plain text check here. Also add
2151         "Files" to dataTransfer.types when there is an in-memory image type in the pasteboard.
2152         (WebCore::Pasteboard::typesForBindings): Renamed from types.
2153         * platform/mac/PlatformPasteboardMac.mm:
2154         (WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Ditto to add "Files".
2155         * platform/win/PasteboardWin.cpp:
2156         (WebCore::Pasteboard::typesForBindings): Renamed from types.
2157         (WebCore::Pasteboard::typesTreatedAsFiles):
2158         (WebCore::Pasteboard::read):
2159         * platform/wpe/PasteboardWPE.cpp:
2160         (WebCore::Pasteboard::typesForBindings): Renamed from types.
2161         (WebCore::Pasteboard::typesTreatedAsFiles):
2162         (WebCore::Pasteboard::read):
2163
2164 2017-09-29  Wenson Hsieh  <wenson_hsieh@apple.com>
2165
2166         [iOS WK2] Implement -[WKContentView hasText] for compatibility with the UITextInput protocol
2167         https://bugs.webkit.org/show_bug.cgi?id=177662
2168         <rdar://problem/33410373>
2169
2170         Reviewed by Tim Horton.
2171
2172         Adds a new TextIterator helper function to determine whether a Range has any plain text.
2173
2174         Tests: EditorStateTests.ContentViewHasTextInContentEditableElement
2175                EditorStateTests.ContentViewHasTextInTextarea
2176
2177         * editing/TextIterator.cpp:
2178         (WebCore::hasAnyPlainText):
2179
2180         Add a new helper to determine whether a Range contains any plain text. While inspired by and very similar to the
2181         plainText() helper function, this variant does not create a new string buffer when invoked, and is therefore
2182         more efficient for the purposes of determining whether there is any plain text at all.
2183
2184         * editing/TextIterator.h:
2185
2186 2017-09-29  Zalan Bujtas  <zalan@apple.com>
2187
2188         Add WeakPtr support to RenderObject.
2189         https://bugs.webkit.org/show_bug.cgi?id=177429
2190         <rdar://problem/34625212>
2191
2192         Reviewed by Dean Jackson.
2193
2194         This is in preparation to start using weak pointers extensively in rendering.
2195
2196         No change in functionality.
2197
2198         * loader/SubframeLoader.cpp:
2199         (WebCore::SubframeLoader::loadPlugin):
2200         * page/FrameView.cpp:
2201         (WebCore::FrameView::updateEmbeddedObject):
2202         * rendering/RenderMultiColumnFlow.cpp:
2203         (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
2204         * rendering/RenderMultiColumnSpannerPlaceholder.h:
2205         * rendering/RenderObject.cpp:
2206         * rendering/RenderObject.h:
2207         (WebCore::RenderObject::createWeakPtr):
2208         * rendering/RenderView.cpp:
2209         (WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator):
2210         (WebCore::RenderView::RepaintRegionAccumulator::~RepaintRegionAccumulator):
2211         * rendering/RenderView.h:
2212         * rendering/RenderWidget.cpp:
2213         (WebCore::RenderWidget::setWidgetGeometry):
2214         (WebCore::RenderWidget::setWidget):
2215         (WebCore::RenderWidget::updateWidgetPosition):
2216         * rendering/RenderWidget.h:
2217         (WebCore::RenderWidget::createWeakPtr): Deleted.
2218
2219 2017-09-29  Enrique Ocaña González  <eocanha@igalia.com>
2220
2221         [GStreamer] Refactor media player to use MediaTime consistently
2222         https://bugs.webkit.org/show_bug.cgi?id=174817
2223
2224         Reviewed by Xabier Rodriguez-Calvar.
2225
2226         Make consistent use of the MediaTime class in the GStreamer media
2227         player implementations.
2228
2229         This patch is authored by Charlie Turner <cturner@igalia.com> plus
2230         some minor modifications by Enrique: migration of m_cachedPosition,
2231         usage of m_seekTime as MediaTime in the MSE player and more logging
2232         using toString().
2233
2234         Covered by existing tests.
2235
2236         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2237         (WebCore::toGstUnsigned64Time): Scales MediaTime to the precision used
2238         by GStreamer and returns a value compatible with GstClockTime.
2239         (WebCore::toGstClockTime): Deleted.
2240         * platform/graphics/gstreamer/GStreamerUtilities.h:
2241         (WebCore::toGstClockTime): Inlined, now it takes MediaTime and converts
2242         to GstClockTime.
2243         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2244         Several changes to use MediaTime instead of float and to log MediaTime
2245         values converting them toString().
2246         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2247         (WebCore::MediaPlayerPrivateGStreamer::load):
2248         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
2249         (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
2250         (WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
2251         (WebCore::MediaPlayerPrivateGStreamer::seek): Uses MediaTime.
2252         (WebCore::MediaPlayerPrivateGStreamer::doSeek):
2253         (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
2254         (WebCore::MediaPlayerPrivateGStreamer::buffered const):
2255         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
2256         (WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
2257         (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded const):
2258         (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
2259         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
2260         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
2261         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
2262         (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
2263         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable const): Deleted.
2264         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Changed
2265         seek(), playBackposition(), m_cachedPosition, m_durationAtEOS,
2266         m_seekTime and m_timeOfOverlappingSeek to be of MediaTime type.
2267         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2268         Prefer the methods based on MediaTime over those based on fload/double.
2269         (WebCore::MediaPlayerPrivateGStreamerBase::maxTimeLoaded const):
2270         * platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:
2271         (WebCore::GStreamerMediaSample::offsetTimestampsBy): toGstClockTime()
2272         now can handle MediaTime.
2273         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2274         Several changes to use MediaTime instead of float and to log MediaTime
2275         values converting them toString().
2276         (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
2277         (WebCore::MediaPlayerPrivateGStreamerMSE::notifySeekNeedsDataForTime):
2278         (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
2279         (WebCore::MediaPlayerPrivateGStreamerMSE::maybeFinishSeek):
2280         (WebCore::MediaPlayerPrivateGStreamerMSE::isTimeBuffered const):
2281         (WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):
2282         (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
2283         (WebCore::MediaPlayerPrivateGStreamerMSE::maxTimeSeekable const):
2284         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
2285         seek() now takes a MediaTime argument.
2286         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
2287         (WebCore::PlaybackPipeline::enqueueSample): Use MediaTime values in
2288         MediaSample.
2289         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2290         (webKitMediaSrcQueryWithParent): Use MediaTime values in
2291         durationMediaTime().
2292
2293 2017-09-28  Sam Weinig  <sam@webkit.org>
2294
2295         Re-write Settings generation in python for some reason
2296         https://bugs.webkit.org/show_bug.cgi?id=177621
2297
2298         Reviewed by Tim Horton.
2299
2300         Re-writes and splits up generation of InternalSettingsGenerated.{h|cpp|idl}
2301         and SettingsMacros.h in python in preparation for larger changes.
2302
2303         * DerivedSources.make:
2304         * Scripts/GenerateSettings: Added.
2305         * Scripts/GenerateSettings.py: Added.
2306         * Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py: Added.
2307         * Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py: Added.
2308         * Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py: Added.
2309         * Scripts/GenerateSettings/GenerateSettings.py: Added.
2310         * Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py: Added.
2311         * Scripts/GenerateSettings/Settings.py: Added.
2312         * Scripts/GenerateSettings/__init__.py: Added.
2313         * WebCore.xcodeproj/project.pbxproj:
2314         * page/make_settings.pl: Removed.
2315
2316 2017-09-28  Don Olmstead  <don.olmstead@sony.com>
2317
2318         Simplify PLATFORM ifdefs within Editor around writing selections
2319         https://bugs.webkit.org/show_bug.cgi?id=177624
2320
2321         Reviewed by Alex Christensen.
2322
2323         No new tests. No change in behavior.
2324
2325         * editing/Editor.cpp:
2326         (WebCore::Editor::performCutOrCopy):
2327         (WebCore::Editor::copyImage):
2328         * editing/Editor.h:
2329
2330 2017-09-28  Joanmarie Diggs  <jdiggs@igalia.com>
2331
2332         AX: [ATK] object:state-changed notifications missing for multiple ARIA attributes
2333         https://bugs.webkit.org/show_bug.cgi?id=177542
2334
2335         Add new notification types to AXObjectCache in order to support the notifications
2336         needed, post the notifications to all platforms, emit the signals for ATK.
2337
2338         Reviewed by Chris Fleizach.
2339
2340         Tests: accessibility/gtk/aria-disabled-changed-notification.html
2341                accessibility/gtk/aria-expanded-changed-notification.html
2342                accessibility/gtk/aria-pressed-changed-notification.html
2343                accessibility/gtk/aria-readonly-changed-notification.html
2344                accessibility/gtk/aria-required-changed-notification.html
2345
2346         * accessibility/AXObjectCache.cpp:
2347         (WebCore::AXObjectCache::handleAttributeChanged):
2348         * accessibility/AXObjectCache.h:
2349         * accessibility/atk/AXObjectCacheAtk.cpp:
2350         (WebCore::AXObjectCache::postPlatformNotification):
2351
2352 2017-09-28  Daniel Bates  <dabates@apple.com>
2353
2354         Remove TextRun::setCharactersLength() and TextRun::charactersLength()
2355         https://bugs.webkit.org/show_bug.cgi?id=177620
2356
2357         Reviewed by Zalan Bujtas.
2358
2359         The purpose of TextRun::setCharactersLength() and TextRun::charactersLength() predate the
2360         use of WidthIterator to safely iterate over characters in a TextRun that may contain
2361         surrogate halves due to how it was created (without thought of surrogate pairs). Historically
2362         TextRun::charactersLength() complemented TextRun::length() and represented the length of the
2363         text to render ignoring and respecting truncation, respectively. We not longer need either
2364         of these member functions with the advent of WidthIterator.
2365
2366         No functionality changed. So, no new tests.
2367
2368         * platform/graphics/ComplexTextController.cpp:
2369         (WebCore::TextLayout::constructTextRun):
2370         * platform/graphics/TextRun.cpp: Remove one unsigned field from ExpectedTextRunSize as we
2371         reduced the size of TextRun with the removal of TextRun::m_charactersLength.
2372         * platform/graphics/TextRun.h:
2373         (WebCore::TextRun::TextRun):
2374         (WebCore::TextRun::charactersLength const): Deleted.
2375         (WebCore::TextRun::setCharactersLength): Deleted.
2376         * rendering/InlineTextBox.cpp:
2377         (WebCore::InlineTextBox::constructTextRun const):
2378         * rendering/InlineTextBox.h:
2379         (WebCore::InlineTextBox::constructTextRun): Deleted overload that took const RenderStyle& style
2380         and StringView.
2381         * rendering/RenderText.cpp:
2382         (WebCore::RenderText::widthFromCache const):
2383         (WebCore::maxWordFragmentWidth):
2384         (WebCore::RenderText::computePreferredLogicalWidths):
2385         (WebCore::RenderText::width const):
2386         * rendering/line/BreakingContext.h:
2387         (WebCore::textWidth):
2388         (WebCore::tryHyphenating):
2389         * rendering/svg/SVGInlineTextBox.cpp:
2390         (WebCore::SVGInlineTextBox::constructTextRun const):
2391         * rendering/svg/SVGTextMetrics.cpp:
2392         (WebCore::SVGTextMetrics::constructTextRun):
2393         * rendering/svg/SVGTextMetricsBuilder.cpp:
2394         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair const): Use TextRun::length().
2395         (WebCore::SVGTextMetricsBuilder::advance): Ditto.
2396
2397 2017-09-28  Tim Horton  <timothy_horton@apple.com>
2398
2399         Remove constant() in favor of env()
2400         https://bugs.webkit.org/show_bug.cgi?id=177581
2401         <rdar://problem/34701321>
2402
2403         Reviewed by Dean Jackson.
2404
2405         No new tests, removing a feature.
2406
2407         * css/CSSValueKeywords.in:
2408         * css/CSSVariableData.cpp:
2409         (WebCore::CSSVariableData::checkVariablesForCyclesWithRange const):
2410         (WebCore::CSSVariableData::resolveTokenRange const):
2411         * css/parser/CSSVariableParser.cpp:
2412         (WebCore::classifyBlock):
2413
2414 2017-09-28  Brent Fulgham  <bfulgham@apple.com>
2415
2416         Add ports 6679 and 6697 (IRC SSL) to port blacklist
2417         https://bugs.webkit.org/show_bug.cgi?id=177544
2418         <rdar://problem/34666525>
2419
2420         Reviewed by Alex Christensen.
2421
2422         Test: security/block-test.html
2423
2424         * platform/URL.cpp:
2425         (WebCore::portAllowed): Also block port 6679.
2426
2427 2017-09-28  Chris Dumez  <cdumez@apple.com>
2428
2429         Unreviewed, speculative Windows build fix after r222613.
2430
2431         * dom/StringCallback.idl:
2432
2433 2017-09-28  Zalan Bujtas  <zalan@apple.com>
2434
2435         Small cleanup in RenderMenuList::didUpdateActiveOption
2436         https://bugs.webkit.org/show_bug.cgi?id=177610
2437
2438         Reviewed by Dean Jackson.
2439
2440         No change in functionality.
2441
2442         * rendering/RenderMenuList.cpp:
2443         (WebCore::RenderMenuList::RenderMenuList):
2444         (RenderMenuList::didUpdateActiveOption):
2445         * rendering/RenderMenuList.h:
2446
2447 2017-09-28  Ross Kirsling  <ross.kirsling@sony.com>
2448
2449         [PAL] Move HysteresisActivity into PAL
2450         https://bugs.webkit.org/show_bug.cgi?id=177516
2451
2452         Reviewed by Alex Christensen.
2453
2454         * WebCore.xcodeproj/project.pbxproj:
2455         * platform/UserActivity.cpp:
2456         (WebCore::UserActivity::UserActivity):
2457         (WebCore::UserActivity::hysteresisUpdated):
2458         * platform/UserActivity.h:
2459         * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
2460         (WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
2461         * platform/graphics/cairo/BackingStoreBackendCairoImpl.h:
2462         * platform/ios/WebSQLiteDatabaseTrackerClient.h:
2463         * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
2464         (WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
2465         (WebCore::WebSQLiteDatabaseTrackerClient::hysteresisUpdated):
2466
2467 2017-09-28  Chris Dumez  <cdumez@apple.com>
2468
2469         Add support for <link rel=preconnect>
2470         https://bugs.webkit.org/show_bug.cgi?id=177474
2471         <rdar://problem/33141380>
2472
2473         Reviewed by Alex Christensen.
2474
2475         Add support for <link rel=preconnect>:
2476         - https://w3c.github.io/resource-hints/#preconnect
2477
2478         It is currently only enabled for WK2 on MacOS High Sierra+
2479         and iOS 11+.
2480
2481         Tests: fast/dom/HTMLLinkElement/preconnect-support.html
2482                http/tests/preconnect/link-rel-preconnect-http.html
2483                http/tests/preconnect/link-rel-preconnect-https.html
2484
2485         * bindings/js/JSDOMExceptionHandling.h:
2486         * bindings/scripts/CodeGeneratorJS.pm:
2487         (GenerateCallbackHeaderContent):
2488         * bindings/scripts/IDLAttributes.json:
2489         * dom/Document.cpp:
2490         (WebCore::Document::addConsoleMessage):
2491         (WebCore::Document::setConsoleMessageListener):
2492         * dom/Document.h:
2493         * dom/StringCallback.idl:
2494         * html/DOMTokenList.cpp:
2495         (WebCore::DOMTokenList::DOMTokenList):
2496         (WebCore::DOMTokenList::supports):
2497         * html/DOMTokenList.h:
2498         (WebCore::DOMTokenList::DOMTokenList):
2499         * html/HTMLAnchorElement.cpp:
2500         (WebCore::HTMLAnchorElement::relList):
2501         * html/HTMLIFrameElement.cpp:
2502         (WebCore::HTMLIFrameElement::sandbox):
2503         * html/HTMLLinkElement.cpp:
2504         (WebCore::HTMLLinkElement::parseAttribute):
2505         (WebCore::HTMLLinkElement::relList):
2506         * html/LinkRelAttribute.cpp:
2507         (WebCore::LinkRelAttribute::LinkRelAttribute):
2508         (WebCore::LinkRelAttribute::isSupported):
2509         * html/LinkRelAttribute.h:
2510         * html/parser/HTMLPreloadScanner.cpp:
2511         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2512         * loader/LinkLoader.cpp:
2513         (WebCore::LinkLoader::loadLinksFromHeader):
2514         (WebCore::LinkLoader::loadLink):
2515         * loader/LoaderStrategy.h:
2516         * page/Settings.in:
2517         * testing/Internals.cpp:
2518         (WebCore::Internals::Internals):
2519         (WebCore::Internals::setConsoleMessageListener):
2520         * testing/Internals.h:
2521         * testing/Internals.idl:
2522
2523 2017-09-28  Zalan Bujtas  <zalan@apple.com>
2524
2525         AX: Defer RenderListBox selectionChanged event until after layout is done.
2526         https://bugs.webkit.org/show_bug.cgi?id=177589
2527         <rdar://problem/34705785>
2528
2529         Reviewed by Chris Fleizach.
2530
2531         Defer AX update when the selection changed event is followed by a layout.
2532
2533         Covered by existing tests.
2534
2535         * accessibility/AXObjectCache.cpp:
2536         (WebCore::AXObjectCache::remove):
2537         (WebCore::AXObjectCache::performDeferredCacheUpdate):
2538         (WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):
2539         * accessibility/AXObjectCache.h:
2540         (WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):
2541         * rendering/RenderListBox.cpp:
2542         (WebCore::RenderListBox::selectionChanged):
2543
2544 2017-09-28  Zan Dobersek  <zdobersek@igalia.com>
2545
2546         [Cairo] Remove the cairo_glyph_t complexity from GlyphBuffer
2547         https://bugs.webkit.org/show_bug.cgi?id=177598
2548
2549         Reviewed by Carlos Garcia Campos.
2550
2551         Remove the decade-old use of cairo_glyph_t as the underlying type for
2552         Glyph. The former spans 24 bytes in size, while the latte is just 2
2553         bytes. The x and y coordinate attributes of cairo_glyph_t were only
2554         used in FontCascade::drawGlyphs() implementation, where they were
2555         overridden even if the same GlyphBuffer object was used here repeatedly.
2556
2557         FontCascade::drawGlyphs() now creates a new Vector<cairo_glyph_t> object
2558         and fills it only with the glyph index and coordinates data for glyphs
2559         that will actually be drawn. This will likely in the future be leveraged
2560         to pack the necessary data and perform the drawing operations in
2561         parallelized tasks. GlyphBuffer usages that before required USE(CAIRO)
2562         special-casing can now be simplified.
2563
2564         This also removes the need for <cairo.h> header inclusion in the
2565         GlyphBuffer.h header. This further removes Cairo header inclusion in
2566         roughly 600 build targets.
2567
2568         No new tests -- no change in behavior.
2569
2570         * platform/graphics/FontCascade.cpp:
2571         (WebCore::FontCascade::widthForSimpleText const):
2572         * platform/graphics/GlyphBuffer.h:
2573         (WebCore::GlyphBuffer::glyphAt const):
2574         (WebCore::GlyphBuffer::add):
2575         * platform/graphics/cairo/FontCairo.cpp:
2576         (WebCore::drawGlyphsToContext):
2577         (WebCore::drawGlyphsShadow):
2578         (WebCore::FontCascade::drawGlyphs):
2579         * platform/graphics/displaylists/DisplayListItems.cpp:
2580         (WebCore::DisplayList::DrawGlyphs::generateGlyphBuffer const):
2581
2582 2017-09-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2583
2584         Unreviewed, rolling out r222606.
2585
2586         The debug assertion hit in these API tests should be fixed by
2587         r222608.
2588
2589         Reverted changeset:
2590
2591         "REGRESSION(r222595): Assertion failure in
2592         _preLoadedDataConformingToType"
2593         https://bugs.webkit.org/show_bug.cgi?id=177599
2594         http://trac.webkit.org/changeset/222606
2595
2596 2017-09-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2597
2598         [iOS WK2] DataTransfer DataInteractionTests debug assert under -_preLoadedDataConformingToType:forItemProviderAtIndex:
2599         https://bugs.webkit.org/show_bug.cgi?id=177594
2600
2601         Reviewed by Tim Horton.
2602
2603         Currently, some API tests added in r222595 currently hit debug assertions under -preloadedDataConformingToType:
2604         forItemProviderAtIndex:. This is because the page may call DataTransfer.types, which now calls into
2605         PlatformPasteboard::typesSafeForDOMToReadAndWrite(). This calls on the AbstractPasteboard (either the
2606         UIPasteboard or WebItemProviderPasteboard, in the case of drag and drop) to fetch the custom WebKit pasteboard
2607         data blob, if it exists. For WebItemProviderPasteboard, this ends up calling into -[WebItemProviderPasteboard
2608         _preLoadedDataConformingToType:forItemProviderAtIndex:], which was previously only called after loading data off
2609         of the item providers. There's an existing sanity check in this preloaded data helper to make sure that the
2610         number of load results is equal to the number of item providers loaded from, but this sanity check only makes
2611         sense *after* the drop has happened, not before, since we should only attempt to read dropped data after any
2612         data at all has been dropped.
2613
2614         We need to check whether or not this custom data blob exists in PlatformPasteboard::typesSafeForDOMToReadAndWrite
2615         to fetch the list of DOM-exposed types to propagate back to the page. So to fix this, we make the helper methods
2616         for fetching dropped data (-dataForPasteboardType:inItemSet: and -valuesForPasteboardType:inItemSet:) fail
2617         gracefully when invoked prior to drop, when PlatformPasteboard::typesSafeForDOMToReadAndWrite is invoked.
2618
2619         No new tests; fixes iOS drag and drop API tests that currently hit this debug assertion.
2620
2621         * platform/ios/WebItemProviderPasteboard.mm:
2622         (-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
2623         (-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
2624
2625 2017-09-28  Ryosuke Niwa  <rniwa@webkit.org>
2626
2627         REGRESSION(r222595): Assertion failure in _preLoadedDataConformingToType
2628         https://bugs.webkit.org/show_bug.cgi?id=177599
2629
2630         Temporarily remove the debug assertion to make API tests not crash since the relevant API tests are passing.
2631
2632         * platform/ios/WebItemProviderPasteboard.mm:
2633         (-[WebItemProviderPasteboard _preLoadedDataConformingToType:forItemProviderAtIndex:]):
2634
2635 2017-09-27  Fujii Hironori  <Hironori.Fujii@sony.com>
2636
2637         [REGRESSION] word-spacing property is incorrectly applied
2638         https://bugs.webkit.org/show_bug.cgi?id=142086
2639         <rdar://problem/19985240>
2640
2641         Reviewed by Zalan Bujtas.
2642
2643         word-spacing property isn't applied to text nodes with starting
2644         with '\n' if the kerning enabled. In Bug 165796, only ' ' and '\t'
2645         are treated for word-spacing, but '\n'. It should be treated as
2646         well.
2647
2648         Test: fast/text/word-space-between-inlines.html
2649
2650         * rendering/RenderBlockLineLayout.cpp:
2651         (WebCore::setLogicalWidthForTextRun): Use
2652         FontCascade::treatAsSpace() instead of checking explicitly by
2653         comparing with ' ' and '\t'.
2654
2655 2017-09-27  Zan Dobersek  <zdobersek@igalia.com>
2656
2657         [Cairo] Remove unnecessary cairo.h includes
2658         https://bugs.webkit.org/show_bug.cgi?id=177540
2659
2660         Reviewed by Carlos Garcia Campos.
2661
2662         Drop unnecessary includes of the cairo.h header from the Font.h,
2663         FontPlatformData.h and Pattern.h headers. For the former two the
2664         header isn't required, while in the last one we can use a forward
2665         declaration for the cairo_pattern_t type instead of including
2666         the whole Cairo headers to have that available.
2667
2668         * platform/graphics/Font.h:
2669         * platform/graphics/FontPlatformData.h:
2670         * platform/graphics/Pattern.h:
2671
2672 2017-09-27  Zan Dobersek  <zdobersek@igalia.com>
2673
2674         [Cairo] Drop cairo_matrix_t conversion operators for AffineTransform, TransformationMatrix
2675         https://bugs.webkit.org/show_bug.cgi?id=177539
2676
2677         Reviewed by Carlos Garcia Campos.
2678
2679         Remove the cairo_matrix_t conversion operators from the AffineTransform
2680         and TransformationMatrix classes. These are rarely used, but enforce
2681         including the cairo.h header in both headers, which leads to the Cairo
2682         headers being included in around 800 build targets.
2683
2684         Instead, the toCairoMatrix() function is added to CairoUtilities.h that
2685         creates a cairo_matrix_t object for the given AffineTransform. No
2686         toCairoMatrix() is needed for TransformationMatrix since objects of
2687         that type aren't converted to cairo_matrix_t anywhere in the codebase.
2688
2689         This patch excludes unnecessary Cairo headers from about 550 build
2690         targets (with those headers being included in the other affected 250
2691         targets by some other header inclusion chain). CairoUtilities.h header
2692         is now included where necessary to make toCairoMatrix() available, and
2693         duplicated cairo.h inclusions are removed.
2694
2695         No new tests -- no change in behavior.
2696
2697         * editing/gtk/EditorGtk.cpp: Explicitly include <cairo.h> since it's
2698         necessary for Cairo operations used there.
2699         * platform/Cairo.cmake:
2700         * platform/graphics/cairo/CairoUtilities.cpp:
2701         (WebCore::drawPatternToCairoContext):
2702         (WebCore::toCairoMatrix):
2703         * platform/graphics/cairo/CairoUtilities.h:
2704         * platform/graphics/cairo/GradientCairo.cpp:
2705         (WebCore::Gradient::platformGradient):
2706         (WebCore::Gradient::setPlatformGradientSpaceTransform):
2707         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2708         (WebCore::GraphicsContext::concatCTM):
2709         (WebCore::GraphicsContext::setCTM):
2710         * platform/graphics/cairo/PathCairo.cpp: No need to include AffineTransform.h.
2711         (WebCore::Path::addPath):
2712         (WebCore::Path::transform):
2713         * platform/graphics/cairo/PatternCairo.cpp: Ditto.
2714         (WebCore::Pattern::createPlatformPattern const):
2715         * platform/graphics/cairo/TransformationMatrixCairo.cpp: Removed.
2716         * platform/graphics/transforms/AffineTransform.h:
2717         * platform/graphics/transforms/TransformationMatrix.h:
2718
2719 2017-09-27  Alex Christensen  <achristensen@webkit.org>
2720
2721         Add WKContentRuleList notify action type
2722         https://bugs.webkit.org/show_bug.cgi?id=177013
2723         <rdar://problem/31073936>
2724
2725         Reviewed by Darin Adler.
2726
2727         Covered by new API tests.
2728
2729         * contentextensions/ContentExtensionActions.h:
2730         (WebCore::ContentExtensions::hasStringArgument):
2731         * contentextensions/ContentExtensionCompiler.cpp:
2732         (WebCore::ContentExtensions::resolvePendingDisplayNoneActions):
2733         (WebCore::ContentExtensions::serializeActions):
2734         * contentextensions/ContentExtensionError.cpp:
2735         (WebCore::ContentExtensions::contentExtensionErrorCategory):
2736         * contentextensions/ContentExtensionError.h:
2737         * contentextensions/ContentExtensionParser.cpp:
2738         (WebCore::ContentExtensions::loadAction):
2739         * contentextensions/ContentExtensionRule.cpp:
2740         (WebCore::ContentExtensions::Action::deserialize):
2741         (WebCore::ContentExtensions::Action::deserializeType):
2742         (WebCore::ContentExtensions::Action::serializedLength):
2743         * contentextensions/ContentExtensionRule.h:
2744         (WebCore::ContentExtensions::Action::Action):
2745         * contentextensions/ContentExtensionsBackend.cpp:
2746         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2747         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):
2748         (WebCore::ContentExtensions::applyBlockedStatusToRequest):
2749         * loader/FrameLoader.cpp:
2750         (WebCore::FrameLoader::loadResourceSynchronously):
2751         * loader/PingLoader.cpp:
2752         (WebCore::processContentExtensionRulesForLoad):
2753         * loader/ResourceLoader.cpp:
2754         (WebCore::ResourceLoader::willSendRequestInternal):
2755         * loader/cache/CachedResourceLoader.cpp:
2756         (WebCore::CachedResourceLoader::requestResource):
2757         * loader/cache/CachedResourceRequest.cpp:
2758         (WebCore::CachedResourceRequest::applyBlockedStatus):
2759         * loader/cache/CachedResourceRequest.h:
2760         * page/ChromeClient.h:
2761
2762 2017-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2763
2764         Unreviewed, fix the internal build after r222596 and r222595.
2765
2766         Guarding code in PlatformPasteboardIOS.mm TARGET_OS_IPHONE did not have the intended effect.
2767
2768         * platform/ios/PlatformPasteboardIOS.mm:
2769         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
2770         (WebCore::PlatformPasteboard::write):
2771
2772 2017-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2773
2774         Unreviewed, fix the internal build after r222595.
2775
2776         Add missing iOS compiler guards.
2777
2778         * platform/ios/PlatformPasteboardIOS.mm:
2779         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
2780         (WebCore::PlatformPasteboard::write):
2781
2782 2017-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2783
2784         Drag event DataTransfer has unexpected types "dyn.ah62d4..."
2785         https://bugs.webkit.org/show_bug.cgi?id=172526
2786         <rdar://problem/32396081>
2787
2788         Reviewed by Ryosuke Niwa.
2789
2790         Currently, the pasteboard types we expose to web content are simply the types that appear on the platform
2791         pasteboard (i.e. the general NSPasteboard on Mac, and either the general UIPasteboard or a UIDragSession's
2792         NSItemProviders on iOS). This leads to DataTransfer.types exposing many private pasteboard types written by apps
2793         around the system to the page, such as dynamic UTIs, CorePasteboardFlavorTypes, or the "Apple WebKit dummy
2794         pasteboard type". These are not only confusing and not useful for web content (since they mostly hold values of
2795         empty string anyways), but can additionally pose privacy concerns by exposing information meant only for native
2796         applications to unvetted web content.
2797
2798         To address this problem, other browsers (e.g. Chrome and Firefox on Mac) white-list MIME types in DataTransfer's
2799         list of types. By default, when dragging or copying, these are "text/plain", "text/html" and "text/uri-list".
2800         However, this policy alone is insufficient, because the page may also supply its own types, in which case our
2801         naive whitelist would prevent us from delivering them to the page. To address this additional constraint, both
2802         Chrome and Firefox write any custom data supplied by the page to custom pasteboard UTIs
2803         (org.chromium.drag-dummy-type and org.mozilla.custom-clipdata, respectively). The corresponding data is a map
2804         of custom UTI => custom data supplied by the page; upon drop or paste, this mapping is consulted if the page
2805         calls getData() with a custom UTI.
2806
2807         This patch adopts this same approach in WebKit, and introduces the com.apple.WebKit.custom-pasteboard-data UTI
2808         (refer to per-method comments below for more information). These changes are covered by 18 new layout and API
2809         tests, as well as existing drag-and-drop tests.
2810
2811         Tests: editing/pasteboard/data-transfer-get-data-on-drop-custom.html
2812                editing/pasteboard/data-transfer-get-data-on-drop-plain-text.html
2813                editing/pasteboard/data-transfer-get-data-on-drop-rich-text.html
2814                editing/pasteboard/data-transfer-get-data-on-drop-url.html
2815                editing/pasteboard/data-transfer-get-data-on-paste-custom.html
2816                editing/pasteboard/data-transfer-get-data-on-paste-plain-text.html
2817                editing/pasteboard/data-transfer-get-data-on-paste-rich-text.html
2818                DataInteractionTests.DataTransferGetDataWhenDroppingPlainText
2819                DataInteractionTests.DataTransferGetDataWhenDroppingCustomData
2820                DataInteractionTests.DataTransferGetDataWhenDroppingURL
2821                DataInteractionTests.DataTransferGetDataWhenDroppingImageWithFileURL
2822                DataInteractionTests.DataTransferGetDataWhenDroppingRespectsPresentationStyle
2823                DataInteractionTests.DataTransferSetDataCannotWritePlatformTypes
2824                DataInteractionTests.DataTransferGetDataCannotReadPrivatePlatformTypes
2825                UIPasteboardTests.DataTransferGetDataWhenPastingURL
2826                UIPasteboardTests.DataTransferGetDataWhenPastingPlatformRepresentations
2827                UIPasteboardTests.DataTransferSetDataCannotWritePlatformTypes
2828                UIPasteboardTests.DataTransferGetDataCannotReadPrivatePlatformTypes
2829
2830         * CMakeLists.txt:
2831
2832         Add Pasteboard.cpp to the WebCore CMakeList.
2833
2834         * WebCore.xcodeproj/project.pbxproj:
2835         * dom/DataTransfer.cpp:
2836         (WebCore::DataTransfer::getData const):
2837         (WebCore::DataTransfer::createForDragStartEvent):
2838
2839         Make a new static helper function to create a StaticPasteboard-backed DataTransfer when dispatching a dragstart
2840         event. Any data supplied by the page will be written to the static pasteboard of this DataTransfer.
2841
2842         (WebCore::DataTransfer::moveDragState):
2843
2844         Add a new helper on DataTransfer to transfer the data required to initiate a drag from one DataTransfer to
2845         another. This is used in EventHandler to transfer the contents of the temporary DataTransfer modified by the
2846         page during the dragstart event over to the DataTransfer used for the rest of the drag initiation codepath,
2847         which is actually connected to the platform. This includes committing the contents of the other
2848         DataTransfer's StaticPasteboard to the new platform-connected Pasteboard.
2849
2850         (WebCore::DataTransfer::hasDragImage const):
2851         * dom/DataTransfer.h:
2852         * editing/cocoa/EditorCocoa.mm:
2853         (WebCore::Editor::selectionInHTMLFormat):
2854         (WebCore::Editor::writeSelectionToPasteboard):
2855         (WebCore::Editor::writeSelection):
2856
2857         Write an additional HTML markup string on iOS. We already do this for Mac, but this data previously had no use
2858         on iOS. This is needed for to vend the "text/html" representation to the page on iOS when pasting.
2859
2860         * editing/mac/EditorMac.mm:
2861         (WebCore::Editor::selectionInHTMLFormat): Deleted.
2862         * editing/wpe/EditorWPE.cpp:
2863         (WebCore::createFragmentFromPasteboardData):
2864         * page/EventHandler.cpp:
2865         (WebCore::EventHandler::dispatchDragStartEventOnSourceElement):
2866
2867         Renamed from dispatchDragStartEvent to dispatchDragStartEventOnSourceElement. Additionally, simplified the logic
2868         significantly, so that we now just check to see if the StaticPasteboard exposed to the page has any data,
2869         instead of using platform-dependent logic to compare changeCounts. We can do this because StaticPasteboard is
2870         guaranteed to only contain content that the page has supplied during the dragstart event, since it is empty
2871         upon initialization and cannot be written to by the rest of the platform.
2872
2873         (WebCore::EventHandler::handleDrag):
2874
2875         Tweak dispatchDragStartEvent to take a DataTransfer to expose to bindings; at the call site in handleDrag,
2876         create a new DataTransfer backed by a StaticPasteboard that the page may mutate over the course of the dragstart
2877         event. After dispatching to the page, move the dragging information present on the drag start DataTransfer over
2878         to the DragState's DataTransfer. If the drag image has not been set, compute and set the default drag image
2879         element on the DragState's DataTransfer.
2880
2881         (WebCore::EventHandler::dispatchDragStartEvent): Deleted.
2882         * page/EventHandler.h:
2883         * page/Settings.cpp:
2884         (WebCore::Settings::customPasteboardDataEnabled):
2885         * page/Settings.h:
2886         (WebCore::Settings::setCustomPasteboardDataEnabled):
2887         * page/ios/EventHandlerIOS.mm:
2888         (WebCore::EventHandler::createDraggingDataTransfer const): Deleted.
2889         * page/mac/EventHandlerMac.mm:
2890         (WebCore::EventHandler::createDraggingDataTransfer const): Deleted.
2891         * page/win/EventHandlerWin.cpp:
2892         (WebCore::EventHandler::createDraggingDataTransfer const): Deleted.
2893
2894         Remove this helper on both iOS and Mac. This only called createForDrag() before, with the addition of clearing
2895         the platform pasteboard prior to returning. Now that a StaticPasteboard is used when starting a drag, we clear
2896         out the platform pasteboard in platform-invariant code in EventHandler::handleDrag, so these helpers are no
2897         longer useful.
2898
2899         * platform/Pasteboard.cpp: Added.
2900         (WebCore::isSafeTypeForDOMToReadAndWrite):
2901
2902         Add a new helper to determine whether or not a pasteboard type is one of the standard DOM-exposed types. These
2903         are "text/plain", "text/html" and "text/uri-list".
2904
2905         (WebCore::sharedBufferFromCustomData):
2906         (WebCore::customDataFromSharedBuffer):
2907
2908         Add helper methods to serialize and deserialize custom data. The serialized data blob consists of: (1)
2909         versioning information, (2) a dictionary mapping each custom type to a value, and (3) a full list of types
2910         written by the page, in the order they were written.
2911
2912         * platform/Pasteboard.h:
2913
2914         Rename Pasteboard::readString to Pasteboard::readStringForBindings, to reflect that the string being read and
2915         the given type are exposed to and from the DOM.
2916
2917         * platform/PasteboardStrategy.h:
2918         * platform/PasteboardWriterData.h:
2919         * platform/PlatformPasteboard.h:
2920         * platform/StaticPasteboard.cpp:
2921
2922         Split m_stringContents out into m_platformData and m_customData. The former contains type-to-data entries for
2923         the DOM-exposed types, while the second contains entries that don't belong in the former.
2924
2925         (WebCore::StaticPasteboard::hasData):
2926         (WebCore::StaticPasteboard::readStringForBindings):
2927         (WebCore::StaticPasteboard::writeString):
2928         (WebCore::StaticPasteboard::clear):
2929         (WebCore::StaticPasteboard::commitToPasteboard):
2930
2931         Rather than propagate each entry to the client layer one at a time, populate a new PasteboardCustomData struct
2932         and send it to the client layer in one go. This new struct consists of an array of types in the order they were
2933         written by the page, a dictionary of public types (types we want to write directly to the platform pasteboard)
2934         and private types (custom types we want to package under our custom data blob).
2935
2936         (WebCore::StaticPasteboard::readString): Deleted.
2937         * platform/StaticPasteboard.h:
2938         * platform/glib/EventHandlerGLib.cpp:
2939         (WebCore::EventHandler::createDraggingDataTransfer const): Deleted.
2940         * platform/gtk/PasteboardGtk.cpp:
2941         (WebCore::Pasteboard::readStringForBindings):
2942         (WebCore::Pasteboard::writeCustomData):
2943         (WebCore::Pasteboard::readString): Deleted.
2944         * platform/gtk/PlatformPasteboardGtk.cpp:
2945         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
2946         (WebCore::PlatformPasteboard::write):
2947
2948         Add stub implementations for new custom pasteboard data methods.
2949
2950         * platform/ios/AbstractPasteboard.h:
2951         * platform/ios/PasteboardIOS.mm:
2952         (WebCore::Pasteboard::writeCustomData):
2953
2954         Add new plumbing to ship a custom data (PasteboardCustomData) struct from WebCore to the client layer.
2955
2956         (WebCore::cocoaTypeFromHTMLClipboardType):
2957         (WebCore::readPlatformValueAsString):
2958         (WebCore::Pasteboard::readStringForBindings):
2959         (WebCore::Pasteboard::types):
2960
2961         Rewritten to ask the client layer for DOM-exposed types rather than all types, in the case where custom
2962         pasteboard data is enabled in Settings.
2963
2964         (WebCore::Pasteboard::readString): Deleted.
2965         * platform/ios/PlatformPasteboardIOS.mm:
2966         (WebCore::PlatformPasteboard::bufferForType):
2967         (WebCore::PlatformPasteboard::getPathnamesForType const):
2968         (WebCore::PlatformPasteboard::numberOfFiles const):
2969         (WebCore::PlatformPasteboard::platformPasteboardTypeForSafeTypeForDOMToReadAndWrite):
2970
2971         Add a new helper to map DOM-safe pasteboard types to their platform counterparts.
2972
2973         (WebCore::PlatformPasteboard::write):
2974         (WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
2975
2976         Add a new helper to map platform pasteboard types to their DOM-safe counterparts.
2977
2978         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
2979
2980         Fetch a list of DOM-exposed types. On iOS, for drag and drop, we have the additional constraint of not being
2981         able to read any data before the drop happens. This is problematic, since the page needs to know the list of
2982         types during 'dragover' events. To support this, we instead keep the array of types in the teamData property of
2983         the generated item provider, which is immediately available, even when dragging across different apps. Note that
2984         we still need to check if the pasteboard contains the full custom data blob here to handle the case where we
2985         copy on Mac and perform a continuity paste on iOS, since teamData does not exist on Mac.
2986
2987         (WebCore::PlatformPasteboard::readString):
2988
2989         Tweak to account for how UIPasteboard may return data blobs when reading values.
2990
2991         (WebCore::PlatformPasteboard::getPathnamesForType): Deleted.
2992         (WebCore::PlatformPasteboard::numberOfFiles): Deleted.
2993         * platform/ios/WebItemProviderPasteboard.h:
2994         * platform/ios/WebItemProviderPasteboard.mm:
2995         (-[WebItemProviderRegistrationInfoList itemProvider]):
2996         (+[WebItemProviderLoadResult loadResultWithItemProvider:typesToLoad:]):
2997         (-[WebItemProviderLoadResult initWithItemProvider:typesToLoad:]):
2998         (-[WebItemProviderLoadResult typesToLoad]):
2999         (-[WebItemProviderLoadResult setFileURL:forType:]):
3000         (-[WebItemProviderLoadResult itemProvider]):
3001         (-[WebItemProviderPasteboard setItemProviders:]):
3002         (-[WebItemProviderPasteboard dataForPasteboardType:]):
3003         (-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentfiers:]):
3004         (-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]):
3005         (+[WebItemProviderLoadResult emptyLoadResult]): Deleted.
3006         (+[WebItemProviderLoadResult loadResultWithFileURLMap:presentationStyle:]): Deleted.
3007         (-[WebItemProviderLoadResult initWithFileURLMap:presentationStyle:]): Deleted.
3008         (-[WebItemProviderPasteboard typeIdentifierToLoadForRegisteredTypeIdentfiers:]): Deleted.
3009
3010         In the case of drag and drop on iOS, we cannot load any data prior to performing the drop; additionally, any
3011         attempts to load data immediately after the drop is performed in the UI process will fail. This means any and
3012         all data that the web process may require in the future when handling the drop must be loaded out of the item
3013         providers and saved when the drop is being handled in the UI process.
3014
3015         Currently, we only load the highest fidelity type we can handle (or, if we don't know what we can handle, we
3016         select the highest fidelity representation conforming to "public.content"). This is a problematic for supporting
3017         DataTransfer.getData() on drop on iOS, because the page can ask for any of the three web-exposed types. To
3018         address this, we refactor WebItemProviderPasteboard to support loading multiple representations per item being
3019         dropped. At minimum, we will load anything conforming to "public.html", "public.plain-text", "public.url", and
3020         the new "com.apple.WebKit.custom-pasteboard-data" so we have means to answer any question that the page could
3021         ask via DataTransfer.getData(). We additonally load the highest fidelity supported (or content-conformant) type,
3022         if it has not already been loaded as a result of the former.
3023
3024         To make this possible, we refactor WebItemProviderLoadResult to take an item provider and a list of types to
3025         load. -doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout: then creates a list of load results and
3026         uses each one to represent the results of loading data from its item provider (i.e. a map of UTI => file URL).
3027
3028         * platform/mac/PasteboardMac.mm:
3029         (WebCore::Pasteboard::writeCustomData):
3030         (WebCore::cocoaTypeFromHTMLClipboardType):
3031         (WebCore::readPlatformValueAsString):
3032         (WebCore::Pasteboard::readStringForBindings):
3033
3034         Change readStringForBindings (formerly, readString) so that if support for custom pasteboard data is enabled,
3035         we only allow reading directly from the platform pasteboard if the given type is DOM-safe; otherwise, we consult
3036         the custom data blob, if it exists. Otherwise, if support for custom pasteboard data is disabled, we fall back
3037         to our current behavior.
3038
3039         (WebCore::Pasteboard::types):
3040         (WebCore::Pasteboard::readString): Deleted.
3041         * platform/mac/PlatformPasteboardMac.mm:
3042         (WebCore::PlatformPasteboard::numberOfFiles const):
3043         (WebCore::PlatformPasteboard::getPathnamesForType const):
3044         (WebCore::PlatformPasteboard::stringForType):
3045         (WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
3046         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
3047
3048         Add support for reading DOM-exposed types and fetching DOM-exposed data off of the pasteboard. The overall idea
3049         here is similar to iOS, though implementation details vary (e.g. no item provider support).
3050
3051         (WebCore::PlatformPasteboard::write):
3052         (WebCore::PlatformPasteboard::platformPasteboardTypeForSafeTypeForDOMToReadAndWrite):
3053         (WebCore::PlatformPasteboard::numberOfFiles): Deleted.
3054         (WebCore::PlatformPasteboard::getPathnamesForType): Deleted.
3055         * platform/win/PasteboardWin.cpp:
3056         (WebCore::Pasteboard::readStringForBindings):
3057         (WebCore::Pasteboard::writeCustomData):
3058         (WebCore::Pasteboard::readString): Deleted.
3059         * platform/wpe/PasteboardWPE.cpp:
3060         (WebCore::Pasteboard::readStringForBindings):
3061         (WebCore::Pasteboard::writeCustomData):
3062         (WebCore::Pasteboard::readString): Deleted.
3063         * platform/wpe/PlatformPasteboardWPE.cpp:
3064         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
3065         (WebCore::PlatformPasteboard::write):
3066         * testing/InternalSettings.cpp:
3067         (WebCore::InternalSettings::Backup::Backup):
3068         (WebCore::InternalSettings::Backup::restoreTo):
3069         (WebCore::InternalSettings::setCustomPasteboardDataEnabled):
3070
3071         Add a new internal settings hook for layout tests to opt in to using custom pasteboard data. By default, custom
3072         pasteboard data is enabled only in Safari, or on applications linked on or after certain releases of iOS and
3073         macOS.
3074
3075         * testing/InternalSettings.h:
3076         * testing/InternalSettings.idl:
3077
3078 2017-09-27  Zalan Bujtas  <zalan@apple.com>
3079
3080         Deferred image size change makes image-load-on-delay.html flaky.
3081         https://bugs.webkit.org/show_bug.cgi?id=177520
3082         <rdar://problem/34674299>
3083
3084         Reviewed by Dean Jackson.
3085
3086         Only defer recomputeIsIgnored when the image change actually triggers layout. 
3087
3088         * accessibility/AXObjectCache.cpp:
3089         (WebCore::rendererNeedsDeferredUpdate):
3090         (WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded):
3091         (WebCore::AXObjectCache::deferTextChangedIfNeeded):
3092         * accessibility/AXObjectCache.h:
3093         (WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded):
3094         * rendering/RenderImage.cpp:
3095         (WebCore::RenderImage::imageChanged):
3096
3097 2017-09-27  Tim Horton  <timothy_horton@apple.com>
3098
3099         Try to fix the Mac CMake build
3100
3101         * PlatformMac.cmake:
3102
3103 2017-09-27  Myles C. Maxfield  <mmaxfield@apple.com>
3104
3105         Minimum font size may cause elements to have an infinite line-height
3106         https://bugs.webkit.org/show_bug.cgi?id=177573
3107         <rdar://problem/34573792>
3108
3109         Reviewed by Dan Bernstein.
3110
3111         When minimum font size is specified, we were trying to preserve the ratio of specified font-size
3112         and specified line-height in order to boost the computed font size proportionately to the font-size
3113         boost. However, this doesn't work when the specified font-size is 0, because the ratio between
3114         line-height and font-size is infinite.
3115
3116         The most straightforward solution is just to make small font-sizes opt out of the line-height
3117         adjustment because the result would be too big.
3118
3119         Test: fast/text/line-height-minimumFontSize-text-small-font-size.html
3120
3121         * css/StyleBuilderCustom.h:
3122         (WebCore::computeLineHeightMultiplierDueToFontSize):
3123         (WebCore::StyleBuilderCustom::applyValueLineHeight):
3124
3125 2017-09-27  Alex Christensen  <achristensen@webkit.org>
3126
3127         Allow modern decoding of std::optional<T>
3128         https://bugs.webkit.org/show_bug.cgi?id=177519
3129
3130         Reviewed by Tim Horton.
3131
3132         * platform/DragItem.h:
3133         (WebCore::DragItem::decode):
3134
3135 2017-09-27  Myles C. Maxfield  <mmaxfield@apple.com>
3136
3137         "Tag" codepoints require the complex text codepath
3138         https://bugs.webkit.org/show_bug.cgi?id=177251
3139         <rdar://problem/34384001>
3140
3141         Reviewed by David Hyatt.
3142
3143         Previously, Tag codepoints (U+E0000 - U+E007F) weren't triggering the
3144         complex text codepath.
3145
3146         Eventually, we should migrate the default from simple to complex. I'll do
3147         that in a separate patch.
3148
3149         Test: fast/text/flag-codepoint.html
3150
3151         * platform/graphics/FontCascade.cpp:
3152         (WebCore::FontCascade::characterRangeCodePath):
3153
3154 2017-09-27  David Hyatt  <hyatt@apple.com>
3155
3156         Rename "FlowThread" to "FragmentedFlow"
3157         https://bugs.webkit.org/show_bug.cgi?id=177557
3158
3159         Reviewed by Zalan Bujtas.
3160
3161         * CMakeLists.txt:
3162         * WebCore.xcodeproj/project.pbxproj:
3163         * dom/Document.cpp:
3164         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
3165         * dom/Element.cpp:
3166         (WebCore::Element::absoluteEventBounds):
3167         * rendering/LayoutState.cpp:
3168         (WebCore::LayoutState::LayoutState):
3169         * rendering/LayoutState.h:
3170         (WebCore::LayoutState::currentRenderFragmentedFlow const):
3171         (WebCore::LayoutState::setCurrentRenderFragmentedFlow):
3172         (WebCore::LayoutState::currentRenderFlowThread const): Deleted.
3173         (WebCore::LayoutState::setCurrentRenderFlowThread): Deleted.
3174         * rendering/LogicalSelectionOffsetCaches.h:
3175         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo):
3176         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
3177         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::logicalLeftSelectionOffset const):
3178         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::logicalRightSelectionOffset const):
3179         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFragmentedFlows const):
3180         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
3181         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFlowThreads const): Deleted.
3182         * rendering/RenderBlock.cpp:
3183         (WebCore::RenderBlock::styleDidChange):
3184         (WebCore::RenderBlock::clone const):
3185         (WebCore::RenderBlock::removeLeftoverAnonymousBlock):
3186         (WebCore::RenderBlock::preparePaginationBeforeBlockLayout):
3187         (WebCore::RenderBlock::addOverflowFromChildren):
3188         (WebCore::RenderBlock::addVisualOverflowFromTheme):
3189         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
3190         (WebCore::RenderBlock::simplifiedLayout):
3191         (WebCore::RenderBlock::isSelectionRoot const):
3192         (WebCore::RenderBlock::selectionGaps):
3193         (WebCore::RenderBlock::insertPositionedObject):
3194         (WebCore::isChildHitTestCandidate):
3195         (WebCore::RenderBlock::cachedEnclosingFragmentedFlow const):
3196         (WebCore::RenderBlock::cachedEnclosingFragmentedFlowNeedsUpdate const):
3197         (WebCore::RenderBlock::setCachedEnclosingFragmentedFlowNeedsUpdate):
3198         (WebCore::RenderBlock::updateCachedEnclosingFragmentedFlow const):
3199         (WebCore::RenderBlock::locateEnclosingFragmentedFlow const):
3200         (WebCore::RenderBlock::resetEnclosingFragmentedFlowAndChildInfoIncludingDescendants):
3201         (WebCore::RenderBlock::absoluteQuads const):
3202         (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage const):
3203         (WebCore::RenderBlock::fragmentAtBlockOffset const):
3204         (WebCore::canComputeFragmentRangeForBox):
3205         (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
3206         (WebCore::RenderBlock::computeFragmentRangeForBoxChild const):
3207         (WebCore::RenderBlock::estimateFragmentRangeForBoxChild const):
3208         (WebCore::RenderBlock::updateFragmentRangeForBoxChild const):
3209         (WebCore::RenderBlock::cachedFlowThreadContainingBlock const): Deleted.
3210         (WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate const): Deleted.
3211         (WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate): Deleted.
3212         (WebCore::RenderBlock::updateCachedFlowThreadContainingBlock const): Deleted.
3213         (WebCore::RenderBlock::locateFlowThreadContainingBlock const): Deleted.
3214         (WebCore::RenderBlock::resetFlowThreadContainingBlockAndChildInfoIncludingDescendants): Deleted.
3215         * rendering/RenderBlock.h:
3216         * rendering/RenderBlockFlow.cpp:
3217         (WebCore::RenderBlockFlow::willCreateColumns const):
3218         (WebCore::RenderBlockFlow::layoutBlock):
3219         (WebCore::RenderBlockFlow::layoutBlockChild):
3220         (WebCore::RenderBlockFlow::setStaticInlinePositionForChild):
3221         (WebCore::inNormalFlow):
3222         (WebCore::RenderBlockFlow::applyBeforeBreak):
3223         (WebCore::RenderBlockFlow::applyAfterBreak):
3224         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
3225         (WebCore::RenderBlockFlow::hasNextPage const):
3226         (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
3227         (WebCore::RenderBlockFlow::setPageBreak):
3228         (WebCore::RenderBlockFlow::updateMinimumPageHeight):
3229         (WebCore::RenderBlockFlow::pageLogicalTopForOffset const):
3230         (WebCore::RenderBlockFlow::pageLogicalHeightForOffset const):
3231         (WebCore::RenderBlockFlow::pageRemainingLogicalHeightForOffset const):
3232         (WebCore::RenderBlockFlow::styleDidChange):
3233         (WebCore::RenderBlockFlow::updateStylesForColumnChildren):
3234         (WebCore::RenderBlockFlow::computeOverflow):
3235         (WebCore::RenderBlockFlow::paintColumnRules):
3236         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
3237         (WebCore::RenderBlockFlow::setMultiColumnFlow):
3238         (WebCore::RenderBlockFlow::relayoutForPagination):
3239         (WebCore::RenderBlockFlow::layoutExcludedChildren):
3240         (WebCore::RenderBlockFlow::addChild):
3241         (WebCore::RenderBlockFlow::removeChild):
3242         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
3243         (WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
3244         (WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
3245         (WebCore::RenderBlockFlow::computedColumnWidth const):
3246         (WebCore::RenderBlockFlow::computedColumnCount const):
3247         (WebCore::RenderBlockFlow::isTopLayoutOverflowAllowed const):
3248         (WebCore::RenderBlockFlow::isLeftLayoutOverflowAllowed const):
3249         (WebCore::RenderBlockFlow::setMultiColumnFlowThread): Deleted.
3250         * rendering/RenderBlockFlow.h:
3251         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
3252         (WebCore::RenderBlockFlow::multiColumnFlow const):
3253         (WebCore::RenderBlockFlow::multiColumnFlowThread const): Deleted.
3254         * rendering/RenderBlockLineLayout.cpp:
3255         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
3256         (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
3257         (WebCore::RenderBlockFlow::layoutLineBoxes):
3258         (WebCore::RenderBlockFlow::determineStartPosition):
3259         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
3260         (WebCore::RenderBlockFlow::lineWidthForPaginatedLineChanged const):
3261         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
3262         (WebCore::RenderBlockFlow::updateFragmentForLine const):
3263         * rendering/RenderBox.cpp:
3264         (WebCore::RenderBox::clampToStartAndEndFragments const):
3265         (WebCore::RenderBox::hasFragmentRangeInFragmentedFlow const):
3266         (WebCore::RenderBox::styleDidChange):
3267         (WebCore::RenderBox::absoluteQuads const):
3268         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats const):
3269         (WebCore::RenderBox::containingBlockAvailableLineWidthInFragment const):
3270         (WebCore::RenderBox::offsetFromContainer const):
3271         (WebCore::RenderBox::computeRectForRepaint const):
3272         (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation const):
3273         (WebCore::RenderBox::availableLogicalHeightUsing const):
3274         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
3275         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
3276         (WebCore::RenderBox::computePositionedLogicalWidth const):
3277         (WebCore::RenderBox::computePositionedLogicalHeight const):
3278         (WebCore::RenderBox::positionForPoint):
3279         (WebCore::RenderBox::createsNewFormattingContext const):
3280         (WebCore::RenderBox::addVisualEffectOverflow):
3281         (WebCore::RenderBox::addOverflowFromChild):
3282         (WebCore::RenderBox::clearOverflow):
3283         (WebCore::RenderBox::offsetFromLogicalTopOfFirstPage const):
3284         (WebCore::RenderBox::hasFragmentRangeInFlowThread const): Deleted.
3285         * rendering/RenderBox.h:
3286         (WebCore::RenderBox::canHaveOutsideFragmentRange const):
3287         * rendering/RenderBoxModelObject.cpp:
3288         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent const):
3289         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint const):
3290         * rendering/RenderElement.cpp:
3291         (WebCore::RenderElement::setStyle):
3292         (WebCore::RenderElement::insertChildInternal):
3293         (WebCore::RenderElement::removeChildInternal):
3294         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
3295         (WebCore::RenderElement::adjustFragmentedFlowStateOnContainingBlockChangeIfNeeded):
3296         (WebCore::RenderElement::removeFromRenderFragmentedFlow):
3297         (WebCore::RenderElement::removeFromRenderFragmentedFlowIncludingDescendants):
3298         (WebCore::RenderElement::resetEnclosingFragmentedFlowAndChildInfoIncludingDescendants):
3299         (WebCore::RenderElement::adjustFlowThreadStateOnContainingBlockChangeIfNeeded): Deleted.
3300         (WebCore::RenderElement::removeFromRenderFlowThread): Deleted.
3301         (WebCore::RenderElement::removeFromRenderFlowThreadIncludingDescendants): Deleted.
3302         (WebCore::RenderElement::resetFlowThreadContainingBlockAndChildInfoIncludingDescendants): Deleted.
3303         * rendering/RenderElement.h:
3304         (WebCore::RenderElement::canContainFixedPositionObjects const):
3305         * rendering/RenderFlowThread.cpp: Removed.
3306         * rendering/RenderFlowThread.h: Removed.
3307         * rendering/RenderFragmentContainer.cpp:
3308         (WebCore::RenderFragmentContainer::RenderFragmentContainer):
3309         (WebCore::RenderFragmentContainer::mapFragmentPointIntoFragmentedFlowCoordinates):
3310         (WebCore::RenderFragmentContainer::positionForPoint):
3311         (WebCore::RenderFragmentContainer::pageLogicalWidth const):
3312         (WebCore::RenderFragmentContainer::pageLogicalHeight const):
3313         (WebCore::RenderFragmentContainer::logicalHeightOfAllFragmentedFlowContent const):
3314         (WebCore::RenderFragmentContainer::fragmentedFlowPortionOverflowRect):
3315         (WebCore::RenderFragmentContainer::fragmentedFlowPortionLocation const):
3316         (WebCore::RenderFragmentContainer::overflowRectForFragmentedFlowPortion):
3317         (WebCore::RenderFragmentContainer::pageLogicalTopForOffset const):
3318         (WebCore::RenderFragmentContainer::isFirstFragment const):
3319         (WebCore::RenderFragmentContainer::isLastFragment const):
3320         (WebCore::RenderFragmentContainer::shouldClipFragmentedFlowContent const):
3321         (WebCore::RenderFragmentContainer::styleDidChange):
3322         (WebCore::RenderFragmentContainer::computeOverflowFromFragmentedFlow):
3323         (WebCore::RenderFragmentContainer::repaintFragmentedFlowContent):
3324         (WebCore::RenderFragmentContainer::repaintFragmentedFlowContentRectangle):
3325         (WebCore::RenderFragmentContainer::installFragmentedFlow):
3326         (WebCore::RenderFragmentContainer::attachFragment):
3327         (WebCore::RenderFragmentContainer::detachFragment):
3328         (WebCore::RenderFragmentContainer::logicalTopOfFragmentedFlowContentRect const):
3329         (WebCore::RenderFragmentContainer::logicalBottomOfFragmentedFlowContentRect const):
3330         (WebCore::RenderFragmentContainer::computeIntrinsicLogicalWidths const):
3331         (WebCore::RenderFragmentContainer::adjustFragmentBoundsFromFragmentedFlowPortionRect const):
3332         (WebCore::RenderFragmentContainer::ensureOverflowForBox):
3333         (WebCore::RenderFragmentContainer::rectFlowPortionForBox const):
3334         (WebCore::RenderFragmentContainer::addVisualOverflowForBox):
3335         (WebCore::RenderFragmentContainer::visualOverflowRectForBoxForPropagation):
3336         (WebCore::CurrentRenderFragmentContainerMaintainer::CurrentRenderFragmentContainerMaintainer):
3337         (WebCore::CurrentRenderFragmentContainerMaintainer::~CurrentRenderFragmentContainerMaintainer):
3338         (WebCore::RenderFragmentContainer::mapFragmentPointIntoFlowThreadCoordinates): Deleted.
3339         (WebCore::RenderFragmentContainer::logicalHeightOfAllFlowThreadContent const): Deleted.
3340         (WebCore::RenderFragmentContainer::flowThreadPortionOverflowRect): Deleted.
3341         (WebCore::RenderFragmentContainer::flowThreadPortionLocation const): Deleted.
3342         (WebCore::RenderFragmentContainer::overflowRectForFlowThreadPortion): Deleted.
3343         (WebCore::RenderFragmentContainer::shouldClipFlowThreadContent const): Deleted.
3344         (WebCore::RenderFragmentContainer::computeOverflowFromFlowThread): Deleted.
3345         (WebCore::RenderFragmentContainer::repaintFlowThreadContent): Deleted.
3346         (WebCore::RenderFragmentContainer::repaintFlowThreadContentRectangle): Deleted.
3347         (WebCore::RenderFragmentContainer::installFlowThread): Deleted.
3348         (WebCore::RenderFragmentContainer::logicalTopOfFlowThreadContentRect const): Deleted.
3349         (WebCore::RenderFragmentContainer::logicalBottomOfFlowThreadContentRect const): Deleted.
3350         (WebCore::RenderFragmentContainer::adjustFragmentBoundsFromFlowThreadPortionRect const): Deleted.
3351         * rendering/RenderFragmentContainer.h:
3352         (WebCore::RenderFragmentContainer::setFragmentedFlowPortionRect):
3353         (WebCore::RenderFragmentContainer::fragmentedFlowPortionRect const):
3354         (WebCore::RenderFragmentContainer::fragmentedFlow const):
3355         (WebCore::RenderFragmentContainer::logicalTopForFragmentedFlowContent const):
3356         (WebCore::RenderFragmentContainer::logicalBottomForFragmentedFlowContent const):
3357         (WebCore::RenderFragmentContainer::setFlowThreadPortionRect): Deleted.
3358         (WebCore::RenderFragmentContainer::flowThreadPortionRect const): Deleted.
3359         (WebCore::RenderFragmentContainer::flowThread const): Deleted.
3360         (WebCore::RenderFragmentContainer::logicalTopForFlowThreadContent const): Deleted.
3361         (WebCore::RenderFragmentContainer::logicalBottomForFlowThreadContent const): Deleted.
3362         * rendering/RenderFragmentContainerSet.cpp:
3363         (WebCore::RenderFragmentContainerSet::RenderFragmentContainerSet):
3364         (WebCore::RenderFragmentContainerSet::installFragmentedFlow):
3365         (WebCore::RenderFragmentContainerSet::expandToEncompassFragmentedFlowContentsIfNeeded):
3366         (WebCore::RenderFragmentContainerSet::installFlowThread): Deleted.
3367         (WebCore::RenderFragmentContainerSet::expandToEncompassFlowThreadContentsIfNeeded): Deleted.
3368         * rendering/RenderFragmentContainerSet.h:
3369         * rendering/RenderFragmentedFlow.cpp: Copied from rendering/RenderFlowThread.cpp.
3370         (WebCore::RenderFragmentedFlow::RenderFragmentedFlow):
3371         (WebCore::RenderFragmentedFlow::createFragmentedFlowStyle):
3372         (WebCore::RenderFragmentedFlow::styleDidChange):
3373         (WebCore::RenderFragmentedFlow::removeFlowChildInfo):
3374         (WebCore::RenderFragmentedFlow::removeFragmentFromThread):
3375         (WebCore::RenderFragmentedFlow::invalidateFragments):
3376         (WebCore::RenderFragmentedFlow::validateFragments):
3377         (WebCore::RenderFragmentedFlow::layout):
3378         (WebCore::RenderFragmentedFlow::updateLogicalWidth):
3379         (WebCore::RenderFragmentedFlow::computeLogicalHeight const):
3380         (WebCore::RenderFragmentedFlow::nodeAtPoint):
3381         (WebCore::RenderFragmentedFlow::shouldRepaint const):
3382         (WebCore::RenderFragmentedFlow::repaintRectangleInFragments const):
3383         (WebCore::RenderFragmentedFlow::fragmentAtBlockOffset const):
3384         (WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):
3385         (WebCore::RenderFragmentedFlow::pageLogicalTopForOffset const):
3386         (WebCore::RenderFragmentedFlow::pageLogicalWidthForOffset const):
3387         (WebCore::RenderFragmentedFlow::pageLogicalHeightForOffset const):
3388         (WebCore::RenderFragmentedFlow::pageRemainingLogicalHeightForOffset const):
3389         (WebCore::RenderFragmentedFlow::mapFromFlowToFragment const):
3390         (WebCore::RenderFragmentedFlow::removeRenderBoxFragmentInfo):
3391         (WebCore::RenderFragmentedFlow::removeLineFragmentInfo):
3392         (WebCore::RenderFragmentedFlow::logicalWidthChangedInFragmentsForBlock):
3393         (WebCore::RenderFragmentedFlow::contentLogicalWidthOfFirstFragment const):
3394         (WebCore::RenderFragmentedFlow::contentLogicalHeightOfFirstFragment const):
3395         (WebCore::RenderFragmentedFlow::contentLogicalLeftOfFirstFragment const):
3396         (WebCore::RenderFragmentedFlow::firstFragment const):
3397         (WebCore::RenderFragmentedFlow::lastFragment const):
3398         (WebCore::RenderFragmentedFlow::clearRenderBoxFragmentInfoAndCustomStyle):
3399         (WebCore::RenderFragmentedFlow::setFragmentRangeForBox):
3400         (WebCore::RenderFragmentedFlow::hasCachedFragmentRangeForBox const):
3401         (WebCore::RenderFragmentedFlow::getFragmentRangeForBoxFromCachedInfo const):
3402         (WebCore::RenderFragmentedFlow::getFragmentRangeForBox const):
3403         (WebCore::RenderFragmentedFlow::computedFragmentRangeForBox const):
3404         (WebCore::RenderFragmentedFlow::fragmentInRange const):
3405         (WebCore::RenderFragmentedFlow::objectShouldFragmentInFlowFragment const):
3406         (WebCore::RenderFragmentedFlow::objectInFlowFragment const):
3407         (WebCore::RenderFragmentedFlow::checkLinesConsistency const):
3408         (WebCore::RenderFragmentedFlow::clearLinesToFragmentMap):
3409         (WebCore::RenderFragmentedFlow::deleteLines):
3410         (WebCore::RenderFragmentedFlow::willBeDestroyed):
3411         (WebCore::RenderFragmentedFlow::markFragmentsForOverflowLayoutIfNeeded):
3412         (WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):
3413         (WebCore::RenderFragmentedFlow::addForcedFragmentBreak):
3414         (WebCore::RenderFragmentedFlow::collectLayerFragments):
3415         (WebCore::RenderFragmentedFlow::fragmentsBoundingBox):
3416         (WebCore::RenderFragmentedFlow::offsetFromLogicalTopOfFirstFragment const):
3417         (WebCore::RenderFragmentedFlow::FragmentSearchAdapter::collectIfNeeded):
3418         (WebCore::RenderFragmentedFlow::mapLocalToContainer const):
3419         (WebCore::RenderFragmentedFlow::mapFromLocalToFragmentedFlow const):
3420         (WebCore::RenderFragmentedFlow::mapFromFragmentedFlowToLocal const):
3421         (WebCore::RenderFragmentedFlow::flipForWritingModeLocalCoordinates const):
3422         (WebCore::RenderFragmentedFlow::addFragmentsVisualEffectOverflow):
3423         (WebCore::RenderFragmentedFlow::addFragmentsVisualOverflowFromTheme):
3424         (WebCore::RenderFragmentedFlow::addFragmentsOverflowFromChild):
3425         (WebCore::RenderFragmentedFlow::addFragmentsLayoutOverflow):
3426         (WebCore::RenderFragmentedFlow::addFragmentsVisualOverflow):
3427         (WebCore::RenderFragmentedFlow::clearFragmentsOverflow):
3428         (WebCore::RenderFragmentedFlow::currentFragment const):
3429         (WebCore::RenderFragmentedFlow::containingFragmentMap):
3430         (WebCore::RenderFlowThread::RenderFlowThread): Deleted.
3431         (WebCore::RenderFlowThread::createFlowThreadStyle): Deleted.
3432         (WebCore::RenderFlowThread::styleDidChange): Deleted.
3433         (WebCore::RenderFlowThread::removeFlowChildInfo): Deleted.
3434         (WebCore::RenderFlowThread::removeFragmentFromThread): Deleted.
3435         (WebCore::RenderFlowThread::invalidateFragments): Deleted.
3436         (WebCore::RenderFlowThread::validateFragments): Deleted.
3437         (WebCore::RenderFlowThread::layout): Deleted.
3438         (WebCore::RenderFlowThread::updateLogicalWidth): Deleted.
3439         (WebCore::RenderFlowThread::computeLogicalHeight const): Deleted.
3440         (WebCore::RenderFlowThread::nodeAtPoint): Deleted.
3441         (WebCore::RenderFlowThread::shouldRepaint const): Deleted.
3442         (WebCore::RenderFlowThread::repaintRectangleInFragments const): Deleted.
3443         (WebCore::RenderFlowThread::fragmentAtBlockOffset const): Deleted.
3444         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent const): Deleted.
3445         (WebCore::RenderFlowThread::pageLogicalTopForOffset const): Deleted.
3446         (WebCore::RenderFlowThread::pageLogicalWidthForOffset const): Deleted.
3447         (WebCore::RenderFlowThread::pageLogicalHeightForOffset const): Deleted.
3448         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset const): Deleted.
3449         (WebCore::RenderFlowThread::mapFromFlowToFragment const): Deleted.
3450         (WebCore::RenderFlowThread::removeRenderBoxFragmentInfo): Deleted.
3451         (WebCore::RenderFlowThread::removeLineFragmentInfo): Deleted.
3452         (WebCore::RenderFlowThread::logicalWidthChangedInFragmentsForBlock): Deleted.
3453         (WebCore::RenderFlowThread::contentLogicalWidthOfFirstFragment const): Deleted.
3454         (WebCore::RenderFlowThread::contentLogicalHeightOfFirstFragment const): Deleted.
3455         (WebCore::RenderFlowThread::contentLogicalLeftOfFirstFragment const): Deleted.
3456         (WebCore::RenderFlowThread::firstFragment const): Deleted.
3457         (WebCore::RenderFlowThread::lastFragment const): Deleted.
3458         (WebCore::RenderFlowThread::clearRenderBoxFragmentInfoAndCustomStyle): Deleted.
3459         (WebCore::RenderFlowThread::setFragmentRangeForBox): Deleted.
3460         (WebCore::RenderFlowThread::hasCachedFragmentRangeForBox const): Deleted.
3461         (WebCore::RenderFlowThread::getFragmentRangeForBoxFromCachedInfo const): Deleted.
3462         (WebCore::RenderFlowThread::getFragmentRangeForBox const): Deleted.
3463         (WebCore::RenderFlowThread::computedFragmentRangeForBox const): Deleted.
3464         (WebCore::RenderFlowThread::fragmentInRange const): Deleted.
3465         (WebCore::RenderFlowThread::objectShouldFragmentInFlowFragment const): Deleted.
3466         (WebCore::RenderFlowThread::objectInFlowFragment const): Deleted.
3467         (WebCore::RenderFlowThread::checkLinesConsistency const): Deleted.
3468         (WebCore::RenderFlowThread::clearLinesToFragmentMap): Deleted.
3469         (WebCore::RenderFlowThread::deleteLines): Deleted.
3470         (WebCore::RenderFlowThread::willBeDestroyed): Deleted.
3471         (WebCore::RenderFlowThread::markFragmentsForOverflowLayoutIfNeeded): Deleted.
3472         (WebCore::RenderFlowThread::updateFragmentsFlowThreadPortionRect): Deleted.
3473         (WebCore::RenderFlowThread::addForcedFragmentBreak): Deleted.
3474         (WebCore::RenderFlowThread::collectLayerFragments): Deleted.
3475         (WebCore::RenderFlowThread::fragmentsBoundingBox): Deleted.
3476         (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstFragment const): Deleted.
3477         (WebCore::RenderFlowThread::FragmentSearchAdapter::collectIfNeeded): Deleted.
3478         (WebCore::RenderFlowThread::mapLocalToContainer const): Deleted.
3479         (WebCore::RenderFlowThread::mapFromLocalToFlowThread const): Deleted.
3480         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal const): Deleted.
3481         (WebCore::RenderFlowThread::flipForWritingModeLocalCoordinates const): Deleted.
3482         (WebCore::RenderFlowThread::addFragmentsVisualEffectOverflow): Deleted.
3483         (WebCore::RenderFlowThread::addFragmentsVisualOverflowFromTheme): Deleted.
3484         (WebCore::RenderFlowThread::addFragmentsOverflowFromChild): Deleted.
3485         (WebCore::RenderFlowThread::addFragmentsLayoutOverflow): Deleted.
3486         (WebCore::RenderFlowThread::addFragmentsVisualOverflow): Deleted.
3487         (WebCore::RenderFlowThread::clearFragmentsOverflow): Deleted.
3488         (WebCore::RenderFlowThread::currentFragment const): Deleted.
3489         (WebCore::RenderFlowThread::containingFragmentMap): Deleted.
3490         * rendering/RenderFragmentedFlow.h: Copied from rendering/RenderFlowThread.h.
3491         * rendering/RenderGeometryMap.cpp:
3492         (WebCore::canMapBetweenRenderersViaLayers):
3493         (WebCore::RenderGeometryMap::pushRenderFragmentedFlow):
3494         (WebCore::RenderGeometryMap::pushRenderFlowThread): Deleted.
3495         * rendering/RenderGeometryMap.h:
3496         * rendering/RenderImage.cpp:
3497         (WebCore::RenderImage::layoutShadowControls):
3498         * rendering/RenderInline.cpp:
3499         (WebCore::RenderInline::addChild):
3500         (WebCore::RenderInline::clone const):
3501         (WebCore::RenderInline::splitInlines):
3502         (WebCore::RenderInline::offsetFromContainer const):
3503         * rendering/RenderLayer.cpp:
3504         (WebCore::RenderLayer::updateLayerPositions):
3505         (WebCore::RenderLayer::updatePagination):
3506         (WebCore::transparencyClipBox):
3507         (WebCore::accumulateOffsetTowardsAncestor):
3508         (WebCore::RenderLayer::paintLayerContents):
3509         (WebCore::RenderLayer::collectFragments):
3510         (WebCore::RenderLayer::hitTest):
3511         (WebCore::RenderLayer::enclosingFragmentedFlowAncestor const):
3512         (WebCore::RenderLayer::hitTestContents const):
3513         (WebCore::RenderLayer::calculateClipRects const):
3514         (WebCore::RenderLayer::enclosingFlowThreadAncestor const): Deleted.
3515         * rendering/RenderLayer.h:
3516         * rendering/RenderLayerBacking.cpp:
3517         (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
3518         * rendering/RenderLayerCompositor.cpp:
3519         (WebCore::RenderLayerCompositor::canBeComposited const):
3520         * rendering/RenderMedia.cpp:
3521         * rendering/RenderMultiColumnFlow.cpp: Copied from rendering/RenderMultiColumnFlowThread.cpp.
3522         (WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow):
3523         (WebCore::RenderMultiColumnFlow::~RenderMultiColumnFlow):
3524         (WebCore::RenderMultiColumnFlow::renderName const):
3525         (WebCore::RenderMultiColumnFlow::firstMultiColumnSet const):
3526         (WebCore::RenderMultiColumnFlow::lastMultiColumnSet const):
3527         (WebCore::RenderMultiColumnFlow::firstColumnSetOrSpanner const):
3528         (WebCore::RenderMultiColumnFlow::nextColumnSetOrSpannerSiblingOf):
3529         (WebCore::RenderMultiColumnFlow::previousColumnSetOrSpannerSiblingOf):
3530         (WebCore::RenderMultiColumnFlow::layout):
3531         (WebCore::findSetRendering):
3532         (WebCore::RenderMultiColumnFlow::populate):
3533         (WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
3534         (WebCore::RenderMultiColumnFlow::addFragmentToThread):
3535         (WebCore::RenderMultiColumnFlow::willBeRemovedFromTree):
3536         (WebCore::RenderMultiColumnFlow::resolveMovedChild const):
3537         (WebCore::isValidColumnSpanner):
3538         (WebCore::spannerPlacehoderCandidate):
3539         (WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant):
3540         (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
3541         (WebCore::RenderMultiColumnFlow::handleSpannerRemoval):
3542         (WebCore::RenderMultiColumnFlow::fragmentedFlowRelativeWillBeRemoved):
3543         (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantBoxLaidOut):
3544         (WebCore::RenderMultiColumnFlow::computeLogicalHeight const):
3545         (WebCore::RenderMultiColumnFlow::initialLogicalWidth const):
3546         (WebCore::RenderMultiColumnFlow::setPageBreak):
3547         (WebCore::RenderMultiColumnFlow::updateMinimumPageHeight):
3548         (WebCore::RenderMultiColumnFlow::fragmentAtBlockOffset const):
3549         (WebCore::RenderMultiColumnFlow::setFragmentRangeForBox):
3550         (WebCore::RenderMultiColumnFlow::addForcedFragmentBreak):
3551         (WebCore::RenderMultiColumnFlow::computeLineGridPaginationOrigin const):
3552         (WebCore::RenderMultiColumnFlow::offsetFromContainer const):
3553         (WebCore::RenderMultiColumnFlow::mapAbsoluteToLocalPoint const):
3554         (WebCore::RenderMultiColumnFlow::physicalTranslationFromFragmentToFlow const):
3555         (WebCore::RenderMultiColumnFlow::mapFromFlowToFragment const):
3556         (WebCore::RenderMultiColumnFlow::physicalTranslationOffsetFromFlowToFragment const):
3557         (WebCore::RenderMultiColumnFlow::physicalTranslationFromFlowToFragment const):
3558         (WebCore::RenderMultiColumnFlow::isPageLogicalHeightKnown const):
3559         (WebCore::RenderMultiColumnFlow::nodeAtPoint):
3560         (WebCore::RenderMultiColumnFlow::shouldCheckColumnBreaks const):
3561         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread): Deleted.
3562         (WebCore::RenderMultiColumnFlowThread::~RenderMultiColumnFlowThread): Deleted.
3563         (WebCore::RenderMultiColumnFlowThread::renderName const): Deleted.
3564         (WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet const): Deleted.
3565         (WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet const): Deleted.
3566         (WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner const): Deleted.
3567         (WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf): Deleted.
3568         (WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf): Deleted.
3569         (WebCore::RenderMultiColumnFlowThread::layout): Deleted.
3570         (WebCore::RenderMultiColumnFlowThread::populate): Deleted.
3571         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy): Deleted.
3572         (WebCore::RenderMultiColumnFlowThread::addFragmentToThread): Deleted.
3573         (WebCore::RenderMultiColumnFlowThread::willBeRemovedFromTree): Deleted.
3574         (WebCore::RenderMultiColumnFlowThread::resolveMovedChild const): Deleted.
3575         (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant): Deleted.
3576         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted): Deleted.
3577         (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval): Deleted.
3578         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved): Deleted.
3579         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut): Deleted.
3580         (WebCore::RenderMultiColumnFlowThread::computeLogicalHeight const): Deleted.
3581         (WebCore::RenderMultiColumnFlowThread::initialLogicalWidth const): Deleted.
3582         (WebCore::RenderMultiColumnFlowThread::setPageBreak): Deleted.
3583         (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight): Deleted.
3584         (WebCore::RenderMultiColumnFlowThread::fragmentAtBlockOffset const): Deleted.
3585         (WebCore::RenderMultiColumnFlowThread::setFragmentRangeForBox): Deleted.
3586         (WebCore::RenderMultiColumnFlowThread::addForcedFragmentBreak): Deleted.
3587         (WebCore::RenderMultiColumnFlowThread::computeLineGridPaginationOrigin const): Deleted.
3588         (WebCore::RenderMultiColumnFlowThread::offsetFromContainer const): Deleted.
3589         (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint const): Deleted.
3590         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFragmentToFlow const): Deleted.
3591         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToFragment const): Deleted.
3592         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToFragment const): Deleted.
3593         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToFragment const): Deleted.
3594         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown const): Deleted.
3595         (WebCore::RenderMultiColumnFlowThread::nodeAtPoint): Deleted.
3596         (WebCore::RenderMultiColumnFlowThread::shouldCheckColumnBreaks const): Deleted.
3597         * rendering/RenderMultiColumnFlow.h: Copied from rendering/RenderMultiColumnFlowThread.h.
3598         * rendering/RenderMultiColumnFlowThread.cpp: Removed.
3599         * rendering/RenderMultiColumnFlowThread.h: Removed.
3600         * rendering/RenderMultiColumnSet.cpp:
3601         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3602         (WebCore::RenderMultiColumnSet::firstRendererInFragmentedFlow const):
3603         (WebCore::RenderMultiColumnSet::lastRendererInFragmentedFlow const):
3604         (WebCore::RenderMultiColumnSet::containsRendererInFragmentedFlow const):
3605         (WebCore::RenderMultiColumnSet::setLogicalTopInFragmentedFlow):
3606         (WebCore::RenderMultiColumnSet::setLogicalBottomInFragmentedFlow):
3607         (WebCore::RenderMultiColumnSet::pageLogicalTopForOffset const):
3608         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
3609         (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
3610         (WebCore::RenderMultiColumnSet::calculateBalancedHeight const):
3611         (WebCore::RenderMultiColumnSet::recalculateColumnHeight):
3612         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
3613         (WebCore::RenderMultiColumnSet::requiresBalancing const):
3614         (WebCore::RenderMultiColumnSet::prepareForLayout):
3615         (WebCore::RenderMultiColumnSet::beginFlow):
3616         (WebCore::RenderMultiColumnSet::endFlow):
3617         (WebCore::RenderMultiColumnSet::layout):
3618         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const):
3619         (WebCore::RenderMultiColumnSet::columnCount const):
3620         (WebCore::RenderMultiColumnSet::columnLogicalLeft const):
3621         (WebCore::RenderMultiColumnSet::columnLogicalTop const):
3622         (WebCore::RenderMultiColumnSet::columnIndexAtOffset const):
3623         (WebCore::RenderMultiColumnSet::fragmentedFlowPortionRectAt const):
3624         (WebCore::RenderMultiColumnSet::fragmentedFlowPortionOverflowRect):
3625         (WebCore::RenderMultiColumnSet::paintColumnRules):
3626         (WebCore::RenderMultiColumnSet::repaintFragmentedFlowContent):
3627         (WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting const):
3628         (WebCore::RenderMultiColumnSet::collectLayerFragments):
3629         (WebCore::RenderMultiColumnSet::columnTranslationForOffset const):
3630         (WebCore::RenderMultiColumnSet::adjustFragmentBoundsFromFragmentedFlowPortionRect const):
3631         (WebCore::RenderMultiColumnSet::positionForPoint):
3632         (WebCore::RenderMultiColumnSet::translateFragmentPointToFragmentedFlow const):
3633         (WebCore::RenderMultiColumnSet::updateHitTestResult):
3634         (WebCore::RenderMultiColumnSet::firstRendererInFlowThread const): Deleted.
3635         (WebCore::RenderMultiColumnSet::lastRendererInFlowThread const): Deleted.
3636         (WebCore::RenderMultiColumnSet::containsRendererInFlowThread const): Deleted.
3637         (WebCore::RenderMultiColumnSet::setLogicalTopInFlowThread): Deleted.
3638         (WebCore::RenderMultiColumnSet::setLogicalBottomInFlowThread): Deleted.
3639         (WebCore::RenderMultiColumnSet::flowThreadPortionRectAt const): Deleted.
3640         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect): Deleted.
3641         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent): Deleted.
3642         (WebCore::RenderMultiColumnSet::adjustFragmentBoundsFromFlowThreadPortionRect const): Deleted.
3643         (WebCore::RenderMultiColumnSet::translateFragmentPointToFlowThread const): Deleted.
3644         * rendering/RenderMultiColumnSet.h:
3645         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
3646         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
3647         (WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
3648         * rendering/RenderMultiColumnSpannerPlaceholder.h:
3649         * rendering/RenderObject.cpp:
3650         (WebCore::RenderObject::setFragmentedFlowStateIncludingDescendants):
3651         (WebCore::RenderObject::computedFragmentedFlowState):
3652         (WebCore::RenderObject::initializeFragmentedFlowStateOnInsertion):
3653         (WebCore::RenderObject::resetFragmentedFlowStateOnRemoval):
3654         (WebCore::RenderObject::containerForRepaint const):
3655         (WebCore::RenderObject::repaintUsingContainer const):
3656         (WebCore::enclosingFragmentedFlowFromRenderer):
3657         (WebCore::RenderObject::outputRegionsInformation const):
3658         (WebCore::RenderObject::selectionRoot const):
3659         (WebCore::RenderObject::offsetFromContainer const):
3660         (WebCore::RenderObject::insertedIntoTree):
3661         (WebCore::RenderObject::locateEnclosingFragmentedFlow const):
3662         (WebCore::RenderObject::setIsRenderFragmentedFlow):
3663         (WebCore::RenderObject::setFlowThreadStateIncludingDescendants): Deleted.
3664         (WebCore::RenderObject::computedFlowThreadState): Deleted.
3665         (WebCore::RenderObject::initializeFlowThreadStateOnInsertion): Deleted.
3666         (WebCore::RenderObject::resetFlowThreadStateOnRemoval): Deleted.
3667         (WebCore::flowThreadContainingBlockFromRenderer): Deleted.
3668         (WebCore::RenderObject::locateFlowThreadContainingBlock const): Deleted.
3669         (WebCore::RenderObject::setIsRenderFlowThread): Deleted.
3670         * rendering/RenderObject.h:
3671         (WebCore::RenderObject::enclosingFragmentedFlow const):
3672         (WebCore::RenderObject::isInFlowRenderFragmentedFlow const):
3673         (WebCore::RenderObject::isOutOfFlowRenderFragmentedFlow const):
3674         (WebCore::RenderObject::isRenderMultiColumnFlow const):
3675         (WebCore::RenderObject::fragmentedFlowState const):
3676         (WebCore::RenderObject::setFragmentedFlowState):
3677         (WebCore::RenderObject::isAnonymousBlock const):
3678         (WebCore::RenderObject::isRenderFragmentedFlow const):
3679         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
3680         (WebCore::RenderObject::RenderObjectBitfields::fragmentedFlowState const):
3681         (WebCore::RenderObject::RenderObjectBitfields::setFragmentedFlowState):
3682         (WebCore::RenderObject::RenderObjectRareData::RenderObjectRareData):
3683         (WebCore::RenderObject::flowThreadContainingBlock const): Deleted.
3684         (WebCore::RenderObject::isInFlowRenderFlowThread const): Deleted.
3685         (WebCore::RenderObject::isOutOfFlowRenderFlowThread const): Deleted.
3686         (WebCore::RenderObject::isRenderMultiColumnFlowThread const): Deleted.
3687         (WebCore::RenderObject::flowThreadState const): Deleted.
3688         (WebCore::RenderObject::setFlowThreadState): Deleted.
3689         (WebCore::RenderObject::isRenderFlowThread const): Deleted.
3690         (WebCore::RenderObject::RenderObjectBitfields::flowThreadState const): Deleted.
3691         (WebCore::RenderObject::RenderObjectBitfields::setFlowThreadState): Deleted.
3692         * rendering/RenderReplaced.cpp:
3693         * rendering/RenderRuby.cpp:
3694         (WebCore::isRubyChildForNormalRemoval):
3695         * rendering/RenderTextFragment.cpp:
3696         (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
3697         * rendering/RenderView.cpp:
3698         (WebCore::RenderView::availableLogicalHeight const):
3699         (WebCore::RenderView::pageOrViewLogicalHeight const):
3700         (WebCore::RenderView::updateHitTestResult):
3701         (WebCore::RenderView::pageNumberForBlockProgressionOffset const):
3702         (WebCore::RenderView::pageCount const):
3703         * rendering/RenderView.h:
3704         * rendering/RenderingAllInOne.cpp:
3705         * rendering/RootInlineBox.cpp:
3706         (WebCore::containingFragmentMap):
3707         (WebCore::RootInlineBox::~RootInlineBox):
3708         (WebCore::RootInlineBox::containingFragment const):
3709         * rendering/SimpleLineLayout.cpp:
3710         (WebCore::SimpleLineLayout::canUseForWithReason):
3711         * rendering/line/LineLayoutState.h:
3712         (WebCore::LineLayoutState::LineLayoutState):
3713         (WebCore::LineLayoutState::fragmentedFlow const):
3714         (WebCore::LineLayoutState::setFragmentedFlow):
3715         (WebCore::LineLayoutState::flowThread const): Deleted.
3716         (WebCore::LineLayoutState::setFlowThread): Deleted.
3717         * rendering/svg/RenderSVGText.cpp:
3718         (WebCore::RenderSVGText::layout):
3719         * style/RenderTreePosition.h:
3720         * style/RenderTreeUpdaterListItem.cpp:
3721         (WebCore::RenderTreeUpdater::ListItem::updateMarker):
3722         * style/RenderTreeUpdaterMultiColumn.cpp:
3723         (WebCore::RenderTreeUpdater::MultiColumn::update):
3724         (WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):
3725         (WebCore::RenderTreeUpdater::MultiColumn::createFlowThread): Deleted.
3726         * style/RenderTreeUpdaterMultiColumn.h:
3727         * style/StyleResolveForDocument.cpp:
3728         (WebCore::Style::resolveForDocument):
3729
3730 2017-09-27  Don Olmstead  <don.olmstead@sony.com>
3731
3732         Default to void* for platform widgets
3733         https://bugs.webkit.org/show_bug.cgi?id=177518
3734
3735         Reviewed by Michael Catanzaro.
3736
3737         No new tests. No change in behavior.
3738
3739         * platform/Cursor.h:
3740         * platform/DragData.h:
3741         * platform/Widget.h:
3742
3743 2017-09-27  Youenn Fablet  <youenn@apple.com>
3744
3745         [Fetch API] Cloning an opaque response should not assert
3746         https://bugs.webkit.org/show_bug.cgi?id=177548
3747
3748         Reviewed by Sam Weinig.
3749
3750         Test: http/wpt/fetch/response-opaque-clone.html
3751
3752         * Modules/fetch/FetchBodyOwner.cpp:
3753         (WebCore::FetchBodyOwner::readableStream): Returning null if response is opaque.
3754         * Modules/fetch/FetchResponse.cpp:
3755         (WebCore::FetchResponse::clone): Making sure cloned responses keep their opaque state.
3756         (WebCore::FetchResponse::consumeBodyAsStream): Removing assertion as we need to create a stream for cloning.
3757
3758 2017-09-26  Joseph Pecoraro  <pecoraro@apple.com>
3759
3760         Web Inspector: Remove unused parameter of Page.reload
3761         https://bugs.webkit.org/show_bug.cgi?id=177522
3762
3763         Reviewed by Matt Baker.
3764
3765         * inspector/InspectorInstrumentation.cpp:
3766         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
3767         * inspector/InspectorPageAgent.cpp:
3768         (WebCore::InspectorPageAgent::reload):
3769         (WebCore::InspectorPageAgent::frameNavigated):
3770         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld): Deleted.
3771         * inspector/InspectorPageAgent.h:
3772
3773 2017-09-27  Chris Dumez  <cdumez@apple.com>
3774
3775         cssFloat missing in CSSPropertyDeclaration.prototype
3776         https://bugs.webkit.org/show_bug.cgi?id=177487
3777
3778         Reviewed by Sam Weinig.
3779
3780         Add support for cssFloat attribute on CSSPropertyDeclaration, as per:
3781         - https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-cssfloat
3782
3783         Test: fast/css/CSSStyleDeclaration-cssFloat.html
3784
3785         * css/CSSStyleDeclaration.cpp:
3786         (WebCore::CSSStyleDeclaration::cssFloat):
3787         (WebCore::CSSStyleDeclaration::setCssFloat):
3788         * css/CSSStyleDeclaration.h:
3789         * css/CSSStyleDeclaration.idl:
3790
3791 2017-09-27  Antti Koivisto  <antti@apple.com>
3792
3793         Ref element keys in CSSAnimationControllerPrivate
3794         https://bugs.webkit.org/show_bug.cgi?id=177543
3795
3796         Reviewed by Zalan Bujtas.
3797
3798         For safety.
3799
3800         * page/animation/CSSAnimationControllerPrivate.h:
3801
3802         This won't create ref cycle as elements are removed from the m_compositeAnimations maps when they
3803         are removed from the tree. We have assertions that verify the map is always cleared.
3804
3805 2017-09-27  David Hyatt  <hyatt@apple.com>
3806
3807         Rename "Region" to "Fragment" for RenderRegion and associated classes/methods.
3808         https://bugs.webkit.org/show_bug.cgi?id=177506
3809
3810         Reviewed by Zalan Bujtas.
3811
3812         * WebCore.xcodeproj/project.pbxproj:
3813         * css/CSSPrimitiveValueMappings.h:
3814         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3815         (WebCore::CSSPrimitiveValue::operator BreakInside const):
3816         * css/CSSValueKeywords.in:
3817         * dom/Element.cpp:
3818         * platform/graphics/cg/GraphicsContextCG.cpp:
3819         * rendering/FixedTableLayout.cpp:
3820         (WebCore::FixedTableLayout::calcWidthArray):
3821         * rendering/GridTrackSizingAlgorithm.cpp:
3822         (WebCore::computeMarginLogicalSizeForChild):
3823         (WebCore::IndefiniteSizeStrategy::minLogicalWidthForChild const):
3824         (WebCore::DefiniteSizeStrategy::minLogicalWidthForChild const):
3825         * rendering/RenderBlock.cpp:
3826         (WebCore::RenderBlock::preparePaginationBeforeBlockLayout):
3827         (WebCore::RenderBlock::addOverflowFromChildren):
3828         (WebCore::RenderBlock::clearLayoutOverflow):
3829         (WebCore::RenderBlock::addVisualOverflowFromTheme):
3830         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
3831         (WebCore::RenderBlock::simplifiedLayout):
3832         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
3833         (WebCore::RenderBlock::layoutPositionedObject):
3834         (WebCore::RenderBlock::selectionGaps):
3835         (WebCore::RenderBlock::logicalLeftOffsetForContent const):
3836         (WebCore::RenderBlock::logicalRightOffsetForContent const):
3837         (WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
3838         (WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
3839         (WebCore::RenderBlock::positionForPointWithInlineChildren):
3840         (WebCore::isChildHitTestCandidate):
3841         (WebCore::RenderBlock::positionForPoint):
3842         (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage const):
3843         (WebCore::RenderBlock::fragmentAtBlockOffset const):
3844         (WebCore::canComputeFragmentRangeForBox):
3845         (WebCore::RenderBlock::computeFragmentRangeForBoxChild const):
3846         (WebCore::RenderBlock::estimateFragmentRangeForBoxChild const):
3847         (WebCore::RenderBlock::updateFragmentRangeForBoxChild const):
3848         (WebCore::RenderBlock::regionAtBlockOffset const): Deleted.
3849         (WebCore::canComputeRegionRangeForBox): Deleted.
3850         (WebCore::RenderBlock::computeRegionRangeForBoxChild const): Deleted.
3851         (WebCore::RenderBlock::estimateRegionRangeForBoxChild const): Deleted.
3852         (WebCore::RenderBlock::updateRegionRangeForBoxChild const): Deleted.
3853         * rendering/RenderBlock.h:
3854         (WebCore::RenderBlock::availableLogicalWidthForLineInFragment const):
3855         (WebCore::RenderBlock::logicalRightOffsetForLineInFragment const):
3856         (WebCore::RenderBlock::logicalLeftOffsetForLineInFragment const):
3857         (WebCore::RenderBlock::startOffsetForLineInFragment const):
3858         (WebCore::RenderBlock::endOffsetForLineInFragment const):
3859         (WebCore::RenderBlock::availableLogicalWidthForLine const):
3860         (WebCore::RenderBlock::availableLogicalWidthForContent const):
3861         (WebCore::RenderBlock::startOffsetForContent const):
3862         (WebCore::RenderBlock::endOffsetForContent const):
3863         (WebCore::RenderBlock::logicalLeftOffsetForContent const):
3864         (WebCore::RenderBlock::logicalRightOffsetForContent const):
3865         (WebCore::RenderBlock::availableLogicalWidthForLineInRegion const): Deleted.
3866         (WebCore::RenderBlock::logicalRightOffsetForLineInRegion const): Deleted.
3867         (WebCore::RenderBlock::logicalLeftOffsetForLineInRegion const): Deleted.
3868         (WebCore::RenderBlock::startOffsetForLineInRegion const): Deleted.
3869         (WebCore::RenderBlock::endOffsetForLineInRegion const): Deleted.
3870         * rendering/RenderBlockFlow.cpp:
3871         (WebCore::RenderBlockFlow::layoutBlock):
3872         (WebCore::RenderBlockFlow::layoutBlockChild):
3873         (WebCore::RenderBlockFlow::setStaticInlinePositionForChild):
3874         (WebCore::RenderBlockFlow::applyBeforeBreak):
3875         (WebCore::RenderBlockFlow::applyAfterBreak):
3876         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
3877         (WebCore::RenderBlockFlow::hasNextPage const):
3878         (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
3879         (WebCore::RenderBlockFlow::pushToNextPageWithMinimumLogicalHeight const):
3880         (WebCore::RenderBlockFlow::positionNewFloats):
3881         (WebCore::RenderBlockFlow::getClearDelta):
3882         (WebCore::RenderBlockFlow::needsLayoutAfterFragmentRangeChange const):
3883         (WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
3884         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
3885         (WebCore::RenderBlockFlow::positionForPoint):
3886         (WebCore::RenderBlockFlow::layoutExcludedChildren):
3887         (WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange const): Deleted.
3888         * rendering/RenderBlockFlow.h:
3889         * rendering/RenderBlockLineLayout.cpp:
3890         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
3891         (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
3892         (WebCore::RenderBlockFlow::layoutLineBoxes):
3893         (WebCore::RenderBlockFlow::determineStartPosition):
3894         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
3895         (WebCore::RenderBlockFlow::lineWidthForPaginatedLineChanged const):
3896         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
3897         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
3898         (WebCore::RenderBlockFlow::updateFragmentForLine const):
3899         (WebCore::RenderBlockFlow::updateRegionForLine const): Deleted.
3900         * rendering/RenderBox.cpp:
3901         (WebCore::RenderBox::clampToStartAndEndFragments const):
3902         (WebCore::RenderBox::hasFragmentRangeInFlowThread const):
3903         (WebCore::RenderBox::clientBoxRectInFragment const):
3904         (WebCore::RenderBox::borderBoxRectInFragment const):
3905         (WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const):
3906         (WebCore::RenderBox::nodeAtPoint):
3907         (WebCore::RenderBox::paintBoxDecorations):
3908         (WebCore::RenderBox::overflowClipRect):
3909         (WebCore::RenderBox::clipRect):
3910         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats const):
3911         (WebCore::RenderBox::containingBlockLogicalWidthForContentInFragment const):
3912         (WebCore::RenderBox::containingBlockAvailableLineWidthInFragment const):
3913         (WebCore::RenderBox::offsetFromContainer const):
3914         (WebCore::RenderBox::computeRectForRepaint const):
3915         (WebCore::RenderBox::updateLogicalWidth):
3916         (WebCore::RenderBox::computeLogicalWidthInFragment const):
3917         (WebCore::RenderBox::computeLogicalWidthInFragmentUsing const):
3918         (WebCore::RenderBox::renderBoxFragmentInfo const):