1 2016-06-17 Frederic Wang <fwang@igalia.com>
3 MathOperator: Add fallback mechanisms for stretching and mirroring radical symbols
4 https://bugs.webkit.org/show_bug.cgi?id=156836
6 Reviewed by Sergio Villar Senin.
8 Some platforms do not have OpenType MATH fonts pre-installed and thus can not draw stretchy
9 operators using size variants or glyph assembly. This is especially problematic for the
10 radical symbol which is used to write roots. Currently, we have some fallback code to draw
11 that symbol using graphical primitives but it is a bit complex and makes the style of radical
12 inconsistent with the font used. We solve these issues by just scaling the base glyph via a
13 scale transform. Such scale transform is also used to mirror the radical symbol so that we
14 have some support for right-to-left roots until we can do glyph-level mirroring
15 via the OpenType rtlm feature.
17 Test: mathml/radical-fallback.html
19 * rendering/mathml/MathOperator.cpp: Add a constant for the code point U+221A of the radical.
20 (WebCore::MathOperator::reset): In general, we don't need any vertical scaling for radical
21 symbols so m_radicalVerticalScale is initialized to 1.
22 (WebCore::MathOperator::calculateStretchyData): If we don't have a font with a MATH table and we
23 try streching a radical, then we update the vertical metrics to match the target size and
24 set m_radicalVerticalScale to the value necessary to make the base glyph scaled to that size.
25 (WebCore::MathOperator::paint): For a radical operator, we may apply a scale transform of
26 parameters (radicalHorizontalScale, m_radicalVerticalScale) in order to support RTL
27 mirroring or vertical stretching.
28 * rendering/mathml/MathOperator.h: We add a m_radicalVerticalScale member to indicate the
29 scaling to apply to the base radical glyph when the stretchy fallback is necessary.
30 (WebCore::MathOperator::isStretched): The operator is also considered stretched when the
31 m_radicalVerticalScale is applied to the base size.
32 * rendering/mathml/RenderMathMLRadicalOperator.cpp: Remove code specific to the old fallback mechanism.
33 * rendering/mathml/RenderMathMLRadicalOperator.h: Ditto.
35 2016-06-16 Commit Queue <commit-queue@webkit.org>
37 Unreviewed, rolling out r202147.
38 https://bugs.webkit.org/show_bug.cgi?id=158867
40 Broke scrolling tests on iOS Simulator (Requested by ap on
45 "Focus event dispatched in iframe causes parent document to
47 https://bugs.webkit.org/show_bug.cgi?id=158629
48 http://trac.webkit.org/changeset/202147
50 2016-06-16 Benjamin Poulain <bpoulain@apple.com>
52 :in-range & :out-of-range CSS pseudo-classes shouldn't match disabled or readonly inputs
53 https://bugs.webkit.org/show_bug.cgi?id=156530
55 Reviewed by Simon Fraser.
57 Elements should only match :in-range and :out-of-range
58 when they are candidate for constraint validation.
60 Tests: fast/css/pseudo-in-range-on-disabled-input-basics.html
61 fast/css/pseudo-in-range-on-readonly-input-basics.html
62 fast/css/pseudo-in-range-out-of-range-on-disabled-input-trivial.html
63 fast/css/pseudo-out-of-range-on-disabled-input-basics.html
64 fast/css/pseudo-out-of-range-on-readonly-input-basics.html
65 fast/selectors/in-range-out-of-range-style-update.html
67 * html/BaseDateAndTimeInputType.cpp:
68 (WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged):
69 * html/NumberInputType.cpp:
70 (WebCore::NumberInputType::minOrMaxAttributeChanged):
71 I forgot to handle style update in r202143.
72 This is covered by the new style invalidation test.
74 * html/BaseDateAndTimeInputType.h:
75 * html/HTMLInputElement.cpp:
76 (WebCore::HTMLInputElement::isInRange):
77 (WebCore::HTMLInputElement::isOutOfRange):
79 2016-06-16 Frederic Wang <fwang@igalia.com>
81 Add separate MathOperator for selection/measuring/drawing of stretchy operators
82 https://bugs.webkit.org/show_bug.cgi?id=152244
84 Reviewed by Brent Fulgham.
86 We complete the class to select, measure and draw stretchy operators that is independent
87 from RenderMathMLOperator. That way, we will be able use stretchy operator without having
88 to introduce & manage anonymous RenderMathMLOperator's
89 (e.g for <mroot>, <msqrt> and <mfenced>).
91 No new tests, already covered by existing tests.
93 * rendering/mathml/MathOperator.cpp:
94 (WebCore::ascentForGlyph): Add this helper function to get glyph ascent.
95 (WebCore::descentForGlyph): Add this helper function to get glyph descent.
96 (WebCore::MathOperator::reset): Initialize all the data and calculate ascent/descent of the
98 (WebCore::MathOperator::setSizeVariant): Set the width/ascent/descent.
99 (WebCore::MathOperator::setGlyphAssembly): Ditto.
100 (WebCore::MathOperator::calculateDisplayStyleLargeOperator): Remove the STIX Word hack and
101 change m_maxPreferredWidth to use the actual width instead.
102 (WebCore::MathOperator::stretchTo): New functions to execute the actual operator streching.
103 (WebCore::MathOperator::fillWithVerticalExtensionGlyph): Add a FIXME for bug 155434.
104 (WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Align all the glyph baselines on
105 the same axis, given by m_ascent.
106 Add a FIXME for bug 155434.
107 (WebCore::MathOperator::paintHorizontalGlyphAssembly): Ditto.
108 (WebCore::MathOperator::paint): Public function to do the painting.
109 (WebCore::MathOperator::paintVerticalGlyphAssembly): Deleted.
110 * rendering/mathml/MathOperator.h: Update declarations and make most of the members private.
111 (WebCore::MathOperator::ascent): Function to expose m_ascent.
112 (WebCore::MathOperator::descent): Function to expose m_descent.
113 * rendering/mathml/RenderMathMLOperator.cpp:
114 (WebCore::RenderMathMLOperator::stretchTo): Forward the stretching call to MathOperator.
115 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Unfold advanceForGlyph
116 since we delete RenderMathMLOperator::advanceForGlyph. Just rely on
117 MathOperator::maxPreferredWidth to determine the preferred width of stretchy operators.
118 For horizontal operators, we just use the width of the base glyph.
119 Finally, we remove the dirty flag on preferred logical width.
120 (WebCore::RenderMathMLOperator::rebuildTokenContent): Reinit the MathOperator instance.
121 (WebCore::RenderMathMLOperator::updateFromElement): Force more updates of
122 RenderMathMLOperator to avoid test breakage.
123 (WebCore::RenderMathMLOperator::styleDidChange): Call MathOperator::reset to take into
124 account style change.
125 (WebCore::RenderMathMLOperator::updateStyle): Remove unused code.
126 (WebCore::RenderMathMLOperator::firstLineBaseline): Use MathOperator::ascent() function.
127 (WebCore::RenderMathMLOperator::computeLogicalHeight): Use MathOperator::ascent() and
128 MathOperator::descent() functions to calculate the height.
129 (WebCore::RenderMathMLOperator::paint): Only stretched operators are treated specially.
130 We center horizontal operator and forward the paint() call to MathOperator.
131 (WebCore::RenderMathMLOperator::trailingSpaceError): The error is now just the difference
132 between the values returned by MathOperator::maxPreferredWidth() and
133 MathOperator::width().
134 (WebCore::boundsForGlyph): Deleted.
135 (WebCore::heightForGlyph): Deleted.
136 (WebCore::advanceWidthForGlyph): Deleted.
137 (WebCore::RenderMathMLOperator::updateStyle): Deleted.
139 2016-06-16 Jiewen Tan <jiewen_tan@apple.com>
141 CSP: Content Security Policy should allow '*' to match the originating page's scheme
142 https://bugs.webkit.org/show_bug.cgi?id=158811
143 <rdar://problem/26819568>
145 Reviewed by Daniel Bates.
147 Tests: security/contentSecurityPolicy/image-with-file-url-allowed-by-img-src-star.html
148 security/contentSecurityPolicy/link-with-file-url-allowed-by-style-src-star.html
149 security/contentSecurityPolicy/script-with-file-url-allowed-by-script-src-star.html
150 security/contentSecurityPolicy/video-with-file-url-allowed-by-media-src-star.html
152 * page/csp/ContentSecurityPolicySourceList.cpp:
153 (WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar):
155 2016-06-16 Chris Dumez <cdumez@apple.com>
157 Add HTTPHeaderMap::set() overload taking a NSString*
158 https://bugs.webkit.org/show_bug.cgi?id=158857
160 Reviewed by Darin Adler.
162 Add HTTPHeaderMap::set() overloading taking a NSString* in addition to
163 the one taking a CFStringRef. It is useful for the Cocoa implementation
164 of ResourceRequest::doUpdateResourceRequest().
166 * platform/network/HTTPHeaderMap.h:
167 (WebCore::HTTPHeaderMap::set):
169 2016-06-16 Joseph Pecoraro <pecoraro@apple.com>
171 Web Inspector: console.profile should use the new Sampling Profiler
172 https://bugs.webkit.org/show_bug.cgi?id=153499
173 <rdar://problem/24352431>
175 Reviewed by Timothy Hatcher.
177 Test: inspector/timeline/setInstruments-programmatic-capture.html
179 * inspector/InspectorTimelineAgent.cpp:
180 (WebCore::InspectorTimelineAgent::startFromConsole):
181 (WebCore::InspectorTimelineAgent::stopFromConsole):
182 (WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
183 (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
184 (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
185 (WebCore::InspectorTimelineAgent::toggleInstruments):
186 (WebCore::InspectorTimelineAgent::toggleScriptProfilerInstrument):
187 (WebCore::InspectorTimelineAgent::toggleHeapInstrument):
188 (WebCore::InspectorTimelineAgent::toggleMemoryInstrument):
189 (WebCore::InspectorTimelineAgent::toggleTimelineInstrument):
190 * inspector/InspectorTimelineAgent.h:
191 Web implementation of console.profile/profileEnd.
192 Make helpers for startings / stopping instruments.
194 2016-06-16 John Wilander <wilander@apple.com>
196 Restrict security origin inheritance to empty, about:blank, and about:srcdoc URLs
197 https://bugs.webkit.org/show_bug.cgi?id=158855
198 <rdar://problem/26142632>
200 Reviewed by Alex Christensen.
202 Tests: http/tests/dom/window-open-about-blank-and-access-document.html
203 http/tests/dom/window-open-about-webkit-org-and-access-document.html
205 Document.cpp previously checked whether a document should inherit its owner's
206 security origin by checking if the URL is either empty or blank. URL.cpp in
207 turn only checks if the protocol is "about:" in the isBlankURL() function.
208 Thus all about:* URLs inherited security origin. This patch restricts
209 security origin inheritance to empty, about:blank, and about:srcdoc URLs.
211 Quotes and links from the WHATWG spec regarding about:srcdoc:
213 7.1 Browsing contexts
214 A browsing context can have a creator browsing context, the browsing context
215 that was responsible for its creation. If a browsing context has a parent
216 browsing context, then that is its creator browsing context. Otherwise, if the
217 browsing context has an opener browsing context, then that is its creator
218 browsing context. Otherwise, the browsing context has no creator browsing
220 https://html.spec.whatwg.org/multipage/browsers.html#concept-document-bc
222 7.1.1 Nested browsing contexts
223 Certain elements (for example, iframe elements) can instantiate further
224 browsing contexts. These are called nested browsing contexts. If a browsing
225 context P has a Document D with an element E that nests another browsing
226 context C inside it, then C is said to be nested through D, and E is said to
227 be the browsing context container of C. If the browsing context container
228 element E is in the Document D, then P is said to be the parent browsing
229 context of C and C is said to be a child browsing context of P. Otherwise,
230 the nested browsing context C has no parent browsing context.
231 https://html.spec.whatwg.org/multipage/browsers.html#nested-browsing-context
233 4.8.5 The iframe element
234 The iframe element represents a nested browsing context.
236 If the srcdoc attribute is specified
237 Navigate the element's child browsing context to a new response whose
238 url list consists of about:srcdoc ...
239 https://html.spec.whatwg.org/multipage/embedded-content.html#attr-iframe-srcdoc
242 (WebCore::Document::initSecurityContext):
243 Now uses the URL::shouldInheritSecurityOriginFromOwner() function instead.
244 (WebCore::Document::initContentSecurityPolicy):
245 Now uses the URL::shouldInheritSecurityOriginFromOwner() function instead.
246 (WebCore::shouldInheritSecurityOriginFromOwner): Deleted.
247 Moved to URL::shouldInheritSecurityOriginFromOwner() and restricted the check.
249 (WebCore::URL::shouldInheritSecurityOriginFromOwner):
251 Moved the function from Document and restricted the check to only allow
252 security origin inheritance for empty, about:blank, and about:srcdoc URLs.
254 2016-06-16 Simon Fraser <simon.fraser@apple.com>
256 [iOS] Focus event dispatched in iframe causes parent document to scroll incorrectly
257 https://bugs.webkit.org/show_bug.cgi?id=158629
258 rdar://problem/26521616
260 Reviewed by Enrica Casucci.
262 When focussing elements in iframes, the page could scroll to an incorrect location.
263 This happened because code in Element::focus() tried to disable scrolling on focus,
264 but did so only for the current frame, so ancestor frames got programmatically scrolled.
265 On iOS we handle the scrolling in the UI process, so never want the web process to
266 do programmatic scrolling.
268 Fix by changing the focus and cache restore code to use SelectionRevealMode::DoNotReveal,
269 rather than manually prohibiting frame scrolling.
271 Tests: fast/forms/ios/focus-input-in-iframe.html
272 fast/forms/ios/programmatic-focus-input-in-iframe.html
275 (WebCore::Element::focus):
276 * history/CachedPage.cpp:
277 (WebCore::CachedPage::restore):
279 2016-06-16 Zalan Bujtas <zalan@apple.com>
281 [New Block-Inside-Inline Model] Do not attempt to re-run margin collapsing on the block sequence.
282 https://bugs.webkit.org/show_bug.cgi?id=158854
284 Reviewed by David Hyatt.
286 Test: fast/block/inside-inlines/crash-on-first-line-change.html
288 * rendering/RenderBlockLineLayout.cpp:
289 (WebCore::RenderBlockFlow::marginCollapseLinesFromStart):
291 2016-06-16 Ting-Wei Lan <lantw44@gmail.com>
293 Include cstdlib before using std::atexit
294 https://bugs.webkit.org/show_bug.cgi?id=158681
296 Reviewed by Brent Fulgham.
298 * platform/graphics/PlatformDisplay.cpp:
300 2016-06-16 Chris Dumez <cdumez@apple.com>
302 Use StringView::toAtomicString() in HTMLImageElement::setBestFitURLAndDPRFromImageCandidate()
303 https://bugs.webkit.org/show_bug.cgi?id=158853
305 Reviewed by Brent Fulgham.
307 Use StringView::toAtomicString() in HTMLImageElement::setBestFitURLAndDPRFromImageCandidate()
308 as m_bestFitImageURL data member is an AtomicString. This avoids constructing a String and
311 * html/HTMLImageElement.cpp:
312 (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
314 2016-06-16 Benjamin Poulain <bpoulain@apple.com>
316 :in-range & :out-of-range CSS pseudo-classes shouldn't match inputs without range limitations
317 https://bugs.webkit.org/show_bug.cgi?id=156558
319 Reviewed by Simon Fraser.
321 The pseudo selectors :in-range and :out-of-range should only
323 -minimum/maximum are defined for the input type
324 -the input value is/is-not suffering from underflow/overflow.
326 Only certain types have a valid minimum and maximum:
335 Of those, only one has a default minimum and maximum: range.
336 For all the others, the minimum or maximum is only defined
337 if the min/max attribute is defined and valid.
339 This patch addresses these constraints for number and range.
340 The date types range validation is severely broken and is
341 left untouched. It really needs a clean rewrite.
343 Tests: fast/css/pseudo-in-range-basics.html
344 fast/css/pseudo-in-range-out-of-range-trivial.html
345 fast/css/pseudo-out-of-range-basics.html
347 * html/DateInputType.cpp:
348 (WebCore::DateInputType::createStepRange):
349 * html/DateTimeInputType.cpp:
350 (WebCore::DateTimeInputType::createStepRange):
351 * html/DateTimeLocalInputType.cpp:
352 (WebCore::DateTimeLocalInputType::createStepRange):
353 * html/InputType.cpp:
354 (WebCore::InputType::isInRange):
355 (WebCore::InputType::isOutOfRange):
356 Notice the isEmpty() shortcut.
357 A value can only overflow/underflow if it is not empty.
359 * html/MonthInputType.cpp:
360 (WebCore::MonthInputType::createStepRange):
361 * html/NumberInputType.cpp:
362 (WebCore::NumberInputType::createStepRange):
363 * html/RangeInputType.cpp:
364 (WebCore::RangeInputType::createStepRange):
365 * html/StepRange.cpp:
366 (WebCore::StepRange::StepRange):
368 (WebCore::StepRange::hasRangeLimitations):
369 * html/WeekInputType.cpp:
370 (WebCore::WeekInputType::createStepRange):
372 2016-06-16 Anders Carlsson <andersca@apple.com>
374 Fix macOS Sierra build
375 https://bugs.webkit.org/show_bug.cgi?id=158849
377 Reviewed by Tim Horton.
379 Add WebCore:: qualifiers for IOSurface, to avoid conflicts with the IOSurface Objective-C class.
381 Also, add an asLayerContents() getter that will return an id that's suitable for setting
382 as the contents of a CALayer.
384 * platform/graphics/cocoa/IOSurface.h:
385 * platform/graphics/cocoa/IOSurface.mm:
387 2016-06-16 Andreas Kling <akling@apple.com>
389 REGRESSION(r196217): 3% JSBench regression on iPhone 5.
390 <https://webkit.org/b/158848>
391 <rdar://problem/26609622>
395 Don't jettison linked code on every top-level navigation as that was hurting JSBench on iPhone 5.
397 * loader/FrameLoader.cpp:
398 (WebCore::FrameLoader::commitProvisionalLoad):
400 2016-06-16 Adam Bergkvist <adam.bergkvist@ericsson.com>
402 WebRTC: Check type of this in RTCPeerConnection JS built-in functions
403 https://bugs.webkit.org/show_bug.cgi?id=151303
405 Reviewed by Youenn Fablet.
407 Check type of 'this' in RTCPeerConnection JS built-in functions.
409 Test: fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html
411 * Modules/mediastream/RTCPeerConnection.js:
414 (setLocalDescription):
415 (setRemoteDescription):
418 Reject if 'this' isn't of type RTCPeerConnection.
419 * Modules/mediastream/RTCPeerConnectionInternals.js:
420 (isRTCPeerConnection):
421 Add helper function to perform type check. Needs further robustifying.
423 2016-06-16 Myles C. Maxfield <mmaxfield@apple.com>
425 Sporadic crash in HashTableAddResult following CSSValuePool::createFontFamilyValue
426 https://bugs.webkit.org/show_bug.cgi?id=158297
428 Reviewed by Darin Adler.
430 In an effort to reduce the flash of unstyled content, we force all elements
431 to have display: none during an external stylesheet load. We do this by
432 ignoring the CSS cascade and forcing all elements to have a placeholder style
433 which hardcodes display: none. (This is necessary to make elements created by
434 script during the stylesheet load not flash.)
436 This style is exposed to web content via getComputedStyle(), which means it
437 needs to maintain the invariant that font-families can never be null strings.
438 We enforce this by forcing the font-family to be the standard font name.
440 Test: fast/text/placeholder-renderstyle-null-font.html
442 * style/StyleTreeResolver.cpp:
443 (WebCore::Style::ensurePlaceholderStyle):
445 2016-06-16 Chris Dumez <cdumez@apple.com>
447 Avoid some temporary String allocations for common HTTP headers in ResourceResponse::platformLazyInit()
448 https://bugs.webkit.org/show_bug.cgi?id=158827
450 Reviewed by Darin Adler.
452 Add a HTTPHeaderMap::set() overload taking in a CFStringRef. The
453 implementation has a fast path which gets the internal characters
454 of the CFStringRef when possible and constructs a StringView for
455 it in order to call findHTTPHeaderName(). As a result, we avoid
456 allocating a temporary String when findHTTPHeaderName() succeeds.
458 This new HTTPHeaderMap::set() overload is called from both the
459 CF and Cocoa implementations of ResourceResponse::platformLazyInit().
461 I have confirmed locally on both Mac and iOS that the fast path
462 is used ~93% of the time. CFStringGetCStringPtr() returns null in
463 rare cases, causing the regular code path to be used.
465 * platform/network/HTTPHeaderMap.cpp:
466 (WebCore::HTTPHeaderMap::set):
467 * platform/network/HTTPHeaderMap.h:
469 2016-06-15 Zalan Bujtas <zalan@apple.com>
471 Decouple the percent height and positioned descendants maps.
472 https://bugs.webkit.org/show_bug.cgi?id=158773
474 Reviewed by David Hyatt and Chris Dumez.
476 We track renderers with percent height across multiple containers using
477 HashMap<const RenderBox*, std::unique_ptr<HashSet<const RenderBlock*>>>.
478 We also use the same data structure to track positioned descendants.
479 However a positioned renderer can have only one containing block so tracking it
480 with a 1:many type is defective.
481 It allows multiple inserts for positioned descendants, which could lead to
482 inconsistent layout state as the rendering logic expects these type of renderers
483 with only one containing block.
484 This patch decouples percent height and positioned tracking by introducing
485 the PositionedDescendantsMap class. This class is responsible for tracking
486 the positioned descendants inbetween layouts.
488 No change in functionality.
490 Tests: fast/block/positioning/change-containing-block-for-absolute-positioned.html
491 fast/block/positioning/change-containing-block-for-fixed-positioned.html
493 * rendering/RenderBlock.cpp:
494 (WebCore::insertIntoTrackedRendererMaps):
495 (WebCore::removeFromTrackedRendererMaps):
496 (WebCore::PositionedDescendantsMap::addDescendant): Add more defensive ASSERT_NOT_REACHED
497 to the double insert branch when webkit.org/b/158772 gets fixed.
498 (WebCore::PositionedDescendantsMap::removeDescendant):
499 (WebCore::PositionedDescendantsMap::removeContainingBlock):
500 (WebCore::PositionedDescendantsMap::positionedRenderers):
501 (WebCore::positionedDescendantsMap):
502 (WebCore::removeBlockFromPercentageDescendantAndContainerMaps):
503 (WebCore::RenderBlock::~RenderBlock):
504 (WebCore::RenderBlock::positionedObjects):
505 (WebCore::RenderBlock::insertPositionedObject):
506 (WebCore::RenderBlock::removePositionedObject):
507 (WebCore::RenderBlock::addPercentHeightDescendant):
508 (WebCore::RenderBlock::removePercentHeightDescendant):
509 (WebCore::RenderBlock::percentHeightDescendants):
510 (WebCore::RenderBlock::checkPositionedObjectsNeedLayout):
511 (WebCore::removeBlockFromDescendantAndContainerMaps): Deleted.
512 * rendering/RenderBlock.h:
514 2016-06-15 David Kilzer <ddkilzer@apple.com>
516 Move SoftLinking.h to platform/cococa from platform/mac
517 <https://webkit.org/b/158825>
519 Reviewed by Andy Estes.
521 * PlatformMac.cmake: Update for new directory.
522 * WebCore.xcodeproj/project.pbxproj: Ditto.
523 * platform/cocoa/SoftLinking.h: Renamed from Source/WebCore/platform/mac/SoftLinking.h.
525 2016-06-15 Chris Dumez <cdumez@apple.com>
527 [Cocoa] Clean up / optimize ResourceResponse::platformLazyInit(InitLevel)
528 https://bugs.webkit.org/show_bug.cgi?id=158809
530 Reviewed by Darin Adler.
532 Clean up / optimize ResourceResponse::platformLazyInit(InitLevel).
534 * platform/network/HTTPParsers.cpp:
535 (WebCore::extractReasonPhraseFromHTTPStatusLine):
536 * platform/network/HTTPParsers.h:
537 Have extractReasonPhraseFromHTTPStatusLine() return an AtomicString as the
538 Reason is stored as an AtomicString on ResourceResponse. Have the
539 implementation use StringView::subString()::toAtomicString().
541 * platform/network/cocoa/ResourceResponseCocoa.mm:
542 (WebCore::stripLeadingAndTrailingDoubleQuote):
543 Move the stripLeadingAndTrailingDoubleQuote logic from platformLazyInit()
544 to its own function. Have it use StringView::subString()::toAtomicString()
545 to avoid unnecessarily atomizing the textEncodingName that has surrounding
548 (WebCore::initializeHTTPHeaders):
549 Move HTTP headers initialization to its own function for clarity.
551 (WebCore::extractHTTPStatusText):
552 Move HTTP status Text extraction to its own function for clarity.
554 (WebCore::ResourceResponse::platformLazyInit):
555 - The function is streamlined a bit because most of the logic was moved
556 into separate functions.
557 - Drop unnecessary (initLevel >= CommonFieldsOnly) check in the first
558 if case and replace with an assertion. This function is always called
559 with CommonFieldsOnly or above (AllFields).
560 - Drop unnecessary (m_initLevel < AllFields) check in the second if
561 case as this is always true. If not, we would have returned early
562 at the beginning of the function when checking
563 m_initLevel >= initLevel.
564 - Use AutodrainedPool instead of NSAutoreleasePool for convenience and have
565 only 1 pool instead of 2.
566 - Drop unnecessary copyNSURLResponseStatusLine() function and call directly
567 CFHTTPMessageCopyResponseStatusLine() since we already have a
568 CFHTTPMessageRef at the call site.
570 2016-06-15 Tim Horton <timothy_horton@apple.com>
572 <attachment> elements jump around a lot around when subtitle text changes slightly
573 https://bugs.webkit.org/show_bug.cgi?id=158818
574 <rdar://problem/24450270>
576 Reviewed by Simon Fraser.
578 Test: fast/attachment/attachment-subtitle-resize.html
580 * rendering/RenderAttachment.cpp:
581 (WebCore::RenderAttachment::layout):
582 * rendering/RenderAttachment.h:
583 * rendering/RenderThemeMac.mm:
584 (WebCore::AttachmentLayout::AttachmentLayout):
585 (WebCore::RenderThemeMac::paintAttachment):
586 In order to avoid changes to the centered subtitle text causing the whole
587 attachment to bounce around a lot, make it so that attachment width can only
588 increase, never decrease, and round the subtitle's width up to the nearest
589 increment of 10px when determining its affect on the whole element's width.
590 Also, center the attachment in its element, instead of left-aligning it,
591 so that the extra width we may have is evenly distributed between the two sides.
593 2016-06-15 Ryan Haddad <ryanhaddad@apple.com>
595 Reset bindings test results after r202105
597 Unreviewed test gardening.
599 * bindings/scripts/test/JS/JSTestObj.cpp:
601 2016-06-15 Adam Bergkvist <adam.bergkvist@ericsson.com>
603 WebRTC: (Refactor) Align the structure of RTCPeerConnection.idl with the header file
604 https://bugs.webkit.org/show_bug.cgi?id=158779
606 Reviewed by Eric Carlson.
608 Restructure RTCPeerConnection.idl to make it easer to read and extend in the future.
610 No change in behavior.
612 * Modules/mediastream/RTCPeerConnection.idl:
614 2016-06-15 Chris Dumez <cdumez@apple.com>
616 Drop some unnecessary header includes
617 https://bugs.webkit.org/show_bug.cgi?id=158788
619 Reviewed by Alexey Proskuryakov.
621 Drop some unnecessary header includes in headers to speed up build time.
623 * Modules/encryptedmedia/MediaKeySession.cpp:
624 * Modules/gamepad/GamepadManager.cpp:
625 * Modules/indexeddb/IDBDatabase.cpp:
626 * Modules/indexeddb/IDBOpenDBRequest.cpp:
627 * Modules/indexeddb/IDBRequest.cpp:
628 * Modules/indexeddb/IDBTransaction.cpp:
629 * Modules/mediasource/MediaSource.cpp:
630 * Modules/mediasource/SourceBuffer.cpp:
631 * Modules/mediasource/SourceBufferList.cpp:
632 * Modules/mediastream/MediaStream.cpp:
633 * Modules/mediastream/MediaStreamTrack.cpp:
634 * Modules/speech/SpeechSynthesis.cpp:
635 * Modules/webaudio/AudioScheduledSourceNode.cpp:
636 * Modules/webaudio/ScriptProcessorNode.cpp:
637 * bindings/scripts/CodeGeneratorJS.pm:
638 (GenerateImplementation):
639 * dom/CharacterData.cpp:
640 * dom/ContainerNode.cpp:
641 * dom/DOMNamedFlowCollection.cpp:
642 * dom/DeviceMotionController.cpp:
643 * dom/DeviceOrientationController.cpp:
646 * dom/DocumentEventQueue.cpp:
647 * dom/DocumentOrderedMap.h:
650 * dom/EventDispatcher.cpp:
651 * dom/EventTarget.cpp:
653 * dom/KeyboardEvent.cpp:
654 * dom/MessageEvent.cpp:
655 * dom/MessagePort.cpp:
656 * dom/ScriptElement.cpp:
657 * dom/ScriptExecutionContext.cpp:
658 * dom/ScriptExecutionContext.h:
659 * dom/SecurityContext.h:
660 * dom/SimulatedClick.cpp:
662 * dom/WebKitNamedFlow.cpp:
663 * editing/FrameSelection.cpp:
664 * fileapi/FileReader.cpp:
665 * html/HTMLLinkElement.cpp:
666 * html/HTMLPlugInImageElement.cpp:
667 * html/HTMLStyleElement.cpp:
668 * html/HTMLSummaryElement.cpp:
669 * html/HTMLTrackElement.cpp:
670 * html/HTMLVideoElement.cpp:
671 * html/InputType.cpp:
672 * html/MediaController.cpp:
673 * html/TextFieldInputType.cpp:
674 * html/canvas/WebGLRenderingContextBase.cpp:
675 * html/parser/HTMLScriptRunner.cpp:
676 * html/shadow/MediaControlElementTypes.cpp:
677 * html/shadow/MediaControls.cpp:
678 * html/shadow/MediaControlsApple.cpp:
679 * html/shadow/SliderThumbElement.cpp:
680 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
681 * inspector/InspectorIndexedDBAgent.cpp:
682 * loader/DocumentLoader.cpp:
683 * loader/ImageLoader.cpp:
684 * loader/PolicyChecker.cpp:
685 * mathml/MathMLSelectElement.cpp:
687 * page/EventSource.cpp:
688 * page/FrameView.cpp:
689 * page/Performance.cpp:
690 * page/csp/ContentSecurityPolicy.cpp:
691 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
692 * platform/network/HTTPHeaderMap.h:
693 * platform/network/ResourceHandle.cpp:
694 * rendering/RenderEmbeddedObject.cpp:
695 * rendering/RenderSnapshottedPlugIn.cpp:
696 * svg/SVGSVGElement.cpp:
697 * svg/SVGUseElement.cpp:
698 * svg/animation/SVGSMILElement.cpp:
699 * workers/WorkerGlobalScope.h:
700 * xml/XMLHttpRequest.cpp:
701 * xml/XMLHttpRequestProgressEventThrottle.cpp:
702 * xml/XMLHttpRequestUpload.cpp:
704 2016-06-15 Antti Koivisto <antti@apple.com>
706 GoogleMaps transit schedule explorer comes up blank initially
707 https://bugs.webkit.org/show_bug.cgi?id=158803
708 rdar://problem/25818080
710 Reviewed by Andreas Kling.
712 In case we had something like
716 and later a new stylesheet was added dynamically that contained
720 we would fail to add the new rules to the descendant invalidation rule sets for ".foo". This could
721 cause some style invalidations to be missed.
723 * css/DocumentRuleSets.cpp:
724 (WebCore::DocumentRuleSets::collectFeatures):
726 Reset the ancestorClassRules and ancestorAttributeRulesForHTML rule set caches when new style sheets
727 are added (==collectFeatures is called).
729 2016-06-15 Javier Fernandez <jfernandez@igalia.com>
731 [css-sizing] Item borders are missing with 'min-width:-webkit-fill-available' and zero available width
732 https://bugs.webkit.org/show_bug.cgi?id=158258
734 Reviewed by Darin Adler.
736 The "fill-available" size is defined as the containing block's size less
737 the box's border and padding size. However, when used for min-width we
738 should ensure we don't get negative values as result of logical width
741 http://www.w3.org/TR/css-sizing-3/#fill-available-sizing
743 This patch ensure fill-available value computed value will be always
744 greater than box's boder and padding width.
746 Test: fast/css-intrinsic-dimensions/fill-available-with-zero-width.html
748 * rendering/RenderBox.cpp:
749 (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
751 2016-06-15 Alex Christensen <achristensen@webkit.org>
753 Fix 2d canvas transform after r192900
754 https://bugs.webkit.org/show_bug.cgi?id=158725
755 rdar://problem/26774230
757 Reviewed by Dean Jackson.
759 Test: fast/canvas/canvas-transform-inverse.html
761 * html/canvas/CanvasRenderingContext2D.cpp:
762 (WebCore::CanvasRenderingContext2D::transform):
763 r192900 was intended to have no change in behavior, but I made a typo.
764 We need to apply the inverse of the original transform to the path to be correct.
765 This affects transforms applied to the canvas during the creation of a path.
767 2016-06-15 Eric Carlson <eric.carlson@apple.com>
769 [iOS] Make HTMLMediaElement.muted mutable
770 https://bugs.webkit.org/show_bug.cgi?id=158787
771 <rdar://problem/24452567>
773 Reviewed by Dean Jackson.
775 Tests: media/audio-playback-restriction-removed-muted.html
776 media/audio-playback-restriction-removed-track-enabled.html
778 * html/HTMLMediaElement.cpp:
779 (WebCore::HTMLMediaElement::audioTrackEnabledChanged): Remove most behavior restrictions if
780 the track state was changed as a result of a user gesture.
781 (WebCore::HTMLMediaElement::setMuted): Ditto.
782 (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Add mask
783 parameter so caller can choose which restrictions are removed.
784 * html/HTMLMediaElement.h:
786 * html/MediaElementSession.cpp:
787 (WebCore::restrictionName): Drive-by fix: remove duplicate label.
788 * html/MediaElementSession.h:
790 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
791 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
792 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Set muted on AVPlayer if setMuted
793 was called before the player was created.
794 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): Drive-by fix: return early if there
795 is no AVPlayer, not if we won't have metadata yet.
796 (WebCore::MediaPlayerPrivateAVFoundationObjC::setMuted): New.
798 2016-06-15 Romain Bellessort <romain.bellessort@crf.canon.fr>
800 Enabling Shadow DOM for all platforms
801 https://bugs.webkit.org/show_bug.cgi?id=158738
803 Reviewed by Ryosuke Niwa.
805 No new tests (no new behavior to be tested).
807 Removed Shadow DOM from options (enabled by default)
808 (comprises removal of corresponding preprocessor directives)
810 * Configurations/FeatureDefines.xcconfig:
811 * DerivedSources.make:
812 * bindings/generic/RuntimeEnabledFeatures.h:
813 * bindings/js/JSDocumentFragmentCustom.cpp:
814 * bindings/js/JSNodeCustom.cpp:
815 * css/CSSGrammar.y.in:
817 * css/CSSParserValues.cpp:
818 * css/CSSParserValues.h:
819 * css/CSSSelector.cpp:
821 * css/ElementRuleCollector.cpp:
822 * css/ElementRuleCollector.h:
825 * css/SelectorChecker.cpp:
826 * css/SelectorChecker.h:
827 * css/SelectorPseudoClassAndCompatibilityElementMap.in:
828 * css/StyleResolver.cpp:
829 * cssjit/SelectorCompiler.cpp:
830 * dom/ComposedTreeAncestorIterator.h:
831 * dom/ComposedTreeIterator.cpp:
832 * dom/ComposedTreeIterator.h:
833 * dom/ContainerNode.cpp:
843 * dom/NonDocumentTypeChildNode.idl:
844 * dom/ShadowRoot.cpp:
846 * dom/ShadowRoot.idl:
847 * dom/SlotAssignment.cpp:
848 * dom/SlotAssignment.h:
849 * html/HTMLSlotElement.cpp:
850 * html/HTMLSlotElement.h:
851 * html/HTMLSlotElement.idl:
852 * html/HTMLTagNames.in:
853 * page/FocusController.cpp:
854 * style/StyleSharingResolver.cpp:
855 * style/StyleTreeResolver.cpp:
857 2016-06-15 Andreas Kling <akling@apple.com>
859 [Cocoa] Add two notify listeners for poking the garbage collector.
860 <https://webkit.org/b/158783>
862 Reviewed by Antti Koivisto.
864 Add two new notify listeners:
866 - com.apple.WebKit.fullGC
868 Trigger a full garbage collection in the main WebCore VM immediately.
870 - com.apple.WebKit.deleteAllCode
872 Throw away all of JSC's linked and unlinked code, and do a full GC.
874 These will make it easier to diagnose memory growth issues by having a lever that
875 eliminates many of the large object graphs without going after behavior-changing things
876 like the memory cache.
878 * platform/MemoryPressureHandler.cpp:
879 (WebCore::MemoryPressureHandler::platformInitialize):
880 * platform/MemoryPressureHandler.h:
881 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
882 (WebCore::MemoryPressureHandler::platformInitialize):
884 2016-06-15 Antti Koivisto <antti@apple.com>
886 Vary:Cookie validation doesn't work in private browsing
887 https://bugs.webkit.org/show_bug.cgi?id=158616
888 <rdar://problem/26755067>
890 Reviewed by Andreas Kling.
892 There wasn't a way to get cookie based on SessionID from WebCore.
894 * platform/CookiesStrategy.h:
896 Add a cookie retrival function that takes SessionID instead of NetworkStorageSession.
898 * platform/network/CacheValidation.cpp:
899 (WebCore::headerValueForVary):
903 (WebCore::verifyVaryingRequestHeaders):
905 2016-06-15 Per Arne Vollan <pvollan@apple.com>
907 [Win] The test accessibility/selected-text-range-aria-elements.html is failing.
908 https://bugs.webkit.org/show_bug.cgi?id=158732
910 Reviewed by Brent Fulgham.
912 Implement support for getting selected text range.
914 * accessibility/win/AccessibilityObjectWrapperWin.cpp:
915 (WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue):
917 2016-06-14 Myles C. Maxfield <mmaxfield@apple.com>
919 Addressing post-review comments after r201971
920 https://bugs.webkit.org/show_bug.cgi?id=158450
924 * css/CSSFontFaceSet.cpp:
925 (WebCore::CSSFontFaceSet::add):
926 (WebCore::CSSFontFaceSet::remove):
928 2016-06-14 Myles C. Maxfield <mmaxfield@apple.com>
930 Honor bidi unicode codepoints
931 https://bugs.webkit.org/show_bug.cgi?id=149170
932 <rdar://problem/26527378>
934 Reviewed by Simon Fraser.
936 BidiResolver doesn't have any concept of isolate Unicode code points, so produces
937 unexpected output when they are present. Fix by considering such code points as
938 whitespace in the bidi algorithm. This is a stop-gap measure until we can support
939 the codepoints fully in our Bidi algorithm.
941 Test: fast/text/isolate-ignore.html
943 * platform/graphics/Font.cpp:
944 (WebCore::createAndFillGlyphPage):
945 * platform/text/BidiResolver.h:
946 (WebCore::Subclass>::createBidiRunsForLine):
948 2016-06-14 Antoine Quint <graouts@apple.com>
950 [iOS] Play glyph is pixelated when the page zoom is large
951 https://bugs.webkit.org/show_bug.cgi?id=158770
952 <rdar://problem/26092124>
954 Reviewed by Dean Jackson.
956 Use the same technique that we use to scale the video controls by using a combination
957 of CSS "zoom" and "transform" properties to have the video play glyph scaled at its
958 native size regardless of page zoom.
960 * Modules/mediacontrols/mediaControlsiOS.js:
961 (ControllerIOS.prototype.set pageScaleFactor):
963 2016-06-14 Chris Dumez <cdumez@apple.com>
965 Regression(r201534): Compile time greatly regressed
966 https://bugs.webkit.org/show_bug.cgi?id=158765
967 <rdar://problem/26587342>
969 Reviewed by Darin Adler.
971 Compile time greatly regressed by r201534 due to Document.h now including
972 TextAutoSizing.h. Move the TextAutoSizingTraits back to Document.h to
973 restore pre-r201534 behavior.
975 * WebCore.xcodeproj/project.pbxproj:
977 (WebCore::TextAutoSizingTraits::constructDeletedValue):
978 (WebCore::TextAutoSizingTraits::isDeletedValue):
980 * rendering/TextAutoSizing.h:
981 (WebCore::TextAutoSizingTraits::constructDeletedValue): Deleted.
982 (WebCore::TextAutoSizingTraits::isDeletedValue): Deleted.
984 2016-06-14 Antoine Quint <graouts@apple.com>
986 Inline media controls cut off PiP and fullscreen buttons on cnn.com
987 https://bugs.webkit.org/show_bug.cgi?id=158766
988 <rdar://problem/24175161>
990 Reviewed by Dean Jackson.
992 The display of the picture-in-picture and fullscreen buttons are dependent on the availability
993 of video tracks through a call to hasVideo(). We need to ensure that the display properties of
994 both those buttons are updated when the number of video tracks has changed since the controls
995 may be populated prior to the availability of video tracks.
997 * Modules/mediacontrols/mediaControlsApple.js:
998 (Controller.prototype.updateHasVideo):
1000 2016-06-14 Joseph Pecoraro <pecoraro@apple.com>
1002 Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments
1003 https://bugs.webkit.org/show_bug.cgi?id=158762
1005 Reviewed by Timothy Hatcher.
1007 Test: inspector/timeline/setInstruments-errors.html
1009 * inspector/InspectorTimelineAgent.cpp:
1010 (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
1011 (WebCore::InspectorTimelineAgent::setInstruments):
1012 (WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
1013 (WebCore::InspectorTimelineAgent::setAutoCaptureInstruments): Deleted.
1014 * inspector/InspectorTimelineAgent.h:
1016 2016-06-14 Dean Jackson <dino@apple.com>
1018 decompose4 return value is unchecked, leading to potentially uninitialized data.
1019 https://bugs.webkit.org/show_bug.cgi?id=158761
1020 <rdar://problem/17526268>
1022 Reviewed by Simon Fraser.
1024 WebCore::decompose4 could return early without initializing data.
1025 I now initialize it, but I also started checking the return
1026 value at all the call sites to make sure everything is sensible.
1028 Test: transforms/undecomposable.html
1030 * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1031 (WebCore::PerspectiveTransformOperation::blend):
1032 * platform/graphics/transforms/RotateTransformOperation.cpp:
1033 (WebCore::RotateTransformOperation::blend):
1034 * platform/graphics/transforms/TransformationMatrix.cpp:
1035 (WebCore::decompose4):
1036 (WebCore::TransformationMatrix::blend4):
1037 * platform/graphics/transforms/TransformationMatrix.h:
1039 2016-06-14 Benjamin Poulain <bpoulain@apple.com>
1041 Add the unprefixed version of the pseudo element ::placeholder
1042 https://bugs.webkit.org/show_bug.cgi?id=158653
1044 Reviewed by Dean Jackson.
1046 Test: fast/forms/placeholder-pseudo-element-with-webkit-prefix.html
1048 The pseudo element ::-webkit-input-placeholder is stupidly popular
1049 which forces other engines to support this exact name.
1051 The pseudo-element spec provides a new standard name we can adopt
1052 to drop the prefix: https://drafts.csswg.org/css-pseudo-4/#placeholder-pseudo
1054 This patch does just that, make ::placeholder the standard name to select
1055 the placeholder element in the shadow dom of input elements.
1057 Unlike pseudo classes, we did not have any support for prefixes and aliasing.
1058 I want to keep the absurdly efficient matching we currently use for styling
1059 because style updates are more common than stylesheet updates.
1060 With that constraint in mind, the value of CSSSelector has to be the unprefixed
1061 version for both forms of input.
1063 This leaves us with the problem of displaying the CSSSelector for CSSOM.
1064 To differentiate the legacy form from the standard form, I added
1065 a new type of PseudoElement: PseudoElementWebKitCustomLegacyPrefixed.
1066 When parsing, PseudoElementWebKitCustomLegacyPrefixed let us replace
1067 the original value "-webkit-input-placeholder" by the standard value.
1068 When creating the selectorText for CSSOM, PseudoElementWebKitCustomLegacyPrefixed
1069 let us replace the standard for by the legacy form.
1071 * css/CSSParserValues.cpp:
1072 (WebCore::CSSParserSelector::parsePseudoElementSelector):
1073 * css/CSSSelector.cpp:
1074 (WebCore::CSSSelector::pseudoId):
1075 (WebCore::CSSSelector::selectorText):
1076 * css/CSSSelector.h:
1077 (WebCore::CSSSelector::isCustomPseudoElement):
1078 (WebCore::CSSSelector::isWebKitCustomPseudoElement):
1079 * css/SelectorChecker.cpp:
1080 (WebCore::SelectorChecker::matchRecursively):
1081 * css/SelectorPseudoElementTypeMap.in:
1084 (input::placeholder, isindex::placeholder):
1085 (textarea::placeholder):
1086 (::-webkit-input-placeholder): Deleted.
1087 (input::-webkit-input-placeholder, isindex::-webkit-input-placeholder): Deleted.
1088 (textarea::-webkit-input-placeholder): Deleted.
1090 * html/shadow/TextControlInnerElements.cpp:
1091 (WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement):
1093 2016-06-14 Doug Russell <d_russell@apple.com>
1095 AX: Form label text should be exposed as static text if it contains only static text
1096 https://bugs.webkit.org/show_bug.cgi?id=158634
1098 Reviewed by Chris Fleizach.
1100 Use AccessibilityLabel to represent HTMLLabelElement to assistive technology.
1101 AccessibilityLabel::containsOnlyStaticText() searches label subtree to evaluate
1102 if all children are static text.
1103 AccessibilityLabel::stringValue() consults containsOnlyStaticText() and returns
1104 textUnderElement() if true.
1105 WebAccessibilityObjectWrapperMac consults containsOnlyStaticText() and substitutes
1106 StaticTextRole for LabelRole if true.
1107 Cache containsOnlyStaticText() in the common case when updating children.
1109 Tests: accessibility/mac/label-element-all-text-string-value.html
1110 accessibility/mac/label-element-with-link-string-value.html
1113 * WebCore.xcodeproj/project.pbxproj:
1114 * accessibility/AXObjectCache.cpp:
1115 (WebCore::createFromRenderer):
1116 * accessibility/AccessibilityAllInOne.cpp:
1117 * accessibility/AccessibilityLabel.cpp: Added.
1118 (WebCore::AccessibilityLabel::AccessibilityLabel):
1119 (WebCore::AccessibilityLabel::~AccessibilityLabel):
1120 (WebCore::AccessibilityLabel::create):
1121 (WebCore::AccessibilityLabel::computeAccessibilityIsIgnored):
1122 (WebCore::AccessibilityLabel::stringValue):
1123 (WebCore::childrenContainOnlyStaticText):
1124 (WebCore::AccessibilityLabel::containsOnlyStaticText):
1125 (WebCore::AccessibilityLabel::updateChildrenIfNecessary):
1126 (WebCore::AccessibilityLabel::clearChildren):
1127 (WebCore::AccessibilityLabel::insertChild):
1128 * accessibility/AccessibilityLabel.h: Added.
1129 * accessibility/AccessibilityObject.h:
1130 (WebCore::AccessibilityObject::isLabel):
1131 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1132 (-[WebAccessibilityObjectWrapper role]):
1134 2016-06-14 Commit Queue <commit-queue@webkit.org>
1136 Unreviewed, rolling out r202057.
1137 https://bugs.webkit.org/show_bug.cgi?id=158749
1139 This change broke the Windows build. (Requested by ryanhaddad
1144 "Honor bidi unicode codepoints"
1145 https://bugs.webkit.org/show_bug.cgi?id=149170
1146 http://trac.webkit.org/changeset/202057
1148 2016-06-14 Myles C. Maxfield <mmaxfield@apple.com>
1150 Honor bidi unicode codepoints
1151 https://bugs.webkit.org/show_bug.cgi?id=149170
1152 <rdar://problem/26527378>
1154 Reviewed by Simon Fraser.
1156 BidiResolver doesn't have any concept of isolate Unicode code points, so produces
1157 unexpected output when they are present. Fix by considering such code points as
1158 whitespace in the bidi algorithm. This is a stop-gap measure until we can support
1159 the codepoints fully in our Bidi algorithm.
1161 Test: fast/text/isolate-ignore.html
1163 * platform/graphics/Font.cpp:
1164 (WebCore::createAndFillGlyphPage):
1165 * platform/text/BidiResolver.h:
1166 (WebCore::Subclass>::createBidiRunsForLine):
1168 2016-06-14 Commit Queue <commit-queue@webkit.org>
1170 Unreviewed, rolling out r200455.
1171 https://bugs.webkit.org/show_bug.cgi?id=158740
1173 hangs twitter/facebook (Requested by mcatanzaro on #webkit).
1177 "[GStreamer] Adaptive streaming issues"
1178 https://bugs.webkit.org/show_bug.cgi?id=144040
1179 http://trac.webkit.org/changeset/200455
1181 2016-06-14 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
1183 WebRTC: RTCPeerConnection::addTrack() should throw InvalidAccessError instead of InvalidModificationError.
1184 https://bugs.webkit.org/show_bug.cgi?id=158735
1186 Reviewed by Eric Carlson.
1188 Throw InvalidAccessError instead of InvalidModificationError when track already exists in connection's
1189 set of senders as per specification (https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtrack).
1191 Updated existing test results: fast/mediastream/RTCPeerConnection-add-removeTrack-expected.txt
1193 * Modules/mediastream/RTCPeerConnection.cpp:
1194 (WebCore::RTCPeerConnection::addTrack):
1196 2016-06-14 Adam Bergkvist <adam.bergkvist@ericsson.com>
1198 WebRTC: Imlement MediaEndpointPeerConnection::addIceCandidate()
1199 https://bugs.webkit.org/show_bug.cgi?id=158690
1201 Reviewed by Eric Carlson.
1203 Implement MediaEndpointPeerConnection::addIceCandidate() that is the MediaEndpoint
1204 implementation of RTCPeerConnection.addIceCandidate() [1].
1206 [1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-peerconnection-addicecandidate
1208 Test: fast/mediastream/RTCPeerConnection-addIceCandidate.html
1210 * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1211 (WebCore::MediaEndpointPeerConnection::addIceCandidate):
1212 (WebCore::MediaEndpointPeerConnection::addIceCandidateTask):
1214 * Modules/mediastream/MediaEndpointPeerConnection.h:
1215 * platform/mediastream/MediaEndpoint.h:
1216 Use mid instead of mdescIndex to identify the target media description in the backend.
1217 * platform/mock/MockMediaEndpoint.cpp:
1218 Update mock method signature accordingly.
1219 (WebCore::MockMediaEndpoint::addRemoteCandidate):
1220 * platform/mock/MockMediaEndpoint.h:
1222 2016-06-14 Zalan Bujtas <zalan@apple.com>
1224 Make RenderBlock::insertInto/RemoveFromTrackedRendererMaps functions static.
1225 https://bugs.webkit.org/show_bug.cgi?id=158722
1227 Reviewed by Simon Fraser.
1229 These functions manipulate static tracker hashmaps. They don't need to be on RenderBlock.
1230 This is also in preparation for decoupling positioned descendant tracking from descendent percentage height handling.
1231 (gPositionedDescendantsMap and gPercentHeightDescendantsMap)
1233 No change in functionality.
1235 * rendering/RenderBlock.cpp:
1236 (WebCore::insertIntoTrackedRendererMaps):
1237 (WebCore::removeFromTrackedRendererMaps):
1238 (WebCore::removeBlockFromDescendantAndContainerMaps):
1239 (WebCore::RenderBlock::insertPositionedObject):
1240 (WebCore::RenderBlock::addPercentHeightDescendant):
1241 (WebCore::RenderBlock::insertIntoTrackedRendererMaps): Deleted.
1242 (WebCore::RenderBlock::removeFromTrackedRendererMaps): Deleted.
1243 * rendering/RenderBlock.h:
1245 2016-06-14 Adam Bergkvist <adam.bergkvist@ericsson.com>
1247 WebRTC: Add media setup test where media is set up in one direction at a time
1248 https://bugs.webkit.org/show_bug.cgi?id=158691
1250 Reviewed by Eric Carlson.
1252 Add test for setting up media in one direction at a time. This requires a change in sdp.js
1253 to allow an SDP that doesn't contain a stream id or track id (representing
1254 a track being sent). In this test, the first answer doesn't contain any sending media.
1256 Test: fast/mediastream/RTCPeerConnection-media-setup-two-dialogs.html
1258 * Modules/mediastream/sdp.js:
1260 2016-06-14 Chris Dumez <cdumez@apple.com>
1262 [Cocoa] Avoid extra copy of headers dictionary in ResourceResponse::platformLazyInit()
1263 https://bugs.webkit.org/show_bug.cgi?id=158717
1265 Reviewed by Alex Christensen.
1267 Avoid extra copy of headers dictionary in ResourceResponse::platformLazyInit() by
1268 calling CFHTTPMessageCopyAllHeaderFields() instead of [NSURLResponse allHeaderFields].
1270 CFHTTPMessageCopyAllHeaderFields() creates only 1 copy while
1271 [NSURLResponse allHeaderFields] creates 2 (see <rdar://problem/26778863>).
1273 * platform/network/cocoa/ResourceResponseCocoa.mm:
1274 (WebCore::addToHTTPHeaderMap):
1275 (WebCore::ResourceResponse::platformLazyInit):
1277 2016-06-14 David Kilzer <ddkilzer@apple.com>
1279 REGRESSION (r151608): Leak of QTMovieLayer or AVPlayerLayer in -[WebVideoFullscreenController setVideoElement:]
1280 <https://webkit.org/b/158729>
1282 Reviewed by Eric Carlson.
1284 * platform/mac/WebVideoFullscreenController.mm:
1285 (-[WebVideoFullscreenController setVideoElement:]): Use
1286 RetainPtr<> to prevent leaks.
1287 * platform/mac/WebVideoFullscreenHUDWindowController.mm:
1288 Drive-by fix to remove unused <wtf/RetainPtr.h> import.
1290 2016-06-14 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
1292 The vector of mediastreams should be passed via a reference to RTCPeerConnection::addTrack()
1293 https://bugs.webkit.org/show_bug.cgi?id=158701
1295 Pass vector of mediastreams by reference.
1297 Reviewed by Youenn Fablet.
1299 * Modules/mediastream/RTCPeerConnection.cpp:
1300 (WebCore::RTCPeerConnection::addTrack):
1301 * Modules/mediastream/RTCPeerConnection.h:
1303 2016-06-14 Ryosuke Niwa <rniwa@webkit.org>
1305 Crash inside firstPositionInNode in checkLoadCompleteForThisFrame
1306 https://bugs.webkit.org/show_bug.cgi?id=158724
1308 Reviewed by Alex Christensen.
1310 Added null checks for document and document element since they could be nullptr here.
1312 * loader/FrameLoader.cpp:
1313 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1315 2016-06-13 Gavin & Ellie Barraclough <barraclough@apple.com>
1317 Remove hasStaticPropertyTable (part 3: JSLocation::putDelegate)
1318 https://bugs.webkit.org/show_bug.cgi?id=158431
1320 Unreviewed build fix.
1322 * bindings/js/JSLocationCustom.cpp:
1323 (WebCore::JSLocation::putDelegate):
1325 2016-06-13 Gavin & Ellie Barraclough <barraclough@apple.com>
1327 Remove hasStaticPropertyTable (part 4: JSHTMLDocument & JSStorage)
1328 https://bugs.webkit.org/show_bug.cgi?id=158431
1330 Reviewed by Chris Dumez.
1332 All uses of hasStaticPropertyTable flag generated by bindings are wrong.
1334 JSHTMLDocument & JSStorage contain a number of static_asserts claiming that
1335 various methods do not support static properties. These asserts were likely
1336 correct at the time they were added, as JSObject::getOwnPropertySlot and
1337 JSObject::deleteProperty did not support getting / deleting static value.
1338 This is no longer the case, and these asserts are now incorrect.
1340 * bindings/js/JSHTMLDocumentCustom.cpp:
1341 (WebCore::JSHTMLDocument::getOwnPropertySlot):
1342 * bindings/js/JSStorageCustom.cpp:
1343 (WebCore::JSStorage::deleteProperty):
1344 (WebCore::JSStorage::deletePropertyByIndex):
1345 (WebCore::JSStorage::putDelegate):
1346 - remove incorrect static_asserts.
1348 2016-06-13 Gavin & Ellie Barraclough <barraclough@apple.com>
1350 Remove hasStaticPropertyTable (part 3: JSLocation::putDelegate)
1351 https://bugs.webkit.org/show_bug.cgi?id=158431
1353 Reviewed by Geoff Garen.
1355 All uses of hasStaticPropertyTable flag generated by bindings are wrong.
1357 JSLocation::putDelegate checks the static property table redundantly.
1359 In the case of same origin access, if the property is not in the static
1360 table the method will call JSObject::put and return true (indicating the
1361 delegate handled the put). If the property is in the static table, the
1362 method will return false (indicating the the delegate did not handle the
1363 access) - in which case the calling function will call JSObject::put.
1364 Checking for the property in the static table is redundant - same origin
1365 access does not require any special handling, and should just always
1366 return false & let the caller handle the put.
1368 In the case of cross origin access, if the property is not in the static
1369 table we return true (indicating the access was handled, and silently
1370 blocking it). If it is a static property, we check the name, and if the
1371 name is not 'href' we also return true, silently blocking. In the case
1372 that the name is 'href' we'll return false, indicating to the caller
1373 that the access was not handled by the delegate, resulting in it taking
1374 place. The additional check of the static table is redundant, since we
1375 only have special behaviour in the case of 'href'. (Moreover it is
1376 unnecesszarily fragile, since if we made a change such that 'href' was no
1377 longer implemented as a static property with would fail.)
1379 - for same origin, always return false.
1380 - for cross origin, return false for 'href', otherwise return true.
1382 * bindings/js/JSLocationCustom.cpp:
1383 (WebCore::JSLocation::putDelegate):
1384 - restructure & remove static table check.
1386 2016-06-13 Gavin & Ellie Barraclough <barraclough@apple.com>
1388 Remove hasStaticPropertyTable (part 2: JSPluginElement)
1389 https://bugs.webkit.org/show_bug.cgi?id=158431
1391 Reviewed by Chris Dumez.
1393 All uses of hasStaticPropertyTable flag generated by bindings are wrong.
1395 The check in pluginElementCustomGetOwnPropertySlot was somewhat dubious in the
1396 first place (for types with static properties it would give precedence to both
1397 static and also property storage properties; for types without static properties
1398 it would check neither - an odd asymetry in the case of values in the storage
1399 array, and was depending on an implementation detail that could change).
1401 This is all now redundant anyway. None of these types have static properties.
1402 All properties are now corretcly on the prototype (which is handled appropriately
1403 below). This is just dead code.
1405 * bindings/js/JSPluginElementFunctions.h:
1406 (WebCore::pluginElementCustomGetOwnPropertySlot):
1409 2016-06-13 Gavin & Ellie Barraclough <barraclough@apple.com>
1411 Remove hasStaticPropertyTable (part 1: DOM bindings)
1412 https://bugs.webkit.org/show_bug.cgi?id=158431
1414 Reviewed by Chris Dumez.
1416 All uses of hasStaticPropertyTable flag generated by bindings are wrong.
1418 * bindings/js/JSDOMBinding.h:
1419 (WebCore::getStaticValueSlotEntryWithoutCaching): Deleted.
1420 (WebCore::getStaticValueSlotEntryWithoutCaching<JSDOMObject>): Deleted.
1421 - this method is not used anywhere.
1423 2016-06-13 Adam Bergkvist <adam.bergkvist@ericsson.com>
1425 WebRTC: Imlement MediaEndpointPeerConnection::replaceTrack()
1426 https://bugs.webkit.org/show_bug.cgi?id=158688
1428 Reviewed by Eric Carlson.
1430 Implement MediaEndpointPeerConnection::replaceTrack() that is the MediaEndpoint implementation
1431 of RTCRtpSender.replaceTrack() [1].
1433 [1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-rtcrtpsender-replacetrack
1435 Updated fast/mediastream/RTCRtpSender-replaceTrack.html
1437 * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1438 (WebCore::MediaEndpointPeerConnection::replaceTrack):
1439 (WebCore::MediaEndpointPeerConnection::replaceTrackTask):
1441 * Modules/mediastream/MediaEndpointPeerConnection.h:
1442 * Modules/mediastream/PeerConnectionBackend.h:
1443 * Modules/mediastream/RTCPeerConnection.cpp:
1444 (WebCore::RTCPeerConnection::replaceTrack):
1445 * Modules/mediastream/RTCPeerConnection.h:
1446 Move the MediaStreamTrack instance of sending a reference to it. This change is the main
1447 reason many files are touched by this change.
1448 * Modules/mediastream/RTCRtpSender.h:
1449 * Modules/mediastream/RTCRtpSender.idl:
1450 * platform/mediastream/MediaEndpoint.h:
1451 Use mid instead of mdescIndex to identify the media description in the backend.
1452 * platform/mock/MockMediaEndpoint.cpp:
1453 (WebCore::MockMediaEndpoint::replaceSendSource):
1454 * platform/mock/MockMediaEndpoint.h:
1456 2016-06-13 Joseph Pecoraro <pecoraro@apple.com>
1458 window.onerror should pass the ErrorEvent's 'error' property as the 5th argument to the event handler
1459 https://bugs.webkit.org/show_bug.cgi?id=55092
1460 <rdar://problem/25731279>
1462 Reviewed by Dean Jackson.
1464 This includes the actual Error in window.error / ErrorEvent:
1465 https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface
1467 This is useful for scripts to be able to get an error stack
1468 from uncaught exceptions, by checking the error itself.
1470 Tests: fast/events/window-onerror17.html
1471 http/tests/security/cross-origin-script-error-event-redirected.html
1472 http/tests/security/cross-origin-script-error-event.html
1473 http/tests/security/script-crossorigin-error-event-information.html
1474 http/tests/security/script-no-crossorigin-error-event-should-be-sanitized.html
1475 userscripts/window-onerror-for-isolated-world-3.html
1478 * WebCore.xcodeproj/project.pbxproj:
1479 * bindings/js/JSBindingsAllInOne.cpp:
1480 Add new custom error event file.
1482 * bindings/js/JSDOMBinding.cpp:
1483 (WebCore::reportException):
1484 Include the JSC::Exception when reporting exceptions, so the error value is available.
1486 * bindings/js/JSErrorEventCustom.cpp:
1487 (WebCore::JSErrorEvent::error):
1488 Sanitized access to the ErrorEvent's error property to prevent leaking objects
1489 across isolated world boundaries. This is like CustomEvent's data property.
1491 * bindings/js/JSErrorHandler.cpp:
1492 (WebCore::JSErrorHandler::handleEvent):
1493 * bindings/js/JSErrorHandler.h:
1494 Include the error object as the 4th argument to the window.onerror event handler.
1496 * dom/ScriptExecutionContext.cpp:
1497 (WebCore::ScriptExecutionContext::sanitizeScriptError):
1498 (WebCore::ScriptExecutionContext::reportException):
1499 (WebCore::ScriptExecutionContext::dispatchErrorEvent):
1500 * dom/ScriptExecutionContext.h:
1501 Include the error object in the ErrorEvent constructed when dispatching error events.
1503 * dom/ErrorEvent.cpp:
1504 (WebCore::ErrorEvent::ErrorEvent):
1505 (WebCore::ErrorEvent::sanitizedErrorValue):
1506 (WebCore::ErrorEvent::trySerializeError):
1508 * dom/ErrorEvent.idl:
1509 Include an any "error" property on the ErrorEvent, and allow it in initialization.
1511 * bindings/js/WorkerScriptController.cpp:
1512 (WebCore::WorkerScriptController::evaluate):
1513 * workers/WorkerMessagingProxy.cpp:
1514 (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
1515 Within the Worker world, the error is included in the event.
1516 When re-dispatching the error on the world object in the world that spawned the
1517 Worker the event does not include an error object. This matches other browsers
1518 right now, but could be improved to have the same cross world serialization
1519 as isolated worlds have with the error data.
1521 * dom/CustomEvent.h:
1522 Remove unimplemented stale method.
1524 2016-06-13 Dean Jackson <dino@apple.com>
1526 SVG elements don't blend correctly into HTML
1527 https://bugs.webkit.org/show_bug.cgi?id=158718
1528 <rdar://problem/26782004>
1530 Reviewed by Antoine Quint.
1532 We were not creating any transparency layers for the root SVG nodes.
1533 This is ok if the SVG is the root document, because it is the backdrop.
1534 However, if it is inline SVG, it needs to apply the operation in
1535 order to composite into the document.
1537 Test: svg/css/mix-blend-mode-with-inline-svg.html
1539 * rendering/RenderLayer.cpp:
1540 (WebCore::RenderLayer::beginTransparencyLayers):
1542 2016-06-13 Brady Eidson <beidson@apple.com>
1544 storage/indexeddb/modern/leaks-1.html leaks the database connection handle.
1545 https://bugs.webkit.org/show_bug.cgi?id=158643
1547 Reviewed by Alex Christensen.
1549 Tested by changes to existing test.
1551 * Modules/indexeddb/IDBDatabase.cpp:
1552 (WebCore::IDBDatabase::hasPendingActivity):
1554 * dom/EventTarget.h:
1555 (WebCore::EventTarget::eventTargetData):
1556 (WebCore::EventTarget::hasEventListeners):
1559 2016-06-13 Enrica Casucci <enrica@apple.com>
1561 REGRESSION(r201956): Failure to initialize new internal settings produced random test failures in release.
1562 https://bugs.webkit.org/show_bug.cgi?id=158713
1565 Reviewed by Simon Fraser.
1567 Failed to initialize the new member variable in both Settings and InternalSettings classes.
1569 * page/Settings.cpp:
1570 (WebCore::Settings::Settings):
1571 * testing/InternalSettings.cpp:
1572 (WebCore::InternalSettings::Backup::Backup):
1574 2016-06-13 Chris Dumez <cdumez@apple.com>
1576 Drop HipChat hack introduced in r197548
1577 https://bugs.webkit.org/show_bug.cgi?id=158711
1579 Reviewed by Geoffrey Garen.
1581 Drop HipChat hack introduced in r197548. This hack is no longer needed
1582 as the bug was fixed in HipChat since then:
1583 https://support.atlassian.com/servicedesk/customer/portal/32/HCP-7532
1585 I have confirmed locally that the latest version (4.0.12.665) is able
1586 to connect without the hack.
1588 * bindings/js/JSLocationCustom.cpp:
1589 (WebCore::JSLocation::putDelegate): Deleted.
1590 * platform/RuntimeApplicationChecks.h:
1591 * platform/RuntimeApplicationChecks.mm:
1592 (WebCore::MacApplication::isHipChat): Deleted.
1594 2016-06-13 Chris Fleizach <cfleizach@apple.com>
1596 AX: CrashTracer: com.apple.WebKit.WebContent at WebCore::AccessibilityRenderObject::remoteSVGRootElement const + 227
1597 https://bugs.webkit.org/show_bug.cgi?id=158685
1599 Reviewed by David Kilzer.
1601 Crash reports show a null access at a line that tries to dereference a pointer.
1602 I still don't have a way to layout test this, as it seems tied to tear down of the main document.
1604 * accessibility/AccessibilityRenderObject.cpp:
1605 (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
1607 2016-06-13 Jeremy Jones <jeremyj@apple.com>
1609 Use two video layer solution only on mac.
1610 https://bugs.webkit.org/show_bug.cgi?id=158705
1611 rdar://problem/26776360
1613 Reviewed by Jer Noble.
1615 Two video layer solution is only useful on the mac to prevent flicker, so don't do it elsewhere.
1617 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1618 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1620 2016-06-13 Jeremy Jones <jeremyj@apple.com>
1622 Decrease PiP flicker by not removing window prematurely.
1623 https://bugs.webkit.org/show_bug.cgi?id=158436
1624 <rdar://problem/19052639>
1626 Reviewed by Darin Adler.
1628 UIWindow shouldn't be removed until cleanupFullscreen, so the video layer has a chance
1629 to be reparented in the DOM first.
1631 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1632 (WebVideoFullscreenInterfaceAVKit::didStopPictureInPicture):
1634 2016-06-13 Alex Christensen <achristensen@webkit.org>
1636 Add WebSocketProvider stub
1637 https://bugs.webkit.org/show_bug.cgi?id=158702
1639 Reviewed by Brady Eidson.
1641 No new tests. No change in behavior.
1643 * WebCore.xcodeproj/project.pbxproj:
1644 * dom/DocumentMarkerController.cpp:
1645 * dom/ScriptedAnimationController.cpp:
1646 * html/HTMLMediaElement.cpp:
1647 * html/MediaDocument.cpp:
1648 * html/shadow/MediaControlElements.cpp:
1649 * html/shadow/MediaControls.cpp:
1650 * html/shadow/MediaControls.h:
1651 * html/shadow/MediaControlsApple.cpp:
1652 * inspector/InspectorInstrumentation.cpp:
1653 * inspector/InspectorInstrumentation.h:
1654 * inspector/InspectorOverlay.cpp:
1655 (WebCore::InspectorOverlay::overlayPage):
1656 * loader/EmptyClients.h:
1657 * loader/FrameLoader.cpp:
1658 * loader/FrameLoader.h:
1659 * loader/appcache/ApplicationCacheHost.cpp:
1660 * loader/cache/CachedResource.cpp:
1661 * page/FrameView.cpp:
1663 (WebCore::Page::Page):
1665 (WebCore::Page::applicationCacheStorage):
1666 (WebCore::Page::databaseProvider):
1667 (WebCore::Page::socketProvider):
1668 (WebCore::Page::storageNamespaceProvider):
1669 * page/PageConfiguration.cpp:
1670 (WebCore::PageConfiguration::PageConfiguration):
1671 * page/PageConfiguration.h:
1672 * page/ResourceUsageOverlay.cpp:
1673 * page/SocketProvider.h: Added.
1674 (WebCore::SocketProvider::~SocketProvider):
1675 * page/cocoa/ResourceUsageOverlayCocoa.mm:
1676 * rendering/RenderElement.cpp:
1677 * rendering/RenderLayerBacking.cpp:
1678 * style/StyleResolveForDocument.cpp:
1679 * style/StyleTreeResolver.cpp:
1680 * svg/graphics/SVGImage.cpp:
1681 (WebCore::SVGImage::dataChanged):
1682 * testing/MockPageOverlayClient.cpp:
1684 2016-06-13 Brady Eidson <beidson@apple.com>
1686 Crashes in WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask.
1687 <rdar://problem/26768449> and https://bugs.webkit.org/show_bug.cgi?id=158696
1689 Reviewed by David Kilzer.
1691 No new tests (Covered by all existing tests in Gmalloc/ASAN configs).
1693 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1694 (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask):
1695 (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply):
1697 2016-06-13 Brady Eidson <beidson@apple.com>
1699 Modern IDB: IDBOpenDBRequest objects leak.
1700 https://bugs.webkit.org/show_bug.cgi?id=158694
1702 Reviewed by Alex Christensen.
1704 No new tests (Currently have no testing strategy for guaranteeing lifetime of WebCore DOM objects)
1706 * Modules/indexeddb/client/IDBConnectionProxy.cpp:
1707 (WebCore::IDBClient::IDBConnectionProxy::completeOpenDBRequest): At this point we never need the
1708 request again, so remove it from the map.
1710 2016-06-13 Chris Dumez <cdumez@apple.com>
1712 Make sure HTTPHeaderMap gets a move constructor / assignment operator
1713 https://bugs.webkit.org/show_bug.cgi?id=158695
1714 <rdar://problem/26729511>
1716 Reviewed by Alex Christensen.
1718 Make sure HTTPHeaderMap gets a move constructor / assignment operator.
1719 It was not getting an implicit one because of its user-declared
1720 destructor. This patch drops the user-declared destructor so that
1721 HTTPHeaderMap now gets an implicit move constructor / assignment
1724 Not having a move constructor / assignment operator is an issue because
1725 we rely on HTTPHeaderMap::isolatedCopy() / WTFMove() since r201623 to
1726 pass HTTPHeaderMap across thread.
1728 * platform/network/HTTPHeaderMap.cpp:
1729 (WebCore::HTTPHeaderMap::~HTTPHeaderMap): Deleted.
1730 * platform/network/HTTPHeaderMap.h:
1732 2016-06-13 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
1734 Remove useless parameter from GenerateParametersCheck signature
1735 https://bugs.webkit.org/show_bug.cgi?id=158692
1737 Reviewed by Chris Dumez.
1739 Remove one parameter which is passed to GenerateParametersCheck
1740 but never used in the caller code.
1742 * bindings/scripts/CodeGeneratorJS.pm:
1743 (GenerateImplementation):
1744 (GenerateParametersCheck):
1745 (GenerateConstructorDefinition):
1747 2016-06-13 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
1749 Improve code generator for functions with variadic parameters
1750 https://bugs.webkit.org/show_bug.cgi?id=158529
1752 Reviewed by Darin Adler.
1754 JS bindings code of functions with variadic parameters is improved.
1756 Functions with variadic parameters are skipped for ObjC and GObject code generators.
1758 * bindings/scripts/CodeGeneratorGObject.pm:
1759 (SkipFunction): Skip functions with variadic parameters.
1760 * bindings/scripts/CodeGeneratorJS.pm:
1761 (GenerateParametersCheck):
1762 * bindings/scripts/CodeGeneratorObjC.pm:
1763 (SkipFunction): Skip functions with variadic parameters.
1764 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1765 (webkit_dom_test_obj_any): Deleted.
1766 (webkit_dom_test_obj_attach_shadow_root): Deleted.
1767 (webkit_dom_test_obj_get_read_only_long_attr): Deleted.
1768 (webkit_dom_test_obj_get_read_only_string_attr): Deleted.
1769 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1770 * bindings/scripts/test/JS/JSTestObj.cpp:
1771 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
1772 (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
1773 (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
1774 (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
1775 * bindings/scripts/test/ObjC/DOMTestObj.h:
1776 * bindings/scripts/test/ObjC/DOMTestObj.mm:
1778 2016-06-12 Zalan Bujtas <zalan@apple.com>
1780 Cleanup RenderBlock::removePositionedObjects
1781 https://bugs.webkit.org/show_bug.cgi?id=158670
1783 Reviewed by Simon Fraser.
1785 No change in functionality.
1787 * rendering/RenderBlock.cpp:
1788 (WebCore::RenderBlock::insertPositionedObject):
1789 (WebCore::RenderBlock::removePositionedObject):
1790 (WebCore::RenderBlock::removePositionedObjects):
1791 * rendering/RenderBlock.h:
1793 2016-06-12 Zalan Bujtas <zalan@apple.com>
1795 Remove positioned descendants when RenderBlock is no longer a containing block.
1796 https://bugs.webkit.org/show_bug.cgi?id=158655
1797 <rdar://problem/26510032>
1799 Reviewed by Simon Fraser.
1801 Normally the RenderView is the containing block for fixed positioned renderers.
1802 However when a renderer acquires some transform related properties, it becomes the containing
1803 block for all the fixed positioned renderers in its descendant tree.
1804 When the last transform related property is removed, the renderer is no longer a containing block
1805 and we need to remove all these positioned renderers from the descendant tracker map (gPositionedDescendantsMap).
1806 They will be inserted back into the tracker map during the next layout (either under the RenderView or
1807 under the next transformed renderer in the ancestor chain).
1809 Test: fast/block/fixed-position-reparent-when-transition-is-removed.html
1811 * rendering/RenderBlock.cpp:
1812 (WebCore::RenderBlock::removePositionedObjectsIfNeeded):
1814 2016-06-11 Myles C. Maxfield <mmaxfield@apple.com>
1816 Addressing post-review comments after r201978.
1817 https://bugs.webkit.org/show_bug.cgi?id=158649
1818 <rdar://problem/13258122>
1822 * platform/graphics/FontCache.cpp:
1823 (WebCore::FontCache::alternateFamilyName):
1824 * platform/graphics/cocoa/FontCacheCoreText.cpp:
1825 (WebCore::FontCache::platformAlternateFamilyName):
1827 2016-06-11 Darin Adler <darin@apple.com>
1829 Tighten code to build set of tag names
1830 https://bugs.webkit.org/show_bug.cgi?id=158662
1832 Reviewed by Alexey Proskuryakov.
1835 (WebCore::canAttachAuthorShadowRoot): Use an array of pointers that the loader
1836 can initialize as part of loading the library, rather than an array that needs
1837 to be initialized with code at runtime.
1839 2016-06-11 Myles C. Maxfield <mmaxfield@apple.com>
1841 [Win] [EFL] Build fix after r201978.
1842 https://bugs.webkit.org/show_bug.cgi?id=158649
1843 <rdar://problem/13258122>
1847 * platform/graphics/freetype/FontCacheFreeType.cpp:
1848 (WebCore::FontCache::platformAlternateFamilyName):
1849 * platform/graphics/win/FontCacheWin.cpp:
1851 2016-06-11 Myles C. Maxfield <mmaxfield@apple.com>
1853 [Cocoa] Map commonly used Chinese Windows font names to names present on Cocoa operating systems
1854 https://bugs.webkit.org/show_bug.cgi?id=158649
1855 <rdar://problem/13258122>
1857 Reviewed by Darin Adler.
1859 There are many Chinese websites which hardcode Windows font names.
1860 We should map these to fonts which best match them on Cocoa operating
1861 systems. We can do this by using our existing fallback font name
1864 Tests: fast/text/chinese-font-name-aliases-2.html
1865 fast/text/chinese-font-name-aliases.html
1867 * platform/graphics/FontCache.cpp:
1868 (WebCore::FontCache::alternateFamilyName):
1869 (WebCore::alternateFamilyName): Deleted.
1870 * platform/graphics/FontCache.h:
1871 * platform/graphics/cocoa/FontCacheCoreText.cpp:
1872 (WebCore::FontCache::platformAlternateFamilyName):
1873 * platform/graphics/freetype/FontCacheFreeType.cpp:
1874 (WebCore::FontCache::platformAlternateFamilyName):
1875 * platform/graphics/win/FontCacheWin.cpp:
1876 (WebCore::FontCache::platformAlternateFamilyName):
1878 2016-06-11 Commit Queue <commit-queue@webkit.org>
1880 Unreviewed, rolling out r201967, r201968, and r201972.
1881 https://bugs.webkit.org/show_bug.cgi?id=158665
1883 Caused flaky failures on IndexedDB tests (Requested by ap on
1886 Reverted changesets:
1888 "Vary:Cookie validation doesn't work in private browsing"
1889 https://bugs.webkit.org/show_bug.cgi?id=158616
1890 http://trac.webkit.org/changeset/201967
1893 http://trac.webkit.org/changeset/201968
1895 "WinCairo build fix attempt."
1896 http://trac.webkit.org/changeset/201972
1898 2016-06-11 Konstantin Tokarev <annulen@yandex.ru>
1900 Fixed compilation of LocaleICU with ENABLE(DATE_AND_TIME_INPUT_TYPES)
1901 https://bugs.webkit.org/show_bug.cgi?id=158659
1903 Reviewed by Darin Adler.
1905 No new tests needed.
1907 * platform/text/LocaleICU.cpp:
1908 (WebCore::getFormatForSkeleton):
1909 (WebCore::LocaleICU::monthFormat):
1910 (WebCore::LocaleICU::shortMonthFormat):
1912 2016-06-11 Antti Koivisto <antti@apple.com>
1914 WinCairo build fix attempt.
1916 * platform/network/NetworkStorageSession.cpp:
1917 * platform/network/NetworkStorageSession.h:
1918 * platform/network/NetworkStorageSessionStub.cpp:
1919 (WebCore::NetworkStorageSession::NetworkStorageSession):
1920 (WebCore::NetworkStorageSession::context):
1921 (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
1922 (WebCore::NetworkStorageSession::switchToNewTestingSession):
1923 (WebCore::NetworkStorageSession::~NetworkStorageSession): Deleted.
1924 (WebCore::defaultSession): Deleted.
1925 (WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
1927 2016-06-11 Myles C. Maxfield <mmaxfield@apple.com>
1929 Deleting a CSSOM style rule invalidates any previously-added FontFaces
1930 https://bugs.webkit.org/show_bug.cgi?id=158450
1932 Reviewed by Darin Adler.
1934 This patch has two pieces: updating the CSSOM when the FontFace changes, and
1935 updating the FontFace when the CSSOM changes.
1937 1: Updating the CSSOM when the FontFace changes: CSSFontFaces already have a RefPtr
1938 to their StyleRuleFontFace which represents their CSS-connection. When changing a
1939 property of the CSSFontFace, we simply reach into the StyleRule and update it to
1940 match. Our existing infrastructure of invalidation due to the attribute changes
1941 makes sure that all the necessary updates occur.
1943 2. Updating the FontFace when the CSSOM changes: If the CSSOM changes in a trivial
1944 way (for example, a new @font-face is appended to the end of the last <style>
1945 element), we can handle it directly. However, when something more invasive occurs,
1946 we end up clearing the entire CSSFontSelector, and then adding all the style rules
1947 from scratch. This involves three steps:
1948 a) CSSFontSelector::buildStarted() is run, which means "we're about to start
1949 building up all the @font-face rules from scratch." We take this opportunity
1950 to purge as many fonts as possible. This is valuable because, for example,
1951 this function gets run when the page gets put into the page cache, so we
1952 want to destroy as much as possible. Not everything can be purged, however -
1953 only CSS-connected fonts which have never been inspected by script are
1954 purgeable. We don't allow fonts inspected by script to be purged because
1955 purging might result in a font appearing from JavaScript to transition from
1956 a success -> failure state, which we don't allow.
1957 b) Upon style recalc (possibly asynchronously) CSSFontSelector::addFontFaceRule()
1958 is called for each @font-face rule. We actually detect that we're in the
1959 middle of a style rebuild, and defer this step.
1960 c) When we're done adding all the font face rules, we call
1961 CSSFontSelector::buildCompleted(). This is where we compare the newly built-
1962 up list of font faces with what existed previously (as remembered in
1963 CSSFontSelector::buildStarted()) in order to detect font faces which were
1964 deleted from the document. Fonts which were newly added to the document
1965 are handled naturally.
1966 Fonts which have a property modified on them are created as if they were new.
1967 However, instead of simply adding the CSSFontFace, we search for the existing
1968 CSSFontFace (by CSS connection pointer) and tell the existing FontFace to
1969 adopt this new CSSFontFace. This means that the JavaScript object will just
1970 pick up any newly-written values in the CSSOM. It also means that the
1971 "status" attribute of the JavaScript object is reset, but this is expected
1972 and allowed by the spec. (For example, if you change the "src" attribute of
1973 an @font-face block via the CSSOM, all bets are off when you inspect the
1974 FontFace JS object representing that block.)
1976 Test: fast/text/font-face-set-cssom.html
1978 * css/CSSFontFace.cpp:
1979 (WebCore::CSSFontFace::CSSFontFace):
1980 (WebCore::CSSFontFace::setFamilies):
1981 (WebCore::CSSFontFace::setStyle):
1982 (WebCore::CSSFontFace::setWeight):
1983 (WebCore::CSSFontFace::setUnicodeRange):
1984 (WebCore::CSSFontFace::setVariantLigatures):
1985 (WebCore::CSSFontFace::setVariantPosition):
1986 (WebCore::CSSFontFace::setVariantCaps):
1987 (WebCore::CSSFontFace::setVariantNumeric):
1988 (WebCore::CSSFontFace::setVariantAlternates):
1989 (WebCore::CSSFontFace::setVariantEastAsian):
1990 (WebCore::CSSFontFace::setFeatureSettings):
1991 (WebCore::CSSFontFace::initializeWrapper):
1992 (WebCore::CSSFontFace::wrapper):
1993 (WebCore::CSSFontFace::setWrapper):
1994 (WebCore::CSSFontFace::purgeable):
1995 (WebCore::CSSFontFace::updateStyleIfNeeded):
1996 * css/CSSFontFace.h:
1997 * css/CSSFontFaceSet.cpp:
1998 (WebCore::CSSFontFaceSet::remove):
1999 (WebCore::CSSFontFaceSet::containsCSSConnection):
2000 (WebCore::CSSFontFaceSet::purge):
2001 * css/CSSFontFaceSet.h:
2002 * css/CSSFontSelector.cpp:
2003 (WebCore::CSSFontSelector::buildStarted):
2004 (WebCore::CSSFontSelector::buildCompleted):
2005 (WebCore::CSSFontSelector::addFontFaceRule):
2006 * css/CSSFontSelector.h:
2008 (WebCore::FontFace::family):
2009 (WebCore::FontFace::style):
2010 (WebCore::FontFace::weight):
2011 (WebCore::FontFace::unicodeRange):
2012 (WebCore::FontFace::variant):
2013 (WebCore::FontFace::featureSettings):
2014 (WebCore::FontFace::adopt):
2017 2016-06-11 Chris Dumez <cdumez@apple.com>
2019 WorkerNavigator is missing some attributes
2020 https://bugs.webkit.org/show_bug.cgi?id=158593
2021 <rdar://problem/26731334>
2023 Reviewed by Darin Adler.
2025 Add attributes that are missing on WorkerNavigator:
2027 - hardwareConcurrency
2034 Firefox and Chrome already expose those attributes.
2036 Relevant specification:
2037 https://html.spec.whatwg.org/multipage/workers.html#the-workernavigator-object
2039 This patch also refactors the IDL to match the specification more
2040 closely and promote sharing between Navigator and WorkerNavigator.
2042 No new tests, updated existing test.
2045 * DerivedSources.make:
2046 Add new supplemental IDL files.
2048 * page/Navigator.cpp:
2050 Moved language() / hardwareConcurrency() from Navigator to NavigatorBase
2051 so that it can be used by NavigatorWorker as well.
2053 * page/NavigatorBase.h:
2054 * page/NavigatorBase.cpp:
2055 (WebCore::NavigatorBase::language):
2056 The implementation still calls defaultLanguage() but I updated it to be
2057 thread safe on all platforms.
2059 (WebCore::NavigatorBase::hardwareConcurrency):
2060 Use std::call_once() for thread safety.
2062 * page/Navigator.idl:
2063 * page/NavigatorConcurrentHardware.idl: Copied from Source/WebCore/page/WorkerNavigator.idl.
2064 * page/NavigatorID.idl: Copied from Source/WebCore/page/WorkerNavigator.idl.
2065 * page/NavigatorLanguage.idl: Copied from Source/WebCore/page/WorkerNavigator.idl.
2066 * page/NavigatorOnLine.idl: Copied from Source/WebCore/page/WorkerNavigator.idl.
2067 * page/WorkerNavigator.idl:
2068 Move several attributes to their own supplemental interfaces to match
2069 the specification and promote sharing with WorkerNavigator.
2071 * platform/Language.cpp:
2072 (WebCore::userPreferredLanguages):
2073 * platform/Language.h:
2074 Made thread-safe on all platforms.
2076 2016-06-11 Antti Koivisto <antti@apple.com>
2080 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2081 (WebCore::NetworkStorageSession::switchToNewTestingSession):
2083 2016-06-10 Antti Koivisto <antti@apple.com>
2085 Vary:Cookie validation doesn't work in private browsing
2086 https://bugs.webkit.org/show_bug.cgi?id=158616
2087 rdar://problem/26755067
2089 Reviewed by Darin Adler.
2091 This wasn't implemented because there was no way to get NetworkStorageSession from
2092 a SessionID on WebCore side.
2094 The patch adds a simple WebCore level weak map that allows getting NetworkStorageSessions
2095 from SessionID. This seemed like the cleanest way to do this without a big refactoring
2096 around the currently WebKit2 level SessionTracker.
2099 * WebCore.xcodeproj/project.pbxproj:
2100 * platform/network/CacheValidation.cpp:
2101 (WebCore::headerValueForVary):
2103 Get NetworkStorageSession from SessionID for cookies
2105 (WebCore::verifyVaryingRequestHeaders):
2106 * platform/network/NetworkStorageSession.cpp: Added.
2108 Add platform independent .cpp for NetworkStorageSession.
2109 Implement a weak map for SessionID -> NetworkStorageSession.
2111 (WebCore::sessionsMap):
2112 (WebCore::NetworkStorageSession::NetworkStorageSession):
2113 (WebCore::NetworkStorageSession::~NetworkStorageSession):
2114 (WebCore::NetworkStorageSession::forSessionID):
2116 Get NetworkStorageSession for sessionID.
2118 * platform/network/NetworkStorageSession.h:
2119 (WebCore::NetworkStorageSession::sessionID):
2120 (WebCore::NetworkStorageSession::credentialStorage):
2121 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2122 (WebCore::NetworkStorageSession::NetworkStorageSession):
2124 Call to common constructor.
2126 (WebCore::defaultNetworkStorageSession):
2127 * platform/network/soup/NetworkStorageSessionSoup.cpp:
2128 (WebCore::NetworkStorageSession::NetworkStorageSession):
2130 Call to common constructor.
2132 (WebCore::defaultSession):
2133 (WebCore::NetworkStorageSession::~NetworkStorageSession): Deleted.
2135 2016-06-10 Ada Chan <adachan@apple.com>
2137 Use the video element's video box when getting the inline video rect in WebVideoFullscreenManager
2138 https://bugs.webkit.org/show_bug.cgi?id=158351
2139 <rdar://problem/26567938>
2141 Reviewed by Darin Adler.
2143 * WebCore.xcodeproj/project.pbxproj:
2144 Change the visibility of RenderVideo.h and RenderMedia.h since we'll be importing RenderVideo.h from WebKit2.
2145 * rendering/RenderVideo.h:
2147 2016-06-10 Benjamin Poulain <bpoulain@apple.com>
2149 Add support for passive event listeners on touch events
2150 https://bugs.webkit.org/show_bug.cgi?id=158601
2152 Reviewed by Simon Fraser.
2154 This patch wires "passive" state of EventTarget to the delivery of touch
2157 Instead of having a NonFastScrollableRegion, we have a pair of regions
2158 in EventTrackingRegions.
2159 The "asynchronousDispatchRegion" tracks the area for which all event
2160 listeners are passive. For those, events should be dispatched asynchronously.
2161 The "synchronousDispatchRegion" tracks the area for which there is at
2162 least one active event listener. Events have to be dispatched synchronously
2165 Tests: fast/events/touch/ios/tap-with-active-listener-on-elements.html
2166 fast/events/touch/ios/tap-with-active-listener-on-window.html
2167 fast/events/touch/ios/tap-with-passive-listener-on-elements.html
2168 fast/events/touch/ios/tap-with-passive-listener-on-window.html
2170 * WebCore.xcodeproj/project.pbxproj:
2172 (WebCore::Document::wheelEventHandlersChanged):
2173 (WebCore::Document::Document): Deleted.
2176 * dom/EventListenerMap.cpp:
2177 (WebCore::EventListenerMap::containsActive):
2178 If a Target has multiple listener for an event type, we want to know
2179 if any of them is active.
2181 * dom/EventListenerMap.h:
2182 * dom/EventTarget.cpp:
2183 (WebCore::EventTarget::hasActiveEventListeners):
2184 (WebCore::EventTarget::hasActiveTouchEventListeners):
2185 * dom/EventTarget.h:
2187 * page/DebugPageOverlays.cpp:
2188 (WebCore::NonFastScrollableRegionOverlay::updateRegion):
2189 I did not change the debug overlays.
2190 The NonFastScrollable area is the region for which events needs
2191 synchronous dispatch. Everything else should scroll without delay.
2193 * page/FrameView.cpp:
2194 (WebCore::FrameView::scrollableAreaSetChanged):
2196 (WebCore::Page::nonFastScrollableRects):
2197 * page/scrolling/AsyncScrollingCoordinator.cpp:
2198 (WebCore::AsyncScrollingCoordinator::setEventTrackingRegionsDirty):
2199 (WebCore::AsyncScrollingCoordinator::willCommitTree):
2200 (WebCore::AsyncScrollingCoordinator::updateEventTrackingRegions):
2201 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2202 (WebCore::AsyncScrollingCoordinator::frameViewEventTrackingRegionsChanged):
2203 (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
2204 (WebCore::AsyncScrollingCoordinator::setNonFastScrollableRegionDirty): Deleted.
2205 (WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion): Deleted.
2206 (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged): Deleted.
2207 * page/scrolling/AsyncScrollingCoordinator.h:
2208 (WebCore::AsyncScrollingCoordinator::eventTrackingRegionsDirty):
2209 (WebCore::AsyncScrollingCoordinator::nonFastScrollableRegionDirty): Deleted.
2211 * page/scrolling/ScrollingCoordinator.cpp:
2212 (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame):
2213 (WebCore::ScrollingCoordinator::absoluteEventTrackingRegions):
2214 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame): Deleted.
2215 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegion): Deleted.
2216 I intentionally left the Wheel event with synchronous dispatch.
2217 This use case will need its own set of tests.
2219 * page/scrolling/ScrollingCoordinator.h:
2220 (WebCore::ScrollingCoordinator::frameViewEventTrackingRegionsChanged):
2221 (WebCore::ScrollingCoordinator::frameViewNonFastScrollableRegionChanged): Deleted.
2222 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2223 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
2224 (WebCore::ScrollingStateFrameScrollingNode::setEventTrackingRegions):
2225 (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
2226 (WebCore::ScrollingStateFrameScrollingNode::setNonFastScrollableRegion): Deleted.
2227 * page/scrolling/ScrollingStateFrameScrollingNode.h:
2228 * page/scrolling/ScrollingTree.cpp:
2229 (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
2230 (WebCore::ScrollingTree::commitNewTreeState):
2231 (WebCore::ScrollingTree::eventTrackingTypeForPoint):
2232 (WebCore::ScrollingTree::isPointInNonFastScrollableRegion): Deleted.
2233 * page/scrolling/ScrollingTree.h:
2234 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2235 (WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
2236 * platform/EventTrackingRegions.h: Added.
2237 (WebCore::EventTrackingRegions::isEmpty):
2238 (WebCore::EventTrackingRegions::trackingTypeForPoint):
2239 (WebCore::operator==):
2241 2016-06-10 Enrica Casucci <enrica@apple.com>
2243 REGRESSION(r198177): Cannot paste an image when the pasteboard format is mime type.
2244 https://bugs.webkit.org/show_bug.cgi?id=158590
2245 rdar://problem/25471371
2247 Reviewed by Darin Adler.
2249 When creating a fragment from an image resource, the resource needs to
2250 be added to the document loader before setting the src attribute to the
2251 image element, otherwise loading is triggered and the loading fails.
2252 In r198177 the order of the operations was changed causing the bug.
2253 This patch adds support to test the scenario where the image in the pasteboard
2254 is available only as mime type (not WebArchive or RTFD), a situation that occurs
2255 more frequently on iOS.
2257 Test: editing/pasteboard/image-in-iframe.html
2259 * editing/ios/EditorIOS.mm:
2260 (WebCore::Editor::createFragmentForImageResourceAndAddResource):
2261 * editing/mac/EditorMac.mm:
2262 (WebCore::Editor::WebContentReader::readWebArchive):
2263 (WebCore::Editor::WebContentReader::readRTFD):
2264 (WebCore::Editor::WebContentReader::readRTF):
2265 (WebCore::Editor::createFragmentForImageResourceAndAddResource):
2266 * page/Settings.cpp:
2267 (WebCore::Settings::setImagesEnabled):
2268 (WebCore::Settings::setPreferMimeTypeForImages):
2269 (WebCore::Settings::setForcePendingWebGLPolicy):
2271 (WebCore::Settings::areImagesEnabled):
2272 (WebCore::Settings::preferMimeTypeForImages):
2273 (WebCore::Settings::arePluginsEnabled):
2274 * testing/InternalSettings.cpp:
2275 (WebCore::InternalSettings::Backup::restoreTo):
2276 (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
2277 (WebCore::InternalSettings::setPreferMimeTypeForImages):
2278 (WebCore::InternalSettings::setImagesEnabled):
2279 * testing/InternalSettings.h:
2280 * testing/InternalSettings.idl:
2282 2016-06-10 Alex Christensen <achristensen@webkit.org>
2284 Fix WinCairo build after r201943
2286 * platform/network/curl/MultipartHandle.cpp:
2287 (WebCore::MultipartHandle::didReceiveResponse):
2288 * platform/network/curl/ResourceHandleManager.cpp:
2289 (WebCore::handleLocalReceiveResponse):
2290 (WebCore::headerCallback):
2291 (WebCore::ResourceHandleManager::dispatchSynchronousJob):
2293 2016-06-10 Alex Christensen <achristensen@webkit.org>
2295 handleDataURL is only used by curl
2296 https://bugs.webkit.org/show_bug.cgi?id=158636
2298 Reviewed by Tim Horton.
2301 * platform/network/DataURL.cpp: Removed.
2302 * platform/network/DataURL.h: Removed.
2303 * platform/network/curl/ResourceHandleManager.cpp:
2304 (WebCore::ResourceHandleManager::startScheduledJobs):
2305 (WebCore::handleDataURL):
2306 (WebCore::ResourceHandleManager::dispatchSynchronousJob):
2308 2016-06-10 Alex Christensen <achristensen@webkit.org>
2310 Reduce ResourceResponse copying
2311 https://bugs.webkit.org/show_bug.cgi?id=158232
2313 Reviewed by Darin Adler.
2315 No new tests. No change in behavior except removing an unnecessary copy on cocoa platforms.
2317 * loader/ResourceLoader.cpp:
2318 (WebCore::ResourceLoader::didSendData):
2319 (WebCore::ResourceLoader::didReceiveResponse):
2320 * loader/ResourceLoader.h:
2321 * loader/appcache/ApplicationCacheGroup.cpp:
2322 (WebCore::ApplicationCacheGroup::createResourceHandle):
2323 (WebCore::ApplicationCacheGroup::didReceiveResponse):
2324 * loader/appcache/ApplicationCacheGroup.h:
2325 * platform/graphics/PlatformMediaResourceLoader.h:
2326 (WebCore::PlatformMediaResourceClient::~PlatformMediaResourceClient):
2327 (WebCore::PlatformMediaResourceClient::responseReceived):
2328 (WebCore::PlatformMediaResourceClient::redirectReceived):
2329 (WebCore::PlatformMediaResourceClient::shouldCacheResponse):
2330 (WebCore::PlatformMediaResourceClient::dataSent):
2331 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
2332 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2333 (ResourceHandleStreamingClient::willSendRequest):
2334 (ResourceHandleStreamingClient::didReceiveResponse):
2335 * platform/network/BlobResourceHandle.cpp:
2336 (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
2337 (WebCore::BlobResourceHandle::notifyResponseOnError):
2338 (WebCore::BlobResourceHandle::notifyReceiveData):
2339 * platform/network/DataURL.cpp:
2340 (WebCore::handleDataURL):
2341 * platform/network/PingHandle.h:
2342 (WebCore::PingHandle::PingHandle):
2343 * platform/network/ResourceHandleClient.cpp:
2344 (WebCore::ResourceHandleClient::willSendRequestAsync):
2345 (WebCore::ResourceHandleClient::didReceiveResponseAsync):
2346 * platform/network/ResourceHandleClient.h:
2347 (WebCore::ResourceHandleClient::didSendData):
2348 (WebCore::ResourceHandleClient::didReceiveResponse):
2349 (WebCore::ResourceHandleClient::didReceiveData):
2350 * platform/network/ResourceResponseBase.cpp:
2351 (WebCore::ResourceResponseBase::ResourceResponseBase):
2352 (WebCore::ResourceResponseBase::includeCertificateInfo):
2353 (WebCore::ResourceResponseBase::suggestedFilename):
2354 (WebCore::ResourceResponseBase::certificateInfo): Deleted.
2355 * platform/network/ResourceResponseBase.h:
2356 (WebCore::ResourceResponseBase::certificateInfo):
2357 (WebCore::ResourceResponseBase::encode):
2358 (WebCore::ResourceResponseBase::decode):
2359 (WebCore::ResourceResponseBase::containsCertificateInfo): Deleted.
2360 * platform/network/SynchronousLoaderClient.cpp:
2361 (WebCore::SynchronousLoaderClient::canAuthenticateAgainstProtectionSpace):
2362 (WebCore::SynchronousLoaderClient::didReceiveResponse):
2363 (WebCore::SynchronousLoaderClient::didReceiveData):
2364 * platform/network/SynchronousLoaderClient.h:
2365 * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
2366 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
2367 * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
2368 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
2369 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):
2370 * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
2371 (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
2372 * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
2373 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
2374 * platform/network/soup/ResourceHandleSoup.cpp:
2375 (WebCore::nextMultipartResponsePartCallback):
2376 (WebCore::sendRequestCallback):
2378 2016-06-09 Ryosuke Niwa <rniwa@webkit.org>
2380 Add SPI to disable spellchecking on auto-fillable text fields
2381 https://bugs.webkit.org/show_bug.cgi?id=158611
2383 Reviewed by Anders Carlsson.
2385 Added a boolean flag m_isSpellCheckingEnabled to HTMLInputElement. This flag defaults to true, and can be set
2386 to false by WebKit2 C API.
2388 * editing/Editor.cpp:
2389 (WebCore::Editor::isSpellCheckingEnabledFor): Fixed a bug that we were calling isSpellCheckingEnabled on
2390 the div inside an input element's shadow tree instead of the input element itself.
2391 * html/HTMLInputElement.cpp:
2392 (WebCore::HTMLInputElement::HTMLInputElement): Initialize m_spellcheckEnabled to true (it's a bit field).
2393 (WebCore::HTMLInputElement::isSpellCheckingEnabled): Added. Return false if m_spellcheckEnabled is false.
2394 * html/HTMLInputElement.h:
2395 (WebCore::HTMLInputElement::setSpellcheckEnabled): Added.
2397 2016-06-10 Alex Christensen <achristensen@webkit.org>
2399 Introduce WTF::UniqueRef
2400 https://bugs.webkit.org/show_bug.cgi?id=158596
2402 Reviewed by Brady Eidson.
2404 No new tests. No change in behavior.
2406 * inspector/InspectorOverlay.cpp:
2407 (WebCore::InspectorOverlay::overlayPage):
2408 * loader/EmptyClients.cpp:
2409 (WebCore::fillWithEmptyClients):
2411 (WebCore::Page::Page):
2413 (WebCore::Page::canStartMedia):
2414 (WebCore::Page::editorClient):
2415 (WebCore::Page::plugInClient):
2416 (WebCore::Page::mainFrame):
2417 (WebCore::Page::groupPtr): Deleted.
2418 * page/PageConfiguration.cpp:
2419 (WebCore::PageConfiguration::PageConfiguration):
2420 * page/PageConfiguration.h:
2421 * svg/graphics/SVGImage.cpp:
2422 (WebCore::SVGImage::dataChanged):
2424 2016-06-10 Joseph Pecoraro <pecoraro@apple.com>
2426 Web Inspector: Cleanup InspectorIndexedDBAgent a bit
2427 https://bugs.webkit.org/show_bug.cgi?id=158598
2429 Reviewed by Darin Adler.
2431 * inspector/InspectorIndexedDBAgent.cpp:
2433 2016-06-10 Youenn Fablet <youenn.fablet@crf.canon.fr>
2435 Origin header is not included in CORS requests for preloaded cross-origin resources
2436 https://bugs.webkit.org/show_bug.cgi?id=155761
2437 <rdar://problem/25351850>
2439 Reviewed by Alex Christensen.
2441 Making HTML preloader fully aware of crossorigin attribute value.
2442 Introducing CachedResourceRequest::setAsPotentiallyCrossOrigin as a helper routine to activate CORS mode.
2443 Making HTMLLinkElement and HTMLResourcePreloader use that routine.
2444 Making TokenPreloadScanner store the crossorigin attribute value in preload requests.
2445 Making TokenPreloadScanner store the crossorigin attribute value for link elements.
2447 Test: http/tests/security/cross-origin-css-9.html
2449 * html/HTMLLinkElement.cpp:
2450 (WebCore::HTMLLinkElement::process):
2451 * html/parser/HTMLPreloadScanner.cpp:
2452 (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
2453 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2454 * html/parser/HTMLResourcePreloader.cpp:
2455 (WebCore::crossOriginModeAllowsCookies):
2456 (WebCore::PreloadRequest::resourceRequest):
2457 * html/parser/HTMLResourcePreloader.h:
2458 (WebCore::PreloadRequest::setCrossOriginMode):
2459 (WebCore::PreloadRequest::PreloadRequest): Deleted.
2460 (WebCore::PreloadRequest::resourceType): Deleted.
2461 * loader/cache/CachedResourceRequest.cpp:
2462 (WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):
2463 * loader/cache/CachedResourceRequest.h:
2465 2016-06-10 Chris Dumez <cdumez@apple.com>
2467 ErrorEvent / ProgressEvent should be exposed to workers
2468 https://bugs.webkit.org/show_bug.cgi?id=158606
2470 Reviewed by Brady Eidson.
2472 ErrorEvent / ProgressEvent should be exposed to workers:
2473 - https://html.spec.whatwg.org/multipage/webappapis.html#errorevent
2474 - https://xhr.spec.whatwg.org/#interface-progressevent
2476 Firefox and Chrome both already expose those.
2478 No new tests, rebaselined existing test.
2480 * dom/ErrorEvent.idl:
2481 * dom/ProgressEvent.idl:
2483 2016-06-10 Chris Dumez <cdumez@apple.com>
2485 MessagePort should be exposed to workers
2486 https://bugs.webkit.org/show_bug.cgi?id=158607
2488 Reviewed by Brady Eidson.
2490 MessagePort should be exposed to workers:
2491 https://html.spec.whatwg.org/multipage/comms.html#messageport
2493 Firefox and Chrome both already expose it.
2495 No new tests, rebaselined existing test.
2497 * dom/MessagePort.idl:
2499 2016-06-10 Youenn Fablet <youenn.fablet@crf.canon.fr>
2501 Move preflight check code outside of DocumentThreadableLoader
2502 https://bugs.webkit.org/show_bug.cgi?id=158425
2504 Reviewed by Darin Adler.
2506 Moving preflight check code in its own class.
2507 This allows code to be easier to read, use/reuse and update.
2509 Behavior should be the same as before except in the case of a preflight response
2510 being a 3XX redirect response.
2511 Before this patch, the 3XX response was directly passed to the code processing regular responses.
2512 To keep compatibility with existing tests, a didFailRedirectCheck callback is called.
2513 This should be change to a preflight failure.
2515 Covered by existing tests.
2518 * WebCore.xcodeproj/project.pbxproj:
2519 * loader/CrossOriginPreflightChecker.cpp: Added.
2520 (WebCore::CrossOriginPreflightChecker::CrossOriginPreflightChecker):
2521 (WebCore::CrossOriginPreflightChecker::~CrossOriginPreflightChecker):
2522 (WebCore::CrossOriginPreflightChecker::handleLoadingFailure):
2523 (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
2524 (WebCore::CrossOriginPreflightChecker::notifyFinished):
2525 (WebCore::CrossOriginPreflightChecker::startPreflight):
2526 (WebCore::CrossOriginPreflightChecker::doPreflight):
2527 (WebCore::CrossOriginPreflightChecker::redirectReceived):
2528 (WebCore::CrossOriginPreflightChecker::setDefersLoading):
2529 (WebCore::CrossOriginPreflightChecker::isXMLHttpRequest):
2530 * loader/CrossOriginPreflightChecker.h: Added.
2531 * loader/DocumentThreadableLoader.cpp:
2532 (WebCore::DocumentThreadableLoader::create):
2533 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
2534 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
2535 (WebCore::DocumentThreadableLoader::setDefersLoading):
2536 (WebCore::DocumentThreadableLoader::clearResource):
2537 (WebCore::DocumentThreadableLoader::didReceiveResponse):
2538 (WebCore::DocumentThreadableLoader::didReceiveData):
2539 (WebCore::DocumentThreadableLoader::notifyFinished):
2540 (WebCore::DocumentThreadableLoader::didFinishLoading):
2541 (WebCore::DocumentThreadableLoader::didFail):
2542 (WebCore::DocumentThreadableLoader::preflightSuccess):
2543 (WebCore::DocumentThreadableLoader::preflightFailure):
2544 (WebCore::DocumentThreadableLoader::loadRequest):
2545 (WebCore::DocumentThreadableLoader::responseReceived): Deleted.
2546 (WebCore::DocumentThreadableLoader::dataReceived): Deleted.
2547 (WebCore::DocumentThreadableLoader::isAllowedByContentSecurityPolicy): Deleted.
2548 * loader/DocumentThreadableLoader.h:
2549 (WebCore::DocumentThreadableLoader::options):
2550 (WebCore::DocumentThreadableLoader::isLoading):
2551 (WebCore::DocumentThreadableLoader::document):
2553 2016-06-10 Adam Bergkvist <adam.bergkvist@ericsson.com>
2555 WebRTC: Imlement MediaEndpointPeerConnection::createAnswer()
2556 https://bugs.webkit.org/show_bug.cgi?id=158566
2558 Reviewed by Eric Carlson.
2560 Add the MediaEndpointPeerConnection implementation of RTCPeerConnection.createAnswer [1].
2561 createAnswer() creates a 'reply' to an remote offer set with setRemoteDescription(),
2562 completes the offer/answer dialog and brings the RTCPeerConnection back to the 'stable'
2565 [1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-rtcpeerconnection-createanswer
2567 Test: fast/mediastream/RTCPeerConnection-inspect-answer.html
2569 * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2570 (WebCore::MediaEndpointPeerConnection::createOfferTask):
2571 Align creation of RTCSessionDescription with createAnswerTask.
2572 (WebCore::MediaEndpointPeerConnection::createAnswer):
2573 (WebCore::MediaEndpointPeerConnection::createAnswerTask):
2575 * Modules/mediastream/MediaEndpointPeerConnection.h:
2577 2016-06-08 Sergio Villar Senin <svillar@igalia.com>
2579 [css-grid] CRASH when getting the computed style of a grid with only absolutely positioned children
2580 https://bugs.webkit.org/show_bug.cgi?id=158537
2582 Reviewed by Darin Adler.
2584 Absolute positioning occurs after layout of the grid and its in-flow contents, and does not
2585 contribute to the sizing of any grid tracks or affect the size/configuration of the grid in
2586 any way. This means that we should treat as empty any grid whose only children are
2587 absolutely positioned items.
2589 Since r201510 empty grids are no longer internally represented by a 1x1 matrix. As we were
2590 not considering grids-with-only-absolutely-positioned-children as empty, we were trying to
2591 access some invalid position in the internal representation of the grid triggering an ASSERT
2592 in debug builds and a crash in release.
2594 Test: fast/css-grid-layout/grid-only-abspos-item-computed-style-crash.html
2596 * css/CSSComputedStyleDeclaration.cpp:
2597 (WebCore::valueForGridTrackList):
2599 2016-06-10 Chris Dumez <cdumez@apple.com>
2601 DOMException should be exposed to workers
2602 https://bugs.webkit.org/show_bug.cgi?id=158608
2604 Reviewed by Alex Christensen.
2606 DOMException should be exposed to workers:
2607 https://heycam.github.io/webidl/#es-DOMException-call
2609 Both Firefox and Chrome expose DOMException to workers already.
2611 No new tests, rebaselined existing test.
2613 * dom/DOMCoreException.idl:
2615 2016-06-09 Alex Christensen <achristensen@webkit.org>
2619 * PlatformMac.cmake:
2621 2016-06-09 Alex Christensen <achristensen@webkit.org>
2623 Fix AppleWin build after r201901.
2624 https://bugs.webkit.org/show_bug.cgi?id=119839
2626 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2627 (PlatformCALayerWin::backingStoreAttached):
2628 (PlatformCALayerWin::userInteractionEnabled):
2629 (PlatformCALayerWin::setUserInteractionEnabled):
2630 (PlatformCALayerWin::geometryFlipped):
2631 * platform/graphics/ca/win/PlatformCALayerWin.h:
2633 2016-06-09 Chris Fleizach <cfleizach@apple.com>
2635 AX: VoiceOver Unable to View Download Progress or Completion Status for Mail Attachments
2636 https://bugs.webkit.org/show_bug.cgi?id=158581
2638 Reviewed by Darin Adler.
2640 Update attachment element accessibility so that:
2641 1) the action name comes first to match UI
2642 2) on iOS, it has the updates frequently trait
2644 Make sure this test now runs on iOS as well.
2646 Modified tests: accessibility/attachment-element.html
2648 * accessibility/AccessibilityAttachment.cpp:
2649 (WebCore::AccessibilityAttachment::accessibilityText):
2650 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2651 (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2652 (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2653 (-[WebAccessibilityObjectWrapper accessibilityValue]):
2654 (-[WebAccessibilityObjectWrapper accessibilityIsAttachmentElement]):
2655 (-[WebAccessibilityObjectWrapper accessibilityIsComboBox]):
2657 2016-06-09 Alex Christensen <achristensen@webkit.org>
2659 Clean up WebCore.vcxproj after switching to CMake.
2661 * WebCore.vcxproj/QTMovieWin: Removed.
2662 * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props: Removed.
2663 * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props: Removed.
2664 * WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props: Removed.
2665 * WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props: Removed.
2666 * WebCore.vcxproj/QTMovieWin/QTMovieWinPostBuild.cmd: Removed.
2667 * WebCore.vcxproj/QTMovieWin/QTMovieWinPreBuild.cmd: Removed.
2668 * WebCore.vcxproj/QTMovieWin/QTMovieWinPreLink.cmd: Removed.
2669 * WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props: Removed.
2670 * WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props: Removed.
2671 * WebCore.vcxproj/xcopy.excludes: Removed.
2673 2016-06-09 Zalan Bujtas <zalan@apple.com>
2675 Hairline borders do not show up on 3x displays.
2676 https://bugs.webkit.org/show_bug.cgi?id=158604
2677 <rdar://problem/26511679>
2679 Reviewed by Simon Fraser.
2681 On a 3x display, when we convert a 1/3px hairline border from float
2682 to LayoutUnit and pixel floor the result, we end up with a 0px width border.
2683 It's because float to LayoutUnit is lossy and since the current kFixedPointDenominator % 3 != 0,
2684 flooring LayoutUnit(1/3px) ends up being 0px. (float: 1/3 -> LayoutUnit: (1/3 - 1/kFixedPointDenominator) -> floor: 0)
2685 This patch eliminates the (unnecessary) float -> LayoutUnit - float conversion on border width.
2687 Test: fast/borders/hidpi-3x-input-hairline-border.html
2689 * rendering/BorderEdge.cpp:
2690 (WebCore::BorderEdge::BorderEdge):
2691 * rendering/BorderEdge.h:
2693 2016-06-09 Commit Queue <commit-queue@webkit.org>
2695 Unreviewed, rolling out r201887.
2696 https://bugs.webkit.org/show_bug.cgi?id=158610
2698 This change caused LayoutTest crashes under GuardMalloc and
2699 ASan (Requested by ryanhaddad on #webkit).
2703 "Deleting a CSSOM style rule invalidates any previously-added
2705 https://bugs.webkit.org/show_bug.cgi?id=158450
2706 http://trac.webkit.org/changeset/201887
2708 2016-06-09 Chris Dumez <cdumez@apple.com>
2710 Address Darin's review comment on r201898.
2711 https://bugs.webkit.org/show_bug.cgi?id=158576
2713 Reviewed by Darin Adler.
2715 * page/Base64Utilities.h:
2717 2016-06-09 Antoine Quint <graouts@apple.com>
2719 [iOS] -webkit-overflow-scrolling: touch; ignores pointer-events: none;
2720 https://bugs.webkit.org/show_bug.cgi?id=119839
2721 <rdar://problem/9671514>
2723 Reviewed by Simon Fraser.
2725 Propagate a "userInteractionEnabled" flag from the Web process which is used to turn off
2726 user interaction on a UIScrollView created for -webkit-overflow-scrolling: touch.
2728 Test: fast/scrolling/ios/touch-scroll-pointer-events-none.html
2730 * platform/graphics/GraphicsLayer.cpp:
2731 (WebCore::GraphicsLayer::GraphicsLayer):
2732 * platform/graphics/GraphicsLayer.h:
2733 (WebCore::GraphicsLayer::userInteractionEnabled):
2734 (WebCore::GraphicsLayer::setUserInteractionEnabled):
2735 * platform/graphics/ca/GraphicsLayerCA.cpp:
2736 (WebCore::GraphicsLayerCA::setUserInteractionEnabled):
2737 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2738 (WebCore::GraphicsLayerCA::updateUserInteractionEnabled):
2739 * platform/graphics/ca/GraphicsLayerCA.h:
2740 * platform/graphics/ca/PlatformCALayer.h:
2741 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
2742 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2743 (PlatformCALayerCocoa::userInteractionEnabled):
2744 (PlatformCALayerCocoa::setUserInteractionEnabled):
2745 * rendering/RenderLayerBacking.cpp:
2746 (WebCore::RenderLayerBacking::updateAfterDescendants):
2748 2016-06-09 Chris Dumez <cdumez@apple.com>
2750 WorkerNavigator property should exist on WorkerGlobalScope
2751 https://bugs.webkit.org/show_bug.cgi?id=158574
2752 <rdar://problem/26725108>
2754 Reviewed by Darin Adler.
2756 WorkerNavigator property should exist on WorkerGlobalScope:
2757 https://html.spec.whatwg.org/multipage/workers.html#the-workernavigator-object
2759 Fixing this gets the number of failures on http://w3c-test.org/workers/interfaces.worker
2762 No new tests, rebaselined existing test.
2764 * page/WorkerNavigator.idl:
2766 2016-06-09 Chris Dumez <cdumez@apple.com>
2768 atob() / btoa() API should be exposed to workers
2769 https://bugs.webkit.org/show_bug.cgi?id=158576
2770 <rdar://problem/26729340>
2772 Reviewed by Sam Weinig.
2774 Expose atob() / btoa() API to workers as per:
2775 https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope
2777 This aligns our behavior with Firefox and Chrome as well.
2779 Test: fast/workers/atob-btoa.html
2782 * DerivedSources.cpp:
2783 * DerivedSources.make:
2784 * PlatformMac.cmake:
2785 * WebCore.xcodeproj/project.pbxproj:
2786 * page/Base64Utilities.cpp: Added.
2787 (WebCore::Base64Utilities::btoa):
2788 (WebCore::Base64Utilities::atob):
2789 * page/Base64Utilities.h: Added.
2790 * page/DOMWindow.cpp:
2791 (WebCore::DOMWindow::find): Deleted.
2792 (WebCore::DOMWindow::offscreenBuffering): Deleted.
2793 (WebCore::DOMWindow::outerHeight): Deleted.
2794 (WebCore::DOMWindow::outerWidth): Deleted.
2796 * page/DOMWindow.idl:
2797 * page/WindowBase64.idl: Removed.
2798 * page/WindowOrWorkerGlobalScope.idl: Renamed from Source/WebCore/page/WindowTimers.idl.
2799 * workers/WorkerGlobalScope.h:
2800 * workers/WorkerGlobalScope.idl:
2802 2016-06-09 John Wilander <wilander@apple.com>
2804 Restrict HTTP/0.9 responses to default ports and cancel HTTP/0.9 resource loads if the document was loaded with another HTTP protocol
2805 https://bugs.webkit.org/show_bug.cgi?id=158589
2806 <rdar://problem/25757454>
2808 Reviewed by Brent Fulgham.
2810 No new tests. Our layout test environment does not allow for headerless responses
2811 nor does it allow you to set an explicit HTTP/0.9 status header in PHP. I have
2812 manually tested this change with a Python socket setup doing both headerless and
2813 HTTP/0.9 header tests for positive and negative cases.
2815 * loader/DocumentLoader.cpp:
2816 (WebCore::DocumentLoader::responseReceived):
2817 Cancel loads if the request was made to a non-default port.
2818 * loader/ResourceLoader.cpp:
2819 (WebCore::ResourceLoader::didReceiveResponse):
2820 Cancel loads if the request was made to a non-default port or if the document
2821 was loaded with another protocol. Cancelation is handled as a fail so as to
2822 fire the onerror event and allow sites to handle it gracefully.
2824 2016-06-09 Alex Christensen <achristensen@webkit.org>
2826 Clean up EditorClient lifetime
2827 https://bugs.webkit.org/show_bug.cgi?id=158588
2829 Reviewed by Anders Carlsson.
2831 No new tests. This patch does two things, all of which do not change behavior:
2832 1. Use a std::unique_ptr<EditorClient> owned by the Page instead of allocating
2833 with new in WebKit/WebKit2 and deleting in WebEditorClient::pageDestroyed.
2834 2. Give the Page a PageConfiguration&& instead of a PageConfiguration& in its constructor.
2836 * inspector/InspectorOverlay.cpp:
2837 (WebCore::InspectorOverlay::overlayPage):
2838 * loader/EmptyClients.cpp:
2839 (WebCore::fillWithEmptyClients):
2840 * loader/EmptyClients.h:
2841 (WebCore::EmptyEditorClient::EmptyEditorClient):
2842 (WebCore::EmptyEditorClient::~EmptyEditorClient):
2843 * page/EditorClient.h:
2844 (WebCore::EditorClient::~EditorClient):
2846 (WebCore::Page::Page):
2847 (WebCore::Page::~Page):
2848 (WebCore::Page::setViewMode):
2849 (WebCore::Page::clearUndoRedoOperations):
2850 (WebCore::Page::inLowQualityImageInterpolationMode):
2851 (WebCore::Page::invalidateStylesForAllLinks):
2852 (WebCore::Page::invalidateStylesForLink):
2853 (WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames):
2854 (WebCore::Page::setDebugger):
2855 (WebCore::Page::setIsVisibleInternal):
2856 (WebCore::Page::setAllowsMediaDocumentInlinePlayback):
2858 (WebCore::Page::canStartMedia):
2859 (WebCore::Page::editorClient):
2860 (WebCore::Page::plugInClient):
2861 (WebCore::Page::mainFrame):
2862 (WebCore::Page::group):
2863 * page/PageConfiguration.cpp:
2864 * page/PageConfiguration.h:
2865 * page/mac/PageMac.mm:
2866 (WebCore::Page::addSchedulePair):
2867 (WebCore::Page::removeSchedulePair):
2868 * svg/graphics/SVGImage.cpp:
2869 (WebCore::SVGImage::dataChanged):
2871 2016-06-09 Joseph Pecoraro <pecoraro@apple.com>
2873 REGRESSION: Web Inspector: IndexedDB does not show ObjectStore data
2874 https://bugs.webkit.org/show_bug.cgi?id=158592
2875 <rdar://problem/26730696>
2877 Reviewed by Timothy Hatcher.
2879 * inspector/InspectorIndexedDBAgent.cpp:
2880 (WebCore::DataLoader::execute):
2881 Ensure the IDBTransaction is active when attempting to open a cursor.
2883 (WebCore::OpenCursorCallback::handleEvent):
2884 End, when the cursor result is empty, like we do for script results.
2886 2016-06-09 Antoine Quint <graouts@apple.com>
2888 Changing canvas height immediately after page load does not relayout canvas
2889 https://bugs.webkit.org/show_bug.cgi?id=156097
2891 Reviewed by Zalan Bujtas.
2893 Promote the logic use to identify whether we should perform a layout after a change of
2894 intrinsic size from RenderImage to RenderReplaced such that RenderCanvas may use it
2895 in canvasSizeChanged() and correctly update its layout in the case where the width
2896 or height attribute is updated and there are no explicit sizing performed with CSS.
2897 Additionally, this will also account for the object-fix property to only perform
2898 a layout if necessary.
2900 Test: fast/canvas/canvas-css-size-after-height-change-with-display-flex.html
2902 * rendering/RenderHTMLCanvas.cpp:
2903 (WebCore::RenderHTMLCanvas::canvasSizeChanged):
2904 * rendering/RenderImage.cpp:
2905 (WebCore::RenderImage::repaintOrMarkForLayout):
2906 * rendering/RenderReplaced.cpp:
2907 (WebCore::RenderReplaced::setNeedsLayoutIfNeededAfterIntrinsicSizeChange):
2908 * rendering/RenderReplaced.h:
2910 2016-06-09 Myles C. Maxfield <mmaxfield@apple.com>
2912 Deleting a CSSOM style rule invalidates any previously-added FontFaces
2913 https://bugs.webkit.org/show_bug.cgi?id=158450
2915 Reviewed by Darin Adler.
2917 This patch has two pieces: updating the CSSOM when the FontFace changes, and
2918 updating the FontFace when the CSSOM changes.
2920 1: Updating the CSSOM when the FontFace changes: CSSFontFaces already have a RefPtr
2921 to their StyleRuleFontFace which represents their CSS-connection. When changing a
2922 property of the CSSFontFace, we simply reach into the StyleRule and update it to
2923 match. Our existing infrastructure of invalidation due to the attribute changes
2924 makes sure that all the necessary updates occur.
2926 2. Updating the FontFace when the CSSOM changes: If the CSSOM changes in a trivial
2927 way (for example, a new @font-face is appended to the end of the last <style>
2928 element), we can handle it directly. However, when something more invasive occurs,
2929 we end up clearing the entire CSSFontSelector, and then adding all the style rules
2930 from scratch. This involves three steps:
2931 a) CSSFontSelector::buildStarted() is run, which means "we're about to start
2932 building up all the @font-face rules from scratch." We take this opportunity
2933 to purge as many fonts as possible. This is valuable because, for example,
2934 this function gets run when the page gets put into the page cache, so we
2935 want to destroy as much as possible. Not everything can be purged, however -
2936 only CSS-connected fonts which have never been inspected by script are
2937 purgeable. We don't allow fonts inspected by script to be purged because
2938 purging might result in a font appearing from JavaScript to transition from
2939 a success -> failure state, which we don't allow.
2940 b) Upon style recalc (possibly asynchronously) CSSFontSelector::addFontFaceRule()
2941 is called for each @font-face rule. We actually detect that we're in the
2942 middle of a style rebuild, and defer this step.
2943 c) When we're done adding all the font face rules, we call
2944 CSSFontSelector::buildCompleted(). This is where we compare the newly built-
2945 up list of font faces with what existed previously (as remembered in
2946 CSSFontSelector::buildStarted()) in order to detect font faces which were
2947 deleted from the document. Fonts which were newly added to the document
2948 are handled naturally.
2949 Fonts which have a property modified on them are created as if they were new.
2950 However, instead of simply adding the CSSFontFace, we search for the existing
2951 CSSFontFace (by CSS connection pointer) and tell the existing FontFace to
2952 adopt this new CSSFontFace. This means that the JavaScript object will just
2953 pick up any newly-written values in the CSSOM. It also means that the
2954 "status" attribute of the JavaScript object is reset, but this is expected
2955 and allowed by the spec. (For example, if you change the "src" attribute of
2956 an @font-face block via the CSSOM, all bets are off when you inspect the
2957 FontFace JS object representing that block.)
2959 Test: fast/text/font-face-set-cssom.html
2961 * css/CSSFontFace.cpp:
2962 (WebCore::CSSFontFace::CSSFontFace):
2963 (WebCore::CSSFontFace::setFamilies):
2964 (WebCore::CSSFontFace::setStyle):
2965 (WebCore::CSSFontFace::setWeight):
2966 (WebCore::CSSFontFace::setUnicodeRange):
2967 (WebCore::CSSFontFace::setVariantLigatures):
2968 (WebCore::CSSFontFace::setVariantPosition):
2969 (WebCore::CSSFontFace::setVariantCaps):
2970 (WebCore::CSSFontFace::setVariantNumeric):
2971 (WebCore::CSSFontFace::setVariantAlternates):
2972 (WebCore::CSSFontFace::setVariantEastAsian):
2973 (WebCore::CSSFontFace::setFeatureSettings):
2974 (WebCore::CSSFontFace::initializeWrapper):
2975 (WebCore::CSSFontFace::wrapper):
2976 (WebCore::CSSFontFace::setWrapper):
2977 (WebCore::CSSFontFace::purgeable):
2978 (WebCore::CSSFontFace::updateStyleIfNeeded):
2979 * css/CSSFontFace.h:
2980 * css/CSSFontFaceSet.cpp:
2981 (WebCore::CSSFontFaceSet::remove):
2982 (WebCore::CSSFontFaceSet::containsCSSConnection):
2983 (WebCore::CSSFontFaceSet::purge):
2984 * css/CSSFontFaceSet.h:
2985 * css/CSSFontSelector.cpp:
2986 (WebCore::CSSFontSelector::buildStarted):
2987 (WebCore::CSSFontSelector::buildCompleted):
2988 (WebCore::CSSFontSelector::addFontFaceRule):
2989 * css/CSSFontSelector.h:
2991 (WebCore::FontFace::family):
2992 (WebCore::FontFace::style):
2993 (WebCore::FontFace::weight):
2994 (WebCore::FontFace::unicodeRange):
2995 (WebCore::FontFace::variant):
2996 (WebCore::FontFace::featureSettings):
2997 (WebCore::FontFace::adopt):
3000 2016-06-09 Andy Estes <aestes@apple.com>
3002 Define printing{Minimum,Maximum}ShrinkFactor in only one place
3003 https://bugs.webkit.org/show_bug.cgi?id=158580
3005 Reviewed by Tim Horton.
3007 * page/PrintContext.cpp: Removed printingMinimumShrinkFactor and printingMaximumShrinkFactor.
3008 (WebCore::PrintContext::begin): Used minimumShrinkFactor() and maximumShrinkFactor() instead
3009 of printingMinimumShrinkFactor and printingMaximumShrinkFactor.
3010 (WebCore::PrintContext::computeAutomaticScaleFactor): Ditto.
3011 * page/PrintContext.h:
3012 (WebCore::PrintContext::minimumShrinkFactor): Added to return the same value as
3013 printingMinimumShrinkFactor.
3014 (WebCore::PrintContext::maximumShrinkFactor): Added to return the same value as
3015 printingMaximumShrinkFactor.
3017 2016-06-09 Eric Carlson <eric.carlson@apple.com>
3019 Don't show the caption menu if a video has only forced tracks
3020 https://bugs.webkit.org/show_bug.cgi?id=158573
3021 <rdar://problem/24632384>
3023 Reviewed by Jer Noble.
3025 Test: media/controls/forced-tracks-only.html
3027 * Modules/mediacontrols/mediaControlsApple.js:
3028 (Controller.prototype.updateCaptionButton): Don't show the button of there are no user-selectable
3029 text or audio tracks.
3031 * page/CaptionUserPreferencesMediaAF.cpp:
3032 (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Return an empty Vector if
3033 there are no user-selectable tracks.
3035 2016-06-09 Jer Noble <jer.noble@apple.com>
3037 Pass through play state and toggle state to the WebPlaybackControlsManager
3038 https://bugs.webkit.org/show_bug.cgi?id=158578
3039 <rdar://problem/25045616>
3041 Reviewed by Beth Dakin.
3043 Pass through the isPlaying portion of setRate() and allow toggling when a model is present.
3045 * platform/mac/WebPlaybackControlsManager.h:
3046 * platform/mac/WebPlaybackControlsManager.mm:
3047 * platform/mac/WebPlaybackSessionInterfaceMac.mm:
3048 (WebCore::WebPlaybackSessionInterfaceMac::setRate):
3049 (WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
3051 2016-06-09 Frederic Wang <fred.wang@free.fr>
3053 RenderMathOperator: Move calculation of preferred width into MathOperator
3054 https://bugs.webkit.org/show_bug.cgi?id=157071
3056 Reviewed by Brent Fulgham.
3058 No new tests, behavior is not change.
3060 * rendering/mathml/MathOperator.cpp:
3061 (WebCore::MathOperator::setOperator): Introduce a style parameter and call reset.
3062 (WebCore::MathOperator::reset): New helper function to reset the operator.
3063 For now we only set the width of the base glyph and the preferred max width.
3064 (WebCore::MathOperator::calculateDisplayStyleLargeOperator): Calculate the m_maxPreferredWidth.
3065 (WebCore::MathOperator::calculateStretchyData): Change the signature of the function and directly set m_maxPreferredWidth.
3066 * rendering/mathml/MathOperator.h: Add m_maxPreferredWidth member and update some declarations.
3067 (WebCore::MathOperator::width): New helper function.
3068 (WebCore::MathOperator::maxPreferredWidth): New helper function.
3069 * rendering/mathml/RenderMathMLOperator.cpp:
3070 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): This function performs wrong
3071 operations that will be fixed in bug 152244 when we update the tests.
3072 For now, let's just use maxPreferredWidth() for non-horizontal operators.
3073 (WebCore::RenderMathMLOperator::updateStyle): Use the new signature of the functions.
3075 2016-06-09 Alex Christensen <achristensen@webkit.org>
3077 Clean up WebSocket code
3078 https://bugs.webkit.org/show_bug.cgi?id=158551
3080 Reviewed by Darin Adler.
3082 No new tests. There is no change in behavior.
3083 There seems to be no reason why SocketStreamHandle should be an AuthenticationClient.
3085 * Modules/websockets/ThreadableWebSocketChannel.h:
3086 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3087 (WebCore::ThreadableWebSocketChannelClientWrapper::setSendRequestResult):
3088 (WebCore::ThreadableWebSocketChannelClientWrapper::bufferedAmount):
3089 (WebCore::ThreadableWebSocketChannelClientWrapper::setBufferedAmount):
3090 (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3091 (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
3092 (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3093 (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3094 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
3095 * Modules/websockets/WebSocket.cpp:
3096 (WebCore::joinStrings):
3097 (WebCore::saturateAdd):
3098 (WebCore::WebSocket::send):
3099 (WebCore::WebSocket::readyState):
3100 (WebCore::WebSocket::bufferedAmount):
3101 (WebCore::WebSocket::didReceiveBinaryData):
3102 (WebCore::WebSocket::didReceiveMessageError):
3103 (WebCore::WebSocket::didUpdateBufferedAmount):
3104 (WebCore::WebSocket::didStartClosingHandshake):
3105 (WebCore::WebSocket::didClose):
3106 * Modules/websockets/WebSocket.h:
3107 * Modules/websockets/WebSocketChannel.cpp:
3108 (WebCore::WebSocketChannel::WebSocketChannel):
3109 (WebCore::WebSocketChannel::~WebSocketChannel):
3110 (WebCore::WebSocketChannel::send):
3111 (WebCore::WebSocketChannel::bufferedAmount):
3112 (WebCore::WebSocketChannel::resume):
3113 (WebCore::WebSocketChannel::willOpenSocketStream):
3114 (WebCore::WebSocketChannel::didOpenSocketStream):
3115 (WebCore::WebSocketChannel::didCloseSocketStream):
3116 (WebCore::WebSocketChannel::didReceiveSocketStreamData):
3117 (WebCore::WebSocketChannel::didUpdateBufferedAmount):
3118 (WebCore::WebSocketChannel::didFailSocketStream):
3119 (WebCore::WebSocketChannel::didStartLoading):
3120 (WebCore::WebSocketChannel::appendToBuffer):
3121 (WebCore::WebSocketChannel::processBuffer):
3122 (WebCore::WebSocketChannel::resumeTimerFired):
3123 (WebCore::WebSocketChannel::startClosingHandshake):
3124 (WebCore::WebSocketChannel::didReceiveAuthenticationChallenge): Deleted.
3125 (WebCore::WebSocketChannel::didCancelAuthenticationChallenge): Deleted.
3126 * Modules/websockets/WebSocketChannel.h:
3127 * Modules/websockets/WebSocketChannelClient.h:
3128 (WebCore::WebSocketChannelClient::~WebSocketChannelClient):
3129 (WebCore::WebSocketChannelClient::didConnect):
3130 (WebCore::WebSocketChannelClient::didReceiveMessage):
3131 (WebCore::WebSocketChannelClient::didReceiveBinaryData):
3132 (WebCore::WebSocketChannelClient::didReceiveMessageError):
3133 (WebCore::WebSocketChannelClient::didUpdateBufferedAmount):
3134 (WebCore::WebSocketChannelClient::didStartClosingHandshake):
3135 (WebCore::WebSocketChannelClient::didClose):
3136 (WebCore::WebSocketChannelClient::WebSocketChannelClient):
3137 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3138 (WebCore::WorkerThreadableWebSocketChannel::send):
3139 (WebCore::WorkerThreadableWebSocketChannel::bufferedAmount):
3140 (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
3141 (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
3142 (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
3143 (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
3144 (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
3145 (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
3146 (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
3147 * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3148 * platform/network/BlobData.cpp:
3149 (WebCore::BlobData::appendData):
3150 (WebCore::BlobData::appendFile):
3151 * platform/network/BlobData.h:
3152 (WebCore::BlobDataItem::BlobDataItem):
3153 * platform/network/BlobRegistry.h:
3154 * platform/network/BlobRegistryImpl.cpp:
3155 (WebCore::BlobRegistryImpl::appendStorageItems):
3156 (WebCore::BlobRegistryImpl::registerFileBlobURL):
3157 (WebCore::BlobRegistryImpl::registerBlobURL):
3158 (WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked):
3159 (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
3160 * platform/network/BlobRegistryImpl.h:
3161 * platform/network/SocketStreamHandleBase.cpp:
3162 (WebCore::SocketStreamHandleBase::send):
3163 (WebCore::SocketStreamHandleBase::disconnect):
3164 (WebCore::SocketStreamHandleBase::sendPendingData):
3165 * platform/network/SocketStreamHandleBase.h:
3166 * platform/network/SocketStreamHandleClient.h:
3167 (WebCore::SocketStreamHandleClient::~SocketStreamHandleClient):
3168 (WebCore::SocketStreamHandleClient::willOpenSocketStream):
3169 (WebCore::SocketStreamHandleClient::didOpenSocketStream):
3170 (WebCore::SocketStreamHandleClient::didCloseSocketStream):
3171 (WebCore::SocketStreamHandleClient::didReceiveSocketStreamData):
3172 (WebCore::SocketStreamHandleClient::didUpdateBufferedAmount):
3173 (WebCore::SocketStreamHandleClient::didFailSocketStream):
3174 (WebCore::SocketStreamHandleClient::didReceiveAuthenticationChallenge): Deleted.
3175 (WebCore::SocketStreamHandleClient::didCancelAuthenticationChallenge): Deleted.
3176 * platform/network/cf/SocketStreamHandle.h:
3177 (WebCore::SocketStreamHandle::create):
3178 (WebCore::SocketStreamHandle::refAuthenticationClient): Deleted.
3179 (WebCore::SocketStreamHandle::derefAuthenticationClient): Deleted.
3180 * platform/network/cf/SocketStreamHandleCFNet.cpp:
3181 (WebCore::SocketStreamHandle::SocketStreamHandle):
3182 (WebCore::SocketStreamHandle::addCONNECTCredentials):
3183 (WebCore::SocketStreamHandle::copyCFStreamDescription):
3184 (WebCore::SocketStreamHandle::readStreamCallback):
3185 (WebCore::SocketStreamHandle::writeStreamCallback):
3186 (WebCore::SocketStreamHandle::reportErrorToClient):
3187 (WebCore::SocketStreamHandle::~SocketStreamHandle):
3188 (WebCore::SocketStreamHandle::platformClose):
3189 (WebCore::SocketStreamHandle::port):
3190 (WebCore::SocketStreamHandle::receivedCredential): Deleted.
3191 (WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
3192 (WebCore::SocketStreamHandle::receivedCancellation): Deleted.
3193 (WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
3194 (WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.
3195 * platform/network/curl/ResourceHandleCurl.cpp:
3196 * platform/network/curl/SocketStreamHandle.h:
3197 (WebCore::SocketStreamHandle::SocketData::SocketData):
3198 * platform/network/curl/SocketStreamHandleCurl.cpp:
3199 (WebCore::SocketStreamHandle::platformClose):
3200 (WebCore::SocketStreamHandle::readData):
3201 (WebCore::SocketStreamHandle::didReceiveData):
3202 (WebCore::SocketStreamHandle::didOpenSocket):
3203 (WebCore::SocketStreamHandle::createCopy):
3204 (WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge): Deleted.
3205 (WebCore::SocketStreamHandle::receivedCredential): Deleted.
3206 (WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
3207 (WebCore::SocketStreamHandle::receivedCancellation): Deleted.
3208 (WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
3209 (WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.
3210 * platform/network/soup/SocketStreamHandle.h:
3211 (WebCore::SocketStreamHandle::create):
3212 * platform/network/soup/SocketStreamHandleSoup.cpp:
3213 (WebCore::getHandleFromId):
3214 (WebCore::deactivateHandle):
3215 (WebCore::activateHandle):
3216 (WebCore::SocketStreamHandle::SocketStreamHandle):
3217 (WebCore::SocketStreamHandle::~SocketStreamHandle):
3218 (WebCore::SocketStreamHandle::connected):
3219 (WebCore::SocketStreamHandle::readBytes):
3220 (WebCore::SocketStreamHandle::platformSend):
3221 (WebCore::SocketStreamHandle::platformClose):
3222 (WebCore::SocketStreamHandle::beginWaitingForSocketWritability):
3223 (WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge): Deleted.
3224 (WebCore::SocketStreamHandle::receivedCredential): Deleted.
3225 (WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
3226 (WebCore::SocketStreamHandle::receivedCancellation): Deleted.
3227 (WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
3228 (WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.
3230 2016-06-09 Commit Queue <commit-queue@webkit.org>
3232 Unreviewed, rolling out r201815.
3233 https://bugs.webkit.org/show_bug.cgi?id=158570
3235 This broke the cmake build. (Requested by lforschler on
3240 "Teach cmake about libWebKitSystemInterfaceOSX10.12"
3241 http://trac.webkit.org/changeset/201815
3243 2016-06-09 Chris Dumez <cdumez@apple.com>
3245 WorkerGlobalScope attributes / operations should be on the prototype
3246 https://bugs.webkit.org/show_bug.cgi?id=158568
3247 <rdar://problem/26720079>
3249 Reviewed by Geoffrey Garen.
3251 WorkerGlobalScope attributes / operations should be on the prototype
3252 because WorkerGlobalScope is not marked as [Global] / [PrimaryGlobal]:
3253 - https://html.spec.whatwg.org/multipage/workers.html#the-workerglobalscope-common-interface
3254 - http://heycam.github.io/webidl/#es-attributes
3255 - http://heycam.github.io/webidl/#es-operations
3257 DedicatedWorkerGlobalScope is the interface that is marked as [Global]
3258 and whose attributes / operations should be on the instance.
3260 This brings the number of failures on http://w3c-test.org/workers/interfaces.worker
3261 from 65 to 34. It also aligns our behavior with Firefox and Chrome.
3263 Test: fast/workers/WorkerGlobalScope-properties-prototype.html
3265 * bindings/scripts/CodeGeneratorJS.pm:
3266 (InterfaceRequiresAttributesOnInstance):
3267 (OperationShouldBeOnInstance):
3269 2016-06-09 Tim Horton <timothy_horton@apple.com>
3271 Writing-mode-dependent properties don't apply if their value is a variable
3272 https://bugs.webkit.org/show_bug.cgi?id=158449
3273 <rdar://problem/26662478>
3275 Reviewed by Simon Fraser.
3277 Test: fast/css/variables/direction-dependent-variable-properties.html
3279 * css/CSSParser.cpp:
3280 (WebCore::CSSParser::parseVariableDependentValue):
3282 * css/StyleResolver.cpp:
3283 (WebCore::StyleResolver::resolvedVariableValue):
3284 CSSVariableDependentValue stores the unresolved (direction-dependent) property ID,
3285 because the property that it resolves to cannot be determined until style resolution time.
3286 Plumb the requisite direction and writing mode information into parseVariableDependentValue
3287 at style resolution time so that the property can be resolved to the correct
3288 non-direction-dependent property for each use of the value.
3290 2016-06-09 Ryan Haddad <ryanhaddad@apple.com>
3292 Attempt to fix the iOS build.
3294 Unreviewed build fix.
3296 * platform/network/mac/ResourceErrorMac.mm:
3297 (WebCore::ResourceError::ResourceError):
3299 2016-06-09 Simon Fraser <simon.fraser@apple.com>
3301 border-radius with different width and height rendered wrong
3302 https://bugs.webkit.org/show_bug.cgi?id=158300
3303 <rdar://problem/26672922>
3305 Reviewed by Zalan Bujtas.
3307 Borders with border-radius close to 100% 100% got oddly clipped. This happened because
3308 of the clipping we do to achieve the diagonal corner joins; RenderBoxModelObject::clipBorderSidePolygon()
3309 created trapezoids for each side, but only extended them to the center of the inner border rect.
3310 This clipped out parts of these borders.
3312 Fix by computing the trapezoids by intersecting the corner diagonal line with a line that passes
3313 through the adjacent corners of the inner rect, whose intersection is always going to be inside the
3314 rounded border. Also fix the quads used to do the antialiased/non-antialiased clipping,
3315 by adding a point rather than moving a corner point to ensure we don't mistakenly clip out any
3316 parts of the border.
3318 Finally, improve the rendering of non-renderable cases by actually doing the diagonal
3319 corner joins rather than just giving up.
3321 Tests: fast/borders/border-non-renderable-radius-inner-clip.html
3322 fast/borders/border-radius-inner-clip-vertical.html
3323 fast/borders/border-radius-inner-clip.html
3325 * rendering/RenderBoxModelObject.cpp:
3326 (WebCore::calculateAdjustedInnerBorder): Moved up.
3327 (WebCore::RenderBoxModelObject::paintOneBorderSide):
3328 (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
3329 (WebCore::findInnerVertex): Deleted.
3330 (WebCore::calculateSideRectIncludingInner): Deleted.
3331 (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath): Deleted.
3332 * rendering/RenderBoxModelObject.h:
3334 2016-06-09 Xabier Rodriguez Calvar <calvaris@igalia.com>
3336 Unreviewed, fixing compilation issue with WebRTC
3338 The code dependencies of the SDP processor were not right.
3340 * PlatformGTK.cmake:
3342 2016-06-09 Frederic Wang <fwang@igalia.com>
3344 Introduce MathOperator::Type
3345 https://bugs.webkit.org/show_bug.cgi?id=156950
3347 Reviewed by Sergio Villar Senin.
3349 No new tests, behavior is not change.
3351 An enum Type is introduced in MathOperator in order to indicate
3352 which kind of stretching is requested. In follow-up work, this will
3353 allow to just call setOperator and stretchTo without having to
3354 explicitly call calculateDisplayStyleLargeOperator or calculateStretchyData.
3356 * rendering/mathml/MathOperator.cpp:
3357 (WebCore::MathOperator::setOperator): Use Type instead of a boolean.
3358 (WebCore::MathOperator::setGlyphAssembly): Add an assert to ensure that the function is correctly used.
3359 (WebCore::MathOperator::calculateDisplayStyleLargeOperator): Ditto, this makes the assert more accurate.
3360 (WebCore::MathOperator::calculateStretchyData): Ditto and replace m_isVertical with a local isVertical variable.
3361 (WebCore::MathOperator::fillWithVerticalExtensionGlyph): Ditto.
3362 (WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Ditto.
3363 (WebCore::MathOperator::paintVerticalGlyphAssembly): Ditto.
3364 (WebCore::MathOperator::paintHorizontalGlyphAssembly): Ditto.
3365 * rendering/mathml/MathOperator.h: Add the Type enum.
3366 (WebCore::MathOperator::stretchSize): Use Type instead of a boolean and add an
3367 assert to ensure that the function is correctly used.
3368 * rendering/mathml/RenderMathMLOperator.cpp:
3369 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Call setOperator with the correct value.
3370 (WebCore::RenderMathMLOperator::updateStyle): Ditto.
3372 2016-06-09 Commit Queue <commit-queue@webkit.org>
3374 Unreviewed, rolling out r201810.
3375 https://bugs.webkit.org/show_bug.cgi?id=158563
3377 breaks build without ENABLE_WEB_ANIMATION (Requested by
3378 mcatanzaro on #webkit).
3382 "[web-animations] Add Animatable, AnimationEffect,
3383 KeyframeEffect and Animation interface"
3384 https://bugs.webkit.org/show_bug.cgi?id=156096
3385 http://trac.webkit.org/changeset/201810
3387 2016-06-09 Ryosuke Niwa <rniwa@webkit.org>
3389 slotchange event should be fired at the end of microtask
3390 https://bugs.webkit.org/show_bug.cgi?id=157374
3391 <rdar://problem/26154024>
3393 Reviewed by Antti Koivisto.
3395 Dispatch slotchange event at the end of every microtask after delivering records to mutation observers
3396 as specified in: https://dom.spec.whatwg.org/#notify-mutation-observers
3398 Test: fast/shadow-dom/slotchange-event.html
3401 (WebCore::Document::enqueueSlotchangeEvent): Deleted.
3403 * dom/MutationObserver.cpp:
3404 (WebCore::signalSlotList): Added.
3405 (WebCore::MutationObserverMicrotask::run): mutationObserverCompoundMicrotaskQueuedFlag is now unset in
3406 notifyMutationObservers to better match the concept to "notify mutation observers".
3407 (WebCore::MutationObserver::enqueueSlotChangeEvent): Added.
3408 (WebCore::MutationObserver::notifyMutationObservers): Renamed from deliverAllMutations. Added the code
3409 to dispatch slotchange events as spec'ed, and also added comments for each step.
3410 * dom/MutationObserver.h:
3411 * html/HTMLSlotElement.cpp:
3412 (WebCore::HTMLSlotElement::enqueueSlotChangeEvent): Use MutationObserver::enqueueSlotChangeEvent. Don't
3413 create an event here since that is only needed when dispatching the event, and to keep track of whether
3414 we've already scheduled an event or not. Use a boolean flag instead for the latter.
3415 (WebCore::HTMLSlotElement::dispatchSlotChangeEvent): Added. Creates and dispatches an event.
3416 (WebCore::HTMLSlotElement::dispatchEvent): Deleted.
3417 * html/HTMLSlotElement.h:
3418 (WebCore::HTMLSlotElement::didRemoveFromSignalSlotList): Added.
3420 2016-06-08 Youenn Fablet <youenn.fablet@crf.canon.fr>
3422 Introduce ResourceErrorBase::type
3423 https://bugs.webkit.org/show_bug.cgi?id=158299
3425 Reviewed by Alex Christensen.
3427 Introducing an enum type for ResourceErrorBase.
3428 In most cases, the type is set at construction time.
3429 By default, constructor with no parameters will set type to Null.
3430 Constructor with parameters will set type to General.
3432 Removed boolean state error fields.
3434 Introduced a type&nb