1 2016-09-10 Chris Dumez <cdumez@apple.com>
3 parseHTMLInteger() should take a StringView in parameter
4 https://bugs.webkit.org/show_bug.cgi?id=161669
6 Reviewed by Ryosuke Niwa.
8 parseHTMLInteger() should take a StringView in parameter instead of a
11 * css/parser/CSSParser.cpp:
12 (WebCore::CSSParser::parseFontFaceSrcLocal):
13 * css/parser/CSSParserValues.h:
14 (WebCore::CSSParserString::toStringView):
15 Add toStringView() to avoid unnecessarily constructing a String for
16 calling StringBuilder::append().
18 * html/parser/HTMLParserIdioms.cpp:
19 (WebCore::parseHTMLInteger):
20 (WebCore::parseHTMLNonNegativeInteger):
21 (WebCore::parseHTTPRefreshInternal):
22 * html/parser/HTMLParserIdioms.h:
23 (WebCore::limitToOnlyHTMLNonNegativeNumbersGreaterThanZero):
24 (WebCore::limitToOnlyHTMLNonNegative):
25 Take a StringView in parameter instead of a const String&.
27 * platform/sql/SQLiteStatement.cpp:
28 (WebCore::SQLiteStatement::isColumnDeclaredAsBlob):
29 Avoid unnecessarily constructing a String to call equalLettersIgnoringASCIICase()
30 by leveraging the StringView constructor taking a 'const char*' in parameter.
32 * rendering/RenderBlock.cpp:
33 (WebCore::RenderBlock::constructTextRun):
34 * rendering/RenderBlock.h:
35 Add constructTextRun() overload taking an AtomicString. It was otherwise ambiguous
36 because both a String or a StringView could be constructed from an AtomicString.
38 * page/CaptionUserPreferencesMediaAF.cpp:
39 (WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):
40 (WebCore::buildDisplayStringForTrackBase):
41 * rendering/RenderThemeMac.mm:
42 (WebCore::RenderThemeMac::mediaControlsStyleSheet):
43 (WebCore::RenderThemeMac::mediaControlsScript):
44 Explicitly construct a String from NSString / CFStringRef types as such calls are
47 2016-09-10 Chris Dumez <cdumez@apple.com>
49 It is possible for Document::m_frame pointer to become stale
50 https://bugs.webkit.org/show_bug.cgi?id=161812
51 <rdar://problem/27745023>
53 Reviewed by Ryosuke Niwa.
55 Document::m_frame is supposed to get cleared by Document::prepareForDestruction().
56 The Frame destructor calls Frame::setView(nullptr) which is supposed to call the
57 prepareForDestruction() on the Frame's associated document. However,
58 Frame::setView(nullptr) was calling prepareForDestruction() only if
59 Document::inPageCache() returned true. This is because, we allow Documents to
60 stay alive in the PageCache even though they don't have a frame.
62 The issue is that Document::m_inPageCache flag was set to true right before
63 firing the pagehide event, so technically before really entering PageCache.
64 Therefore, we can run into problems if a Frame gets destroyed by a pagehide
65 EventHandler because ~Frame() will not call Document::prepareForDestruction()
66 due to Document::m_inPageCache being true. After the frame is destroyed,
67 Document::m_frame becomes stale and any action on the document will likely
68 lead to crashes (such as the one in the layout test and the radar which
69 happens when trying to unregister event listeners from the document).
71 The solution adopted in this patch is to replace the m_inPageCache boolean
72 with a m_pageCacheState enumeration that has 3 states:
74 - AboutToEnterPageCache
77 Frame::setView() / Frame::setDocument() were then updated to call
78 Document::prepareForDestruction() on the associated document whenever
79 the document's pageCacheState is not InPageCache. This means that we
80 will now call Document::prepareForDestruction() when the document is
81 being detached from its frame while firing the pagehide event.
83 Note that I tried to keep this patch minimal. Therefore, I kept
84 the Document::inPageCache() getter for now. I plan to switch all its
85 calls sites to the new Document::pageCacheState() getter in a follow-up
86 patch so that we can finally drop the confusing Document::inPageCache().
88 Test: fast/history/pagehide-remove-iframe-crash.html
91 (WebCore::Document::Document):
92 (WebCore::Document::~Document):
93 (WebCore::Document::createRenderTree):
94 (WebCore::Document::destroyRenderTree):
95 (WebCore::Document::setFocusedElement):
96 (WebCore::Document::setPageCacheState):
97 (WebCore::Document::topDocument):
99 (WebCore::Document::pageCacheState):
100 (WebCore::Document::inPageCache):
101 * history/CachedFrame.cpp:
102 (WebCore::CachedFrame::destroy):
103 * history/PageCache.cpp:
104 (WebCore::setPageCacheState):
105 (WebCore::PageCache::addIfCacheable):
106 * loader/FrameLoader.cpp:
107 (WebCore::FrameLoader::stopAllLoaders):
108 (WebCore::FrameLoader::open):
109 * loader/HistoryController.cpp:
110 (WebCore::HistoryController::invalidateCurrentItemCachedPage):
112 (WebCore::Frame::setView):
114 2016-09-10 Wenson Hsieh <wenson_hsieh@apple.com>
116 Apple.com keynote does not display media controls
117 https://bugs.webkit.org/show_bug.cgi?id=161833
118 <rdar://problem/28230123>
120 Reviewed by Tim Horton.
122 Tweaks the main content check so that we can distinguish between main content for the purposes of determining
123 autoplay policy vs. main content for the purposes of showing media controls. Namely, we make the latter less
124 restrictive than the former in terms of the maximum aspect ratio a video can have to be considered the right
125 size for main content.
127 New unit test in TestWebKitAPI.
129 * html/HTMLMediaElement.cpp:
130 (WebCore::mediaElementSessionInfoForSession):
131 * html/MediaElementSession.cpp:
132 (WebCore::MediaElementSession::canShowControlsManager):
133 (WebCore::MediaElementSession::isLargeEnoughForMainContent):
134 (WebCore::MediaElementSession::wantsToObserveViewportVisibilityForMediaControls):
135 (WebCore::isMainContentForPurposesOfAutoplay):
136 (WebCore::isElementLargeEnoughForMainContent):
137 (WebCore::MediaElementSession::updateIsMainContent):
138 (WebCore::isMainContent): Deleted.
139 * html/MediaElementSession.h:
141 2016-09-09 Alex Christensen <achristensen@webkit.org>
143 URLParser: Keep track of cannot-be-a-base-url according to spec
144 https://bugs.webkit.org/show_bug.cgi?id=161830
146 Reviewed by Tim Horton.
148 Covered by new API tests.
151 (WebCore::URL::invalidate):
153 Add a boolean required by the spec.
154 This will not add to sizeof(URL) because we already have some bit fields.
155 * platform/URLParser.cpp:
156 (WebCore::URLParser::parse):
157 (WebCore::URLParser::allValuesEqual):
159 2016-09-09 Commit Queue <commit-queue@webkit.org>
161 Unreviewed, rolling out r205771.
162 https://bugs.webkit.org/show_bug.cgi?id=161823
164 Broke Windows build (Requested by litherum on #webkit).
168 "Remove unused member of GlyphBuffer"
169 https://bugs.webkit.org/show_bug.cgi?id=161814
170 http://trac.webkit.org/changeset/205771
172 2016-09-09 Alex Christensen <achristensen@webkit.org>
174 URLParser should convert ASCII hosts to lowercase
175 https://bugs.webkit.org/show_bug.cgi?id=161820
177 Reviewed by Geoffrey Garen.
179 Covered by new API tests.
181 * platform/URLParser.cpp:
182 (WebCore::domainToASCII):
183 The fast path for domains that are already ASCII and do not need punycode encoding
184 should convert the domain to lowercase.
185 This matches behavior in URL::parse if isCanonicalHostnameLowercaseForScheme is true,
188 2016-09-09 Myles C. Maxfield <mmaxfield@apple.com>
190 Remove unused member of GlyphBuffer
191 https://bugs.webkit.org/show_bug.cgi?id=161814
193 Reviewed by Simon Fraser.
195 This m_offsets member never actually affected anything. It just made
196 FontCascade::drawGlyphBuffer() slower.
198 No new tests because there is no behavior change.
200 * platform/graphics/FontCascade.cpp:
201 (WebCore::FontCascade::drawGlyphBuffer):
202 * platform/graphics/GlyphBuffer.h:
203 (WebCore::GlyphBuffer::clear):
204 (WebCore::GlyphBuffer::advanceAt):
205 (WebCore::GlyphBuffer::add):
206 (WebCore::GlyphBuffer::shrink):
207 (WebCore::GlyphBuffer::swap):
208 (WebCore::GlyphBuffer::offsetAt): Deleted.
209 * platform/graphics/win/UniscribeController.cpp:
210 (WebCore::UniscribeController::shapeAndPlaceItem):
212 2016-09-09 Tim Horton <timothy_horton@apple.com>
214 Text replacement candidates don't always overwrite the entire original string
215 https://bugs.webkit.org/show_bug.cgi?id=161779
216 <rdar://problem/28033492>
218 Reviewed by Simon Fraser.
220 New test: editing/mac/spelling/accept-candidate-replacing-multiple-words.html.
222 * editing/Editor.cpp:
223 (WebCore::Editor::contextRangeForCandidateRequest):
224 Factor contextRangeForCandidateRequest out of the WebKits, into Editor.
225 This just expands to paragraph boundaries from the cursor.
227 (WebCore::Editor::selectTextCheckingResult):
228 Add selectTextCheckingResult, which, given a TextCheckingResult,
229 selects the range represented by the result's location and length, which
230 indicate the portion of the context string that the result refers to.
231 In the case of accepting a candidate, we want to select that range
232 so that our insertion will overwrite it.
234 (WebCore::Editor::handleAcceptedCandidate):
235 Make use of selectTextCheckingResult instead of just assuming that we want
236 to replace the word to the left of the insertion point.
238 (WebCore::Editor::stringForCandidateRequest): Deleted.
241 * testing/Internals.cpp:
242 (WebCore::Internals::handleAcceptedCandidate):
243 * testing/Internals.h:
244 * testing/Internals.idl:
245 Internals' handleAcceptedCandidate assumed (wrongly) that the length
246 of a TextCheckerResult was the length of the candidate, when really it is
247 the length of the text that the candidate would replace. Adjust this,
248 and expose the replacement range to JavaScript, so we can test this.
250 2016-09-09 Brady Eidson <beidson@apple.com>
252 Soft-link GameController.framework.
253 <rdar://problem/28219953> and https://bugs.webkit.org/show_bug.cgi?id=161802
255 Reviewed by Brian Burg.
257 No new tests (No change in behavior).
259 * Configurations/WebCore.xcconfig:
260 * WebCore.xcodeproj/project.pbxproj:
261 * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
262 (WebCore::GameControllerGamepadProvider::startMonitoringGamepads):
264 2016-09-09 Jiewen Tan <jiewen_tan@apple.com>
266 Rename Key to CryptoKey
267 https://bugs.webkit.org/show_bug.cgi?id=161665
268 <rdar://problem/28083391>
270 Reviewed by Brent Fulgham.
272 A link to the spec: https://www.w3.org/TR/WebCryptoAPI/#cryptokey-interface
274 * crypto/CryptoKey.idl:
275 Remove some unnecessary IDL attributes and reorder KeyType enum to match the spec.
276 * crypto/CryptoKeyType.h:
278 2016-09-09 Alex Christensen <achristensen@webkit.org>
280 URLParser: Fix and optimize parsing file URLs ending with a host but no slash
281 https://bugs.webkit.org/show_bug.cgi?id=161815
283 Reviewed by Geoffrey Garen.
285 Covered by new API tests.
287 * platform/URLParser.cpp:
288 (WebCore::bufferView):
289 (WebCore::URLParser::copyURLPartsUntil):
290 (WebCore::URLParser::parse):
292 2016-09-09 Alex Christensen <achristensen@webkit.org>
294 URLParser: Handle \ in path according to spec
295 https://bugs.webkit.org/show_bug.cgi?id=161805
297 Reviewed by Andy Estes.
299 Covered by new API tests.
301 * platform/URLParser.cpp:
302 (WebCore::URLParser::parse):
304 2016-09-09 Youenn Fablet <youenn@apple.com>
306 TextTrackLoader should use FetchOptions::mode according its crossOrigin attribute
307 https://bugs.webkit.org/show_bug.cgi?id=161792
309 Reviewed by Eric Carlson.
311 Covered by existing and updated tests.
313 Updating text track loader to use fetch mode according crossOrigin value.
315 Removed the check done in the case the crossOrigin value is not set.
316 Previously cross-origin loads were forbidden, now this is authorized.
317 This change allows aligning with the spec.
318 Also, this check could be bypassed in the case of a same-origin URL redirecting to a cross-origin one.
320 * loader/TextTrackLoader.cpp:
321 (WebCore::TextTrackLoader::notifyFinished): Checking resource error in lieu of doing CORS checks on its own.
322 (WebCore::TextTrackLoader::load): Using CachedResourceRequest::setAsPotentiallyCrossOrigin
323 * loader/TextTrackLoader.h:
324 * loader/cache/CachedResource.cpp:
325 (WebCore::CachedResource::loadFrom): Setting loading and status values as would be done when load is finished.
326 (WebCore::CachedResource::setBodyDataFrom): Default implementation is to copy the shared buffer.
327 * loader/cache/CachedResource.h:
328 * loader/cache/CachedResourceLoader.cpp:
329 (WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): Enabling resource update when mode or origin is different for TextTrack resources.
331 2016-09-09 Alex Christensen <achristensen@webkit.org>
333 URLParser should parse URLs with non-special schemes
334 https://bugs.webkit.org/show_bug.cgi?id=161786
336 Reviewed by Andy Estes.
338 Covered by new API tests.
340 * platform/URLParser.cpp:
341 (WebCore::URLParser::parse):
342 There's no reason for a SchemeEndCheckForSlashes state now that we can copy iterators.
343 It's not in the spec and not needed.
344 Also, move things around a little so parsing special or non-special schemes
345 followed by one or two slashes works correctly.
347 2016-09-09 Chris Dumez <cdumez@apple.com>
349 Regression(r186020): Null dereference in getStartDate()
350 https://bugs.webkit.org/show_bug.cgi?id=161733
352 Reviewed by Eric Carlson.
354 Update HTMLMediaElement::getStartDate() to return NaN if m_player is null,
357 Test: fast/media/getStartDate-NaN.html
359 * bindings/js/IDBBindingUtilities.cpp:
361 Add a FIXME comment as this code is using jsDateOrNull() but should
362 probably be using jsDate() as per:
363 - http://w3c.github.io/IndexedDB/#request-convert-a-key-to-a-value
365 * bindings/js/JSDOMBinding.cpp:
367 (WebCore::jsDateOrNull):
368 * bindings/js/JSDOMBinding.h:
369 - Rename jsDateOrNaN() to jsDate() as this is the default behavior. Also,
370 return new Date(NaN) instead of NaN if the implementation returns NaN.
371 The IDL says we should return a Date, not a number.
372 - Update jsDateOrNull() to only return jsNull() if the native value is
373 NaN, instead of doing so for every value that is not finite. Our
374 convention is to use NaN as special value to represent null in JS.
376 * bindings/scripts/CodeGeneratorJS.pm:
378 When converting a native value (double) into a Date, rely on the fact
379 that the type is nullable when deciding if we should call jsDate() or
380 jsDateOrNull() to convert. This way, we no longe need a WebKit specific
381 [TreatReturnedDateAs=Null|NaN] IDL extended attribute.
383 * bindings/scripts/IDLAttributes.txt:
384 * html/HTMLInputElement.idl:
385 Mark valueAsDate attribute as nullable, as per the specification:
386 - https://html.spec.whatwg.org/#htmlinputelement
388 * html/HTMLMediaElement.cpp:
389 (WebCore::HTMLMediaElement::getStartDate):
390 Return NaN if m_player is null instead of crashing. The reason I decided
391 to return NaN is because the specification [1] says to return a new Date
392 object representing the current timeline offset. The spec of timeline
393 offset [2] says that the initial timeline offset value is NaN.
394 [1] https://html.spec.whatwg.org/#dom-media-getstartdate
395 [2] https://html.spec.whatwg.org/#timeline-offset
397 * bindings/scripts/IDLAttributes.txt:
398 * html/HTMLMediaElement.idl:
399 Drop [TreatReturnedDateAs] attribute as it is no longer supported.
401 2016-09-09 Youenn Fablet <youenn@apple.com>
403 ASSERTION FAILED: promise.inherits(JSPromise::info())
404 https://bugs.webkit.org/show_bug.cgi?id=161632
405 <rdar://problem/28184743>
407 Reviewed by Mark Lam.
409 Test: fetch/fetch-worker-crash.html
411 * bindings/js/JSDOMPromise.h:
412 (WebCore::callPromiseFunction): Returning early if created promise is null.
413 Passing directly a DeferredWrapper to the generated code.
414 * bindings/scripts/CodeGeneratorJS.pm: Updated to take a DeferredWrapper.
415 (GenerateImplementation):
416 (GenerateReturnParameters):
417 * bindings/scripts/test/JS/JSTestObj.cpp: Rebasing expectations.
418 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
419 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
420 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
421 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
422 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
423 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
424 (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionPromise):
425 (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithExceptionPromise):
427 2016-09-09 Myles C. Maxfield <mmaxfield@apple.com>
429 [Cocoa] Improve performance of glyph advance metrics gathering
430 https://bugs.webkit.org/show_bug.cgi?id=161119
432 Reviewed by Simon Fraser.
434 Most of the glyphs in a GlyphPage are never read from. Therefore, we can get a performance boost
435 by not populating as many items in the GlyphPage. Because of the performance characteristics of
436 CTFontGetGlyphsForCharacters(), a better size for a GlyphPage is 16 items. This, coupled with
437 using CTFontGetUnsummedAdvancesForGlyphsAndStyle(), causes between a 0.01%-0.5% speedup on PLT.
439 No new tests because there is no behavior change.
441 * platform/graphics/Font.cpp:
442 (WebCore::Font::initCharWidths):
443 (WebCore::Font::platformGlyphInit):
444 (WebCore::createAndFillGlyphPage):
445 * platform/graphics/Font.h:
446 (WebCore::Font::widthForGlyph):
447 * platform/graphics/GlyphMetricsMap.h:
448 * platform/graphics/GlyphPage.h:
449 * platform/graphics/cocoa/FontCocoa.mm:
450 * platform/spi/cocoa/CoreTextSPI.h:
451 (WebCore::Font::platformWidthForGlyph):
452 (WebCore::canUseFastGlyphAdvanceGetter): Deleted.
454 2016-09-09 Antti Koivisto <antti@apple.com>
456 v3: WebContent crash due to RELEASE_ASSERT in WebCore: WebCore::StyleResolver::styleForElement
457 https://bugs.webkit.org/show_bug.cgi?id=161689
459 Reviewed by Andreas Kling.
461 These crashes happen because synchronously triggered resource loads generate callbacks that may end up
462 deleting the resource loader.
464 Stop triggering resource loads from StyleResolver. Instead trigger them when applying style to render tree.
466 * css/StyleResolver.cpp:
467 (WebCore::StyleResolver::~StyleResolver):
469 Replace the RELEASE_ASSERT against deletion during resource loads by a general isDeleted assert.
471 (WebCore::StyleResolver::styleForElement):
472 (WebCore::StyleResolver::styleForKeyframe):
473 (WebCore::StyleResolver::pseudoStyleForElement):
474 (WebCore::StyleResolver::styleForPage):
475 (WebCore::StyleResolver::applyMatchedProperties):
476 (WebCore::StyleResolver::loadPendingResources): Deleted.
477 * css/StyleResolver.h:
478 * page/animation/KeyframeAnimation.cpp:
479 (WebCore::KeyframeAnimation::KeyframeAnimation):
480 (WebCore::KeyframeAnimation::resolveKeyframeStyles):
482 Ensure resource load for all animation frames.
484 * page/animation/KeyframeAnimation.h:
485 * rendering/RenderElement.cpp:
486 (WebCore::RenderElement::createFor):
487 (WebCore::RenderElement::initializeStyle):
489 Load resources when renderer initializes a style.
491 (WebCore::RenderElement::setStyle):
492 (WebCore::RenderElement::getUncachedPseudoStyle):
494 Load resources for pseudo styles.
496 * rendering/RenderImage.cpp:
497 (WebCore::RenderImage::RenderImage):
498 (WebCore::RenderImage::styleWillChange):
500 Shuffle image resource initialization out from constructor so initializeStyle gets called before.
502 * rendering/RenderImage.h:
503 * rendering/style/StyleCachedImage.cpp:
504 (WebCore::StyleCachedImage::StyleCachedImage):
506 Track pending status with a bit instead of implicitly by the existence of CachedResource.
507 This is useful for asserts.
509 (WebCore::StyleCachedImage::load):
510 (WebCore::StyleCachedImage::isPending):
511 (WebCore::StyleCachedImage::addClient):
512 (WebCore::StyleCachedImage::removeClient):
513 (WebCore::StyleCachedImage::image):
514 * rendering/style/StyleCachedImage.h:
516 2016-09-08 Yusuke Suzuki <utatane.tea@gmail.com>
518 ScriptRunner should be driven by PendingScript rather than ScriptElement
519 https://bugs.webkit.org/show_bug.cgi?id=161726
521 Reviewed by Ryosuke Niwa.
523 Tests: js/dom/document-write-in-error-event.html
524 js/dom/document-write-in-load-event.html
526 ScriptRunner is driven by ScriptElement::notifyFinished. While ScriptRunner is driven by this,
527 HTMLScriptRunner does not use it. Instead, HTMLScriptRunner uses PendingScriptClient. As a result,
528 ScriptElement::notifyFinished is used only when the script is annotated with "defer" or "async"
529 while all the external script will load the LoadableScript. It is confusing.
530 This patch removes ScriptElement::notifyFinished and use PendingScript's observability
531 in ScriptRunner instead.
533 This patch also fixes the behavior about ignore-destructive-writes counter[1]. When dispatching
534 the load and error events, this ignore-destructive-writes counter should not be incremeneted by
535 this execution. The added tests ensure this behavior.
537 [1]: https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block
539 * dom/ScriptElement.cpp: Drop LoadableScriptClient interface.
540 (WebCore::ScriptElement::prepareScript): Do not use addClient. ScriptRunner use PendingScript::{setClient,clearClient} instead.
541 (WebCore::ScriptElement::executeScriptForScriptRunner): IgnoreDestructiveWriteCountIncrementer will be done in ScriptElement::executeScript.
542 So no need to do it here, that's duplicated.
543 (WebCore::ScriptElement::~ScriptElement): Deleted. ScriptElement does not use addClient/removeClient.
544 (WebCore::ScriptElement::stopLoadRequest): Deleted.
545 (WebCore::ScriptElement::executeScriptForHTMLScriptRunner): Deleted. executeScriptForHTMLScriptRunner and executeScriptForScriptRunner are
546 merged into executeScriptForRunner.
547 (WebCore::ScriptElement::notifyFinished): Deleted.
548 * dom/ScriptElement.h:
549 (WebCore::ScriptElement::~ScriptElement):
550 (WebCore::ScriptElement::willExecuteInOrder): Used in ScriptRunner to determine whether the script is async or defer.
551 (WebCore::ScriptElement::willExecuteWhenDocumentFinishedParsing): Deleted.
552 * dom/ScriptRunner.cpp:
553 (WebCore::ScriptRunner::~ScriptRunner): HashSet's iterator will return `const PendingScript&`.
554 Another option is using HashSet<RefPtr<PendingScript>>. Here, we use a little bit weired const_cast.
555 (WebCore::ScriptRunner::queueScriptForExecution): Use PendingScript::setClient to wait loading.
556 (WebCore::ScriptRunner::notifyFinished): Notify the script ready here.
557 (WebCore::ScriptRunner::timerFired): Use executeScriptForScriptRunner.
558 (WebCore::ScriptRunner::notifyScriptReady): Deleted.
559 * dom/ScriptRunner.h:
560 * html/parser/HTMLScriptRunner.cpp:
561 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): Use executeScriptForScriptRunner.
563 2016-09-08 Yusuke Suzuki <utatane.tea@gmail.com>
565 [WTF] HashTable's rehash is not compatible to Ref<T> and ASan
566 https://bugs.webkit.org/show_bug.cgi?id=161763
568 Reviewed by Mark Lam.
570 Include wtf/text/StringHash.h to avoid linking errors in EFL port.
572 * loader/ResourceLoadStatistics.h:
574 2016-09-08 Chris Dumez <cdumez@apple.com>
576 HTMLObjectElement.hspace / vspace attributes should be unsigned
577 https://bugs.webkit.org/show_bug.cgi?id=161766
579 Reviewed by Ryosuke Niwa.
581 HTMLObjectElement.hspace / vspace attributes should be unsigned:
582 - https://html.spec.whatwg.org/#HTMLObjectElement-partial
584 Firefox agrees with the specification but those were signed in WebKit.
586 No new tests, rebaselined existing test.
588 * html/HTMLObjectElement.idl:
590 2016-09-08 Chris Dumez <cdumez@apple.com>
592 HTMLObjectElement.codebase attribute should reflect as a URL
593 https://bugs.webkit.org/show_bug.cgi?id=161768
595 Reviewed by Alex Christensen.
597 HTMLObjectElement.codebase attribute should reflect as a URL:
598 - https://html.spec.whatwg.org/#dom-applet-codebase
600 Chrome and Firefox agree with the specification.
602 No new test, rebaselined existing test.
604 * html/HTMLObjectElement.idl:
606 2016-09-08 Chris Dumez <cdumez@apple.com>
608 ol.start may return incorrect value for reversed lists when not explicitly set
609 https://bugs.webkit.org/show_bug.cgi?id=161713
611 Reviewed by Zalan Bujtas.
613 ol.start may return incorrect value for reversed lists when not explicitly set.
614 This is because we're supposed to return the number of rendered <li> child
615 elements, which relies on layout. However, we did not make sure the layout is
616 up-to-date before counting the number of li child elements. This patch fixes
619 No new tests, rebaselined existing tests.
621 * html/HTMLOListElement.h:
623 2016-09-08 Chris Dumez <cdumez@apple.com>
625 Add support for HTMLIframeElement.allowFullscreen attribute
626 https://bugs.webkit.org/show_bug.cgi?id=161757
628 Reviewed by Sam Weinig.
630 Add support for HTMLIframeElement.allowFullscreen attribute:
631 - https://html.spec.whatwg.org/#dom-iframe-allowfullscreen
633 Firefox and Chrome already support it, unprefixed.
635 Note that the HTMLIframeElement.allowFullscreen attribute reflects the
636 allowfullscreen content attribute which we already support.
638 Test: fullscreen/full-screen-iframe-allowFullscreen.html
640 * html/HTMLIFrameElement.idl:
642 2016-09-08 Chris Dumez <cdumez@apple.com>
644 frame.longDesc / iframe.longDesc should reflect as a URL
645 https://bugs.webkit.org/show_bug.cgi?id=161764
647 Reviewed by Alex Christensen.
649 frame.longDesc / iframe.longDesc should reflect as a URL:
650 - https://html.spec.whatwg.org/#dom-iframe-longdesc
651 - https://html.spec.whatwg.org/#dom-frame-longdesc
653 They already do in Chrome and Firefox.
655 No new tests, rebaselined existing tests.
657 * html/HTMLFrameElement.idl:
658 * html/HTMLIFrameElement.idl:
660 2016-09-08 Alex Christensen <achristensen@webkit.org>
662 URLParser: Handle \ in paths of special URLs according to spec
663 https://bugs.webkit.org/show_bug.cgi?id=161781
665 Reviewed by Tim Horton.
667 Covered by new API tests.
669 * platform/URLParser.cpp:
670 (WebCore::bufferView):
671 (WebCore::URLParser::copyURLPartsUntil):
672 (WebCore::URLParser::parse):
673 * platform/URLParser.h:
675 2016-09-08 Said Abou-Hallawa <sabouhallawa@apple.com>
677 Move the BitmapImage platform dependent code to a new file named NativeImage[CG|Cairo].cpp
678 https://bugs.webkit.org/show_bug.cgi?id=158684
680 Reviewed by Simon Fraser.
682 This is a refactoring patch. It moves the BitmapImage platform dependent
683 code from BitmapImage to NativeImage[CG|Cairo].cpp. The new APIs are
684 responsible of drawing a NativeImagePtr and answering some metadata queries.
686 No new tests -- Code refactoring, no behavior change.
688 * PlatformAppleWin.cmake:
692 * PlatformWinCairo.cmake:
693 * WebCore.xcodeproj/project.pbxproj:
694 * loader/cache/MemoryCache.h:
695 * loader/icon/IconDatabaseBase.h:
696 * page/mac/TextIndicatorWindow.mm:
697 (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
698 (createContentCrossfadeAnimation):
699 * platform/graphics/BitmapImage.cpp:
700 (WebCore::BitmapImage::BitmapImage):
701 (WebCore::BitmapImage::destroyDecodedData):
702 (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
703 (WebCore::BitmapImage::dataChanged):
704 (WebCore::BitmapImage::ensureFrameAtIndexIsCached):
705 (WebCore::BitmapImage::frameImageAtIndex):
706 (WebCore::BitmapImage::nativeImage):
707 (WebCore::BitmapImage::nativeImageForCurrentFrame):
708 (WebCore::BitmapImage::nativeImageOfSize):
709 (WebCore::BitmapImage::framesNativeImages):
710 (WebCore::BitmapImage::frameIsCompleteAtIndex):
711 (WebCore::BitmapImage::frameDurationAtIndex):
712 (WebCore::BitmapImage::frameHasAlphaAtIndex):
713 (WebCore::BitmapImage::frameOrientationAtIndex):
714 (WebCore::BitmapImage::singlePixelSolidColor):
715 (WebCore::BitmapImage::draw):
716 (WebCore::BitmapImage::drawPattern):
717 (WebCore::BitmapImage::canAnimate):
718 (WebCore::BitmapImage::clearTimer):
719 (WebCore::BitmapImage::startTimer):
720 (WebCore::BitmapImage::stopAnimation):
721 (WebCore::BitmapImage::resetAnimation):
722 (WebCore::BitmapImage::hasSingleSecurityOrigin): Deleted.
723 (WebCore::BitmapImage::filenameExtension): Deleted.
724 (WebCore::BitmapImage::ensureFrameIsCached): Deleted.
725 * platform/graphics/BitmapImage.h:
726 (WebCore::FrameData::FrameData):
727 m_hasAlpha can be initialized with false because it is accessed only in
728 BitmapImage::frameHasAlphaAtIndex() and it is guarded by m_haveMetadata.
729 Both m_haveMetadata and m_hasAlpha are set in BitmapImage constructor
730 and in BitmapImage::cacheFrame().
732 (WebCore::FrameData::~FrameData):
733 (WebCore::FrameData::clear):
734 * platform/graphics/Icon.h:
735 * platform/graphics/Image.h:
736 (WebCore::Image::nativeImage):
737 (WebCore::Image::nativeImageOfSize):
738 (WebCore::Image::framesNativeImages):
739 (WebCore::Image::orientationForCurrentFrame): Deleted.
740 (WebCore::Image::getCGImageRef): Deleted.
741 (WebCore::Image::getFirstCGImageRefOfSize): Deleted.
742 (WebCore::Image::getCGImageArray): Deleted.
743 * platform/graphics/ImageSource.cpp:
744 (WebCore::ImageSource::calculateMaximumSubsamplingLevel):
745 (WebCore::ImageSource::size):
746 (WebCore::ImageSource::sizeRespectingOrientation):
747 * platform/graphics/ImageSource.h:
748 * platform/graphics/MediaPlayer.h:
749 * platform/graphics/NativeImage.h: Added.
750 * platform/graphics/NativeImagePtr.h: Removed.
751 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
752 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updatePausedImage):
753 * platform/graphics/cairo/BitmapImageCairo.cpp: Removed.
754 * platform/graphics/cairo/NativeImageCairo.cpp: Added.
755 (WebCore::nativeImageSize):
756 (WebCore::nativeImageHasAlpha):
757 (WebCore::nativeImageSinglePixelSolidColor):
758 (WebCore::subsamplingScale):
759 (WebCore::drawNativeImage):
760 (WebCore::clearNativeImageSubImages):
761 * platform/graphics/cg/BitmapImageCG.cpp: Removed.
762 * platform/graphics/cg/ImageDecoderCG.cpp:
763 (WebCore::ImageDecoder::size):
764 * platform/graphics/cg/ImageDecoderCG.h:
765 * platform/graphics/cg/NativeImageCG.cpp: Added.
766 (WebCore::nativeImageSize):
767 (WebCore::nativeImageHasAlpha):
768 (WebCore::nativeImageSinglePixelSolidColor):
769 (WebCore::subsamplingScale):
770 (WebCore::drawNativeImage):
771 (WebCore::clearNativeImageSubImages):
772 * platform/graphics/cg/PatternCG.cpp:
773 (WebCore::Pattern::createPlatformPattern):
774 * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
775 (TextTrackRepresentationCocoa::update):
776 * platform/graphics/mac/ImageMac.mm:
777 (WebCore::BitmapImage::getTIFFRepresentation):
778 * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
779 (WebCore::MockRealtimeVideoSourceMac::updatePlatformLayer):
780 (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer):
781 * platform/win/DragImageCGWin.cpp:
782 (WebCore::createDragImageFromImage):
784 2016-09-08 Alex Christensen <achristensen@webkit.org>
786 URLParser: Parsing empty URLs with a base URL should return the base URL
787 https://bugs.webkit.org/show_bug.cgi?id=161777
789 Reviewed by Tim Horton.
791 Covered by an API test and progress towards passing all web platform tests when using URLParser.
793 * platform/URLParser.cpp:
794 (WebCore::URLParser::parse):
796 2016-09-08 Alex Christensen <achristensen@webkit.org>
798 URLParser failures should preserve the original input string
799 https://bugs.webkit.org/show_bug.cgi?id=161769
801 Reviewed by Tim Horton.
803 No new tests, but covered by updates to API tests.
804 This also represents many newly passing web platform tests when using URLParser.
806 * platform/URLParser.cpp:
807 (WebCore::URLParser::failure):
808 (WebCore::URLParser::parse):
809 * platform/URLParser.h:
811 2016-09-08 Alex Christensen <achristensen@webkit.org>
813 URLParser should parse URLs with a user but no password
814 https://bugs.webkit.org/show_bug.cgi?id=161773
816 Reviewed by Brady Eidson.
818 Covered by new API tests.
820 * platform/URLParser.cpp:
821 (WebCore::URLParser::parseAuthority):
823 2016-09-08 Alex Christensen <achristensen@webkit.org>
825 Fix URLs after r205669.
826 https://bugs.webkit.org/show_bug.cgi?id=161731
828 * platform/URLParser.cpp:
829 (WebCore::URLParser::enabled):
830 I accidentally committed enabling the URLParser by default. Not ready yet.
832 2016-09-08 Chris Dumez <cdumez@apple.com>
834 Align proto getter / setter behavior with other browsers
835 https://bugs.webkit.org/show_bug.cgi?id=161455
837 Reviewed by Saam Barati.
839 Align cross-origin __proto__ getter / setter behavior with other
840 browsers and the specification:
842 [[SetPrototypeOf]] should throw a TypeError:
843 - https://html.spec.whatwg.org/#windowproxy-setprototypeof
844 - https://html.spec.whatwg.org/#location-setprototypeof
845 - https://tc39.github.io/ecma262/#sec-object.setprototypeof (step 5)
847 [[GetPrototypeOf]] should return null cross-origin:
848 - https://html.spec.whatwg.org/#windowproxy-getprototypeof
849 - https://html.spec.whatwg.org/#location-getprototypeof
851 Test: js/dom/setPrototypeOf-location-window.html
853 * bindings/js/JSDOMWindowBase.cpp:
854 (WebCore::JSDOMWindowBase::JSDOMWindowBase): Deleted.
855 * bindings/js/JSDOMWindowCustom.cpp:
856 (WebCore::JSDOMWindow::setPrototype):
857 (WebCore::JSDOMWindow::getPrototype):
858 (WebCore::JSDOMWindow::preventExtensions):
859 * bindings/js/JSLocationCustom.cpp:
860 (WebCore::JSLocation::setPrototype):
861 (WebCore::JSLocation::getPrototype):
862 * bindings/js/JSWorkerGlobalScopeBase.cpp:
863 (WebCore::JSWorkerGlobalScopeBase::supportsRichSourceInfo): Deleted.
864 * bindings/js/JSWorkerGlobalScopeBase.h:
865 * bindings/scripts/CodeGeneratorJS.pm:
867 * bindings/scripts/IDLAttributes.txt:
868 * page/DOMWindow.idl:
871 2016-09-08 Alex Christensen <achristensen@webkit.org>
873 URLParser should parse ports after IPv4 and IPv6 hosts
874 https://bugs.webkit.org/show_bug.cgi?id=161731
876 Reviewed by Brady Eidson.
878 Covered by new API tests.
880 * platform/URLParser.cpp:
881 (WebCore::URLParser::parsePort):
882 (WebCore::URLParser::parseHost):
884 2016-09-08 Alex Christensen <achristensen@webkit.org>
886 URLParser should correctly handle \ in path
887 https://bugs.webkit.org/show_bug.cgi?id=161762
889 Reviewed by Brady Eidson.
891 Covered by new API tests.
893 * platform/URLParser.cpp:
894 (WebCore::isSpecialScheme):
895 (WebCore::bufferView):
896 (WebCore::URLParser::parse):
897 Treat \ as / in the path of special URLs as described in the spec and tested in web platform tests.
898 Also a slight performance improvement using StringViews instead of copied Strings.
900 2016-09-08 Alex Christensen <achristensen@webkit.org>
902 URLParser should handle URLs with empty authority
903 https://bugs.webkit.org/show_bug.cgi?id=161711
905 Reviewed by Brady Eidson.
907 Covered by new API tests.
909 * platform/URLParser.cpp:
910 (WebCore::URLParser::parse):
911 (WebCore::URLParser::parseAuthority):
913 2016-09-08 Chris Dumez <cdumez@apple.com>
915 HTMLImageElement.hspace / vspace attributes should be unsigned
916 https://bugs.webkit.org/show_bug.cgi?id=161754
918 Reviewed by Alex Christensen.
920 HTMLImageElement.hspace / vspace attributes should be unsigned:
921 - https://html.spec.whatwg.org/#HTMLImageElement-partial
923 Firefox agrees with the specification, however, those were signed in
926 No new tests, rebaselined existing test.
928 * html/HTMLImageElement.idl:
930 2016-09-08 Chris Dumez <cdumez@apple.com>
932 Update parseHTMLNonNegativeInteger() to return an unsigned value
933 https://bugs.webkit.org/show_bug.cgi?id=161759
935 Reviewed by Alex Christensen.
937 Update parseHTMLNonNegativeInteger() to return an unsigned value instead
938 of a signed one as the value can never be negative.
940 * html/HTMLElement.cpp:
941 (WebCore::HTMLElement::parseBorderWidthAttribute):
942 * html/HTMLImageElement.cpp:
943 (WebCore::HTMLImageElement::width):
944 (WebCore::HTMLImageElement::height):
945 * html/HTMLInputElement.cpp:
946 (WebCore::HTMLInputElement::maxLengthAttributeChanged):
947 (WebCore::HTMLInputElement::minLengthAttributeChanged):
948 * html/HTMLTextAreaElement.cpp:
949 (WebCore::HTMLTextAreaElement::maxLengthAttributeChanged):
950 (WebCore::HTMLTextAreaElement::minLengthAttributeChanged):
951 * html/ImageInputType.cpp:
952 (WebCore::ImageInputType::height):
953 (WebCore::ImageInputType::width):
954 * html/parser/HTMLParserIdioms.cpp:
955 (WebCore::parseHTMLNonNegativeInteger):
956 (WebCore::parseHTTPRefreshInternal):
957 * html/parser/HTMLParserIdioms.h:
959 2016-09-08 Said Abou-Hallawa <sabouhallawa@apple.com>
961 Get rid of the color profile from ImageFrame and ImageDecoder
962 https://bugs.webkit.org/show_bug.cgi?id=159699
964 Reviewed by Simon Fraser.
966 The color profile is set but it is never used.
968 * platform/image-decoders/ImageDecoder.cpp:
969 (WebCore::ImageFrame::setColorProfile): Deleted.
970 * platform/image-decoders/ImageDecoder.h:
971 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
972 (WebCore::JPEGImageReader::decode):
973 (WebCore::JPEGImageDecoder::outputScanlines):
974 (WebCore::readColorProfile): Deleted.
975 * platform/image-decoders/jpeg/JPEGImageDecoder.h:
976 * platform/image-decoders/png/PNGImageDecoder.cpp:
977 (WebCore::PNGImageDecoder::headerAvailable):
978 (WebCore::PNGImageDecoder::rowAvailable):
979 (WebCore::readColorProfile): Deleted.
981 2016-09-08 Dave Hyatt <hyatt@apple.com>
983 [CSS Parser] Add support for new CSS selector parsing
984 https://bugs.webkit.org/show_bug.cgi?id=161749
986 Reviewed by Dean Jackson.
989 * WebCore.xcodeproj/project.pbxproj:
990 * contentextensions/ContentExtensionParser.cpp:
991 (WebCore::ContentExtensions::isValidSelector):
992 * css/CSSDefaultStyleSheets.cpp:
993 (WebCore::parseUASheet):
994 * css/CSSFontFaceSet.cpp:
995 (WebCore::CSSFontFaceSet::matchingFaces):
996 * css/CSSGrammar.y.in:
997 * css/CSSSelector.cpp:
998 (WebCore::CSSSelector::selectorText):
1000 * css/DOMCSSNamespace.cpp:
1001 (WebCore::DOMCSSNamespace::supports):
1003 (WebCore::FontFace::parseString):
1004 (WebCore::FontFace::setVariant):
1005 * css/MediaList.cpp:
1006 (WebCore::MediaQuerySet::internalParse):
1007 (WebCore::MediaQuerySet::parse):
1008 * css/SelectorChecker.cpp:
1009 (WebCore::SelectorChecker::matchRecursively):
1010 * css/SelectorFilter.cpp:
1011 (WebCore::SelectorFilter::collectIdentifierHashes):
1012 * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1013 * css/SelectorPseudoTypeMap.h:
1014 * css/SourceSizeList.cpp:
1015 (WebCore::parseSizesAttribute):
1016 * css/StyleProperties.cpp:
1017 (WebCore::MutableStyleProperties::MutableStyleProperties):
1018 * css/StyleProperties.h:
1019 * css/StyleRuleImport.cpp:
1020 (WebCore::StyleRuleImport::setCSSStyleSheet):
1021 * css/StyleSheetContents.cpp:
1022 (WebCore::StyleSheetContents::StyleSheetContents):
1023 (WebCore::StyleSheetContents::parserAddNamespace):
1024 (WebCore::StyleSheetContents::namespaceURIFromPrefix):
1025 (WebCore::StyleSheetContents::determineNamespace): Deleted.
1026 * css/StyleSheetContents.h:
1027 * css/WebKitCSSMatrix.cpp:
1028 (WebCore::WebKitCSSMatrix::setMatrixValue):
1029 * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
1030 * css/parser/CSSParser.cpp:
1031 (WebCore::strictCSSParserContext):
1032 (WebCore::CSSParserContext::CSSParserContext):
1033 (WebCore::CSSParser::parseColor):
1034 (WebCore::CSSParser::shouldAcceptUnitLessValues):
1035 (WebCore::CSSParser::parseValue):
1036 (WebCore::CSSParser::parseColumnWidth):
1037 (WebCore::CSSParser::parseColumnCount):
1038 (WebCore::CSSParser::parseFontWeight):
1039 (WebCore::CSSParser::parseColorParameters):
1040 (WebCore::CSSParser::parseHSLParameters):
1041 (WebCore::CSSParser::parseShadow):
1042 (WebCore::CSSParser::parseBorderImageSlice):
1043 (WebCore::CSSParser::parseBorderImageQuad):
1044 (WebCore::CSSParser::parseDeprecatedLinearGradient):
1045 (WebCore::CSSParser::parseLinearGradient):
1046 (WebCore::CSSParser::parseTransformValue):
1047 (WebCore::CSSParser::parseBuiltinFilterArguments):
1048 (WebCore::CSSParser::determineNameInNamespace):
1049 * css/parser/CSSParser.h:
1050 (WebCore::CSSParser::inStrictMode):
1051 (WebCore::CSSParser::inQuirksMode):
1052 * css/parser/CSSParserMode.h:
1053 (WebCore::isQuirksModeBehavior):
1054 (WebCore::isUASheetBehavior):
1055 (WebCore::isUnitLessLengthParsingEnabledForMode):
1056 (WebCore::isCSSViewportParsingEnabledForMode):
1057 (WebCore::strictToCSSParserMode):
1058 (WebCore::isStrictParserMode):
1059 * css/parser/CSSParserValues.cpp:
1060 (WebCore::CSSParserSelector::parsePseudoElementSelectorFromStringView):
1061 (WebCore::CSSParserSelector::parsePseudoClassSelectorFromStringView):
1062 (WebCore::CSSParserSelector::setSelectorList):
1063 (WebCore::CSSParserSelector::appendTagHistory):
1064 (WebCore::CSSParserSelector::releaseTagHistory):
1065 (WebCore::CSSParserSelector::isHostPseudoSelector):
1066 * css/parser/CSSParserValues.h:
1067 (WebCore::CSSParserSelector::match):
1068 (WebCore::CSSParserSelector::pseudoElementType):
1069 (WebCore::CSSParserSelector::selectorList):
1070 (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
1071 * css/parser/CSSPropertyParser.h:
1072 (WebCore::CSSPropertyParser::inQuirksMode):
1073 * css/parser/CSSSelectorParser.cpp: Added.
1074 (WebCore::CSSSelectorParser::parseSelector):
1075 (WebCore::CSSSelectorParser::CSSSelectorParser):
1076 (WebCore::CSSSelectorParser::consumeComplexSelectorList):
1077 (WebCore::CSSSelectorParser::consumeCompoundSelectorList):
1078 (WebCore::CSSSelectorParser::consumeComplexSelector):
1079 (WebCore::CSSSelectorParser::consumeCompoundSelector):
1080 (WebCore::CSSSelectorParser::consumeSimpleSelector):
1081 (WebCore::CSSSelectorParser::consumeName):
1082 (WebCore::CSSSelectorParser::consumeId):
1083 (WebCore::CSSSelectorParser::consumeClass):
1084 (WebCore::CSSSelectorParser::consumeAttribute):
1085 (WebCore::CSSSelectorParser::consumePseudo):
1086 (WebCore::CSSSelectorParser::consumeCombinator):
1087 (WebCore::CSSSelectorParser::consumeAttributeMatch):
1088 (WebCore::CSSSelectorParser::consumeAttributeFlags):
1089 (WebCore::CSSSelectorParser::consumeANPlusB):
1090 (WebCore::CSSSelectorParser::defaultNamespace):
1091 (WebCore::CSSSelectorParser::determineNamespace):
1092 (WebCore::CSSSelectorParser::prependTypeSelectorIfNeeded):
1093 (WebCore::CSSSelectorParser::addSimpleSelectorToCompound):
1094 (WebCore::CSSSelectorParser::splitCompoundAtImplicitShadowCrossingCombinator):
1095 * css/parser/CSSSelectorParser.h: Added.
1096 (WebCore::CSSSelectorParser::DisallowPseudoElementsScope::DisallowPseudoElementsScope):
1097 (WebCore::CSSSelectorParser::DisallowPseudoElementsScope::~DisallowPseudoElementsScope):
1098 * cssjit/SelectorCompiler.cpp:
1099 (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
1100 * dom/StyledElement.cpp:
1101 (WebCore::StyledElement::rebuildPresentationAttributeStyle):
1102 * svg/SVGFontFaceElement.cpp:
1103 (WebCore::SVGFontFaceElement::SVGFontFaceElement):
1105 2016-09-08 Simon Fraser <simon.fraser@apple.com>
1107 Don't run transitions to or from undefined Lengths
1108 https://bugs.webkit.org/show_bug.cgi?id=161750
1109 rdar://problem/28170460
1111 Reviewed by Zalan Bujtas.
1113 For properties like max-height whose default value is 'none', we would erroneously
1114 attempt to run transitions/animations, and then assert when one of the endpoints
1117 So don't attempt to blend such Length values, just as do when they are auto.
1119 Fixes some transitions on apple.com and developer.apple.com.
1121 Test: transitions/transition-to-from-undefined.html
1123 * page/animation/CSSPropertyAnimation.cpp:
1124 (WebCore::CSSPropertyAnimation::blendProperties):
1125 * platform/Length.cpp:
1128 2016-09-08 Myles C. Maxfield <mmaxfield@apple.com>
1130 Support new emoji group candidates
1131 https://bugs.webkit.org/show_bug.cgi?id=161664
1132 <rdar://problem/24802695>
1133 <rdar://problem/27666433>
1135 Reviewed by Simon Fraser.
1137 Support more emoji group candidates. This includes joining groups into a single glyph, as
1138 well as atomic deletions of the entire group when the backspace key is pressed.
1140 Tests: editing/deleting/delete-emoji.html:
1141 fast/text/emoji-num-glyphs.html:
1143 * platform/text/CharacterProperties.h:
1144 (WebCore::isEmojiGroupCandidate):
1146 2016-09-08 Chris Dumez <cdumez@apple.com>
1148 HTMLImageElement.width / height attributes should be unsigned
1149 https://bugs.webkit.org/show_bug.cgi?id=161730
1151 Reviewed by Alex Christensen.
1153 HTMLImageElement.width / height attributes should be unsigned as per
1154 the HTML specification:
1155 - https://html.spec.whatwg.org/#htmlimageelement
1157 However, they are signed in WebKit. Firefox agrees with the
1160 No new tests, rebaselined existing test.
1162 * bindings/js/JSImageConstructor.cpp:
1163 (WebCore::JSImageConstructor::construct):
1164 (WebCore::createImageConstructor): Deleted.
1165 * html/HTMLImageElement.cpp:
1166 (WebCore::HTMLImageElement::createForJSConstructor):
1167 (WebCore::HTMLImageElement::width):
1168 (WebCore::HTMLImageElement::height):
1169 (WebCore::HTMLImageElement::setHeight):
1170 (WebCore::HTMLImageElement::setWidth):
1171 * html/HTMLImageElement.h:
1172 * html/HTMLImageElement.idl:
1173 * html/ImageDocument.cpp:
1174 (WebCore::ImageDocument::restoreImageSize):
1176 2016-09-08 Filip Pizlo <fpizlo@apple.com>
1178 Move JSMap/JSSet over to Auxiliary MarkedSpace
1179 https://bugs.webkit.org/show_bug.cgi?id=161744
1181 Reviewed by Saam Barati.
1183 No new tests because no change in behavior.
1185 * bindings/js/SerializedScriptValue.cpp:
1187 2016-09-08 Commit Queue <commit-queue@webkit.org>
1189 Unreviewed, rolling out r205652.
1190 https://bugs.webkit.org/show_bug.cgi?id=161748
1192 Crashing under ASan (Requested by yusukesuzuki on #webkit).
1196 "ScriptRunner should be driven by PendingScript rather than
1198 https://bugs.webkit.org/show_bug.cgi?id=161726
1199 http://trac.webkit.org/changeset/205652
1201 2016-09-08 Yusuke Suzuki <utatane.tea@gmail.com>
1203 ScriptRunner should be driven by PendingScript rather than ScriptElement
1204 https://bugs.webkit.org/show_bug.cgi?id=161726
1206 Reviewed by Ryosuke Niwa.
1208 ScriptRunner is driven by ScriptElement::notifyFinished. While ScriptRunner is driven by this,
1209 HTMLScriptRunner does not use it. Instead, HTMLScriptRunner uses PendingScriptClient. As a result,
1210 ScriptElement::notifyFinished is used only when the script is annotated with "defer" or "async"
1211 while all the external script will load the LoadableScript. It is confusing.
1212 This patch removes ScriptElement::notifyFinished and use PendingScript's observability
1213 in ScriptRunner instead.
1215 This patch also fixes the behavior about ignore-destructive-writes counter[1]. When dispatching
1216 the load and error events, this ignore-destructive-writes counter should not be incremeneted by
1217 this execution. The added tests ensure this behavior.
1219 [1]: https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block
1221 * dom/ScriptElement.cpp: Drop LoadableScriptClient interface.
1222 (WebCore::ScriptElement::prepareScript): Do not use addClient. ScriptRunner use PendingScript::{setClient,clearClient} instead.
1223 (WebCore::ScriptElement::executeScriptForScriptRunner): IgnoreDestructiveWriteCountIncrementer will be done in ScriptElement::executeScript.
1224 So no need to do it here, that's duplicated.
1225 (WebCore::ScriptElement::~ScriptElement): Deleted. ScriptElement does not use addClient/removeClient.
1226 (WebCore::ScriptElement::stopLoadRequest): Deleted.
1227 (WebCore::ScriptElement::executeScriptForHTMLScriptRunner): Deleted. executeScriptForHTMLScriptRunner and executeScriptForScriptRunner are
1228 merged into executeScriptForRunner.
1229 (WebCore::ScriptElement::notifyFinished): Deleted.
1230 * dom/ScriptElement.h:
1231 (WebCore::ScriptElement::~ScriptElement):
1232 (WebCore::ScriptElement::willExecuteInOrder): Used in ScriptRunner to determine whether the script is async or defer.
1233 (WebCore::ScriptElement::willExecuteWhenDocumentFinishedParsing): Deleted.
1234 * dom/ScriptRunner.cpp:
1235 (WebCore::ScriptRunner::~ScriptRunner): HashSet's iterator will return `const PendingScript&`.
1236 Another option is using HashSet<RefPtr<PendingScript>>. Here, we use a little bit weired const_cast.
1237 (WebCore::ScriptRunner::queueScriptForExecution): Use PendingScript::setClient to wait loading.
1238 (WebCore::ScriptRunner::notifyFinished): Notify the script ready here.
1239 (WebCore::ScriptRunner::timerFired): Use executeScriptForScriptRunner.
1240 (WebCore::ScriptRunner::notifyScriptReady): Deleted.
1241 * dom/ScriptRunner.h:
1242 * html/parser/HTMLScriptRunner.cpp:
1243 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): Use executeScriptForScriptRunner.
1245 2016-09-08 Alex Christensen <achristensen@webkit.org>
1247 Re-land r205580 after r205649 fixed the test failures
1248 https://bugs.webkit.org/show_bug.cgi?id=161668
1250 Re-landing changesets:
1252 "Punycode encode non-ascii hosts in URLParser"
1253 https://bugs.webkit.org/show_bug.cgi?id=161655
1254 http://trac.webkit.org/changeset/205521
1256 "Fix query-only and fragment-only relative URLs when using
1258 https://bugs.webkit.org/show_bug.cgi?id=161657
1259 http://trac.webkit.org/changeset/205526
1261 "URLParser should parse / as a relative URL"
1262 https://bugs.webkit.org/show_bug.cgi?id=161667
1263 http://trac.webkit.org/changeset/205532
1265 2016-09-08 Alex Christensen <achristensen@webkit.org>
1267 Add range check in URLParser's serializeIPv6
1268 https://bugs.webkit.org/show_bug.cgi?id=161743
1270 Reviewed by David Kilzer.
1272 No new tests, but this fixes API tests in some release builds after
1273 the patch from https://bugs.webkit.org/show_bug.cgi?id=161668 is recommitted.
1275 * platform/URLParser.cpp:
1276 (WebCore::serializeIPv6):
1277 Don't go out of bounds. Don't assume that the memory immediately after the end of the array will be empty.
1279 2016-09-07 Alex Christensen <achristensen@webkit.org>
1281 Roll out r205580 and r205582.
1282 https://bugs.webkit.org/show_bug.cgi?id=161668
1284 I need to figure out why this is failing on the bots before landing any more URLParser progress.
1286 2016-09-07 Yusuke Suzuki <utatane.tea@gmail.com>
1288 Unreviewed, EFL build fix after r205581
1289 https://bugs.webkit.org/show_bug.cgi?id=161674
1291 * dom/LoadableClassicScript.cpp:
1292 (WebCore::LoadableClassicScript::notifyFinished):
1294 2016-09-07 Alex Christensen <achristensen@webkit.org>
1296 Fix API tests after r205580
1297 https://bugs.webkit.org/show_bug.cgi?id=161668
1299 No new tests, but this fixes API tests on bots.
1301 * platform/URLParser.cpp:
1302 (WebCore::domainToASCII):
1303 This function seems to be appending characters to strings sometimes on some configurations.
1304 This definitely needs further investigation, but this will fix the bots, and nothing else
1305 will be affected because the URLParser is disabled by default.
1307 2016-09-07 Yusuke Suzuki <utatane.tea@gmail.com>
1309 Introduce abstract class LoadableScript for classic script and module graph
1310 https://bugs.webkit.org/show_bug.cgi?id=161674
1312 Reviewed by Ryosuke Niwa.
1314 To prepare for ScriptModuleGraph, we introduce the abstract class over the classic script
1315 and the module script, LoadableScript.
1320 * WebCore.xcodeproj/project.pbxproj:
1321 * dom/LoadableClassicScript.cpp: Added. LoadableClassicScript is the derived class from the
1322 LoadableScript. In the module patch, we will introduce LoadableScriptModuleGraph which is also
1323 the derived class from the LoadableScript. It is used for the external classic script.
1324 A CachedResourceHandle used here alone does not prevent the underlying CachedResource from purging its
1325 data buffer. This LoadableClassicScript holds a client until this class is destroyed in order to
1326 guarantee that the data buffer will not be purged.
1327 (WebCore::LoadableClassicScript::create):
1328 (WebCore::LoadableClassicScript::LoadableClassicScript):
1329 (WebCore::LoadableClassicScript::~LoadableClassicScript):
1330 (WebCore::LoadableClassicScript::isLoaded):
1331 (WebCore::LoadableClassicScript::wasErrored): Beyond the boolean value, this can return the detail
1332 of the error. This detailed information will be used to report it to the inspector in the ScriptElement.
1333 (WebCore::LoadableClassicScript::wasCanceled):
1334 (WebCore::LoadableClassicScript::notifyFinished): Nosniff and cross-origin loading errors are handled here,
1335 instead of exposing CachedScript*.
1336 (WebCore::LoadableClassicScript::execute): Execute the cached script by using the given ScriptElement.
1337 * dom/LoadableClassicScript.h: Copied from Source/WebCore/dom/PendingScript.h.
1339 * dom/LoadableScript.cpp: Copied from Source/WebCore/dom/ScriptRunner.h. New wrapper for CachedScript
1340 and ScriptModuleGraph. We introduce a new wrapper to handle the above 2 things in the same way.
1341 We take the way to introduce a new wrapper instead of introducing a new interface that is inherited by
1342 CachedScript and ScriptModuleGraph. This is because ScriptModuleGraph is ref-counted while CachedScript
1343 is managed by CachedResourceHandle. While this patch does not contain ScriptModuleGraph part, this
1344 should be added in the module patch and at that time, this should be managed by this LoadableScript's
1345 subclass. And we introduce TypeCasts traits for LoadableScript to allow `is<>` and `downcast<>`.
1346 (WebCore::LoadableScript::addClient):
1347 (WebCore::LoadableScript::removeClient):
1348 (WebCore::LoadableScript::notifyClientFinished):
1349 * dom/LoadableScript.h: Copied from Source/WebCore/dom/ScriptRunner.h.
1350 (WebCore::LoadableScript::~LoadableScript):
1351 (WebCore::LoadableScript::isClassicScript):
1352 (WebCore::LoadableScript::isModuleGraph):
1353 * dom/LoadableScriptClient.h: Copied from Source/WebCore/dom/ScriptRunner.h.
1354 (WebCore::LoadableScriptClient::~LoadableScriptClient):
1355 * dom/PendingScript.cpp: Use LoadableScript instead of CachedScript.
1356 (WebCore::PendingScript::create):
1357 (WebCore::PendingScript::PendingScript):
1358 (WebCore::PendingScript::~PendingScript):
1359 (WebCore::PendingScript::loadableScript):
1360 (WebCore::PendingScript::notifyFinished):
1361 (WebCore::PendingScript::isLoaded):
1362 (WebCore::PendingScript::wasErrored):
1363 (WebCore::PendingScript::cachedScript): Deleted.
1364 * dom/PendingScript.h:
1365 * dom/ScriptElement.cpp:
1366 (WebCore::ScriptElement::ScriptElement):
1367 (WebCore::ScriptElement::handleSourceAttribute): Change sourceUrl to sourceURL to be consistent.
1368 (WebCore::ScriptElement::prepareScript):
1369 (WebCore::ScriptElement::requestClassicScript): requestScript is renamed to requestClassicScript.
1370 (WebCore::ScriptElement::requestScriptWithCache): Extract the code requesting the
1371 CachedScript from requestScript. This will also be used by the module fetcher.
1372 (WebCore::ScriptElement::executeScript): Now inspector error reporting is also done in this function.
1373 When an error occurs, LoadableScript::wasErrored() returns the error which may include the information
1374 to report the error to the inspector. nosniff and cross-origin loading errors are now detected by the
1375 LoadableClassicScript and reported through this wasErrored().
1376 (WebCore::ScriptElement::stopLoadRequest):
1377 (WebCore::ScriptElement::executeScriptAndDispatchEvent):
1378 (WebCore::ScriptElement::executeScriptForScriptRunner): Move the code from ScriptRunner. This function
1379 calls removeClient(*this) because ScriptRunner is driven by the ScriptElement's notification. Only when using
1380 ScriptRunner, we call addClient(*this) for ScriptElement. This is tricky, we should refactor this in the separated
1381 bug (https://bugs.webkit.org/show_bug.cgi?id=161726).
1382 (WebCore::ScriptElement::executeScriptForHTMLScriptRunner): Move the code from HTMLScriptRunner.
1383 (WebCore::ScriptElement::notifyFinished):
1384 (WebCore::ScriptElement::requestScript): Deleted.
1385 (WebCore::ScriptElement::execute): Deleted.
1386 * dom/ScriptElement.h:
1387 (WebCore::ScriptElement::loadableScript):
1388 (WebCore::ScriptElement::cachedScript): Deleted.
1389 * dom/ScriptRunner.cpp:
1390 (WebCore::ScriptRunner::queueScriptForExecution):
1391 (WebCore::ScriptRunner::timerFired): Use ScriptElement::executeScriptForScriptRunner.
1392 * dom/ScriptRunner.h:
1393 * html/parser/HTMLScriptRunner.cpp:
1394 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1395 (WebCore::requestPendingScript):
1396 (WebCore::HTMLScriptRunner::requestParsingBlockingScript):
1397 (WebCore::HTMLScriptRunner::sourceFromPendingScript): Deleted.
1398 * html/parser/HTMLScriptRunner.h: Use ScriptElement::executeScriptForHTMLScriptRunner.
1399 * xml/parser/XMLDocumentParserLibxml2.cpp: Currently, we do nothing about XMLDocument in this patch.
1400 We should support the module script, but before that, we should refactor this pending script handling.
1401 (WebCore::XMLDocumentParser::endElementNs):
1403 2016-09-07 Alex Christensen <achristensen@webkit.org>
1405 Unreviewed, revert r205533.
1406 https://bugs.webkit.org/show_bug.cgi?id=161668
1408 Re-landing changesets:
1410 "Punycode encode non-ascii hosts in URLParser"
1411 https://bugs.webkit.org/show_bug.cgi?id=161655
1412 http://trac.webkit.org/changeset/205521
1414 "Fix query-only and fragment-only relative URLs when using
1416 https://bugs.webkit.org/show_bug.cgi?id=161657
1417 http://trac.webkit.org/changeset/205526
1419 "URLParser should parse / as a relative URL"
1420 https://bugs.webkit.org/show_bug.cgi?id=161667
1421 http://trac.webkit.org/changeset/205532
1423 2016-09-07 Simon Fraser <simon.fraser@apple.com>
1425 Enable the <meter> element on iOS
1426 https://bugs.webkit.org/show_bug.cgi?id=161714
1427 rdar://problem/8978410
1429 Reviewed by Tim Horton.
1431 Define ENABLE_METER_ELEMENT unconditionally now.
1433 Rendering falls back to html.css rendering, which makes <meter> looks similar between
1436 Tested by enabling existing tests.
1438 * Configurations/FeatureDefines.xcconfig:
1440 2016-09-07 Eric Carlson <eric.carlson@apple.com>
1442 [MediaStream] applyConstraints pt. 2 - advanced constraints
1443 https://bugs.webkit.org/show_bug.cgi?id=161715
1444 <rdar://problem/28195461>
1446 Reviewed by Dean Jackson.
1448 Test: fast/mediastream/apply-constraints-advanced.html
1450 * platform/mediastream/MediaConstraints.cpp:
1451 (WebCore::MediaConstraint::create): Return Ref<>, not RefPtr<>.
1452 (WebCore::MediaConstraint::copy): New
1453 (WebCore::IntConstraint::copy): Ditto.
1454 (WebCore::DoubleConstraint::copy): Ditto.
1455 (WebCore::BooleanConstraint::copy): Ditto.
1456 (WebCore::StringConstraint::copy): Ditto.
1457 (WebCore::StringConstraint::fitnessDistance): New, compute the fitness distance between the
1458 constraint and the specified value.
1459 (WebCore::StringConstraint::merge): New, merge value into constraint.
1460 (WebCore::FlattenedConstraint::set): New, add or replace a constraint.
1461 (WebCore::FlattenedConstraint::merge): New, merge or add a constraint.
1462 * platform/mediastream/MediaConstraints.h:
1463 (WebCore::MediaConstraint::fitnessDistance):
1464 (WebCore::MediaConstraint::merge):
1465 (WebCore::NumericConstraint::nearlyEqual):
1466 (WebCore::FlattenedConstraint::isEmpty):
1467 (WebCore::FlattenedConstraint::begin):
1468 (WebCore::FlattenedConstraint::end):
1469 (WebCore::MediaConstraint::~MediaConstraint): Deleted.
1470 (WebCore::MediaConstraint::find): Deleted.
1471 (WebCore::MediaConstraint::getIdeal): Deleted.
1473 * platform/mediastream/RealtimeMediaSource.cpp:
1474 (WebCore::RealtimeMediaSource::fitnessDistance): Return the fitness distance between the source
1475 capabilities and a constraint.
1476 (WebCore::applyNumericConstraint): New, apply a numeric constraint.
1477 (WebCore::RealtimeMediaSource::applyConstraint): Use applyNumericConstraint.
1478 (WebCore::RealtimeMediaSource::selectSettings): New, implement the SelectSettings algorithm
1479 (WebCore::RealtimeMediaSource::applyConstraints):
1480 (WebCore::RealtimeMediaSource::supportsConstraint): Deleted.
1481 (WebCore::value): Deleted.
1482 * platform/mediastream/RealtimeMediaSource.h:
1484 2016-09-07 Mark Lam <mark.lam@apple.com>
1486 Add CatchScope and force all exception checks to be via ThrowScope or CatchScope.
1487 https://bugs.webkit.org/show_bug.cgi?id=161498
1489 Reviewed by Geoffrey Garen.
1491 No new test because there is no behavior change in general except for 1 bug fix.
1492 That bug is already caught by existing tests with the introduction of the CatchScope.
1494 Fixes a bug in JSEventListener::handleEvent() where the exception thrown from
1495 a failed attempt to get the handleEvent callback is not handled.
1497 * ForwardingHeaders/runtime/CatchScope.h: Added.
1498 * Modules/encryptedmedia/CDMSessionClearKey.cpp:
1499 (WebCore::CDMSessionClearKey::update):
1500 * Modules/indexeddb/IDBObjectStore.cpp:
1501 (WebCore::IDBObjectStore::putOrAdd):
1502 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1503 (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
1504 * Modules/mediastream/SDPProcessor.cpp:
1505 (WebCore::SDPProcessor::callScript):
1506 * Modules/plugins/QuickTimePluginReplacement.mm:
1507 (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
1508 (WebCore::QuickTimePluginReplacement::installReplacement):
1509 * bindings/js/ArrayValue.cpp:
1510 (WebCore::ArrayValue::get):
1511 * bindings/js/Dictionary.cpp:
1512 (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
1513 * bindings/js/IDBBindingUtilities.cpp:
1515 * bindings/js/JSApplePaySessionCustom.cpp:
1516 (WebCore::JSApplePaySession::completeShippingMethodSelection):
1517 (WebCore::JSApplePaySession::completeShippingContactSelection):
1518 (WebCore::JSApplePaySession::completePaymentMethodSelection):
1519 * bindings/js/JSAudioTrackCustom.cpp:
1520 (WebCore::JSAudioTrack::setKind):
1521 (WebCore::JSAudioTrack::setLanguage):
1522 * bindings/js/JSBlobCustom.cpp:
1523 (WebCore::constructJSBlob):
1524 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1525 (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
1526 * bindings/js/JSCommandLineAPIHostCustom.cpp:
1527 (WebCore::getJSListenerFunctions):
1528 * bindings/js/JSCryptoAlgorithmDictionary.cpp:
1529 (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
1530 (WebCore::getHashAlgorithm):
1531 (WebCore::createAesCbcParams):
1532 (WebCore::createAesKeyGenParams):
1533 (WebCore::createHmacParams):
1534 (WebCore::createHmacKeyParams):
1535 (WebCore::createRsaKeyGenParams):
1536 (WebCore::createRsaOaepParams):
1537 (WebCore::createRsaSsaParams):
1538 * bindings/js/JSCryptoKeySerializationJWK.cpp:
1539 (WebCore::getJSArrayFromJSON):
1540 (WebCore::getStringFromJSON):
1541 (WebCore::getBooleanFromJSON):
1542 (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
1543 (WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
1544 (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
1545 (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents):
1546 (WebCore::JSCryptoKeySerializationJWK::keyData):
1547 (WebCore::buildJSONForRSAComponents):
1548 (WebCore::addUsagesToJSON):
1549 (WebCore::JSCryptoKeySerializationJWK::serialize):
1550 * bindings/js/JSCustomElementInterface.cpp:
1551 (WebCore::JSCustomElementInterface::constructElement):
1552 (WebCore::constructCustomElementSynchronously):
1553 (WebCore::JSCustomElementInterface::upgradeElement):
1554 * bindings/js/JSCustomElementRegistryCustom.cpp:
1555 (WebCore::getCustomElementCallback):
1556 (WebCore::JSCustomElementRegistry::define):
1557 (WebCore::whenDefinedPromise):
1558 (WebCore::JSCustomElementRegistry::whenDefined):
1559 * bindings/js/JSDOMBinding.cpp:
1560 (WebCore::valueToUSVString):
1561 (WebCore::reportException):
1562 (WebCore::reportCurrentException):
1563 (WebCore::setDOMException):
1564 (WebCore::hasIteratorMethod):
1565 (WebCore::toSmallerInt):
1566 (WebCore::toSmallerUInt):
1567 (WebCore::toInt32EnforceRange):
1568 (WebCore::toUInt32EnforceRange):
1569 (WebCore::toInt64EnforceRange):
1570 (WebCore::toUInt64EnforceRange):
1571 (WebCore::throwNotSupportedError):
1572 (WebCore::throwInvalidStateError):
1573 (WebCore::throwSecurityError):
1574 * bindings/js/JSDOMBinding.h:
1575 (WebCore::toJSSequence):
1577 (WebCore::jsFrozenArray):
1578 (WebCore::NativeValueTraits<String>::nativeValue):
1579 (WebCore::NativeValueTraits<unsigned>::nativeValue):
1580 (WebCore::NativeValueTraits<float>::nativeValue):
1581 (WebCore::NativeValueTraits<double>::nativeValue):
1582 (WebCore::toNativeArray):
1583 * bindings/js/JSDOMGlobalObject.cpp:
1584 (WebCore::makeThisTypeErrorForBuiltins):
1585 (WebCore::makeGetterTypeErrorForBuiltins):
1586 * bindings/js/JSDOMGlobalObjectTask.cpp:
1587 * bindings/js/JSDOMIterator.h:
1588 (WebCore::iteratorForEach):
1589 * bindings/js/JSDOMPromise.cpp:
1590 (WebCore::rejectPromiseWithExceptionIfAny):
1591 * bindings/js/JSDOMPromise.h:
1592 (WebCore::callPromiseFunction):
1593 * bindings/js/JSDOMStringMapCustom.cpp:
1594 (WebCore::JSDOMStringMap::putDelegate):
1595 * bindings/js/JSDOMWindowBase.cpp:
1596 (WebCore::JSDOMWindowMicrotaskCallback::call):
1597 * bindings/js/JSDOMWindowCustom.cpp:
1598 (WebCore::JSDOMWindow::setLocation):
1599 (WebCore::JSDOMWindow::open):
1600 (WebCore::JSDOMWindow::showModalDialog):
1601 (WebCore::handlePostMessage):
1602 (WebCore::JSDOMWindow::setTimeout):
1603 (WebCore::JSDOMWindow::setInterval):
1604 * bindings/js/JSDataCueCustom.cpp:
1605 (WebCore::constructJSDataCue):
1606 * bindings/js/JSDeviceMotionEventCustom.cpp:
1607 (WebCore::readAccelerationArgument):
1608 (WebCore::readRotationRateArgument):
1609 (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
1610 * bindings/js/JSDictionary.cpp:
1611 (WebCore::JSDictionary::tryGetProperty):
1612 (WebCore::JSDictionary::convertValue):
1613 * bindings/js/JSDictionary.h:
1614 (WebCore::JSDictionary::tryGetPropertyAndResult):
1615 * bindings/js/JSDocumentCustom.cpp:
1616 (WebCore::JSDocument::getCSSCanvasContext):
1617 * bindings/js/JSEventListener.cpp:
1618 (WebCore::JSEventListener::handleEvent):
1619 * bindings/js/JSFileCustom.cpp:
1620 (WebCore::constructJSFile):
1621 * bindings/js/JSGeolocationCustom.cpp:
1622 (WebCore::createPositionOptions):
1623 (WebCore::JSGeolocation::getCurrentPosition):
1624 (WebCore::JSGeolocation::watchPosition):
1625 * bindings/js/JSHTMLAllCollectionCustom.cpp:
1626 (WebCore::callHTMLAllCollection):
1627 * bindings/js/JSHTMLCanvasElementCustom.cpp:
1628 (WebCore::get3DContextAttributes):
1629 (WebCore::JSHTMLCanvasElement::getContext):
1630 (WebCore::JSHTMLCanvasElement::probablySupportsContext):
1631 * bindings/js/JSHTMLElementCustom.cpp:
1632 (WebCore::constructJSHTMLElement):
1633 * bindings/js/JSHistoryCustom.cpp:
1634 (WebCore::JSHistory::pushState):
1635 (WebCore::JSHistory::replaceState):
1636 * bindings/js/JSIDBDatabaseCustom.cpp:
1637 (WebCore::JSIDBDatabase::createObjectStore):
1638 * bindings/js/JSLazyEventListener.cpp:
1639 (WebCore::JSLazyEventListener::initializeJSFunction):
1640 * bindings/js/JSMainThreadExecState.h:
1641 (WebCore::JSMainThreadExecState::linkAndEvaluateModule):
1642 (WebCore::JSMainThreadExecState::~JSMainThreadExecState):
1643 * bindings/js/JSMessageEventCustom.cpp:
1644 (WebCore::handleInitMessageEvent):
1645 * bindings/js/JSMessagePortCustom.cpp:
1646 (WebCore::fillMessagePortArray):
1647 * bindings/js/JSMessagePortCustom.h:
1648 (WebCore::handlePostMessage):
1649 * bindings/js/JSMockContentFilterSettingsCustom.cpp:
1650 (WebCore::JSMockContentFilterSettings::setDecisionPoint):
1651 (WebCore::toDecision):
1652 (WebCore::JSMockContentFilterSettings::setDecision):
1653 (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision):
1654 * bindings/js/JSNodeFilterCustom.cpp:
1655 (WebCore::JSNodeFilter::acceptNode):
1656 * bindings/js/JSNodeOrString.cpp:
1657 (WebCore::toNodeOrStringVector):
1658 * bindings/js/JSSQLTransactionCustom.cpp:
1659 (WebCore::JSSQLTransaction::executeSql):
1660 * bindings/js/JSSVGLengthCustom.cpp:
1661 (WebCore::JSSVGLength::convertToSpecifiedUnits):
1662 * bindings/js/JSStorageCustom.cpp:
1663 (WebCore::JSStorage::getOwnPropertyNames):
1664 (WebCore::JSStorage::putDelegate):
1665 * bindings/js/JSTextTrackCustom.cpp:
1666 (WebCore::JSTextTrack::setLanguage):
1667 * bindings/js/JSVideoTrackCustom.cpp:
1668 (WebCore::JSVideoTrack::setKind):
1669 (WebCore::JSVideoTrack::setLanguage):
1670 * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1671 (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
1672 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
1673 (WebCore::getObjectParameter):
1674 (WebCore::JSWebGLRenderingContextBase::getExtension):
1675 (WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter):
1676 (WebCore::JSWebGLRenderingContextBase::getParameter):
1677 (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
1678 (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
1679 (WebCore::toVector):
1680 (WebCore::dataFunctionf):
1681 (WebCore::dataFunctionMatrix):
1682 * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
1683 (WebCore::createAlgorithmFromJSValue):
1684 (WebCore::cryptoKeyFormatFromJSValue):
1685 (WebCore::cryptoKeyUsagesFromJSValue):
1686 (WebCore::JSWebKitSubtleCrypto::encrypt):
1687 (WebCore::JSWebKitSubtleCrypto::decrypt):
1688 (WebCore::JSWebKitSubtleCrypto::sign):
1689 (WebCore::JSWebKitSubtleCrypto::verify):
1690 (WebCore::JSWebKitSubtleCrypto::digest):
1691 (WebCore::JSWebKitSubtleCrypto::generateKey):
1692 (WebCore::importKey):
1693 (WebCore::JSWebKitSubtleCrypto::importKey):
1694 (WebCore::exportKey):
1695 (WebCore::JSWebKitSubtleCrypto::exportKey):
1696 (WebCore::JSWebKitSubtleCrypto::wrapKey):
1697 (WebCore::JSWebKitSubtleCrypto::unwrapKey):
1698 * bindings/js/JSWorkerCustom.cpp:
1699 (WebCore::constructJSWorker):
1700 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1701 (WebCore::JSWorkerGlobalScope::importScripts):
1702 (WebCore::JSWorkerGlobalScope::setTimeout):
1703 (WebCore::JSWorkerGlobalScope::setInterval):
1704 * bindings/js/ReadableStreamDefaultController.cpp:
1705 (WebCore::ReadableStreamDefaultController::invoke):
1706 (WebCore::ReadableStreamDefaultController::isControlledReadableStreamLocked):
1707 * bindings/js/ReadableStreamDefaultController.h:
1708 (WebCore::ReadableStreamDefaultController::enqueue):
1709 * bindings/js/ScheduledAction.cpp:
1710 (WebCore::ScheduledAction::create):
1711 * bindings/js/ScriptGlobalObject.cpp:
1712 (WebCore::ScriptGlobalObject::set):
1713 * bindings/js/SerializedScriptValue.cpp:
1714 (WebCore::CloneBase::shouldTerminate):
1715 (WebCore::CloneDeserializer::deserialize):
1716 (WebCore::SerializedScriptValue::create):
1717 (WebCore::SerializedScriptValue::deserialize):
1718 * bindings/js/WorkerScriptController.cpp:
1719 (WebCore::WorkerScriptController::evaluate):
1720 * bindings/scripts/CodeGeneratorJS.pm:
1721 (GenerateDictionaryImplementationContent):
1722 (GenerateImplementation):
1723 (GenerateParametersCheck):
1724 (GenerateImplementationFunctionCall):
1725 (GenerateConstructorDefinition):
1726 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1727 (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
1728 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1729 (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
1730 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1731 (WebCore::JSTestEventConstructorConstructor::construct):
1732 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1733 (WebCore::jsTestEventTargetPrototypeFunctionItem):
1734 * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1735 (WebCore::setJSTestGlobalObjectRegularAttribute):
1736 (WebCore::setJSTestGlobalObjectPublicAndPrivateAttribute):
1737 (WebCore::setJSTestGlobalObjectPublicAndPrivateConditionalAttribute):
1738 (WebCore::setJSTestGlobalObjectEnabledAtRuntimeAttribute):
1739 (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation):
1740 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1):
1741 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2):
1742 * bindings/scripts/test/JS/JSTestInterface.cpp:
1743 (WebCore::JSTestInterfaceConstructor::construct):
1744 (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
1745 (WebCore::setJSTestInterfaceImplementsStr2):
1746 (WebCore::setJSTestInterfaceImplementsStr3):
1747 (WebCore::setJSTestInterfaceImplementsNode):
1748 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
1749 (WebCore::setJSTestInterfaceSupplementalStr2):
1750 (WebCore::setJSTestInterfaceSupplementalStr3):
1751 (WebCore::setJSTestInterfaceSupplementalNode):
1752 (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
1753 (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
1754 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1755 (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
1756 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1757 (WebCore::JSTestNamedConstructorNamedConstructor::construct):
1758 * bindings/scripts/test/JS/JSTestNode.cpp:
1759 (WebCore::setJSTestNodeName):
1760 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1761 (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
1762 (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
1763 (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
1764 (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
1765 * bindings/scripts/test/JS/JSTestObj.cpp:
1766 (WebCore::convertDictionary<TestObj::Dictionary>):
1767 (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
1768 (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
1769 (WebCore::convertDictionary<AlternateDictionaryName>):
1770 (WebCore::setJSTestObjConstructorStaticStringAttr):
1771 (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
1772 (WebCore::setJSTestObjEnumAttr):
1773 (WebCore::setJSTestObjByteAttr):
1774 (WebCore::setJSTestObjOctetAttr):
1775 (WebCore::setJSTestObjShortAttr):
1776 (WebCore::setJSTestObjClampedShortAttr):
1777 (WebCore::setJSTestObjEnforceRangeShortAttr):
1778 (WebCore::setJSTestObjUnsignedShortAttr):
1779 (WebCore::setJSTestObjLongAttr):
1780 (WebCore::setJSTestObjLongLongAttr):
1781 (WebCore::setJSTestObjUnsignedLongLongAttr):
1782 (WebCore::setJSTestObjStringAttr):
1783 (WebCore::setJSTestObjUsvstringAttr):
1784 (WebCore::setJSTestObjTestObjAttr):
1785 (WebCore::setJSTestObjTestNullableObjAttr):
1786 (WebCore::setJSTestObjLenientTestObjAttr):
1787 (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyString):
1788 (WebCore::setJSTestObjUsvstringAttrTreatingNullAsEmptyString):
1789 (WebCore::setJSTestObjImplementationEnumAttr):
1790 (WebCore::setJSTestObjXMLObjAttr):
1791 (WebCore::setJSTestObjCreate):
1792 (WebCore::setJSTestObjReflectedStringAttr):
1793 (WebCore::setJSTestObjReflectedUSVStringAttr):
1794 (WebCore::setJSTestObjReflectedIntegralAttr):
1795 (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
1796 (WebCore::setJSTestObjReflectedBooleanAttr):
1797 (WebCore::setJSTestObjReflectedURLAttr):
1798 (WebCore::setJSTestObjReflectedUSVURLAttr):
1799 (WebCore::setJSTestObjReflectedCustomIntegralAttr):
1800 (WebCore::setJSTestObjReflectedCustomBooleanAttr):
1801 (WebCore::setJSTestObjReflectedCustomURLAttr):
1802 (WebCore::setJSTestObjEnabledAtRuntimeAttribute):
1803 (WebCore::setJSTestObjTypedArrayAttr):
1804 (WebCore::setJSTestObjAttrWithGetterException):
1805 (WebCore::setJSTestObjAttrWithGetterExceptionWithMessage):
1806 (WebCore::setJSTestObjAttrWithSetterException):
1807 (WebCore::setJSTestObjAttrWithSetterExceptionWithMessage):
1808 (WebCore::setJSTestObjStringAttrWithGetterException):
1809 (WebCore::setJSTestObjStringAttrWithSetterException):
1810 (WebCore::setJSTestObjCustomAttr):
1811 (WebCore::setJSTestObjOnfoo):
1812 (WebCore::setJSTestObjOnwebkitfoo):
1813 (WebCore::setJSTestObjWithScriptStateAttribute):
1814 (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
1815 (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
1816 (WebCore::setJSTestObjWithScriptStateAttributeRaises):
1817 (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
1818 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
1819 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1820 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1821 (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
1822 (WebCore::setJSTestObjConditionalAttr1):
1823 (WebCore::setJSTestObjConditionalAttr2):
1824 (WebCore::setJSTestObjConditionalAttr3):
1825 (WebCore::setJSTestObjConditionalAttr4Constructor):
1826 (WebCore::setJSTestObjConditionalAttr5Constructor):
1827 (WebCore::setJSTestObjConditionalAttr6Constructor):
1828 (WebCore::setJSTestObjAnyAttribute):
1829 (WebCore::setJSTestObjMutablePoint):
1830 (WebCore::setJSTestObjImmutablePoint):
1831 (WebCore::setJSTestObjStrawberry):
1832 (WebCore::setJSTestObjId):
1833 (WebCore::setJSTestObjReplaceableAttribute):
1834 (WebCore::setJSTestObjNullableLongSettableAttribute):
1835 (WebCore::setJSTestObjNullableStringSettableAttribute):
1836 (WebCore::setJSTestObjNullableUSVStringSettableAttribute):
1837 (WebCore::setJSTestObjNullableStringValue):
1838 (WebCore::setJSTestObjAttributeWithReservedEnumType):
1839 (WebCore::setJSTestObjPutForwardsAttribute):
1840 (WebCore::setJSTestObjPutForwardsNullableAttribute):
1841 (WebCore::setJSTestObjStringifierAttribute):
1842 (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1):
1843 (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2):
1844 (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1845 (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
1846 (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
1847 (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
1848 (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1849 (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString):
1850 (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter):
1851 (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
1852 (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
1853 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArg):
1854 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
1855 (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1856 (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArg):
1857 (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg):
1858 (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString):
1859 (WebCore::jsTestObjPrototypeFunctionSerializedValue):
1860 (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
1861 (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethod):
1862 (WebCore::jsTestObjPrototypeFunctionAddEventListener):
1863 (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
1864 (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
1865 (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
1866 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
1867 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
1868 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
1869 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
1870 (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
1871 (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
1872 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
1873 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVString):
1874 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicString):
1875 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
1876 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue):
1877 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull):
1878 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
1879 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull):
1880 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString):
1881 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString):
1882 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString):
1883 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN):
1884 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN):
1885 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLong):
1886 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero):
1887 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong):
1888 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero):
1889 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequence):
1890 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmpty):
1891 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBoolean):
1892 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse):
1893 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver):
1894 (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1895 (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
1896 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1897 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1898 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1899 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1900 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1901 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
1902 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1903 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
1904 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
1905 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
1906 (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
1907 (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
1908 (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
1909 (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1910 (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRange):
1911 (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
1912 (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
1913 (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
1914 (WebCore::jsTestObjPrototypeFunctionGetElementById):
1915 (WebCore::jsTestObjPrototypeFunctionConvert3):
1916 (WebCore::jsTestObjPrototypeFunctionConvert4):
1917 (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
1918 (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
1919 (WebCore::jsTestObjPrototypeFunctionAny):
1920 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
1921 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
1922 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
1923 (WebCore::jsTestObjPrototypeFunctionConditionalOverload1):
1924 (WebCore::jsTestObjPrototypeFunctionConditionalOverload2):
1925 (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1):
1926 (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2):
1927 (WebCore::jsTestObjPrototypeFunctionAttachShadowRoot):
1928 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1929 (WebCore::constructJSTestOverloadedConstructors1):
1930 (WebCore::constructJSTestOverloadedConstructors2):
1931 (WebCore::constructJSTestOverloadedConstructors4):
1932 (WebCore::constructJSTestOverloadedConstructors5):
1933 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1934 (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
1935 (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
1936 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1937 (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
1938 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1939 (WebCore::setJSTestSerializedScriptValueInterfaceValue):
1940 (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
1941 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1942 (WebCore::JSTestTypedefsConstructor::construct):
1943 (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1944 (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1945 (WebCore::setJSTestTypedefsAttrWithGetterException):
1946 (WebCore::setJSTestTypedefsAttrWithSetterException):
1947 (WebCore::setJSTestTypedefsStringAttrWithGetterException):
1948 (WebCore::setJSTestTypedefsStringAttrWithSetterException):
1949 (WebCore::jsTestTypedefsPrototypeFunctionFunc):
1950 (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
1951 (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
1952 (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArg):
1953 (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
1954 (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction):
1955 (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2):
1956 (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
1957 * bridge/NP_jsobject.cpp:
1958 (_NPN_InvokeDefault):
1963 (_NPN_RemoveProperty):
1968 * bridge/c/c_instance.cpp:
1969 (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
1970 * bridge/objc/WebScriptObject.mm:
1971 (WebCore::addExceptionToConsole):
1972 (-[WebScriptObject callWebScriptMethod:withArguments:]):
1973 (-[WebScriptObject evaluateWebScript:]):
1974 (-[WebScriptObject setValue:forKey:]):
1975 (-[WebScriptObject valueForKey:]):
1976 (-[WebScriptObject removeWebScriptKey:]):
1977 (-[WebScriptObject hasWebScriptKey:]):
1978 (-[WebScriptObject webScriptValueAtIndex:]):
1979 (-[WebScriptObject setWebScriptValueAtIndex:value:]):
1980 * contentextensions/ContentExtensionParser.cpp:
1981 (WebCore::ContentExtensions::getDomainList):
1982 (WebCore::ContentExtensions::getTypeFlags):
1983 (WebCore::ContentExtensions::loadTrigger):
1984 (WebCore::ContentExtensions::loadAction):
1985 (WebCore::ContentExtensions::loadEncodedRules):
1986 * html/HTMLMediaElement.cpp:
1987 (WebCore::controllerJSValue):
1988 (WebCore::HTMLMediaElement::updateCaptionContainer):
1989 (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
1990 (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
1991 (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
1992 (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
1993 * html/HTMLPlugInImageElement.cpp:
1994 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
1996 2016-09-07 Chris Dumez <cdumez@apple.com>
1998 Fix handling of negative radius in HTMLAreaElement's coords when in circle state
1999 https://bugs.webkit.org/show_bug.cgi?id=161690
2001 Reviewed by Daniel Bates.
2003 Fix handling of negative radius in HTMLAreaElement's coords when in
2005 - https://html.spec.whatwg.org/#attr-area-shape-circle
2007 The radius must be non-negative as per the specification. However, our
2008 code fails to check.
2010 Firefox and Chrome both reject negative radius.
2012 No new tests, rebaselined existing test.
2014 * html/HTMLAreaElement.cpp:
2015 (WebCore::HTMLAreaElement::getRegion):
2017 2016-09-07 Chris Dumez <cdumez@apple.com>
2019 Align HTMLAreaElement shape parsing with the specification
2020 https://bugs.webkit.org/show_bug.cgi?id=161698
2022 Reviewed by Daniel Bates.
2024 Align HTMLAreaElement shape parsing with the specification:
2025 - https://html.spec.whatwg.org/#attr-area-shape
2027 In particular, add support for circ / polygon non conforming shapes
2028 and use rectangle as default state.
2030 This also aligns our behavior with Chrome.
2032 No new tests, rebaselined existing test.
2034 * html/HTMLAreaElement.cpp:
2035 (WebCore::HTMLAreaElement::parseAttribute):
2037 2016-09-07 Daniel Bates <dabates@apple.com>
2039 Fix WebCore build when building for device with iOS 10 beta SDK
2041 Define SPI macro kIOReturnSuccess.
2043 * platform/spi/cocoa/IOReturnSPI.h:
2045 2016-09-07 Michael Catanzaro <mcatanzaro@igalia.com>
2047 [EFL] Switch to ENABLE_NETWORK_CACHE
2048 https://bugs.webkit.org/show_bug.cgi?id=152676
2050 Reviewed by Alex Christensen.
2052 * PlatformEfl.cmake: Add GRefPtrSoup to build.
2053 * platform/network/soup/SoupNetworkSession.cpp:
2054 (WebCore::SoupNetworkSession::clearOldSoupCache): Renamed from clearCache.
2055 (WebCore::SoupNetworkSession::setCache): Deleted.
2056 (WebCore::SoupNetworkSession::cache): Deleted.
2057 (WebCore::SoupNetworkSession::clearCache): Deleted.
2058 * platform/network/soup/SoupNetworkSession.h:
2060 2016-09-07 Chris Dumez <cdumez@apple.com>
2062 Drop legacy canvas.probablySupportsContext()
2063 https://bugs.webkit.org/show_bug.cgi?id=161692
2065 Reviewed by Alex Christensen.
2067 Drop legacy canvas.probablySupportsContext() as it is no longer in the specification:
2068 - https://html.spec.whatwg.org/#htmlcanvaselement
2070 Firefox and Chrome do not support canvas.probablySupportsContext().
2072 No new tests, rebaselined existing test.
2074 * bindings/js/JSHTMLCanvasElementCustom.cpp:
2075 (WebCore::JSHTMLCanvasElement::probablySupportsContext): Deleted.
2076 * html/HTMLCanvasElement.cpp:
2077 (WebCore::HTMLCanvasElement::getContext):
2078 (WebCore::HTMLCanvasElement::probablySupportsContext): Deleted.
2079 * html/HTMLCanvasElement.h:
2080 * html/HTMLCanvasElement.idl:
2082 2016-09-07 Simon Fraser <simon.fraser@apple.com>
2084 Rename ScrollBehavior to ScrollAlignment::Behavior
2085 https://bugs.webkit.org/show_bug.cgi?id=161677
2087 Reviewed by Tim Horton.
2089 Free up ScrollBehavior for future use with CSS OM View scrolling by renaming the
2090 existing ScrollBehavior, which is about alignment when scrolling into view.
2092 Renamed ScrollBehavior* to ScrollAlignment.*, and made ScrollBehavior an enum class
2098 * WebCore.xcodeproj/project.pbxproj:
2099 * editing/FrameSelection.h:
2100 * rendering/RenderLayer.cpp:
2101 (WebCore::RenderLayer::getRectToExpose):
2102 * rendering/RenderObject.h:
2103 * rendering/RenderingAllInOne.cpp:
2104 * rendering/ScrollAlignment.cpp: Renamed from Source/WebCore/rendering/ScrollBehavior.cpp.
2105 * rendering/ScrollAlignment.h: Renamed from Source/WebCore/rendering/ScrollBehavior.h.
2106 (WebCore::ScrollAlignment::getVisibleBehavior):
2107 (WebCore::ScrollAlignment::getPartialBehavior):
2108 (WebCore::ScrollAlignment::getHiddenBehavior):
2109 * rendering/ScrollBehavior.h:
2110 (WebCore::ScrollAlignment::getVisibleBehavior): Deleted.
2111 (WebCore::ScrollAlignment::getPartialBehavior): Deleted.
2112 (WebCore::ScrollAlignment::getHiddenBehavior): Deleted.
2114 2016-09-07 Dave Hyatt <hyatt@apple.com>
2116 Add CSSAtRule id info for new parser
2117 https://bugs.webkit.org/show_bug.cgi?id=161695
2119 Reviewed by Sam Weinig.
2121 * WebCore.xcodeproj/project.pbxproj:
2122 * css/parser/CSSAtRuleID.cpp: Added.
2123 (WebCore::cssAtRuleID):
2124 * css/parser/CSSAtRuleID.h: Added.
2126 2016-09-07 Youenn Fablet <youenn@apple.com>
2128 [Streams API] Separate compile flag for ReadableStream and WritableStream
2129 https://bugs.webkit.org/show_bug.cgi?id=161044
2131 Reviewed by Alex Christensen.
2133 Moving from STREAMS_API to READABLE_STREAM_API and WRITABLE_STREAM_API compilation flags.
2134 No change of behavior.
2136 * CMakeLists.txt: Triggering regeneration of builtin wrapper files based on individual builtin header file content change to cope with @conditional changes.
2137 * Configurations/FeatureDefines.xcconfig:
2138 * DerivedSources.cpp:
2139 * DerivedSources.make: Triggering regeneration of builtin wrapper files based on file content change to cope with @conditional changes.
2140 * Modules/fetch/FetchBody.cpp:
2141 * Modules/fetch/FetchBody.h:
2142 * Modules/fetch/FetchBodyOwner.cpp:
2143 (WebCore::FetchBodyOwner::isDisturbed):
2144 (WebCore::FetchBodyOwner::blobLoadingSucceeded):
2145 (WebCore::FetchBodyOwner::blobLoadingFailed):
2146 (WebCore::FetchBodyOwner::blobChunk):
2147 * Modules/fetch/FetchBodyOwner.h:
2148 * Modules/fetch/FetchResponse.cpp:
2149 (WebCore::FetchResponse::BodyLoader::didSucceed):
2150 (WebCore::FetchResponse::BodyLoader::didFail):
2151 (WebCore::FetchResponse::BodyLoader::didReceiveData):
2152 * Modules/fetch/FetchResponse.h:
2153 * Modules/fetch/FetchResponse.idl:
2154 * Modules/fetch/FetchResponse.js:
2155 (initializeFetchResponse):
2156 * Modules/fetch/FetchResponseSource.cpp:
2157 * Modules/fetch/FetchResponseSource.h:
2158 * Modules/streams/ByteLengthQueuingStrategy.idl:
2159 * Modules/streams/ByteLengthQueuingStrategy.js:
2160 * Modules/streams/CountQueuingStrategy.idl:
2161 * Modules/streams/CountQueuingStrategy.js:
2162 * Modules/streams/ReadableStream.idl:
2163 * Modules/streams/ReadableStream.js:
2164 * Modules/streams/ReadableStreamDefaultController.idl:
2165 * Modules/streams/ReadableStreamDefaultController.js:
2166 * Modules/streams/ReadableStreamDefaultReader.idl:
2167 * Modules/streams/ReadableStreamDefaultReader.js:
2168 * Modules/streams/ReadableStreamInternals.js:
2169 * Modules/streams/ReadableStreamSource.h:
2170 * Modules/streams/ReadableStreamSource.idl:
2171 * Modules/streams/StreamInternals.js:
2172 * Modules/streams/WritableStream.idl:
2173 * Modules/streams/WritableStream.js:
2174 * Modules/streams/WritableStreamInternals.js:
2175 * bindings/js/JSDOMGlobalObject.cpp:
2176 (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
2177 * bindings/js/JSReadableStreamPrivateConstructors.cpp:
2178 * bindings/js/JSReadableStreamPrivateConstructors.h:
2179 * bindings/js/JSReadableStreamSourceCustom.cpp:
2180 * bindings/js/ReadableStreamDefaultController.cpp:
2181 * bindings/js/ReadableStreamDefaultController.h:
2182 * testing/Internals.cpp:
2183 * testing/Internals.h:
2184 * testing/Internals.idl:
2186 2016-09-07 Carlos Garcia Campos <cgarcia@igalia.com>
2188 [GTK] Crash of WebProcess on the last WebView disconnect
2189 https://bugs.webkit.org/show_bug.cgi?id=161605
2191 Reviewed by Michael Catanzaro.
2193 Stop tracking X11 GL contexts to be cleanered on an exit handler. This was added to work around bugs on drivers,
2194 and it's assuming that all GLContext not deleted when the exit handler is called are leaked, which is no longer
2195 true, because PlatformDisplay now owns a GLContext and is deleted after exit handlers.
2197 * platform/graphics/GLContext.cpp:
2198 (WebCore::GLContext::GLContext):
2199 (WebCore::GLContext::~GLContext):
2200 (WebCore::activeContextList): Deleted.
2201 (WebCore::GLContext::addActiveContext): Deleted.
2202 (WebCore::GLContext::removeActiveContext): Deleted.
2203 (WebCore::GLContext::cleanupActiveContextsAtExit): Deleted.
2205 2016-09-07 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
2207 Templatize JS bindings code generator of functions with variadic parameters
2208 https://bugs.webkit.org/show_bug.cgi?id=158835
2210 Reviewed by Darin Adler.
2212 Add template functions to handle function with variadic parameter for DOM objects.
2214 * Modules/mediastream/RTCPeerConnection.cpp:
2215 (WebCore::RTCPeerConnection::addTrack):
2216 * Modules/mediastream/RTCPeerConnection.h:
2217 * bindings/js/JSDOMBinding.h:
2218 (WebCore::VariadicHelperBase::convert):
2219 (WebCore::toArguments):
2220 (WebCore::jsFrozenArray):
2221 (WebCore::toRefPtrNativeArray):
2222 (WebCore::toNativeArray):
2223 * bindings/scripts/CodeGeneratorJS.pm:
2224 (GenerateParametersCheck):
2226 * bindings/scripts/test/JS/JSTestObj.cpp:
2227 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
2228 (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
2229 (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
2230 (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
2231 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2232 (WebCore::jsTestObjPrototypeFunctionAny):
2233 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2234 (WebCore::constructJSTestOverloadedConstructors5):
2236 2016-09-06 Commit Queue <commit-queue@webkit.org>
2238 Unreviewed, rolling out r205521, r205526, and r205532.
2239 https://bugs.webkit.org/show_bug.cgi?id=161668
2241 broke API tests (Requested by alexchristensen on #webkit).
2243 Reverted changesets:
2245 "Punycode encode non-ascii hosts in URLParser"
2246 https://bugs.webkit.org/show_bug.cgi?id=161655
2247 http://trac.webkit.org/changeset/205521
2249 "Fix query-only and fragment-only relative URLs when using
2251 https://bugs.webkit.org/show_bug.cgi?id=161657
2252 http://trac.webkit.org/changeset/205526
2254 "URLParser should parse / as a relative URL"
2255 https://bugs.webkit.org/show_bug.cgi?id=161667
2256 http://trac.webkit.org/changeset/205532
2258 2016-09-06 Alex Christensen <achristensen@webkit.org>
2260 URLParser should parse / as a relative URL
2261 https://bugs.webkit.org/show_bug.cgi?id=161667
2263 Reviewed by Tim Horton.
2265 Covered by a new API test.
2267 * platform/URLParser.cpp:
2268 (WebCore::URLParser::parse):
2270 2016-09-06 Joseph Pecoraro <pecoraro@apple.com>
2272 Web Inspector: Avoid linkifying some schemes in console logs
2273 https://bugs.webkit.org/show_bug.cgi?id=161648
2274 <rdar://problem/16413270>
2276 Reviewed by Brian Burg.
2278 * inspector/InspectorFrontendHost.cpp:
2279 (WebCore::InspectorFrontendHost::openInNewTab):
2280 If a javascript: link is passed just ignore it.
2282 2016-09-06 Alex Christensen <achristensen@webkit.org>
2284 Fix query-only and fragment-only relative URLs when using URLParser
2285 https://bugs.webkit.org/show_bug.cgi?id=161657
2287 Reviewed by Tim Horton.
2289 Covered by new API tests and progress towards passing the web platform tests when using URLParser.
2291 * platform/URLParser.cpp:
2292 (WebCore::URLParser::parse):
2294 2016-09-06 Chris Dumez <cdumez@apple.com>
2296 Add support for input.minLength / textArea.minLength
2297 https://bugs.webkit.org/show_bug.cgi?id=161644
2299 Reviewed by Darin Adler.
2301 Add support for input.minLength / textArea.minLength:
2302 - https://html.spec.whatwg.org/#dom-input-minlength
2303 - https://html.spec.whatwg.org/#dom-textarea-minlength
2305 Chrome implements this, Firefox does not yet.
2307 No new tests, rebaselined existing tests.
2309 * html/FormAssociatedElement.cpp:
2310 (WebCore::FormAssociatedElement::tooShort):
2311 (WebCore::FormAssociatedElement::valid):
2312 (WebCore::FormAssociatedElement::typeMismatch): Deleted.
2313 * html/FormAssociatedElement.h:
2314 * html/HTMLAttributeNames.in:
2315 * html/HTMLInputElement.cpp:
2316 (WebCore::HTMLInputElement::HTMLInputElement):
2317 (WebCore::HTMLInputElement::isValidValue):
2318 (WebCore::HTMLInputElement::tooShort):
2319 (WebCore::HTMLInputElement::tooLong):
2320 (WebCore::HTMLInputElement::parseAttribute):
2321 (WebCore::HTMLInputElement::effectiveMaxLength):
2322 (WebCore::HTMLInputElement::maxLengthAttributeChanged):
2323 (WebCore::HTMLInputElement::minLengthAttributeChanged):
2324 (WebCore::HTMLInputElement::patternMismatch): Deleted.
2325 (WebCore::parseAcceptAttribute): Deleted.
2326 (WebCore::HTMLInputElement::isEnumeratable): Deleted.
2327 (WebCore::HTMLInputElement::supportLabels): Deleted.
2328 * html/HTMLInputElement.h:
2329 (WebCore::HTMLInputElement::supportsMinLength):
2330 (WebCore::HTMLInputElement::supportsMaxLength): Deleted.
2331 * html/HTMLInputElement.idl:
2332 * html/HTMLTextAreaElement.cpp:
2333 (WebCore::HTMLTextAreaElement::parseAttribute):
2334 (WebCore::HTMLTextAreaElement::maxLengthAttributeChanged):
2335 (WebCore::HTMLTextAreaElement::minLengthAttributeChanged):
2336 (WebCore::HTMLTextAreaElement::validationMessage):
2337 (WebCore::HTMLTextAreaElement::tooShort):
2338 (WebCore::HTMLTextAreaElement::tooLong):
2339 (WebCore::HTMLTextAreaElement::isValidValue):
2340 * html/HTMLTextAreaElement.h:
2341 * html/HTMLTextAreaElement.idl:
2342 * html/HTMLTextFormControlElement.cpp:
2343 (WebCore::HTMLTextFormControlElement::setMaxLength):
2344 (WebCore::HTMLTextFormControlElement::setMinLength):
2345 * html/HTMLTextFormControlElement.h:
2346 (WebCore::HTMLTextFormControlElement::maxLength):
2347 (WebCore::HTMLTextFormControlElement::setMaxLength):
2348 (WebCore::HTMLTextFormControlElement::minLength):
2349 (WebCore::HTMLTextFormControlElement::setMinLength):
2350 * html/InputType.cpp:
2351 (WebCore::InputType::validationMessage):
2352 * html/ValidityState.idl:
2353 * platform/LocalizedStrings.cpp:
2354 (WebCore::validationMessageTooShortText):
2355 * platform/LocalizedStrings.h:
2357 2016-09-06 Alex Christensen <achristensen@webkit.org>
2359 Punycode encode non-ascii hosts in URLParser
2360 https://bugs.webkit.org/show_bug.cgi?id=161655
2362 Reviewed by Tim Horton.
2364 Covered by new API tests based on the web platform tests.
2366 * platform/URLParser.cpp:
2367 (WebCore::URLParser::parse):
2368 (WebCore::containsOnlyASCII):
2369 (WebCore::domainToASCII):
2371 2016-09-06 Saam Barati <sbarati@apple.com>
2373 Make JSMap and JSSet faster
2374 https://bugs.webkit.org/show_bug.cgi?id=160989
2376 Reviewed by Filip Pizlo.
2378 * ForwardingHeaders/runtime/HashMapImpl.h: Added.
2379 * ForwardingHeaders/runtime/MapBase.h: Added.
2380 * bindings/js/SerializedScriptValue.cpp:
2381 (WebCore::CloneSerializer::serialize):
2382 (WebCore::CloneDeserializer::deserialize):
2384 2016-09-06 Myles C. Maxfield <mmaxfield@apple.com>
2386 Strikethrough positions are erroneously snapped twice
2387 https://bugs.webkit.org/show_bug.cgi?id=161647
2388 <rdar://problem/11542470>
2390 Reviewed by Zalan Bujtas.
2392 Because we're using an int for the position of the baseline, the math to calculate the
2393 strikethrough position is snapped. Then, we snap it again inside GraphicsContext.
2395 Test: fast/text/strikethrough-int.html
2397 * rendering/InlineTextBox.cpp:
2398 (WebCore::InlineTextBox::paintDecoration):
2399 * rendering/TextDecorationPainter.h:
2400 (WebCore::TextDecorationPainter::setBaseline):
2402 2016-09-06 David Kilzer <ddkilzer@apple.com>
2404 [iOS] Remove soft linking of MobileCoreServices.framework
2405 <https://webkit.org/b/161641>
2406 <rdar://problem/10420118>
2408 Reviewed by Darin Adler.
2410 * Configurations/WebCore.xcconfig: Add hard link to
2411 MobileCoreServices.framework.
2413 * editing/ios/EditorIOS.mm: Change #include to #import.
2414 * platform/graphics/cg/ImageSourceCGMac.mm:
2415 * platform/graphics/mac/ImageMac.mm:
2416 * platform/ios/PasteboardIOS.mm:
2417 * platform/ios/PlatformPasteboardIOS.mm:
2418 * platform/network/ios/WebCoreURLResponseIOS.mm:
2419 * platform/network/mac/UTIUtilities.mm:
2420 - Rearrange import statements as needed.
2421 - Remove soft link to MobileCoreServices.framework.
2422 - Add import of <MobileCoreServices/MobileCoreServices.h> as
2425 * rendering/RenderThemeIOS.mm: Remove unused soft link to
2426 MobileCoreServices.framework.
2428 2016-09-06 Chris Dumez <cdumez@apple.com>
2430 Align srcset attribute parsing with the HTML specification
2431 https://bugs.webkit.org/show_bug.cgi?id=161636
2433 Reviewed by Darin Adler.
2435 Align srcset attribute parsing with the HTML specification:
2436 - https://html.spec.whatwg.org/#parse-a-srcset-attribute
2438 The new behavior is also consistent with Firefox and Chrome
2439 as all 3 browsers now pass 100% of the checks at:
2440 - http://w3c-test.org/html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute.html
2442 No new tests, rebaselined existing tests.
2444 * html/parser/HTMLParserIdioms.cpp:
2445 (WebCore::parseValidHTMLNonNegativeIntegerInternal):
2446 (WebCore::parseValidHTMLNonNegativeInteger):
2447 (WebCore::parseValidHTMLFloatingPointNumberInternal):
2448 (WebCore::parseValidHTMLFloatingPointNumber):
2449 * html/parser/HTMLParserIdioms.h:
2450 Add convenience for parsing *valid* HTML non-negative integers and
2451 *valid* floating point number values.
2453 * html/parser/HTMLSrcsetParser.cpp:
2454 (WebCore::parseDescriptors):
2455 - Use parseValidHTMLFloatingPointNumber() to parse density so that the value
2456 is parsed as a valid HTML floating point number value, as per the spec.
2457 - Use parseValidHTMLNonNegativeInteger() to parse width and height so that
2458 the value is parsed as a valid HTML non-negative integer value, as per the
2460 - Return false if descriptor does not have a h, w and x at the end as per:
2461 https://html.spec.whatwg.org/#parse-a-srcset-attribute (step 13: Anything else)
2462 - Return false if height is set but not width, as per:
2463 https://html.spec.whatwg.org/#parse-a-srcset-attribute (step 14)
2465 (WebCore::parseImageCandidatesFromSrcsetAttribute):
2466 - Skip whitespace if URL does not end with a comma instead of assuming there is
2467 a single space character, as per:
2468 https://html.spec.whatwg.org/#parse-a-srcset-attribute (step 8. Otherwise 1.)
2470 2016-09-06 Fujii Hironori <Hironori.Fujii@sony.com>
2472 [CMake] Decouple generating bindings of WebCore and WebCoreTestSupport
2473 https://bugs.webkit.org/show_bug.cgi?id=161474
2475 Generating bindings of WebCore and WebCoreTestSupport shares a
2476 single supplementalDependencyFile. But, nothing supplements any
2477 IDL of WebCoreTestSupport. This introduces unnecessary
2480 Reviewed by Alex Christensen.
2482 * CMakeLists.txt: Do not input any IDL of WebCoreTestSupport to
2483 preprocess-idls.pl. Do not use supplementalDependencyFile to
2484 generate bindings of WebCoreTestSupport. Add SettingsMacros.h as
2485 a source file of WebCoreDerivedSources to ensure make_settings.pl
2486 is finished before compiling WebCoreDerivedSources.
2488 2016-09-06 Zalan Bujtas <zalan@apple.com>
2490 ASSERTION FAILED: !paintInfo.overlapTestRequests->contains(this) in WebCore::RenderWidget::paintContents
2491 https://bugs.webkit.org/show_bug.cgi?id=135602
2492 <rdar://problem/27701733>
2494 Reviewed by Simon Fraser.
2496 ASSERT is updated to support multiple fragments painting. We just have to ensure that the FrameView's rect
2497 has not changed between the 2 paintContents calls.
2499 Test: fast/layers/assert-on-overlap-testing-with-frames-inside-columns.html
2501 * rendering/RenderWidget.cpp:
2502 (WebCore::RenderWidget::paintContents):
2504 2016-09-06 Commit Queue <commit-queue@webkit.org>
2506 Unreviewed, rolling out r205504.
2507 https://bugs.webkit.org/show_bug.cgi?id=161645
2509 Broke the iOS device build (Requested by ryanhaddad on
2514 "Make JSMap and JSSet faster"
2515 https://bugs.webkit.org/show_bug.cgi?id=160989
2516 http://trac.webkit.org/changeset/205504
2518 2016-09-06 Zalan Bujtas <zalan@apple.com>
2520 Remove unused overlap checking functions from FrameView.
2521 https://bugs.webkit.org/show_bug.cgi?id=161635
2523 Reviewed by Simon Fraser.
2525 No change in functionality.
2527 * page/FrameView.cpp:
2528 (WebCore::FrameView::isOverlappedIncludingAncestors): Deleted.
2531 2016-09-06 Simon Fraser <simon.fraser@apple.com>
2533 Align element.scroll() / scrollTo() / scrollBy() with the CSSOM specification
2534 https://bugs.webkit.org/show_bug.cgi?id=161610
2536 Reviewed by Darin Adler, Chris Dumez.
2538 Implement Element.scroll(), scrollBy() and scrollTo() with x,y and ScrollToOptions
2539 on Element, according to <https://drafts.csswg.org/cssom-view/#element-scrolling-members>
2541 WebKit's behavior of treating scrolls on the body element in both quirks and strict mode
2544 Tests: fast/dom/Element/scrolling-funtions-on-body-quirks.html
2545 fast/dom/Element/scrolling-funtions-on-body.html
2546 fast/dom/Element/scrolling-funtions-on-element.html
2549 (WebCore::Element::scrollBy):
2550 (WebCore::normalizeNonFiniteValue):
2551 (WebCore::Element::scrollTo):
2554 * html/HTMLBodyElement.cpp:
2555 (WebCore::HTMLBodyElement::scrollTo):
2556 * html/HTMLBodyElement.h:
2558 2016-09-06 Saam Barati <sbarati@apple.com>
2560 Make JSMap and JSSet faster
2561 https://bugs.webkit.org/show_bug.cgi?id=160989
2563 Reviewed by Filip Pizlo.
2565 * ForwardingHeaders/runtime/HashMapImpl.h: Added.
2566 * ForwardingHeaders/runtime/MapBase.h: Added.
2567 * bindings/js/SerializedScriptValue.cpp:
2568 (WebCore::CloneSerializer::serialize):
2569 (WebCore::CloneDeserializer::deserialize):
2571 2016-09-05 Alex Christensen <achristensen@webkit.org>
2573 Implement relative file urls and begin implementing character encoding in URLParser
2574 https://bugs.webkit.org/show_bug.cgi?id=161618
2576 Reviewed by Tim Horton.
2578 Covered by new API tests.
2579 Also, this is a significant step towards passing the URL web platform tests when using the URLParser,
2580 which is still off by default.
2582 * platform/URLParser.cpp:
2583 (WebCore::isInSimpleEncodeSet):
2584 (WebCore::isInDefaultEncodeSet):
2585 (WebCore::isInUserInfoEncodeSet):
2586 (WebCore::isInvalidDomainCharacter):
2587 (WebCore::shouldCopyFileURL):
2588 (WebCore::percentEncode):
2589 (WebCore::utf8PercentEncode):
2590 (WebCore::encodeQuery):
2591 (WebCore::isDefaultPort):
2592 (WebCore::isPercentEncodedDot):
2593 (WebCore::URLParser::parse):
2594 (WebCore::percentDecode):
2595 (WebCore::domainToASCII):
2596 (WebCore::hasInvalidDomainCharacter):
2597 (WebCore::URLParser::parsePort):
2598 (WebCore::URLParser::parseHost):
2599 (WebCore::isTabOrNewline): Deleted.
2600 * platform/URLParser.h:
2602 2016-09-06 Daniel Bates <dabates@apple.com>
2604 Fix the Apple-internal build following <https://trac.webkit.org/changeset/205488>
2605 (https://bugs.webkit.org/show_bug.cgi?id=161090)
2607 Use the default linkage for QuartzCore constants to match the linkage used for such constants
2608 in the Apple-internal SDK.
2610 * platform/spi/cocoa/QuartzCoreSPI.h:
2612 2016-09-06 Daniel Bates <dabates@apple.com>
2614 <table> inside <div align="right"> with large content inside = no scrollbar
2615 https://bugs.webkit.org/show_bug.cgi?id=3352
2617 Reviewed by Brent Fulgham.
2619 Respect "right" text-alignment only if the width of the child does not overflow the
2620 width of its containing block. This makes our margin computation more closely conform
2621 to section "Block-level, non-replaced elements in normal flow" of the CSS 2.1
2622 spec., <http://www.w3.org/TR/CSS21/>, and to the behavior observed in Firefox, Chrome,
2623 IE version 9 or later and Microsoft Edge.
2625 Test: fast/block/align-overflow-child.html
2627 * rendering/RenderBox.cpp:
2628 (WebCore::RenderBox::computeInlineDirectionMargins):
2630 2016-09-06 Daniel Bates <dabates@apple.com>
2632 Remove EXTERN_C from WTF
2633 https://bugs.webkit.org/show_bug.cgi?id=161090
2635 Reviewed by Brent Fulgham.
2637 Guard external C declarations in WTF_EXTERN_C_BEGIN, WTF_EXTERN_C_END.
2639 * platform/spi/cf/CFLocaleSPI.h:
2640 * platform/spi/cf/CFNetworkConnectionCacheSPI.h:
2641 * platform/spi/cf/CFNetworkSPI.h: Additionally, remove the workaround for <rdar://problem/18337182>
2642 as this bug was fixed in El Capitan.
2643 * platform/spi/cf/CFUtilitiesSPI.h:
2644 * platform/spi/cocoa/CoreTextSPI.h:
2645 * platform/spi/cocoa/DataDetectorsCoreSPI.h:
2646 * platform/spi/cocoa/IOPMLibSPI.h:
2647 * platform/spi/cocoa/MachVMSPI.h:
2648 * platform/spi/cocoa/QuartzCoreSPI.h:
2649 * platform/spi/ios/MobileGestaltSPI.h:
2650 * platform/spi/ios/QuickLookSPI.h:
2651 * platform/spi/win/CoreTextSPIWin.cpp:
2652 * platform/spi/win/CoreTextSPIWin.h:
2654 2016-09-06 Ryan Haddad <ryanhaddad@apple.com>
2656 Unreviewed, rolling out r205407.
2658 Not the correct way to implement this functionality
2662 "Consult with the FrameLoaderClient about whether or not
2663 content extensions should be enabled when loading this URL."
2664 https://bugs.webkit.org/show_bug.cgi?id=161441
2665 http://trac.webkit.org/changeset/205407
2667 2016-09-06 Youenn Fablet <youenn@apple.com>
2669 http/tests/security/contentSecurityPolicy/worker-csp-blocks-xhr-redirect-cross-origin.html is flaky
2670 https://bugs.webkit.org/show_bug.cgi?id=161627
2672 Reviewed by Darin Adler.
2674 Covered by changed expectation.
2676 * loader/DocumentThreadableLoader.cpp:
2677 (WebCore::DocumentThreadableLoader::redirectReceived): Clearing the resource in lieu of clearing the request. This will stop the resource load.
2678 * loader/SubresourceLoader.cpp:
2679 (WebCore::SubresourceLoader::didReceiveResponse): Adding an ASSERT to ensure that no valid redirect responses is mistakenly processed here.
2681 2016-09-06 Zalan Bujtas <zalan@apple.com>
2683 ASSERTION FAILED: !currBox->needsLayout() in WebCore::RenderBlock::checkPositionedObjectsNeedLayout
2684 https://bugs.webkit.org/show_bug.cgi?id=120291
2685 <rdar://problem/27683456>
2687 Reviewed by David Hyatt.
2689 This patch ensures that we always set the 'positioned child needs layout' bit on the containing block
2690 when a new positioned descendant gets inserted. It fixes cases for simplified layout when
2691 we ended up not laying out the descendant element.
2693 Test: fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out.html
2695 * rendering/RenderBlock.cpp:
2696 (WebCore::RenderBlock::insertPositionedObject):
2698 2016-09-06 Youenn Fablet <youenn@apple.com>
2700 CachedResourceLoader is not taking into account fetch options to use or not cached resources
2701 https://bugs.webkit.org/show_bug.cgi?id=161389
2703 Reviewed by Darin Adler.
2705 Tests: http/tests/fetch/fetching-same-resource-with-diffferent-options.html
2706 http/tests/security/cross-origin-cached-resource-parallel.html
2707 http/tests/security/cross-origin-cached-resource.html
2708 http/tests/security/load-image-after-redirection-2.html
2709 http/tests/security/shape-outside-and-cached-resources.html
2711 Adding CORS checks for the response in case of CORS fetch mode, in SubresourceLoader.
2712 Removing the CORS checks in Image and DocumentThreadableLoader.
2714 The direction of this patch is to make CachedResource origin-specific/fetch mode specific.
2716 This will remove the need for CachedResource clients to do CORS checks when receiving the notifyFinished call.
2717 This will also make the computation of whether a resource is clean or not much easier since the CachedResource knowd its origin and its response tainting.
2719 Removing the CORS checks at ImageLoader creates the risk of using some cached resources loaded from previously no-cors mode without doing the actual CORS check.
2720 Note that the risk was already there in case of a resource loaded through redirections.
2721 Reusing a cached resource for a load with different options also leads to bad computation of the resource tainting.
2723 As a first step, improvements are done but only for CachedImage resources.
2725 This patch limits the direct reuse of cached resources as follow:
2726 - If the request and existing resources have different origins.
2727 - If the fetch mode is different between request and existing resource.
2729 In those cases, a new CachedResource is created with the correct options and origin.
2730 The data and response of the CachedResource found in the cache are copied efficiently in the new CachedResource, if the matching CachedResource finished loading (CachedImage specific).
2732 If the matching CachedResource is still loading, we trigger a reload (with caching=false to not disturb the being loaded resource).
2733 This should be made more efficient at some point, especially if the matching CachedResource already has its response set.
2735 This triggers a change of behavior: previously, the CORS checks were done by the ImageLoader when the resource was finished loading.
2736 The CORS checks were controlled by the crossOrigin attribute, which may be set or unset between the load start and the load end.
2738 Now the crossOrigin attribute is checked at load start. If it is set, the CORS checks will happen even if the attribute is unset before the end of the load.
2739 This is more consistent as the actual request was built with CORS enabled.
2741 * loader/CrossOriginPreflightChecker.cpp:
2742 (WebCore::CrossOriginPreflightChecker::startPreflight): Setting correctly the preflight options as per fetch spec.
2743 * loader/DocumentThreadableLoader.cpp:
2744 (WebCore::DocumentThreadableLoader::didReceiveResponse): Removing CORS check.
2745 (WebCore::DocumentThreadableLoader::loadRequest): Adding CORS check in sync mode.
2746 * loader/ImageLoader.cpp:
2747 (WebCore::ImageLoader::updateFromElement):
2748 (WebCore::ImageLoader::notifyFinished):
2749 * loader/SubresourceLoader.cpp:
2750 (WebCore::SubresourceLoader::didReceiveResponse): Adding CORS checks to the response
2751 (WebCore::SubresourceLoader::checkResponseCrossOriginAccessControl): Helper routine to do CORS checks
2752 * loader/SubresourceLoader.h:
2753 * loader/cache/CachedImage.cpp:
2754 (WebCore::CachedImage::cloneData): Responsible to set image content from another CachedImage.
2755 * loader/cache/CachedImage.h:
2756 * loader/cache/CachedResource.cpp:
2757 (WebCore::CachedResource::computeOrigin): Helper routine to set the origin and whether the resource is cross-origin or not.
2758 (WebCore::CachedResource::load): Using computeOrigin.
2759 (WebCore::CachedResource::loadFrom): Loading from a CachedResource from the same type and which finished loading.
2760 * loader/cache/CachedResource.h:
2761 (WebCore::CachedResource::cloneData):
2762 * loader/cache/CachedResourceLoader.cpp:
2763 (WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): Helper routine responsible to adapt the CachedResource
2764 that can be reused to the origin and options of a new request.
2765 (WebCore::CachedResourceLoader::requestResource): Calling updateCachedResourceWithCurrentRequest before actually returning the resource.
2766 (WebCore::CachedResourceLoader::determineRevalidationPolicy): Space clean-up.
2767 * loader/cache/CachedResourceLoader.h:
2768 * loader/cache/CachedResourceRequest.h:
2769 (WebCore::CachedResourceRequest::setCachingPolicy):
2770 * style/StylePendingResources.cpp:
2771 (WebCore::Style::loadPendingImage): Allowing data URLs for ShapeOutside data.
2773 2016-09-05 Darin Adler <darin@apple.com>
2775 More bindings improvements, particularly things not needed for JavaScript bindings
2776 https://bugs.webkit.org/show_bug.cgi?id=161572
2778 Reviewed by Sam Weinig.
2780 * WebCore.xcodeproj/project.pbxproj: Export a couple of files needed for legacy bindings.
2782 * bindings/js/JSDOMWindowCustom.cpp:
2783 (WebCore::addCrossOriginWindowPropertyNames): Mark array const.
2784 * bindings/js/JSLocationCustom.cpp:
2785 (WebCore::addCrossOriginLocationPropertyNames): Ditto.
2787 * dom/DOMImplementation.cpp:
2788 (WebCore::addString): Deleted.
2789 (WebCore::isSupportedSVG10Feature): Deleted.
2790 (WebCore::isSupportedSVG11Feature): Deleted.
2791 (WebCore::DOMImplementation::hasFeature): Deleted.
2793 * dom/DOMImplementation.h: Changed hasFeature to take no arguments and to always
2794 return true, as specified in the DOM spec.
2796 * dom/DOMImplementation.idl: Removed the arguments to hasFeature.
2799 (WebCore::Document::defaultCharsetForLegacyBindings): Renamed from
2800 defaultCharsetForBindings, because this function is used only by the
2801 non-JavaScript bindings.
2802 * dom/Document.h: Updated for the above.
2804 * dom/DocumentType.h: Removed entitiesForBindings,
2805 notationsForBindings, and internalSubsetForBindings, all of which were
2806 empty functions. The empty implementations are now in the legacy bindings.
2809 (WebCore::Element::dispatchSimulatedClickForBindings): Deleted.
2810 This code is now at the single call site, in HTMLElement.
2811 * dom/Element.h: Updated for the above change.
2814 (WebCore::Node::isSupportedForBindings): Deleted. This is only used in the
2815 legacy bindings, and since it only returns a value other than "true" for
2816 SVG features, it is now in the SVGTests class.
2817 * dom/Node.h: Updated for the above change.
2819 * html/HTMLElement.cpp:
2820 (WebCore::HTMLElement::click): Call simulateClick with the appropriate
2821 arguments rather than calling dispatchSimulatedClickForBindings.
2824 (WebCore::supportedSVGFeatures): Added. Moved here from DOMImplementation,
2825 but also refactored.
2826 (WebCore::SVGTests::isValid): Changed to use the function above, rather than
2827 calling DOMImplementation::hasFeature. This change fixes a bug where feature names
2828 that do not look like valid SVG feature names, names such as "xxx", were returning
2829 true claiming that the feature was supported. This behavior was helpful in the
2830 general DOMImplementation function, but harmful here. This bug was causing test
2831 failures in some of our SVG tests.
2832 (WebCore::SVGTests::hasFeatureForLegacyBindings): Added. Uses the set above to
2833 implement the legacy behavior of hasFeature. It's better to have this in parallel
2834 with the SVGTests::isValid function rather than having either depend on the other.
2836 * svg/SVGTests.h: Added exported SVGTests::isValid function.
2838 2016-09-05 Commit Queue <commit-queue@webkit.org>
2840 Unreviewed, rolling out r205450.
2841 https://bugs.webkit.org/show_bug.cgi?id=161614
2843 Made tests flaky, causing false positives on EWS (Requested by
2848 "CachedResourceLoader is not taking into account fetch options
2849 to use or not cached resources"
2850 https://bugs.webkit.org/show_bug.cgi?id=161389
2851 http://trac.webkit.org/changeset/205450
2853 2016-08-31 Filip Pizlo <fpizlo@apple.com>
2855 Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression
2856 https://bugs.webkit.org/show_bug.cgi?id=160125
2858 Reviewed by Geoffrey Garen and Keith Miller.
2860 No new tests because no new WebCore behavior.
2862 Just rewiring #includes.
2864 * ForwardingHeaders/heap/HeapInlines.h: Added.
2865 * ForwardingHeaders/interpreter/Interpreter.h: Removed.
2866 * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Added.
2867 * Modules/indexeddb/IDBCursorWithValue.cpp:
2868 * Modules/indexeddb/client/TransactionOperation.cpp:
2869 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2870 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2871 * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp:
2872 * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp:
2873 * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp:
2874 * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp:
2875 * bindings/js/JSClientRectCustom.cpp:
2876 * bindings/js/JSDOMBinding.cpp:
2877 * bindings/js/JSDOMBinding.h:
2878 * bindings/js/JSDeviceMotionEventCustom.cpp:
2879 * bindings/js/JSDeviceOrientationEventCustom.cpp:
2880 * bindings/js/JSErrorEventCustom.cpp:
2881 * bindings/js/JSIDBCursorWithValueCustom.cpp:
2882 * bindings/js/JSIDBIndexCustom.cpp:
2883 * bindings/js/JSPopStateEventCustom.cpp:
2884 * bindings/js/JSWebGL2RenderingContextCustom.cpp:
2885 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
2886 * bindings/js/WorkerScriptController.cpp:
2887 * contentextensions/ContentExtensionParser.cpp:
2888 * dom/ErrorEvent.cpp:
2889 * html/HTMLCanvasElement.cpp:
2890 * html/MediaDocument.cpp:
2891 * inspector/CommandLineAPIModule.cpp:
2892 * loader/EmptyClients.cpp:
2893 * page/CaptionUserPreferences.cpp:
2895 * page/PageGroup.cpp:
2896 * page/UserContentController.cpp:
2897 * platform/mock/mediasource/MockBox.cpp:
2898 * testing/GCObservation.cpp:
2900 2016-09-05 Fujii Hironori <Hironori.Fujii@sony.com>
2902 run-bindings-tests fails since r205422
2903 https://bugs.webkit.org/show_bug.cgi?id=161595
2905 Reviewed by Darin Adler.
2907 Rebaseline binding tests after r205422.
2909 * bindings/scripts/test/JS/JSInterfaceName.cpp:
2910 * bindings/scripts/test/JS/JSInterfaceName.h:
2911 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2912 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2913 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2914 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
2915 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2916 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
2917 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2918 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2919 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2920 * bindings/scripts/test/JS/JSTestEventConstructor.h:
2921 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2922 * bindings/scripts/test/JS/JSTestEventTarget.h:
2923 * bindings/scripts/test/JS/JSTestException.cpp:
2924 * bindings/scripts/test/JS/JSTestException.h:
2925 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2926 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2927 * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2928 * bindings/scripts/test/JS/JSTestGlobalObject.h:
2929 * bindings/scripts/test/JS/JSTestInterface.cpp:
2930 * bindings/scripts/test/JS/JSTestInterface.h:
2931 * bindings/scripts/test/JS/JSTestIterable.cpp:
2932 * bindings/scripts/test/JS/JSTestIterable.h:
2933 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2934 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2935 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2936 * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2937 * bindings/scripts/test/JS/JSTestNode.cpp:
2938 * bindings/scripts/test/JS/JSTestNode.h:
2939 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2940 * bindings/scripts/test/JS/JSTestNondeterministic.h:
2941 * bindings/scripts/test/JS/JSTestObj.cpp:
2942 * bindings/scripts/test/JS/JSTestObj.h:
2943 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2944 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2945 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2946 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
2947 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2948 * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
2949 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2950 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2951 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2952 * bindings/scripts/test/JS/JSTestTypedefs.h:
2953 * bindings/scripts/test/JS/JSattribute.cpp:
2954 * bindings/scripts/test/JS/JSattribute.h:
2955 * bindings/scripts/test/JS/JSreadonly.cpp:
2956 * bindings/scripts/test/JS/JSreadonly.h:
2958 2016-09-05 Fujii Hironori <Hironori.Fujii@sony.com>
2960 [CMake] Duplicated IDL files in WebCore_IDL_FILES
2961 https://bugs.webkit.org/show_bug.cgi?id=161592
2963 Reviewed by Darin Adler.
2965 * CMakeLists.txt: Removed duplicated IDL files.
2966 * DerivedSources.cpp: Added #if ENABLE(USER_MESSAGE_HANDLERS)
2968 2016-09-05 Joseph Pecoraro <pecoraro@apple.com>
2970 [Mac] Static Analyzer warnings about unused values in CDMSessionAVStreamSession.mm
2971 https://bugs.webkit.org/show_bug.cgi?id=161598
2973 Reviewed by Darin Adler.
2975 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
2976 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2977 (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
2978 Make this parameter a reference again, accidentally lost in r195410.
2979 Now assignments to the parameter make sense.
2981 2016-09-05 Youenn Fablet <youenn@apple.com>
2983 Clean CSS stylesheets should be accessible from JavaScript
2984 https://bugs.webkit.org/show_bug.cgi?id=158728
2986 Reviewed by Darin Adler.
2988 Covered by updated tests.
2990 Making use of the resource response type to evaluate whether to make the CSS stylesheets visible
2991 for stylesheet link elements and for stylesheet processing instructions.
2992 Ideally, the origin flag should be a boolean.
2994 To keep behavior consistent in cors-check-unaware cases, the flag might remain unset.
2995 In that case, the behavior remains the same (checking of the stylesheet URL).
2996 The origin flag is set to true or false only in case of fetch mode being set to cors using the crossorigin attribute.
2998 Updated CSSStyleSheet::create to take a Node reference. Updated callers accordingly.
3000 * contentextensions/ContentExtensionStyleSheet.cpp:
3001 (WebCore::ContentExtensions::ContentExtensionStyleSheet::ContentExtensionStyleSheet): Updated to pass a Node reference and not pointer.
3002 * css/CSSStyleSheet.cpp:
3003 (WebCore::CSSStyleSheet::create): Makes origin flag undefined if boolean parameter is not passed.
3004 Otherwise origin flag is set according given boolean value.
3005 (WebCore::CSSStyleSheet::createInline): Makes origin flag set to true.
3006 (WebCore::CSSStyleSheet::CSSStyleSheet): Adding origin flag initialization.
3007 (WebCore::CSSStyleSheet::canAccessRules): Returning according the origin flag if set.
3008 Returning as before in case the flag is not set.
3009 * css/CSSStyleSheet.h: Adding origin clean flag.
3010 * dom/ExtensionStyleSheets.cpp:
3011 (WebCore::ExtensionStyleSheets::addUserStyleSheet):
3012 (WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting):
3013 (WebCore::ExtensionStyleSheets::maybeAddContentExtensionSheet):
3014 * html/HTMLLinkElement.cpp:
3015 (WebCore::HTMLLinkElement::initializeStyleSheet): Helper routine used in setCSSStyleSheet.
3016 Sets origin clean flag if the resource is clean.
3017 (WebCore::HTMLLinkElement::setCSSStyleSheet): Making use of initializeStyleSheet.
3018 * html/HTMLLinkElement.h:
3020 2016-09-05 Youenn Fablet <youenn@apple.com>
3022 CachedResourceLoader is not taking into account fetch options to use or not cached resources
3023 https://bugs.webkit.org/show_bug.cgi?id=161389
3025 Reviewed by Darin Adler.
3027 Tests: http/tests/fetch/fetching-same-resource-with-diffferent-options.html
3028 http/tests/security/cross-origin-cached-resource-parallel.html
3029 http/tests/security/cross-origin-cached-resource.html
3030 http/tests/security/load-image-after-redirection-2.html
3031 http/tests/security/shape-outside-and-cached-resources.html
3033 Adding CORS checks for the response in case of CORS fetch mode, in SubresourceLoader.
3034 Removing the CORS checks in Image and DocumentThreadableLoader.
3036 The direction of this patch is to make CachedResource origin-specific/fetch mode specific.
3038 This will remove the need for CachedResource clients to do CORS checks when receiving the notifyFinished call.
3039 This will also make the computation of whether a resource is clean or not much easier since the CachedResource knowd its origin and its response tainting.
3041 Removing the CORS checks at ImageLoader creates the risk of using some cached resources loaded from previously no-cors mode without doing the actual CORS check.
3042 Note that the risk was already there in case of a resource loaded through redirections.
3043 Reusing a cached resource for a load with different options also leads to bad computation of the resource tainting.
3045 As a first step, improvements are done but only for CachedImage resources.
3047 This patch limits the direct reuse of cached resources as follow:
3048 - If the request and existing resources have different origins.
3049 - If the fetch mode is different between request and existing resource.
3051 In those cases, a new CachedResource is created with the correct options and origin.
3052 The data and response of the CachedResource found in the cache are copied efficiently in the new CachedResource, if the matching CachedResource finished loading (CachedImage specific).
3054 If the matching CachedResource is still loading, we trigger a reload (with caching=false to not disturb the being loaded resource).
3055 This should be made more efficient at some point, especially if the matching CachedResource already has its response set.
3057 This triggers a change of behavior: previously, the CORS checks were done by the ImageLoader when the resource was finished loading.
3058 The CORS checks were controlled by the crossOrigin attribute, which may be set or unset between the load start and the load end.
3060 Now the crossOrigin attribute is checked at load start. If it is set, the CORS checks will happen even if the attribute is unset before the end of the load.
3061 This is more consistent as the actual request was built with CORS enabled.
3063 * loader/CrossOriginPreflightChecker.cpp:
3064 (WebCore::CrossOriginPreflightChecker::startPreflight): Setting correctly the preflight options as per fetch spec.
3065 * loader/DocumentThreadableLoader.cpp:
3066 (WebCore::DocumentThreadableLoader::didReceiveResponse): Removing CORS check.
3067 (WebCore::DocumentThreadableLoader::loadRequest): Adding CORS check in sync mode.
3068 * loader/ImageLoader.cpp:
3069 (WebCore::ImageLoader::updateFromElement):
3070 (WebCore::ImageLoader::notifyFinished):
3071 * loader/SubresourceLoader.cpp:
3072 (WebCore::SubresourceLoader::didReceiveResponse): Adding CORS checks to the response
3073 (WebCore::SubresourceLoader::checkResponseCrossOriginAccessControl): Helper routine to do CORS checks
3074 * loader/SubresourceLoader.h:
3075 * loader/cache/CachedImage.cpp:
3076 (WebCore::CachedImage::cloneData): Responsible to set image content from another CachedImage.
3077 * loader/cache/CachedImage.h:
3078 * loader/cache/CachedResource.cpp:
3079 (WebCore::CachedResource::computeOrigin): Helper routine to set the origin and whether the resource is cross-origin or not.
3080 (WebCore::CachedResource::load): Using computeOrigin.
3081 (WebCore::CachedResource::loadFrom): Loading from a CachedResource from the same type and which finished loading.
3082 * loader/cache/CachedResource.h:
3083 (WebCore::CachedResource::cloneData):
3084 * loader/cache/CachedResourceLoader.cpp:
3085 (WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): Helper routine responsible to adapt the CachedResource
3086 that can be reused to the origin and options of a new request.
3087 (WebCore::CachedResourceLoader::requestResource): Calling updateCachedResourceWithCurrentRequest before actually returning the resource.
3088 (WebCore::CachedResourceLoader::determineRevalidationPolicy): Space clean-up.
3089 * loader/cache/CachedResourceLoader.h:
3090 * loader/cache/CachedResourceRequest.h:
3091 (WebCore::CachedResourceRequest::setCachingPolicy):
3092 * style/StylePendingResources.cpp:
3093 (WebCore::Style::loadPendingImage): Allowing data URLs for ShapeOutside data.
3095 2016-09-05 Frederic Wang <fwang@igalia.com>
3097 More refactoring of RenderMathMLScripts
3098 https://bugs.webkit.org/show_bug.cgi?id=161371
3100 Reviewed by Darin Adler.
3102 This is a follow-up of bug 161084. The function getScriptMetricsAndLayoutIfNeeded was quite
3103 complicated and it was not obvious that we have to call it twice with the same reference
3104 to a struture holding vertical metrics. We extract the part retrieving layout parameters
3105 into verticalParameters and move its layoutIfNeeded calls into layoutBlock. Then it can
3106 be reduced to a simple function that retrieve the vertical metrics in one call.
3107 We also improve getBaseAndScripts to make clear that it is performing validation. It returns
3108 a ReferenceChildren structure encapsulating pointers to important children so that we no
3109 longer pass these pointers as function parameters. We continue to need them to browse the
3110 list of prescripts & postscripts but we refactor a bit the loop to avoid explicit mention
3113 No new tests, already covered by existing tests.
3115 * rendering/mathml/RenderMathMLScripts.cpp:
3116 (WebCore::RenderMathMLScripts::validateAndGetReferenceChildren): We now store the pointers to
3117 the base, firstPostScript and firstPreScript children in the ReferenceChildren structure. We
3118 also add a pointer to the prescriptDelimiter for convenience.
3119 (WebCore::RenderMathMLScripts::italicCorrection): Use the ReferenceChildren structure so that
3120 we are sure the base has been validated before calling this function.
3121 (WebCore::RenderMathMLScripts::computePreferredLogicalWidths): Retrieve the reference
3122 children with validateAndGetReferenceChildren instead of calling getBaseAndScripts and use
3123 ReferenceChildren to handle these children and to call italicCorrection. The loops for
3124 SubSup, UnderOver, Multiscripts are also rewritten a bit to avoid declaring a null RenderBox*
3125 outside of them and hence allow to use auto.
3126 (WebCore::RenderMathMLScripts::verticalParameters): This part to extract the layout
3127 parameters is extracted from getScriptMetricsAndLayoutIfNeeded. The parameters are returned
3128 as a VerticalParameters struct.
3129 (WebCore::RenderMathMLScripts::verticalMetrics): This is the remaining part of
3130 getScriptMetricsAndLayoutIfNeeded It used to call layoutIfNeeded on children and to
3131 calculate maximum vertical metrics. For Multiscripts it was called twice: We did a first
3132 call to handle the prescripts and then pass the result again in the second call to handle
3133 the postscripts. We modify a bit the loop so that all the scripts are handled in one call and
3134 hence we can directly return a VerticalMetrics. Again, the reference children are now handled
3135 using the ReferenceChildren structure passed as a parameter.
3136 (WebCore::RenderMathMLScripts::layoutBlock): We retrieve the reference children with
3137 validateAndGetReferenceChildren instead of calling getBaseAndScripts and use
3138 ReferenceChildren to handle these children and to call italicCorrection. We layout all the
3139 children if needed in one loop at the beginning instead of doing that when their vertical
3140 metrics are needed. We can now also retrieve vertical metrics with a single call.
3141 (WebCore::RenderMathMLScripts::getBaseAndScripts): Renamed validateAndGetReferenceChildren.
3142 (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded): Deleted. Split into
3143 verticalParameters and verticalMetrics.
3144 * rendering/mathml/RenderMathMLScripts.h: New structure to handle the pointers to reference
3145 children. Update the signature of getBaseAndScripts to use this struture and give a clearer
3146 name. Update the signature of italicCorrection to use this structure too. Add a new structure
3147 VerticalParameters and declare the helper function to retrieve them. Rename ScriptMetrics
3148 to VerticalMetrics and update the signature of the function needed to retrieve it.
3150 2016-09-05 Zan Dobersek <zdobersek@igalia.com>
3152 MediaPlayerPrivateGStreamerBase: improve build guards in nativeImageForCurrentTime()
3153 https://bugs.webkit.org/show_bug.cgi?id=161594
3155 Reviewed by Philippe Normand.
3157 Guard the uses of cairo-gl API in nativeImageForCurrentTime() with the
3158 USE(CAIRO) && ENABLE(ACCELERATED_2D_CANVAS) pair of build guards. This
3159 API is only made available when the ACCELERATED_2D_CANVAS option is
3160 enabled. Placing the guards this way thus avoids compilation errors
3161 when compiling USE_GSTREAMER_GL code without the accelerated 2D canvas
3164 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3165 (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
3167 2016-09-04 Sam Weinig <sam@webkit.org>
3169 Remove the CREATE_DOM_WRAPPER macro
3170 https://bugs.webkit.org/show_bug.cgi?id=161580
3172 Reviewed by Dan Bernstein.
3174 The CREATE_DOM_WRAPPER has irritated me for too long! Replace it
3175 with direct calls to createWrapper<ImplementationType>, which has
3176 been upgraded to not require specifying both the implementation type
3177 and the wrapper type by way of the new JSDOMWrapperConverterTraits
3178 struct which provides mapping from ImplementationType -> JSWrapper.
3179 createWrapper<ImplementationType> has also been upgraded to have a
3180 specialization for when the object being passed in needs to be casted.
3182 * bindings/js/JSAnimationTimelineCustom.cpp:
3183 (WebCore::toJSNewlyCreated):
3184 * bindings/js/JSBlobCustom.cpp:
3185 (WebCore::toJSNewlyCreated):
3186 (WebCore::constructJSBlob):
3187 * bindings/js/JSCSSRuleCustom.cpp:
3188 (WebCore::toJSNewlyCreated):
3189 * bindings/js/JSCSSValueCustom.cpp:
3190 (WebCore::toJSNewlyCreated):
3191 * bindings/js/JSDataCueCustom.cpp:
3192 (WebCore::constructJSDataCue):
3193 * bindings/js/JSDocumentCustom.cpp:
3194 (WebCore::createNewDocumentWrapper):
3195 * bindings/js/JSDocumentFragmentCustom.cpp:
3196 (WebCore::toJSNewlyCreated):
3197 * bindings/js/JSElementCustom.cpp:
3198 (WebCore::createNewElementWrapper):
3199 * bindings/js/JSEventCustom.cpp:
3200 (WebCore::toJSNewlyCreated):
3201 * bindings/js/JSFileCustom.cpp:
3202 (WebCore::constructJSFile):
3203 * bindings/js/JSHTMLCollectionCustom.cpp:
3204 (WebCore::toJSNewlyCreated):
3205 * bindings/js/JSHTMLDocumentCustom.cpp:
3206 (WebCore::toJSNewlyCreated):
3207 * bindings/js/JSIDBCursorCustom.cpp:
3208 (WebCore::toJSNewlyCreated):
3209 * bindings/js/JSImageDataCustom.cpp:
3210 (WebCore::toJSNewlyCreated):
3211 * bindings/js/JSNodeCustom.cpp:
3212 (WebCore::createWrapperInline):
3213 * bindings/js/JSNodeListCustom.cpp:
3214 (WebCore::createWrapper):
3215 * bindings/js/JSPerformanceEntryCustom.cpp:
3216 (WebCore::toJSNewlyCreated):
3217 * bindings/js/JSSVGPathSegCustom.cpp:
3218 (WebCore::toJSNewlyCreated):
3219 * bindings/js/JSStyleSheetCustom.cpp:
3220 (WebCore::toJSNewlyCreated):
3221 * bindings/js/JSTextCustom.cpp:
3222 (WebCore::toJSNewlyCreated):
3223 * bindings/js/JSTextTrackCueCustom.cpp:
3224 (WebCore::toJSNewlyCreated):
3225 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
3226 (WebCore::toJSNewlyCreated):
3227 * bindings/js/JSXMLDocumentCustom.cpp:
3228 (WebCore::toJSNewlyCreated):
3229 * dom/make_names.pl:
3230 (printWrapperFunctions):
3231 (printWrapperFactoryCppFile):
3232 Replace CREATE_DOM_WRAPPER with direct calls to createWrapper.
3234 * bindings/js/JSWorkerGlobalScopeBase.h:
3235 Add #include of JSDOMWrapper.h to allow generated subclasses to use
3236 JSDOMWrapperConverterTraits.
3238 * bindings/js/JSDOMBinding.h:
3239 (WebCore::castDOMObjectForWrapperCreation): Deleted.
3240 Remove CREATE_DOM_WRAPPER and castDOMObjectForWrapperCreation and
3241 specialize createWrapper.
3243 * bindings/js/JSDOMWrapper.h:
3244 Forward declare JSDOMWrapperConverterTraits.
3246 * bindings/scripts/CodeGeneratorJS.pm:
3248 Add specialization of JSDOMWrapperConverterTraits for each header.
3250 (GenerateImplementation):
3251 (GenerateConstructorDefinition):
3252 Replace CREATE_DOM_WRAPPER with direct calls to createWrapper.
3254 2016-09-04 Antti Koivisto <antti@apple.com>
3256 Remove Style::PendingResources
3257 https://bugs.webkit.org/show_bug.cgi?id=161574
3259 Reviewed by Andreas Kling.
3261 RenderStyle contains all the information needed to initialize resource loads. There is no need for this side structure.
3263 * css/CSSFilterImageValue.cpp:
3264 (WebCore::CSSFilterImageValue::loadSubimages):
3266 Load external SVG resources along with any image resources.
3268 * css/CSSToStyleMap.cpp:
3269 (WebCore::CSSToStyleMap::styleImage):
3270 (WebCore::CSSToStyleMap::mapFillImage):
3271 (WebCore::CSSToStyleMap::mapNinePieceImage):
3272 * css/CSSToStyleMap.h:
3273 * css/StyleBuilderConverter.h:
3274 (WebCore::StyleBuilderConverter::convertStyleImage):
3275 (WebCore::StyleBuilderConverter::convertShapeValue):
3276 * css/StyleBuilderCustom.h:
3277 (WebCore::StyleBuilderCustom::applyValueCursor):
3278 (WebCore::StyleBuilderCustom::applyValueContent):
3279 * css/StyleResolver.cpp:
3280 (WebCore::StyleResolver::State::clear):
3281 (WebCore::StyleResolver::styleImage):
3282 (WebCore::StyleResolver::createFilterOperations):
3283 (WebCore::StyleResolver::loadPendingResources):
3284 (WebCore::StyleResolver::State::ensurePendingResources): Deleted.
3285 (WebCore::StyleResolver::styleCachedImageFromValue): Deleted.
3286 (WebCore::StyleResolver::styleGeneratedImageFromValue): Deleted.
3287 * css/StyleResolver.h:
3288 (WebCore::StyleResolver::State::takePendingResources): Deleted.
3289 * platform/graphics/filters/FilterOperation.cpp:
3290 (WebCore::ReferenceFilterOperation::loadExternalDocumentIfNeeded):
3291 (WebCore::ReferenceFilterOperation::getOrCreateCachedSVGDocumentReference): Deleted.
3292 * platform/graphics/filters/FilterOperation.h:
3293 (WebCore::ReferenceFilterOperation::cachedSVGDocumentReference):
3294 * rendering/style/StyleCachedImage.cpp:
3295 (WebCore::StyleCachedImage::StyleCachedImage):
3296 * style/StylePendingResources.cpp:
3297 (WebCore::Style::loadPendingResources):
3299 Trigger resource loads by checking pending resources in RenderStyle unconditionally. Keeping track of them
3300 separately wasn't necessary or a meaningful optimization.
3302 (WebCore::Style::loadPendingImages): Deleted.
3303 (WebCore::Style::loadPendingSVGFilters): Deleted.
3304 * style/StylePendingResources.h:
3306 2016-09-04 Antti Koivisto <antti@apple.com>
3308 Reverse ownership relation of StyleCachedImage and CSSImageValue
3309 https://bugs.webkit.org/show_bug.cgi?id=161447
3311 Reviewed by Andreas Kling.
3313 Currently StyleCachedImage (which represents an image in RenderStyle) has a weak ref to the
3314 underlying CSSImageValue/CSSImageSetValue which actually owns it. This is awkwards especially since
3315 StyleGeneratedImage, the other StyleImage subclass has reversed relationship where it refs
3316 the underlying CSSImageGeneratorValue.
3318 This patch makes StyleCachedImage similar to StyleGeneratedImage. StyleCachedImage now refs the
3319 underlying CSSImageValue/CSSImageSetValue. CSSImageValues no longer need to know about StyleCachedImage.
3320 Instead they reference CachedImages (memory cache objects) directly. StyleCachedImage instances are now
3321 conceptually unique to RenderStyle instances. Actual resources are shared as before by sharing CachedImages.
3323 * css/CSSCursorImageValue.cpp:
3324 (WebCore::CSSCursorImageValue::loadImage):
3325 (WebCore::CSSCursorImageValue::cachedImage):
3326 (WebCore::CSSCursorImageValue::styleImage): Deleted.
3327 * css/CSSCursorImageValue.h:
3328 * css/CSSImageGeneratorValue.cpp:
3329 (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
3330 * css/CSSImageSetValue.cpp:
3331 (WebCore::CSSImageSetValue::~CSSImageSetValue):
3332 (WebCore::CSSImageSetValue::loadBestFitImage):
3333 (WebCore::CSSImageSetValue::traverseSubresources):
3334 (WebCore::CSSImageSetValue::styleImage): Deleted.
3335 * css/CSSImageSetValue.h:
3336 * css/CSSImageValue.cpp:
3337 (WebCore::CSSImageValue::CSSImageValue):
3338 (WebCore::CSSImageValue::~CSSImageValue):
3339 (WebCore::CSSImageValue::isPending):
3340 (WebCore::CSSImageValue::loadImage):
3341 (WebCore::CSSImageValue::traverseSubresources):
3342 (WebCore::CSSImageValue::knownToBeOpaque):
3343 (WebCore::CSSImageValue::styleImage): Deleted.
3344 * css/CSSImageValue.h:
3345 * css/StyleBuilderCustom.h:
3346 (WebCore::StyleBuilderCustom::applyValueContent):
3347 * css/StyleResolver.cpp:
3348 (WebCore::StyleResolver::styleImage):
3349 (WebCore::StyleResolver::styleCachedImageFromValue):
3350 (WebCore::StyleResolver::styleGeneratedImageFromValue):
3351 (WebCore::StyleResolver::cachedOrPendingFromValue): Deleted.
3352 (WebCore::StyleResolver::generatedOrPendingFromValue): Deleted.
3353 (WebCore::StyleResolver::setOrPendingFromValue): Deleted.
3354 (WebCore::StyleResolver::cursorOrPendingFromValue): Deleted.
3355 * css/StyleResolver.h:
3356 * editing/TextIterator.cpp:
3357 (WebCore::fullyClipsContents):
3358 * page/PageSerializer.cpp:
3359 (WebCore::PageSerializer::retrieveResourcesForProperties):
3360 * rendering/style/FillLayer.cpp:
3361 (WebCore::FillLayer::imagesIdentical):
3363 Compare data equality instead of pointer equality for StyleImages (since StyleImages are no longer shared).
3365 (WebCore::layerImagesIdentical): Deleted.
3366 * rendering/style/StyleCachedImage.cpp:
3367 (WebCore::StyleCachedImage::StyleCachedImage):
3368 (WebCore::StyleCachedImage::~StyleCachedImage):
3369 (WebCore::StyleCachedImage::cachedImage):
3370 (WebCore::StyleCachedImage::cssValue):
3371 (WebCore::StyleCachedImage::canRender):
3372 (WebCore::StyleCachedImage::isPending):
3373 (WebCore::StyleCachedImage::isLoaded):
3374 (WebCore::StyleCachedImage::errorOccurred):
3375 (WebCore::StyleCachedImage::imageSize):
3376 (WebCore::StyleCachedImage::imageHasRelativeWidth):
3377 (WebCore::StyleCachedImage::imageHasRelativeHeight):
3378 (WebCore::StyleCachedImage::computeIntrinsicDimensions):
3379 (WebCore::StyleCachedImage::usesImageContainerSize):
3380 (WebCore::StyleCachedImage::setContainerSizeForRenderer):
3381 (WebCore::StyleCachedImage::addClient):
3382 (WebCore::StyleCachedImage::removeClient):
3383 (WebCore::StyleCachedImage::image):
3384 (WebCore::StyleCachedImage::knownToBeOpaque):
3385 (WebCore::StyleCachedImage::setCachedImage): Deleted.
3386 * rendering/style/StyleCachedImage.h:
3388 2016-09-03 Wenson Hsieh <wenson_hsieh@apple.com>
3390 Media controls behave strangely when videos mute from within a playing handler
3391 https://bugs.webkit.org/show_bug.cgi?id=161559
3392 <rdar://problem/28018438>
3394 Reviewed by Darin Adler.
3396 Defer showing media controls until after the media element has fired its onplaying handler. This handles cases
3397 where videos that autoplay may initially meet the criteria for main content, but once the video begins to play,
3398 the page may change the media in some way (e.g. muting) that makes the video no longer main content. This causes
3399 media controls to flicker in and out.
3401 These changes are covered by existing unit tests, which have been refactored to check media controller state
3402 after all autoplaying videos have begun playing. Also adds an additional unit test.
3404 * html/HTMLMediaElement.cpp:
3405 (WebCore::HTMLMediaElement::notifyAboutPlaying):
3406 (WebCore::HTMLMediaElement::hasEverNotifiedAboutPlaying):
3407 * html/HTMLMediaElement.h:
3408 * html/MediaElementSession.cpp:
3409 (WebCore::MediaElementSession::canShowControlsManager):
3411 2016-09-03 Ryosuke Niwa <rniwa@webkit.org>
3413 Update the semantics of defined-ness of custom elements per spec changes
3414 https://bugs.webkit.org/show_bug.cgi?id=161570
3416 Reviewed by Darin Adler.
3418 This patch adds the notion of a custom element that failed to construct or upgrade so that :defined
3419 doesn't apply to such an element. We also set the defined flag inside the HTMLElement constructor in
3420 the case of synchronous construction instead of waiting for the custom element constructor to finish.
3421 https://dom.spec.whatwg.org/#concept-create-element
3423 Conceptually, there are four distinct states for an element:
3424 1. The element is a built-in element
3425 2. The element is a custom element yet to be defined (an upgrade candidate).
3426 3. The element is a well-defined custom element (constructed or upgraded).
3427 4. The element has failed to construct or upgrade as a custom element (because the custom element
3428 constructor threw an exception or returned an unexpected object).
3430 In the latest DOM/HTML specifications, these states are called as 1. "uncustomized", 2. "undefined",
3431 3. "custom", and 4. "failed": https://dom.spec.whatwg.org/#concept-element-defined
3433 This patch refactors Node flags to introduce these distinct states as the following:
3434 1. Neither IsCustomElement nor IsEditingTextOrUnresolvedCustomElementFlag is set.
3435 2. IsCustomElement and IsEditingTextOrUnresolvedCustomElementFlag are set.
3436 isCustomElementUpgradeCandidate() and isUndefinedCustomElement() return true.
3437 3. IsCustomElement is set and IsEditingTextOrUnresolvedCustomElementFlag is unset.
3438 isDefinedCustomElement() returns true.
3439 4. IsCustomElement is unset and IsEditingTextOrUnresolvedCustomElementFlag is set.
3440 isFailedCustomElement() and isUndefinedCustomElement() return true.
3442 Per a spec change, this patch also makes :defined applied to a synchronously constructed custom element
3443 immediately after super() call in the constructor. When the constructor throws an exception or fails to
3444 return the right element, the HTML parser marks the fallback element with setIsUndefinedCustomElement.
3446 Tests: fast/custom-elements/defined-pseudo-class.html
3447 fast/custom-elements/defined-rule.html
3448 fast/custom-elements/upgrading/Node-cloneNode.html
3450 * bindings/js/JSCustomElementInterface.cpp:
3451 (WebCore::JSCustomElementInterface::constructElement): Don't set :defined flag here since that's done
3452 in the HTMLElement constructor now.
3453 (WebCore::JSCustomElementInterface::upgradeElement): Mark the element as failed-to-upgrade as needed.
3454 * bindings/js/JSElementCustom.cpp:
3455 (WebCore::toJSNewlyCreated):
3456 * bindings/js/JSHTMLElementCustom.cpp:
3457 (WebCore::constructJSHTMLElement):
3458 * css/SelectorCheckerTestFunctions.h:
3459 (WebCore::isDefinedElement):
3460 * dom/CustomElementReactionQueue.cpp:
3461 (WebCore::CustomElementReactionQueue::enqueueElementUpgradeIfDefined): Enqueue custom element reactions
3462 only if the element is well defined (successfully constructed or upgraded).
3463 (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded): Ditto.
3464 (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded): Ditto.
3465 (WebCore::CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded): Ditto.
3466 (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded): Ditto.
3467 * dom/CustomElementRegistry.cpp:
3468 (WebCore::enqueueUpgradeInShadowIncludingTreeOrder):
3470 (WebCore::createUpgradeCandidateElement):
3471 (WebCore::createFallbackHTMLElement):
3473 (WebCore::Element::attributeChanged):
3474 (WebCore::Element::didMoveToNewDocument):
3475 (WebCore::Element::insertedInto):
3476 (WebCore::Element::removedFrom):
3477 (WebCore::Element::setCustomElementIsResolved): Deleted.
3478 (WebCore::Element::setIsDefinedCustomElement): Renamed from setCustomElementIsResolved.
3479 (WebCore::Element::setIsFailedCustomElement): Added.
3480 (WebCore::Element::setIsCustomElementUpgradeCandidate): Added.
3481 (WebCore::Element::customElementInterface):
3484 (WebCore::Node::setIsCustomElement): Deleted.
3485 (WebCore::Node::isUndefinedCustomElement): Renamed from isUnresolvedCustomElement.
3486 (WebCore::Node::setIsUnresolvedCustomElement): Deleted.
3487 (WebCore::Node::isCustomElementUpgradeCandidate): Added.
3488 (WebCore::Node::isDefinedCustomElement): Renamed from isCustomElement.
3489 (WebCore::Node::isFailedCustomElement): Added.
3490 * dom/make_names.pl:
3491 (printWrapperFactoryCppFile): Use the HTMLElement wrapper on upgrade candidates. When a custom element
3492 failed to upgrade, the HTMLElement constructor would have created the wrapper so we never run this code.
3493 * html/parser/HTMLConstructionSite.cpp:
3494 (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
3495 * html/parser/HTMLDocumentParser.cpp:
3496 (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Mark the HTMLUnknownElement created when
3497 the custom element constructor failed to run successfully as a failed custom element so that :define
3498 wouldn't apply to this element.
3500 2016-09-03 Wenson Hsieh <wenson_hsieh@apple.com>
3502 Refactor the heuristic for showing media controls to take all media sessions into account
3503 https://bugs.webkit.org/show_bug.cgi?id=161503
3504 <rdar://problem/28033783>
3506 Reviewed by Darin Adler.
3508 Currently, when selecting a media session to show playback controls for, we grab the first media session that
3509 passes our heuristic. Using this method, we are unable to take additional factors into account, such as whether
3510 another media session's element is scrolled in view, or if another media session has been interacted with more
3511 recently. To address this, we make the following changes:
3513 1. Consider the list of all MediaElementSessions.
3515 2. Select only the MediaElementSessions capable of showing media controls and sort the list by a special
3516 heuristic that takes visibility and time of last user interaction into account. The first element on
3517 this list is the strongest candidate for main content.
3519 3. If this strongest candidate is visible in the viewport, or it is playing with audio, we return this
3520 as the chosen candidate. Otherwise, we return this session only if no other non-candidate video could be
3521 confused as the main content (i.e. the non-candidate video is not only visible in the viewport, but also
3522 large enough to be considered main content).
3524 Using this new method of determining the video to show controls for, we retain previous behavior for pages with
3525 a single video. On pages with multiple videos, the above logic ensures that if the current controlled video is
3526 paused, scrolled out of view, and then a new video is scrolled into view, we will either hide media controls to
3527 avoid confusion if that video could be confused for main content (using the mechanism in step 3), or we
3528 hook up the media controls to the new video if it satisfies main content (using the mechanism in step 2).
3530 This patch also adds 6 new TestWebKitAPI unit tests.
3532 * html/HTMLMediaElement.cpp:
3533 (WebCore::mediaElementSessionInfoForSession):
3534 (WebCore::preferMediaControlsForCandidateSessionOverOtherCandidateSession):
3535 (WebCore::mediaSessionMayBeConfusedWithMainContent):
3536 (WebCore::bestMediaSessionForShowingPlaybackControlsManager):
3537 (WebCore::HTMLMediaElement::didAttachRenderers):
3538 (WebCore::HTMLMediaElement::layoutSizeChanged):
3539 (WebCore::HTMLMediaElement::isVisibleInViewportChanged):
3540 (WebCore::HTMLMediaElement::resetPlaybackSessionState):
3541 (WebCore::HTMLMediaElement::isVisibleInViewport):
3542 (WebCore::HTMLMediaElement::updatePlaybackControlsManager):
3543 * html/HTMLMediaElement.h:
3544 * html/MediaElementSession.cpp:
3545 (WebCore::MediaElementSession::removeBehaviorRestriction):
3546 (WebCore::MediaElementSession::canShowControlsManager):
3547 (WebCore::MediaElementSession::isLargeEnoughForMainContent):
3548 (WebCore::MediaElementSession::mostRecentUserInteractionTime):
3549 (WebCore::MediaElementSession::wantsToObserveViewportVisibilityForMediaControls):
3550 (WebCore::MediaElementSession::wantsToObserveViewportVisibilityForAutoplay):
3551 (WebCore::MediaElementSession::resetPlaybackSessionState):
3552 (WebCore::MediaElementSession::canControlControlsManager): Deleted.
3553 * html/MediaElementSession.h:
3554 * platform/audio/PlatformMediaSession.h:
3555 (WebCore::PlatformMediaSession::resetPlaybackSessionState):
3556 (WebCore::PlatformMediaSession::canControlControlsManager): Deleted.
3557 * platform/audio/PlatformMediaSessionManager.cpp:
3558 (WebCore::PlatformMediaSessionManager::currentSessionsMatching):
3559 (WebCore::PlatformMediaSessionManager::currentSessionMatching): Deleted.
3560 * platform/audio/PlatformMediaSessionManager.h:
3561 * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
3562 (WebPlaybackSessionModelMediaElement::setMediaElement):
3564 2016-09-03 Darin Adler <darin@apple.com>
3566 Streamline DOMImplementation, and move it to our new DOM exception system
3567 https://bugs.webkit.org/show_bug.cgi?id=161295
3569 Reviewed by Ryosuke Niwa.
3571 * WebCore.xcodeproj/project.pbxproj: Added new headers to project.
3573 * bindings/js/JSDOMBinding.h:
3574 (WebCore::toJS): Added an overload for ExceptionOr<>; this handles the
3575 exception case here so it doesn't need to be handled in generated code
3576 for the binding. Implemented here so that ExceptionOr.h does not know
3577 about bindings. But since this is a template, it will only compile when
3578 instantiated and there is no need to include ExceptionOr.h and indirectly
3579 the Variant.h header in this header.
3580 (WebCore::toJSNewlyCreated): Ditto.
3582 * bindings/scripts/CodeGeneratorJS.pm:
3583 (GenerateCallbackImplementation): Refer to JSC::Exception with explicit
3584 namespace to avoid ambiguity with WebCore::Exception.
3586 * dom/DOMImplementation.cpp:
3587 (WebCore::DOMImplementation::createDocumentType): Changed to return
3589 (WebCore::createXMLDocument): Added. Helper used in createDocument.
3590 (WebCore::DOMImplementation::getInterface): Deleted. This was unused.
3591 (WebCore::DOMImplementation::createDocument): Changed to return
3593 (WebCore::DOMImplementation::createCSSStyleSheet): Removed the unused
3594 ExceptionCode out argument.
3595 (WebCore::isValidXMLMIMETypeChar): Deleted. Moved to MIMETypeRegistry.
3596 (WebCore::DOMImplementation::isXMLMIMEType): Ditto.
3597 (WebCore::DOMImplementation::isTextMIMEType): Ditto.
3599 * dom/DOMImplementation.h: Changed functions as described above to
3600 return ExceptionOr values. Also removed unused getInterface function,
3601 and isXMLMIMEType and isTextMIMEType, which both moved to the
3602 MIMETypeRegistry class alongside all the other similar MIME type
3605 * dom/DOMImplementation.idl: Reorganized this to match the IDL files
3606 in the specifications a little better. Also removed [RaisesException]
3607 since that is only needed for the old legacy ExceptionCode& style.
3610 (WebCore::Document::setXMLVersion): Removed call to the
3611 DOMImplementation::hasFeature function since the values passed in
3612 unconditionally result in the return value "true". This is left over
3613 either from specification language, or from an ancient version of this
3614 code that worked in a "no XML supported" mode.
3615 (WebCore::Document::setXMLStandalone): Ditto.
3617 * dom/Document.h: Removed the ExceptionCode& out argument from setXMLStandalone.
3618 * dom/Document.idl: Removed [SetterRaisesException] from xmlStandalone.
3620 * dom/Exception.h: Added.
3621 * dom/ExceptionOr.h: Added.
3623 * html/HTMLTemplateElement.cpp: Removed unneeded include of DOMImplementation.h.
3625 * inspector/InspectorPageAgent.cpp:
3626 (WebCore::createXHRTextDecoder): Use isXMLMIMEType in its new location in
3628 * inspector/NetworkResourcesData.cpp:
3629 (WebCore::createOtherResourceTextDecoder): Ditto.
3631 * loader/FrameLoader.cpp: Removed unneeded include of DOMImplementation.h.
3633 * loader/TextResourceDecoder.cpp:
3634 (WebCore::TextResourceDecoder::determineContentType): Use isXMLMIMEType in its
3635 new location in MIMETypeRegistry.
3637 * platform/MIMETypeRegistry.cpp:
3638 (WebCore::MIMETypeRegistry::isTextMIMEType): Added. Moved here from
3640 (WebCore::isValidXMLMIMETypeChar): Ditto.
3641 (WebCore::MIMETypeRegistry::isXMLMIMEType): Ditto.
3643 * platform/MIMETypeRegistry.h: Added isXMLMIMEType and isTextMIMEType.
3644 Made isUnsupportedTextMIMEType private.
3646 * svg/SVGElement.cpp:
3647 (WebCore::SVGElement::isSupported): Deleted. This function was never called.
3648 * svg/SVGElement.h: Updated for the above change.
3650 * xml/XMLHttpRequest.cpp:
3651 (WebCore::XMLHttpRequest::responseIsXML): Use isXMLMIMEType in its new
3652 location in MIMETypeRegistry.
3654 * xml/parser/XMLDocumentParserLibxml2.cpp:
3655 (WebCore::XMLDocumentParser::startDocument): Updated since setXMLStandalone
3656 no longer can raise an exception.
3658 2016-09-03 Ryosuke Niwa <rniwa@webkit.org>
3660 Unbreak customElements.whenDefined after r205383 with a crash fix
3661 https://bugs.webkit.org/show_bug.cgi?id=161562
3663 Reviewed by Darin Adler.
3665 The crash was caused by DeferredWrapper::contextDestroyed not calling ContextDestructionObserver::contextDestroyed.
3667 This caused m_scriptExecutionContext to not being set to nullptr when the Document was destroyed before DOMWindow
3668 during a single GC sweeping, and resulted in a use-after-free in ContextDestructionObserver's destructor.
3670 Fixed the crash and reverted r205383.
3672 Tests: fast/custom-elements/CustomElementRegistry.html
3674 * bindings/js/JSCustomElementRegistryCustom.cpp:
3675 (WebCore::whenDefinedPromise):
3676 * bindings/js/JSDOMPromise.cpp:
3677 (WebCore::DeferredWrapper::contextDestroyed): Fixed the crash.
3678 * dom/CustomElementRegistry.cpp:
3679 (WebCore::CustomElementRegistry::addElementDefinition):
3680 * dom/CustomElementRegistry.h:
3681 (WebCore::CustomElementRegistry::promiseMap):
3683 2016-09-03 Chris Dumez <cdumez@apple.com>
3685 Align cross-Origin Object.getOwnPropertyNames() with the HTML specification
3686 https://bugs.webkit.org/show_bug.cgi?id=161457
3688 Reviewed by Darin Adler.
3690 Align cross-Origin Object.getOwnPropertyNames() with the HTML specification:
3691 - https://html.spec.whatwg.org/#windowproxy-ownpropertykeys
3692 - https://html.spec.whatwg.org/#location-ownpropertykeys
3693 - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
3695 We should list cross origin properties.
3697 Firefox complies with the specification. However, WebKit was returning an
3698 empty array and logs a security error message.
3700 No new tests, updated existing test.
3702 * bindings/js/JSDOMWindowCustom.cpp:
3703 (WebCore::addCrossOriginPropertyNames):
3704 (WebCore::JSDOMWindow::getOwnPropertyNames):
3705 * bindings/js/JSLocationCustom.cpp:
3706 (WebCore::addCrossOriginPropertyNames):
3707 (WebCore::JSLocation::getOwnPropertyNames):
3709 2016-09-03 Frédéric Wang <fwang@igalia.com>
3711 Constructors of MathML renderers should only accept MathMLPresentationElement-derived classes
3712 https://bugs.webkit.org/show_bug.cgi?id=161378
3714 Reviewed by Darin Adler.
3716 We update constructors of RenderMathMLBlock, to only accept MathMLPresentationElement
3717 instances as a parameter. Similarly, we make the constructor of RenderMathMLToken only
3718 accept MathMLTokenElement instances.
3720 No new tests, behavior is unchanged.
3722 * rendering/mathml/RenderMathMLBlock.cpp:
3723 (WebCore::RenderMathMLBlock::RenderMathMLBlock):
3724 * rendering/mathml/RenderMathMLBlock.h:
3725 * rendering/mathml/RenderMathMLToken.cpp:
3726 (WebCore::RenderMathMLToken::RenderMathMLToken):
3727 * rendering/mathml/RenderMathMLToken.h:
3729 2016-09-03 Brian Weinstein <bweinstein@apple.com>
3731 Consult with the FrameLoaderClient about whether or not content extensions should be enabled when loading this URL.
3732 https://bugs.webkit.org/show_bug.cgi?id=161441
3734 Reviewed by Darin Adler.
3736 * loader/DocumentLoader.cpp:
3737 (WebCore::DocumentLoader::startLoadingMainResource): If content extensions aren't already disabled, consult with the
3738 FrameLoaderClient about whether or not we should use content extensions for this URL.
3739 * loader/FrameLoaderClient.h: Add the FrameLoaderClient call to determine if we should use content extensions for a given
3741 * loader/EmptyClients.h: ... And add a stub implementation.
3743 2016-09-03 Michael Catanzaro <mcatanzaro@igalia.com>
3745 Silence -Wparentheses warning triggered by r205266
3750 (WebCore::URL::URL):
3752 2016-09-03 Joseph Pecoraro <pecoraro@apple.com>
3754 Use ASCIILiteral in some more places
3755 https://bugs.webkit.org/show_bug.cgi?id=161557
3757 Reviewed by Darin Adler.
3759 * Modules/indexeddb/IDBDatabaseException.cpp:
3760 (WebCore::IDBDatabaseException::getErrorName):
3761 (WebCore::IDBDatabaseException::getErrorDescription):
3762 * Modules/websockets/WebSocket.cpp:
3763 (WebCore::WebSocket::binaryType):
3765 (WebCore::FontFace::stretch):
3766 (WebCore::FontFace::unicodeRange):
3767 (WebCore::FontFace::featureSettings):
3768 * html/canvas/WebGLRenderingContextBase.cpp:
3769 * html/parser/HTMLPreloadScanner.cpp:
3770 (WebCore::TokenPreloadScanner::initiatorFor):
3771 * loader/FormSubmission.cpp:
3772 (WebCore::FormSubmission::Attributes::parseEncodingType):
3773 * page/SecurityOrigin.cpp:
3774 (WebCore::SecurityOrigin::toRawString):
3775 * platform/graphics/cg/ImageBufferCG.cpp:
3776 (WebCore::CGImageToDataURL):
3777 (WebCore::ImageBuffer::toDataURL):
3778 (WebCore::ImageDataToDataURL):
3779 * svg/graphics/SVGImage.cpp:
3780 (WebCore::SVGImage::filenameExtension):
3782 2016-09-03 Chris Dumez <cdumez@apple.com>
3784 Object.preventExtensions(window) should throw a TypeError
3785 https://bugs.webkit.org/show_bug.cgi?id=161554
3787 Reviewed by Darin Adler.
3789 Object.preventExtensions(window) should throw a TypeError.
3791 [[PreventExtensions]] should return false for Window:
3792 - https://html.spec.whatwg.org/#windowproxy-preventextensions
3794 EcmaScript says that Object.preventExtensions() should throw a TypeError
3795 if [[PreventExtension]] returns false:
3796 - https://tc39.github.io/ecma262/#sec-object.preventextensions
3798 No new tests, updated existing test.
3800 * bindings/js/JSDOMWindowCustom.cpp:
3801 (WebCore::JSDOMWindow::preventExtensions):
3803 2016-09-03 Chris Dumez <cdumez@apple.com>
3805 Align meta element http-equiv="refresh" parsing with the HTML specification
3806 https://bugs.webkit.org/show_bug.cgi?id=161543
3808 Reviewed by Darin Adler.
3810 Align meta element http-equiv="refresh" parsing with the HTML specification:
3811 - https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh
3813 Tests: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
3816 (WebCore::Document::processHttpEquiv):
3817 * html/parser/HTMLParserIdioms.cpp:
3818 (WebCore::parseHTTPRefreshInternal):
3819 (WebCore::parseMetaHTTPEquivRefresh):
3820 * html/parser/HTMLParserIdioms.h:
3821 * loader/FrameLoader.cpp:
3822 (WebCore::FrameLoader::receivedFirstData):
3823 * platform/network/HTTPParsers.cpp:
3824 (WebCore::skipWhiteSpace):
3825 (WebCore::skipEquals):
3826 (WebCore::parseHTTPRefresh):
3827 (WebCore::parseXSSProtectionHeader):
3828 (WebCore::skipValue): Deleted.
3829 * platform/network/HTTPParsers.h:
3831 2016-09-02 Myles C. Maxfield <mmaxfield@apple.com>
3833 [Cocoa] Distinguish between paint advances and base advances
3834 https://bugs.webkit.org/show_bug.cgi?id=160892
3836 Reviewed by Simon Fraser.
3838 This patch introduces the concept of a layout (or "base") advance which is distinct
3839 from a painting advance. In extremely complicated scripts such as Urdu, it is common
3840 for a glyph advance to be negative in the horizontal direction, and have large advances
3841 in the vertical direction. In particular, in cursive scripts, the glyph placement is
3842 only indirectly related to where the actual characters lie. Conceptually, these glyph
3843 locations are correct for painting, but are not correct when performing width
3846 In many text engines, glyph shaping actually can be split into two phases: adjusting
3847 advances, and then placing glyphs relative to those advances. The secondary glyph
3848 placement step is much more context-sensitive than the first step. In addition, when
3849 multiple glyphs combine to form a character, it is common for one glyph to own the
3850 full base advance for the character, and for the other glyphs in the character to
3851 have zero base advances. (Then, in the glyph placement phase, the other glyphs get
3854 Because of the context-insensitivity of the base advances, it is valuable to use
3855 these for text measurement. Then, when we want to paint, we should add in the extra
3856 origins. This dramatically improves the layout of complex fonts like Noto Nastaliq.
3858 This patch migrates WebKit to use this two-phase shaping.
3860 No new tests just yet, because I have to create a font which exercises the
3861 advanced glyph placement support.
3863 * platform/graphics/GlyphBuffer.h:
3864 (WebCore::GlyphBufferAdvance::setHeight):
3865 (WebCore::GlyphBufferAdvance::setWidth): Deleted.
3866 * platform/graphics/TextRun.h:
3867 (WebCore::TextRun::TextRun):
3868 (WebCore::TextRun::shouldDisableLayoutSpecificAdvances):
3869 (WebCore::TextRun::setShouldDisableLayoutSpecificAdvances):
3870 (WebCore::TextRun::spacingDisabled): Deleted.
3871 (WebCore::TextRun::setCharacterScanForCodePath): Deleted.
3872 * platform/graphics/cocoa/FontCascadeCocoa.mm:
3873 (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
3874 * platform/graphics/mac/ComplexTextController.cpp:
3875 (WebCore::ComplexTextController::ComplexTextController):
3876 (WebCore::ComplexTextController::offsetForPosition):
3877 (WebCore::ComplexTextController::collectComplexTextRuns):
3878 (WebCore::ComplexTextController::ComplexTextRun::setIsNonMonotonic):
3879 (WebCore::ComplexTextController::runWidthSoFarFraction):
3880 (WebCore::ComplexTextController::advance):
3881 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
3882 * platform/graphics/mac/ComplexTextController.h:
3883 (WebCore::ComplexTextController::ComplexTextRun::create):
3884 (WebCore::ComplexTextController::ComplexTextRun::baseAdvances):
3885 (WebCore::ComplexTextController::ComplexTextRun::glyphOrigins):
3886 (WebCore::ComplexTextController::useLayoutSpecificAdvances):
3887 (WebCore::ComplexTextController::finalRoundingWidth): Deleted.
3888 (WebCore::ComplexTextController::ComplexTextRun::advances): Deleted.
3889 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3891 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
3892 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
3893 * platform/spi/cocoa/CoreTextSPI.h:
3895 2016-09-02 Zalan Bujtas <zalan@apple.com>
3897 Should never be reached failure in WebCore::floatValueForLength
3898 https://bugs.webkit.org/show_bug.cgi?id=139397
3899 <rdar://problem/27704376>
3901 Reviewed by Simon Fraser.
3903 floatValueForLength can't resolve unspecified Length types. Filter them out and return 0 as if they were auto.
3905 Test: svg/css/assert-on-non-resolvable-dimension.html
3907 * svg/SVGLengthContext.cpp:
3908 (WebCore::SVGLengthContext::valueForLength):
3910 2016-09-02 Joseph Pecoraro <pecoraro@apple.com>
3912 [Mac] Remove unnecessary RetainPtr in NeverDestroyed value
3913 https://bugs.webkit.org/show_bug.cgi?id=161553
3915 Reviewed by Daniel Bates.
3917 * platform/ios/WebCoreMotionManager.mm:
3918 (+[WebCoreMotionManager sharedManager]):
3920 2016-09-02 Alex Christensen <achristensen@webkit.org>
3922 URLParser should parse file URLs
3923 https://bugs.webkit.org/show_bug.cgi?id=161556
3925 Reviewed by Tim Horton.
3927 Added new API tests.
3929 * platform/URLParser.cpp:
3930 (WebCore::isWindowsDriveLetter):
3931 (WebCore::shouldCopyFileURL):
3932 (WebCore::URLParser::parse):
3933 (WebCore::URLParser::parseHost):
3934 * platform/URLParser.h:
3936 2016-09-02 Ryosuke Niwa <rniwa@webkit.org>
3938 Add validations for a synchronously constructed custom element
3939 https://bugs.webkit.org/show_bug.cgi?id=161528
3941 Reviewed by Yusuke Suzuki.
3943 The latest DOM specification has sanity checks when creating an element with the synchronous custom elements flag set
3944 in 6.1.3 through 10:
3945 3. If result does not implement the HTMLElement interface, throw a TypeError.
3946 4. If result's attribute list is not empty, then throw a NotSupportedError.
3947 5. If result has children, then throw a NotSupportedError.
3948 6. If result's parent is not null, then throw a NotSupportedError.
3949 7. If result's node document is not document, then throw a NotSupportedError.
3950 8. If result's namespace is not the HTML namespace, then throw a NotSupportedError.
3951 9. If result's local name is not equal to localName, then throw a NotSupportedError.
3953 Add all these checks to JSCustomElementInterface::constructElement.
3955 Tests: fast/custom-elements/Document-createElement.html
3957 * bindings/js/JSCustomElementInterface.cpp:
3958 (WebCore::JSCustomElementInterface::constructElement): Report the exception thrown during parsing instead of just
3959 clearing and ignoring it.
3960 (WebCore::constructCustomElementSynchronously): Extracted out of constructElement so that we can also catch TypeError
3961 and NotSupportedError we throw in constructElement for the parser.
3963 2016-09-02 Zalan Bujtas <zalan@apple.com>
3965 ASSERT_NOT_REACHED() is touched in WebCore::valueForLength
3966 https://bugs.webkit.org/show_bug.cgi?id=123337
3967 <rdar://problem/27684121>
3969 Reviewed by Simon Fraser.
3971 Do not try to use unspecified height value while resolving logical height for table row.
3973 Test: fast/table/assert-on-non-resolvable-row-dimension.html
3975 * rendering/RenderTableCell.h:
3976 (WebCore::RenderTableCell::logicalHeightForRowSizing):
3978 2016-09-02 Ryosuke Niwa <rniwa@webkit.org>