1 2016-10-21 Jer Noble <jer.noble@apple.com>
3 CRASH in SourceBuffer::sourceBufferPrivateDidReceiveSample + 2169
4 https://bugs.webkit.org/show_bug.cgi?id=163735
6 Reviewed by Eric Carlson.
8 Test: media/media-source/media-source-sample-wrong-track-id.html
10 When SourceBuffer receives a sample in sourceBufferPrivateDidReceiveSample() containing
11 a trackID not previously seen in an initialization segment, it creates a default TrackBuffer
12 object to contain that track's samples. One of the fields in TrackBuffer, description, is
13 normally filled out when an initialization segment is received, but with this default
14 TrackBuffer, it's still null when it's checked later in sourceBufferPrivateDidReceiveSample().
16 Rather than adding a null-check on trackBuffer.description, drop any sample that has a
17 trackID which was not present during a previous initialization segment.
19 * Modules/mediasource/SourceBuffer.cpp:
20 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
22 2016-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
24 [GTK] Configures but fails to link with ENABLE_OPENGL=OFF
25 https://bugs.webkit.org/show_bug.cgi?id=163449
27 Reviewed by Michael Catanzaro.
29 Only define sharingGLContext in PlatformDisplay if EGL or GLX are enabled.
31 * platform/graphics/PlatformDisplay.cpp:
32 * platform/graphics/PlatformDisplay.h:
33 * platform/graphics/wayland/PlatformDisplayWayland.cpp:
34 (WebCore::PlatformDisplayWayland::initialize):
35 * platform/graphics/x11/PlatformDisplayX11.cpp:
36 (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
38 2016-10-20 Filip Pizlo <fpizlo@apple.com>
40 The tracking of the coarse-grain Heap state (allocating or not, collector or not, eden vs full) should respect the orthogonality between allocating and collecting
41 https://bugs.webkit.org/show_bug.cgi?id=163738
43 Reviewed by Geoffrey Garen.
45 No new tests because no change in behavior.
47 * bindings/js/GCController.cpp:
48 (WebCore::GCController::garbageCollectNow):
50 2016-10-20 Chris Dumez <cdumez@apple.com>
52 [Bindings] Start using signature->idlType instead of signature->type in the overload resolution code
53 https://bugs.webkit.org/show_bug.cgi?id=163767
55 Reviewed by Darin Adler.
57 Start using signature->idlType instead of signature->type in the overload resolution code
58 to prepare for union type support.
60 * bindings/scripts/CodeGeneratorJS.pm:
61 (ComputeEffectiveOverloadSet):
62 (AreTypesDistinguishableForOverloadResolution):
63 (GetDistinguishingArgumentIndex):
64 (GetOverloadThatMatches):
65 (GenerateOverloadedFunctionOrConstructor):
67 2016-10-20 Myles C. Maxfield <mmaxfield@apple.com>
69 Implement WebGL2 bufferData() and bufferSubData() methods
70 https://bugs.webkit.org/show_bug.cgi?id=163759
72 Reviewed by Dean Jackson.
74 These new overloads simply clip the input array buffer.
76 Test: fast/canvas/webgl/bufferData-offset-length.html
78 * html/canvas/WebGL2RenderingContext.cpp:
79 (WebCore::WebGL2RenderingContext::bufferData):
80 (WebCore::WebGL2RenderingContext::bufferSubData):
81 * html/canvas/WebGL2RenderingContext.h:
82 * html/canvas/WebGL2RenderingContext.idl:
84 2016-10-20 Chris Dumez <cdumez@apple.com>
86 "Download Linked File" context menu action should use 'download' attribute as suggested filename
87 https://bugs.webkit.org/show_bug.cgi?id=163742
88 <rdar://problem/28840734>
90 Reviewed by Darin Adler.
92 Add convenience method to HitTestResult to return the URL element's
95 * rendering/HitTestResult.cpp:
96 (WebCore::HitTestResult::URLElementDownloadAttribute):
97 * rendering/HitTestResult.h:
99 2016-10-20 Nan Wang <n_wang@apple.com>
101 AX: VoiceOver is not detecting ARIA treeview if it contains role="presentation"
102 https://bugs.webkit.org/show_bug.cgi?id=163763
104 Reviewed by Chris Fleizach.
106 Test: accessibility/mac/aria-tree-with-presentation-role.html
108 Web authors sometimes use presentation role in the aria tree to hide elements. We should
109 consider this a valid case if they specify tree items and groups correctly.
111 * accessibility/AccessibilityNodeObject.cpp:
112 (WebCore::AccessibilityNodeObject::hierarchicalLevel):
113 * accessibility/AccessibilityTree.cpp:
114 (WebCore::AccessibilityTree::nodeHasTreeItemChild):
115 (WebCore::AccessibilityTree::isTreeValid):
116 * accessibility/AccessibilityTree.h:
118 2016-10-20 Myles C. Maxfield <mmaxfield@apple.com>
120 Many WebGL functions which don't throw are marked as possibly throwing
121 https://bugs.webkit.org/show_bug.cgi?id=163747
123 Reviewed by Dean Jackson.
125 Mechanically remove the exception code.
127 No new tests because there is no behavior change.
129 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
130 (WebCore::getObjectParameter):
131 (WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
132 (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
133 (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
134 (WebCore::JSWebGLRenderingContextBase::getUniform):
135 (WebCore::dataFunctionf):
136 (WebCore::dataFunctioni):
137 (WebCore::dataFunctionMatrix):
138 * html/canvas/WebGL2RenderingContext.cpp:
139 (WebCore::WebGL2RenderingContext::texSubImage2D):
140 * html/canvas/WebGLRenderingContext.cpp:
141 (WebCore::WebGLRenderingContext::texSubImage2D):
142 * html/canvas/WebGLRenderingContextBase.cpp:
143 (WebCore::WebGLRenderingContextBase::activeTexture):
144 (WebCore::WebGLRenderingContextBase::attachShader):
145 (WebCore::WebGLRenderingContextBase::bindAttribLocation):
146 (WebCore::WebGLRenderingContextBase::bindBuffer):
147 (WebCore::WebGLRenderingContextBase::bindFramebuffer):
148 (WebCore::WebGLRenderingContextBase::bindRenderbuffer):
149 (WebCore::WebGLRenderingContextBase::bindTexture):
150 (WebCore::WebGLRenderingContextBase::bufferData):
151 (WebCore::WebGLRenderingContextBase::bufferSubData):
152 (WebCore::WebGLRenderingContextBase::compileShader):
153 (WebCore::WebGLRenderingContextBase::createShader):
154 (WebCore::WebGLRenderingContextBase::detachShader):
155 (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
156 (WebCore::WebGLRenderingContextBase::drawArrays):
157 (WebCore::WebGLRenderingContextBase::drawElements):
158 (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
159 (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
160 (WebCore::WebGLRenderingContextBase::framebufferTexture2D):
161 (WebCore::WebGLRenderingContextBase::getActiveAttrib):
162 (WebCore::WebGLRenderingContextBase::getActiveUniform):
163 (WebCore::WebGLRenderingContextBase::getAttachedShaders):
164 (WebCore::WebGLRenderingContextBase::getBufferParameter):
165 (WebCore::WebGLRenderingContextBase::getProgramParameter):
166 (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
167 (WebCore::WebGLRenderingContextBase::getRenderbufferParameter):
168 (WebCore::WebGLRenderingContextBase::getShaderParameter):
169 (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
170 (WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat):
171 (WebCore::WebGLRenderingContextBase::getShaderSource):
172 (WebCore::WebGLRenderingContextBase::getTexParameter):
173 (WebCore::WebGLRenderingContextBase::getUniform):
174 (WebCore::WebGLRenderingContextBase::getUniformLocation):
175 (WebCore::WebGLRenderingContextBase::getVertexAttrib):
176 (WebCore::WebGLRenderingContextBase::linkProgram):
177 (WebCore::WebGLRenderingContextBase::readPixels):
178 (WebCore::WebGLRenderingContextBase::shaderSource):
179 (WebCore::WebGLRenderingContextBase::videoFrameToImage):
180 (WebCore::WebGLRenderingContextBase::texImage2D):
181 (WebCore::WebGLRenderingContextBase::uniform1f):
182 (WebCore::WebGLRenderingContextBase::uniform1fv):
183 (WebCore::WebGLRenderingContextBase::uniform1i):
184 (WebCore::WebGLRenderingContextBase::uniform1iv):
185 (WebCore::WebGLRenderingContextBase::uniform2f):
186 (WebCore::WebGLRenderingContextBase::uniform2fv):
187 (WebCore::WebGLRenderingContextBase::uniform2i):
188 (WebCore::WebGLRenderingContextBase::uniform2iv):
189 (WebCore::WebGLRenderingContextBase::uniform3f):
190 (WebCore::WebGLRenderingContextBase::uniform3fv):
191 (WebCore::WebGLRenderingContextBase::uniform3i):
192 (WebCore::WebGLRenderingContextBase::uniform3iv):
193 (WebCore::WebGLRenderingContextBase::uniform4f):
194 (WebCore::WebGLRenderingContextBase::uniform4fv):
195 (WebCore::WebGLRenderingContextBase::uniform4i):
196 (WebCore::WebGLRenderingContextBase::uniform4iv):
197 (WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
198 (WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
199 (WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
200 (WebCore::WebGLRenderingContextBase::useProgram):
201 (WebCore::WebGLRenderingContextBase::validateProgram):
202 (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
203 (WebCore::WebGLRenderingContextBase::restoreCurrentFramebuffer):
204 (WebCore::WebGLRenderingContextBase::restoreCurrentTexture2D):
205 * html/canvas/WebGLRenderingContextBase.h:
206 * html/canvas/WebGLRenderingContextBase.idl:
208 2016-10-19 Myles C. Maxfield <mmaxfield@apple.com>
210 [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
211 https://bugs.webkit.org/show_bug.cgi?id=163374
213 Reviewed by Darin Adler.
215 Because of platform lack of support for variations in in-memory fonts,
216 this feature should be disabled on the affected OSes.
218 No tests because there is no behavior change (on the relevant platforms).
220 * Configurations/FeatureDefines.xcconfig:
222 2016-10-20 Brady Eidson <beidson@apple.com>
224 IndexedDB 2.0: Support IDBObjectStore name assignment.
225 <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749
227 Reviewed by Alex Christensen.
229 Tests: storage/indexeddb/modern/objectstore-rename-1-private.html
230 storage/indexeddb/modern/objectstore-rename-1.html
232 Touches a *lot* of code sites, but none of them are particularly interesting.
233 They are all just getting the new name spread out to all of the various objects that need it.
235 * Modules/indexeddb/IDBDatabase.cpp:
236 (WebCore::IDBDatabase::renameObjectStore):
237 * Modules/indexeddb/IDBDatabase.h:
239 * Modules/indexeddb/IDBObjectStore.cpp:
240 (WebCore::IDBObjectStore::setName):
241 * Modules/indexeddb/IDBObjectStore.h:
242 * Modules/indexeddb/IDBObjectStore.idl:
244 * Modules/indexeddb/IDBTransaction.cpp:
245 (WebCore::IDBTransaction::renameObjectStore):
246 (WebCore::IDBTransaction::renameObjectStoreOnServer):
247 (WebCore::IDBTransaction::didRenameObjectStoreOnServer):
248 * Modules/indexeddb/IDBTransaction.h:
250 * Modules/indexeddb/client/IDBConnectionProxy.cpp:
251 (WebCore::IDBClient::IDBConnectionProxy::renameObjectStore):
252 * Modules/indexeddb/client/IDBConnectionProxy.h:
254 * Modules/indexeddb/client/IDBConnectionToServer.cpp:
255 (WebCore::IDBClient::IDBConnectionToServer::renameObjectStore):
256 (WebCore::IDBClient::IDBConnectionToServer::didRenameObjectStore):
257 * Modules/indexeddb/client/IDBConnectionToServer.h:
258 * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
260 * Modules/indexeddb/server/IDBBackingStore.h:
262 * Modules/indexeddb/server/IDBConnectionToClient.cpp:
263 (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
264 (WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore):
265 * Modules/indexeddb/server/IDBConnectionToClient.h:
266 * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
268 * Modules/indexeddb/server/IDBServer.cpp:
269 (WebCore::IDBServer::IDBServer::renameObjectStore):
270 * Modules/indexeddb/server/IDBServer.h:
272 * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
273 (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreRenamed):
274 (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
275 * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
277 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
278 (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
279 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
281 * Modules/indexeddb/server/MemoryObjectStore.h:
282 (WebCore::IDBServer::MemoryObjectStore::rename):
284 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
285 (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
286 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
288 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
289 (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
290 (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
291 (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
292 * Modules/indexeddb/server/UniqueIDBDatabase.h:
294 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
295 (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore):
296 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
298 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
299 (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
300 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
302 * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
303 (WebCore::IDBDatabaseInfo::renameObjectStore):
304 * Modules/indexeddb/shared/IDBDatabaseInfo.h:
306 * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
307 (WebCore::IDBObjectStoreInfo::rename):
309 * Modules/indexeddb/shared/IDBResultData.cpp:
310 (WebCore::IDBResultData::renameObjectStoreSuccess):
311 * Modules/indexeddb/shared/IDBResultData.h:
313 * Modules/indexeddb/shared/InProcessIDBServer.cpp:
314 (WebCore::InProcessIDBServer::didRenameObjectStore):
315 (WebCore::InProcessIDBServer::renameObjectStore):
316 * Modules/indexeddb/shared/InProcessIDBServer.h:
318 2016-10-20 Chris Dumez <cdumez@apple.com>
320 Make table.deleteRow(-1) a no-op when there are no rows
321 https://bugs.webkit.org/show_bug.cgi?id=163746
323 Reviewed by Alex Christensen.
325 Make table.deleteRow(-1) a no-op when there are no rows, instead of throwing:
326 - https://github.com/whatwg/html/pull/1924
328 This is more consistent with the behavior of tbody.deleteRow(-1) and
329 tr.deleteCell(-1). This is also consistent with Gecko. Blink is doing the
331 - https://codereview.chromium.org/2427963004/
333 No new tests, updated existing tests.
335 * html/HTMLTableElement.cpp:
336 (WebCore::HTMLTableElement::deleteRow):
338 2016-10-20 Dave Hyatt <hyatt@apple.com>
340 [CSS Parser] Make sure to handle prefixed transform-style
341 https://bugs.webkit.org/show_bug.cgi?id=163756
343 Reviewed by Dean Jackson.
345 * css/parser/CSSParserFastPaths.cpp:
346 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
348 2016-10-20 Dave Hyatt <hyatt@apple.com>
350 [CSS Parser] Fix crash when parsing -webkit-margin-collapse
351 https://bugs.webkit.org/show_bug.cgi?id=163753
353 Reviewed by Dean Jackson.
355 * css/parser/CSSPropertyParser.cpp:
356 (WebCore::CSSPropertyParser::parseShorthand):
358 2016-10-20 Chris Dumez <cdumez@apple.com>
360 Passing a number as the pixel parameter to texImage2D() doesn't thrown an exception
361 https://bugs.webkit.org/show_bug.cgi?id=163715
363 Reviewed by Darin Adler.
365 Enable strict type checking for typed arrays in the bindings, similarly
366 do what we do for other wrapper types, as per Web IDL.
368 No new tests, updated existing tests.
370 * bindings/scripts/CodeGeneratorJS.pm:
371 (GenerateImplementation):
372 (GenerateParametersCheck):
374 2016-10-20 Myles C. Maxfield <mmaxfield@apple.com>
376 Improve error message when passing a null ArrayBuffer to bufferData()
377 https://bugs.webkit.org/show_bug.cgi?id=163745
379 Reviewed by Dean Jackson.
381 Test: fast/canvas/webgl/bufferData-nullable-array-buffer-view.html
383 Update the idl file to accept a nullable ArrayBuffer, and throw
384 the relevant error with a more helpful error string.
386 * html/canvas/WebGLRenderingContextBase.cpp:
387 (WebCore::WebGLRenderingContextBase::bufferData):
388 * html/canvas/WebGLRenderingContextBase.h:
389 * html/canvas/WebGLRenderingContextBase.idl:
391 2016-10-20 Zalan Bujtas <zalan@apple.com>
393 Stop searching for first-letter containers at multi-column boundary.
394 https://bugs.webkit.org/show_bug.cgi?id=163739
395 <rdar://problem/28810750>
397 We should not cross the multi-column boundary while searching for the first-letter container.
398 While moving first-letter renderers to a multi-column parent, it could result in finding the wrong
399 container and end up adding a new wrapper under the original container (from where we are moving the renderers).
401 Reviewed by David Hyatt.
403 Test: fast/css-generated-content/first-letter-move-to-multicolumn-crash.html
405 * rendering/RenderBoxModelObject.cpp:
406 (WebCore::RenderBoxModelObject::moveChildrenTo):
407 * rendering/RenderTextFragment.cpp:
408 (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
410 2016-10-19 Dean Jackson <dino@apple.com>
412 Support CSS Shapes Level 1 without a prefix
413 https://bugs.webkit.org/show_bug.cgi?id=163709
414 <rdar://problem/28859369>
416 Reviewed by Myles Maxfield.
418 Support the unprefixed form of CSS Shapes, now that
421 We have a few failing tests:
423 - Some image-based shaping failures, now skipped.
424 https://bugs.webkit.org/show_bug.cgi?id=163706
426 - Some false negatives, where my understanding
427 of the CSS OM seems to suggest that the W3C tests
429 https://bugs.webkit.org/show_bug.cgi?id=163708
431 Tests: imported/w3c/csswg-test/css-shapes-1
433 * css/CSSComputedStyleDeclaration.cpp:
434 (WebCore::ComputedStyleExtractor::propertyValue):
435 * css/CSSPropertyNames.in:
436 * css/CSSValueKeywords.in:
437 * css/parser/CSSParser.cpp:
438 (WebCore::isSimpleLengthPropertyID):
439 (WebCore::CSSParser::parseValue):
440 * css/parser/CSSPropertyParser.cpp:
441 (WebCore::CSSPropertyParser::parseSingleValue):
442 * page/animation/CSSPropertyAnimation.cpp:
443 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
445 2016-10-20 Dave Hyatt <hyatt@apple.com>
447 [CSS Parser] Fix region, column and page break parsing
448 https://bugs.webkit.org/show_bug.cgi?id=163743
450 Reviewed by Simon Fraser.
452 * css/parser/CSSParserFastPaths.cpp:
453 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
454 Add the missing values for break support.
456 * css/parser/CSSPropertyParser.cpp:
457 (WebCore::isLegacyBreakProperty):
458 (WebCore::CSSPropertyParser::parseValueStart):
459 Add a special case for handling legacy break properties. Blink treats them like
460 shorthands, but we can't do that without breaking the old parser, so for now
461 we add a special case.
463 (WebCore::mapFromPageBreakBetween):
464 (WebCore::mapFromColumnBreakBetween):
465 (WebCore::mapFromRegionBreakBetween):
466 Updated to have the AvoidXXX values (where XXX is Column/Page/Region).
468 (WebCore::CSSPropertyParser::parseShorthand):
469 Remove the consumeLegacyBreak from the shorthand function, since we can't treat
470 the legacy break properties as shorthands yet.
472 2016-10-20 Sam Weinig <sam@webkit.org>
474 Add convenience function that combines WTF::visit(...) with WTF::makeVisitor(...)
475 https://bugs.webkit.org/show_bug.cgi?id=163713
477 Reviewed by Dan Bernstein.
479 Switch uses of WTF::visit to use WTF::switchOn.
481 * dom/MessageEvent.cpp:
482 (WebCore::MessageEvent::source):
484 (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
485 (WebCore::Node::convertNodesOrStringsIntoNode):
486 * html/HTMLSelectElement.cpp:
487 (WebCore::HTMLSelectElement::add):
488 * html/track/TrackEvent.cpp:
489 (WebCore::TrackEvent::TrackEvent):
490 * testing/TypeConversions.h:
491 (WebCore::TypeConversions::typeConversionsDictionaryUnionType):
493 2016-10-20 Dave Hyatt <hyatt@apple.com>
495 [CSS Parser] Fix font family parsing and add CSS region property parsing
496 https://bugs.webkit.org/show_bug.cgi?id=163741
498 Reviewed by Zalan Bujtas.
500 * css/parser/CSSParser.cpp:
501 (WebCore::isKeywordPropertyID):
502 (WebCore::parseKeywordValue):
503 (WebCore::CSSParser::parseValue):
504 Modify the old CSSParser to have its own keyword check, since keywords were
505 incorrectly added to the new parser when this check was consolidated. Column
506 and region breaks are considered keyword properties by the old parser, but
507 not by the new parser, since the new parser special cases them and maps them
508 into the generic break property.
510 * css/parser/CSSParserFastPaths.cpp:
511 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
512 (WebCore::CSSParserFastPaths::isKeywordPropertyID):
513 Update for regions to make sure all the region properties are there. Remove the
514 column and region break properties, since they're not supposed to be here in the
517 * css/parser/CSSPropertyParser.cpp:
518 (WebCore::consumeFamilyName):
519 Fix font parsing to make font family values so that fonts work.
521 (WebCore::consumeFlowProperty):
522 Add a function for handling -webkit-flow-from and -webkit-flow-into.
524 (WebCore::CSSPropertyParser::parseSingleValue):
525 Add support for the region properties.
527 (WebCore::mapFromRegionBreakBetween):
528 (WebCore::mapFromColumnRegionOrPageBreakInside):
529 (WebCore::mapFromLegacyBreakProperty):
530 (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
531 (WebCore::mapFromColumnOrPageBreakInside): Deleted.
532 Update to handle the region break properties in the same way that column break
533 properties are handled.
535 2016-10-20 Jer Noble <jer.noble@apple.com>
537 CRASH in WebCore::MediaSource::seekToTime + 185
538 https://bugs.webkit.org/show_bug.cgi?id=163652
540 Reviewed by Eric Carlson.
542 Test: media/media-source/media-source-seek-detach-crash.html
544 Add isClosed() checks (which are effectively m_private null-checks) everywhere m_private is
545 dereferenced. The one place where m_private is cleared without setting the state to closed
546 is stop(), so make stop() set the state to closed as well (without firing any events).
548 * Modules/mediasource/MediaSource.cpp:
549 (WebCore::MediaSource::seekToTime):
550 (WebCore::MediaSource::completeSeek):
551 (WebCore::MediaSource::monitorSourceBuffers):
552 (WebCore::MediaSource::streamEndedWithError):
553 (WebCore::MediaSource::stop):
555 2016-10-20 Andreas Kling <akling@apple.com>
557 Drop StyleResolver and SelectorQueryCache when entering PageCache.
558 <https://webkit.org/b/154238>
560 Reviewed by Antti Koivisto.
562 Stop keeping these around for cached pages to save lots of memory.
563 We can easily rebuild them if a cached navigation occurs, and this
564 way we also don't need to worry about invalidating style for cached
565 pages in all the right places.
567 Restoring a cached page will now lead to a forced style recalc.
568 We don't try to defer this (beyond a zero-timer) since it's going
569 to happen anyway, and it's nicer to front-load the cost rather than
570 stuttering on the first user content interaction.
573 (WebCore::Document::setPageCacheState):
574 * history/CachedPage.cpp:
575 (WebCore::CachedPage::restore):
576 (WebCore::CachedPage::clear):
577 * history/CachedPage.h:
578 (WebCore::CachedPage::markForVisitedLinkStyleRecalc): Deleted.
579 (WebCore::CachedPage::markForFullStyleRecalc): Deleted.
580 * history/PageCache.cpp:
581 (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
582 (WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
583 * history/PageCache.h:
585 (WebCore::Frame::setPageAndTextZoomFactors):
587 (WebCore::Page::setViewScaleFactor):
588 (WebCore::Page::setDeviceScaleFactor):
589 (WebCore::Page::setPagination):
590 (WebCore::Page::setPaginationLineGridEnabled):
591 (WebCore::Page::setVisitedLinkStore):
593 2016-10-20 Carlos Alberto Lopez Perez <clopez@igalia.com>
595 [GTK] Build fix after r207616
596 https://bugs.webkit.org/show_bug.cgi?id=163333
598 Reviewed by Carlos Garcia Campos.
600 EGL_PLATFORM_X11_KHR and EGL_PLATFORM_WAYLAND_KHR are not defined
601 on the EGL headers shipped by Mesa 10.3 (shipped by Debian 8)
603 * platform/graphics/wayland/PlatformDisplayWayland.cpp:
604 (WebCore::PlatformDisplayWayland::initialize):
605 * platform/graphics/x11/PlatformDisplayX11.cpp:
606 (WebCore::PlatformDisplayX11::initializeEGLDisplay):
608 2016-10-20 Fujii Hironori <Hironori.Fujii@sony.com>
610 [CMake] CMake does not support the dep files for implicit dependency
611 https://bugs.webkit.org/show_bug.cgi?id=161433
613 Reviewed by Brent Fulgham.
615 Created a Perl script to generate all IDL bindings for CMake.
616 This script can regenerate outdated bindings by based on the
617 supplemental dependency and dep files created by
618 '--write-dependencies' switch of generate-bindings.pl.
620 add_custom_target is used to invoke the script instead of
621 add_custom_command because Ninja deletes all output files before
622 executing the command in case of add_custom_command.
624 USES_TERMINAL option of add_custom_target has two effects:
625 1) Not buffering output of the command
626 2) Invoking the command in the special Ninja pool which inhibits parallel build
627 One needs to use CMake 3.2 or later to enable this feature.
629 * CMakeLists.txt: Specified target names for
630 GENERATE_BINDINGS. Added dependency for the targets.
631 * bindings/scripts/generate-bindings-all.pl: Added.
633 2016-10-20 Adam Jackson <ajax@redhat.com>
635 Prefer eglGetPlatformDisplay to eglGetDisplay
636 https://bugs.webkit.org/show_bug.cgi?id=163333
638 Reviewed by Carlos Garcia Campos.
640 eglGetDisplay forces the implementation to guess what kind of void* it's been handed. Different implementations
641 do different things, in particular glvnd and Mesa behave differently. Fortunately there exists API to tell EGL
642 what kind of display it is, so let's use it.
644 * platform/graphics/wayland/PlatformDisplayWayland.cpp:
645 (WebCore::PlatformDisplayWayland::initialize):
646 * platform/graphics/x11/PlatformDisplayX11.cpp:
647 (WebCore::PlatformDisplayX11::initializeEGLDisplay):
649 2016-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
651 [GTK] Avoid including egl.h headers in internal headers
652 https://bugs.webkit.org/show_bug.cgi?id=163722
654 Reviewed by Žan Doberšek.
656 egl.h includes eglplatform.h that decides the native types for the platform at compile time. However, we support
657 to build with X11 and Wayland at the same time and decide what to use at runtime. Currently GLContext.h includes
658 eglplatform.h after wayland-egl.h if Wayland is enabled. That means that the wayland native types are used by
659 default from all cpp files including GLContext.h. It currently works in X11 because we cast the value anyway and
660 for example EGLNativeWindowType is a pointer in Wayland that can be casted to unsigned long in X11 to represent
661 the X Window. This is very fragile in any case, we should avoid adding egl headers in our headers and only
662 include it in cpp files. But we also need to ensure we don't use X11 and Wayland in the same cpp file.
665 * platform/graphics/GLContext.cpp:
666 (WebCore::GLContext::createContextForWindow):
667 * platform/graphics/GLContext.h:
668 * platform/graphics/egl/GLContextEGL.cpp:
669 (WebCore::GLContextEGL::createWindowContext):
670 (WebCore::GLContextEGL::createContext):
671 (WebCore::GLContextEGL::~GLContextEGL):
672 * platform/graphics/egl/GLContextEGL.h:
673 * platform/graphics/egl/GLContextEGLWayland.cpp: Added.
674 (WebCore::GLContextEGL::GLContextEGL):
675 (WebCore::GLContextEGL::createWindowSurfaceWayland):
676 (WebCore::GLContextEGL::createWaylandContext):
677 (WebCore::GLContextEGL::destroyWaylandWindow):
678 * platform/graphics/egl/GLContextEGLX11.cpp: Added.
679 (WebCore::GLContextEGL::GLContextEGL):
680 (WebCore::GLContextEGL::createWindowSurfaceX11):
681 (WebCore::GLContextEGL::createPixmapContext):
682 * platform/graphics/glx/GLContextGLX.cpp:
683 (WebCore::GLContextGLX::createWindowContext):
684 (WebCore::GLContextGLX::createContext):
685 (WebCore::GLContextGLX::GLContextGLX):
686 * platform/graphics/glx/GLContextGLX.h:
687 * platform/graphics/wayland/PlatformDisplayWayland.cpp:
688 * platform/graphics/x11/PlatformDisplayX11.cpp:
690 2016-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
692 [GTK] Avoid strstr() when checking (E)GL extensions
693 https://bugs.webkit.org/show_bug.cgi?id=161958
695 Reviewed by Žan Doberšek.
697 Add static method GLContext::isExtensionSupported() to properly search extenstions in the given extension
698 list, and use it instead of strstr().
700 * platform/graphics/GLContext.cpp:
701 (WebCore::GLContext::isExtensionSupported):
702 * platform/graphics/GLContext.h:
703 * platform/graphics/egl/GLContextEGL.cpp:
704 (WebCore::GLContextEGL::createSurfacelessContext):
705 * platform/graphics/glx/GLContextGLX.cpp:
706 (WebCore::hasSGISwapControlExtension):
708 2016-10-20 Per Arne Vollan <pvollan@apple.com>
710 [Win][Direct2D] Implement ImageBufferData::getData.
711 https://bugs.webkit.org/show_bug.cgi?id=163668
713 Reviewed by Brent Fulgham.
715 Render data to a bitmap in system memory, which data can be read from.
717 * platform/graphics/win/ImageBufferDataDirect2D.cpp:
718 (WebCore::ImageBufferData::getData):
719 * platform/graphics/win/ImageBufferDirect2D.cpp:
720 (WebCore::ImageBuffer::ImageBuffer):
722 2016-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
724 Wrong use of EGL_DEPTH_SIZE
725 https://bugs.webkit.org/show_bug.cgi?id=155536
727 Reviewed by Michael Catanzaro.
729 What happens here is that the driver doesn't implement EGL_DEPTH_SIZE and the default value, which is 0, is
730 returned. Then XCreatePixmap fails because 0 is not a valid depth. The thing is that even if EGL_DEPTH_SIZE or
731 EGL_BUFFER_SIZE returned a valid depth, it still might not be supported by the default screen and XCreatePixmap
732 can fail. What we need to ensure is that the depth we pass is compatible with the X display, not only with the
733 EGL config, to avoid failures when creating the pixmap. So, we can use EGL_NATIVE_VISUAL_ID instead, and
734 then ask X for the visual info for that id. If it isn't found then we just return before creating the pixmap,
735 but if the visual is found then we can be sure that the depth of the visual will not make the pixmap creation
736 fail. However, with the driver I'm using it doesn't matter how we create the pixmap that eglCreatePixmapSurface
737 always fails, again with X errors that are fatal by default. Since the driver is not free, I assume it doesn't
738 support eglCreatePixmapSurface or it's just buggy, so the only option we have here is trap the x errors and
739 ignore them. It turns out that the X errors are not fatal in this case, because eglCreatePixmapSurface ends up
740 returning a surface, and since these are offscreen contexts, it doesn't really matter if they contain an
741 invalid pixmap, because we never do swap buffer on them, so just ignoring the X errors fixes the crashes and
742 makes everythig work. This patch adds a helper class XErrorTrapper that allows to trap XErrors and decide what
743 to do with them (ignore, warn or crash) or even not consider a particular set of errors as errors.
745 * PlatformEfl.cmake: Add new file to compilation.
746 * PlatformGTK.cmake: Ditto.
747 * platform/graphics/egl/GLContextEGL.cpp:
748 (WebCore::GLContextEGL::createPixmapContext): Use EGL_NATIVE_VISUAL_ID instead of EGL_DEPTH_SIZE to figure out
749 the depth to be passed to XCreatePixmap. Also use the XErrorTrapper class to ignore all BadDrawable errors
750 produced by eglCreatePixmapSurface() and only show a warning about all other X errors.
751 * platform/graphics/x11/XErrorTrapper.cpp: Added.
752 (WebCore::xErrorTrappersMap):
753 (WebCore::XErrorTrapper::XErrorTrapper):
754 (WebCore::XErrorTrapper::~XErrorTrapper):
755 (WebCore::XErrorTrapper::errorCode):
756 (WebCore::XErrorTrapper::errorEvent):
757 * platform/graphics/x11/XErrorTrapper.h: Added.
758 (WebCore::XErrorTrapper::XErrorTrapper):
760 2016-10-20 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
762 WebRTC: The MediaStreamTrackEvent init dictionary needs a required track member
763 https://bugs.webkit.org/show_bug.cgi?id=146232
765 Update MediaStreamTrackEvent IDL as per specification.
767 Reviewed by Darin Adler.
769 No additional test required, rebase existings tests.
771 * Modules/mediastream/MediaStreamTrackEvent.idl:
773 2016-10-19 Antoine Quint <graouts@apple.com>
775 [Modern Media Controls] Media Controller: mute support
776 https://bugs.webkit.org/show_bug.cgi?id=163677
777 <rdar://problem/28851582>
779 Reviewed by Dean Jackson.
781 We introduce the MuteSupport class which brings support for muting the media
782 by clicking on the mute button in the media controls and correctly reflecting
783 the media's muted state should the media be muted via the media API.
785 Tests: media/modern-media-controls/mute-support/mute-support-button-click.html
786 media/modern-media-controls/mute-support/mute-support-media-api.html
787 media/modern-media-controls/mute-support/mute-support-muted.html
789 * Modules/modern-media-controls/media/media-controller.js:
791 * Modules/modern-media-controls/media/mute-support.js: Copied from Source/WebCore/Modules/modern-media-controls/media/media-controller.js.
792 (MuteSupport.prototype.get control):
793 (MuteSupport.prototype.get mediaEvents):
794 (MuteSupport.prototype.buttonWasClicked):
795 (MuteSupport.prototype.syncControl):
797 * WebCore.xcodeproj/project.pbxproj:
798 * rendering/RenderThemeMac.mm:
799 (WebCore::RenderThemeMac::mediaControlsScript):
801 2016-10-19 Alex Christensen <achristensen@webkit.org>
804 https://bugs.webkit.org/show_bug.cgi?id=163675
806 Reviewed by Brent Fulgham.
808 This code is still useful for comparison with Windows. I'll remove it again soon.
810 No new tests. No change in behavior.
812 * WebCore.xcodeproj/project.pbxproj:
814 * loader/DocumentLoader.h:
815 * loader/EmptyClients.h:
816 * loader/FrameLoaderClient.h:
817 * loader/ResourceLoader.cpp:
818 (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
819 * loader/ResourceLoader.h:
820 * loader/SubresourceLoader.h:
821 * loader/cf/ResourceLoaderCFNet.cpp:
822 * loader/cocoa/SubresourceLoaderCocoa.mm:
823 (WebCore::SubresourceLoader::willCacheResponse):
824 * loader/mac/DocumentLoaderMac.cpp:
825 * loader/mac/ResourceLoaderMac.mm:
826 (WebCore::ResourceLoader::willCacheResponse):
827 * page/mac/PageMac.mm:
828 (WebCore::Page::platformInitialize):
829 (WebCore::Page::addSchedulePair):
830 (WebCore::Page::removeSchedulePair):
831 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
832 (WebCore::WebCoreNSURLAuthenticationChallengeClient::create):
833 (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient):
834 (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
835 * platform/mac/WebCoreSystemInterface.h:
836 * platform/network/NetworkStorageSession.h:
837 * platform/network/ProtectionSpace.h:
838 * platform/network/ProtectionSpaceBase.cpp:
839 * platform/network/ResourceHandle.cpp:
840 * platform/network/ResourceHandle.h:
841 * platform/network/ResourceHandleClient.cpp:
842 * platform/network/ResourceHandleClient.h:
843 * platform/network/ResourceHandleInternal.h:
844 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
845 * platform/network/ResourceRequestBase.cpp:
846 * platform/network/cf/AuthenticationCF.cpp:
847 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
848 (WebCore::AuthenticationChallenge::setAuthenticationClient): Deleted.
849 (WebCore::AuthenticationChallenge::authenticationClient): Deleted.
850 (WebCore::AuthenticationChallenge::platformCompare): Deleted.
851 (WebCore::createCF): Deleted.
852 (WebCore::core): Deleted.
853 * platform/network/cf/AuthenticationCF.h:
854 * platform/network/cf/AuthenticationChallenge.h:
855 * platform/network/cf/CookieJarCFNet.cpp:
856 * platform/network/cf/CredentialStorageCFNet.cpp:
857 (WebCore::CredentialStorage::getFromPersistentStorage):
858 (WebCore::CredentialStorage::saveToPersistentStorage):
859 * platform/network/cf/LoaderRunLoopCF.cpp:
860 * platform/network/cf/LoaderRunLoopCF.h:
861 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
862 (WebCore::NetworkStorageSession::cookieStorage):
863 * platform/network/cf/ProtectionSpaceCFNet.cpp:
864 * platform/network/cf/ProtectionSpaceCFNet.h:
865 * platform/network/cf/ResourceError.h:
866 * platform/network/cf/ResourceErrorCF.cpp:
867 * platform/network/cf/ResourceHandleCFNet.cpp:
868 (WebCore::shouldSniffConnectionProperty):
869 (WebCore::ResourceHandle::createCFURLConnection):
870 (WebCore::ResourceHandle::start):
871 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
872 (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
873 (WebCore::ResourceHandle::receivedCredential):
874 (WebCore::ResourceHandle::schedule):
875 (WebCore::ResourceHandle::unschedule):
876 * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
877 * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
878 * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
879 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
880 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
881 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
882 * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
883 * platform/network/cf/ResourceRequest.h:
884 (WebCore::ResourceRequest::encodingRequiresPlatformData):
885 * platform/network/cf/ResourceRequestCFNet.cpp:
886 (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
887 (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
888 (WebCore::ResourceRequest::doUpdatePlatformRequest):
889 (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
890 (WebCore::ResourceRequest::doUpdateResourceRequest):
891 (WebCore::ResourceRequest::setStorageSession):
892 * platform/network/cf/ResourceRequestCFNet.h:
893 * platform/network/cf/ResourceResponse.h:
894 * platform/network/cf/ResourceResponseCFNet.cpp:
895 (WebCore::ResourceResponse::cfURLResponse):
896 * platform/network/cf/SynchronousLoaderClientCFNet.cpp:
897 * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
898 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
899 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
900 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
901 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
902 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
903 * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
904 * platform/network/cocoa/CredentialCocoa.h:
905 * platform/network/cocoa/CredentialCocoa.mm:
906 (WebCore::Credential::Credential):
907 (WebCore::Credential::cfCredential):
908 * platform/network/cocoa/ProtectionSpaceCocoa.h:
909 * platform/network/cocoa/ProtectionSpaceCocoa.mm:
910 (WebCore::ProtectionSpace::ProtectionSpace):
911 (WebCore::ProtectionSpace::cfSpace):
912 * platform/network/cocoa/ResourceRequestCocoa.mm:
913 (WebCore::ResourceRequest::nsURLRequest):
914 * platform/network/cocoa/ResourceResponseCocoa.mm:
915 (WebCore::ResourceResponse::platformCertificateInfo):
916 (WebCore::ResourceResponse::nsURLResponse):
917 (WebCore::ResourceResponse::ResourceResponse):
918 * platform/network/ios/QuickLook.h:
919 * platform/network/ios/QuickLook.mm:
920 (-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]):
921 (-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]):
922 (-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]):
923 (-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]):
924 (-[WebQuickLookHandleAsDelegate connection:didFailWithError:]):
925 (-[WebQuickLookHandleAsDelegate detachHandle]):
926 (WebCore::QuickLookHandle::create):
927 (WebCore::QuickLookHandle::cfResponse):
928 * platform/network/mac/AuthenticationMac.mm:
929 (-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]):
930 (-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]):
933 * platform/network/mac/CookieJarMac.mm:
934 (WebCore::setCookiesFromDOM):
935 (WebCore::addCookie):
936 (WebCore::cookieStorage):
937 * platform/network/mac/CredentialStorageMac.mm:
938 * platform/network/mac/FormDataStreamMac.h:
939 * platform/network/mac/FormDataStreamMac.mm:
940 * platform/network/mac/ResourceErrorMac.mm:
941 (NSErrorFromCFError):
942 (WebCore::ResourceError::ResourceError):
943 (WebCore::ResourceError::nsError):
944 (WebCore::ResourceError::operator NSError *):
945 * platform/network/mac/ResourceHandleMac.mm:
946 (WebCore::ResourceHandle::getConnectionTimingData):
947 * platform/network/mac/ResourceRequestMac.mm: Added.
948 (WebCore::ResourceRequest::ResourceRequest):
949 (WebCore::ResourceRequest::updateNSURLRequest):
950 * platform/network/mac/SynchronousLoaderClient.mm:
951 * platform/network/mac/WebCoreResourceHandleAsDelegate.h:
952 * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
953 * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
954 * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
955 * platform/network/mac/WebCoreURLResponse.mm:
956 * platform/win/TemporaryLinkStubs.cpp:
957 * testing/js/WebCoreTestSupportPrefix.h:
959 2016-10-19 Jer Noble <jer.noble@apple.com>
961 REGRESSION (r206025): All YouTube videos play with black bars on all four sides
962 https://bugs.webkit.org/show_bug.cgi?id=163308
964 Reviewed by Darin Adler.
966 Test: media/media-source/media-source-resize.html
968 After r206025, we do not fire resize events when the size change notification happens equal-
969 to-or-before the current time, which can happen at the very beginning of a stream. Take care
970 of this case by checking that the target time isn't actually in the past inside of
971 sizeWillChangeAtTime(), and also always skip the boundary time observer when there was no
972 previous size (such as after a flush due to a seek).
974 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
975 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
976 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime):
977 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNaturalSize):
978 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
979 (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
980 (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
982 2016-10-19 Nan Wang <n_wang@apple.com>
984 AX: [Mac] Mark element AXAPI should comform to specs
985 https://bugs.webkit.org/show_bug.cgi?id=163707
987 Reviewed by Chris Fleizach.
989 Created a new role for mark elements on Mac and exposed the role
992 Changes are covered in modified test expectaions.
994 * English.lproj/Localizable.strings:
995 * accessibility/AccessibilityObject.h:
996 * accessibility/AccessibilityRenderObject.cpp:
997 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
998 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
999 (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
1000 * accessibility/mac/AccessibilityObjectMac.mm:
1001 (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1002 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1003 (createAccessibilityRoleMap):
1004 (-[WebAccessibilityObjectWrapper roleDescription]):
1005 * platform/LocalizedStrings.cpp:
1006 (WebCore::AXMarkText):
1007 * platform/LocalizedStrings.h:
1009 2016-10-19 Alex Christensen <achristensen@webkit.org>
1011 Re-enable URLParser for non-Safari Cocoa apps after r207321
1012 https://bugs.webkit.org/show_bug.cgi?id=163690
1014 Reviewed by Darin Adler.
1016 I disabled the URLParser for non-Safari applications in r207305
1017 to give me time to make URLParser more compatible, which I did in r207321
1019 Updated some API tests which will be investigated in
1020 https://bugs.webkit.org/show_bug.cgi?id=163127
1022 * platform/URLParser.cpp:
1023 (WebCore::URLParser::setEnabled):
1024 (WebCore::URLParser::enabled):
1025 * testing/js/WebCoreTestSupport.cpp:
1026 (WebCoreTestSupport::setURLParserEnabled): Deleted.
1027 * testing/js/WebCoreTestSupport.h:
1029 2016-10-19 Myles C. Maxfield <mmaxfield@apple.com>
1031 CSS font-variation-settings does not handle uppercase axis names in variable fonts
1032 https://bugs.webkit.org/show_bug.cgi?id=163546
1034 Reviewed by Dean Jackson.
1036 Remove the extra toASCIILower() call.
1038 Test: fast/text/variations/case-axis-names.html
1040 * css/parser/CSSParser.cpp:
1041 (WebCore::CSSParser::parseFontVariationTag):
1043 2016-10-19 Anders Carlsson <andersca@apple.com>
1045 Remove m_redirectURLs from HistoryItem
1046 https://bugs.webkit.org/show_bug.cgi?id=163704
1048 Reviewed by Dan Bernstein.
1050 * history/HistoryItem.cpp:
1051 (WebCore::HistoryItem::HistoryItem):
1052 (WebCore::HistoryItem::reset):
1053 * history/HistoryItem.h:
1055 2016-10-19 Joone Hur <joone.hur@intel.com>
1057 Add a plain space instead of between text nodes
1058 https://bugs.webkit.org/show_bug.cgi?id=123163
1060 Reviewed by Ryosuke Niwa.
1062 When we rebalance white spaces, can be added as space
1063 under some conditions. This patch adds a condition that the next
1064 sibling text node should not exist.
1066 No new tests, updated existing test.
1068 * editing/CompositeEditCommand.cpp:
1069 (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
1070 * editing/htmlediting.cpp:
1071 (WebCore::stringWithRebalancedWhitespace):
1072 * editing/htmlediting.h:
1074 2016-10-19 Sam Weinig <sam@webkit.org>
1076 Add support for sequences and dictionaries in unions
1077 https://bugs.webkit.org/show_bug.cgi?id=163695
1079 Reviewed by Chris Dumez.
1082 - Updated js/dom/webidl-type-mapping.html
1084 * bindings/generic/IDLTypes.h:
1085 Add additional helper predicates and fix formatting.
1087 * bindings/js/JSDOMBinding.h:
1088 Export hasIteratorMethod for use in testing.
1090 * bindings/js/JSDOMConvert.h:
1091 - Change return type of Converter<IDLDictionary<T>> to T, from Optional<T>.
1092 - Add support for unions conversion step 12 (parts 1-3).
1094 * bindings/scripts/CodeGeneratorJS.pm:
1095 (GenerateDefaultValue):
1096 Support complex default value computations for unions using the convert infrastructure.
1098 (GenerateParametersCheck):
1099 (GenerateConstructorDefinition):
1100 Remove incorrect .value() calls now that Converter<IDLDictionary<T>> returns T.
1102 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1103 * bindings/scripts/test/JS/JSTestObj.cpp:
1104 Update bindings test results.
1106 * testing/TypeConversions.h:
1107 (WebCore::TypeConversions::setTypeConversionsDictionary):
1108 (WebCore::TypeConversions::typeConversionsDictionaryLongValue):
1109 (WebCore::TypeConversions::typeConversionsDictionaryStringValue):
1110 (WebCore::TypeConversions::typeConversionsDictionarySequenceValue):
1111 (WebCore::TypeConversions::typeConversionsDictionaryUnionType):
1112 * testing/TypeConversions.idl:
1113 Add some complex types to allow testing IDL conversions from tests.
1115 2016-10-19 Ryosuke Niwa <rniwa@webkit.org>
1117 Annotate more DOM and HTML IDLs with CEReactions
1118 https://bugs.webkit.org/show_bug.cgi?id=163653
1120 Reviewed by Darin Adler.
1122 Added CEReactions to more IDL files.
1124 Test: fast/custom-elements/reactions-for-webkit-extensions.html
1126 * bindings/js/JSDOMStringMapCustom.cpp:
1127 (WebCore::JSDOMStringMap::deleteProperty): Instantiate CustomElementReactionStack, which is equivalent to
1128 adding CEReactions in IDL.
1129 (WebCore::JSDOMStringMap::putDelegate): Ditto.
1132 * html/HTMLElement.idl:
1133 * page/DOMSelection.idl:
1135 2016-10-19 Ryan Haddad <ryanhaddad@apple.com>
1137 Unreviewed, rolling out r207557.
1139 This change caused animations/font-variations tests to time
1140 out on pre-Sierra Macs.
1144 "[macOS] [iOS] Disable variation fonts on macOS El Capitan and
1146 https://bugs.webkit.org/show_bug.cgi?id=163374
1147 http://trac.webkit.org/changeset/207557
1149 2016-10-19 Dave Hyatt <hyatt@apple.com>
1151 [CSS Parser] Support -webkit-border-fit
1152 https://bugs.webkit.org/show_bug.cgi?id=163687
1154 Reviewed by Zalan Bujtas.
1156 Add support for -webkit-border-fit to isValidKeywordPropertyAndValue.
1158 * css/parser/CSSParserFastPaths.cpp:
1159 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1161 2016-10-19 Dave Hyatt <hyatt@apple.com>
1163 [CSS Parser] class and id parsing need to be case-insensitive in HTML quirks mode
1164 https://bugs.webkit.org/show_bug.cgi?id=163685
1166 Reviewed by Zalan Bujtas.
1168 Class and ID parsing should be case-insensitive in quirks mode. Apply the same hack
1169 that the old parser did and lowercase the class and ids in place.
1171 * css/parser/CSSSelectorParser.cpp:
1172 (WebCore::CSSSelectorParser::consumeId):
1173 (WebCore::CSSSelectorParser::consumeClass):
1175 2016-10-19 Nan Wang <n_wang@apple.com>
1177 AX: crash: com.apple.WebCore: WebCore::AccessibilityObject::findMatchingObjects + 600
1178 https://bugs.webkit.org/show_bug.cgi?id=163682
1180 Reviewed by Chris Fleizach.
1182 There's a null pointer crash when we ask for startObject->parentObjectUnignored() in
1183 AccessibilityObject::findMatchingObject. Added a null check for the startObject to fix that.
1185 Test: accessibility/mac/search-predicate-crash.html
1187 * accessibility/AccessibilityObject.cpp:
1188 (WebCore::AccessibilityObject::findMatchingObjects):
1190 2016-10-19 David Kilzer <ddkilzer@apple.com>
1192 Bug 163670: Refine assertions in WebCore::ImageData constructors
1193 <https://webkit.org/b/163670>
1194 <rdar://problem/27497338>
1196 Reviewed by Brent Fulgham.
1198 No new tests because there is no change in nominal behavior.
1200 * html/ImageData.cpp:
1201 (WebCore::ImageData::ImageData(const IntSize&)): Change to use
1202 ASSERT() since the worst-case scenario here is a nullptr deref.
1203 Switch to IntSize::area() to compute the area.
1204 (WebCore::ImageData::ImageData(const IntSize&, Ref<Uint8ClampedArray>&&)):
1205 Add ASSERT() identical to the previous constructor, and change
1206 ASSERT_WITH_SECURITY_IMPLICATION() to only fire when m_data is
1207 not nullptr and the length check fails. Switch to
1208 IntSize::area() to compute the area.
1210 2016-10-19 Myles C. Maxfield <mmaxfield@apple.com>
1212 [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
1213 https://bugs.webkit.org/show_bug.cgi?id=163374
1215 Reviewed by Darin Adler.
1217 Because of platform lack of support for variations in in-memory fonts,
1218 this feature should be disabled on the affected OSes.
1220 No tests because there is no behavior change (on the relevant platforms).
1222 * Configurations/FeatureDefines.xcconfig:
1224 2016-10-19 Dave Hyatt <hyatt@apple.com>
1226 [CSS Parser] Fix background-position parsing
1227 https://bugs.webkit.org/show_bug.cgi?id=163681
1229 Reviewed by Dean Jackson.
1231 The new parser has a more efficient parsed representation of background positions. When
1232 background-position is "center" or when no length unit is specified for a dimension,
1233 then rather than creating a pair, the new parser makes a singleton primitive value.
1235 Patch the StyleBuilder code to handle this case, resolving center to (left,50%) or
1236 (top,50%) as appropriate and also handling top/left without any associated length.
1238 * css/CSSToStyleMap.cpp:
1239 (WebCore::CSSToStyleMap::mapFillXPosition):
1240 (WebCore::CSSToStyleMap::mapFillYPosition):
1242 2016-10-19 Antoine Quint <graouts@apple.com>
1244 [Modern Media Controls] Media Controller: click-to-start support
1245 https://bugs.webkit.org/show_bug.cgi?id=163659
1246 <rdar://problem/28845656>
1248 Reviewed by Dean Jackson.
1250 We introduce the MediaControllerSupport class which will allow a number of media controller
1251 features to be implemented by subclasses each devoted to implementing a specific subset of
1252 media controller features. With this bug, we add the correct behavior for click-to-start,
1253 only showing the start button under the right circumstances.
1255 A MediaController object indicates which media control to attach click event listeners to
1256 through the `control` property, and a list of media events it should register on the media
1257 element through the `mediaEvents` property. Then, as the user interacts with the specified
1258 control and the media, the Button delegation method `buttonWasClicked()` and the `syncControl()`
1259 methods are called to allow for the media state to be correctly set and represented in the
1260 media controls. Custom event handling for the specified events can also be achieved by
1261 subclassing the `handleEvent()` method.
1263 Tests: media/modern-media-controls/start-support/start-support-audio.html
1264 media/modern-media-controls/start-support/start-support-autoplay.html
1265 media/modern-media-controls/start-support/start-support-click-to-start.html
1266 media/modern-media-controls/start-support/start-support-error.html
1267 media/modern-media-controls/start-support/start-support-fullscreen.html
1268 media/modern-media-controls/start-support/start-support-manual-play.html
1269 media/modern-media-controls/start-support/start-support-no-source.html
1271 * Modules/modern-media-controls/media/media-controller-support.js: Added.
1272 (MediaControllerSupport):
1273 (MediaControllerSupport.prototype.get control):
1274 (MediaControllerSupport.prototype.get mediaEvents):
1275 (MediaControllerSupport.prototype.buttonWasClicked):
1276 (MediaControllerSupport.prototype.handleEvent):
1277 (MediaControllerSupport.prototype.syncControl):
1278 * Modules/modern-media-controls/media/media-controller.js:
1280 (MediaController.prototype.buttonWasClicked): Deleted.
1281 * Modules/modern-media-controls/media/start-support.js: Added.
1282 (StartSupport.prototype.get control):
1283 (StartSupport.prototype.get mediaEvents):
1284 (StartSupport.prototype.buttonWasClicked):
1285 (StartSupport.prototype.handleEvent):
1286 (StartSupport.prototype.syncControl):
1287 (StartSupport.prototype._shouldShowStartButton):
1290 2016-10-19 Aaron Chu <aaron_chu@apple.com>
1292 Web Inspector: AXI: expose computed tree node and heading level
1293 https://bugs.webkit.org/show_bug.cgi?id=130825
1294 <rdar://problem/16442349>
1296 Reviewed by Joseph Pecoraro.
1298 Exposing two new accessibility properties: Heading Level and Hierarchical Level.
1300 Updated Test: LayoutTest/inspector/dom/getAccessibilityPropertiesForNode.html
1302 * inspector/InspectorDOMAgent.cpp:
1303 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1305 2016-10-19 Adam Bergkvist <adam.bergkvist@ericsson.com>
1307 WebRTC: Implement MediaEndpointPeerConnection::stop()
1308 https://bugs.webkit.org/show_bug.cgi?id=163660
1310 Reviewed by Philippe Normand.
1312 Make MediaEndpointPeerConnection::stop() stop its MediaEndpoint.
1314 Testing: This fix deals with cleanup and tearing down resources down in the platform layer
1315 and is not covered by automated tests. It is however observable in the manual test added
1316 in [1] where the remote videos should stop when the connections are closed.
1318 [1] http://webkit.org/b/163327
1320 * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1321 (WebCore::MediaEndpointPeerConnection::stop):
1323 2016-10-19 Dave Hyatt <hyatt@apple.com>
1325 [CSS Parser] Fix -webkit-mask-box-image parsing
1326 https://bugs.webkit.org/show_bug.cgi?id=163676
1328 Reviewed by Dean Jackson.
1330 -webkit-mask-box-image is not a shorthand in our current code, so treat it the same as the legacy
1331 -webkit-border-image.
1333 * css/parser/CSSPropertyParser.cpp:
1334 (WebCore::CSSPropertyParser::parseSingleValue):
1335 (WebCore::CSSPropertyParser::parseShorthand):
1337 2016-10-19 Carlos Alberto Lopez Perez <clopez@igalia.com>
1339 [GTK][EFL] Build fix after r207543.
1340 https://bugs.webkit.org/show_bug.cgi?id=163671
1344 Fix typo on the filename of the included header:
1345 Mac filesystem is case insensitive, but Linux filesystems are case sensitive.
1347 * css/parser/CSSPropertyParser.cpp:
1349 2016-10-19 Zalan Bujtas <zalan@apple.com>
1351 Use anonymous table row for new child at RenderTableRow::addChild() if available.
1352 https://bugs.webkit.org/show_bug.cgi?id=163651
1353 <rdar://problem/28705022>
1355 Reviewed by David Hyatt.
1357 We should try to prevent the continuation siblings from getting separated and inserted into
1358 wrapper renderers. It makes finding these continuation siblings difficult.
1359 This patch adds a checks for anonymous table rows so that we could find a closer common ancestor of
1360 beforeChild/new child.
1362 Test: fast/table/crash-when-table-has-continuation-and-content-inserted.html
1364 * rendering/RenderObject.cpp:
1365 (WebCore::RenderObject::showRenderObject): Add continuation information.
1366 * rendering/RenderTableRow.cpp:
1367 (WebCore::RenderTableRow::addChild):
1369 2016-10-19 Joseph Pecoraro <pecoraro@apple.com>
1371 Cleanup WebCore/workers
1372 https://bugs.webkit.org/show_bug.cgi?id=163635
1374 Reviewed by Chris Dumez.
1377 Cleanup like pragma once, nullptr, remove stale includes, declarations.
1379 2016-10-19 Chris Dumez <cdumez@apple.com>
1381 MouseEvent's coordinates should be 0 for simulated clicks
1382 https://bugs.webkit.org/show_bug.cgi?id=163648
1384 Reviewed by Darin Adler.
1386 MouseEvent's coordinates should be 0 / 0 for simulated clicks triggered
1387 by JavaScript (i.e. via element.click()). This behavior matches Chrome
1390 WebKit was computing actual coordinates for the element which was
1391 expensive, especially because computing screenX / screenY required
1392 a synchronous IPC with the UI process.
1394 Test: fast/events/element-click-no-coords.html
1397 (WebCore::Element::dispatchSimulatedClick):
1398 * dom/SimulatedClick.cpp:
1399 (WebCore::simulateMouseEvent):
1400 (WebCore::simulateClick):
1401 * dom/SimulatedClick.h:
1402 * html/HTMLElement.cpp:
1403 (WebCore::HTMLElement::click):
1405 2016-10-19 Dave Hyatt <hyatt@apple.com>
1407 [CSS Parser] Fix transform parsing
1408 https://bugs.webkit.org/show_bug.cgi?id=163671
1410 Reviewed by Dean Jackson.
1412 The new parser turned function names into CSSValueIDs and made CSSFunctionValue store them. This
1413 meant it could be used to handle transform values, with the function name representing the
1414 transform operation efficiently as a CSSValueID.
1416 The old parser, however, creates WebKitCSSTransformValues. This value does not exist in the new
1417 parser. Rather than forcing the old and new parser over to CSSFunctionValues, I opted to
1418 just make the new parser build WebkitCSSTransformValues too.
1420 The main reason I did this is that WebkitCSSTransformValue is actually exposed to the Web via
1421 IDL. To be safe, I am not eliminating it (even though Blink has).
1423 * css/parser/CSSPropertyParser.cpp:
1424 (WebCore::consumeTranslate3d):
1425 (WebCore::consumeNumbers):
1426 (WebCore::consumePerspective):
1427 (WebCore::transformOperationForCSSValueID):
1428 (WebCore::consumeTransformValue):
1430 2016-10-19 Darin Adler <darin@apple.com>
1432 Move XPath from ExceptionCode to Exception
1433 https://bugs.webkit.org/show_bug.cgi?id=163656
1435 Reviewed by Chris Dumez.
1438 (WebCore::Document::createExpression): Use ExceptionOr.
1439 (WebCore::Document::createNSResolver): Return Ref.
1440 (WebCore::Document::evaluate): Use ExceptionOr.
1441 * dom/Document.h: Updated for above changes.
1442 * dom/Document.idl: Use non-legacy exceptions for the functions above.
1444 * inspector/InspectorNodeFinder.cpp:
1445 (WebCore::InspectorNodeFinder::searchUsingXPath): Call XPath functions
1448 * xml/DOMParser.cpp:
1449 (WebCore::DOMParser::DOMParser): Marked inline.
1450 (WebCore::DOMParser::create): Moved here from header.
1451 (WebCore::DOMParser::parseFromString): Use ExceptionOr.
1452 * xml/DOMParser.h: Updated for above changes.
1453 * xml/DOMParser.idl: Use non-legacy exception.
1455 * xml/XPathEvaluator.cpp:
1456 (WebCore::XPathEvaluator::createExpression): Use ExceptionOr.
1457 (WebCore::XPathEvaluator::evaluate): Ditto.
1458 * xml/XPathEvaluator.h: Updated for above changes.
1459 * xml/XPathEvaluator.idl: Use non-legacy exceptions.
1461 * xml/XPathExpression.cpp:
1462 (WebCore::XPathExpression::createExpression): Use ExceptionOr.
1463 (WebCore::XPathExpression::evaluate): Ditto.
1464 * xml/XPathExpression.h: Updated for above changes.
1465 * xml/XPathExpression.idl: Use non-legacy exceptions.
1467 * xml/XPathGrammar.y: Added include of XPathStep.h.
1469 * xml/XPathParser.cpp:
1470 (WebCore::XPath::Parser::Parser): Initialize three scalar data members
1471 in the class definition rather than here.
1472 (WebCore::XPath::Parser::parseStatement): Use ExceptionOr.
1473 * xml/XPathParser.h: Updated for above changes.
1475 * xml/XPathResult.cpp:
1476 (WebCore::XPathResult::XPathResult): Use a reference rather than a
1477 pointer for the document. Alao initialize two scalar data members
1478 in the class definition rather than here.
1479 (WebCore::XPathResult::convertTo): Use ExceptionOr.
1480 (WebCore::XPathResult::numberValue): Ditto.
1481 (WebCore::XPathResult::stringValue): Ditto.
1482 (WebCore::XPathResult::booleanValue): Ditto.
1483 (WebCore::XPathResult::singleNodeValue): Ditto.
1484 (WebCore::XPathResult::snapshotLength): Ditto.
1485 (WebCore::XPathResult::iterateNext): Ditto.
1486 (WebCore::XPathResult::snapshotItem): Ditto.
1487 * xml/XPathResult.h: Updated for the changes above.
1488 * xml/XPathResult.idl: Use non-legacy exceptions.
1490 2016-10-19 Nan Wang <n_wang@apple.com>
1492 AX: [Mac] Meter element should use AXValueDescription to descrbe the status of the value
1493 https://bugs.webkit.org/show_bug.cgi?id=163610
1495 Reviewed by Chris Fleizach.
1497 Exposed the goodness of the meter value in AXValueDescription.
1499 Test: accessibility/mac/meter-gauge-value-description.html
1501 * English.lproj/Localizable.strings:
1502 * accessibility/AccessibilityProgressIndicator.cpp:
1503 (WebCore::AccessibilityProgressIndicator::gaugeRegionValueDescription):
1504 * accessibility/AccessibilityProgressIndicator.h:
1505 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1506 (-[WebAccessibilityObjectWrapper valueDescriptionForMeter]):
1507 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1508 * platform/LocalizedStrings.cpp:
1509 (WebCore::AXMeterGaugeRegionOptimumText):
1510 (WebCore::AXMeterGaugeRegionSuboptimalText):
1511 (WebCore::AXMeterGaugeRegionLessGoodText):
1512 * platform/LocalizedStrings.h:
1514 2016-10-19 Dave Hyatt <hyatt@apple.com>
1516 [CSS Parser] Fix named color parsing
1517 https://bugs.webkit.org/show_bug.cgi?id=163662
1519 Reviewed by Zalan Bujtas.
1521 Named color parsing in the old parser for extended colors relied on constructing a Color with the
1522 name and doing a lookup that way.
1524 The new parser allows the back end to hold a primitive identifier value for extended colors.
1526 StyleColor contains a helper function for looking up the correct color.
1528 This patch switches both the old and the new parsers over to the new StyleColor function.
1530 Also remove some asserts from the CSSSelectorList, since the new parser allows it to be empty and
1531 detects parsing failure that way.
1533 * css/CSSSelectorList.cpp:
1534 (WebCore::CSSSelectorList::CSSSelectorList):
1535 (WebCore::CSSSelectorList::operator=):
1536 * css/StyleColor.cpp:
1537 (WebCore::StyleColor::isColorKeyword):
1538 * css/StyleResolver.cpp:
1539 (WebCore::StyleResolver::colorFromPrimitiveValue):
1540 (WebCore::colorForCSSValue): Deleted.
1542 2016-10-19 Youenn Fablet <youenn@apple.com>
1544 Remove SecurityOrigin::taintsCanvas
1545 https://bugs.webkit.org/show_bug.cgi?id=163594
1547 Reviewed by Darin Adler.
1549 No change of behavior.
1551 * html/canvas/CanvasRenderingContext.cpp:
1552 (WebCore::CanvasRenderingContext::wouldTaintOrigin):
1553 * page/SecurityOrigin.cpp:
1554 (WebCore::SecurityOrigin::canReceiveDragData):
1555 (WebCore::SecurityOrigin::taintsCanvas): Deleted.
1556 * page/SecurityOrigin.h:
1558 2016-10-18 Dave Hyatt <hyatt@apple.com>
1560 [CSS Parser] Fix compound selector parsing.
1561 https://bugs.webkit.org/show_bug.cgi?id=163649
1563 Reviewed by Darin Adler.
1565 The new CSS parser is failing to handle compound selectors. The code has an assumption that the
1566 first value in the RelationType enum is SubSelector. This patch changes the enum to have the same
1567 name used in Blink, RelationType, and to make the ordering be exactly the same.
1569 * css/CSSSelector.h:
1570 (WebCore::CSSSelector::relation):
1571 (WebCore::CSSSelector::setRelation):
1572 * css/SelectorChecker.cpp:
1573 (WebCore::SelectorChecker::matchRecursively):
1574 (WebCore::canMatchHoverOrActiveInQuirksMode):
1575 (WebCore::SelectorChecker::determineLinkMatchType):
1576 * css/SelectorFilter.cpp:
1577 (WebCore::SelectorFilter::collectIdentifierHashes):
1578 * css/parser/CSSParserValues.cpp:
1579 (WebCore::CSSParserSelector::insertTagHistory):
1580 (WebCore::CSSParserSelector::appendTagHistory):
1581 * css/parser/CSSParserValues.h:
1582 (WebCore::CSSParserSelector::setRelation):
1583 * css/parser/CSSSelectorParser.cpp:
1584 (WebCore::CSSSelectorParser::consumeComplexSelector):
1585 (WebCore::CSSSelectorParser::consumeCombinator):
1586 * css/parser/CSSSelectorParser.h:
1587 * cssjit/SelectorCompiler.cpp:
1588 (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
1589 (WebCore::SelectorCompiler::constructFragmentsInternal):
1591 2016-10-19 Javier Fernandez <jfernandez@igalia.com>
1593 Web Inspector: Debugger buttons positioned incorrectly, align-content default value is unexpected
1594 https://bugs.webkit.org/show_bug.cgi?id=163572
1596 Reviewed by Sergio Villar Senin.
1598 We only allow the new CSS Box Alignment syntax when the Grid Layout
1599 feature is enabled. Due to flexbox backward compatibility we have
1600 implemented a different code path for the style initial/default values
1601 assignment. However, we have incorrectly resolved both align-content
1602 and justify-content to 'flex-start' when grid layout is disabled.
1604 This patch changes the approach, so we set 'normal' (the value specified
1605 by the new syntax) for both properties, but using the values defined in
1606 the old syntax (Flexbox specification) at computed style resolution.
1608 Since 'stretch' is the default value for the align-content property, this
1609 issue implies that any flexbox line with an undefined height will be
1610 laid out incorrectly, if not explicitly set via CSS, because flex items
1611 can't use the available height, even though they use 'stretch' for their
1612 'align-self' properties.
1614 Test: css3/flexbox/flexbox-lines-must-be-stretched-by-default.html
1616 * css/CSSComputedStyleDeclaration.cpp:
1617 (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
1618 (WebCore::ComputedStyleExtractor::propertyValue):
1619 * rendering/style/RenderStyle.h:
1620 (WebCore::RenderStyle::initialContentAlignment):
1622 2016-10-19 Carlos Alberto Lopez Perez <clopez@igalia.com>
1624 [GTK] REGRESSION(r207396) Build broken with Clang.
1625 https://bugs.webkit.org/show_bug.cgi?id=163599
1627 Suggested and reviewed by Darin Adler.
1629 * css/CSSPrimitiveValue.cpp:
1630 (WebCore::CSSPrimitiveValue::getStringValue):
1632 2016-10-19 Darin Adler <darin@apple.com>
1636 * page/PerformanceUserTiming.cpp: Add back class name; needed by some compiler versions.
1638 2016-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
1640 Unreviewed. Fix the build after r207522.
1642 * page/PerformanceUserTiming.cpp: Include PerformanceTiming.h.
1644 2016-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
1646 Unreviewed. Fix the build after r207519.
1649 IDL ATTRIBUTE CHECKER ERROR: Unknown IDL attribute [PassContext] is found at TestRunner.idl.
1651 Because PassContext was removed from IDLAttributes.txt in rr207519, but it's implemented by
1652 CodeGeneratorTestRunner.pm and used by TestRunner.idl.
1654 * bindings/scripts/IDLAttributes.txt: Bring back PassContext.
1656 2016-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
1658 Unreviewed. Fix the build with GCC 4.9 after r207463.
1660 Add constructors to MediaConstraintsData.
1662 * Modules/mediastream/MediaConstraintsImpl.h:
1663 (WebCore::MediaConstraintsData::MediaConstraintsData):
1665 2016-10-19 Jer Noble <jer.noble@apple.com>
1667 [Mac][MSE] Movies with a 'mehd' box have a zero-duration
1668 https://bugs.webkit.org/show_bug.cgi?id=163641
1670 Reviewed by Darin Adler.
1672 Test: media/media-source/media-source-init-segment-duration.html
1674 The canonical (ISO/IEC 14496-12:2012) way to signal the duration of a fragmented media file is to add a
1675 'mehd' box to the 'mvex' container box specifying the duration of the fragment. Support this through the
1676 AVAsset -overallDurationHint property.
1678 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1679 (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1680 * platform/spi/mac/AVFoundationSPI.h:
1682 2016-10-18 Darin Adler <darin@apple.com>
1684 Move many miscellaneous classes from ExceptionCode to Exception
1685 https://bugs.webkit.org/show_bug.cgi?id=163645
1687 Reviewed by Ryosuke Niwa.
1689 * bindings/js/JSCryptoCustom.cpp:
1690 (WebCore::JSCrypto::getRandomValues): Use propagateException.
1691 * bindings/js/JSDOMWindowCustom.cpp:
1692 (WebCore::handlePostMessage): Ditto.
1693 (WebCore::JSDOMWindow::setTimeout): Use toJSNumber.
1694 (WebCore::JSDOMWindow::setInterval): Ditto.
1695 * bindings/js/JSStorageCustom.cpp:
1696 (WebCore::JSStorage::nameGetter): Use propagateException.
1697 (WebCore::JSStorage::deleteProperty): Ditto.
1698 (WebCore::JSStorage::getOwnPropertyNames): Ditto.
1699 (WebCore::JSStorage::putDelegate): Ditto.
1701 * loader/appcache/DOMApplicationCache.cpp:
1702 (WebCore::DOMApplicationCache::update): Use ExceptionOr.
1703 (WebCore::DOMApplicationCache::swapCache): Ditto.
1704 * loader/appcache/DOMApplicationCache.h: Update for above changes.
1705 * loader/appcache/DOMApplicationCache.idl: Use non-legacy exceptions.
1708 (WebCore::Crypto::getRandomValues): Use ExceptionOr.
1709 (WebCore::Crypto::webkitSubtle): Ditto.
1710 * page/Crypto.h: Updated for above changes.
1711 * page/Crypto.idl: Use non-legacy exceptions.
1713 * page/DOMWindow.cpp:
1714 (WebCore::DOMWindow::DOMWindow): Initialize many data members in
1715 the class definition instead of here.
1716 (WebCore::DOMWindow::page): Use nullptr.
1717 (WebCore::DOMWindow::screen): Ditto.
1718 (WebCore::DOMWindow::crypto): Ditto.
1719 (WebCore::DOMWindow::locationbar): Ditto.
1720 (WebCore::DOMWindow::menubar): Ditto.
1721 (WebCore::DOMWindow::personalbar): Ditto.
1722 (WebCore::DOMWindow::scrollbars): Ditto.
1723 (WebCore::DOMWindow::statusbar): Ditto.
1724 (WebCore::DOMWindow::toolbar): Ditto.
1725 (WebCore::DOMWindow::applicationCache): Ditto.
1726 (WebCore::DOMWindow::sessionStorage): Use ExceptionOr.
1727 (WebCore::DOMWindow::localStorage): Ditto.
1728 (WebCore::DOMWindow::postMessage): Ditto.
1729 (WebCore::DOMWindow::frameElement): Use nullptr.
1730 (WebCore::DOMWindow::self): Ditto.
1731 (WebCore::DOMWindow::opener): Ditto.
1732 (WebCore::DOMWindow::parent): Ditto.
1733 (WebCore::DOMWindow::top): Ditto.
1734 (WebCore::DOMWindow::getComputedStyle): Use Ref.
1735 (WebCore::DOMWindow::setTimeout): Use ExceptionOr.
1736 (WebCore::DOMWindow::setInterval): Ditto.
1737 (WebCore::didAddStorageEventListener): Use a reference instead of a
1738 pointer, and ignore return value instead of using IGNORE_EXCEPTION.
1739 (WebCore::DOMWindow::addEventListener): Pass reference to function above.
1740 (WebCore::DOMWindow::dispatchEvent): Use enum class version of PageStatus.
1741 * page/DOMWindow.h: Updated for changes above. Also changed indentatation.
1742 * page/DOMWindow.idl: Use non-legacy exceptions.
1744 * page/EventSource.cpp:
1745 (WebCore::EventSource::create): Use ExceptionOr.
1746 * page/EventSource.h: Updated for change above.
1747 * page/EventSource.idl: Use non-legacy exception.
1749 * page/Location.cpp:
1750 (WebCore::Location::setProtocol): Use ExceptionOr.
1751 * page/Location.h: Updated for change above.
1752 * page/Location.idl: Use non-legacy exception.
1754 * page/Performance.cpp:
1755 (WebCore::Performance::Performance): Remove unnecessary initialization of
1756 smart pointer to null, and moved initialization of m_resourceTimingBufferSize
1758 (WebCore::Performance::navigation): Made non-const and return a reference.
1759 (WebCore::Performance::timing): Ditto.
1760 (WebCore::Performance::addResourceTiming): Change LoadTiming argument to use
1761 a const& instead of passing in a copy.
1762 (WebCore::Performance::webkitMark): Use ExceptionOr and make_unique.
1763 (WebCore::Performance::webkitClearMarks): Ditto.
1764 (WebCore::Performance::webkitMeasure): Ditto.
1765 (WebCore::Performance::webkitClearMeasures): Ditto.
1766 (WebCore::Performance::reduceTimeResolution): Use std::floor.
1767 * page/Performance.h: Updated for above changes. Removed unneeded includes.
1768 Made more things private. Removed unneeded reference counting of UserTiming.
1769 * page/Performance.idl: Use non-legacy exceptions.
1771 * page/PerformanceUserTiming.cpp:
1772 (WebCore::restrictedMarkFunction): Removed unneeded class name.
1773 (WebCore::UserTiming::UserTiming): Take a reference instead of a pointer.
1774 (WebCore::UserTiming::mark): Use ExceptionOr.
1775 (WebCore::UserTiming::findExistingMarkStartTime): Ditto.
1776 (WebCore::UserTiming::measure): Ditto.
1777 (WebCore::getEntrySequenceByName): Simplified code using HashMap::get.
1778 * page/PerformanceUserTiming.h: Updated for above changes. Removed reference
1779 counting since this is a single-owner object.
1781 * page/UserMessageHandler.cpp:
1782 (WebCore::UserMessageHandler::postMessage): Use ExceptionOr.
1783 * page/UserMessageHandler.h: Updated for above change.
1784 * page/UserMessageHandler.idl: Use non-legacy exception.
1786 * storage/Storage.cpp:
1787 (WebCore::Storage::length): Use ExceptionOr.
1788 (WebCore::Storage::key): Ditto.
1789 (WebCore::Storage::getItem): Ditto.
1790 (WebCore::Storage::setItem): Ditto.
1791 (WebCore::Storage::removeItem): Ditto.
1792 (WebCore::Storage::clear): Ditto.
1793 (WebCore::Storage::contains): Ditto.
1794 * storage/Storage.h: Updated for above change.
1795 * storage/Storage.idl: Use non-legacy exceptions.
1797 * storage/StorageEventDispatcher.cpp:
1798 (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
1799 Updated for ExceptionOr.
1800 (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames): Ditto.
1802 2016-10-18 Darin Adler <darin@apple.com>
1804 Move internal testing classes from ExceptionCode to Exception
1805 https://bugs.webkit.org/show_bug.cgi?id=163553
1807 Reviewed by Ryosuke Niwa.
1809 * bindings/js/JSDOMBinding.h: Added toJSArray. Also exported a function that
1810 is now needed in the testing library.
1811 * bindings/scripts/CodeGeneratorJS.pm:
1812 (NativeToJSValue): Added code to handle the jsArray case with an exception.
1814 * css/parser/CSSPropertyParser.cpp: Fix #if to make code compile when
1815 CSS_SCROLL_SNAP is not enabled.
1818 (WebCore::Element::createShadowRoot): Changed return type to a raw pointer.
1819 There is no reason it needs to be a RefPtr.
1820 * dom/Element.h: Updated for above change.
1822 * svg/SVGPathStringBuilder.h: Exported class and made more public so it can
1823 be used in test code.
1825 * svg/SVGPathUtilities.cpp:
1826 (WebCore::pathIteratorForBuildingString): Deleted. Needed only for test code,
1827 so moved into there.
1828 (WebCore::buildStringFromPath): Deleted. Ditto.
1829 * svg/SVGPathUtilities.h: Removed buildStringFromPath.
1831 * testing/InternalSettings.cpp: Simplified the guard macro and used the all
1832 capitals style that our style guide prescribes for non-function-like macros.
1833 (WebCore::InternalSettings::create): Moved here, no longer inline Use m_page.
1834 (WebCore::InternalSettings::resetToConsistentState): Updated since settings
1835 returns a reference.
1836 (WebCore::InternalSettings::settings): Changed to return a reference and
1837 assert that m_page is not null; functions all check m_page for null first.
1838 (WebCore::InternalSettings::setTouchEventEmulationEnabled): Updated to use
1839 ExceptionOr, do an m_page check, and use settings that returns a reference.
1840 (WebCore::InternalSettings::setStandardFontFamily): Ditto.
1841 (WebCore::InternalSettings::setSerifFontFamily): Ditto.
1842 (WebCore::InternalSettings::setSansSerifFontFamily): Ditto.
1843 (WebCore::InternalSettings::setFixedFontFamily): Ditto.
1844 (WebCore::InternalSettings::setCursiveFontFamily): Ditto.
1845 (WebCore::InternalSettings::setFantasyFontFamily): Ditto.
1846 (WebCore::InternalSettings::setPictographFontFamily): Ditto.
1847 (WebCore::InternalSettings::setTextAutosizingEnabled): Ditto.
1848 (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): Ditto.
1849 (WebCore::InternalSettings::setMediaTypeOverride): Ditto.
1850 (WebCore::InternalSettings::setCanStartMedia): Ditto.
1851 (WebCore::InternalSettings::setAllowsAirPlayForMediaPlayback): Ditto.
1852 (WebCore::InternalSettings::setEditingBehavior): Ditto.
1853 (WebCore::InternalSettings::setShouldDisplayTrackKind): Ditto.
1854 (WebCore::InternalSettings::shouldDisplayTrackKind): Ditto.
1855 (WebCore::InternalSettings::setStorageBlockingPolicy): Ditto.
1856 (WebCore::InternalSettings::setPreferMIMETypeForImages): Ditto.
1857 (WebCore::InternalSettings::setImagesEnabled): Ditto.
1858 (WebCore::InternalSettings::setPDFImageCachingPolicy): Ditto.
1859 (WebCore::InternalSettings::setMinimumTimerInterval): Ditto.
1860 (WebCore::InternalSettings::setDefaultVideoPosterURL): Ditto.
1861 (WebCore::InternalSettings::setForcePendingWebGLPolicy): Ditto.
1862 (WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls): Ditto.
1863 (WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior): Ditto.
1864 (WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled): Ditto.
1865 (WebCore::InternalSettings::setFontFallbackPrefersPictographs): Ditto.
1866 (WebCore::InternalSettings::setWebFontsAlwaysFallBack): Ditto.
1867 (WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Ditto.
1868 (WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Ditto.
1869 (WebCore::InternalSettings::setBackgroundShouldExtendBeyondPage): Ditto.
1870 (WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy): Ditto.
1871 (WebCore::InternalSettings::setScrollingTreeIncludesFrames): Ditto.
1872 (WebCore::InternalSettings::setAllowsInlineMediaPlayback): Ditto.
1873 (WebCore::InternalSettings::setAllowsInlineMediaPlaybackAfterFullscreen): Ditto.
1874 (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute): Ditto.
1875 (WebCore::InternalSettings::setIndexedDBWorkersEnabled): Ditto.
1876 (WebCore::InternalSettings::userInterfaceDirectionPolicy): Ditto.
1877 (WebCore::InternalSettings::setUserInterfaceDirectionPolicy): Ditto.
1878 (WebCore::InternalSettings::systemLayoutDirection): Ditto.
1879 (WebCore::InternalSettings::setSystemLayoutDirection): Ditto.
1880 (WebCore::InternalSettings::variationFontsEnabled): Ditto.
1881 (WebCore::InternalSettings::setVariationFontsEnabled): Ditto.
1882 (WebCore::InternalSettings::forcedPrefersReducedMotionValue): Ditto.
1883 (WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Ditto.
1884 * testing/InternalSettings.h: Updated for above changes. Also moved Backup to make
1885 it private instead of public.
1886 * testing/InternalSettings.idl: Use non-legacy execption. Also removed unneeded
1887 exception for setIndexedDBWorkersEnabled.
1889 * testing/Internals.cpp: Marked InspectorStubFrontend final and made everything private.
1890 (WebCore::Internals::setCanShowModalDialogOverride): Use ExceptionOr.
1891 (WebCore::Internals::lastSpatialNavigationCandidateCount): Ditto.
1892 (WebCore::Internals::animationsAreSuspended): Ditto.
1893 (WebCore::Internals::suspendAnimations): Ditto.
1894 (WebCore::Internals::resumeAnimations): Ditto.
1895 (WebCore::Internals::pauseAnimationAtTimeOnElement): Ditto.
1896 (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
1897 (WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
1898 (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
1899 (WebCore::Internals::elementRenderTreeAsText): Ditto.
1900 (WebCore::Internals::ensureShadowRoot): Ditto.
1901 (WebCore::Internals::createShadowRoot): Ditto.
1902 (WebCore::Internals::shadowRootType): Ditto.
1903 (WebCore::Internals::isTimerThrottled): Ditto.
1904 (WebCore::Internals::formControlStateOfPreviousHistoryItem): Ditto.
1905 (WebCore::Internals::setFormControlStateOfPreviousHistoryItem): Ditto.
1906 (WebCore::Internals::absoluteCaretBounds): Ditto.
1907 (WebCore::Internals::inspectorHighlightRects): Ditto.
1908 (WebCore::Internals::inspectorHighlightObject): Ditto.
1909 (WebCore::Internals::markerCountForNode): Ditto.
1910 (WebCore::Internals::markerAt): Ditto.
1911 (WebCore::Internals::markerRangeForNode): Ditto.
1912 (WebCore::Internals::markerDescriptionForNode): Ditto.
1913 (WebCore::Internals::dumpMarkerRects): Ditto.
1914 (WebCore::Internals::setMarkedTextMatchesAreHighlighted): Ditto.
1915 (WebCore::Internals::setScrollViewPosition): Ditto.
1916 (WebCore::Internals::setViewBaseBackgroundColor): Ditto.
1917 (WebCore::Internals::setPagination): Ditto.
1918 (WebCore::Internals::setPaginationLineGridEnabled): Ditto.
1919 (WebCore::Internals::configurationForViewport): Ditto.
1920 (WebCore::Internals::wasLastChangeUserEdit): Ditto.
1921 (WebCore::Internals::scrollElementToRect): Ditto.
1922 (WebCore::Internals::autofillFieldName): Ditto.
1923 (WebCore::Internals::paintControlTints): Ditto.
1924 (WebCore::Internals::rangeForDictionaryLookupAtLocation): Ditto.
1925 (WebCore::Internals::setDelegatesScrolling): Ditto.
1926 (WebCore::Internals::lastSpellCheckRequestSequence): Ditto.
1927 (WebCore::Internals::lastSpellCheckProcessedSequence): Ditto.
1928 (WebCore::Internals::wheelEventHandlerCount): Ditto.
1929 (WebCore::Internals::touchEventHandlerCount): Ditto.
1930 (WebCore::Internals::nodesFromRect): Ditto.
1931 (WebCore::Internals::setBatteryStatus): Ditto.
1932 (WebCore::Internals::setDeviceProximity): Ditto.
1933 (WebCore::Internals::hasSpellingMarker): Ditto.
1934 (WebCore::Internals::hasAutocorrectedMarker): Ditto.
1935 (WebCore::Internals::handleAcceptedCandidate): Ditto.
1936 (WebCore::Internals::isOverwriteModeEnabled): Ditto.
1937 (WebCore::Internals::toggleOverwriteModeEnabled): Ditto.
1938 (WebCore::Internals::countMatchesForText): Ditto.
1939 (WebCore::Internals::countFindMatches): Ditto.
1940 (WebCore::Internals::setInspectorIsUnderTest): Ditto.
1941 (WebCore::Internals::hasGrammarMarker): Ditto.
1942 (WebCore::Internals::numberOfScrollableAreas): Ditto.
1943 (WebCore::Internals::isPageBoxVisible): Ditto.
1944 (WebCore::Internals::layerTreeAsText): Ditto.
1945 (WebCore::Internals::repaintRectsAsText): Ditto.
1946 (WebCore::Internals::scrollingStateTreeAsText): Ditto.
1947 (WebCore::Internals::mainThreadScrollingReasons): Ditto.
1948 (WebCore::Internals::nonFastScrollableRects): Ditto.
1949 (WebCore::Internals::setElementUsesDisplayListDrawing): Ditto.
1950 (WebCore::Internals::setElementTracksDisplayListReplay): Ditto.
1951 (WebCore::Internals::displayListForElement): Ditto.
1952 (WebCore::Internals::replayDisplayListForElement): Ditto.
1953 (WebCore::Internals::garbageCollectDocumentResources): Ditto.
1954 (WebCore::Internals::insertAuthorCSS): Ditto.
1955 (WebCore::Internals::insertUserCSS): Ditto.
1956 (WebCore::Internals::pageProperty): Ditto.
1957 (WebCore::Internals::pageSizeAndMarginsInPixels): Ditto.
1958 (WebCore::Internals::setPageScaleFactor): Ditto.
1959 (WebCore::Internals::setPageZoomFactor): Ditto.
1960 (WebCore::Internals::setTextZoomFactor): Ditto.
1961 (WebCore::Internals::setUseFixedLayout): Ditto.
1962 (WebCore::Internals::setFixedLayoutSize): Ditto.
1963 (WebCore::Internals::setViewExposedRect): Ditto.
1964 (WebCore::Internals::setHeaderHeight): Ditto.
1965 (WebCore::Internals::setFooterHeight): Ditto.
1966 (WebCore::Internals::setTopContentInset): Ditto.
1967 (WebCore::Internals::setApplicationCacheOriginQuota): Ditto.
1968 (WebCore::Internals::startTrackingRepaints): Ditto.
1969 (WebCore::Internals::stopTrackingRepaints): Ditto.
1970 (WebCore::Internals::startTrackingLayerFlushes): Ditto.
1971 (WebCore::Internals::layerFlushCount): Ditto.
1972 (WebCore::Internals::startTrackingStyleRecalcs): Ditto.
1973 (WebCore::Internals::styleRecalcCount): Ditto.
1974 (WebCore::Internals::startTrackingCompositingUpdates): Ditto.
1975 (WebCore::Internals::compositingUpdateCount): Ditto.
1976 (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Ditto.
1977 (WebCore::Internals::getCurrentCursorInfo): Ditto.
1978 (WebCore::Internals::mediaElementHasCharacteristic): Ditto.
1979 (WebCore::Internals::captionsStyleSheetOverride): Ditto.
1980 (WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
1981 (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
1982 (WebCore::Internals::setCaptionDisplayMode): Ditto.
1983 (WebCore::Internals::selectionBounds): Ditto.
1984 (WebCore::Internals::isVibrating): Ditto.
1985 (WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Ditto.
1986 (WebCore::Internals::beginMediaSessionInterruption): Ditto.
1987 (WebCore::Internals::setMediaSessionRestrictions): Ditto.
1988 (WebCore::Internals::postRemoteControlCommand): Ditto.
1989 (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto.
1990 (WebCore::Internals::installMockPageOverlay): Ditto.
1991 (WebCore::Internals::pageOverlayLayerTreeAsText): Ditto.
1992 (WebCore::Internals::scrollSnapOffsets): Ditto.
1993 (WebCore::Internals::pathStringWithShrinkWrappedRects): Moved the code that builds
1994 the path string in here for now since it's only used for this testing.
1995 (WebCore::Internals::resourceLoadStatisticsForOrigin): Take a const String&.
1997 * testing/Internals.h: Updated for above changes.
1998 * testing/Internals.idl: Use non-legacy exceptions.
2000 2016-10-18 Chris Dumez <cdumez@apple.com>
2002 [Web IDL] Drop webkit-specific extended attributes that are no longer useful
2003 https://bugs.webkit.org/show_bug.cgi?id=163643
2005 Reviewed by Ryosuke Niwa.
2007 Drop webkit-specific IDL extended attributes that are no longer useful:
2008 - [CustomReturn]: I believe this used to be for ObjC bindings. It has
2009 no impact in JS bindings.
2010 - [Deletable]: It only had an impact on static attributes and was only
2011 used on HTMLAllCollection.all, which is not static. I updated the
2012 bindings generator to so that static attributes are now configurable
2013 by default (unless marked as [Unforgeable], as per Web IDL [1]. This
2014 causes Notification.permission (This only static attribute we have)
2015 to become deletable. This behavior is consistent with the specification
2016 and with Chrome. I added test coverage for this.
2017 - [ImplementationNamespace]: Implemented but unused.
2018 - [PassContext]: Not implemented and unused.
2019 - [TypedArray=*]: Not implemented and unused.
2021 [1] https://heycam.github.io/webidl/#es-attributes
2023 Test: fast/notifications/notification-permisssion-deletable.html
2025 * bindings/scripts/CodeGeneratorJS.pm:
2026 (GetNamespaceForInterface):
2027 (GenerateImplementation):
2028 * bindings/scripts/IDLAttributes.txt:
2029 * bindings/scripts/test/JS/JSTestInterface.cpp:
2030 * bindings/scripts/test/JS/JSTestObj.cpp:
2031 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2033 * html/HTMLDocument.idl:
2035 2016-10-18 Sam Weinig <sam@webkit.org>
2037 Replace std::experimental::variant with WTF::Variant (or similar)
2038 https://bugs.webkit.org/show_bug.cgi?id=163626
2040 Reviewed by Chris Dumez.
2042 Rename std::experimental::variant, Variant. Move helpers get/holds_alternative/etc.
2043 into the WTF namespace.
2045 * Modules/fetch/FetchBody.h:
2046 (WebCore::FetchBody::isBlob):
2047 (WebCore::FetchBody::isFormData):
2048 (WebCore::FetchBody::isArrayBuffer):
2049 (WebCore::FetchBody::isArrayBufferView):
2050 (WebCore::FetchBody::isURLSearchParams):
2051 (WebCore::FetchBody::isText):
2052 (WebCore::FetchBody::blobBody):
2053 (WebCore::FetchBody::formDataBody):
2054 (WebCore::FetchBody::arrayBufferBody):
2055 (WebCore::FetchBody::arrayBufferViewBody):
2056 (WebCore::FetchBody::textBody):
2057 (WebCore::FetchBody::urlSearchParamsBody):
2058 * bindings/generic/IDLTypes.h:
2059 * dom/ExceptionOr.h:
2060 (WebCore::ExceptionOr<ReturnType>::hasException):
2061 (WebCore::ExceptionOr<ReturnType>::releaseException):
2062 (WebCore::ExceptionOr<ReturnType>::releaseReturnValue):
2063 * dom/MessageEvent.cpp:
2064 (WebCore::MessageEvent::source):
2065 * dom/MessageEvent.h:
2067 (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
2068 (WebCore::Node::convertNodesOrStringsIntoNode):
2070 * html/HTMLOptionsCollection.h:
2071 * html/HTMLSelectElement.cpp:
2072 (WebCore::HTMLSelectElement::add):
2073 * html/HTMLSelectElement.h:
2074 * html/track/TrackEvent.cpp:
2075 (WebCore::TrackEvent::TrackEvent):
2076 * html/track/TrackEvent.h:
2078 2016-10-18 Chris Dumez <cdumez@apple.com>
2080 Unreviewed, rebaseline bindings tests after Sam's r207505.
2082 * bindings/scripts/test/JS/JSTestCallback.cpp:
2083 (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
2084 * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
2085 (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
2086 * bindings/scripts/test/JS/JSTestObj.cpp:
2087 (WebCore::jsTestObjPrototypeFunctionSerializedValueCaller):
2088 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2089 (WebCore::jsTestSerializedScriptValueInterfaceValueGetter):
2090 (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValueGetter):
2091 (WebCore::jsTestSerializedScriptValueInterfaceCachedValueGetter):
2092 (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter):
2093 (WebCore::setJSTestSerializedScriptValueInterfaceValueFunction):
2094 (WebCore::setJSTestSerializedScriptValueInterfaceCachedValueFunction):
2095 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2096 (WebCore::jsTestTypedefsImmutableSerializedScriptValueGetter):
2097 (WebCore::setJSTestTypedefsImmutableSerializedScriptValueFunction):
2099 2016-10-18 Chris Dumez <cdumez@apple.com>
2101 [Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor]
2102 https://bugs.webkit.org/show_bug.cgi?id=163630
2104 Reviewed by Darin Adler.
2106 Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] in our
2107 IDL now that all our events use proper constructors instead.
2109 * bindings/scripts/CodeGenerator.pm:
2110 * bindings/scripts/CodeGeneratorJS.pm:
2112 (GenerateConstructorDefinition):
2113 (GenerateConstructorHelperMethods):
2115 * bindings/scripts/IDLAttributes.txt:
2117 (WebCore::Event::create):
2120 (WebCore::UIEvent::create):
2123 2016-10-18 Chris Dumez <cdumez@apple.com>
2125 Changing details.open should cause a toggle event to be fired asynchronously
2126 https://bugs.webkit.org/show_bug.cgi?id=163568
2128 Reviewed by Darin Adler.
2130 Changing details.open should cause a toggle event to be fired asynchronously:
2131 - https://html.spec.whatwg.org/#details-notification-task-steps
2133 Firefox and Chrome implement this, we don't.
2135 Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html
2138 * dom/GlobalEventHandlers.idl:
2139 * html/HTMLAttributeNames.in:
2140 * html/HTMLDetailsElement.cpp:
2141 (WebCore::detailToggleEventSender):
2142 (WebCore::HTMLDetailsElement::~HTMLDetailsElement):
2143 (WebCore::HTMLDetailsElement::dispatchPendingEvent):
2144 (WebCore::HTMLDetailsElement::parseAttribute):
2145 * html/HTMLDetailsElement.h:
2146 * html/HTMLElement.cpp:
2147 (WebCore::HTMLElement::createEventHandlerNameMap):
2149 2016-10-18 Dave Hyatt <hyatt@apple.com>
2151 [CSS Parser] Enable basic parser testing.
2152 https://bugs.webkit.org/show_bug.cgi?id=163639
2154 Reviewed by Dean Jackson.
2156 * css/SelectorChecker.cpp:
2157 (WebCore::SelectorChecker::matchRecursively):
2158 Remove the ASSERT_NOT_REACHED on the new shadow selectors. We need to implement this
2159 eventually, but it's better to not assert on that for now.
2161 * css/parser/CSSParserValues.cpp:
2162 (WebCore::CSSParserSelector::isHostPseudoSelector):
2163 Make sure to check that we're a pseudoclass selector first, since otherwise we'll assert.
2165 * css/parser/CSSParserValues.h:
2166 (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
2167 Make sure to check that we're a pseudoelement selector first, since otherwise we'll assert.
2169 * css/parser/CSSPropertyParser.cpp:
2170 (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
2171 copyRef is needed here, since a singleton value is being propagated to all the expanded shorthand properties.
2173 (WebCore::parseSingleShadow):
2174 (WebCore::CSSPropertyParser::consumeFont):
2175 Remove the font properties that aren't part of our shorthand. We will need to revisit this eventually as it seems
2176 some of the font properties should be reset as part of this shorthand but aren't.
2178 * css/parser/CSSPropertyParserHelpers.cpp:
2179 (WebCore::CSSPropertyParserHelpers::consumeInteger):
2180 Just return a number for now instead of the parser_integer type.
2182 * css/parser/CSSSelectorParser.cpp:
2183 (WebCore::CSSSelectorParser::consumePseudo):
2184 Clean this up so that it doesn't assert by making sure to add qualifying checks for the appropriate match type.
2186 2016-10-18 Ryosuke Niwa <rniwa@webkit.org>
2188 Update the comment for HTML Imports as there is now a proposal to use ES6 Modules for this.
2189 Also replace the contact by me since I'm most familiar with this feature.
2193 2016-10-18 Ryosuke Niwa <rniwa@webkit.org>
2195 Update the status of shadow DOM API to "Done" with a comment saying we're still fixing bugs.
2197 Also update my contact information since I'm no longer on Twitter.
2201 2016-10-18 Chris Dumez <cdumez@apple.com>
2203 Provide better form validation messages
2204 https://bugs.webkit.org/show_bug.cgi?id=163584
2206 Reviewed by Darin Adler.
2208 Provide better form validation messages that match more closely the ones
2209 from Chrome and Firefox.
2211 No new tests, updated existing tests.
2213 * English.lproj/Localizable.strings:
2214 * platform/LocalizedStrings.cpp:
2215 (WebCore::validationMessageValueMissingText):
2216 (WebCore::validationMessageValueMissingForCheckboxText):
2217 (WebCore::validationMessageValueMissingForFileText):
2218 (WebCore::validationMessageValueMissingForMultipleFileText):
2219 (WebCore::validationMessageValueMissingForRadioText):
2220 (WebCore::validationMessageValueMissingForSelectText):
2221 (WebCore::validationMessageTypeMismatchText):
2222 (WebCore::validationMessageTypeMismatchForEmailText):
2223 (WebCore::validationMessageTypeMismatchForMultipleEmailText):
2224 (WebCore::validationMessageTypeMismatchForURLText):
2225 (WebCore::validationMessagePatternMismatchText):
2226 (WebCore::validationMessageTooShortText):
2227 (WebCore::validationMessageTooLongText):
2228 (WebCore::validationMessageRangeUnderflowText):
2229 (WebCore::validationMessageRangeOverflowText):
2230 (WebCore::validationMessageStepMismatchText):
2231 (WebCore::validationMessageBadInputForNumberText):
2233 2016-10-18 Dave Hyatt <hyatt@apple.com>
2237 * css/parser/CSSPropertyParser.cpp:
2238 (WebCore::CSSPropertyParser::parseSingleValue):
2240 2016-10-18 Sam Weinig <sam@webkit.org>
2242 Simplify SerializedScriptValue, MessagePortArray and ArrayBufferArray to ease generation
2243 https://bugs.webkit.org/show_bug.cgi?id=163625
2245 Reviewed by Chris Dumez.
2247 - Replace uses of MessagePortArray (a.k.a. Vector<RefPtr<MessagePort>, 1>) with Vector<RefPtr<MessagePort>>.
2248 - Replace uses of ArrayBufferArray (a.k.a. Vector<RefPtr<ArrayBuffer>, 1>) with Vector<RefPtr<ArrayBuffer>>.
2249 - Add convenience functions to SerializedScriptValue to allow calling with fewer parameters.
2250 - Move MessagePorts and ArrayBuffers more where possible.
2252 * Modules/indexeddb/IDBObjectStore.cpp:
2253 (WebCore::IDBObjectStore::putOrAdd):
2254 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2255 (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2256 * bindings/js/IDBBindingUtilities.cpp:
2257 (WebCore::deserializeIDBValueToJSValue):
2258 * bindings/js/JSCustomEventCustom.cpp:
2259 (WebCore::JSCustomEvent::detail):
2260 * bindings/js/JSHistoryCustom.cpp:
2261 (WebCore::JSHistory::state):
2262 (WebCore::JSHistory::pushState):
2263 (WebCore::JSHistory::replaceState):
2264 * bindings/js/JSPopStateEventCustom.cpp:
2265 (WebCore::JSPopStateEvent::state):
2266 * dom/CustomEvent.cpp:
2267 (WebCore::CustomEvent::trySerializeDetail):
2268 * dom/ErrorEvent.cpp:
2269 (WebCore::ErrorEvent::sanitizedErrorValue):
2270 (WebCore::ErrorEvent::trySerializeError):
2271 * dom/PopStateEvent.cpp:
2272 (WebCore::PopStateEvent::trySerializeState):
2273 * page/DOMWindow.cpp:
2274 (WebCore::DOMWindow::postMessage):
2276 * workers/DedicatedWorkerGlobalScope.cpp:
2277 (WebCore::DedicatedWorkerGlobalScope::postMessage):
2278 * workers/DedicatedWorkerGlobalScope.h:
2279 * workers/Worker.cpp:
2280 (WebCore::Worker::postMessage):
2282 * bindings/js/JSDOMWindowCustom.cpp:
2283 (WebCore::handlePostMessage):
2284 * bindings/js/JSDictionary.cpp:
2285 (WebCore::JSDictionary::convertValue):
2286 * bindings/js/JSDictionary.h:
2287 Updated for new SerializedScriptValue interface/vector naming.
2289 * bindings/js/JSMessageEventCustom.cpp:
2290 (WebCore::handleInitMessageEvent):
2291 Update handleInitMessageEvent to check for exceptions and use convert for the MessagePort sequence.
2293 * bindings/js/JSMessagePortCustom.cpp:
2294 (WebCore::extractTransferables):
2295 (WebCore::fillMessagePortArray): Deleted.
2296 * bindings/js/JSMessagePortCustom.h:
2297 (WebCore::handlePostMessage):
2298 Rename fillMessagePortArray to extractTransferables to better express what it does.
2300 * bindings/js/SerializedScriptValue.cpp:
2301 (WebCore::CloneSerializer::serialize):
2302 (WebCore::CloneSerializer::CloneSerializer):
2303 (WebCore::CloneSerializer::fillTransferMap):
2304 (WebCore::CloneSerializer::dumpIfTerminal):
2305 (WebCore::CloneDeserializer::deserialize):
2306 (WebCore::CloneDeserializer::CloneDeserializer):
2307 (WebCore::CloneDeserializer::readTerminal):
2308 (WebCore::SerializedScriptValue::transferArrayBuffers):
2309 (WebCore::SerializedScriptValue::create):
2310 (WebCore::SerializedScriptValue::deserialize):
2311 * bindings/js/SerializedScriptValue.h:
2312 Simplify interface to allow more callers to avoid passing default arguments. Use ExecState& more.
2313 * bindings/scripts/CodeGeneratorJS.pm:
2314 (GetNativeVectorType):
2315 Remove special case for MessagePort.
2318 Updated for new SerializedScriptValue interface.
2320 * dom/MessageEvent.cpp:
2321 (WebCore::MessageEvent::MessageEvent):
2322 (WebCore::MessageEvent::create):
2323 (WebCore::MessageEvent::initMessageEvent):
2324 (WebCore::MessageEvent::trySerializeData):
2325 * dom/MessageEvent.h:
2326 Store the MessagePort sequence as a Vector<RefPtr<MessagePort>> rather than in a unique_ptr.
2328 * dom/MessageEvent.idl:
2329 Update last type in init functions to be sequence<MessagePort> rather than Array. They are still
2330 custom, as we don't quite generate these correctly yet.
2332 * dom/MessagePort.cpp:
2333 (WebCore::MessagePort::postMessage):
2334 (WebCore::MessagePort::dispatchMessages):
2335 (WebCore::MessagePort::disentanglePorts):
2336 (WebCore::MessagePort::entanglePorts):
2337 * dom/MessagePort.h:
2338 Update interface to take MessagePort vectors by rvalue reference.
2340 2016-10-18 Chris Dumez <cdumez@apple.com>
2342 [iOS] Drop JSDictionary::convertValue() overload taking a TouchList
2343 https://bugs.webkit.org/show_bug.cgi?id=163620
2345 Reviewed by Sam Weinig.
2347 Drop JSDictionary::convertValue() overload taking a TouchList now that
2348 TouchEvent is using a proper constructor with a TouchEventInit
2351 * bindings/js/JSDictionary.cpp:
2353 2016-10-18 Dean Jackson <dino@apple.com>
2355 Remove CSS_SHAPES feature definition. This should always be on.
2356 https://bugs.webkit.org/show_bug.cgi?id=163628
2357 <rdar://problem/28834613>
2359 Reviewed by Tim Horton.
2361 CSS Shapes is in Candidate Recommendation. It's a core part
2362 of CSS. It should always be enabled.
2364 * Configurations/FeatureDefines.xcconfig:
2365 * css/CSSComputedStyleDeclaration.cpp:
2366 (WebCore::shapePropertyValue):
2367 (WebCore::ComputedStyleExtractor::propertyValue):
2368 * css/CSSPropertyNames.in:
2369 * css/CSSValueKeywords.in:
2370 * css/StyleBuilderConverter.h:
2371 (WebCore::StyleBuilderConverter::convertShapeValue):
2372 * css/parser/CSSParser.cpp:
2373 (WebCore::isSimpleLengthPropertyID):
2374 (WebCore::CSSParser::parseValue):
2375 (WebCore::CSSParser::parseShapeProperty):
2376 * css/parser/CSSParser.h:
2377 * inspector/InspectorOverlay.cpp:
2378 (WebCore::buildObjectForShapeOutside):
2379 (WebCore::buildObjectForElementData):
2380 * page/animation/CSSPropertyAnimation.cpp:
2381 (WebCore::blendFunc):
2382 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2383 * rendering/FloatingObjects.cpp:
2384 (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
2385 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
2386 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
2387 * rendering/RenderBlock.cpp:
2388 * rendering/RenderBlockFlow.cpp:
2389 (WebCore::RenderBlockFlow::positionNewFloats):
2390 * rendering/RenderBox.cpp:
2391 (WebCore::RenderBox::~RenderBox):
2392 (WebCore::RenderBox::styleDidChange):
2393 (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
2394 (WebCore::isCandidateForOpaquenessTest):
2395 (WebCore::RenderBox::imageChanged):
2396 * rendering/RenderBox.h:
2397 (WebCore::RenderBox::markShapeOutsideDependentsForLayout):
2398 * rendering/RenderElement.cpp:
2399 (WebCore::RenderElement::~RenderElement):
2400 (WebCore::RenderElement::updateShapeImage):
2401 (WebCore::RenderElement::initializeStyle):
2402 (WebCore::RenderElement::setStyle):
2403 * rendering/RenderElement.h:
2404 (WebCore::RenderElement::hasShapeOutside):
2405 * rendering/SimpleLineLayout.cpp:
2406 (WebCore::SimpleLineLayout::canUseForWithReason):
2407 * rendering/line/LineWidth.cpp:
2408 (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2409 (WebCore::LineWidth::wrapNextToShapeOutside):
2410 (WebCore::LineWidth::fitBelowFloats):
2411 * rendering/line/LineWidth.h:
2412 * rendering/shapes/ShapeOutsideInfo.cpp:
2413 * rendering/shapes/ShapeOutsideInfo.h:
2414 * rendering/style/RenderStyle.cpp:
2415 (WebCore::RenderStyle::changeRequiresLayout):
2416 (WebCore::RenderStyle::changeRequiresRepaint):
2417 * rendering/style/RenderStyle.h:
2418 (WebCore::RenderStyle::initialShapeImageThreshold):
2419 * rendering/style/ShapeValue.cpp:
2420 * rendering/style/ShapeValue.h:
2421 * rendering/style/StyleRareNonInheritedData.cpp:
2422 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2423 (WebCore::StyleRareNonInheritedData::operator==):
2424 * rendering/style/StyleRareNonInheritedData.h:
2425 * style/StylePendingResources.cpp:
2426 (WebCore::Style::loadPendingResources):
2428 2016-10-18 Chris Dumez <cdumez@apple.com>
2430 convertDictionary<>() no longer needs to return an Optional<> type
2431 https://bugs.webkit.org/show_bug.cgi?id=163624
2433 Reviewed by Sam Weinig.
2435 convertDictionary<>() no longer needs to return an Optional<> type now
2436 that our dictionary structures are all default constructible after
2437 <https://trac.webkit.org/changeset/206974>.
2439 * bindings/js/JSDOMConvert.h:
2440 * bindings/scripts/CodeGeneratorJS.pm:
2441 (GenerateDictionaryHeaderContent):
2442 (GenerateDictionaryImplementationContent):
2443 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2444 (WebCore::convertDictionary<TestEventConstructor::Init>):
2445 * bindings/scripts/test/JS/JSTestEventConstructor.h:
2446 * bindings/scripts/test/JS/JSTestObj.cpp:
2447 (WebCore::convertDictionary<TestObj::Dictionary>):
2448 (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
2449 (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
2450 (WebCore::convertDictionary<AlternateDictionaryName>):
2451 (WebCore::convertDictionary<TestObj::ParentDictionary>):
2452 (WebCore::convertDictionary<TestObj::ChildDictionary>):
2453 * bindings/scripts/test/JS/JSTestObj.h:
2454 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
2455 (WebCore::convertDictionary<DictionaryImplName>):
2456 * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
2458 2016-10-18 Chris Dumez <cdumez@apple.com>
2460 Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add()
2461 https://bugs.webkit.org/show_bug.cgi?id=163608
2463 Reviewed by Ryosuke Niwa.
2465 Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add():
2466 - https://html.spec.whatwg.org/#htmlselectelement
2467 - https://html.spec.whatwg.org/#htmloptionscollection
2469 No new tests, rebaseline existing test.
2471 * bindings/scripts/CodeGeneratorJS.pm:
2472 (GenerateDefaultValue):
2473 (GenerateParametersCheck):
2474 * bindings/scripts/test/JS/JSTestObj.cpp:
2475 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller):
2476 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2477 (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
2478 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2479 (WebCore::jsTestTypedefsPrototypeFunctionFuncCaller):
2480 * html/HTMLOptGroupElement.idl:
2481 * html/HTMLOptionsCollection.cpp:
2482 (WebCore::HTMLOptionsCollection::add):
2483 * html/HTMLOptionsCollection.h:
2484 * html/HTMLOptionsCollection.idl:
2485 * html/HTMLSelectElement.cpp:
2486 (WebCore::HTMLSelectElement::add):
2487 (WebCore::HTMLSelectElement::setOption):
2488 (WebCore::HTMLSelectElement::setLength):
2489 * html/HTMLSelectElement.h:
2490 * html/HTMLSelectElement.idl:
2492 2016-10-18 Aaron Chu <aaron_chu@apple.com>
2494 Web Inspector: AXI: focused/focusable state should be based on Accessibility Object instead of Element
2495 https://bugs.webkit.org/show_bug.cgi?id=163088
2496 <rdar://problem/16421985>
2498 Reviewed by Darin Adler.
2500 Changed code in InspectDOMAgent so that it determines the focusability of a Node based
2501 on the AccessibilityNodeObject and not the Element class.
2503 Covered by existing tests:
2504 LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html
2506 * inspector/InspectorDOMAgent.cpp:
2507 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2509 2016-10-18 Anders Carlsson <andersca@apple.com>
2511 Get rid of more WebHistoryItem cruft
2512 https://bugs.webkit.org/show_bug.cgi?id=163623
2514 Reviewed by Tim Horton.
2516 * history/HistoryItem.cpp:
2517 (WebCore::HistoryItem::HistoryItem):
2518 * history/HistoryItem.h:
2519 (WebCore::HistoryItem::setViewportArguments):
2520 (WebCore::HistoryItem::bookmarkID): Deleted.
2521 (WebCore::HistoryItem::setBookmarkID): Deleted.
2522 (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Deleted.
2523 (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Deleted.
2525 2016-10-18 Dave Hyatt <hyatt@apple.com>
2529 * css/parser/CSSPropertyParser.cpp:
2530 (WebCore::CSSPropertyParser::parseSingleValue):
2532 2016-10-18 Antoine Quint <graouts@apple.com>
2534 Modern media controls don't update their rendering correctly
2535 https://bugs.webkit.org/show_bug.cgi?id=163603
2536 <rdar://problem/28826022>
2538 Reviewed by Dean Jackson.
2540 There are rendering issues when we use an absolutely-positioned element
2541 as the top-most element in a media element's shadow root (webkit.org/b/163592).
2542 Since we only need for that element to be positioned, we can use "position: relative"
2543 instead, which removes the rendering issues.
2545 * Modules/modern-media-controls/controls/media-controls.css:
2547 (.media-controls,): Deleted.
2549 2016-10-18 Dean Jackson <dino@apple.com>
2551 Add preliminary support for extended colors to WebCore::Color
2552 https://bugs.webkit.org/show_bug.cgi?id=162878
2553 <rdar://problem/28596413>
2555 Follow-up review comments from Darin Adler.
2557 * html/canvas/CanvasGradient.cpp:
2558 (WebCore::CanvasGradient::addColorStop): Use nullptr.
2559 * platform/graphics/Color.cpp:
2560 (WebCore::Color::Color): Explicitly zero before assigning the pointer.
2561 * platform/graphics/Color.h: Add some comments about the failings of operator== and hash.
2562 (WebCore::Color::Color): Add some static_asserts to the constructors. Move the empty and deleted values
2563 to static constants.
2564 (WebCore::Color::isHashTableDeletedValue):
2565 (WebCore::Color::hash): Replacement for asUint64, which was only being used for a hash.
2566 (WebCore::Color::asUint64): Deleted.
2567 * platform/graphics/ColorHash.h: Use new hash functions. Use "using" instead of typedef.
2568 (WTF::ColorHash::hash):
2570 2016-10-18 Ryosuke Niwa <rniwa@webkit.org>
2572 REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com
2573 https://bugs.webkit.org/show_bug.cgi?id=163581
2574 <rdar://problem/27739558>
2576 Reviewed by Simon Fraser.
2578 The bug was caused by Chrome::elementDidBlur not getting called, which resulted in
2579 StopAssistingNode not getting sent to the UI process.
2581 Test: fast/forms/ios/hide-keyboard-on-node-removal.html
2584 (WebCore::Document::setFocusedElement): Restore the behavior prior to r201471 by calling
2585 Chrome::elementDidBlur explicitly.
2586 * html/HTMLTextFormControlElement.cpp:
2587 (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): Added a comment about ordering.
2589 2016-10-17 Anders Carlsson <andersca@apple.com>
2591 Move some history specific HistoryItem code to WebHistoryItem
2592 https://bugs.webkit.org/show_bug.cgi?id=163567
2594 Reviewed by Tim Horton.
2596 * history/HistoryItem.cpp:
2597 (WebCore::HistoryItem::addRedirectURL): Deleted.
2598 (WebCore::HistoryItem::redirectURLs): Deleted.
2599 (WebCore::HistoryItem::setRedirectURLs): Deleted.
2600 * history/HistoryItem.h:
2602 2016-10-18 Dave Hyatt <hyatt@apple.com>
2604 [CSS Parser] Get all the properties turned on
2605 https://bugs.webkit.org/show_bug.cgi?id=163605
2607 Reviewed by Dean Jackson.
2609 * WebCore.xcodeproj/project.pbxproj:
2610 * css/CSSFunctionValue.h:
2611 * css/CSSPendingSubstitutionValue.cpp: Added.
2612 (WebCore::CSSPendingSubstitutionValue::customCSSText):
2613 * css/CSSPendingSubstitutionValue.h: Added.
2614 (WebCore::CSSPendingSubstitutionValue::create):
2615 (WebCore::CSSPendingSubstitutionValue::shorthandValue):
2616 (WebCore::CSSPendingSubstitutionValue::shorthandPropertyId):
2617 (WebCore::CSSPendingSubstitutionValue::equals):
2618 (WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
2620 (WebCore::CSSValue::cssText):
2621 (WebCore::CSSValue::destroy):
2623 (WebCore::CSSValue::isPendingSubstitutionValue):
2624 * css/CSSValueKeywords.in:
2625 * css/StylePropertyShorthand.cpp:
2626 (WebCore::transitionShorthandForParsing):
2627 * css/StylePropertyShorthand.h:
2628 * css/parser/CSSParser.cpp:
2629 (WebCore::CSSParser::completeURL):
2630 * css/parser/CSSParserImpl.cpp:
2631 (WebCore::CSSParserImpl::parseValue):
2632 (WebCore::CSSParserImpl::consumeDeclaration):
2633 (WebCore::CSSParserImpl::consumeDeclarationValue):
2634 * css/parser/CSSParserMode.h:
2635 (WebCore::CSSParserContext::completeURL):
2636 * css/parser/CSSParserToken.cpp:
2637 (WebCore::CSSParserToken::parseAsCSSPropertyID):
2638 (WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID): Deleted.
2639 * css/parser/CSSParserToken.h:
2640 * css/parser/CSSPropertyParser.cpp:
2641 (WebCore::cssPropertyID):
2642 (WebCore::CSSPropertyParser::addProperty):
2643 (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
2644 (WebCore::CSSPropertyParser::parseValue):
2645 (WebCore::CSSPropertyParser::parseSingleValue):
2646 (WebCore::CSSPropertyParser::parseValueStart):
2647 (WebCore::CSSPropertyParser::consumeCSSWideKeyword):
2648 (WebCore::consumeTransformOrigin):
2649 (WebCore::consumeWillChange):
2650 (WebCore::consumeFontFeatureTag):
2651 (WebCore::consumeFontFeatureSettings):
2652 (WebCore::consumePage):
2653 (WebCore::consumeQuotes):
2654 (WebCore::FontVariantLigaturesParser::consumeLigature):
2655 (WebCore::FontVariantLigaturesParser::finalizeValue):
2656 (WebCore::consumeFontVariantLigatures):
2657 (WebCore::consumeFontVariantCaps):
2658 (WebCore::FontVariantNumericParser::consumeNumeric):
2659 (WebCore::FontVariantNumericParser::finalizeValue):
2660 (WebCore::consumeFontVariantNumeric):
2661 (WebCore::consumeFontVariantCSS21):
2662 (WebCore::consumeFontVariantList):
2663 (WebCore::consumeFontWeight):
2664 (WebCore::consumeFamilyName):
2665 (WebCore::consumeGenericFamily):
2666 (WebCore::consumeFontFamily):
2667 (WebCore::consumeSpacing):
2668 (WebCore::consumeTabSize):
2669 (WebCore::consumeTextSizeAdjust):
2670 (WebCore::consumeFontSize):
2671 (WebCore::consumeLineHeight):
2672 (WebCore::createPrimitiveValuePair):
2673 (WebCore::consumeCounter):
2674 (WebCore::consumePageSize):
2675 (WebCore::consumeSize):
2676 (WebCore::consumeTextIndent):
2677 (WebCore::validWidthOrHeightKeyword):
2678 (WebCore::consumeMaxWidthOrHeight):
2679 (WebCore::consumeWidthOrHeight):
2680 (WebCore::consumeMarginOrOffset):
2681 (WebCore::consumeClipComponent):
2682 (WebCore::consumeClip):
2683 (WebCore::consumeTouchAction):
2684 (WebCore::consumeLineClamp):
2685 (WebCore::consumeLocale):
2686 (WebCore::consumeColumnWidth):
2687 (WebCore::consumeColumnCount):
2688 (WebCore::consumeColumnGap):
2689 (WebCore::consumeColumnSpan):
2690 (WebCore::consumeZoom):
2691 (WebCore::consumeAnimationIterationCount):
2692 (WebCore::consumeAnimationName):
2693 (WebCore::consumeTransitionProperty):
2694 (WebCore::consumeCubicBezier):
2695 (WebCore::consumeAnimationTimingFunction):
2696 (WebCore::consumeAnimationValue):
2697 (WebCore::isValidAnimationPropertyList):
2698 (WebCore::consumeAnimationPropertyList):
2699 (WebCore::CSSPropertyParser::consumeAnimationShorthand):
2700 (WebCore::consumeZIndex):
2701 (WebCore::parseSingleShadow):
2702 (WebCore::consumeShadow):
2703 (WebCore::consumeFilterFunction):
2704 (WebCore::consumeFilter):
2705 (WebCore::consumeTextDecorationLine):
2706 (WebCore::consumeTextEmphasisStyle):
2707 (WebCore::consumeOutlineColor):
2708 (WebCore::consumeLineWidth):
2709 (WebCore::consumeBorderWidth):
2710 (WebCore::consumeTextStrokeWidth):
2711 (WebCore::consumeColumnRuleWidth):
2712 (WebCore::consumeTranslate3d):
2713 (WebCore::consumeNumbers):
2714 (WebCore::consumePerspective):
2715 (WebCore::consumeTransformValue):
2716 (WebCore::consumeTransform):
2717 (WebCore::consumePositionLonghand):
2718 (WebCore::consumePositionX):
2719 (WebCore::consumePositionY):
2720 (WebCore::consumePaintStroke):
2721 (WebCore::consumePaintOrder):
2722 (WebCore::consumeNoneOrURI):
2723 (WebCore::consumeFlexBasis):
2724 (WebCore::consumeStrokeDasharray):
2725 (WebCore::consumeBaselineShift):
2726 (WebCore::consumeRxOrRy):
2727 (WebCore::consumeCursor):
2728 (WebCore::consumeAttr):
2729 (WebCore::consumeCounterContent):
2730 (WebCore::consumeContent):
2731 (WebCore::consumePositionList):
2732 (WebCore::consumeScrollSnapCoordinate):
2733 (WebCore::consumeScrollSnapPoints):
2734 (WebCore::consumeBorderRadiusCorner):
2735 (WebCore::consumeVerticalAlign):
2736 (WebCore::consumeShapeRadius):
2737 (WebCore::consumeBasicShapeCircle):
2738 (WebCore::consumeBasicShapeEllipse):
2739 (WebCore::consumeBasicShapePolygon):
2740 (WebCore::complete4Sides):
2741 (WebCore::consumeRadii):
2742 (WebCore::consumeBasicShapeInset):
2743 (WebCore::consumeBasicShape):
2744 (WebCore::consumeWebkitClipPath):
2745 (WebCore::consumeShapeOutside):
2746 (WebCore::consumeContentDistributionOverflowPosition):
2747 (WebCore::consumeBorderImageRepeatKeyword):
2748 (WebCore::consumeBorderImageRepeat):
2749 (WebCore::consumeBorderImageSlice):
2750 (WebCore::consumeBorderImageOutset):
2751 (WebCore::consumeBorderImageWidth):
2752 (WebCore::consumeBorderImageComponents):
2753 (WebCore::consumeWebkitBorderImage):
2754 (WebCore::consumeReflect):
2755 (WebCore::consumeImageOrientation):
2756 (WebCore::consumeBackgroundBlendMode):
2757 (WebCore::consumeBackgroundAttachment):
2758 (WebCore::consumeBackgroundBox):
2759 (WebCore::consumeBackgroundComposite):
2760 (WebCore::consumePrefixedBackgroundBox):
2761 (WebCore::consumeBackgroundSize):
2762 (WebCore::consumeGridAutoFlow):
2763 (WebCore::consumeBackgroundComponent):
2764 (WebCore::addBackgroundValue):
2765 (WebCore::consumeCommaSeparatedBackgroundComponent):
2766 (WebCore::consumeSelfPositionKeyword):
2767 (WebCore::consumeSelfPositionOverflowPosition):
2768 (WebCore::consumeAlignItems):
2769 (WebCore::consumeJustifyItems):
2770 (WebCore::consumeFitContent):
2771 (WebCore::consumeCustomIdentForGridLine):
2772 (WebCore::consumeGridLine):
2773 (WebCore::isGridTrackFixedSized):
2774 (WebCore::consumeGridBreadth):
2775 (WebCore::consumeGridTrackSize):
2776 (WebCore::consumeGridLineNames):
2777 (WebCore::consumeGridTrackRepeatFunction):
2778 (WebCore::consumeGridTrackList):
2779 (WebCore::consumeGridTemplatesRowsOrColumns):
2780 (WebCore::consumeGridTemplateAreas):
2781 (WebCore::consumeFontFaceUnicodeRange):
2782 (WebCore::consumeFontFaceSrcURI):
2783 (WebCore::consumeFontFaceSrcLocal):
2784 (WebCore::consumeFontFaceSrc):
2785 (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
2786 (WebCore::CSSPropertyParser::consumeSystemFont):
2787 (WebCore::CSSPropertyParser::consumeFont):
2788 (WebCore::CSSPropertyParser::consumeFontVariantShorthand):
2789 (WebCore::CSSPropertyParser::consumeBorderSpacing):
2790 (WebCore::consumeSingleViewportDescriptor):
2791 (WebCore::CSSPropertyParser::parseViewportDescriptor):
2792 (WebCore::consumeColumnWidthOrCount):
2793 (WebCore::CSSPropertyParser::consumeColumns):
2794 (WebCore::CSSPropertyParser::consumeShorthandGreedily):
2795 (WebCore::CSSPropertyParser::consumeFlex):
2796 (WebCore::CSSPropertyParser::consumeBorder):
2797 (WebCore::CSSPropertyParser::consume4Values):
2798 (WebCore::CSSPropertyParser::consumeBorderImage):
2799 (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
2800 (WebCore::consumeBackgroundPosition):
2801 (WebCore::consumeRepeatStyleComponent):
2802 (WebCore::consumeRepeatStyle):
2803 (WebCore::CSSPropertyParser::consumeBackgroundShorthand):
2804 (WebCore::CSSPropertyParser::consumeGridItemPositionShorthand):
2805 (WebCore::CSSPropertyParser::consumeGridAreaShorthand):
2806 (WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):
2807 (WebCore::CSSPropertyParser::consumeGridTemplateShorthand):
2808 (WebCore::CSSPropertyParser::consumeGridShorthand):
2809 (WebCore::CSSPropertyParser::parseShorthand):
2810 (WebCore::unresolvedCSSPropertyID): Deleted.
2811 * css/parser/CSSPropertyParser.h:
2812 * css/parser/CSSPropertyParserHelpers.cpp:
2813 (WebCore::CSSPropertyParserHelpers::consumeIdent):
2814 (WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
2815 (WebCore::CSSPropertyParserHelpers::consumeString):
2816 (WebCore::CSSPropertyParserHelpers::consumeImageSet):
2817 * css/parser/CSSPropertyParserHelpers.h:
2819 2016-10-18 Brent Fulgham <bfulgham@apple.com>
2821 Correct Document::removeAllEventListeners
2822 https://bugs.webkit.org/show_bug.cgi?id=163558
2823 <rdar://problem/28716840>
2825 Reviewed by Chris Dumez.
2827 Tested by fast/dom/node-move-to-new-document-crash-main.html.
2830 (WebCore::Document::removeAllEventListeners): Clear out the wheel and
2831 touch event targets when clearing all data.
2833 2016-10-18 Dean Jackson <dino@apple.com>
2835 Remove dependency cycle with UIKit
2836 https://bugs.webkit.org/show_bug.cgi?id=163577
2837 <rdar://problem/28786160>
2839 Reviewed by Tim Horton.
2841 Soft link against UIKit. Followup patch because
2842 I screwed up and forgot to edit the simulator
2845 * Configurations/WebCoreTestSupport.xcconfig:
2847 2016-10-18 Said Abou-Hallawa <sabouhallawa@apple.com>
2849 SVGCSSParser: m_implicitShorthand value is not reset after adding the shorthand property
2850 https://bugs.webkit.org/show_bug.cgi?id=116470
2852 Reviewed by Simon Fraser.
2854 When we encounter a shorthand css property, we set m_implicitShorthand
2855 to true to tell addProperty() later that the individual properties are
2856 all set through a short hand one. We need to make sure that setting
2857 m_implicitShorthand to true will not be leaked after finishing parsing
2858 the short hand property.
2860 Test: fast/css/implicit-property-restore.html
2862 * css/parser/CSSParser.cpp:
2863 (WebCore::CSSParser::parseValue):
2864 (WebCore::CSSParser::parseFillShorthand):
2865 (WebCore::CSSParser::parseShorthand):
2866 (WebCore::CSSParser::parse4Values):
2867 (WebCore::CSSParser::parseBorderRadius):
2868 (WTF::ImplicitScope::ImplicitScope): Deleted.
2869 (WTF::ImplicitScope::~ImplicitScope): Deleted.
2870 Get rid of ImplicitScope and replace its calls by TemporaryChange<bool>.
2872 * css/parser/SVGCSSParser.cpp:
2873 (WebCore::CSSParser::parseSVGValue):
2874 Restore m_implicitShorthand value after setting it temporarily to true.
2876 2016-10-18 Chris Dumez <cdumez@apple.com>
2878 Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
2879 https://bugs.webkit.org/show_bug.cgi?id=163580
2881 Reviewed by Sam Weinig.
2883 Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
2884 and use a regular constructor as in the specification:
2885 - https://html.spec.whatwg.org/#the-trackevent-interface
2887 No new tests, updated existing tests.
2889 * html/track/TrackEvent.cpp:
2890 (WebCore::TrackEvent::TrackEvent):
2891 * html/track/TrackEvent.h:
2892 * html/track/TrackEvent.idl:
2894 2016-10-18 Commit Queue <commit-queue@webkit.org>
2896 Unreviewed, rolling out r207409.
2897 https://bugs.webkit.org/show_bug.cgi?id=163602
2899 Introduced many test failures and timeouts, causing release
2900 bot to exit early (Requested by mcatanzaro on #webkit).
2904 "[GTK] Several tests crashing on debug bot in (anonymous
2905 namespace)::MediaPlayerPrivateGStreamerBase::repaint"
2906 https://bugs.webkit.org/show_bug.cgi?id=163511
2907 http://trac.webkit.org/changeset/207409
2909 2016-10-18 Eric Carlson <eric.carlson@apple.com>
2911 [MediaStream] Resolve constraints and enumerate devices in the UI process
2912 https://bugs.webkit.org/show_bug.cgi?id=162147
2913 <rdar://problem/28803569>
2915 Reviewed by Darin Adler.
2917 Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
2918 access happens in the UI process.
2920 No new tests, updated results of existing tests.
2922 * CMakeLists.txt: Add MediaDevicesEnumerationRequest.cpp, delete UserMediaPermissionCheck.cpp.
2924 * Modules/mediastream/MediaConstraintsImpl.cpp:
2925 (WebCore::MediaConstraintsImpl::create): Only create from MediaConstraintsData.
2926 (WebCore::MediaConstraintsImpl::initialize): Deleted.
2927 * Modules/mediastream/MediaConstraintsImpl.h:
2929 * Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Added.
2930 (WebCore::MediaDevicesEnumerationRequest::create):
2931 (WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest):
2932 (WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest):
2933 (WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin):
2934 (WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin):
2935 (WebCore::MediaDevicesEnumerationRequest::contextDestroyed):
2936 (WebCore::MediaDevicesEnumerationRequest::start):
2937 (WebCore::MediaDevicesEnumerationRequest::cancel):
2938 (WebCore::MediaDevicesEnumerationRequest::setDeviceInfo):
2939 (WebCore::MediaDevicesEnumerationRequest::finish):
2940 * Modules/mediastream/MediaDevicesEnumerationRequest.h: Added.
2942 * Modules/mediastream/MediaDevicesRequest.cpp:
2943 (WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the enumeration request.
2944 (WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
2945 (WebCore::MediaDevicesRequest::start): Create and use a MediaDevicesEnumerationRequest.
2946 (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Deleted.
2947 * Modules/mediastream/MediaDevicesRequest.h:
2949 * Modules/mediastream/UserMediaClient.h:
2950 * Modules/mediastream/UserMediaController.h:
2951 (WebCore::UserMediaController::enumerateMediaDevices): New.
2952 (WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): New.
2953 (WebCore::UserMediaController::checkUserMediaPermission): Deleted.
2954 (WebCore::UserMediaController::cancelUserMediaPermissionCheck): Deleted.
2956 * Modules/mediastream/UserMediaPermissionCheck.h: Deleted.
2957 * Modules/mediastream/UserMediaPermissionCheck.cpp: Deleted.
2959 * Modules/mediastream/UserMediaRequest.cpp:
2960 (WebCore::UserMediaRequest::UserMediaRequest):
2961 (WebCore::UserMediaRequest::start):
2962 (WebCore::UserMediaRequest::allow):
2963 (WebCore::UserMediaRequest::deny):
2964 (WebCore::UserMediaRequest::constraintsValidated): Deleted.
2965 (WebCore::UserMediaRequest::userMediaAccessGranted): Deleted.
2966 (WebCore::UserMediaRequest::userMediaAccessDenied): Deleted.
2967 (WebCore::UserMediaRequest::constraintsInvalid): Deleted.
2968 (WebCore::UserMediaRequest::didCreateStream): Deleted.
2969 (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Deleted.
2970 (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Deleted.
2971 * Modules/mediastream/UserMediaRequest.h:
2973 * WebCore.xcodeproj/project.pbxproj: Add MediaDevicesEnumerationRequest.*.
2975 * platform/mediastream/CaptureDevice.h:
2976 (WebCore::CaptureDevice::CaptureDevice):
2977 (WebCore::CaptureDevice::setPersistentId): Add setter for argument decoder.
2978 (WebCore::CaptureDevice::setLabel): Ditto.
2979 (WebCore::CaptureDevice::setGroupId): Ditto.
2980 (WebCore::CaptureDevice::setKind): Ditto.
2982 * platform/mediastream/CaptureDeviceManager.h: Remove unnecessary include.
2984 * platform/mediastream/MediaConstraints.h:
2985 (WebCore::MediaConstraint::encode): New.
2986 (WebCore::MediaConstraint::decode): Ditto.
2987 (WebCore::NumericConstraint::encode): Ditto.
2988 (WebCore::NumericConstraint::decode): Ditto.
2990 * platform/mediastream/MediaStreamCreationClient.h: Deleted.
2992 * platform/mediastream/RealtimeMediaSourceCenter.h: Use completion handlers instead of client interface.
2994 * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2995 (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Drive-by fix: don't initialize
2996 group id, we don't support it.
2998 * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2999 (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints): Update for interface change.
3000 (WebCore::RealtimeMediaSourceCenterMac::createMediaStream): Ditto.
3001 * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
3003 * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
3004 (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints): Ditto.
3005 (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Ditto.
3006 (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): Ditto.
3007 * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
3009 * platform/mock/MockRealtimeMediaSourceCenter.cpp:
3010 (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
3011 (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Ditto.
3012 * platform/mock/MockRealtimeMediaSourceCenter.h:
3014 2016-10-18 Zan Dobersek <zdobersek@igalia.com>
3016 [WebIDL] Support BufferSource
3017 https://bugs.webkit.org/show_bug.cgi?id=163541
3019 Reviewed by Youenn Fablet.
3021 Add support for the BufferSource typedef in WebIDL. The implementation
3022 adds the necessary handling for this type in the generator scripts and
3023 the specialization of the Converter<> template for the IDLBufferSource
3024 struct that enables exposing ArrayBuffer or ArrayBufferView objects by
3025 having WebCore::BufferSource objects pointing to their data.
3027 The SourceBuffer interface in the MSE module has the appendBuffer()
3028 operation modified to accept a BufferSource parameter, instead of
3029 overloading it for ArrayBuffer and ArrayBufferView parameters.
3031 The bindings generator tests cover BufferSource as both an operation
3032 parameter and as a dictionary member.
3034 * Modules/mediasource/SourceBuffer.cpp:
3035 (WebCore::SourceBuffer::appendBuffer):
3036 (WebCore::SourceBuffer::appendBufferInternal):
3037 * Modules/mediasource/SourceBuffer.h:
3038 * Modules/mediasource/SourceBuffer.idl:
3039 * WebCore.xcodeproj/project.pbxproj:
3040 * bindings/generic/IDLTypes.h:
3041 * bindings/js/BufferSource.h: Added.
3042 * bindings/js/JSDOMConvert.h:
3043 (WebCore::Converter<IDLBufferSource>::convert):
3044 * bindings/scripts/CodeGenerator.pm:
3045 (SkipIncludeHeader):
3047 * bindings/scripts/CodeGeneratorJS.pm:
3048 (AddClassForwardIfNeeded):
3050 (IsHandledByDOMConvert):
3051 * bindings/scripts/test/JS/JSTestObj.cpp:
3052 (WebCore::convertDictionary<TestObj::Dictionary>):
3053 (WebCore::jsTestObjPrototypeFunctionBufferSourceParameter):
3054 (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterCaller):
3055 * bindings/scripts/test/TestObj.idl:
3057 2016-10-18 Javier Fernandez <jfernandez@igalia.com>
3059 [css-grid] Different width of grid container between initial load and refresh
3060 https://bugs.webkit.org/show_bug.cgi?id=163535
3062 Reviewed by Manuel Rego Casasnovas.
3064 Grid's layout logic manages two different override sizes; one it's
3065 designed to implement the grid item's stretching behavior, identified
3066 with the concept of 'overrideContentLogicalSize'; there is another
3067 override size, known as overrideContainingBlockContentLogicalSize,
3068 used to implement the Grid Area abstraction, which will behave as
3069 the actual containing block of any grid item.
3071 During grid's layout logic these override sizes are set according
3072 to the CSS style rules. This affects how the grid container and its
3073 children are going to be sized during layout. Grid Tracks sizing
3074 algorithm depends on these override sizes.
3076 In order to ensure that the tracks sizing algorithm produces the
3077 same results when it's run consecutively several times, we need to
3078 clear these override sizes and perform a layout of the affected grid
3079 items. Otherwise, the affected items will return sizing values which
3080 depend on the override values set in the previous layout, which in
3081 some cases, like orthogonal flows, may change through different runs
3082 of the sizing algorithm.
3084 Test: fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html
3086 * rendering/RenderGrid.cpp:
3087 (WebCore::RenderGrid::layoutBlock):
3089 2016-10-18 Youenn Fablet <youenn@apple.com>
3091 CachedResourceLoader should not need to remove fragment identifier
3092 https://bugs.webkit.org/show_bug.cgi?id=163015
3094 Reviewed by Darin Adler.
3096 No expected change for non-window port.
3097 For window port, CachedResourceLoader will strip the fragment identifier of the URL passed to subresourceForURL
3098 before querying the memory cache.
3100 Removing the fragment identifier from the request stored in CachedResourceRequest.
3101 The fragment identifier is stored in a separate field.
3103 This allows CachedResourceLoader to not care about fragment identifier.
3104 CachedResource can then get access to it.
3106 * loader/cache/CachedResource.cpp:
3107 (WebCore::CachedResource::CachedResource):
3108 (WebCore::CachedResource::finishRequestInitialization): Deleted.
3109 * loader/cache/CachedResource.h:
3110 * loader/cache/CachedResourceLoader.cpp:
3111 (WebCore::CachedResourceLoader::cachedResource):
3112 Updated the method taking a const String& to strip the fragment identifier if needed.
3113 Updated the method taking a const URL& to assert if the fragment identifier is present.
3114 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
3115 (WebCore::CachedResourceLoader::requestResource):
3116 * loader/cache/CachedResourceRequest.cpp:
3117 (WebCore::CachedResourceRequest::CachedResourceRequest):
3118 (WebCore::CachedResourceRequest::splitFragmentIdentifierFromRequestURL):
3119 * loader/cache/CachedResourceRequest.h:
3120 (WebCore::CachedResourceRequest::releaseFragmentIdentifier):
3121 (WebCore::CachedResourceRequest::clearFragmentIdentifier):
3122 * loader/cache/MemoryCache.cpp:
3123 (WebCore::MemoryCache::shouldRemoveFragmentIdentifier):
3124 (WebCore::MemoryCache::removeFragmentIdentifierIfNeeded):
3125 (WebCore::MemoryCache::revalidationSucceeded):
3126 (WebCore::MemoryCache::resourceForRequest):
3127 * loader/cache/MemoryCache.h:
3129 2016-10-18 Antti Koivisto <antti@apple.com>
3131 Rename setNeedsStyleRecalc to invalidateStyle
3132 https://bugs.webkit.org/show_bug.cgi?id=163542
3134 Reviewed by Darin Adler.
3136 Also rename StyleChangeType enum and some related functions for clarity. For example
3138 element.setNeedsStyleRecalc(SyntheticStyleChange);
3142 element.invalidateStyleAndLayerComposition();
3144 * WebCore.xcodeproj/project.pbxproj:
3145 * css/StyleInvalidationAnalysis.cpp:
3146 (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
3148 (WebCore::Document::recalcStyle):
3149 (WebCore::Document::updateViewportUnitsOnResize):
3150 (WebCore::Document::setCSSTarget):
3151 (WebCore::unwrapFullScreenRenderer):
3152 (WebCore::Document::setAnimatingFullScreen):
3154 (WebCore::Element::setActive):
3155 (WebCore::Element::setFocus):
3156 (WebCore::Element::setHovered):
3157 (WebCore::Element::attributeChanged):
3158 (WebCore::Element::invalidateStyle):
3159 (WebCore::Element::invalidateStyleAndLayerComposition):
3160 (WebCore::Element::invalidateStyleForSubtree):
3161 (WebCore::Element::invalidateStyleAndRenderersForSubtree):
3163 Move public invalidation functions to Element tightening typing.
3164 Use separate functions instead of enum values.
3165 This way the call sites look nicer and only useful combinations are exposed.
3167 (WebCore::Element::addShadowRoot):
3168 (WebCore::checkForEmptyStyleChange):
3169 (WebCore::checkForSiblingStyleChanges):
3170 (WebCore::Element::needsStyleInvalidation):
3171 (WebCore::Element::setContainsFullScreenElement):
3173 (WebCore::Element::setHasFocusWithin):
3175 (WebCore::computeEditabilityFromComputedStyle):
3176 (WebCore::Node::adjustStyleValidity):
3178 Update validity and mode separately. There was a potential bug here where
3179 SyntheticStyleChange could overwrite FullStyleChange (no known repro).
3181 (WebCore::Node::updateAncestorsForStyleRecalc):
3182 (WebCore::Node::invalidateStyle):
3183 (WebCore::Node::insertedInto):
3184 (WebCore::Node::setNeedsStyleRecalc): Deleted.
3186 (WebCore::Node::needsStyleRecalc):
3187 (WebCore::Node::styleValidity):
3188 (WebCore::Node::styleResolutionShouldRecompositeLayer):
3189 (WebCore::Node::setHasValidStyle):
3190 (WebCore::Node::styleChangeType): Deleted.
3191 (WebCore::Node::clearNeedsStyleRecalc): Deleted.
3192 (WebCore::Node::setStyleChange): Deleted.
3193 * dom/RadioButtonGroups.cpp:
3194 (WebCore::RadioButtonGroup::remove):
3195 (WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons):
3196 * dom/ShadowRoot.cpp:
3197 (WebCore::ShadowRoot::setResetStyleInheritance):
3198 * dom/SlotAssignment.cpp:
3199 (WebCore::SlotAssignment::addSlotElementByName):
3200 (WebCore::SlotAssignment::removeSlotElementByName):
3201 (WebCore::SlotAssignment::didChangeSlot):
3202 * dom/StyledElement.cpp:
3203 (WebCore::StyledElement::attributeChanged):
3204 (WebCore::StyledElement::styleAttributeChanged):
3205 (WebCore::StyledElement::invalidateStyleAttribute):
3207 (WebCore::Text::updateRendererAfterContentChange):
3208 * dom/VisitedLinkState.cpp:
3209 (WebCore::VisitedLinkState::invalidateStyleForAllLinks):
3210 (WebCore::VisitedLinkState::invalidateStyleForLink):
3211 * editing/FrameSelection.cpp:
3212 (WebCore::FrameSelection::focusedOrActiveStateChanged):
3213 * html/BaseDateAndTimeInputType.cpp:
3214 (WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged):
3215 * html/FileInputType.cpp:
3216 (WebCore::FileInputType::setValue):
3217 * html/HTMLAnchorElement.cpp:
3218 (WebCore::HTMLAnchorElement::parseAttribute):
3219 * html/HTMLBodyElement.cpp:
3220 (WebCore::HTMLBodyElement::parseAttribute):
3221 * html/HTMLCanvasElement.cpp:
3222 (WebCore::HTMLCanvasElement::getContext):
3223 (WebCore::HTMLCanvasElement::createImageBuffer):
3224 * html/HTMLElement.cpp:
3225 (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
3226 (WebCore::HTMLElement::calculateAndAdjustDirectionality):
3227 * html/HTMLFieldSetElement.cpp:
3228 (WebCore::HTMLFieldSetElement::addInvalidDescendant):
3229 (WebCore::HTMLFieldSetElement::removeInvalidDescendant):
3230 * html/HTMLFormControlElement.cpp:
3231 (WebCore::HTMLFormControlElement::disabledStateChanged):
3232 (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
3233 (WebCore::HTMLFormControlElement::requiredAttributeChanged):
3234 (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
3235 (WebCore::HTMLFormControlElement::updateValidity):
3236 * html/HTMLFormElement.cpp:
3237 (WebCore::HTMLFormElement::registerFormElement):
3238 (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
3239 (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
3240 (WebCore::HTMLFormElement::resetDefaultButton):
3241 * html/HTMLFrameElementBase.cpp:
3242 (WebCore::HTMLFrameElementBase::finishedInsertingSubtree):
3243 * html/HTMLFrameOwnerElement.cpp:
3244 (WebCore::HTMLFrameOwnerElement::scheduleinvalidateStyleAndLayerComposition):
3245 (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Deleted.
3246 * html/HTMLFrameOwnerElement.h:
3247 * html/HTMLFrameSetElement.cpp:
3248 (WebCore::HTMLFrameSetElement::parseAttribute):
3249 (WebCore::HTMLFrameSetElement::willRecalcStyle):
3250 * html/HTMLInputElement.cpp:
3251 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
3252 (WebCore::HTMLInputElement::parseAttribute):
3253 (WebCore::HTMLInputElement::setChecked):
3254 (WebCore::HTMLInputElement::setIndeterminate):
3255 (WebCore::HTMLInputElement::setAutoFilled):
3256 (WebCore::HTMLInputElement::maxLengthAttributeChanged):
3257 (WebCore::HTMLInputElement::minLengthAttributeChanged):
3258 * html/HTMLLinkElement.cpp:
3259 (WebCore::HTMLLinkElement::parseAttribute):
3260 * html/HTMLMediaElement.cpp:
3261 (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
3262 (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
3263 * html/HTMLObjectElement.cpp:
3264 (WebCore::HTMLObjectElement::parseAttribute):
3265 (WebCore::HTMLObjectElement::childrenChanged):
3266 (WebCore::HTMLObjectElement::renderFallbackContent):
3267 * html/HTMLOptGroupElement.cpp:
3268 (WebCore::HTMLOptGroupElement::parseAttribute):
3269 * html/HTMLOptionElement.cpp:
3270 (WebCore::HTMLOptionElement::parseAttribute):
3271 (WebCore::HTMLOptionElement::setSelectedState):
3272 * html/HTMLPlugInElement.cpp:
3273 (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):
3274 * html/HTMLPlugInImageElement.cpp:
3275 (WebCore::HTMLPlugInImageElement::setDisplayState):
3276 (WebCore::HTMLPlugInImageElement::willRecalcStyle):
3277 (WebCore::HTMLPlugInImageElement::finishParsingChildren):
3278 (WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension):
3279 (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
3280 (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
3281 * html/HTMLProgressElement.cpp:
3282 (WebCore::HTMLProgressElement::didElementStateChange):
3283 * html/HTMLSelectElement.cpp:
3284 (WebCore::HTMLSelectElement::parseAttribute):
3285 (WebCore::HTMLSelectElement::setRecalcListItems):
3286 (WebCore::HTMLSelectElement::parseMultipleAttribute):
3287 (WebCore::HTMLSelectElement::reset):
3288 * html/HTMLTableElement.cpp:
3289 (WebCore::isTableCellAncestor):
3290 (WebCore::setTableCellsChanged):
3291 (WebCore::HTMLTableElement::parseAttribute):
3292 * html/HTMLTextAreaElement.cpp:
3293 (WebCore::HTMLTextAreaElement::setValueCommon):
3294 * html/HTMLTextFormControlElement.cpp:
3295 (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
3296 * html/InputType.cpp:
3297 (WebCore::InputType::setValue):
3298 * html/NumberInputType.cpp:
3299 (WebCore::NumberInputType::minOrMaxAttributeChanged):
3300 * html/TextFieldInputType.cpp:
3301 (WebCore::TextFieldInputType::subtreeHasChanged):
3302 * mathml/MathMLElement.cpp:
3303 (WebCore::MathMLElement::parseAttribute):
3304 * mathml/MathMLSelectElement.cpp:
3305 (WebCore::MathMLSelectElement::updateSelectedChild):
3306 * page/animation/AnimationBase.cpp:
3307 (WebCore::AnimationBase::setNeedsStyleRecalc):
3308 * page/animation/AnimationController.cpp:
3309 (WebCore::AnimationControllerPrivate::clear):
3310 (WebCore::AnimationControllerPrivate::updateAnimations):
3311 (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
3312 (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
3313 (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
3314 (WebCore::AnimationController::cancelAnimations):
3315 * rendering/RenderImage.cpp:
3316 (WebCore::RenderImage::imageChanged):
3317 * rendering/RenderLayer.cpp:
3318 (WebCore::RenderLayer::calculateClipRects):
3319 * rendering/RenderLayerCompositor.cpp:
3320 (WebCore::RenderLayerCompositor::attachRootLayer):
3321 (WebCore::RenderLayerCompositor::detachRootLayer):
3322 (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
3323 * rendering/RenderObject.cpp:
3324 (WebCore::RenderObject::updateDragState):
3325 * rendering/svg/SVGResourcesCache.cpp:
3326 (WebCore::SVGResourcesCache::clientStyleChanged):
3327 * style/AttributeChangeInvalidation.cpp:
3328 (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
3329 * style/ClassChangeInvalidation.cpp:
3330 (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
3331 * style/IdChangeInvalidation.cpp:
3332 (WebCore::Style::IdChangeInvalidation::invalidateStyle):
3333 * style/RenderTreeUpdater.cpp:
3334 (WebCore::RenderTreeUpdater::updateElementRenderer):
3335 * style/StyleScope.cpp:
3336 (WebCore::Style::Scope::updateActiveStyleSheets):
3337 * style/StyleTreeResolver.cpp:
3338 (WebCore::Style::resetStyleForNonRenderedDescendants):
3339 (WebCore::Style::TreeResolver::resolveElement):
3340 (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
3341 (WebCore::Style::TreeResolver::popParent):
3342 (WebCore::Style::clearNeedsStyleResolution):
3343 (WebCore::Style::TreeResolver::resolveComposedTree):
3344 * style/StyleUpdate.h:
3345 * style/StyleValidity.h: Added.
3347 StyleChangeType enum splits into Style::Validity and Style::InvalidationMode.
3348 Move to a file of its own.
3350 * svg/SVGAElement.cpp:
3351 (WebCore::SVGAElement::svgAttributeChanged):
3352 * svg/SVGAnimateElementBase.cpp:
3353 (WebCore::applyCSSPropertyToTarget):
3354 (WebCore::removeCSSPropertyFromTarget):
3355 * svg/SVGElement.cpp:
3356 (WebCore::SVGElement::willRecalcStyle):
3358 (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle):
3360 (WebCore::SVGTests::handleAttributeChange):
3361 * svg/SVGUseElement.cpp:
3362 (WebCore::SVGUseElement::invalidateShadowTree):
3363 * testing/Internals.cpp:
3364 (WebCore::styleValidityToToString):
3365 (WebCore::Internals::styleChangeType):
3366 (WebCore::styleChangeTypeToString): Deleted.
3368 2016-10-17 Sergio Villar Senin <svillar@igalia.com>
3370 [css-grid] Constrain by min|max-height on auto repeat computation
3371 https://bugs.webkit.org/show_bug.cgi?id=163540
3373 Reviewed by Darin Adler.
3375 The max-height (if definite) is used to compute the number of auto repeat rows whenever the
3376 height is indefinite. We were using the min-height only in case both values were indefinite.
3378 Although not explicitly mentioned by grid specs, it's reasonable to assume that
3379 the min-height trumps the used value of height/max-height like it always does, per CSS
3380 2.2. Note that the number of rows still needs to fit within that size even if using
3381 min-height, because we're just using min-height to compute the used value of the height
3382 property. If both height and max-height are indefinite we keep doing the same, i.e., compute
3383 the minimum number of rows that fulfill min-height (if definite).
3385 * rendering/RenderGrid.cpp:
3386 (WebCore::RenderGrid::computeAutoRepeatTracksCount):
3388 2016-10-17 Yusuke Suzuki <utatane.tea@gmail.com>
3390 [DOMJIT] Use NativeCallFrameTracer for operations used for DOMJIT slow calls
3391 https://bugs.webkit.org/show_bug.cgi?id=163586
3393 Reviewed by Saam Barati.
3395 * domjit/JSNodeDOMJIT.cpp:
3396 (WebCore::toWrapperSlow):
3398 2016-10-18 Ryuan Choi <ryuan.choi@navercorp.com>
3400 [EFL] Build break since r207442
3401 https://bugs.webkit.org/show_bug.cgi?id=163587
3405 Since r207442, setRGB is moved to private.
3407 * rendering/RenderThemeEfl.cpp:
3408 (WebCore::fillColorsFromEdjeClass):
3410 2016-10-17 Dean Jackson <dino@apple.com>
3412 Remove dependency cycle with UIKit
3413 https://bugs.webkit.org/show_bug.cgi?id=163577
3414 <rdar://problem/28786160>
3416 Reviewed by Tim Horton.
3418 Soft link against UIKit.
3420 * Configurations/WebCoreTestSupport.xcconfig:
3421 * testing/Internals.mm:
3423 2016-10-17 Dean Jackson <dino@apple.com>
3425 Allow creation of ExtendedColors and make Color immutable
3426 https://bugs.webkit.org/show_bug.cgi?id=163557
3427 <rdar://problem/28805360>
3429 Reviewed by Darin Adler and Dave Hyatt.
3431 1. Support the creation of ExtendedColor objects via the
3434 2. Fix the remaining few places where a Color object is
3435 modified after creation, instead creating a new Color.
3436 Move all the mutation methods into the private section,
3437 making Color now immutable.
3439 Changes to Color are covered by existing tests. Changes
3440 to ExtendedColor are covered by the ExtendedColor API test.
3442 * css/parser/CSSParser.cpp:
3443 (WebCore::CSSParser::fastParseColor): Return a new named Color.
3446 (WebCore::Document::resetActiveLinkColor): Set to be the named "red" color.
3448 * html/HTMLElement.cpp: