1 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
3 [Mac][cmake] Unreviewed speculative buildfix after r197628. Just for fun.
7 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
9 [Mac][cmake] One more attempt to try to fix the build after r197633.
13 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
15 [Mac][cmake] One more attempt to try to fix the build after r197633.
19 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
21 [Mac][cmake] One more attempt to try to fix the build after r197633.
23 * PlatformMac.cmake: Revert r198398, which was incorrect.
25 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
27 [Mac][cmake] Last attempt to try to fix the build after r197633.
31 2016-03-18 Manuel Rego Casasnovas <rego@igalia.com>
33 [css-grid] Rename GridSpan properties
34 https://bugs.webkit.org/show_bug.cgi?id=155636
36 Reviewed by Sergio Villar Senin.
38 GridSpan was using old names initialResolvedPosition and
39 finalResolvedPosition.
40 This patch rename them to startLine and endLine.
42 Some reasons for this refactoring:
43 - "position" is a vague term not defined in the spec.
44 - GridSpan is currently storing grid lines. A grid "line" is defined
45 in the spec: https://drafts.csswg.org/css-grid/#grid-line-concept
46 - The spec uses the concepts "start" and "end" lines too.
48 No new tests, no change of behavior.
50 * css/CSSGridTemplateAreasValue.cpp:
51 (WebCore::stringForPosition):
53 (WebCore::CSSParser::parseGridTemplateAreasRow):
54 * css/StyleBuilderConverter.h:
55 (WebCore::StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea):
56 * rendering/RenderGrid.cpp:
57 (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
58 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
59 (WebCore::RenderGrid::insertItemIntoGrid):
60 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
61 (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
62 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
63 (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
64 (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
65 (WebCore::RenderGrid::columnAxisOffsetForChild):
66 (WebCore::RenderGrid::rowAxisOffsetForChild):
67 * rendering/style/GridArea.h:
68 (WebCore::GridSpan::untranslatedDefiniteGridSpan):
69 (WebCore::GridSpan::translatedDefiniteGridSpan):
70 (WebCore::GridSpan::operator==):
71 (WebCore::GridSpan::integerSpan):
72 (WebCore::GridSpan::untranslatedStartLine):
73 (WebCore::GridSpan::untranslatedEndLine):
74 (WebCore::GridSpan::startLine):
75 (WebCore::GridSpan::endLine):
76 (WebCore::GridSpan::begin):
77 (WebCore::GridSpan::end):
78 (WebCore::GridSpan::translate):
79 (WebCore::GridSpan::GridSpan):
80 (WebCore::GridSpan::untranslatedResolvedInitialPosition): Deleted.
81 (WebCore::GridSpan::untranslatedResolvedFinalPosition): Deleted.
82 (WebCore::GridSpan::resolvedInitialPosition): Deleted.
83 (WebCore::GridSpan::resolvedFinalPosition): Deleted.
84 * rendering/style/GridPositionsResolver.cpp:
85 (WebCore::definiteGridSpanWithNamedLineSpanAgainstOpposite):
86 (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
87 (WebCore::resolveGridPositionAgainstOppositePosition):
88 (WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
90 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
92 [Mac][cmake] One more unreviewed speculative buildfix after r197633. Just for fun.
96 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
98 [Mac][cmake] Unreviewed speculative buildfix after r197633. Just for fun.
102 2016-03-18 Youenn Fablet <youenn.fablet@crf.canon.fr>
104 crossorigin element resource loading should check HTTP redirection
105 https://bugs.webkit.org/show_bug.cgi?id=130578
107 Reviewed by Daniel Bates and Brent Fulgham.
109 Moved part of DocumentThreadableLoader redirection cross origin control code
110 into functions in CrossOriginAccessControl.cpp. Added cross origin control for
111 redirections in SubResourceLoader when policy is set to PotentiallyCrossOriginEnabled
112 using CrossOriginAccessControl.cpp new functions. Added a new test that checks that
113 cross-origin redirections are checked against CORS.
115 Test: http/tests/security/shape-image-cors-redirect.html
117 * loader/CrossOriginAccessControl.cpp:
118 (WebCore::isValidCrossOriginRedirectionURL): Returns true if the redirected URL is a valid URL for cross-origin requests.
119 (WebCore::cleanRedirectedRequestForAccessControl): Removes all headers added by the network backend that may cause the response CORS validation to fail.
120 * loader/CrossOriginAccessControl.h: Added above function prototypes.
121 * loader/DocumentThreadableLoader.cpp:
122 (WebCore::DocumentThreadableLoader::redirectReceived): Used new CORS redirection methods of CrossOriginAccessControl.cpp.
123 * loader/SubresourceLoader.cpp:
124 (WebCore::SubresourceLoader::init): Initialize the SecurityOrigin to be used for loading the resource.
125 (WebCore::SubresourceLoader::willSendRequest): Added cross-origin redirection response check.
126 (WebCore::SubresourceLoader::checkCrossOriginAccessControl): Checks CORS and update request if needed. Returns true if control checks passed.
127 * loader/SubresourceLoader.h: Added checkCrossOriginAccessControl declaration and m_origin declaration.
129 2016-03-18 Darin Adler <darin@apple.com>
131 Disable Caches in Safari's Develop menu does not disable caches.
132 https://bugs.webkit.org/show_bug.cgi?id=64483
134 Reviewed by Antti Koivisto.
136 Add a new setting, ResourceCachingDisabled, for use in future versions of Safari.
138 * history/PageCache.cpp:
139 (WebCore::canCachePage): Check resourceCachingDisabled and return false.
140 (WebCore::PageCache::take): Check resourceCachingDisabled, and return null.
141 (WebCore::PageCache::get): Ditto.
143 * loader/FrameLoader.cpp:
144 (WebCore::FrameLoader::subresourceCachePolicy): Check resourceCachingDisabled, and
146 (WebCore::FrameLoader::addExtraFieldsToRequest): Check resourceCachingDisabled, and
147 set the cache policy to trigger a reload.
148 * loader/cache/CachedResourceLoader.cpp:
149 (WebCore::CachedResourceLoader::cachePolicy): Check resourceCachingDisabled, and
152 * page/Settings.in: Added resourceCachingDisabled.
154 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
156 [Mac][cmake] Unreviewed speculative buildfix. Just for fun.
158 * loader/EmptyClients.cpp:
160 2016-03-17 Antti Koivisto <antti@apple.com>
162 Data URL DecodeTask may get deleted outside main thread
163 https://bugs.webkit.org/show_bug.cgi?id=155584
164 rdar://problem/24492104
166 Reviewed by Darin Adler.
168 This is unsafe as it owns strings and other types that are only safe to delete in the main thread.
170 There is a race between deref in dispatch() and deref in timerFired(). If the timer fires before dispatch()
171 exits the implicit deref will trigger deletion of DecodingResultDispatcher in the dispatching thread.
173 (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
175 Fix by clearing m_decodeTask when the timer fires.
177 2016-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
179 REGRESSION(r195661): [GTK] very slow scrolling
180 https://bugs.webkit.org/show_bug.cgi?id=155334
182 Reviewed by Michael Catanzaro.
184 We need to also restore the PerAxisData visible length when it's
185 reset because of a non animated scroll. To prevent making the same
186 mistake in the future, the current position and visible lengths
187 members are now required to construct PerAxisData. This also
188 simplifies the code and ensures that when the ScrollAnimatorSmooth
189 is created, it's updated to the current position.
191 * platform/ScrollAnimationSmooth.cpp:
192 (WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
193 Initialize PerAxisData members.
194 (WebCore::ScrollAnimationSmooth::setCurrentPosition): Pass the
195 current position and visible length as parameters to the
196 PerAxisData constructor.
197 (WebCore::ScrollAnimationSmooth::animateScroll): Ditto.
198 * platform/ScrollAnimationSmooth.h: Add a PerAxisData constructor
199 that receives current position and visible length and disallow to
200 use the default constructor.
201 * platform/ScrollAnimatorSmooth.cpp:
202 (WebCore::ScrollAnimatorSmooth::ScrollAnimatorSmooth): Pass the
203 current position to the ScrollAnimationSmooth constructor.
204 * platform/gtk/ScrollAnimatorGtk.cpp:
205 (WebCore::ScrollAnimatorGtk::ensureSmoothScrollingAnimation): Ditto.
207 2016-03-17 Chris Fleizach <cfleizach@apple.com>
209 AX: WEB: VoiceOver does not announce some WAI-ARIA document structures
210 https://bugs.webkit.org/show_bug.cgi?id=155603
211 <rdar://problem/25227385>
213 Reviewed by Darin Adler.
215 Expose more ARIA landmark type roles on iOS for accessibility.
217 Updated test: accessibility/ios-simulator/landmark-type.html
219 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
220 (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
221 (-[WebAccessibilityObjectWrapper accessibilityLabel]):
222 * platform/LocalizedStrings.cpp:
223 (WebCore::searchMenuClearRecentSearchesText):
224 (WebCore::AXWebAreaText):
225 (WebCore::AXListItemActionVerb):
226 (WebCore::AXAutoFillCredentialsLabel):
227 * platform/LocalizedStrings.h:
229 2016-03-17 Daniel Bates <dabates@apple.com>
231 Cleanup: Remove the need to pass reporting status to ContentSecurityPolicy functions
232 https://bugs.webkit.org/show_bug.cgi?id=155623
234 Reviewed by Andy Estes and Alex Christensen.
236 ScriptController::initScript() is the only function that passes ContentSecurityPolicy::ReportingStatus::SuppressReport
237 following the removal of the SecurityPolicy script interface in <http://trac.webkit.org/changeset/197142>. It
238 passes this reporting status to prevent sending a violation report when determining whether the CSP policy allows
239 use of the JavaScript eval()/operator eval so that it enable or disable this capability as appropriate. We
240 should teach ScriptController::initScript() to delegate the responsibility of enabling/disabling this capability
241 to the ContentSecurityPolicy. Then we can remove the need to expose ContentSecurityPolicy::ReportingStatus as
242 part of the ContentSecurityPolicy interface.
244 No functionality changed. So, no new tests.
246 * bindings/js/ScriptController.cpp:
247 (WebCore::ScriptController::createWindowShell): Return a reference to a JSDOMWindowShell object
248 instead of a pointer as the pointer is always non-null.
249 (WebCore::ScriptController::initScript): Updated as needed now that ScriptController::createWindowShell()
250 returns a reference. Moved logic to enable/disable JavaScript eval() and operator eval from here into
251 ContentSecurityPolicy::didCreateWindowShell() and make use of this member function.
252 * bindings/js/ScriptController.h:
253 * page/csp/ContentSecurityPolicy.cpp:
254 (WebCore::ContentSecurityPolicy::didCreateWindowShell): Added. Moved logic from to enable/disable JavaScript
255 eval() and operator eval from ScriptController::initScript() to here.
256 (WebCore::ContentSecurityPolicy::didReceiveHeader): Substitute ContentSecurityPolicyDirectiveList::ReportingStatus::SuppressReport
257 for ContentSecurityPolicy::ReportingStatus::SuppressReport as the enum has moved from class ContentSecurityPolicy
258 to ContentSecurityPolicyDirectiveList. Fix minor code style nit; substitute nullptr for 0 in the first argument
259 to ContentSecurityPolicyDirectiveList::allowEval().
260 (WebCore::isAllowedByAllWithFrame): Substitute ContentSecurityPolicyDirectiveList::ReportingStatus::SuppressReport
261 for ContentSecurityPolicy::ReportingStatus::SuppressReport as the enum has moved from class ContentSecurityPolicy
262 to ContentSecurityPolicyDirectiveList.
263 (WebCore::isAllowedByAll): Substitute ContentSecurityPolicyDirectiveList::ReportingStatus::SuppressReport
264 for ContentSecurityPolicy::ReportingStatus::SuppressReport as the enum has moved from class ContentSecurityPolicy
265 to ContentSecurityPolicyDirectiveList. Also make this function static so that it has internal linkage.
266 (WebCore::isAllowedByAllWithState): Ditto.
267 (WebCore::isAllowedByAllWithContext): Ditto.
268 (WebCore::isAllowedByAllWithHashFromContent): Ditto.
269 (WebCore::isAllowedByAllWithURL): Ditto.
270 (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Remove argument reportingStatus and always pass
271 ContentSecurityPolicyDirectiveList::ReportingStatus::SendReport to the directive list member function. In a
272 subsequent patch we will remove the need to pass the reporting status to the directive list member function.
273 (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Ditto.
274 (WebCore::ContentSecurityPolicy::allowInlineScript): Ditto.
275 (WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
276 (WebCore::ContentSecurityPolicy::allowEval): Ditto.
277 (WebCore::ContentSecurityPolicy::allowFrameAncestors): Ditto.
278 (WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
279 (WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
280 (WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
281 (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
282 (WebCore::ContentSecurityPolicy::allowChildContextFromSource): Ditto.
283 (WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
284 (WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
285 (WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
286 (WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
287 (WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
288 (WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
289 (WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
290 (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage): Deleted.
291 * page/csp/ContentSecurityPolicy.h:
292 * page/csp/ContentSecurityPolicyDirectiveList.cpp:
293 (WebCore::ContentSecurityPolicyDirectiveList::allowJavaScriptURLs): Substitute ReportingStatus for
294 ContentSecurityPolicy::ReportingStatus as the enum has moved from class ContentSecurityPolicy to this class.
295 (WebCore::ContentSecurityPolicyDirectiveList::allowInlineEventHandlers): Ditto.
296 (WebCore::ContentSecurityPolicyDirectiveList::allowInlineScript): Ditto.
297 (WebCore::ContentSecurityPolicyDirectiveList::allowInlineStyle): Ditto.
298 (WebCore::ContentSecurityPolicyDirectiveList::allowEval): Ditto.
299 (WebCore::ContentSecurityPolicyDirectiveList::allowPluginType): Ditto.
300 (WebCore::ContentSecurityPolicyDirectiveList::allowScriptFromSource): Ditto.
301 (WebCore::ContentSecurityPolicyDirectiveList::allowObjectFromSource): Ditto.
302 (WebCore::ContentSecurityPolicyDirectiveList::allowChildContextFromSource): Ditto.
303 (WebCore::ContentSecurityPolicyDirectiveList::allowChildFrameFromSource): Ditto.
304 (WebCore::ContentSecurityPolicyDirectiveList::allowImageFromSource): Ditto.
305 (WebCore::ContentSecurityPolicyDirectiveList::allowStyleFromSource): Ditto.
306 (WebCore::ContentSecurityPolicyDirectiveList::allowFontFromSource): Ditto.
307 (WebCore::ContentSecurityPolicyDirectiveList::allowMediaFromSource): Ditto.
308 (WebCore::ContentSecurityPolicyDirectiveList::allowConnectToSource): Ditto.
309 (WebCore::ContentSecurityPolicyDirectiveList::allowFormAction): Ditto.
310 (WebCore::ContentSecurityPolicyDirectiveList::allowBaseURI): Ditto.
311 (WebCore::ContentSecurityPolicyDirectiveList::allowFrameAncestors): Ditto.
312 * page/csp/ContentSecurityPolicyDirectiveList.h:
314 2016-03-17 Brent Fulgham <bfulgham@apple.com>
316 [XSS Auditor] Off by one in XSSAuditor::canonicalizedSnippetForJavaScript()
317 https://bugs.webkit.org/show_bug.cgi?id=155624
318 <rdar://problem/25219962>
320 Unreviewed merge from Blink (patch by Tom Sepez <tsepez@chromium.org>):
321 <https://src.chromium.org/viewvc/blink?revision=201803&view=revision>
323 Test: http/tests/security/xssAuditor/script-tag-with-trailing-script-and-urlencode.html
325 * html/parser/XSSAuditor.cpp:
326 (WebCore::XSSAuditor::canonicalizedSnippetForJavaScript): Correct off-by-one error.
328 2016-03-17 Zalan Bujtas <zalan@apple.com>
330 Images in feed on ebay.com jiggle when one is hovered
331 https://bugs.webkit.org/show_bug.cgi?id=155608
332 <rdar://problem/25160681>
334 The content offset in compositing layer = subpixel gap between the graphics layer and the layer bounds + layer bounds top left.
336 Reviewed by Simon Fraser.
338 Test: compositing/hidpi-viewport-clipping-on-composited-content.html
340 * rendering/RenderLayerBacking.cpp:
341 (WebCore::RenderLayerBacking::updateGeometry):
342 (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
343 * rendering/RenderLayerBacking.h:
345 2016-03-17 Zalan Bujtas <zalan@apple.com>
347 Don't initiate a style recall while drawing text
348 https://bugs.webkit.org/show_bug.cgi?id=155618
350 Reviewed by Simon Fraser.
352 This patch ensures that we don't initiate a style recalc while in the middle of text drawing.
354 Test: fast/canvas/crash-while-resizing-canvas.html
356 * html/canvas/CanvasRenderingContext2D.cpp:
357 (WebCore::CanvasRenderingContext2D::drawTextInternal):
359 2016-03-17 Commit Queue <commit-queue@webkit.org>
361 Unreviewed, rolling out r198335.
362 https://bugs.webkit.org/show_bug.cgi?id=155617
364 This change caused existing LayoutTests to crash
365 intermittently (Requested by ryan|afk on #webkit).
369 "DataURLDecoder::DecodingResultDispatcher may get deleted
371 https://bugs.webkit.org/show_bug.cgi?id=155584
372 http://trac.webkit.org/changeset/198335
374 2016-03-17 Eric Carlson <eric.carlson@apple.com>
376 Improve some metadata tests
377 https://bugs.webkit.org/show_bug.cgi?id=155616
379 Reviewed by Saam Barati.
381 * html/track/DataCue.cpp:
382 (WebCore::DataCue::DataCue):
383 (WebCore::DataCue::setData):
385 2016-03-17 Myles C. Maxfield <mmaxfield@apple.com>
387 [RTL Scrollbars] Position: absolute divs are covered by vertical scrollbar
388 https://bugs.webkit.org/show_bug.cgi?id=155531
390 Reviewed by Darin Adler.
392 This patch updates ScrollView::documentScrollPositionRelativeToViewOrigin(), which is
393 a helper function primarily used by WebCore::ScrollView::viewToContents() and
394 WebCore::ScrollView::contentsToView().
396 Tests: fast/scrolling/rtl-scrollbars-elementFromPoint-static.html
397 fast/scrolling/rtl-scrollbars-elementFromPoint.html
398 fast/scrolling/rtl-scrollbars-iframe-offset.html
399 fast/scrolling/rtl-scrollbars-iframe-position-absolute.html
400 fast/scrolling/rtl-scrollbars-iframe-scrolled.html
401 fast/scrolling/rtl-scrollbars-iframe.html
402 fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html
403 fast/scrolling/rtl-scrollbars-overflow-position-absolute.html
404 fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled.html
405 fast/scrolling/rtl-scrollbars-position-absolute.html
406 fast/scrolling/rtl-scrollbars-position-fixed.html
407 fast/scrolling/rtl-scrollbars-text-selection-scrolled.html
408 fast/scrolling/rtl-scrollbars-text-selection.html
410 * platform/ScrollView.cpp:
411 (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
413 2016-03-17 Filip Pizlo <fpizlo@apple.com>
415 Replace all of the various non-working and non-compiling sampling profiler hacks with a single super hack
416 https://bugs.webkit.org/show_bug.cgi?id=155561
418 Reviewed by Saam Barati.
420 No new tests because no new behavior.
422 * platform/audio/ios/MediaSessionManagerIOS.mm:
423 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
425 2016-03-17 Brent Fulgham <bfulgham@apple.com>
427 Some media tests are flaky.
428 https://bugs.webkit.org/show_bug.cgi?id=155614
430 Reviewed by Eric Carlson.
432 * html/track/TextTrack.cpp:
433 (WebCore::TextTrack::~TextTrack):
435 2016-03-17 Brady Eidson <beidson@apple.com>
437 Don't try to restore deleted MemoryIndexes if their owning object store is not restored.
438 https://bugs.webkit.org/show_bug.cgi?id=155068
440 Reviewed by Alex Christensen.
442 Test: storage/indexeddb/modern/deleteindex-4-private.html
444 * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
445 (WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
447 2016-03-17 Doug Russell <d_russell@apple.com>
449 AX: attributes to retrieve focusable and editable ancestors
450 https://bugs.webkit.org/show_bug.cgi?id=155554
452 Reviewed by Chris Fleizach.
454 Add attributes to help give context to focus changes:
455 AXFocusableAncestor - nearest accessibility ancestor that returns true for
456 canSetFocusAttribute().
457 AXEditableAncestor - nearest accessibility ancestor that returns true for
459 AXHighestEditableAncestor - highest element in accessibility that returns true
462 Test: accessibility/mac/ancestor-attributes.html
464 * accessibility/AccessibilityNodeObject.cpp:
465 * accessibility/AccessibilityObject.cpp:
466 (WebCore::AccessibilityObject::focusableAncestor):
467 (WebCore::AccessibilityObject::editableAncestor):
468 (WebCore::AccessibilityObject::highestEditableAncestor):
469 * accessibility/AccessibilityObject.h:
470 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
471 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
472 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
474 2016-03-17 Sam Weinig <sam@webkit.org>
476 Implement document.queryCommandSupported("copy")
477 https://bugs.webkit.org/show_bug.cgi?id=155548
478 <rdar://problem/25195295>
480 Reviewed by Enrica Casucci.
482 - document.queryCommandSupported("copy") and document.queryCommandSupported("cut") need
483 to return true if the ClipboardAccessPolicy is either Allow or RequiresUserGesture.
484 But, document.queryCommandEnabled("copy") and document.queryCommandEnabled("cut")
485 should still return false when there is no user gesture. I also had to maintain a weird
486 quirk that copy and cut should be allowed to execute, and thus fire the oncopy and oncut
487 events, even when disabled, if coming from a "MenuOrKeyBinding" source. To do this, I
488 upgraded the allowExecutionWhenDisabled bit to a function taking a source, and return true
489 only when the correct source is specified.
492 * editing/EditorCommand.cpp:
493 (WebCore::defaultValueForSupportedCopyCut):
494 (WebCore::allowCopyCutFromDOM):
495 (WebCore::enabledCopy):
496 (WebCore::enabledCut):
497 (WebCore::allowExecutionWhenDisabled):
498 (WebCore::doNotAllowExecutionWhenDisabled):
499 (WebCore::allowExecutionWhenDisabledCopyCut):
500 (WebCore::Editor::Command::execute):
501 (WebCore::Editor::Command::allowExecutionWhenDisabled):
503 2016-03-17 Antti Koivisto <antti@apple.com>
505 DataURLDecoder::DecodingResultDispatcher may get deleted outside main thread
506 https://bugs.webkit.org/show_bug.cgi?id=155584
507 rdar://problem/24492104
509 Reviewed by Chris Dumez.
511 This is unsafe as it owns strings and other types that are only safe to delete in the main thread.
513 * platform/network/DataURLDecoder.cpp:
514 (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
516 The problem is that this was a refcounted type. This created a race. If the timer fired before dispatch()
517 was exited the implicit deref here would trigger the deletion in the dispatching thread.
519 Fix by getting rid of the unnecessary refcounting. Timer firing will now delete the instance explicitly.
521 (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
522 (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
524 2016-03-17 Commit Queue <commit-queue@webkit.org>
526 Unreviewed, rolling out r198201.
527 https://bugs.webkit.org/show_bug.cgi?id=155585
529 That was not the proper solution (Requested by KaL on
534 "REGRESSION (r197724): [GTK] Web Inspector: Images being
536 https://bugs.webkit.org/show_bug.cgi?id=155432
537 http://trac.webkit.org/changeset/198201
539 2016-03-16 Chris Fleizach <cfleizach@apple.com>
541 AX: Implement AutoFill Available attribute for a text field
542 https://bugs.webkit.org/show_bug.cgi?id=155567
544 Reviewed by Darin Adler.
546 Expose the auto fill buttons to the AX hierarchy.
547 Add an attribute for the textfield to inform when the auto fill button is available.
549 Test: accessibility/auto-fill-types.html
551 * English.lproj/Localizable.strings:
552 * accessibility/AccessibilityObject.cpp:
553 (WebCore::AccessibilityObject::element):
554 (WebCore::AccessibilityObject::isValueAutofillAvailable):
555 (WebCore::AccessibilityObject::isValueAutofilled):
556 * accessibility/AccessibilityObject.h:
557 (WebCore::AccessibilityObject::passwordFieldValue):
558 * accessibility/AccessibilityRenderObject.cpp:
559 (WebCore::AccessibilityRenderObject::addTextFieldChildren):
560 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
561 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
562 * html/TextFieldInputType.cpp:
563 (WebCore::limitLength):
564 (WebCore::autoFillButtonTypeToAccessibilityLabel):
565 (WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
566 (WebCore::TextFieldInputType::createAutoFillButton):
567 (WebCore::TextFieldInputType::updateAutoFillButton):
568 * platform/LocalizedStrings.cpp:
569 (WebCore::AXListItemActionVerb):
570 (WebCore::AXAutoFillCredentialsLabel):
571 (WebCore::AXAutoFillContactsLabel):
572 (WebCore::AXARIAContentGroupText):
573 * platform/LocalizedStrings.h:
575 2016-03-17 Csaba Osztrogonác <ossy@webkit.org>
577 [Mac][cmake] Unreviewed speculative buildfix after r198179. Just for fun.
581 2016-03-17 Youenn Fablet <youenn.fablet@crf.canon.fr>
583 [Fetch API] response-consume.html is crashing on Mac WK1 Debug builds
584 https://bugs.webkit.org/show_bug.cgi?id=155490
586 Reviewed by Darin Adler.
588 Covered by existing tests.
590 Ensured to lock state before calling JSC:JSONParse.
591 Adding fulfillPromiseWithJSON routine to handle it.
592 Applied it to FetchBody.
594 * Modules/fetch/FetchBody.cpp:
595 (WebCore::FetchBody::json):
596 (WebCore::FetchBody::loadedAsText):
597 (WebCore::FetchBody::resolveAsJSON): Deleted.
598 * Modules/fetch/FetchBody.h:
599 * Modules/fetch/FetchBodyOwner.cpp:
600 (WebCore::FetchBodyOwner::loadedBlobAsText):
601 * bindings/js/JSDOMPromise.cpp:
602 (WebCore::parseAsJSON):
603 (WebCore::fulfillPromiseWithJSON):
604 * bindings/js/JSDOMPromise.h:
606 2016-03-17 Adam Bergkvist <adam.bergkvist@ericsson.com>
608 WebRTC: Update RTCIceCandidate
609 https://bugs.webkit.org/show_bug.cgi?id=155535
611 Reviewed by Eric Carlson.
613 Update the RTCIceCandidate constructor procedure to match the WebRTC 1.0 specification [1].
614 In short: The "candidate" init dictionary member is required. At least one of the dictionary
615 members "sdpMid" and "sdpMLine" needs to be present; the corresponding attribute of the
616 other, is initialized to null.
618 [1] https://w3c.github.io/webrtc-pc/archives/20160215/webrtc.html
620 Tests: Updated fast/mediastream/RTCIceCandidate.htm
622 * Modules/mediastream/RTCIceCandidate.cpp:
623 (WebCore::RTCIceCandidate::create):
624 (WebCore::RTCIceCandidate::RTCIceCandidate):
625 * Modules/mediastream/RTCIceCandidate.h:
626 (WebCore::RTCIceCandidate::sdpMLineIndex):
627 (WebCore::RTCIceCandidate::setSdpMLineIndex):
628 * Modules/mediastream/RTCIceCandidate.idl:
629 * bindings/js/JSRTCIceCandidateCustom.cpp:
630 (WebCore::JSRTCIceCandidate::sdpMid):
631 (WebCore::JSRTCIceCandidate::sdpMLineIndex):
633 2016-03-16 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
635 SVG tear offs should return a const reference if possible
636 https://bugs.webkit.org/show_bug.cgi?id=153214
638 Reviewed by Alex Christensen.
640 A smaller change than expected because the returned reference is being copied into a value in additional locations that baseVal and animVal are used.
642 No new tests as there is no change in behaviour.
644 * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
645 * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
646 (WebCore::SVGAnimatedStaticPropertyTearOff::baseVal):
647 (WebCore::SVGAnimatedStaticPropertyTearOff::animVal):
649 2016-03-16 Chris Dumez <cdumez@apple.com>
651 Unreviewed, partial roll out of r197254.
652 <rdar://problem/25078552>
654 It caused a ~1.1% PLT regression on iOS.
656 * loader/FrameLoader.cpp:
657 (WebCore::FrameLoader::commitProvisionalLoad): Deleted.
659 2016-03-16 Enrica Casucci <enrica@apple.com>
661 Recognize mailto and tel url as data detector links.
662 https://bugs.webkit.org/show_bug.cgi?id=155569
663 rdar://problem/24836185
665 Reviewed by Sam Weinig.
667 When we check if the element is a data detector link,
668 we should return true also for URLs with mailto: and tel: scheme.
670 * editing/cocoa/DataDetection.mm:
671 (WebCore::DataDetection::isDataDetectorLink):
673 2016-03-16 Zalan Bujtas <zalan@apple.com>
675 Subpixel rendering: Directly composited image layers need pixelsnapping.
676 https://bugs.webkit.org/show_bug.cgi?id=155558
678 Reviewed by Simon Fraser.
680 In order to match non-composited image size/position, we need to pixelsnap both the contents and the clipping
681 layer bounds for directly composited images.
683 Test: fast/images/hidpi-directly-composited-image-on-subpixel-position.html
685 * rendering/RenderLayerBacking.cpp:
686 (WebCore::RenderLayerBacking::resetContentsRect):
687 (WebCore::RenderLayerBacking::updateChildClippingStrategy):
688 (WebCore::RenderLayerBacking::updateImageContents):
690 2016-03-16 Beth Dakin <bdakin@apple.com>
692 Provide NSSpellChecker spellChecking methods with the current insertion point
693 https://bugs.webkit.org/show_bug.cgi?id=155532
695 rdar://problem/24066952
697 Reviewed by Simon Fraser.
699 Pass the Frame’s selection to a handful of spelling checking methods that
700 call into WebKit/WebKit2 to ultimately call into NSSpellChecker.
701 * accessibility/AccessibilityObject.cpp:
702 (WebCore::AccessibilityObject::hasMisspelling):
703 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
704 (AXAttributeStringSetSpelling):
705 * editing/AlternativeTextController.cpp:
706 (WebCore::AlternativeTextController::timerFired):
707 * editing/Editor.cpp:
708 (WebCore::Editor::guessesForMisspelledWord):
709 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
710 * editing/SpellChecker.cpp:
711 (WebCore::SpellChecker::invokeRequest):
712 (WebCore::SpellChecker::enqueueRequest):
713 * editing/TextCheckingHelper.cpp:
714 (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
715 (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
716 (WebCore::TextCheckingHelper::unifiedTextCheckerEnabled):
717 (WebCore::checkTextOfParagraph):
718 * editing/TextCheckingHelper.h:
719 * loader/EmptyClients.cpp:
720 (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
721 (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
722 * loader/EmptyClients.h:
723 * platform/text/TextCheckerClient.h:
724 (WebCore::TextCheckerClient::~TextCheckerClient):
726 The key needed to include the insertion point.
727 * platform/spi/mac/NSSpellCheckerSPI.h:
729 2016-03-16 Alex Christensen <achristensen@webkit.org>
731 Fix assertion failure on drive.google.com after r196052
732 https://bugs.webkit.org/show_bug.cgi?id=155562
734 Reviewed by Jer Noble.
736 * rendering/RenderGeometryMap.cpp:
737 (WebCore::RenderGeometryMap::mapToContainer):
738 Change float equality check to areEssentiallyEqual.
739 This assertion was failing because rendererMappedResult was (944.335693, 232.047409)
740 but result was (944.335693, 232.047394). They differ by (0, 0.000015).
742 2016-03-16 Nan Wang <n_wang@apple.com>
744 AX: Expose aria-current status to children
745 https://bugs.webkit.org/show_bug.cgi?id=155469
747 Reviewed by Chris Fleizach.
749 Added aria-current to the global ARIA attributes list.
751 Test: accessibility/aria-current-global-attribute.html
753 * accessibility/AccessibilityObject.cpp:
754 (WebCore::AccessibilityObject::supportsARIAAttributes):
756 2016-03-16 Tim Horton <timothy_horton@apple.com>
758 [mac] Printing test snapshots are upside-down after r198242
759 https://bugs.webkit.org/show_bug.cgi?id=155543
761 Reviewed by Simon Fraser.
763 * page/PrintContext.cpp:
764 (WebCore::PrintContext::spoolAllPagesWithBoundaries):
765 Stop PLATFORM(COCOA)-conditionally flipping here. Just paint.
766 This function is only used by the test runners so this doesn't have a
767 huge impact on anything else.
769 2016-03-16 Daniel Bates <dabates@apple.com>
771 Update WebKit Feature Status page to include the status of Content Security Policy Level 2 and Level 3
775 2016-03-16 Daniel Bates <dabates@apple.com>
777 <video> and <audio> elements do not obey Content Security Policy on redirect
778 https://bugs.webkit.org/show_bug.cgi?id=155509
779 <rdar://problem/10234844>
781 Reviewed by Alex Christensen.
783 Fixes an issue where the Content Security Policy of the page was not enforced
784 on redirects when loading a media subresource via an HTML video or HTML audio
787 Tests: http/tests/security/contentSecurityPolicy/audio-redirect-allowed.html
788 http/tests/security/contentSecurityPolicy/audio-redirect-blocked.html
789 http/tests/security/contentSecurityPolicy/font-redirect-allowed.html
790 http/tests/security/contentSecurityPolicy/font-redirect-blocked.html
791 http/tests/security/contentSecurityPolicy/image-redirect-allowed.html
792 http/tests/security/contentSecurityPolicy/image-redirect-blocked.html
793 http/tests/security/contentSecurityPolicy/script-redirect-allowed.html
794 http/tests/security/contentSecurityPolicy/script-redirect-blocked.html
795 http/tests/security/contentSecurityPolicy/stylesheet-redirect-allowed.html
796 http/tests/security/contentSecurityPolicy/stylesheet-redirect-blocked.html
797 http/tests/security/contentSecurityPolicy/svg-font-redirect-allowed.html
798 http/tests/security/contentSecurityPolicy/svg-font-redirect-blocked.html
799 http/tests/security/contentSecurityPolicy/svg-image-redirect-allowed.html
800 http/tests/security/contentSecurityPolicy/svg-image-redirect-blocked.html
801 http/tests/security/contentSecurityPolicy/track-redirect-allowed.html
802 http/tests/security/contentSecurityPolicy/track-redirect-blocked.html
803 http/tests/security/contentSecurityPolicy/video-redirect-allowed.html
804 http/tests/security/contentSecurityPolicy/video-redirect-blocked.html
805 http/tests/security/contentSecurityPolicy/xsl-redirect-allowed.html
806 http/tests/security/contentSecurityPolicy/xsl-redirect-blocked.html
808 * inspector/InspectorPageAgent.cpp:
809 (WebCore::InspectorPageAgent::cachedResourceContent): Treat media resources as raw resources just as we do currently.
810 (WebCore::InspectorPageAgent::cachedResourceType): Ditto.
811 * loader/MediaResourceLoader.cpp:
812 (WebCore::MediaResourceLoader::requestResource): Modified to use CachedResourceLoader::requestMedia() instead
813 of CachedResourceLoader::requestRawResource() so that we can differentiate between a media resource and a raw
814 resource in CachedResourceLoader. Added FIXME comment to skip checking the Content Security Policy for loads
815 initiated by an element in a user agent shadow tree. See <https://bugs.webkit.org/show_bug.cgi?id=155505> for
817 * loader/ResourceLoadInfo.cpp:
818 (WebCore::toResourceType): Treat media resources as raw resources just as we do currently. Also, add cases for
819 CachedResource::LinkPrefetch and CachedResource::LinkSubresource (when ENABLE(LINK_PREFETCH) is enabled) and
820 remove the default statement to force a compile-time error when a new CachedResource enumerator is added and
821 the switch block in this function is not updated.
822 * loader/SubresourceLoader.cpp:
823 (WebCore::logResourceLoaded): Ditto.
824 * loader/cache/CachedRawResource.cpp:
825 (WebCore::CachedRawResource::CachedRawResource): Substitute CachedResource::isMainOrMediaOrRawResource() for
826 CachedResource::isMainOrRawResource() as the latter was renamed to the former.
827 * loader/cache/CachedRawResource.h:
829 * loader/cache/CachedResource.cpp:
830 (WebCore::defaultPriorityForResourceType): Use priority ResourceLoadPriority::Medium for media resources just as
832 * loader/cache/CachedResource.h:
833 (WebCore::CachedResource::isMainOrMediaOrRawResource): Formerly named isMainOrRawResource. Returns true if the type
834 of this resource is a main resource, media resource, or raw resource.
835 (WebCore::CachedResource::isMainOrRawResource): Deleted.
836 * loader/cache/CachedResourceLoader.cpp:
837 (WebCore::createResource): Treat media resources as raw resources just as we do currently.
838 (WebCore::CachedResourceLoader::requestMedia): Added.
839 (WebCore::contentTypeFromResourceType): Consider media resources as MixedContentChecker::ContentType::Active
840 just as we do currently.
841 (WebCore::CachedResourceLoader::checkInsecureContent): Apply the mixed content policy to media resources
842 just as we do currently.
843 (WebCore::CachedResourceLoader::canRequest): Apply the Same Origin Policy to media resources just as we
844 do currently. Query the Content Security Policy of the page to determine if the media resource can be
846 (WebCore::CachedResourceLoader::determineRevalidationPolicy): Substitute CachedResource::isMainOrMediaOrRawResource()
847 for CachedResource::isMainOrRawResource() as the latter was renamed to the former.
848 * loader/cache/CachedResourceLoader.h:
849 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
850 (WebCore::WebCoreAVFResourceLoader::startLoading): Modified to use CachedResourceLoader::requestMedia() instead
851 of CachedResourceLoader::requestRawResource() so that we can differentiate between a media resource and a raw
852 resource in CachedResourceLoader. Added FIXME comment to skip checking the Content Security Policy for loads
853 initiated by an element in a user agent shadow tree. See <https://bugs.webkit.org/show_bug.cgi?id=155505> for
854 more details. Additionally, simplified code that determined whether to request the media resource or error out
855 by coalescing two conditional expressions into one conditional on whether we have a loader and substituted
858 2016-03-16 Chris Dumez <cdumez@apple.com>
860 Unreviewed, rolling out r198235, r198240, r198241, and
863 Causing crashes on ARM
867 "Remove compile time define for SEPARATED_HEAP"
868 https://bugs.webkit.org/show_bug.cgi?id=155508
869 http://trac.webkit.org/changeset/198235
871 "Gardening: build fix after r198235."
872 http://trac.webkit.org/changeset/198240
875 http://trac.webkit.org/changeset/198241
877 "Rename performJITMemcpy to something more inline with our
878 normal webkit function names"
879 https://bugs.webkit.org/show_bug.cgi?id=155525
880 http://trac.webkit.org/changeset/198252
882 2016-03-16 Jiewen Tan <jiewen_tan@apple.com>
884 URL Parsing should signal failure for illegal IDN
885 https://bugs.webkit.org/show_bug.cgi?id=154945
886 <rdar://problem/8014795>
888 Reviewed by Brent Fulgham.
890 WebCore::URL will now invalidate URLs with illegal IDN. And functions inside WebCoreNSURLExtras.h
891 that deal with IDN mapping will now return nil to signal error.
893 Test: fast/url/invalid-idn.html
896 (WebCore::isSchemeFirstChar):
897 (WebCore::URL::init):
898 (WebCore::appendEncodedHostname):
899 (WebCore::encodeHostnames):
900 (WebCore::encodeRelativeString):
901 * platform/mac/WebCoreNSURLExtras.h:
902 * platform/mac/WebCoreNSURLExtras.mm:
903 (WebCore::mapHostNameWithRange):
904 (WebCore::hostNameNeedsDecodingWithRange):
905 (WebCore::hostNameNeedsEncodingWithRange):
906 (WebCore::decodeHostNameWithRange):
907 (WebCore::encodeHostNameWithRange):
908 (WebCore::decodeHostName):
909 (WebCore::encodeHostName):
910 (WebCore::collectRangesThatNeedMapping):
911 (WebCore::mapHostNames):
912 (WebCore::URLWithData):
913 (WebCore::dataWithUserTypedString):
914 (WebCore::URLWithUserTypedString):
915 (WebCore::URLWithUserTypedStringDeprecated):
916 (WebCore::userVisibleString):
918 2016-03-16 Antti Koivisto <antti@apple.com>
920 Don't invalidate style unnecessarily when setting inline style cssText
921 https://bugs.webkit.org/show_bug.cgi?id=155541
922 rdar://problem/23318893
924 Reviewed by Simon Fraser.
926 We currently invalidate style when cssText is set whether the style declaration changed or not.
928 Based on a patch by Simon.
930 Test: fast/css/style-invalidation-inline-csstext.html
932 * css/PropertySetCSSStyleDeclaration.cpp:
933 (WebCore::PropertySetCSSStyleDeclaration::cssText):
934 (WebCore::PropertySetCSSStyleDeclaration::setCssText):
936 Invalidate only if the parsed style changed.
938 * css/StyleProperties.cpp:
939 (WebCore::MutableStyleProperties::parseDeclaration):
941 Compare the original and new style after parsing, return result.
943 * css/StyleProperties.h:
945 2016-03-16 Carlos Garcia Campos <cgarcia@igalia.com>
947 REGRESSION(r195661): [GTK] very slow scrolling
948 https://bugs.webkit.org/show_bug.cgi?id=155334
950 Reviewed by Sergio Villar Senin.
952 Fix smooth scrolling behaviour change after r195661.
954 * platform/ScrollAnimationSmooth.cpp:
955 (WebCore::getAnimationParametersForGranularity): Fix a typo,
956 animationTime for pixel granularity should be 11 * tickTime.
957 (WebCore::ScrollAnimationSmooth::animateScroll): Previous code
958 reset all the data except the visibleLenght, so keep it in the
959 PerAxisData after the reset.
961 2016-03-16 Commit Queue <commit-queue@webkit.org>
963 Unreviewed, rolling out r196803.
964 https://bugs.webkit.org/show_bug.cgi?id=155534
966 Introduced several rendering issues in popular websites
967 (Requested by KaL on #webkit).
971 "[GTK] Limit the number of tiles according to the visible
973 https://bugs.webkit.org/show_bug.cgi?id=126122
974 http://trac.webkit.org/changeset/196803
976 2016-03-15 Zalan Bujtas <zalan@apple.com>
978 Remove overflow: -webkit-marquee
979 https://bugs.webkit.org/show_bug.cgi?id=155517
980 <rdar://problem/25028481>
982 Reviewed by Simon Fraser.
984 This patch is based on Blink patch from jchaffraix@chromium.org (https://src.chromium.org/viewvc/blink?revision=151756&view=revision)
987 (WebCore::isValidKeywordPropertyAndValue):
988 * css/CSSPrimitiveValueMappings.h:
989 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
990 (WebCore::CSSPrimitiveValue::operator EOverflow): Deleted.
991 * css/CSSValueKeywords.in:
992 * css/StyleResolver.cpp:
993 (WebCore::StyleResolver::adjustRenderStyle):
996 * rendering/RenderBox.cpp:
997 (WebCore::RenderBox::sizesLogicalWidthToFitContent):
998 * rendering/RenderLayer.cpp:
999 (WebCore::RenderLayer::scrollTo):
1000 (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1001 (WebCore::RenderLayer::calculateClipRects):
1002 * rendering/RenderLayer.h:
1003 * rendering/RenderMarquee.h:
1004 * rendering/style/RenderStyleConstants.h:
1006 2016-03-15 Joanmarie Diggs <jdiggs@igalia.com>
1008 AX: Expose pointers to SVG elements referenced by aria-labelledby
1009 https://bugs.webkit.org/show_bug.cgi?id=155481
1011 Reviewed by Chris Fleizach.
1013 Expose elements referenced by aria-labelledby via ATK_RELATION_LABELLED_BY.
1014 Stop calling the supportsARIA* methods before getting the elements referred
1015 to by the associated ARIA property in the accessible wrapper for ATK and
1016 the inspector: Getting the elements will be just as fast when there are no
1017 such elements, and faster when there are.
1019 Modified the w3c-svg-name-calculation.html test to include AXTitleUIElement
1022 * accessibility/AccessibilityObject.cpp:
1023 (WebCore::AccessibilityObject::supportsARIAAttributes):
1024 (WebCore::AccessibilityObject::ariaElementsFromAttribute): Added.
1025 (WebCore::AccessibilityObject::ariaControlsElements): Added.
1026 (WebCore::AccessibilityObject::ariaDescribedByElements): Added.
1027 (WebCore::AccessibilityObject::ariaFlowToElements): Added.
1028 (WebCore::AccessibilityObject::ariaLabelledByElements): Added.
1029 (WebCore::AccessibilityObject::ariaOwnsElements): Added.
1030 * accessibility/AccessibilityObject.h:
1031 (WebCore::AccessibilityObject::ariaOwnsElements): No longer virtual.
1032 (WebCore::AccessibilityObject::supportsARIAFlowTo): Deleted.
1033 (WebCore::AccessibilityObject::ariaFlowToElements): No longer virtual.
1034 (WebCore::AccessibilityObject::supportsARIADescribedBy): Deleted.
1035 (WebCore::AccessibilityObject::ariaDescribedByElements): No longer virtual.
1036 (WebCore::AccessibilityObject::supportsARIAControls): Deleted.
1037 (WebCore::AccessibilityObject::ariaControlsElements): No longer virtual.
1038 * accessibility/AccessibilityRenderObject.cpp:
1039 (WebCore::AccessibilityRenderObject::ariaElementsFromAttribute): Moved to AccessibilityObject.
1040 (WebCore::AccessibilityRenderObject::supportsARIAFlowTo): Deleted.
1041 (WebCore::AccessibilityRenderObject::ariaFlowToElements): Moved to AccessibilityObject.
1042 (WebCore::AccessibilityRenderObject::supportsARIADescribedBy): Deleted.
1043 (WebCore::AccessibilityRenderObject::ariaDescribedByElements): Moved to AccessibilityObject.
1044 (WebCore::AccessibilityRenderObject::supportsARIAControls): Deleted.
1045 (WebCore::AccessibilityRenderObject::ariaControlsElements): Moved to AccessibilityObject.
1046 (WebCore::AccessibilityRenderObject::ariaOwnsElements): Moved to AccessibilityObject.
1047 * accessibility/AccessibilityRenderObject.h:
1048 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1049 (setAtkRelationSetFromCoreObject):
1050 * inspector/InspectorDOMAgent.cpp:
1051 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1053 2016-03-15 Simon Fraser <simon.fraser@apple.com>
1055 Occasional crash under GraphicsContext::platformContext when dragging Google maps
1056 https://bugs.webkit.org/show_bug.cgi?id=155521
1057 rdar://problem/24357307
1059 Reviewed by Tim Horton.
1061 It's possible for createDragImageForSelection() to return a null image, if the bounds
1062 of the selection are an empty rect. That would cause a crash under convertImageToBitmap()
1063 because a zero-sized ShareableBitmap will return a null GraphicsContext.
1065 To avoid this, early return from DragController::startDrag() if the dragImage is null.
1067 I wasn't able to come up with a test for this.
1069 * page/DragController.cpp:
1070 (WebCore::DragController::startDrag):
1072 2016-03-15 Tim Horton <timothy_horton@apple.com>
1074 iOS <attachment> element should allow customization of action text color
1075 https://bugs.webkit.org/show_bug.cgi?id=155513
1076 <rdar://problem/24805991>
1078 Reviewed by Simon Fraser.
1080 Test: fast/attachment/attachment-action.html
1084 On iOS (the only place it is used), <attachment> color should default to system blue.
1086 * rendering/RenderThemeIOS.mm:
1087 (WebCore::attachmentActionColor):
1088 (WebCore::AttachmentInfo::AttachmentInfo):
1089 Make use of the <attachment>'s CSS color for the action text.
1090 This is a little weird because there are multiple bits of text in an
1091 <attachment>, but only the action text ever changes color.
1093 2016-03-15 Zalan Bujtas <zalan@apple.com>
1095 Delay HTMLFormControlElement::focus() call until after layout is finished.
1096 https://bugs.webkit.org/show_bug.cgi?id=155503
1097 <rdar://problem/24046635>
1099 Reviewed by Simon Fraser.
1101 Calling focus on a form element can trigger arbitrary JS code which could interfere with
1103 This patch delays HTMLFormControlElement::focus() call until after layout is finished.
1104 If we are currently not in the middle of a layout, HTMLFormControlElement::focus() is delayed until
1105 after style resolution is done.
1107 Covered by LayoutTests/fast/dom/adopt-node-crash-2.html
1109 * accessibility/AccessibilityObject.cpp:
1110 (WebCore::AccessibilityObject::updateBackingStore):
1112 (WebCore::Document::updateStyleIfNeeded):
1113 (WebCore::Document::updateLayout):
1114 (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1115 * html/HTMLEmbedElement.cpp:
1116 (WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin):
1117 * html/HTMLFormControlElement.cpp:
1118 (WebCore::HTMLFormControlElement::didAttachRenderers):
1119 * page/FrameView.cpp:
1120 (WebCore::FrameView::layout):
1121 (WebCore::FrameView::queuePostLayoutCallback):
1122 (WebCore::FrameView::flushPostLayoutTasksQueue):
1123 (WebCore::FrameView::performPostLayoutTasks):
1124 (WebCore::FrameView::sendResizeEventIfNeeded):
1126 * rendering/RenderBox.cpp:
1127 (WebCore::RenderBox::imageChanged):
1128 * rendering/RenderLayer.cpp:
1129 (WebCore::RenderLayer::scrollTo):
1131 2016-03-15 Oliver Hunt <oliver@apple.com>
1133 Remove compile time define for SEPARATED_HEAP
1134 https://bugs.webkit.org/show_bug.cgi?id=155508
1136 Reviewed by Mark Lam.
1138 Remove the feature define.
1140 * Configurations/FeatureDefines.xcconfig:
1142 2016-03-15 Chris Dumez <cdumez@apple.com>
1144 Restore pre-r197244 behavior on Mac
1145 https://bugs.webkit.org/show_bug.cgi?id=155507
1146 <rdar://problem/25174132>
1148 Reviewed by Gavin Barraclough.
1150 <http://trac.webkit.org/changeset/197244> changed the session restore
1151 behavior to disallow stale content on all platforms except iOS.
1152 We would also like to maintain the behavior on Mac for performance
1153 reasons and consistency between iOS and Mac.
1155 * loader/FrameLoader.cpp:
1156 (WebCore::FrameLoader::loadDifferentDocumentItem):
1158 2016-03-15 Tim Horton <timothy_horton@apple.com>
1160 <attachment> on iOS isn't quite vertically centered
1161 https://bugs.webkit.org/show_bug.cgi?id=155502
1162 <rdar://problem/24805991>
1164 Reviewed by Beth Dakin.
1166 No new tests; there are existing tests that will be enabled shortly.
1168 * rendering/RenderThemeIOS.mm:
1169 (WebCore::AttachmentInfo::AttachmentInfo):
1170 We were overcounting the total height of the attachment content by one margin, because each item
1171 would add in its margin, including the last one. Remove one margin.
1173 2016-03-15 Chris Fleizach <cfleizach@apple.com>
1175 AX: certain elements not included in accessibility tree
1176 https://bugs.webkit.org/show_bug.cgi?id=155480
1178 Reviewed by Beth Dakin.
1180 This test case exposed a hole in the nextSibling logic where you can get into a state where we skip content.
1181 The fix is to check if an inline element continuation has no sibling, to fall back on to the parent case to see if that has a sibling.
1183 Test: accessibility/double-nested-inline-element-missing-from-tree.html
1185 * accessibility/AccessibilityRenderObject.cpp:
1186 (WebCore::AccessibilityRenderObject::nextSibling):
1188 2016-03-15 Chris Dumez <cdumez@apple.com>
1190 Unreviewed, rolling out r198203.
1192 Favorites view is no longer loading on iOS
1196 "URL Parsing should signal failure for illegal IDN"
1197 https://bugs.webkit.org/show_bug.cgi?id=154945
1198 http://trac.webkit.org/changeset/198203
1200 2016-03-15 Tim Horton <timothy_horton@apple.com>
1202 <attachment> on iOS should use short and emphasized fonts
1203 https://bugs.webkit.org/show_bug.cgi?id=155485
1204 <rdar://problem/24805991>
1206 Reviewed by Simon Fraser.
1208 No new tests; there are existing tests that will be enabled shortly.
1210 * rendering/RenderThemeIOS.mm:
1211 (WebCore::attachmentActionFont):
1212 (WebCore::attachmentTitleFont):
1213 (WebCore::attachmentSubtitleFont):
1214 (WebCore::AttachmentInfo::buildTitleLines):
1215 (WebCore::AttachmentInfo::buildSingleLine):
1216 (WebCore::AttachmentInfo::AttachmentInfo):
1217 No need for UIFonts, we can use CoreText, and that allows us to ask for the
1218 correct Short and Emphasized variants that we need.
1220 2016-03-15 Antti Koivisto <antti@apple.com>
1222 REGRESSION (196383): Class change invalidation does not handle :not correctly
1223 https://bugs.webkit.org/show_bug.cgi?id=155493
1224 <rdar://problem/24846762>
1226 Reviewed by Andreas Kling.
1228 We fail to invalidate bar style in
1232 when class foo is added or removed.
1234 There is a logic error in the invalidation code. It assumes that class addition can only make new selectors match
1235 and removal make them not match. This is not true when :not is present.
1237 * style/AttributeChangeInvalidation.h:
1238 (WebCore::Style::AttributeChangeInvalidation::AttributeChangeInvalidation):
1239 * style/ClassChangeInvalidation.cpp:
1240 (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
1242 Invalidate style and collect full set of rules that may affect descendant style.
1244 (WebCore::Style::ClassChangeInvalidation::invalidateDescendantStyle):
1246 Invalidate with this set both before and after committing the changes.
1248 (WebCore::Style::ClassChangeInvalidation::computeClassChange): Deleted.
1249 * style/ClassChangeInvalidation.h:
1250 (WebCore::Style::ClassChangeInvalidation::ClassChangeInvalidation):
1251 (WebCore::Style::ClassChangeInvalidation::~ClassChangeInvalidation):
1253 2016-03-14 Jer Noble <jer.noble@apple.com>
1255 Video elements with autoplay do not begin playing when scrolling into view if InvisibleAutoplayNotPermitted is set.
1256 https://bugs.webkit.org/show_bug.cgi?id=155468
1258 Reviewed by Eric Carlson.
1260 Test: media/video-restricted-invisible-autoplay-allowed-when-visible.html
1262 A few bugs came together to cause this behavior. We were not telling the media session that we were going to begin
1263 the autoplaying state, we were not restoring the correct state when the interruption ended, and we were not checking
1264 to see if we could actually play correctly when the interruption ended.
1266 * html/HTMLMediaElement.cpp:
1267 (WebCore::HTMLMediaElement::prepareForLoad):
1268 (WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay):
1269 (WebCore::HTMLMediaElement::setReadyState):
1270 (WebCore::HTMLMediaElement::resumeAutoplaying):
1271 (WebCore::HTMLMediaElement::updateShouldPlay):
1272 (WebCore::elementCanTransitionFromAutoplayToPlay): Deleted.
1273 * html/HTMLMediaElement.h:
1274 * platform/audio/PlatformMediaSession.cpp:
1275 (WebCore::PlatformMediaSession::endInterruption):
1277 2016-03-15 Manuel Rego Casasnovas <rego@igalia.com>
1279 [css-grid] Rename GridCoordinate to GridArea
1280 https://bugs.webkit.org/show_bug.cgi?id=155489
1282 Reviewed by Sergio Villar Senin.
1284 As the comment in GridCoordinate states,
1285 it actually represents a grid area as it stores
1286 the initial and final positions in both axis (columns and rows).
1288 Someone can think about a grid coordinate just like a single cell.
1289 However this class was representing an area of several cells.
1291 On top of that the "grid area" concept is defined in the spec:
1292 https://drafts.csswg.org/css-grid/#grid-area-concept
1294 No new tests, no change of behavior.
1296 * WebCore.xcodeproj/project.pbxproj:
1297 * css/CSSGridTemplateAreasValue.cpp:
1298 (WebCore::stringForPosition):
1299 * css/CSSGridTemplateAreasValue.h:
1300 * css/CSSParser.cpp:
1301 (WebCore::CSSParser::parseGridTemplateAreasRow):
1303 * rendering/RenderGrid.cpp:
1304 (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
1305 (WebCore::RenderGrid::insertItemIntoGrid):
1306 (WebCore::RenderGrid::placeItemsOnGrid):
1307 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
1308 (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
1309 (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
1310 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
1311 (WebCore::RenderGrid::clearGrid):
1312 (WebCore::RenderGrid::cachedGridArea):
1313 (WebCore::RenderGrid::cachedGridSpan):
1314 * rendering/RenderGrid.h:
1315 * rendering/style/GridArea.h: Renamed from Source/WebCore/rendering/style/GridCoordinate.h.
1316 (WebCore::GridSpan::untranslatedDefiniteGridSpan):
1317 (WebCore::GridSpan::translatedDefiniteGridSpan):
1318 (WebCore::GridSpan::indefiniteGridSpan):
1319 (WebCore::GridSpan::operator==):
1320 (WebCore::GridSpan::integerSpan):
1321 (WebCore::GridSpan::untranslatedResolvedInitialPosition):
1322 (WebCore::GridSpan::untranslatedResolvedFinalPosition):
1323 (WebCore::GridSpan::resolvedInitialPosition):
1324 (WebCore::GridSpan::resolvedFinalPosition):
1325 (WebCore::GridSpan::GridSpanIterator::GridSpanIterator):
1326 (WebCore::GridSpan::GridSpanIterator::operator unsigned&):
1327 (WebCore::GridSpan::GridSpanIterator::operator*):
1328 (WebCore::GridSpan::begin):
1329 (WebCore::GridSpan::end):
1330 (WebCore::GridSpan::isTranslatedDefinite):
1331 (WebCore::GridSpan::isIndefinite):
1332 (WebCore::GridSpan::translate):
1333 (WebCore::GridSpan::GridSpan):
1334 (WebCore::GridArea::GridArea):
1335 (WebCore::GridArea::operator==):
1336 (WebCore::GridArea::operator!=):
1337 * rendering/style/GridPositionsResolver.cpp:
1338 * rendering/style/StyleGridData.h:
1340 2016-03-15 Joonghun Park <jh718.park@samsung.com>
1342 [GTK] Remove duplicate HashMap traversal and unneeded reference count churn in DataObjectGtk::forClipboard
1343 https://bugs.webkit.org/show_bug.cgi?id=155470
1345 Reviewed by Carlos Garcia Campos.
1347 No new tests, no new behaviours.
1349 * platform/gtk/DataObjectGtk.cpp:
1350 (WebCore::DataObjectGtk::forClipboard):
1352 2016-03-15 Manuel Rego Casasnovas <rego@igalia.com>
1354 [css-grid] Rename GridResolvedPosition to GridPositionsResolver
1355 https://bugs.webkit.org/show_bug.cgi?id=155486
1357 Reviewed by Sergio Villar Senin.
1359 GridResolvedPosition is not storing a position (track or line) anymore.
1360 Currently it's just a class wrapping the methods to resolve
1361 grid positions from style.
1362 Renamed the class to avoid confusions.
1364 No new tests, no change of behavior.
1367 * WebCore.xcodeproj/project.pbxproj:
1368 * rendering/RenderGrid.cpp:
1369 (WebCore::RenderGrid::placeItemsOnGrid):
1370 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
1371 (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
1372 (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
1373 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
1374 (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
1375 * rendering/RenderGrid.h:
1376 * rendering/style/GridCoordinate.h:
1377 * rendering/style/GridPositionsResolver.cpp: Renamed from Source/WebCore/rendering/style/GridResolvedPosition.cpp.
1378 (WebCore::isColumnSide):
1379 (WebCore::isStartSide):
1380 (WebCore::initialPositionSide):
1381 (WebCore::finalPositionSide):
1382 (WebCore::gridLinesForSide):
1383 (WebCore::implicitNamedGridLineForSide):
1384 (WebCore::GridPositionsResolver::isNonExistentNamedLineOrArea):
1385 (WebCore::adjustGridPositionsFromStyle):
1386 (WebCore::GridPositionsResolver::explicitGridColumnCount):
1387 (WebCore::GridPositionsResolver::explicitGridRowCount):
1388 (WebCore::explicitGridSizeForSide):
1389 (WebCore::lookAheadForNamedGridLine):
1390 (WebCore::lookBackForNamedGridLine):
1391 (WebCore::resolveNamedGridLinePositionFromStyle):
1392 (WebCore::definiteGridSpanWithNamedLineSpanAgainstOpposite):
1393 (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
1394 (WebCore::resolveGridPositionAgainstOppositePosition):
1395 (WebCore::GridPositionsResolver::spanSizeForAutoPlacedItem):
1396 (WebCore::resolveGridPositionFromStyle):
1397 (WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
1398 * rendering/style/GridPositionsResolver.h: Renamed from Source/WebCore/rendering/style/GridResolvedPosition.h.
1399 * rendering/style/StyleAllInOne.cpp:
1401 2016-03-15 Miguel Gomez <magomez@igalia.com>
1403 Leak: Accelerated ImageBufferCairo doesn't destroy the used textures
1404 https://bugs.webkit.org/show_bug.cgi?id=155431
1406 Reviewed by Žan Doberšek.
1408 When using the Cairo backend, add a destructor to ImageBufferData and use it to destroy the
1409 textures created if the buffer is being accelerated.
1411 No new tests, already covered by existing ones.
1413 * platform/graphics/cairo/ImageBufferCairo.cpp:
1414 (WebCore::ImageBufferData::ImageBufferData):
1415 Store the renderingMode flag.
1416 (WebCore::ImageBufferData::~ImageBufferData):
1417 Destroy gl resources if renderingMode is accelerated.
1418 (WebCore::ImageBuffer::ImageBuffer):
1419 Pass renderingMode to the data class and use it fro checks instead of the function parameter.
1420 * platform/graphics/cairo/ImageBufferDataCairo.h:
1421 Add destructor and a renderingMode flag.
1423 2016-03-15 Jiewen Tan <jiewen_tan@apple.com>
1425 URL Parsing should signal failure for illegal IDN
1426 https://bugs.webkit.org/show_bug.cgi?id=154945
1427 <rdar://problem/8014795>
1429 Reviewed by Brent Fulgham.
1431 WebCore::URL will now invalidate URLs with illegal IDN. And functions inside WebCoreNSURLExtras.h
1432 that deal with IDN mapping will now return nil to signal error.
1434 Test: fast/url/invalid-idn.html
1437 (WebCore::isSchemeFirstChar):
1438 (WebCore::URL::init):
1439 (WebCore::appendEncodedHostname):
1440 (WebCore::encodeHostnames):
1441 (WebCore::encodeRelativeString):
1442 * platform/mac/WebCoreNSURLExtras.h:
1443 * platform/mac/WebCoreNSURLExtras.mm:
1444 (WebCore::mapHostNameWithRange):
1445 (WebCore::hostNameNeedsDecodingWithRange):
1446 (WebCore::hostNameNeedsEncodingWithRange):
1447 (WebCore::decodeHostNameWithRange):
1448 (WebCore::encodeHostNameWithRange):
1449 (WebCore::decodeHostName):
1450 (WebCore::encodeHostName):
1451 (WebCore::collectRangesThatNeedMapping):
1452 (WebCore::mapHostNames):
1453 (WebCore::URLWithData):
1454 (WebCore::dataWithUserTypedString):
1455 (WebCore::URLWithUserTypedString):
1456 (WebCore::URLWithUserTypedStringDeprecated):
1457 (WebCore::userVisibleString):
1459 2016-03-15 Carlos Garcia Campos <cgarcia@igalia.com>
1461 REGRESSION (r197724): [GTK] Web Inspector: Images being blocked by CSP 2.0
1462 https://bugs.webkit.org/show_bug.cgi?id=155432
1464 Reviewed by Darin Adler.
1466 The GTK+ port Web Inspector uses GResources for all internal
1467 resources (images, fonts, scripts, etc.) that are now blocked by
1468 the CSP. GResouces are like data URLs in practice, so we should
1471 * page/csp/ContentSecurityPolicySourceList.cpp:
1472 (WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar):
1474 2016-03-14 Alex Christensen <achristensen@webkit.org>
1476 Fix WinCairo build after r198195.
1478 * platform/network/NetworkingContext.h:
1479 curl networking now uses NetworkingContext::storageSession. That's everybody!
1481 2016-03-14 Per Arne Vollan <peavo@outlook.com>
1483 [WinCairo] Compile fix.
1484 https://bugs.webkit.org/show_bug.cgi?id=155463
1486 Reviewed by Alex Christensen.
1488 Get the NetworkStorageSession object from the document in the same way as other platforms do.
1490 * loader/CookieJar.cpp:
1491 (WebCore::storageSession):
1493 2016-03-14 Tim Horton <timothy_horton@apple.com>
1495 <attachment> on iOS should paint its progress indicator instead of a green square
1496 https://bugs.webkit.org/show_bug.cgi?id=155482
1497 <rdar://problem/24805991>
1499 Reviewed by Simon Fraser.
1501 No new tests; there are existing tests that will be enabled shortly.
1503 * rendering/RenderThemeIOS.mm:
1504 (WebCore::getAttachmentProgress):
1505 Clamp progress to 0-1.
1507 (WebCore::paintAttachmentProgress):
1510 2016-03-14 Chris Dumez <cdumez@apple.com>
1512 Unreviewed, rolling out r197981.
1514 Caused a massive PLT regression on Mac.
1518 "Font antialiasing (smoothing) changes when elements are
1519 rendered into compositing layers"
1520 https://bugs.webkit.org/show_bug.cgi?id=23364
1521 http://trac.webkit.org/changeset/197981
1523 2016-03-14 Chris Dumez <cdumez@apple.com>
1525 Unreviewed, rolling out r198145.
1527 This attempt to disable the feature did not fix the PLT
1532 "Regression(r197981): Huge regression on Mac PLT"
1533 https://bugs.webkit.org/show_bug.cgi?id=155443
1534 http://trac.webkit.org/changeset/198145
1536 2016-03-14 Sam Weinig <sam@webkit.org>
1538 Remove errant space.
1540 * page/UserContentController.cpp:
1542 2016-03-14 Sam Weinig <sam@webkit.org>
1544 Fix the windows build.
1546 * page/UserContentController.cpp:
1548 2016-03-14 Sam Weinig <sam@webkit.org>
1550 Add a baseURL parameter to _WKUserStyleSheet
1551 https://bugs.webkit.org/show_bug.cgi?id=155219
1553 Reviewed by Tim Horton.
1555 - Moves to a model for user content where instead of each page having a WebCore::UserContentController
1556 object, we have an abstract WebCore::UserContentProvider interface that can be implemented at the WebKit
1557 level. For now, legacy WebKit continues to use the old UserContentController, which implements
1558 WebCore::UserContentProvider, and WebKit2 implements its own implementation so it can store additional
1561 * WebCore.xcodeproj/project.pbxproj:
1564 * dom/ExtensionStyleSheets.cpp:
1565 (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):
1566 Switch to using forEachUserStyleSheet on the UserContentProvider.
1568 * html/HTMLMediaElement.cpp:
1569 (WebCore::HTMLMediaElement::loadResource):
1570 Remove null check now that we always have a UserContentProvider.
1572 * loader/EmptyClients.cpp:
1573 (WebCore::fillWithEmptyClients):
1574 * loader/EmptyClients.h:
1575 Add new EmptyClients.
1577 * loader/FrameLoader.cpp:
1578 (WebCore::FrameLoader::loadResourceSynchronously):
1579 Remove null check now that we always have a UserContentProvider.
1581 * loader/PingLoader.cpp:
1582 (WebCore::processContentExtensionRulesForLoad):
1583 Remove null check now that we always have a UserContentProvider.
1585 * loader/ResourceLoader.cpp:
1586 (WebCore::ResourceLoader::willSendRequestInternal):
1587 Remove null check now that we always have a UserContentProvider.
1589 * loader/cache/CachedResourceLoader.cpp:
1590 (WebCore::CachedResourceLoader::requestResource):
1591 Remove null check now that we always have a UserContentProvider.
1593 * page/DOMWindow.cpp:
1594 (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
1595 Remove null checks now that we always have a UserContentProvider, and userMessageHandlerDescriptors
1596 returns a reference.
1598 (WebCore::DOMWindow::open):
1599 Remove null check now that we always have a UserContentProvider.
1602 (WebCore::Frame::injectUserScripts):
1603 Simplify by lifting document check out of the main loop and using forEachUserScript.
1606 (WebCore::Page::Page):
1607 (WebCore::Page::~Page):
1608 (WebCore::Page::userContentProvider):
1609 (WebCore::Page::setUserContentProvider):
1610 (WebCore::Page::setUserContentController): Deleted.
1612 (WebCore::Page::userContentController): Deleted.
1613 * page/PageConfiguration.h:
1614 Store the UserContentProvider in a Ref, and require PageConfigurations to provide one. This
1615 removes a bunch of null checks and simplifies the code.
1617 * page/UserContentController.cpp:
1618 (WebCore::UserContentController::~UserContentController):
1619 (WebCore::UserContentController::forEachUserScript):
1620 (WebCore::UserContentController::forEachUserStyleSheet):
1621 (WebCore::UserContentController::addUserScript):
1622 (WebCore::UserContentController::removeUserScript):
1623 (WebCore::UserContentController::removeUserScripts):
1624 (WebCore::UserContentController::addUserStyleSheet):
1625 (WebCore::UserContentController::removeUserStyleSheet):
1626 (WebCore::UserContentController::removeUserStyleSheets):
1627 (WebCore::UserContentController::addUserMessageHandlerDescriptor):
1628 (WebCore::UserContentController::removeUserMessageHandlerDescriptor):
1629 (WebCore::UserContentController::addUserContentExtension):
1630 (WebCore::UserContentController::removeUserContentExtension):
1631 (WebCore::UserContentController::removeAllUserContentExtensions):
1632 (WebCore::UserContentController::removeAllUserContent):
1633 (WebCore::UserContentController::addPage): Deleted.
1634 (WebCore::UserContentController::removePage): Deleted.
1635 (WebCore::contentExtensionsEnabled): Deleted.
1636 (WebCore::UserContentController::processContentExtensionRulesForLoad): Deleted.
1637 (WebCore::UserContentController::actionsForResourceLoad): Deleted.
1638 * page/UserContentController.h:
1639 (WebCore::UserContentController::userScripts): Deleted.
1640 (WebCore::UserContentController::userStyleSheets): Deleted.
1641 (WebCore::UserContentController::userMessageHandlerDescriptors): Deleted.
1642 Add inheritance from UserContentProvider and simplify things by removing unique_ptrs
1643 that were holding the member variables. There is usually only one UserContentController
1644 so having these in unique_ptrs doesn't make much sense.
1646 * page/UserContentProvider.cpp: Added.
1647 (WebCore::UserContentProvider::UserContentProvider):
1648 (WebCore::UserContentProvider::~UserContentProvider):
1649 (WebCore::UserContentProvider::addPage):
1650 (WebCore::UserContentProvider::removePage):
1651 (WebCore::UserContentProvider::invalidateInjectedStyleSheetCacheInAllFramesInAllPages):
1652 (WebCore::contentExtensionsEnabled):
1653 (WebCore::UserContentProvider::processContentExtensionRulesForLoad):
1654 (WebCore::UserContentProvider::actionsForResourceLoad):
1655 * page/UserContentProvider.h: Added.
1656 Add abstract class for providing user content and add some helpers on it.
1658 * page/UserMessageHandlerDescriptor.h:
1659 (WebCore::UserMessageHandlerDescriptor::create):
1660 (WebCore::UserMessageHandlerDescriptor::client):
1661 (WebCore::UserMessageHandlerDescriptor::invalidateClient):
1662 * page/UserMessageHandlersNamespace.cpp:
1663 (WebCore::UserMessageHandlersNamespace::handler):
1664 Simplify now that userContentProvider() and userMessageHandlerDescriptors() are references.
1666 2016-03-14 Enrica Casucci <enrica@apple.com>
1668 iOS: RTFD format is not available in the pasteboard after copy/cut.
1669 https://bugs.webkit.org/show_bug.cgi?id=155477
1670 rdar://problem/23500600
1672 Reviewed by Tim Horton.
1674 WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the
1675 proper RTFD format for pastedboard. I also discovered that, when
1676 we create the NSTextAttachment in the NSAttributedString we produce
1677 from the DOM range, we are not generating a file name with the
1678 appropriate extension for the MIME type. The iOS specific implementation
1679 of the MIMETypeRegistry functions were empty.
1680 There is no need to have a differentiation between OS X and iOS, so
1681 we now have only one file called MIMETypeRegistryCocoa.mm.
1683 * WebCore.xcodeproj/project.pbxproj:
1684 * platform/cocoa/MIMETypeRegistryCocoa.mm: Added.
1685 (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
1686 (WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
1687 (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
1688 (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
1689 * platform/ios/MIMETypeRegistryIOS.mm: Removed.
1690 * platform/ios/PasteboardIOS.mm:
1691 (WebCore::Pasteboard::read):
1692 (WebCore::Pasteboard::supportedPasteboardTypes):
1693 (WebCore::Pasteboard::hasData):
1694 * platform/ios/PlatformPasteboardIOS.mm:
1695 (WebCore::PlatformPasteboard::write):
1696 * platform/mac/MIMETypeRegistryMac.mm: Removed.
1698 2016-03-14 Daniel Bates <dabates@apple.com>
1700 Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements
1701 https://bugs.webkit.org/show_bug.cgi?id=155466
1702 <rdar://problem/25152480>
1704 Reviewed by Joseph Pecoraro and Timothy Hatcher.
1706 For convenience, display the SHA-256 Content Security Policy (CSP) hash in the node details
1707 sidebar for the selected HTML script element or HTML style element. A CSP script hash is
1708 only applicable to inline JavaScript scripts. Therefore, we will display a hash for HTML
1709 script elements only if they do not have a src attribute.
1711 Tests: inspector/dom/csp-big5-hash.html
1712 inspector/dom/csp-hash.html
1714 * inspector/InspectorDOMAgent.cpp:
1715 (WebCore::computeContentSecurityPolicySHA256Hash): Added.
1716 (WebCore::InspectorDOMAgent::buildObjectForNode): For an applicable HTML script- or style-
1717 element, pass the computed SHA-256 CSP hash to the Inspector front end.
1719 2016-03-14 Joonghun Park <jh718.park@samsung.com>
1721 Purge PassRefPtr from ArrayBuffer, ArchiveResource, Pasteboard, LegacyWebArchive and DataObjectGtk
1722 https://bugs.webkit.org/show_bug.cgi?id=150497
1724 Reviewed by Darin Adler.
1726 No new tests, no new behaviours.
1728 * Modules/indexeddb/IDBGetResult.h:
1729 (WebCore::IDBGetResult::IDBGetResult):
1730 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1731 (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
1732 * Modules/mediastream/RTCDataChannel.cpp:
1733 (WebCore::RTCDataChannel::didReceiveRawData):
1734 * dom/MessageEvent.cpp:
1735 (WebCore::MessageEvent::MessageEvent):
1736 * dom/MessageEvent.h:
1737 * editing/Editor.cpp:
1738 (WebCore::Editor::selectedRange):
1740 * editing/FrameSelection.h:
1741 (WebCore::FrameSelection::toNormalizedRange):
1742 * editing/VisiblePosition.cpp:
1743 (WebCore::makeRange):
1744 * editing/VisiblePosition.h:
1745 * editing/VisibleSelection.cpp:
1746 (WebCore::VisibleSelection::toNormalizedRange):
1747 * editing/VisibleSelection.h:
1748 * editing/VisibleUnits.cpp:
1749 (WebCore::enclosingTextUnitOfGranularity):
1750 (WebCore::wordRangeFromPosition):
1751 (WebCore::rangeExpandedByCharactersInDirectionAtWordBoundary):
1752 (WebCore::rangeExpandedAroundPositionByCharacters):
1753 * editing/VisibleUnits.h:
1754 * editing/cocoa/HTMLConverter.mm:
1755 (HTMLConverter::_addAttachmentForElement):
1756 (fileWrapperForURL):
1757 * editing/efl/EditorEfl.cpp:
1758 (WebCore::Editor::webContentFromPasteboard):
1759 * editing/gtk/EditorGtk.cpp:
1760 (WebCore::createFragmentFromPasteboardData):
1761 (WebCore::Editor::webContentFromPasteboard):
1762 * editing/ios/EditorIOS.mm:
1763 (WebCore::dataInRTFDFormat):
1764 (WebCore::dataInRTFFormat):
1765 (WebCore::Editor::selectionInWebArchiveFormat):
1766 (WebCore::Editor::WebContentReader::addFragment):
1767 (WebCore::Editor::WebContentReader::readWebArchive):
1768 (WebCore::Editor::WebContentReader::readRTFD):
1769 (WebCore::Editor::WebContentReader::readRTF):
1770 (WebCore::Editor::WebContentReader::readImage):
1771 (WebCore::Editor::WebContentReader::readURL):
1772 (WebCore::Editor::webContentFromPasteboard):
1773 (WebCore::Editor::pasteWithPasteboard):
1774 (WebCore::Editor::createFragmentAndAddResources):
1775 (WebCore::Editor::createFragmentForImageResourceAndAddResource):
1776 * editing/mac/EditorMac.mm:
1777 (WebCore::Editor::selectionInWebArchiveFormat):
1778 (WebCore::Editor::adjustedSelectionRange):
1779 (WebCore::dataInRTFDFormat):
1780 (WebCore::dataInRTFFormat):
1781 (WebCore::Editor::dataSelectionForPasteboard):
1782 (WebCore::Editor::WebContentReader::readWebArchive):
1783 (WebCore::Editor::WebContentReader::readRTFD):
1784 (WebCore::Editor::WebContentReader::readRTF):
1785 (WebCore::Editor::WebContentReader::readImage):
1786 (WebCore::Editor::WebContentReader::readURL):
1787 (WebCore::Editor::webContentFromPasteboard):
1788 (WebCore::Editor::createFragmentForImageResourceAndAddResource):
1789 (WebCore::Editor::createFragmentAndAddResources):
1790 * editing/win/EditorWin.cpp:
1791 (WebCore::createFragmentFromPlatformData):
1792 (WebCore::Editor::webContentFromPasteboard):
1793 * inspector/InspectorPageAgent.cpp:
1794 (WebCore::InspectorPageAgent::archive):
1795 * loader/DocumentLoader.cpp:
1796 (WebCore::DocumentLoader::mainResourceData):
1797 (WebCore::DocumentLoader::maybeCreateArchive):
1798 (WebCore::DocumentLoader::addArchiveResource):
1799 (WebCore::DocumentLoader::mainResource):
1800 * loader/DocumentLoader.h:
1801 * loader/FrameLoader.cpp:
1802 (WebCore::FrameLoader::loadArchive):
1803 * loader/SubstituteData.h:
1804 (WebCore::SubstituteData::SubstituteData):
1805 (WebCore::SubstituteData::isValid):
1806 * loader/SubstituteResource.h:
1807 (WebCore::SubstituteResource::data):
1808 (WebCore::SubstituteResource::SubstituteResource):
1809 * loader/appcache/ApplicationCacheGroup.cpp:
1810 (WebCore::ApplicationCacheGroup::didReceiveResponse):
1811 (WebCore::ApplicationCacheGroup::didReceiveData):
1812 (WebCore::ApplicationCacheGroup::didFail):
1813 (WebCore::ApplicationCacheGroup::didReceiveManifestData):
1814 (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
1815 * loader/appcache/ApplicationCacheHost.cpp:
1816 (WebCore::ApplicationCacheHost::maybeLoadMainResource):
1817 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1818 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
1819 * loader/appcache/ApplicationCacheResource.cpp:
1820 (WebCore::ApplicationCacheResource::ApplicationCacheResource):
1821 (WebCore::ApplicationCacheResource::deliver):
1822 (WebCore::ApplicationCacheResource::estimatedSizeInStorage):
1823 * loader/appcache/ApplicationCacheResource.h:
1824 (WebCore::ApplicationCacheResource::create):
1825 * loader/appcache/ApplicationCacheStorage.cpp:
1826 (WebCore::ApplicationCacheStorage::store):
1827 (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):
1828 * loader/appcache/ApplicationCacheStorage.h:
1829 * loader/archive/ArchiveFactory.cpp:
1830 (WebCore::archiveFactoryCreate):
1831 (WebCore::ArchiveFactory::create):
1832 * loader/archive/ArchiveFactory.h:
1833 * loader/archive/ArchiveResource.cpp:
1834 (WebCore::ArchiveResource::ArchiveResource):
1835 (WebCore::ArchiveResource::create):
1836 * loader/archive/ArchiveResource.h:
1837 * loader/archive/ArchiveResourceCollection.cpp:
1838 (WebCore::ArchiveResourceCollection::addResource):
1839 * loader/archive/ArchiveResourceCollection.h:
1840 * loader/archive/cf/LegacyWebArchive.cpp:
1841 (WebCore::LegacyWebArchive::createPropertyListRepresentation):
1842 (WebCore::LegacyWebArchive::createResource):
1843 (WebCore::LegacyWebArchive::create):
1844 (WebCore::LegacyWebArchive::createFromSelection):
1845 * loader/archive/cf/LegacyWebArchive.h:
1846 * loader/archive/mhtml/MHTMLArchive.cpp:
1847 (WebCore::MHTMLArchive::create):
1848 * loader/archive/mhtml/MHTMLArchive.h:
1849 * loader/archive/mhtml/MHTMLParser.cpp:
1850 (WebCore::MHTMLParser::parseArchive):
1851 (WebCore::MHTMLParser::parseArchiveWithHeader):
1852 (WebCore::MHTMLParser::parseNextPart):
1853 * loader/archive/mhtml/MHTMLParser.h:
1854 * loader/cache/CachedImage.cpp:
1855 (WebCore::CachedImage::didAddClient):
1856 * loader/icon/IconDatabase.cpp:
1857 (WebCore::loadDefaultIconRecord):
1858 * loader/icon/IconRecord.cpp:
1859 (WebCore::IconRecord::setImageData):
1860 * loader/icon/IconRecord.h:
1861 * platform/Pasteboard.h:
1862 * platform/PasteboardStrategy.h:
1863 * platform/PlatformPasteboard.h:
1864 * platform/SharedBuffer.cpp:
1865 (WebCore::SharedBuffer::createArrayBuffer):
1866 (WebCore::utf8Buffer):
1867 * platform/SharedBuffer.h:
1868 (WebCore::SharedBuffer::create):
1869 * platform/cf/SharedBufferCF.cpp:
1870 (WebCore::SharedBuffer::wrapCFData):
1871 * platform/cocoa/NetworkExtensionContentFilter.mm:
1872 (WebCore::NetworkExtensionContentFilter::replacementData):
1873 * platform/cocoa/ParentalControlsContentFilter.mm:
1874 (WebCore::ParentalControlsContentFilter::replacementData):
1875 * platform/graphics/Image.cpp:
1876 (WebCore::Image::setData):
1877 * platform/graphics/Image.h:
1878 * platform/gtk/DataObjectGtk.cpp:
1879 (WebCore::DataObjectGtk::forClipboard):
1880 * platform/gtk/DataObjectGtk.h:
1881 (WebCore::DataObjectGtk::create):
1882 * platform/gtk/PasteboardGtk.cpp:
1883 (WebCore::Pasteboard::Pasteboard):
1884 (WebCore::Pasteboard::dataObject):
1885 * platform/ios/PasteboardIOS.mm:
1886 (WebCore::Pasteboard::read):
1887 * platform/ios/PlatformPasteboardIOS.mm:
1888 (WebCore::PlatformPasteboard::bufferForType):
1889 (WebCore::PlatformPasteboard::readBuffer):
1890 * platform/mac/PasteboardMac.mm:
1891 (WebCore::writeFileWrapperAsRTFDAttachment):
1892 (WebCore::Pasteboard::read):
1893 * platform/mac/PlatformPasteboardMac.mm:
1894 (WebCore::PlatformPasteboard::bufferForType):
1895 * platform/mac/SharedBufferMac.mm:
1896 (WebCore::SharedBuffer::wrapNSData):
1897 (WebCore::SharedBuffer::createFromReadingFile):
1898 * platform/network/MIMEHeader.cpp:
1899 (WebCore::retrieveKeyValuePairs):
1900 (WebCore::MIMEHeader::parseHeader):
1901 * platform/network/MIMEHeader.h:
1902 * platform/soup/SharedBufferSoup.cpp:
1903 (WebCore::SharedBuffer::wrapSoupBuffer):
1904 * platform/win/ClipboardUtilitiesWin.cpp:
1905 (WebCore::fragmentFromFilenames):
1906 (WebCore::fragmentFromCFHTML):
1907 (WebCore::fragmentFromHTML):
1908 * platform/win/ClipboardUtilitiesWin.h:
1909 * platform/win/PasteboardWin.cpp:
1910 (WebCore::Pasteboard::documentFragment):
1912 2016-03-14 Oliver Hunt <oliver@apple.com>
1914 Temporarily disable the separated heap.
1915 https://bugs.webkit.org/show_bug.cgi?id=155472
1917 Reviewed by Geoffrey Garen.
1919 Temporarily disable this.
1921 * Configurations/FeatureDefines.xcconfig:
1923 2016-03-10 Antonio Gomes <tonikitoo@webkit.org>
1925 Selecting with shift+drag results in unexpected drag-n-drop
1926 https://bugs.webkit.org/show_bug.cgi?id=155314
1928 Reviewed by Darin Adler.
1930 Test: editing/selection/shift-drag-selection-no-drag-n-drop.html
1932 Whenever user tries to extend an existing text selection by dragging the mouse
1933 (left button hold) with shift key pressed, WebKit enters drag-n-drop mode.
1934 This behavior does not match common editing behavior out there, including other
1935 browsers' (Firefox, Opera/Presto and IE).
1937 Patch changes WebKit so that whenever one extends a selection with mouse
1938 and shift key pressed off of a #text node, it does not enter drag-n-drop mode.
1940 Additionally, patch also adds some further tests to ensure that when
1941 selection is extended off of either a link or an image, drag-n-drop does
1942 get triggered, no matter if shift key is pressed.
1944 * page/EventHandler.cpp:
1945 (WebCore::EventHandler::handleMousePressEvent):
1947 2016-03-14 Brent Fulgham <bfulgham@apple.com>
1949 REGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
1950 https://bugs.webkit.org/show_bug.cgi?id=155453
1951 <rdar://problem/24879447>
1953 Reviewed by Daniel Bates.
1955 Tested by fast/mediastream/enumerating-crash.html.
1957 * Modules/mediastream/MediaDevicesRequest.cpp:
1958 (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Prevent UserMediaPermissionCheck object from being
1959 destroyed before the method completes.
1961 2016-03-14 Simon Fraser <simon.fraser@apple.com>
1963 Fix crash when reloading a page using requestAnimationFrame on iOS
1964 https://bugs.webkit.org/show_bug.cgi?id=155465
1965 rdar://problem/25100202
1967 Reviewed by Tim Horton.
1969 On iOS, it's possible for all clients for a DisplayRefreshMonitor
1970 to be unregistered, but still get a subsequent displayDidRefresh() for that monitor.
1971 In this case, we would remove(notFound) which release-asserts.
1973 Fix by just checking for notFound.
1975 Unable to test because requestAnimationFrame doesn't work in the simulator.
1977 * platform/graphics/DisplayRefreshMonitorManager.cpp:
1978 (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
1980 2016-03-14 Per Arne Vollan <peavo@outlook.com>
1982 [WinCairo][MediaFoundation] Implement float versions of MediaPlayer methods.
1983 https://bugs.webkit.org/show_bug.cgi?id=155357
1985 Reviewed by Brent Fulgham.
1987 It is better to implement the float versions of some of the MediaPlayer methods,
1988 since the default implementation of the double versions is to call the float version.
1989 Also added override keyword to overridden methods.
1991 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1992 (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
1993 (WebCore::MediaPlayerPrivateMediaFoundation::seek):
1994 (WebCore::MediaPlayerPrivateMediaFoundation::setRate):
1995 (WebCore::MediaPlayerPrivateMediaFoundation::duration):
1996 (WebCore::MediaPlayerPrivateMediaFoundation::currentTime):
1997 (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble): Deleted.
1998 (WebCore::MediaPlayerPrivateMediaFoundation::setRateDouble): Deleted.
1999 (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble): Deleted.
2000 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2002 2016-03-14 Tim Horton <timothy_horton@apple.com>
2004 Revert r194125 and r194186: We're going to fix this a different way.
2006 * page/EventHandler.cpp:
2007 (WebCore::EventHandler::clear):
2008 * page/EventHandler.h:
2010 2016-03-14 Youenn Fablet <youenn.fablet@crf.canon.fr>
2012 [Fetch API] FetchLoader should check for empty bodies
2013 https://bugs.webkit.org/show_bug.cgi?id=155440
2015 Reviewed by Darin Adler.
2017 Covered by added tests.
2019 * Modules/fetch/FetchLoader.cpp:
2020 (WebCore::FetchLoader::didFinishLoading): returning empty array buffer/empty string if no data received during loading.
2022 2016-03-14 Chris Dumez <cdumez@apple.com>
2024 Regression(r197981): Huge regression on Mac PLT
2025 https://bugs.webkit.org/show_bug.cgi?id=155443
2026 <rdar://problem/25113391>
2028 Reviewed by Gavin Barraclough.
2030 We have experience a huge regression on Mac PLT after r197981, so
2031 disable the feature until the performance issue is resolved.
2033 * platform/graphics/ca/GraphicsLayerCA.cpp:
2034 (WebCore::GraphicsLayer::supportsSmoothedLayerText):
2036 2016-03-14 Chris Vienneau <chris.vno@outlook.com>
2038 PingHandle delete's itself but pointer is still used by handleDataURL
2039 https://bugs.webkit.org/show_bug.cgi?id=154752
2040 <rdar://problem/24872347>
2042 Reviewed by Alex Christensen.
2044 When a PingHandle is destroyed, we should tell its client so that the client can clear the pointer it
2045 holds to the element to avoid accidentally attempting to use deallocated memory.
2047 The ResourceHandle's client member may be null after "didReceiveResponse" is called. We should confirm
2048 the client is still valid after these calls.
2050 * platform/network/DataURL.cpp:
2051 (WebCore::handleDataURL): Check the client pointer before using it.
2052 * platform/network/PingHandle.h:
2053 (WebCore::PingHandle::~PingHandle): Notify the client we are being destroyed.
2054 * platform/platform/network/ResourceHandle.h:
2056 2016-03-14 Zalan Bujtas <zalan@apple.com>
2058 Negative outline offset could break curved outline-style: auto
2059 https://bugs.webkit.org/show_bug.cgi?id=155416
2061 Reviewed by Tim Horton.
2063 When radius becomes negative the rounded rect could end up being un-renderable -> no rounded corners at all.
2065 Test: fast/inline/hidpi-outline-auto-negative-offset-with-border-radius.html
2067 * platform/graphics/PathUtilities.cpp:
2068 (WebCore::adjustedtRadiiForHuggingCurve):
2070 2016-03-14 Zalan Bujtas <zalan@apple.com>
2072 [Outline: auto] Fractional radius value could result in non-renderable rounded border.
2073 https://bugs.webkit.org/show_bug.cgi?id=155420
2075 Reviewed by Tim Horton.
2077 RoundedRect::pixelSnappedRoundedRectForPainting ensures that the rounded rect is always renderable.
2079 Test: fast/inline/hidpi-outline-auto-with-fractional-radius.html
2081 * platform/graphics/PathUtilities.cpp:
2082 (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
2083 * platform/graphics/PathUtilities.h:
2084 * rendering/RenderElement.cpp:
2085 (WebCore::RenderElement::paintFocusRing):
2087 2016-03-14 Zalan Bujtas <zalan@apple.com>
2089 Outline: auto has sharp corners with single line contenteditable.
2090 https://bugs.webkit.org/show_bug.cgi?id=155418
2092 Reviewed by Tim Horton.
2094 Multiple rectangles assumed multiline content and it broke bottomLeft and bottomRight corner check.
2095 This patch adds fast path for polygons with 4 corners.
2097 Test: fast/inline/hidpi-outline-auto-with-one-focusring-rect.html
2099 * platform/graphics/PathUtilities.cpp:
2100 (WebCore::cornerType):
2101 (WebCore::cornerTypeForMultiline):
2102 (WebCore::rectFromPolygon):
2103 (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
2105 2016-03-14 Joanmarie Diggs <jdiggs@igalia.com>
2107 [AX] SVG element with child desc not exposed
2108 https://bugs.webkit.org/show_bug.cgi?id=155374
2110 Reviewed by Darin Adler.
2112 Covered by the accessibility/w3c-svg-roles.html test, which was updated.
2114 AccessibilitySVGRoot is now a subclass of AccessibilitySVGElement, which
2115 exposes SVG elements with a child desc element as per the specification.
2116 Also made existing protected methods private.
2118 * accessibility/AccessibilitySVGElement.h:
2119 * accessibility/AccessibilitySVGRoot.cpp:
2120 (WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
2121 (WebCore::AccessibilitySVGRoot::parentObject):
2122 * accessibility/AccessibilitySVGRoot.h:
2124 2016-03-14 Alexey Proskuryakov <ap@apple.com>
2128 * Modules/fetch/FetchBodyOwner.cpp:
2129 (WebCore::FetchBodyOwner::loadedBlobAsText):
2131 2016-03-14 Youenn Fablet <youenn.fablet@crf.canon.fr>
2133 [Fetch API] Implement data resolution for blob stored in Body
2134 https://bugs.webkit.org/show_bug.cgi?id=155359
2136 Reviewed by Darin Adler.
2138 Introducing FetchLoader as a wrapper around ThreadableLoader to load resources.
2139 FetchLoader can retrieve data as text or array buffer. It only supports blob currently.
2141 Introducing FetchLoaderClient interface and FetchBodyOwner::BlobLoader as specifc blob loader client.
2143 Covered by existing rebased tests.
2146 * Modules/fetch/FetchBody.cpp:
2147 (WebCore::FetchBody::loadingType):
2148 (WebCore::FetchBody::loadedAsArrayBuffer):
2149 (WebCore::FetchBody::loadedAsText):
2150 * Modules/fetch/FetchBody.h:
2151 * Modules/fetch/FetchBodyOwner.cpp: Added.
2152 (WebCore::FetchBodyOwner::FetchBodyOwner):
2153 (WebCore::FetchBodyOwner::loadBlob):
2154 (WebCore::FetchBodyOwner::finishBlobLoading):
2155 (WebCore::FetchBodyOwner::blobLoadingFailed):
2156 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
2157 * Modules/fetch/FetchBodyOwner.h:
2158 (WebCore::FetchBodyOwner::loadedBlobAsText):
2159 (WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer):
2160 (WebCore::FetchBodyOwner::blobLoadingSucceeded):
2161 * Modules/fetch/FetchLoader.cpp: Added.
2162 (WebCore::FetchLoader::start):
2163 (WebCore::FetchLoader::FetchLoader):
2164 (WebCore::FetchLoader::stop):
2165 (WebCore::FetchLoader::didReceiveResponse):
2166 (WebCore::FetchLoader::didReceiveData):
2167 (WebCore::FetchLoader::didFinishLoading):
2168 (WebCore::FetchLoader::didFail):
2169 * Modules/fetch/FetchLoader.h: Added.
2170 * Modules/fetch/FetchLoaderClient.h: Added.
2171 (WebCore::FetchLoaderClient::~FetchLoaderClient):
2172 (WebCore::FetchLoaderClient::didReceiveResponse):
2173 (WebCore::FetchLoaderClient::didFinishLoadingAsText):
2174 (WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer):
2175 * WebCore.xcodeproj/project.pbxproj:
2177 2016-03-14 Frederic Wang <fwang@igalia.com>
2179 Make MathML colspan/rowspan consistent with HTML table cells.
2180 https://bugs.webkit.org/show_bug.cgi?id=150253
2182 Reviewed by Martin Robinson.
2184 Test: mathml/rowspan-crash.xhtml
2186 We make MathMLElement::colSpan and MathMLElement::rowSpan consistent with the corresponding functions in HTMLTableCellElement.cpp.
2187 These functions now return unsigned integers, use the same parsing functions and set a maximum for rowspan.
2188 This latter change fixes crash/timeout with large values of rowspan.
2190 * mathml/MathMLElement.cpp: Include HTMLParserIdioms to use limitToOnlyHTMLNonNegative.
2191 (WebCore::MathMLElement::colSpan): Use unsigned integer and limitToOnlyHTMLNonNegative.
2192 (WebCore::MathMLElement::rowSpan): ditto. We also use the same maximum limit as HTMLTableCellElement.
2193 * mathml/MathMLElement.h: Make colSpan and rowSpan return unsigned integers.
2195 2016-03-14 Tomas Popela <tpopela@redhat.com>
2197 Enable GSS-Negotiate support in libsoup
2198 https://bugs.webkit.org/show_bug.cgi?id=155354
2200 Reviewed by Carlos Garcia Campos.
2202 Enable the SOUP_TYPE_AUTH_NEGOTIATE feature if libsoup was compiled
2203 with the GSS-Negotiate support.
2205 * platform/network/soup/SoupNetworkSession.cpp:
2206 (WebCore::SoupNetworkSession::SoupNetworkSession):
2208 2016-03-14 Ryosuke Niwa <rniwa@webkit.org>
2210 Add slotchange event
2211 https://bugs.webkit.org/show_bug.cgi?id=155424
2212 <rdar://problem/24997534>
2214 Reviewed by Antti Koivisto.
2216 Added `slotchange` event as discussed on https://github.com/w3c/webcomponents/issues/288.
2218 While the exact semantics of it could still evolve over time, this patch implements as
2219 an asynchronous event that fires on a slot element whenever its distributed nodes change
2220 (flattened assigned nodes):
2221 http://w3c.github.io/webcomponents/spec/shadow/#dfn-distributed-nodes
2223 Since inserting or removing an element from a shadow host could needs to enqueue this event
2224 on the right slot element, this patch moves the invalidation point of element removals and
2225 insertions from Element::childrenChanged to Element::insertedInto and Element::removedFrom.
2226 Text nodes are still invalidated at Element::childrenChanged for performance reasons
2227 since it could only appear within a default slot element.
2229 Because this more fine-grained invalidation needs to be overridden by HTMLDetailsElement,
2230 we now subclass SlotAssignment in HTMLDetailsElement instead of passing in a std::function.
2232 Test: fast/shadow-dom/slotchange-event.html
2235 (WebCore::Document::enqueueSlotchangeEvent): Added.
2238 (WebCore::Element::attributeChanged): Call hostChildElementDidChangeSlotAttr.
2239 (WebCore::Element::insertedInto): Call hostChildElementDidChange.
2240 (WebCore::Element::removedFrom): Ditto.
2241 (WebCore::Element::childrenChanged): Don't invalidate the slots on ElementInserted and
2242 ElementRemoved since they're now done in Element::insertedInto and Element::removedFrom.
2244 (WebCore::Event::scoped): slotchange event is scoped.
2245 * dom/EventNames.h: Added eventNames().slotchange.
2246 * dom/ShadowRoot.cpp:
2247 (WebCore::ShadowRoot::invalidateSlotAssignments): Deleted.
2248 (WebCore::ShadowRoot::invalidateDefaultSlotAssignments): Deleted.
2250 (ShadowRoot): Added more fine-grained invalidators, mirroring changes to SlotAssignment.
2251 * dom/SlotAssignment.cpp:
2252 (WebCore::SlotAssignment::SlotAssignment): Removed a variant that takes SlotNameFunction
2253 since HTMLDetailsElement now subclasses SlotAssignment.
2254 (WebCore::SlotAssignment::~SlotAssignment): Added now that the class is virtual.
2255 (WebCore::recursivelyFireSlotChangeEvent): Added.
2256 (WebCore::SlotAssignment::didChangeSlot): Added. Invalidates the style tree only if there
2257 is a corresponding slot element, and fires slotchange event. When the slot element we found
2258 in this shadow tree is assigned to a slot element inside an inner shadow tree, recursively
2259 fire slotchange event on each such inner slots.
2260 (WebCore::SlotAssignment::hostChildElementDidChange): Added. Update the matching slot when
2261 an element is inserted or removed under a shadow host.
2262 (WebCore::SlotAssignment::assignedNodesForSlot): Removed the superfluous early exit to an
2263 release assert since addSlotElementByName should always create a SlotInfo for each element.
2264 (WebCore::SlotAssignment::slotNameForHostChild): Added. This is the equivalent of old
2265 m_slotNameFunction which DetailsSlotAssignment overrides.
2266 (WebCore::SlotAssignment::invalidateDefaultSlot): Deleted.
2267 (WebCore::SlotAssignment::findFirstSlotElement): Added an assertion. slotInfo.element must
2268 be nullptr if elementCount is 0, and elementCount must be 0 if slotInfo.element is nullptr
2269 after calling resolveAllSlotElements, which traverses the entire shadow tree to find all
2271 (WebCore::SlotAssignment::assignSlots):
2272 * dom/SlotAssignment.h: Implemented inline functions of ShadowRoot here to avoid including
2273 SlotAssignment.h in ShadowRoot.h. Not inlining them results in extra function calls for all
2274 builtin elements with shadow root without slot elements, which impacts performance.
2275 (WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost): Added.
2276 (WebCore::ShadowRoot::didChangeDefaultSlot): Added.
2277 (WebCore::ShadowRoot::hostChildElementDidChange): Added.
2278 (WebCore::ShadowRoot::hostChildElementDidChangeSlotAttribute): Added.
2279 (WebCore::ShadowRoot::innerSlotDidChange):
2280 * html/HTMLDetailsElement.cpp:
2281 (WebCore::DetailsSlotAssignment): Added. Subclasses SlotAssignment to override
2282 hostChildElementDidChange and slotNameForHostChild.
2283 (WebCore::DetailsSlotAssignment::hostChildElementDidChange): Added. We don't check if this
2284 is the first summary element since we don't know the answer when this function is called
2285 inside Element::removedFrom.
2286 (WebCore::DetailsSlotAssignment::slotNameForHostChild): Renamed from slotNameFunction. Also
2287 removed the code to return nullAtom when details element is not open as that messes up new
2288 fine-grained invalidation. Insert/remove the slot element in parseAttribute instead.
2289 (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot): Don't insert the slot element for
2290 the summary since the details element is not open now.
2291 (WebCore::HTMLDetailsElement::parseAttribute): Remove and insert the slot element for the
2292 summary here instead of changing the behavior of slotNameForHostChild.
2293 * html/HTMLDetailsElement.h:
2294 * html/HTMLSlotElement.cpp:
2295 (WebCore::HTMLSlotElement::enqueueSlotChangeEvent): Added. Enqueues a new slotchange event
2296 if we haven't done so for this element yet.
2297 (WebCore::HTMLSlotElement::dispatchEvent): Added. Clear m_hasEnqueuedSlotChangeEvent when
2298 dispatching a slotchange event so that a subsequent call to enqueueSlotChangeEvent would
2299 enqueue a new event. Note scripts call EventTarget::dispatchEventForBindings instead.
2300 * html/HTMLSlotElement.h:
2302 2016-03-14 Youenn Fablet <youenn.fablet@crf.canon.fr>
2304 Introduce CallWith=Document in binding generator
2305 https://bugs.webkit.org/show_bug.cgi?id=155358
2307 Reviewed by Darin Adler.
2309 Covered by existing tests and binding test.
2311 * Modules/notifications/Notification.cpp:
2312 (WebCore::Notification::permission): Taking a Document& instead of ScriptExecutionContext&.
2313 (WebCore::Notification::requestPermission): Ditto.
2314 * Modules/notifications/Notification.h:
2315 * Modules/notifications/Notification.idl: Using CallWith=Document.
2316 * bindings/scripts/CodeGeneratorJS.pm: Adding support for CallWith=Document and changed name from scriptContext to context.
2318 (GenerateConstructorDefinition):
2319 * bindings/scripts/IDLAttributes.txt: Adding support for CallWith=Document.
2320 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2321 (webkit_dom_test_obj_with_document_argument):
2322 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2323 * bindings/scripts/test/JS/JSTestInterface.cpp:
2324 (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
2325 (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2326 * bindings/scripts/test/JS/JSTestObj.cpp:
2327 (WebCore::jsTestObjWithScriptExecutionContextAttribute):
2328 (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
2329 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
2330 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2331 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2332 (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
2333 (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
2334 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
2335 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2336 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2337 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
2338 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
2339 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
2340 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
2341 (WebCore::jsTestObjPrototypeFunctionWithDocumentArgument):
2342 * bindings/scripts/test/ObjC/DOMTestObj.h:
2343 * bindings/scripts/test/ObjC/DOMTestObj.mm:
2344 (-[DOMTestObj withDocumentArgument]):
2345 * bindings/scripts/test/TestObj.idl: Adding binding test.
2346 * page/DOMWindow.cpp:
2347 (WebCore::DOMWindow::focus): Taking a Document& instead of ScriptExecutionContext&.
2348 (WebCore::DOMWindow::close): Ditto.
2350 * page/DOMWindow.idl:
2352 (WebCore::History::back): Ditto.
2353 (WebCore::History::forward): Ditto.
2354 (WebCore::History::go): Ditto.
2357 * testing/Internals.cpp:
2358 (WebCore::InspectorStubFrontend::closeWindow): Calling DOMWindow::close() directly.
2360 2016-03-13 Joseph Pecoraro <pecoraro@apple.com>
2362 Remove ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX) guards
2363 https://bugs.webkit.org/show_bug.cgi?id=155417
2365 Reviewed by Yusuke Suzuki.
2367 * Configurations/FeatureDefines.xcconfig:
2369 2016-03-13 Sam Weinig <sam@webkit.org>
2371 Implement unprivileged execCommand("copy") and execCommand("cut")
2372 <rdar://problem/24354406>
2373 https://bugs.webkit.org/show_bug.cgi?id=146336
2375 Reviewed by Dean Jackson.
2377 Test: editing/execCommand/clipboard-access-with-user-gesture.html
2379 * WebCore.xcodeproj/project.pbxproj:
2382 * editing/ClipboardAccessPolicy.h:
2385 * editing/EditorCommand.cpp:
2386 (WebCore::defaultValueForSupportedCopyCut):
2387 (WebCore::supportedCopyCut):
2388 Match other browsers and allow the copy and cut commands
2389 to be executed when there is a user gesture.
2392 Add include of ClipboardAccessPolicy.h.
2395 Add new setting for ClipboardAccessPolicy
2397 2016-03-13 Ryosuke Niwa <rniwa@webkit.org>
2399 REGRESSION (r190840): crash inside details element's slotNameFunction
2400 https://bugs.webkit.org/show_bug.cgi?id=155388
2402 Reviewed by Antti Koivisto.
2404 The bug was caused by HTMLDetailsElement::isActiveSummary calling findAssignedSlot with a summary element
2405 inside the shadow tree of the detials element. Fixed it by existing early when the summary element passed
2406 to isActiveSummary is not a direct child of the details element.
2408 Test: fast/html/details-summary-tabindex-crash.html
2410 * dom/ShadowRoot.cpp:
2411 (WebCore::ShadowRoot::findAssignedSlot): Added an assertion for regression testing.
2412 * dom/SlotAssignment.cpp:
2413 (WebCore::SlotAssignment::findAssignedSlot): Removed the superfluous call to assignSlots added in r190840.
2414 There is no need to update the slot assignments here (entires in m_slots are added or removed by
2415 addSlotElementByName or removeSlotElementByName and assignSlots only updates assignedNodes in each SlotInfo
2416 which is never used in this function or findFirstSlotElement.
2417 * html/HTMLDetailsElement.cpp:
2418 (WebCore::HTMLDetailsElement::isActiveSummary): Fixed the bug.
2420 2016-03-13 Antti Koivisto <antti@apple.com>
2422 ComposedTreeIterator fails to traverse slots if root is shadow host
2423 https://bugs.webkit.org/show_bug.cgi?id=155407
2425 Reviewed by Darin Adler.
2427 Test: fast/shadow-dom/composed-tree-shadow-subtree.html
2429 * dom/ComposedTreeIterator.cpp:
2430 (WebCore::ComposedTreeIterator::ComposedTreeIterator):
2432 Traversal functions assume m_contextStack is deeper than 1 before they need to enter slot traversal code paths.
2433 Call initializeContextStack in case of shadow host which does the right thing.
2435 (WebCore::ComposedTreeIterator::traverseSiblingInSlot):
2436 (WebCore::composedTreeAsText):
2438 Add option to include pointers as debugging aid.
2440 * dom/ComposedTreeIterator.h:
2441 (WebCore::composedTreeChildren):
2443 2016-03-12 Sam Weinig <sam@webkit.org>
2445 WebKit can easily crash below NetworkSession::dataTaskForIdentifier() with NSURLSession enabled
2446 <rdar://problem/25129946>
2447 https://bugs.webkit.org/show_bug.cgi?id=155401
2449 Reviewed by Alex Christensen.
2451 Add a SessionID as a member of NetworkStorageSession. This allows us to avoid having HashMaps
2452 to map between the two types.
2454 * platform/network/NetworkStorageSession.h:
2455 (WebCore::NetworkStorageSession::sessionID):
2456 (WebCore::NetworkStorageSession::credentialStorage):
2457 (WebCore::NetworkStorageSession::platformSession):
2458 * platform/network/NetworkStorageSessionStub.cpp:
2459 (WebCore::NetworkStorageSession::NetworkStorageSession):
2460 (WebCore::NetworkStorageSession::context):
2461 (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
2462 (WebCore::defaultSession):
2463 (WebCore::NetworkStorageSession::defaultStorageSession):
2464 (WebCore::NetworkStorageSession::switchToNewTestingSession):
2465 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2466 (WebCore::NetworkStorageSession::NetworkStorageSession):
2467 (WebCore::NetworkStorageSession::switchToNewTestingSession):
2468 (WebCore::NetworkStorageSession::defaultStorageSession):
2469 (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
2470 * platform/network/soup/NetworkStorageSessionSoup.cpp:
2471 (WebCore::NetworkStorageSession::NetworkStorageSession):
2472 (WebCore::NetworkStorageSession::defaultStorageSession):
2473 (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
2474 (WebCore::NetworkStorageSession::switchToNewTestingSession):
2475 (WebCore::NetworkStorageSession::soupNetworkSession):
2477 2016-03-13 Jon Lee <jonlee@apple.com>
2479 getUserMedia requests from the main frame should be treated the same as requests from an iframe with the same origin
2480 https://bugs.webkit.org/show_bug.cgi?id=155405
2481 <rdar://problem/25131007>
2483 Reviewed by Eric Carlson.
2485 When gUM is called from the main frame, or from a subframe with the same origin, the
2486 top level document origin should be the same.
2488 * Modules/mediastream/UserMediaRequest.cpp:
2489 (WebCore::UserMediaRequest::userMediaDocumentOrigin): Reverse the logic so that it is similar
2490 to topLevelDocumentOrigin.
2491 (WebCore::UserMediaRequest::topLevelDocumentOrigin): Return the top origin always.
2493 2016-03-13 David Kilzer <ddkilzer@apple.com>
2495 REGRESSION (r198079): Windows build broke because of "%PRId64" format specifier
2497 * platform/network/ParsedContentRange.cpp: Add #include
2498 <wtf/StdLibExtras.h> and remove local definition of "PRId64".
2500 2016-03-13 Joonghun Park <jh718.park@samsung.com>
2502 [EFL] Fix debug build error since r197690. Unreviewed.
2503 https://bugs.webkit.org/show_bug.cgi?id=155408
2505 Unreviewed. Change %lld to %PRId instead to correct the error below.
2506 error: format ‘%lld’ expects argument of type ‘long long int’,
2507 but argument 5 has type ‘std::chrono::duration<long int, std::ratio<1l, 1000l> >::rep
2508 {aka long int}’ [-Werror=format=]
2510 * page/DOMTimer.cpp:
2511 (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
2513 2016-03-12 Myles C. Maxfield <mmaxfield@apple.com>
2515 [Cocoa] Remove typedef from NSScrollerImp to ScrollbarPainter
2516 https://bugs.webkit.org/show_bug.cgi?id=155379
2518 Reviewed by Beth Dakin.
2520 There's no reason to not call them what they are.
2522 No new tests because there is no behavior change.
2524 * page/scrolling/AsyncScrollingCoordinator.cpp:
2525 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2526 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2527 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
2528 (WebCore::ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars):
2529 (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
2530 * page/scrolling/ScrollingStateFrameScrollingNode.h:
2531 * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
2532 (WebCore::ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars):
2533 (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
2534 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2535 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2536 (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
2537 (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac):
2538 (WebCore::ScrollingTreeFrameScrollingNodeMac::releaseReferencesToScrollerImpsOnTheMainThread):
2539 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
2540 (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
2541 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
2542 (WebCore::ScrollingTreeFrameScrollingNodeMac::releaseReferencesToScrollbarPaintersOnTheMainThread): Deleted.
2543 * platform/ScrollbarThemeComposite.h:
2544 * platform/mac/ScrollAnimatorMac.h:
2545 * platform/mac/ScrollAnimatorMac.mm:
2546 (scrollbarPainterForScrollbar):
2547 (-[WebScrollerImpDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
2548 (-[WebScrollerImpDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2549 (-[WebScrollerImpDelegate scrollerImp:animateTrackAlphaTo:duration:]):
2550 (-[WebScrollerImpDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
2551 (-[WebScrollerImpDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
2552 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2553 (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2554 (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
2555 (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
2556 (WebCore::ScrollAnimatorMac::mouseIsDownInScrollbar):
2557 (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2558 (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2559 (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2560 (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2561 (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
2562 (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
2563 (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
2564 (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
2565 (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
2566 (WebCore::ScrollAnimatorMac::cancelAnimations):
2567 (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2568 (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
2569 (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]): Deleted.
2570 (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): Deleted.
2571 (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): Deleted.
2572 (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): Deleted.
2573 (-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]): Deleted.
2574 * platform/mac/ScrollbarThemeMac.h:
2575 * platform/mac/ScrollbarThemeMac.mm:
2576 (WebCore::scrollbarMap):
2577 (+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
2578 (WebCore::ScrollbarThemeMac::registerScrollbar):
2579 (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
2580 (WebCore::ScrollbarThemeMac::painterForScrollbar):
2581 (WebCore::ScrollbarThemeMac::scrollbarThickness):
2582 (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
2583 (WebCore::ScrollbarThemeMac::hasThumb):
2584 (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
2585 (WebCore::scrollbarPainterPaint):
2587 2016-03-12 Dean Jackson <dino@apple.com>
2589 REGRESSION (r188647): Teamtreehouse website sidebar buttons are not rendered
2590 https://bugs.webkit.org/show_bug.cgi?id=155400
2591 <rdar://problem/24818602>
2593 Reviewed by Anders Carlsson.
2595 When we unprefixed CSS filters we accidentally
2596 stopped SVG elements that use the CSS filter shorthands
2597 from rendering. We still don't actually support
2598 the shorthands in this case, but we should render
2599 the element without the filter.
2601 Tests: css3/filters/filters-on-svg-element.html
2602 css3/filters/filters-on-svg-root.html
2604 * rendering/style/RenderStyle.cpp:
2605 (WebCore::RenderStyle::hasReferenceFilterOnly): Add
2606 this new function that tells us if we have the
2607 style of filter that we can handle in SVG content.
2608 * rendering/style/RenderStyle.h:
2609 * rendering/svg/SVGRenderingContext.cpp:
2610 (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2611 We can mark an element as ready to render if it
2612 has a shorthand filter.
2614 2016-03-12 Myles C. Maxfield <mmaxfield@apple.com>
2616 Delete dead SVG Font code
2617 https://bugs.webkit.org/show_bug.cgi?id=154718
2619 Reviewed by Antti Koivisto.
2621 All the ports have adopted the SVG -> OTF Font Converter, so there will never
2622 be an instantiation of a font backed by a DOM subtree. We can remove all the
2623 infrastructure used to support that.
2625 No new tests because there is no behavior change.
2628 * Configurations/FeatureDefines.xcconfig:
2630 * WebCore.xcodeproj/project.pbxproj:
2631 * css/CSSFontFaceSource.cpp:
2632 (WebCore::CSSFontFaceSource::CSSFontFaceSource): Deleted.
2633 (WebCore::CSSFontFaceSource::font): Deleted.
2634 * css/CSSFontFaceSource.h:
2635 * loader/cache/CachedFont.cpp:
2636 * loader/cache/CachedSVGFont.cpp:
2637 (WebCore::CachedSVGFont::createFont): Deleted.
2638 (WebCore::CachedSVGFont::ensureCustomFontData): Deleted.
2639 * loader/cache/CachedSVGFont.h:
2640 * platform/graphics/Font.cpp:
2641 (WebCore::Font::Font):
2642 (WebCore::fillGlyphPage):
2643 (WebCore::Font::description): Deleted.
2644 (WebCore::Font::createScaledFont): Deleted.
2645 (WebCore::Font::applyTransforms): Deleted.
2646 * platform/graphics/Font.h:
2647 (WebCore::Font::widthForGlyph):
2648 (WebCore::Font::SVGData::~SVGData): Deleted.
2649 (WebCore::Font::create): Deleted.
2650 (WebCore::Font::svgData): Deleted.
2651 (WebCore::Font::isSVGFont): Deleted.
2652 * platform/graphics/win/FontWin.cpp:
2653 * platform/graphics/FontCascade.cpp:
2654 (WebCore::FontCascade::drawText):
2655 (WebCore::FontCascade::drawEmphasisMarks):
2656 (WebCore::FontCascade::glyphDataForCharacter):
2657 (WebCore::FontCascade::adjustSelectionRectForText):
2658 (WebCore::FontCascade::offsetForPosition):
2659 (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
2660 (WebCore::FontCascade::drawGlyphBuffer):
2661 (WebCore::isDrawnWithSVGFont): Deleted.
2662 (WebCore::FontCascade::width): Deleted.
2663 (WebCore::FontCascade::codePath): Deleted.
2664 * platform/graphics/FontCascade.h:
2665 * platform/graphics/GraphicsContext.h:
2666 * platform/graphics/SVGGlyph.cpp: Removed.
2667 (WebCore::processArabicFormDetection): Deleted.
2668 (WebCore::charactersWithArabicForm): Deleted.
2669 (WebCore::isCompatibleArabicForm): Deleted.
2670 (WebCore::isCompatibleGlyph): Deleted.
2671 * platform/graphics/SVGGlyph.h: Removed.
2672 (WebCore::SVGGlyph::SVGGlyph): Deleted.
2673 (WebCore::SVGGlyph::inheritedValue): Deleted.
2674 (WebCore::SVGGlyph::operator==): Deleted.
2675 * platform/graphics/TextRun.cpp:
2676 * platform/graphics/TextRun.h:
2677 (WebCore::TextRun::RenderingContext::~RenderingContext): Deleted.
2678 (WebCore::TextRun::renderingContext): Deleted.
2679 (WebCore::TextRun::setRenderingContext): Deleted.
2680 * platform/graphics/WidthIterator.cpp:
2681 (WebCore::WidthIterator::applyFontTransforms):
2682 (WebCore::WidthIterator::advanceInternal):
2683 (WebCore::WidthIterator::glyphDataForCharacter): Deleted.
2684 * platform/graphics/WidthIterator.h:
2685 (WebCore::WidthIterator::lastGlyphName): Deleted.
2686 (WebCore::WidthIterator::setLastGlyphName): Deleted.
2687 (WebCore::WidthIterator::arabicForms): Deleted.
2688 * platform/graphics/cairo/FontCairo.cpp:
2689 (WebCore::CairoGlyphToPathTranslator::advance):
2690 (WebCore::FontCascade::dashesForIntersectionsWithRect):
2691 (WebCore::CairoGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
2692 * platform/graphics/cocoa/FontCascadeCocoa.mm:
2693 (WebCore::MacGlyphToPathTranslator::advance):
2694 (WebCore::FontCascade::dashesForIntersectionsWithRect):
2695 (WebCore::FontCascade::primaryFontIsSystemFont):
2696 (WebCore::FontCascade::drawEmphasisMarksForComplexText):
2697 (WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
2698 * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2699 (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Deleted.
2700 * platform/graphics/mac/ComplexTextController.cpp:
2701 (WebCore::TextLayout::isNeeded):
2702 (WebCore::TextLayout::TextLayout):
2703 (WebCore::TextLayout::constructTextRun):
2704 * rendering/EllipsisBox.cpp:
2705 (WebCore::EllipsisBox::paint):
2706 (WebCore::EllipsisBox::selectionRect):
2707 (WebCore::EllipsisBox::paintSelection):
2708 * rendering/InlineTextBox.cpp:
2709 (WebCore::InlineTextBox::localSelectionRect):
2710 (WebCore::InlineTextBox::paint):
2711 (WebCore::InlineTextBox::paintSelection):
2712 (WebCore::InlineTextBox::paintCompositionBackground):
2713 (WebCore::InlineTextBox::paintDocumentMarker):
2714 (WebCore::InlineTextBox::paintTextMatchMarker):
2715 (WebCore::InlineTextBox::offsetForPosition):
2716 (WebCore::InlineTextBox::positionForOffset):
2717 (WebCore::InlineTextBox::constructTextRun):
2718 * rendering/InlineTextBox.h:
2719 * rendering/RenderBlock.cpp:
2720 (WebCore::RenderBlock::constructTextRun):
2721 * rendering/RenderBlock.h:
2722 * rendering/RenderBlockFlow.cpp:
2723 (WebCore::stripTrailingSpace):
2724 * rendering/RenderBlockLineLayout.cpp:
2725 (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
2726 * rendering/RenderDeprecatedFlexibleBox.cpp:
2727 (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2728 * rendering/RenderFileUploadControl.cpp:
2729 (WebCore::RenderFileUploadControl::paintObject):
2730 (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
2731 * rendering/RenderImage.cpp:
2732 (WebCore::RenderImage::setImageSizeForAltText):
2733 (WebCore::RenderImage::paintReplaced):
2734 * rendering/RenderListBox.cpp:
2735 (WebCore::RenderListBox::updateFromElement):
2736 * rendering/RenderListMarker.cpp:
2737 (WebCore::RenderListMarker::paint):
2738 (WebCore::RenderListMarker::computePreferredLogicalWidths):
2739 (WebCore::RenderListMarker::getRelativeMarkerRect):
2740 * rendering/RenderMenuList.cpp:
2741 (RenderMenuList::updateOptionsWidth):
2742 * rendering/RenderText.cpp:
2743 (WebCore::RenderText::widthFromCache):
2744 (WebCore::RenderText::trimmedPrefWidths):
2745 (WebCore::hyphenWidth):
2746 (WebCore::maxWordFragmentWidth):
2747 (WebCore::RenderText::computePreferredLogicalWidths):
2748 (WebCore::RenderText::width):
2749 * rendering/RenderTextControl.cpp:
2750 (WebCore::RenderTextControl::getAverageCharWidth):
2751 * rendering/RenderThemeIOS.mm:
2752 (WebCore::RenderThemeMeasureTextClient::RenderThemeMeasureTextClient):
2753 (WebCore::adjustInputElementButtonStyle):
2754 * rendering/SimpleLineLayout.cpp:
2755 (WebCore::SimpleLineLayout::canUseForFontAndText): Deleted.
2756 * rendering/line/BreakingContext.h:
2757 (WebCore::WordTrailingSpace::WordTrailingSpace):
2758 (WebCore::WordTrailingSpace::width):
2759 (WebCore::measureHyphenWidth):
2760 (WebCore::textWidth):
2761 (WebCore::tryHyphenating):
2762 (WebCore::BreakingContext::handleText):
2763 * rendering/svg/RenderSVGAllInOne.cpp:
2764 * rendering/svg/RenderSVGText.cpp:
2765 * rendering/svg/SVGInlineTextBox.cpp:
2766 (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
2767 (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
2768 (WebCore::SVGInlineTextBox::paintTextWithShadows):
2769 (WebCore::SVGInlineTextBox::constructTextRun): Deleted.
2770 * rendering/svg/SVGInlineTextBox.h:
2771 * rendering/svg/SVGTextLayoutEngine.cpp:
2772 (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
2773 * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
2774 (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning): Deleted.
2775 * rendering/svg/SVGTextLayoutEngineSpacing.h:
2776 * rendering/svg/SVGTextMetrics.cpp:
2777 (WebCore::SVGTextMetrics::SVGTextMetrics):
2778 (WebCore::SVGTextMetrics::constructTextRun): Deleted.
2779 * rendering/svg/SVGTextMetrics.h:
2780 * rendering/svg/SVGTextMetricsBuilder.cpp:
2781 (WebCore::SVGTextMetricsBuilder::advanceSimpleText):
2782 * rendering/svg/SVGTextRunRenderingContext.cpp: Removed.
2783 (WebCore::svgFontAndFontFaceElementForFontData): Deleted.
2784 (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont): Deleted.
2785 (WebCore::SVGTextRunRenderingContext::applySVGKerning): Deleted.
2786 (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator): Deleted.
2787 (WebCore::SVGGlyphToPathTranslator::transform): Deleted.
2788 (WebCore::SVGGlyphToPathTranslator::path): Deleted.
2789 (WebCore::SVGGlyphToPathTranslator::extents): Deleted.
2790 (WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
2791 (WebCore::SVGGlyphToPathTranslator::advance): Deleted.
2792 (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator): Deleted.
2793 (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Deleted.
2794 (WebCore::missingGlyphForFont): Deleted.
2795 (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Deleted.
2796 * rendering/svg/SVGTextRunRenderingContext.h: Removed.
2797 * svg/SVGAllInOne.cpp:
2798 * svg/SVGFontData.cpp: Removed.
2799 (WebCore::SVGFontData::SVGFontData): Deleted.
2800 (WebCore::SVGFontData::initializeFont): Deleted.
2801 (WebCore::SVGFontData::widthForSVGGlyph): Deleted.
2802 (WebCore::SVGFontData::applySVGGlyphSelection): Deleted.
2803 (WebCore::SVGFontData::fillSVGGlyphPage): Deleted.
2804 (WebCore::SVGFontData::fillBMPGlyphs): Deleted.
2805 (WebCore::SVGFontData::fillNonBMPGlyphs): Deleted.
2806 (WebCore::computeNormalizedSpaces): Deleted.
2807 (WebCore::createStringWithMirroredCharacters): Deleted.
2808 * svg/SVGFontData.h: Removed.
2809 (WebCore::SVGFontData::~SVGFontData): Deleted.
2810 (WebCore::SVGFontData::svgFontFaceElement): Deleted.
2811 (WebCore::SVGFontData::horizontalOriginX): Deleted.
2812 (WebCore::SVGFontData::horizontalOriginY): Deleted.
2813 (WebCore::SVGFontData::horizontalAdvanceX): Deleted.
2814 (WebCore::SVGFontData::verticalOriginX): Deleted.
2815 (WebCore::SVGFontData::verticalOriginY): Deleted.
2816 (WebCore::SVGFontData::verticalAdvanceY): Deleted.
2817 * svg/SVGFontElement.cpp:
2818 (WebCore::SVGFontElement::SVGFontElement): Deleted.
2819 (WebCore::SVGFontElement::invalidateGlyphCache): Deleted.
2820 (WebCore::SVGFontElement::firstMissingGlyphElement): Deleted.
2821 (WebCore::SVGFontElement::registerLigaturesInGlyphCache): Deleted.
2822 (WebCore::SVGFontElement::ensureGlyphCache): Deleted.
2823 (WebCore::SVGKerningMap::clear): Deleted.
2824 (WebCore::SVGKerningMap::insert): Deleted.
2825 (WebCore::stringMatchesUnicodeRange): Deleted.
2826 (WebCore::stringMatchesGlyphName): Deleted.
2827 (WebCore::stringMatchesUnicodeName): Deleted.
2828 (WebCore::matches): Deleted.
2829 (WebCore::kerningForPairOfStringsAndGlyphs): Deleted.
2830 (WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs): Deleted.
2831 (WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs): Deleted.
2832 (WebCore::SVGFontElement::collectGlyphsForString): Deleted.
2833 (WebCore::SVGFontElement::collectGlyphsForGlyphName): Deleted.
2834 (WebCore::SVGFontElement::svgGlyphForGlyph): Deleted.
2835 (WebCore::SVGFontElement::missingGlyph): Deleted.
2836 * svg/SVGFontElement.h:
2837 (WebCore::SVGKerning::SVGKerning): Deleted.
2838 (WebCore::SVGKerningMap::isEmpty): Deleted.
2839 * svg/SVGGlyphElement.cpp:
2840 (WebCore::SVGGlyphElement::invalidateGlyphCache): Deleted.
2841 (WebCore::SVGGlyphElement::parseAttribute): Deleted.
2842 (WebCore::SVGGlyphElement::insertedInto): Deleted.
2843 (WebCore::SVGGlyphElement::removedFrom): Deleted.
2844 (WebCore::parseArabicForm): Deleted.
2845 (WebCore::parseOrientation): Deleted.
2846 (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes): Deleted.
2847 (WebCore::parseSVGGlyphAttribute): Deleted.
2848 (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier): Deleted.
2849 (WebCore::SVGGlyphElement::buildGlyphIdentifier): Deleted.
2850 * svg/SVGGlyphElement.h:
2851 * svg/SVGGlyphMap.h: Removed.
2852 (WebCore::GlyphMapNode::GlyphMapNode): Deleted.
2853 (WebCore::GlyphMapNode::create): Deleted.
2854 (WebCore::SVGGlyphMap::SVGGlyphMap): Deleted.
2855 (WebCore::SVGGlyphMap::addGlyph): Deleted.
2856 (WebCore::SVGGlyphMap::appendToGlyphTable): Deleted.
2857 (WebCore::SVGGlyphMap::compareGlyphPriority): Deleted.
2858 (WebCore::SVGGlyphMap::collectGlyphsForString): Deleted.
2859 (WebCore::SVGGlyphMap::clear): Deleted.
2860 (WebCore::SVGGlyphMap::svgGlyphForGlyph): Deleted.
2861 (WebCore::SVGGlyphMap::glyphIdentifierForGlyphName): Deleted.
2862 * svg/SVGHKernElement.cpp:
2863 (WebCore::SVGHKernElement::insertedInto): Deleted.
2864 (WebCore::SVGHKernElement::removedFrom): Deleted.
2865 * svg/SVGHKernElement.h:
2866 * svg/SVGToOTFFontConversion.cpp:
2867 * svg/SVGToOTFFontConversion.h:
2868 * svg/SVGVKernElement.cpp:
2869 (WebCore::SVGVKernElement::insertedInto): Deleted.
2870 (WebCore::SVGVKernElement::removedFrom): Deleted.
2871 * svg/SVGVKernElement.h:
2873 2016-03-12 Myles C. Maxfield <mmaxfield@apple.com>
2875 [OS X] Scrollbars of overflow:scroll divs should appear on the left on RTL systems
2876 https://bugs.webkit.org/show_bug.cgi?id=155385
2878 Reviewed by Simon Fraser.
2880 There is already some existing setup for RTL scrollbars. This patch hooks up this
2881 existing support to the OS X triggering mechanism introduced in r197956. It also
2882 fixes up the existing support to function even when the direction of the
2883 RTL-scrollbar div is LTR (this means the contents of the div must be pushed
2884 over by the width of the scrollbar).
2886 Tests: fast/scrolling/rtl-scrollbars-overflow-contents.html
2887 fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html
2888 fast/scrolling/rtl-scrollbars-overflow-padding.html
2889 fast/scrolling/rtl-scrollbars-overflow-simple.html
2890 fast/scrolling/rtl-scrollbars-overflow.html
2892 * rendering/RenderBlock.cpp:
2893 (WebCore::RenderBlock::addOverflowFromPositionedObjects):
2894 (WebCore::RenderBlock::logicalLeftOffsetForContent):
2895 (WebCore::RenderBlock::logicalRightOffsetForContent):
2896 * rendering/RenderBlockFlow.cpp:
2897 (WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
2898 * rendering/RenderBox.cpp:
2899 (WebCore::RenderBox::overflowClipRect):
2900 (WebCore::RenderBox::layoutOverflowRectForPropagation):
2901 * rendering/RenderLayer.cpp:
2902 (WebCore::RenderLayer::computeScrollDimensions):
2903 * rendering/style/RenderStyle.cpp:
2904 (WebCore::RenderStyle::shouldPlaceBlockDirectionScrollbarOnLogicalLeft):
2905 * rendering/style/RenderStyle.h:
2907 2016-03-12 Zalan Bujtas <zalan@apple.com>
2909 [Forms: focus] focus rings around text fields do not follow contour (border-radius)
2910 https://bugs.webkit.org/show_bug.cgi?id=154099
2911 rdar://problem/9988429
2913 Reviewed by Tim Horton.
2915 This patch enables outline-style: auto to follow the curve of border-radius.
2916 When both border-radius and outline-style: auto are set, the native focusring painting will take the border-radius values
2917 into account. This is only for outline-style: auto, other non-auto outline styles paint as if there
2918 was no border-radius set.
2919 It supports both single and multiline content with joint rectangles.
2920 However in case of disjoint rectangles, we fallback to the non-radius drawing.
2922 Tests: fast/inline/hidpi-outline-auto-with-border-radius-horizontal-ltr.html
2923 fast/inline/hidpi-outline-auto-with-border-radius-horizontal-rtl.html
2924 fast/inline/hidpi-outline-auto-with-border-radius-vertical-ltr.html
2925 fast/inline/hidpi-outline-auto-with-border-radius-vertical-rtl.html
2927 * platform/graphics/GraphicsContext.h:
2928 * platform/graphics/Path.cpp:
2929 (WebCore::Path::addBeziersForRoundedRect):
2930 * platform/graphics/Path.h:
2931 (WebCore::Path::circleControlPoint):
2932 * platform/graphics/PathUtilities.cpp:
2933 (WebCore::polygonsForRect):
2934 (WebCore::PathUtilities::pathsWithShrinkWrappedRects):
2935 (WebCore::startAndEndPointsForCorner):
2936 (WebCore::cornerType):
2937 (WebCore::controlPointsForBezierCurve):
2938 (WebCore::adjustedtRadiiForHuggingCurve):
2939 (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
2940 * platform/graphics/PathUtilities.h:
2941 * platform/graphics/mac/GraphicsContextMac.mm:
2942 (WebCore::GraphicsContext::drawFocusRing):
2943 * rendering/RenderElement.cpp:
2944 (WebCore::RenderElement::paintFocusRing):
2946 2016-03-11 Ryosuke Niwa <rniwa@webkit.org>
2948 Add Event.deepPath() and Event.scoped
2949 https://bugs.webkit.org/show_bug.cgi?id=153538
2950 <rdar://problem/24363836>
2952 Reviewed by Darin Adler.
2954 Added the support for deepPath(), scoped, and relatedTargetScoped on Event.prototype for shadow DOM:
2955 http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event-interface
2956 and updated the EventPath class to respect scoped and relatedTargetScoped flags as specified at:
2957 http://w3c.github.io/webcomponents/spec/shadow/#get-the-parent
2959 Tests: fast/shadow-dom/Extensions-to-Event-Interface.html
2960 fast/shadow-dom/trusted-event-scoped-flags.html
2962 * bindings/scripts/CodeGeneratorJS.pm:
2963 (GenerateConstructorDefinition): Added the support for Conditional for InitializedByEventConstructor.
2964 * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2965 * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
2966 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2967 * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
2968 * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
2969 * bindings/scripts/test/TestEventConstructor.idl: Added a test case for using InitializedByEventConstructor
2972 (WebCore::Event::Event): Initialize m_scoped and m_relatedTargetScoped from EventInit dictionary.
2973 (WebCore::Event::scoped): Added. Implements http://w3c.github.io/webcomponents/spec/shadow/#scoped-flag
2974 (WebCore::Event::deepPath): Added.
2976 (WebCore::Event::relatedTargetScoped): Added. Overridden by FocusEvent and MouseEvent to implement
2977 http://w3c.github.io/webcomponents/spec/shadow/#relatedtargetscoped-flag
2978 (WebCore::Event::setEventPath): Added.
2979 (WebCore::Event::clearEventPath): Added.
2980 * dom/Event.idl: Added scoped, relatedTargetScoped, and deepPath() conditionally enabled for shadow DOM.
2981 * dom/EventContext.h:
2982 (WebCore::EventContext::currentTarget):
2983 * dom/EventDispatcher.cpp:
2984 (WebCore::EventDispatcher::dispatchEvent): Set the event path while the event is being dispatched.
2985 * dom/EventPath.cpp:
2986 (WebCore::shouldEventCrossShadowBoundary): Check event.scoped flag instead of hard-coding a list of events here
2987 which has been moved to Event::scoped. See above.
2988 (WebCore::EventPath::setRelatedTarget): Check m_event.relatedTargetScoped() instead of hard-coding a list of
2989 events here. relatedTargetScoped is overridden by FocusEvent and MouseEvent.
2990 (WebCore::EventPath::hasEventListeners): Fixed the misleading variable name.
2991 (WebCore::isUnclosedNodeOf): Added. Implements http://w3c.github.io/webcomponents/spec/shadow/#dfn-unclosed-node
2992 (WebCore::EventPath::computePathDisclosedToTarget): Added. Implements the algorithm to filter event targets:
2993 http://w3c.github.io/webcomponents/spec/shadow/#widl-Event-deepPath-sequence-EventTarget
2995 * dom/FocusEvent.cpp:
2996 (WebCore::FocusEvent::relatedTargetScoped): Returns true when this is a trusted event per:
2997 http://w3c.github.io/webcomponents/spec/shadow/#relatedtargetscoped-flag
2999 * dom/MouseEvent.cpp:
3000 (WebCore::MouseEvent::relatedTargetScoped): Ditto.
3003 2016-03-11 John Wilander <wilander@apple.com>
3005 Move prevalent resource classifier from WebCore to WebKit.
3006 https://bugs.webkit.org/show_bug.cgi?id=155242
3007 <rdar://problem/24913272>
3009 Reviewed by Andy Estes.
3011 No new tests since we have yet to decide how to set up tests for prevalent resources.
3013 * loader/ResourceLoadObserver.cpp:
3014 (WebCore::ResourceLoadObserver::logFrameNavigation):
3015 (WebCore::ResourceLoadObserver::logSubresourceLoading):
3016 - Removed calls to old classifier in WebCore.
3017 * loader/ResourceLoadStatistics.cpp:
3018 (WebCore::encodeHashCountedSet):
3019 (WebCore::ResourceLoadStatistics::checkAndSetAsPrevalentResourceIfNecessary): Deleted.
3020 (WebCore::ResourceLoadStatistics::hasPrevalentResourceCharacteristics): Deleted.
3021 * loader/ResourceLoadStatistics.h:
3022 - Deleted old classification functions.
3023 * loader/ResourceLoadStatisticsStore.cpp:
3024 (WebCore::ResourceLoadStatisticsStore::create):
3025 (WebCore::ResourceLoadStatisticsStore::fireDataModificationHandler):
3026 (WebCore::ResourceLoadStatisticsStore::hasEnoughDataForStatisticsProcessing):
3027 - New function to allow for checks before calls to processStatistics.
3028 (WebCore::ResourceLoadStatisticsStore::processStatistics):
3029 - New function that receives a lamda and executes it on every entry in its statistics map.
3030 * loader/ResourceLoadStatisticsStore.h:
3032 2016-03-11 Jiewen Tan <jiewen_tan@apple.com>
3034 WebKit should not be redirected to an invalid URL
3035 https://bugs.webkit.org/show_bug.cgi?id=155263
3036 <rdar://problem/22820172>
3038 Reviewed by Brent Fulgham.
3040 Test: http/tests/navigation/redirect-to-invalid-url.html
3042 * loader/SubresourceLoader.cpp:
3043 (WebCore::SubresourceLoader::willSendRequestInternal):
3045 2016-03-10 Maksim Kisilev <mkisilev@yandex-team.ru>
3047 Fix typo in StyleTreeResolver.cpp
3048 https://bugs.webkit.org/show_bug.cgi?id=139946
3050 Reviewed by Andy Estes.
3052 The constructor for CheckForVisibilityChangeOnRecalcStyle was improperly comparing the
3053 result of WKContentChange() (which is not a function) to WKContentVisibilityChange. I
3054 believe the above cast would implicitly resolve to WKContentNoChange in all cases,
3055 whether a visibility change had been observed or not.
3057 This patch corrects this problem. I would expect that this might affect some content
3058 visibility change behavior, but I'm not sure what the appropriate test case would be
3059 since this was apparently found through code inspection.
3061 * style/StyleTreeResolver.cpp:
3062 (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle):
3064 2016-03-11 Chris Dumez <cdumez@apple.com>
3066 iOS-sim debug: WebCoreNSURLSessionTest.BasicOperation and WebCoreNSURLSessionTest.InvalidateEmpty asserting
3067 https://bugs.webkit.org/show_bug.cgi?id=155256
3069 Reviewed by Alexey Proskuryakov.
3071 r197628 consolidated the runtime application checking code for iOS and
3072 Mac. However, while the new code works fine for WebKit2, it is unsafe
3073 on WebKit1 / iOS and hits assertion in debug. The reason is that
3074 applicationBundleIdentifier() for getting called from several threads
3075 (WebThread, UIThread).
3077 To address the problem, this patch renames applicationBundleIdentifier()
3078 to applicationBundleIdentifierOverride() and only initializes the
3079 override upon WebProcess and Network process initialization. We therefore
3080 do not initialize the override in WebKit1 or in the WebKit2 UIProcess.
3081 When the override is not set, we fall back to using the main bundle
3082 identifier (which does the right thing for WebKit1 / WebKit2 UIProcess)
3083 but without caching it to avoid thread safety issues.
3085 No new tests, already covered by API tests currently crashing.
3087 * platform/RuntimeApplicationChecks.mm:
3088 (WebCore::applicationBundleIdentifierOverride):
3089 - Renamed applicationBundleIdentifier() to applicationBundleIdentifierOverride()
3090 and only initialize upon initialization of the WebProcess or the Network
3092 - In debug, set a flag to indicate that the override was already queried.
3094 (WebCore::applicationBundleIdentifier):
3095 New utility function that is returns the application bundle override if it is
3096 set and fallback to calling [[NSBundle mainBundle] bundleIdentifier] otherwise.
3098 (WebCore::setApplicationBundleIdentifier):
3099 Add assertions to make sure that:
3100 1. This is always called from the main thread.
3101 2. The application bundle identifier has not been queried *before* getting
3102 overriden as this would indicate a bug in our code and we would have wrongly
3103 returned the main bundle identifier in such case.
3105 (WebCore::MacApplication::isAppleMail):
3106 (WebCore::MacApplication::isIBooks):
3107 (WebCore::MacApplication::isITunes):
3108 (WebCore::MacApplication::isMicrosoftMessenger):
3109 (WebCore::MacApplication::isAdobeInstaller):
3110 (WebCore::MacApplication::isMicrosoftOutlook):
3111 (WebCore::MacApplication::isQuickenEssentials):
3112 (WebCore::MacApplication::isAperture):
3113 (WebCore::MacApplication::isVersions):
3114 (WebCore::MacApplication::isHRBlock):
3115 (WebCore::MacApplication::isHipChat):
3116 (WebCore::IOSApplication::isMobileSafari):
3117 (WebCore::IOSApplication::isDumpRenderTree):
3118 (WebCore::IOSApplication::isMobileStore):
3119 (WebCore::IOSApplication::isFacebook):
3120 (WebCore::IOSApplication::isDaijisenDictionary):
3121 (WebCore::IOSApplication::isNASAHD):
3122 (WebCore::IOSApplication::isTheEconomistOnIphone):
3123 (WebCore::IOSApplication::isWebProcess):
3124 (WebCore::IOSApplication::isIBooks):
3125 Drop assertions making sure the cached flag is correct. We now have
3126 an assertion to detect this earlier in setApplicationBundleIdentifier().
3128 2016-03-10 Jer Noble <jer.noble@apple.com>
3130 Web Audio becomes distorted after sample rate changes
3131 https://bugs.webkit.org/show_bug.cgi?id=154538
3132 <rdar://problem/24771292>
3134 Reviewed by Darin Adler.
3136 When the underlying audio hardware sample rate changes, the AudioUnit render callback will begin asking
3137 for fewer or more frames. For example, when the sample rate goes from 44.1kHz to 48kHz, it will ask for
3138 118 samples instead of 128. (And vice-versa, 140 samples instead of 128.) But the Web Audio engine can only
3139 really handle requests in multiples of 128 samples. In the case where there are requests for < 128 samples,
3140 actually render 128, but save off the unrequested samples in a separate bus. Then fill that bus during the
3143 * platform/audio/AudioBus.cpp:
3144 (WebCore::AudioBus::copyFromRange): Added utility method.
3145 * platform/audio/AudioBus.h:
3146 * platform/audio/ios/AudioDestinationIOS.cpp:
3147 (WebCore::AudioDestinationIOS::AudioDestinationIOS): Create a "spare" bus.
3148 (WebCore::assignAudioBuffersToBus): Moved from inside render.
3149 (WebCore::AudioDestinationIOS::render): Save off extra samples to the "spare" bus.
3150 * platform/audio/ios/AudioDestinationIOS.h:
3152 2016-03-11 Yusuke Suzuki <utatane.tea@gmail.com>
3154 Unreviewed build fix after r198023.
3155 https://bugs.webkit.org/show_bug.cgi?id=155024
3157 Reviewed by Geoffrey Garen.
3159 Update binding test results.
3161 * bindings/scripts/test/JS/JSTestObj.cpp:
3162 (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3163 (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3164 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3165 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3166 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3168 2016-03-11 Ryan Haddad <ryanhaddad@apple.com>
3170 Unreviewed, rolling out r197984.
3172 This change caused an existing LayoutTest to fail
3176 "WebKit should not be redirected to an invalid URL"
3177 https://bugs.webkit.org/show_bug.cgi?id=155263
3178 http://trac.webkit.org/changeset/197984
3180 2016-03-11 Yusuke Suzuki <utatane.tea@gmail.com>
3182 [ES6] Implement Reflect.set without receiver support
3183 https://bugs.webkit.org/show_bug.cgi?id=155024
3185 Reviewed by Geoffrey Garen.
3187 CustomSetter returns boolean value that indicates the result of [[Set]].
3188 According to this change, this patch modifies the CodeGeneratorJS and test results.
3190 Currently, DOM elements' [[Set]] return true when the setter is found.
3191 This is good for the first step.
3193 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3194 (WebCore::JSCSSStyleDeclaration::putDelegate):
3195 * bindings/js/JSDOMBinding.cpp:
3196 (WebCore::throwSetterTypeError):
3197 * bindings/js/JSDOMBinding.h:
3198 * bindings/js/JSDOMStringMapCustom.cpp:
3199 (WebCore::JSDOMStringMap::putDelegate):
3200 * bindings/js/JSDOMWindowBase.cpp:
3201 (WebCore::JSDOMWindowBase::updateDocument):
3202 * bindings/js/JSDOMWindowCustom.cpp:
3203 (WebCore::JSDOMWindow::put):
3204 (WebCore::JSDOMWindow::putByIndex):
3205 * bindings/js/JSHTMLAppletElementCustom.cpp:
3206 (WebCore::JSHTMLAppletElement::putDelegate):
3207 * bindings/js/JSHTMLEmbedElementCustom.cpp:
3208 (WebCore::JSHTMLEmbedElement::putDelegate):
3209 * bindings/js/JSHTMLObjectElementCustom.cpp:
3210 (WebCore::JSHTMLObjectElement::putDelegate):
3211 * bindings/js/JSLocationCustom.cpp:
3212 (WebCore::JSLocation::putDelegate):
3213 (WebCore::JSLocationPrototype::putDelegate):
3214 * bindings/js/JSPluginElementFunctions.cpp:
3215 (WebCore::pluginElementCustomPut):
3216 * bindings/js/JSPluginElementFunctions.h:
3217 * bindings/js/JSStorageCustom.cpp:
3218 (WebCore::JSStorage::putDelegate):
3219 * bindings/scripts/CodeGeneratorJS.pm:
3221 (GenerateImplementation):
3222 (GeneratePrototypeDeclaration):
3223 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3224 (WebCore::setJSTestActiveDOMObjectConstructor):
3225 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
3226 (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
3227 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3228 (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):
3229 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3230 (WebCore::setJSTestCustomNamedGetterConstructor):
3231 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3232 (WebCore::setJSTestEventConstructorConstructor):
3233 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3234 (WebCore::setJSTestEventTargetConstructor):
3235 * bindings/scripts/test/JS/JSTestException.cpp:
3236 (WebCore::setJSTestExceptionConstructor):
3237 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3238 (WebCore::setJSTestGenerateIsReachableConstructor):
3239 * bindings/scripts/test/JS/JSTestInterface.cpp:
3240 (WebCore::setJSTestInterfaceConstructor):
3241 (WebCore::JSTestInterface::put):
3242 (WebCore::JSTestInterface::putByIndex):
3243 (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
3244 (WebCore::setJSTestInterfaceImplementsStr2):
3245 (WebCore::setJSTestInterfaceImplementsStr3):
3246 (WebCore::setJSTestInterfaceImplementsNode):
3247 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3248 (WebCore::setJSTestInterfaceSupplementalStr2):
3249 (WebCore::setJSTestInterfaceSupplementalStr3):
3250 (WebCore::setJSTestInterfaceSupplementalNode):
3251 * bindings/scripts/test/JS/JSTestInterface.h:
3252 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3253 (WebCore::setJSTestJSBuiltinConstructorConstructor):
3254 (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
3255 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3256 (WebCore::setJSTestMediaQueryListListenerConstructor):
3257 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3258 (WebCore::setJSTestNamedConstructorConstructor):
3259 * bindings/scripts/test/JS/JSTestNode.cpp:
3260 (WebCore::setJSTestNodeConstructor):
3261 (WebCore::setJSTestNodeName):
3262 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3263 (WebCore::setJSTestNondeterministicConstructor):
3264 (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
3265 (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
3266 (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
3267 (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
3268 * bindings/scripts/test/JS/JSTestObj.cpp:
3269 (WebCore::setJSTestObjConstructor):
3270 (WebCore::setJSTestObjConstructorStaticStringAttr):
3271 (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
3272 (WebCore::setJSTestObjEnumAttr):
3273 (WebCore::setJSTestObjByteAttr):
3274 (WebCore::setJSTestObjOctetAttr):
3275 (WebCore::setJSTestObjShortAttr):
3276 (WebCore::setJSTestObjUnsignedShortAttr):
3277 (WebCore::setJSTestObjLongAttr):
3278 (WebCore::setJSTestObjLongLongAttr):
3279 (WebCore::setJSTestObjUnsignedLongLongAttr):
3280 (WebCore::setJSTestObjStringAttr):
3281 (WebCore::setJSTestObjTestObjAttr):
3282 (WebCore::setJSTestObjLenientTestObjAttr):
3283 (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyString):
3284 (WebCore::setJSTestObjXMLObjAttr):
3285 (WebCore::setJSTestObjCreate):
3286 (WebCore::setJSTestObjReflectedStringAttr):
3287 (WebCore::setJSTestObjReflectedIntegralAttr):
3288 (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
3289 (WebCore::setJSTestObjReflectedBooleanAttr):
3290 (WebCore::setJSTestObjReflectedURLAttr):
3291 (WebCore::setJSTestObjReflectedCustomIntegralAttr):
3292 (WebCore::setJSTestObjReflectedCustomBooleanAttr):
3293 (WebCore::setJSTestObjReflectedCustomURLAttr):
3294 (WebCore::setJSTestObjTypedArrayAttr):
3295 (WebCore::setJSTestObjAttrWithGetterException):
3296 (WebCore::setJSTestObjAttrWithGetterExceptionWithMessage):
3297 (WebCore::setJSTestObjAttrWithSetterException):
3298 (WebCore::setJSTestObjAttrWithSetterExceptionWithMessage):
3299 (WebCore::setJSTestObjStringAttrWithGetterException):
3300 (WebCore::setJSTestObjStringAttrWithSetterException):
3301 (WebCore::setJSTestObjStrictTypeCheckingAttribute):
3302 (WebCore::setJSTestObjCustomAttr):
3303 (WebCore::setJSTestObjOnfoo):
3304 (WebCore::setJSTestObjWithScriptStateAttribute):
3305 (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
3306 (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3307 (WebCore::setJSTestObjWithScriptStateAttributeRaises):
3308 (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3309 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3310 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3311 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3312 (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
3313 (WebCore::setJSTestObjConditionalAttr1):
3314 (WebCore::setJSTestObjConditionalAttr2):
3315 (WebCore::setJSTestObjConditionalAttr3):
3316 (WebCore::setJSTestObjConditionalAttr4Constructor):
3317 (WebCore::setJSTestObjConditionalAttr5Constructor):
3318 (WebCore::setJSTestObjConditionalAttr6Constructor):
3319 (WebCore::setJSTestObjAnyAttribute):
3320 (WebCore::setJSTestObjMutablePoint):
3321 (WebCore::setJSTestObjImmutablePoint):
3322 (WebCore::setJSTestObjStrawberry):
3323 (WebCore::setJSTestObjStrictFloat):
3324 (WebCore::setJSTestObjId):
3325 (WebCore::setJSTestObjReplaceableAttribute):
3326 (WebCore::setJSTestObjNullableLongSettableAttribute):
3327 (WebCore::setJSTestObjNullableStringSettableAttribute):
3328 (WebCore::setJSTestObjNullableStringValue):
3329 (WebCore::setJSTestObjAttributeWithReservedEnumType):
3330 (WebCore::setJSTestObjPutForwardsAttribute):
3331 (WebCore::setJSTestObjPutForwardsNullableAttribute):
3332 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3333 (WebCore::setJSTestOverloadedConstructorsConstructor):
3334 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3335 (WebCore::setJSTestOverrideBuiltinsConstructor):
3336 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3337 (WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
3338 (WebCore::setJSTestSerializedScriptValueInterfaceValue):
3339 (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
3340 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3341 (WebCore::setJSTestTypedefsConstructor):
3342 (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
3343 (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
3344 (WebCore::setJSTestTypedefsAttrWithGetterException):
3345 (WebCore::setJSTestTypedefsAttrWithSetterException):
3346 (WebCore::setJSTestTypedefsStringAttrWithGetterException):
3347 (WebCore::setJSTestTypedefsStringAttrWithSetterException):
3348 * bindings/scripts/test/JS/JSattribute.cpp:
3349 (WebCore::setJSattributeConstructor):
3350 * bindings/scripts/test/JS/JSreadonly.cpp:
3351 (WebCore::setJSreadonlyConstructor):
3352 * bridge/c/c_runtime.cpp:
3353 (JSC::Bindings::CField::setValueToInstance):
3354 * bridge/c/c_runtime.h:
3355 * bridge/jsc/BridgeJSC.h:
3356 (JSC::Bindings::Instance::put):
3357 * bridge/objc/objc_runtime.h:
3358 * bridge/objc/objc_runtime.mm:
3359 (JSC::Bindings::ObjcField::setValueToInstance):
3360 (JSC::Bindings::ObjcArray::setValueAt):
3361 (JSC::Bindings::ObjcFallbackObjectImp::put):
3362 * bridge/runtime_array.cpp:
3363 (JSC::RuntimeArray::put):
3364 (JSC::RuntimeArray::putByIndex):
3365 * bridge/runtime_array.h:
3366 * bridge/runtime_object.cpp:
3367 (JSC::Bindings::RuntimeObject::put):
3368 * bridge/runtime_object.h:
3370 2016-03-11 David Kilzer <ddkilzer@apple.com>
3372 REGRESSION (r197956): WebContent process crashes on launch due to unrecognized selector
3373 <http://webkit.org/b/155356>
3375 Reviewed by Alexey Proskuryakov.
3377 * platform/mac/ScrollableAreaMac.mm:
3378 (WebCore::ScrollableArea::systemLanguageIsRTL): Add
3379 -respondsToSelector: check.
3381 2016-03-11 Youenn Fablet <youenn.fablet@crf.canon.fr>
3383 WTF should have a similar function as equalLettersIgnoringASCIICase to match beginning of strings
3384 https://bugs.webkit.org/show_bug.cgi?id=153419
3386 Reviewed by Darin Adler.
3388 Covered by added unint tests.
3390 * Modules/fetch/FetchHeaders.cpp:
3391 (WebCore::isForbiddenHeaderName): Using startsWithLettersIgnoringASCIICase.
3393 2016-03-11 Youenn Fablet <youenn.fablet@crf.canon.fr>
3395 [Fetch API] Use DeferredWrapper directly in FetchBody promise handling
3396 https://bugs.webkit.org/show_bug.cgi?id=155291
3398 Reviewed by Darin Adler.
3400 Moved from typed DOMPromise to DeferredWrapper as there can only be one promise resolved.
3401 Started preparing the handling of blobs translation to other resolved types.
3403 Fixed the case of empty body, in which case promises should resolve with empty objects (strings, buffers...) and not null.
3405 Added Consumer structure to handle asynchronous resolution/rejection of promises.
3406 Added preliminary API to resolve promises based on data stored as a Blob.
3407 FetchBodyOwner will be responsible to do/stop blob loading.
3409 Tests: imported/w3c/web-platform-tests/fetch/api/request/request-consume-empty.html
3410 imported/w3c/web-platform-tests/fetch/api/response/response-consume-empty.html
3412 * Modules/fetch/FetchBody.cpp:
3413 (WebCore::FetchBody::processIfEmptyOrDisturbed): Fixed empty body case.
3414 (WebCore::FetchBody::arrayBuffer):
3415 (WebCore::FetchBody::blob):
3416 (WebCore::FetchBody::json):
3417 (WebCore::FetchBody::text):