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