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