1 2016-08-26 Zalan Bujtas <zalan@apple.com>
3 ASSERT_NOT_REACHED() is touched in WebCore::minimumValueForLength
4 https://bugs.webkit.org/show_bug.cgi?id=125781
5 <rdar://problem/27684457>
7 Reviewed by Simon Fraser.
9 RenderTableSection::calcRowLogicalHeight misused minimumValueForLength to fallback to 0 for non-fixed values.
10 While this patch fixes the assertion, the table section code needs works to support calc values. See webkit.org/b/161273.
12 Test: fast/table/assert-on-min-max-content-values.html
14 * rendering/RenderTableSection.cpp:
15 (WebCore::RenderTableSection::calcRowLogicalHeight):
17 2016-08-26 Andreas Kling <akling@apple.com>
19 REGRESSION (r204987): fast/canvas-composite-* tests are now flaky assertion failures
20 <https://webkit.org/b/161259>
22 Reviewed by Joseph Pecoraro.
24 Fix a blunder where HTMLCanvasElement::memoryCost() wasn't forwarding the inquiry
25 to ImageBuffer but HTMLCanvasElement::externalMemoryCost() was.
27 This fixes flaky "externalMemorySize() <= extraMemorySize()" assertions on debug bots.
29 * html/HTMLCanvasElement.cpp:
30 (WebCore::HTMLCanvasElement::memoryCost):
32 2016-08-26 Andreas Kling <akling@apple.com>
34 The :enabled/:disabled selectors should only match elements that can be disabled.
35 <https://webkit.org/b/161255>
37 Reviewed by Chris Dumez.
39 Per the HTML spec, only the following elements can be actually disabled:
41 button, input, select, textarea, optgroup, option, menuitem, fieldset
43 Since HTMLOutputElement inherits from HTMLFormControlElement, it had some
44 misguided ideas about being disableable. This was causing it to get matched
45 by :enabled and :disabled selectors.
47 Test: imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/disabled.html
49 * css/SelectorChecker.cpp:
50 (WebCore::SelectorChecker::checkOne):
51 * cssjit/SelectorCompiler.cpp:
52 (WebCore::SelectorCompiler::addPseudoClassType):
53 * css/SelectorCheckerTestFunctions.h:
54 (WebCore::matchesDisabledPseudoClass):
55 (WebCore::matchesEnabledPseudoClass): Renamed from isEnabled/isDisabled. Now only allows
56 :enabled and :disabled selectors to match elements that are actually disableable.
59 * html/HTMLElement.cpp:
60 (WebCore::HTMLElement::canBeActuallyDisabled):
61 (WebCore::HTMLElement::isActuallyDisabled): Added supporting functions for the aforementioned selectors.
63 * html/HTMLFormControlElement.cpp:
64 (WebCore::HTMLFormControlElement::parseAttribute): Don't care about disabled state
65 changes in elements that are not disableable in the first place.
67 2016-08-26 Chris Dumez <cdumez@apple.com>
69 REGRESSION(r204028): Fix unused-but-set-variable warning in generated JSNavigator.cpp
70 https://bugs.webkit.org/show_bug.cgi?id=161252
72 Reviewed by Ryosuke Niwa.
74 Improve support for [Conditional] with overloaded operations in the IDL.
76 No new tests, updated bindings tests.
78 * bindings/scripts/CodeGeneratorJS.pm:
80 (GeneratePropertiesHashTable):
81 (getConditionalForFunctionConsideringOverloads):
82 (GenerateOverloadedFunctionOrConstructor):
83 (GenerateImplementation):
84 * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
85 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation): Deleted.
86 * bindings/scripts/test/JS/JSTestObj.cpp:
87 (WebCore::jsTestObjPrototypeFunctionConditionalOverload1):
88 (WebCore::jsTestObjPrototypeFunctionConditionalOverload2):
89 (WebCore::jsTestObjPrototypeFunctionConditionalOverload):
90 (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation): Deleted.
91 (WebCore::jsTestObjConstructorFunctionOverloadedMethod1): Deleted.
92 * bindings/scripts/test/TestObj.idl:
94 2016-08-26 Beth Dakin <bdakin@apple.com>
96 charactersAroundPosition can be wrong because it crosses editing boundaries
97 https://bugs.webkit.org/show_bug.cgi?id=161215
99 rdar://problem/27933564
101 Reviewed by Ryosuke Niwa.
103 charactersAroundPosition() should not cross editing boundaries. This patch fixes
104 that by making nextCharacterBoundaryInDirection() take an
105 EditingBoundaryCrossingRule parameter to pass onto VisiblePosition::next() and
106 VisiblePosition::previous().
108 * editing/VisibleUnits.cpp:
109 (WebCore::nextCharacterBoundaryInDirection):
110 (WebCore::positionOfNextBoundaryOfGranularity):
111 (WebCore::charactersAroundPosition):
113 2016-08-26 Joseph Pecoraro <pecoraro@apple.com>
115 Web Inspector: Test and address issues in IndexedDB.requestData
116 https://bugs.webkit.org/show_bug.cgi?id=161178
117 <rdar://problem/28002467>
119 Reviewed by Brian Burg.
121 Test: inspector/indexeddb/requestData.html
123 * inspector/InspectorIndexedDBAgent.cpp:
124 (idbKeyRangeFromKeyRange):
125 Parsing was too strict. "lower" and "upper" keys are optional.
127 (WebCore::DataLoader::execute):
128 Ensure the skip count is passed forward.
130 2016-08-25 Joseph Pecoraro <pecoraro@apple.com>
132 Web Inspector: Provide a way to clear an IndexedDB object store
133 https://bugs.webkit.org/show_bug.cgi?id=161167
134 <rdar://problem/27996932>
136 Reviewed by Brian Burg.
138 Test: inspector/indexeddb/clearObjectStore.html
140 * inspector/InspectorIndexedDBAgent.cpp:
141 Make the transaction for clearing an object store readwrite
142 instead of readonly, and activate it.
144 2016-08-26 Chris Dumez <cdumez@apple.com>
146 Calling crossOriginWindow.toString() should not be allowed
147 https://bugs.webkit.org/show_bug.cgi?id=161225
149 Reviewed by Andreas Kling.
151 Calling crossOriginWindow.toString() should not be allowed:
152 - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
154 In WebKit, we were printing a security error in the console but
155 returning "[object Window]" anyway.
157 In Firefox and Chrome, it throws an exception.
159 No new tests, updated existing test.
161 * bindings/js/JSDOMWindowCustom.cpp:
162 (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
164 2016-08-26 Devin Rousso <dcrousso+webkit@gmail.com>
166 Web Inspector: Some CSS selectors in the UI aren't escaped
167 https://bugs.webkit.org/show_bug.cgi?id=151378
169 Reviewed by Joseph Pecoraro.
171 No new tests, but logic and results of existing tests updated:
172 * inspector/dom/content-node-region-info.html:
173 * inspector/dom/content-node-region-info-expected.txt:
174 * inspector/dom/highlightNode-expected.txt:
175 * inspector/dom/highlightSelector.html:
176 * inspector/dom/highlightSelector-expected.txt:
178 * inspector/InspectorOverlay.cpp:
179 (WebCore::buildObjectForElementData):
181 * inspector/InspectorOverlayPage.css:
183 (.tag-name): Deleted.
185 * inspector/InspectorOverlayPage.js:
186 (_createElementTitle):
188 2016-08-25 Brent Fulgham <bfulgham@apple.com>
190 Crash when getting font bounding rect
191 https://bugs.webkit.org/show_bug.cgi?id=161202
192 <rdar://problem/27986981>
194 Reviewed by Myles C. Maxfield.
196 We should never store GlyphData objects for later use, because they contain raw pointers to Font elements
197 contained in caches, and those font caches get periodically purged.
199 Instead, we should hold onto the ‘key’ representing the GlyphData, and simply ask the system for the
200 GlyphData the next time it is needed.
202 Tested by existing MathML tests under ASAN and GuardMalloc.
204 * rendering/mathml/RenderMathMLToken.cpp:
205 (WebCore::RenderMathMLToken::RenderMathMLToken): Clean up constructors.
206 (WebCore::RenderMathMLToken::computePreferredLogicalWidths): Use keys to get correct GlyphData when needed.
207 (WebCore::RenderMathMLToken::updateMathVariantGlyph): Ditto.
208 (WebCore::RenderMathMLToken::firstLineBaseline): Ditto.
209 (WebCore::RenderMathMLToken::layoutBlock): Ditto.
210 (WebCore::RenderMathMLToken::paint): Ditto.
211 (WebCore::RenderMathMLToken::paintChildren): Ditto.
212 * rendering/mathml/RenderMathMLToken.h:
214 2016-08-26 Chris Dumez <cdumez@apple.com>
216 HTMLAreaElement's coords attributes parsing does not comply with the HTML specification
217 https://bugs.webkit.org/show_bug.cgi?id=161216
219 Reviewed by Andreas Kling.
221 HTMLAreaElement's coords attributes parsing does not comply with the HTML specification:
222 - https://html.spec.whatwg.org/#attr-area-coords
224 This patch aligns our parsing of this attribute with the specification and Chrome.
226 No new tests, rebaselined existing test.
228 * html/HTMLAreaElement.cpp:
229 (WebCore::HTMLAreaElement::HTMLAreaElement):
230 (WebCore::HTMLAreaElement::parseAttribute):
231 (WebCore::HTMLAreaElement::getRegion):
232 * html/HTMLAreaElement.h:
233 * html/parser/HTMLParserIdioms.cpp:
234 (WebCore::isHTMLSpaceOrDelimiter):
235 (WebCore::isNumberStart):
236 (WebCore::parseHTMLListOfOfFloatingPointNumberValuesInternal):
237 (WebCore::parseHTMLListOfOfFloatingPointNumberValues):
238 (WebCore::parseHTMLNonNegativeInteger): Deleted.
239 * html/parser/HTMLParserIdioms.h:
241 2016-08-26 Csaba Osztrogonác <ossy@webkit.org>
243 Fix the !ENABLE(WEB_SOCKETS) build
244 https://bugs.webkit.org/show_bug.cgi?id=161251
246 Reviewed by Alex Christensen.
248 * page/SocketProvider.h:
250 2016-08-26 Csaba Osztrogonác <ossy@webkit.org>
252 Fix the !ENABLE(WEB_TIMING) build
253 https://bugs.webkit.org/show_bug.cgi?id=161250
255 Reviewed by Alex Christensen.
257 * loader/SubresourceLoader.cpp:
258 (WebCore::SubresourceLoader::didFinishLoading):
259 * loader/cache/CachedResourceLoader.h:
260 (WebCore::CachedResourceLoader::resourceTimingInformation):
262 2016-08-26 Chris Dumez <cdumez@apple.com>
264 Trying to access cross-origin Location properties should throw a SecurityError
265 https://bugs.webkit.org/show_bug.cgi?id=161248
267 Reviewed by Alex Christensen.
269 Trying to access cross-origin Location properties should throw a SecurityError:
270 - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
271 - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
273 Firefox and Chrome already throw. However, WebKit was logging an error message
274 and returning undefined.
276 No new tests, updated existing tests.
278 * bindings/js/JSDOMBinding.cpp:
279 (WebCore::throwSecurityError):
280 * bindings/js/JSDOMBinding.h:
281 * bindings/js/JSLocationCustom.cpp:
282 (WebCore::JSLocation::getOwnPropertySlotDelegate):
284 2016-08-26 Per Arne Vollan <pvollan@apple.com>
287 https://bugs.webkit.org/show_bug.cgi?id=161241
289 Reviewed by Brent Fulgham.
291 MSVC warns about potential use of uninitialized variables.
293 * accessibility/AXObjectCache.cpp:
294 * css/parser/CSSParserValues.cpp:
296 2016-08-26 Eric Carlson <eric.carlson@apple.com>
298 [MediaStream] Add support for OverConstrainedErrorEvent
299 https://bugs.webkit.org/show_bug.cgi?id=161199
300 <rdar://problem/28011819>
302 Reviewed by Jer Noble.
304 Test: fast/events/constructors/overconstrained-error-event-constructor.html
307 * DerivedSources.make:
308 * Modules/mediastream/OverconstrainedErrorEvent.h: Added.
309 (WebCore::OverconstrainedErrorEvent::~OverconstrainedErrorEvent):
310 (WebCore::OverconstrainedErrorEvent::create):
311 (WebCore::OverconstrainedErrorEvent::createForBindings):
312 (WebCore::OverconstrainedErrorEvent::error):
313 (WebCore::OverconstrainedErrorEvent::eventInterface):
314 (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent):
315 * Modules/mediastream/OverconstrainedErrorEvent.idl: Added.
317 * WebCore.xcodeproj/project.pbxproj: Add new files.
319 * bindings/js/JSDictionary.cpp:
320 (WebCore::JSDictionary::convertValue): Add OverconstrainedErrorEvent converter.
321 * bindings/js/JSDictionary.h:
323 * dom/EventNames.in: Add OverconstrainedErrorEvent.
325 2016-08-26 Frederic Wang <fwang@igalia.com>
327 The annotation-xml element does not need to be behave as an mrow
328 https://bugs.webkit.org/show_bug.cgi?id=161230
330 Reviewed by Manuel Rego Casasnovas.
332 In r204779, MathMLAnnotationElement was made a MathMLRowElement just because the
333 annotation-xml element is generating a RenderMathMLRow. This later point is actually not
334 needed since annotation-xml is just a wrapper for foreign elements and so does not need to
335 handle special MathML features like operator spacing or stretching. We can thus move back
336 MathMLAnnotationElement to a generic MathMLPresentationElement and instead make the
337 annotation-xml element generate a generic RenderMathMLBlock renderer.
339 No new tests, semantics annotations already covered by existing tests.
341 * mathml/MathMLAnnotationElement.cpp: Replace RenderMathMLRow.h with RenderMathMLBlock.h
342 (WebCore::MathMLAnnotationElement::MathMLAnnotationElement): Inherit from
343 MathMLPresentationElement instead of MathMLRowElement.
344 (WebCore::MathMLAnnotationElement::createElementRenderer): Make annotation-xml create a
345 RenderMathMLBlock instead of a RenderMathMLRow.
346 (WebCore::MathMLAnnotationElement::attributeChanged): Inherit from MathMLPresentationElement
347 instead of MathMLRowElement.
348 * mathml/MathMLAnnotationElement.h: Ditto.
350 2016-08-26 Csaba Osztrogonác <ossy@webkit.org>
352 Typo fix after r56209
353 https://bugs.webkit.org/show_bug.cgi?id=161246
355 Reviewed by Gyuyoung Kim.
357 * page/FrameView.cpp:
358 (WebCore::FrameView::adjustMediaTypeForPrinting):
360 2016-08-26 Per Arne Vollan <pvollan@apple.com>
363 https://bugs.webkit.org/show_bug.cgi?id=161077
365 Reviewed by Brent Fulgham.
367 * css/CSSGrammar.y.includes:
368 * css/RuleFeature.cpp:
369 (WebCore::makeAttributeSelectorKey):
370 * editing/TextIterator.cpp:
371 (WebCore::SearchBuffer::SearchBuffer):
372 * html/HTMLElement.cpp:
373 (WebCore::HTMLElement::textToFragment):
374 * html/MediaElementSession.h:
376 * platform/graphics/ca/GraphicsLayerCA.cpp:
377 * platform/network/HTTPParsers.cpp:
378 (WebCore::parseHTTPHeader):
379 * rendering/InlineIterator.h:
380 (WebCore::InlineIterator::clear):
381 * rendering/RenderDeprecatedFlexibleBox.cpp:
382 (WebCore::FlexBoxIterator::reset):
383 * rendering/RenderText.cpp:
384 (WebCore::RenderText::secureText):
385 * rendering/mathml/RenderMathMLToken.cpp:
386 (WebCore::mathVariant):
387 * style/InlineTextBoxStyle.cpp:
388 (WebCore::visualOverflowForDecorations):
389 * xml/XPathGrammar.y:
391 2016-08-26 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
393 Make custom constructors consistent with generated bindings code
394 https://bugs.webkit.org/show_bug.cgi?id=159550
396 Reviewed by Youenn Fablet.
398 Add assertion to check DOMConstructorObject* passed in ExecState is not null.
399 Rename throwConstructorDocumentUnavailableError to throwConstructorScriptExecutionContextUnavailableError since
400 ScriptExecutionContext is not necessarily a Document.
401 Modify error message in case of argument error to be consistent with generated binding code: replace calls to
402 throwVMError with calls to throwConstructorScriptExecutionContextUnavailableError and throwArgumentTypeError.
404 No new test required. Modify tests and tests expectations to align with new error messages.
406 * bindings/js/JSAudioContextCustom.cpp:
407 (WebCore::constructJSAudioContext):
408 * bindings/js/JSBlobCustom.cpp:
409 (WebCore::constructJSBlob):
410 * bindings/js/JSDOMBinding.cpp:
411 (WebCore::throwConstructorScriptExecutionContextUnavailableError):
412 * bindings/js/JSDOMBinding.h:
413 * bindings/js/JSDOMConstructor.h:
414 (WebCore::JSBuiltinConstructor<JSClass>::callConstructor):
415 * bindings/js/JSDOMFormDataCustom.cpp:
416 (WebCore::constructJSDOMFormData):
417 * bindings/js/JSDataCueCustom.cpp:
418 (WebCore::constructJSDataCue):
419 * bindings/js/JSFileCustom.cpp:
420 (WebCore::constructJSFile):
421 * bindings/js/JSHTMLElementCustom.cpp:
422 (WebCore::constructJSHTMLElement):
423 * bindings/js/JSMediaSessionCustom.cpp:
424 (WebCore::constructJSMediaSession):
425 * bindings/js/JSMutationObserverCustom.cpp:
426 (WebCore::constructJSMutationObserver):
427 * bindings/js/JSReadableStreamPrivateConstructors.cpp:
428 (WebCore::constructJSReadableStreamDefaultReader):
429 * bindings/js/JSWorkerCustom.cpp:
430 (WebCore::constructJSWorker):
431 * bindings/scripts/CodeGeneratorJS.pm:
432 (GenerateCallbackImplementation):
434 (GenerateHashTableValueArray):
435 (GenerateConstructorDefinition):
436 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
437 (WebCore::JSTestEventConstructorConstructor::construct):
438 * bindings/scripts/test/JS/JSTestInterface.cpp:
439 (WebCore::JSTestInterfaceConstructor::construct):
440 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
441 (WebCore::JSTestNamedConstructorNamedConstructor::construct):
442 * bindings/scripts/test/JS/JSTestNode.cpp:
443 (WebCore::JSTestNodeConstructor::construct):
444 * bindings/scripts/test/JS/JSTestObj.cpp:
445 (WebCore::JSTestObjConstructor::construct):
446 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
447 (WebCore::constructJSTestOverloadedConstructors1):
448 (WebCore::constructJSTestOverloadedConstructors2):
449 (WebCore::constructJSTestOverloadedConstructors3):
450 (WebCore::constructJSTestOverloadedConstructors4):
451 (WebCore::constructJSTestOverloadedConstructors5):
452 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
453 (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
454 (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
455 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
456 (WebCore::JSTestTypedefsConstructor::construct):
458 2016-08-25 Carlos Garcia Campos <cgarcia@igalia.com>
460 Unreviewed. Fix GTK+ build after r204986 and r204996.
462 * page/DOMWindow.idl:
464 2016-08-25 Wenson Hsieh <wenson_hsieh@apple.com>
466 Dragging against the end of the inline media scrubber causes the media scrubber to hide
467 https://bugs.webkit.org/show_bug.cgi?id=161207
469 Reviewed by Eric Carlson.
471 Previously, we would re-enable behavior restrictions when firing an ended event. However, if the ended event is
472 caused by the user seeking to the end of the video, the media controls would be taken away from under the user.
473 To prevent this, we don't add the relevant behavior restrictions upon media ended if media was seeking before
476 Tweaked an existing WebKit API test to cover this change.
478 * html/HTMLMediaElement.cpp:
479 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
480 (WebCore::HTMLMediaElement::addBehaviorRestrictionsOnEndIfNecessary):
481 * html/HTMLMediaElement.h:
482 * html/MediaElementSession.cpp:
483 (WebCore::MediaElementSession::canControlControlsManager):
485 2016-08-25 Andreas Kling <akling@apple.com>
487 REGRESSION: RELEASE_ASSERT in ResourceUsageThread::platformThreadBody when ASan is enabled
488 <https://webkit.org/b/161203>
489 <rdar://problem/28011251>
491 Reviewed by Joseph Pecoraro.
493 * page/cocoa/ResourceUsageThreadCocoa.mm:
494 (WebCore::ResourceUsageThread::platformThreadBody): Remove overly optimistic assertions about
495 "GC owned" memory never being higher than total malloc memory usage. This accounting is not
496 really exact and pretending otherwise will just lead to crashes.
498 * html/HTMLCanvasElement.cpp:
499 (WebCore::HTMLCanvasElement::externalMemoryCost): Hook up HTMLCanvasElement to the ImageBuffer
500 helper for reporting external memory cost. This makes accounting slightly more correct.
502 2016-08-25 Chris Dumez <cdumez@apple.com>
504 Regression(r203623): Breaks App Store application
505 https://bugs.webkit.org/show_bug.cgi?id=161206
506 <rdar://problem/28015060>
508 Reviewed by Ryosuke Niwa.
510 Add quirks for the App Store application so that we log an error message
511 when passing a Document node to Window.getComputedStyle() instead of
512 throwing an exception.
514 * page/DOMWindow.cpp:
515 (WebCore::DOMWindow::getComputedStyle):
517 * page/DOMWindow.idl:
518 * platform/RuntimeApplicationChecks.h:
519 * platform/RuntimeApplicationChecks.mm:
520 (WebCore::MacApplication::isAppStore):
522 2016-08-25 Said Abou-Hallawa <sabouhallawa@apple.com>
524 REGRESSION (r203378): [iOS] The PDF image is rendered stretched if a sub image of it is cached first
525 https://bugs.webkit.org/show_bug.cgi?id=160617
527 Reviewed by Tim Horton.
529 When caching only a sub-image of the PDF ensure the source rectangle starts
530 at the top-left of the cached sub-image rectangle. When drawing the cached
531 sub-image to the destination context ensure the destination rectangle is the
532 sub-image rectangle so no stretching or shrinking happens.
534 Test: fast/images/cached-clipped-pdf.html
537 (WebCore::Settings::Settings):
538 (WebCore::Settings::setCachedPDFImageEnabled): Deleted.
540 (WebCore::Settings::isCachedPDFImageEnabled): Deleted.
542 Change the boolean setting CachedPDFImageEnabled to be enum property and
543 rename it PDFImageCachingPolicy. Allow the "PDFImageCachingBelowMemoryLimit"
544 option to be available on a;; platforms. The "PDFImageCachingClipBoundsOnly"
545 option is added for testing purpose. If forces recaching the PDF with each
546 draw and it sets the cached image rectangle to the clipping rectangle.
548 * platform/graphics/cg/PDFDocumentImage.cpp:
549 (WebCore::PDFDocumentImage::setPdfImageCachingPolicy): Take an enum instead of boolean.
550 (WebCore::cachedImageRect):
551 (WebCore::PDFDocumentImage::decodedSizeChanged): Enable PDFImageCachingBelowMemoryLimit
553 (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): Fix the source rectangle
554 when caching a sub-image of the PDF.
555 (WebCore::PDFDocumentImage::draw): Fix the destination rectangle when drawing
556 a sub-image to the destination context.
557 (WebCore::PDFDocumentImage::setCachedPDFImageEnabled): Deleted.
558 * platform/graphics/cg/PDFDocumentImage.h:
560 * rendering/RenderImage.cpp:
561 (WebCore::RenderImage::paintIntoRect):
563 * testing/InternalSettings.cpp:
564 (WebCore::InternalSettings::Backup::Backup):
565 (WebCore::InternalSettings::Backup::restoreTo):
566 (WebCore::InternalSettings::setPDFImageCachingPolicy):
567 (WebCore::InternalSettings::setCachedPDFImageEnabled): Deleted.
568 * testing/InternalSettings.h:
569 * testing/InternalSettings.idl:
570 Change the internal setting CachedPDFImageEnabled to PDFImageCachingPolicy.
572 2016-08-25 Zalan Bujtas <zalan@apple.com>
574 Infinite recursion crash in WebCore::RenderBlockFlow::layoutBlock
575 https://bugs.webkit.org/show_bug.cgi?id=139474
576 <rdar://problem/27705190>
578 Reviewed by David Hyatt.
580 We should just give up trying to avoid widow when the page is too small to break line.
582 Test: fast/multicol/assert-on-small-page-height-with-widow.html
584 * rendering/RenderBlockFlow.cpp:
585 (WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidowIfNeeded):
586 (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
587 * rendering/RenderBlockFlow.h:
589 2016-08-24 Sam Weinig <sam@webkit.org>
591 Add the ability to override the implementation name of IDL enums and dictionaries
592 https://bugs.webkit.org/show_bug.cgi?id=161185
594 Reviewed by Anders Carlsson.
596 * bindings/scripts/CodeGenerator.pm:
598 Build a dictionary of IDL name -> implementation name overrides
599 for enums and dictionaries up front based on ImplementedAs extended
602 (HasEnumImplementationNameOverride):
603 (GetEnumImplementationNameOverride):
604 (HasDictionaryImplementationNameOverride):
605 (GetDictionaryImplementationNameOverride):
606 Expose predicate and getter for name overrides.
608 * bindings/scripts/CodeGeneratorJS.pm:
609 (GetEnumerationClassName):
610 (GetDictionaryClassName):
611 Use the override names as necessary.
613 * bindings/scripts/test/TestObj.idl:
614 Add tests for enums and dictionaries with ImplementedAs extended
617 2016-08-25 Johan K. Jensen <johan_jensen@apple.com>
619 Don't store networkLoadTiming in the disk cache
620 https://bugs.webkit.org/show_bug.cgi?id=161161
622 Reviewed by Antti Koivisto.
624 No functionality changed. So, no new tests.
626 * platform/network/ResourceResponseBase.h:
627 (WebCore::ResourceResponseBase::encode):
628 (WebCore::ResourceResponseBase::decode):
630 2016-08-25 Johan K. Jensen <johan_jensen@apple.com>
632 Update the Resource Timing implementation
633 https://bugs.webkit.org/show_bug.cgi?id=161068
635 Reviewed by Alex Christensen.
637 Tests: imported/w3c/web-platform-tests/resource-timing/resource-timing.html
638 imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
640 Update the Resource Timing implementation for better compatibility with the Resource Timing API spec.
641 Use LoadTiming for general timing information about a resources load timeline.
642 Mark timestamps for newly loaded resources as well as cached resources.
644 * loader/DocumentLoader.cpp:
645 (WebCore::DocumentLoader::startLoadingMainResource):
646 StartTime and fetchStart should be equal initially.
648 * loader/LoadTiming.cpp:
649 (WebCore::LoadTiming::LoadTiming): Moved member initialization out. Removed constructor.
650 * loader/LoadTiming.h:
651 (WebCore::LoadTiming::markStartTimeAndFetchStart):
652 Mark startTime and fetchStart simultaneously.
654 * loader/ResourceLoader.cpp:
655 (WebCore::ResourceLoader::init):
656 Mark the start time of resources.
658 * loader/ResourceLoader.h:
659 (WebCore::ResourceLoader::loadTiming):
660 Add LoadTiming info to handle a resources load timing.
662 * loader/ResourceTimingInformation.cpp:
663 (WebCore::ResourceTimingInformation::addResourceTiming):
664 * loader/ResourceTimingInformation.h:
665 Only pass in the URL from the ResourceRequest.
666 Pass LoadTiming instead of timestamps.
668 * loader/SubresourceLoader.cpp:
669 (WebCore::SubresourceLoader::willSendRequestInternal):
672 (WebCore::SubresourceLoader::didFinishLoading):
673 Mark the responseEnd timestamp.
674 Add the ResourceEntry to the timeline before notifyDone is called.
676 * loader/cache/CachedResourceLoader.cpp:
677 (WebCore::CachedResourceLoader::requestResource):
678 (WebCore::CachedResourceLoader::revalidateResource):
679 (WebCore::CachedResourceLoader::loadDone):
680 Mark timestamps for cached resources and use them instead of a cached LoadTiming.
682 * loader/cache/CachedResourceLoader.h:
683 (WebCore::CachedResourceLoader::resourceTimingInformation):
684 Add ResourceTimingInformation getter so SubresourceLoader.cpp can add entries before callbacks.
686 * page/Performance.cpp:
687 (WebCore::Performance::addResourceTiming):
688 * page/Performance.h:
689 Update signature: URLs and LoadTiming instead of timestamps.
691 * page/PerformanceResourceTiming.cpp:
692 (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
693 (WebCore::PerformanceResourceTiming::redirectStart):
694 (WebCore::PerformanceResourceTiming::redirectEnd):
695 (WebCore::PerformanceResourceTiming::fetchStart):
696 (WebCore::PerformanceResourceTiming::domainLookupStart):
697 (WebCore::PerformanceResourceTiming::domainLookupEnd):
698 (WebCore::PerformanceResourceTiming::connectStart):
699 (WebCore::PerformanceResourceTiming::connectEnd):
700 (WebCore::PerformanceResourceTiming::requestStart):
701 (WebCore::PerformanceResourceTiming::responseStart):
702 (WebCore::PerformanceResourceTiming::responseEnd):
703 (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
704 * page/PerformanceResourceTiming.h:
705 Update signatures and properties to use LoadTiming.
706 Use LoadTiming’s redirectStart/End, fetchStart, responseStart/End.
707 Make sure dns and connection timestamps are in increasing order, even when cached.
709 * page/PerformanceResourceTiming.idl:
712 2016-08-24 Anders Carlsson <andersca@apple.com>
714 Simplify createMouseEvent in DragController
715 https://bugs.webkit.org/show_bug.cgi?id=161168
717 Reviewed by Dan Bernstein.
719 * page/DragController.cpp:
720 (WebCore::createMouseEvent):
721 * platform/DragData.cpp:
722 (WebCore::DragData::modifierKeyState): Deleted.
723 * platform/DragData.h:
725 2016-08-25 Chris Dumez <cdumez@apple.com>
727 DOMTokenList.value should be a stringifier attribute
728 https://bugs.webkit.org/show_bug.cgi?id=161195
730 Reviewed by Darin Adler.
732 DOMTokenList.value should be a stringifier attribute:
733 - https://dom.spec.whatwg.org/#domtokenlist
735 No new tests, this change is not observable from the Web.
737 * html/DOMTokenList.h:
738 (WebCore::DOMTokenList::toString): Deleted.
739 * html/DOMTokenList.idl:
740 * html/HTMLLinkElement.cpp:
741 (WebCore::HTMLLinkElement::iconSizes): Deleted.
742 * html/HTMLLinkElement.h:
744 2016-08-25 Csaba Osztrogonác <ossy@webkit.org>
746 [Mac][cmake] Unreviewed speculative buildfix after r204852, just for fun.
750 2016-08-24 Frederic Wang <fwang@igalia.com>
752 Do not store layout parameters on the RenderMathMLRoot class
753 https://bugs.webkit.org/show_bug.cgi?id=161132
755 Reviewed by Darin Adler.
757 Storing layout parameters on the RenderMathMLRoot class is not really needed since reading
758 the parameters from the MATH table is not too expensive and updateStyle() is currently always
759 called in layoutBlock() and computePreferredLogicalWidths(). Most of these parameters are
760 actually only used in layoutBlock(). We separate horizontal and vertical parameters since
761 the latter are not needed for preferred width calculations. This removes the need for calling
762 an updateStyle functions and may also fix update issues when zooming in or out.
764 No new tests, already covered by existing tests.
766 * rendering/mathml/MathMLStyle.cpp:
767 (WebCore::MathMLStyle::updateStyleIfNeeded): No need to update layout parameters for the
768 RenderMathMLRoot class.
769 * rendering/mathml/RenderMathMLRoot.cpp:
770 (WebCore::RenderMathMLRoot::styleDidChange): No need to update layout parameters.
771 (WebCore::RenderMathMLRoot::horizontalParameters): Move code from updateStyle to retrieve the
772 horizontal parameters.
773 (WebCore::RenderMathMLRoot::verticalParameters): Ditto for vertical parameters.
774 (WebCore::RenderMathMLRoot::computePreferredLogicalWidths): Call horizontalParameters() to
775 get the kernings of the index instead of calling updateStyle().
776 (WebCore::RenderMathMLRoot::layoutBlock): Call horizontalParameters() and
777 verticalParameters() to get the layout parameters instead of calling updateStyle().
778 (WebCore::RenderMathMLRoot::paint): Call horizontalParameters() and verticalParameters()
779 to get the layout parameters.
780 (WebCore::RenderMathMLRoot::updateFromElement): Deleted. No need to call updateStyle().
781 (WebCore::RenderMathMLRoot::updateStyle): Deleted.
782 * rendering/mathml/RenderMathMLRoot.h: Do not override updateFromElement(). Replace some
783 layout parameters stored on the class with struct and helper functions to manipulate them.
785 2016-08-24 Chris Dumez <cdumez@apple.com>
787 WorkerLocation.prototype.toString() should be enumerable
788 https://bugs.webkit.org/show_bug.cgi?id=161183
790 Reviewed by Ryosuke Niwa.
792 WorkerLocation.prototype.toString() should be enumerable:
793 - https://html.spec.whatwg.org/#workerlocation
794 - http://heycam.github.io/webidl/#es-stringifier
796 No new tests, updated existing test.
798 * workers/WorkerLocation.h:
799 (WebCore::WorkerLocation::toString): Deleted.
800 * workers/WorkerLocation.idl:
801 Also use USVString string type instead of DOMString to match the
802 specification. There is no behavior change because those attributes
805 2016-08-24 Chris Dumez <cdumez@apple.com>
807 Location.toString() should be enumerable
808 https://bugs.webkit.org/show_bug.cgi?id=161179
810 Reviewed by Geoffrey Garen.
812 Location.toString() should be enumerable as per:
813 - https://html.spec.whatwg.org/#location
814 - http://heycam.github.io/webidl/#es-stringifier
816 This patch stops hard-coding the toString() operation on the Location
817 interface and makes the 'href' attribute a stringifier attribute instead,
818 as per the specification. The generated toString() has the same behavior
819 as it used to but it is now enumerable, as it should.
821 No new tests, updated existing test.
823 * bindings/js/JSLocationCustom.cpp:
824 (WebCore::JSLocation::toStringFunction): Deleted.
827 2016-08-24 Joseph Pecoraro <pecoraro@apple.com>
829 Implement `CSS.escape` as per CSSOM
830 https://bugs.webkit.org/show_bug.cgi?id=126337
832 Reviewed by Dean Jackson.
834 Test: css3/escape-dom-api.html
836 * css/CSSOMUtils.cpp:
837 (WebCore::serializeIdentifier):
838 Update serialization to match the latest version of the spec:
839 <https://drafts.csswg.org/cssom/#serialize-an-identifier>
840 New handling for 0x0, 0x7f, just "-", and "--" is now allowed.
842 * css/DOMCSSNamespace.cpp:
843 (WebCore::DOMCSSNamespace::escape):
844 * css/DOMCSSNamespace.h:
845 * css/DOMCSSNamespace.idl:
846 New CSS.escape method.
848 2016-08-24 Zalan Bujtas <zalan@apple.com>
850 ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
851 https://bugs.webkit.org/show_bug.cgi?id=155700
852 <rdar://problem/27720727>
854 Reviewed by David Hyatt.
856 RenderBox::m_minPreferredLogicalWidth/m_maxPreferredLogicalWidth don't need special initial value since
857 preferredLogicalWidthsDirty flag guards them. -1 as initial value can cause problems for renderers that don't
858 override RenderBox::computePreferredLogicalWidths().
860 Test: fast/ruby/assert-when-content-size-is-negative.html
862 * rendering/RenderBox.cpp:
863 (WebCore::RenderBox::RenderBox):
864 (WebCore::RenderBox::dirtyLineBoxes):
865 (WebCore::RenderBox::deleteLineBoxWrapper):
866 * rendering/RenderBox.h:
868 2016-08-24 Alex Christensen <achristensen@webkit.org>
871 https://bugs.webkit.org/show_bug.cgi?id=161177
873 Reviewed by Tim Horton.
875 Tests: imported/w3c/web-platform-tests/url/a-element-xhtml.xhtml
876 imported/w3c/web-platform-tests/url/a-element.html
877 imported/w3c/web-platform-tests/url/historical.html
878 imported/w3c/web-platform-tests/url/interfaces.html
879 imported/w3c/web-platform-tests/url/url-constructor.html
880 imported/w3c/web-platform-tests/url/url-domainToUnicode.html
881 imported/w3c/web-platform-tests/url/url-setters.html
882 imported/w3c/web-platform-tests/url/urlsearchparams-append.html
883 imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html
884 imported/w3c/web-platform-tests/url/urlsearchparams-delete.html
885 imported/w3c/web-platform-tests/url/urlsearchparams-get.html
886 imported/w3c/web-platform-tests/url/urlsearchparams-getall.html
887 imported/w3c/web-platform-tests/url/urlsearchparams-has.html
888 imported/w3c/web-platform-tests/url/urlsearchparams-set.html
889 imported/w3c/web-platform-tests/url/urlsearchparams-stringifier.html
892 (WebCore::URL::setQuery):
894 2016-08-24 Ryan Haddad <ryanhaddad@apple.com>
896 Rebaseline bindings tests after r204923.
898 Unreviewed test gardening.
900 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
901 (WebCore::jsTestActiveDOMObjectExcitingAttr):
902 (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
904 2016-08-24 Jonathan Bedard <jbedard@apple.com>
906 FocusController multiple dereferenced NULL pointers
907 https://bugs.webkit.org/show_bug.cgi?id=160808
909 Reviewed by Darin Adler.
911 No new tests needed, fix does not change functionality.
913 This change fixes a number of NULL pointer dereferences which occur in FocusController.
915 * page/FocusController.cpp:
916 (WebCore::isFocusableElementOrScopeOwner): Changed KeyboardEvent reference to pointer.
917 (WebCore::isNonFocusableScopeOwner): Ditto.
918 (WebCore::isFocusableScopeOwner): Ditto.
919 (WebCore::shadowAdjustedTabIndex): Ditto.
921 (WebCore::FocusController::findFocusableElementAcrossFocusScope): Pass pointer instead of reference to KeyboardEvent.
922 (WebCore::FocusController::nextFocusableElementWithinScope): Ditto.
923 (WebCore::FocusController::previousFocusableElementWithinScope): Ditto.
924 (WebCore::FocusController::findElementWithExactTabIndex): Ditto.
925 (WebCore::nextElementWithGreaterTabIndex): Ditto.
926 (WebCore::previousElementWithLowerTabIndex): Ditto.
927 (WebCore::FocusController::nextFocusableElementOrScopeOwner): Ditto.
928 (WebCore::FocusController::previousFocusableElementOrScopeOwner): Ditto.
929 (WebCore::relinquishesEditingFocus): Ditto.
931 2016-08-24 Nan Wang <n_wang@apple.com>
933 AX: VoiceOver on iOS ignores aria-checked on menuitemradio and menuitemcheckbox
934 https://bugs.webkit.org/show_bug.cgi?id=161118
936 Reviewed by Chris Fleizach.
938 Added checkboxOrRadioValue and toggle trait to menuitemradio and menuitemcheckbox.
940 Test: accessibility/ios-simulator/menuitem-checked.html
942 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
943 (-[WebAccessibilityObjectWrapper accessibilityTraits]):
944 (-[WebAccessibilityObjectWrapper accessibilityValue]):
946 2016-08-24 Chris Dumez <cdumez@apple.com>
948 Assertion hit: ASSERT(!m_parserScheduler) in ~HTMLDocumentParser()
949 https://bugs.webkit.org/show_bug.cgi?id=161083
950 <rdar://problem/27986937>
952 Reviewed by Darin Adler.
954 Call cancelParsing() right before re-creating the new parser in
955 Document::implicitOpen(). We would previously call removeChildren()
956 in between which is was an issue because it can cause JS to be
957 executed and therefore the parser to be re-created after we have
960 No new tests, unskipped html/browsers/browsing-the-web/unloading-documents/004.html
961 which was consistently crashing.
964 (WebCore::Document::implicitOpen):
966 2016-08-24 Eric Carlson <eric.carlson@apple.com>
968 [MediaStream] Add support for OverConstrained Error
969 https://bugs.webkit.org/show_bug.cgi?id=160790
970 <rdar://problem/27815715>
972 Reviewed by Jer Noble.
974 Existing tests updated.
976 * DerivedSources.make:
977 * Modules/mediastream/OverconstrainedError.h: Added.
978 (WebCore::OverconstrainedError::create):
979 (WebCore::OverconstrainedError::constraint):
980 (WebCore::OverconstrainedError::message):
981 (WebCore::OverconstrainedError::OverconstrainedError):
982 * Modules/mediastream/OverconstrainedError.idl: Added.
983 * WebCore.xcodeproj/project.pbxproj:
985 2016-08-24 Anders Carlsson <andersca@apple.com>
987 Build the platform name dynamically for the phony WebKitLegacy framework
988 https://bugs.webkit.org/show_bug.cgi?id=161163
990 Reviewed by Dan Bernstein.
992 * Configurations/WebKitLegacyStub.iOS.tbd:
993 * WebCore.xcodeproj/project.pbxproj:
995 2016-08-24 Chris Dumez <cdumez@apple.com>
997 It should not be possible to access Location attributes cross origin
998 https://bugs.webkit.org/show_bug.cgi?id=161125
999 <rdar://problem/27982472>
1001 Reviewed by Brent Fulgham.
1003 It should not be possible to access Location attributes cross origin:
1004 - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
1006 We allow access to replace() as per the specification and consistently
1007 with Firefox. The specification seems to indicate we should allow access
1008 to 'href' but Firefox does not and we previously did not so I am not
1009 allowing it in this patch.
1011 Test: http/tests/security/location-cross-origin.html
1013 * bindings/scripts/CodeGeneratorJS.pm:
1014 (GenerateImplementation):
1015 * page/Location.idl:
1017 2016-08-24 Joseph Pecoraro <pecoraro@apple.com>
1019 Add User Timing to the feature status page
1020 https://bugs.webkit.org/show_bug.cgi?id=161154
1022 Reviewed by Darin Adler.
1026 2016-08-24 Andreas Kling <akling@apple.com>
1028 Leaks bot hits an assertion in ResourceUsageThread::platformThreadBody
1029 <https://webkit.org/b/160534>
1031 Reviewed by Joseph Pecoraro.
1033 Use the correct malloc bucket when bmalloc is disabled (which is the case on leaks bots.)
1035 * page/cocoa/ResourceUsageThreadCocoa.mm:
1036 (WebCore::ResourceUsageThread::platformThreadBody):
1038 2016-08-24 Filip Pizlo <fpizlo@apple.com>
1040 Unreviewed, roll out r204901, r204897, r204866, r204856, r204854.
1042 * ForwardingHeaders/heap/HeapInlines.h: Removed.
1043 * ForwardingHeaders/interpreter/Interpreter.h: Added.
1044 * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Removed.
1045 * Modules/indexeddb/IDBCursorWithValue.cpp:
1046 * Modules/indexeddb/client/TransactionOperation.cpp:
1047 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1048 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1049 * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp:
1050 * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp:
1051 * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp:
1052 * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp:
1053 * bindings/js/JSClientRectCustom.cpp:
1054 * bindings/js/JSDOMBinding.cpp:
1055 * bindings/js/JSDOMBinding.h:
1056 * bindings/js/JSDeviceMotionEventCustom.cpp:
1057 * bindings/js/JSDeviceOrientationEventCustom.cpp:
1058 * bindings/js/JSErrorEventCustom.cpp:
1059 * bindings/js/JSIDBCursorWithValueCustom.cpp:
1060 * bindings/js/JSIDBIndexCustom.cpp:
1061 * bindings/js/JSPopStateEventCustom.cpp:
1062 * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1063 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1064 * bindings/js/WorkerScriptController.cpp:
1065 * contentextensions/ContentExtensionParser.cpp:
1066 * dom/ErrorEvent.cpp:
1067 * html/HTMLCanvasElement.cpp:
1068 * html/MediaDocument.cpp:
1069 * inspector/CommandLineAPIModule.cpp:
1070 * loader/EmptyClients.cpp:
1071 * page/CaptionUserPreferences.cpp:
1073 * page/PageGroup.cpp:
1074 * page/UserContentController.cpp:
1075 * platform/mock/mediasource/MockBox.cpp:
1076 * testing/GCObservation.cpp:
1078 2016-08-24 Zalan Bujtas <zalan@apple.com>
1080 ASSERTION FAILED: childrenInline() in WebCore::RenderBlockFlow::hasLines
1081 https://bugs.webkit.org/show_bug.cgi?id=139396
1082 <rdar://problem/27704339>
1084 Reviewed by David Hyatt.
1086 RenderBlockFlow::hasLines() should be able to handle the block-children case.
1088 Test: fast/ruby/assert-with-block-rt-child-and-emphasis.html
1090 * rendering/RenderBlock.h:
1091 (WebCore::RenderBlock::hasLines): Deleted.
1092 * rendering/RenderBlockFlow.cpp:
1093 (WebCore::RenderBlockFlow::hasLines):
1094 * rendering/RenderBlockFlow.h:
1096 2016-08-24 Carlos Garcia Campos <cgarcia@igalia.com>
1098 Unreviewed. Fix GObject DOM bindings API break after r204624 and r204648.
1100 prefix, namespaceURI and localName attributes were moved from Node to Attr/Element in r204624 and prefix was
1101 also made readonly in r204648.
1103 * bindings/gobject/WebKitDOMDeprecated.cpp:
1104 (webkit_dom_node_get_namespace_uri):
1105 (webkit_dom_node_get_prefix):
1106 (webkit_dom_node_set_prefix):
1107 (webkit_dom_node_get_local_name):
1108 * bindings/gobject/WebKitDOMDeprecated.h:
1109 * bindings/gobject/WebKitDOMDeprecated.symbols:
1110 * bindings/gobject/webkitdom.symbols:
1112 2016-08-23 Simon Fraser <simon.fraser@apple.com>
1114 Add some logging for WKSelectionDrawingInfo
1115 https://bugs.webkit.org/show_bug.cgi?id=161055
1117 Reviewed by Tim Horton.
1119 Add TextStream dumping for SelectionRect.
1121 * platform/ios/SelectionRect.cpp:
1122 (WebCore::operator<<):
1123 * platform/ios/SelectionRect.h:
1125 2016-08-23 Frederic Wang <fwang@igalia.com>
1127 More consistent header inclusions in the MathML module
1128 https://bugs.webkit.org/show_bug.cgi?id=161080
1130 Reviewed by Darin Adler.
1132 We adjust header inclusion in the MathML module so that:
1133 - implementation file's own header is outside the #if ENABLE(MATHML)
1134 - There is always a blank line after the #if ENABLE(MATHML)
1136 No new tests, behavior is unchanged.
1138 * mathml/MathMLAnnotationElement.cpp:
1139 * mathml/MathMLAnnotationElement.h:
1140 * mathml/MathMLElement.cpp:
1141 * mathml/MathMLFractionElement.cpp:
1142 * mathml/MathMLFractionElement.h:
1143 * mathml/MathMLMathElement.cpp:
1144 * mathml/MathMLMathElement.h:
1145 * mathml/MathMLMencloseElement.cpp:
1146 * mathml/MathMLMencloseElement.h:
1147 * mathml/MathMLOperatorDictionary.cpp:
1148 * mathml/MathMLOperatorElement.cpp:
1149 * mathml/MathMLOperatorElement.h:
1150 * mathml/MathMLPaddedElement.cpp:
1151 * mathml/MathMLPaddedElement.h:
1152 * mathml/MathMLPresentationElement.cpp:
1153 * mathml/MathMLPresentationElement.h:
1154 * mathml/MathMLRowElement.cpp:
1155 * mathml/MathMLRowElement.h:
1156 * mathml/MathMLScriptsElement.cpp:
1157 * mathml/MathMLScriptsElement.h:
1158 * mathml/MathMLSelectElement.h:
1159 * mathml/MathMLSpaceElement.cpp:
1160 * mathml/MathMLSpaceElement.h:
1161 * mathml/MathMLTokenElement.cpp:
1162 * mathml/MathMLUnderOverElement.cpp:
1163 * mathml/MathMLUnderOverElement.h:
1164 * rendering/mathml/MathMLStyle.cpp:
1165 * rendering/mathml/MathOperator.cpp:
1166 * rendering/mathml/MathOperator.h:
1167 * rendering/mathml/RenderMathMLBlock.cpp:
1168 * rendering/mathml/RenderMathMLFenced.cpp:
1169 * rendering/mathml/RenderMathMLFencedOperator.cpp:
1170 * rendering/mathml/RenderMathMLFraction.cpp:
1171 * rendering/mathml/RenderMathMLMath.cpp:
1172 * rendering/mathml/RenderMathMLMenclose.cpp:
1173 * rendering/mathml/RenderMathMLMenclose.h:
1174 * rendering/mathml/RenderMathMLOperator.cpp:
1175 * rendering/mathml/RenderMathMLRoot.cpp:
1176 * rendering/mathml/RenderMathMLRow.cpp:
1177 * rendering/mathml/RenderMathMLScripts.cpp:
1178 * rendering/mathml/RenderMathMLUnderOver.cpp:
1180 2016-08-23 Zalan Bujtas <zalan@apple.com>
1182 ASSERTION FAILED: !view().layoutStateEnabled() || style().styleType() == FIRST_LETTER in WebCore::RenderInline::clippedOverflowRectForRepaint
1183 https://bugs.webkit.org/show_bug.cgi?id=155363
1184 <rdar://problem/27720434>
1186 Reviewed by David Hyatt.
1188 Loosen ASSERT to include calls when the inline has a self painting layer. It's valid to end up here during layout when
1189 the layer's composite state changes.
1191 Test: fast/layers/assert-on-self-painting-inline-with-scrolling.html
1193 * rendering/RenderInline.cpp:
1194 (WebCore::RenderInline::clippedOverflowRectForRepaint):
1196 2016-08-23 Anders Carlsson <andersca@apple.com>
1198 Create a phony WebKitLegacy framework that the WebCoreTestSupport dylib can find
1199 https://bugs.webkit.org/show_bug.cgi?id=161123
1201 Reviewed by Dan Bernstein.
1203 * Configurations/WebCore.xcconfig:
1204 Use the WebKitLegacy.tbd file from the phony framework.
1206 * Configurations/WebCoreTestSupport.xcconfig:
1207 Look for WebKitLegacy.framework in the phony framework path.
1209 * WebCore.xcodeproj/project.pbxproj:
1210 Add a new phase that creates a phony WebKitLegacy framework.
1212 2016-08-23 Chris Dumez <cdumez@apple.com>
1214 Add support for CanvasRenderingContext2D.resetTransform()
1215 https://bugs.webkit.org/show_bug.cgi?id=161089
1217 Reviewed by Simon Fraser.
1219 Add support for CanvasRenderingContext2D.resetTransform():
1220 - https://html.spec.whatwg.org/#dom-context-2d-resettransform
1222 Firefox and Chrome already support this.
1225 imported/blink/fast/canvas/canvas-resetTransform.html
1226 imported/w3c/web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html
1228 * html/canvas/CanvasRenderingContext2D.cpp:
1229 (WebCore::CanvasRenderingContext2D::setTransform):
1230 (WebCore::CanvasRenderingContext2D::resetTransform):
1231 * html/canvas/CanvasRenderingContext2D.h:
1232 * html/canvas/CanvasRenderingContext2D.idl:
1234 2016-08-23 Said Abou-Hallawa <sabouhallawa@apple.com>
1236 REGRESSION: SVG clip-path doesn't work on root <svg>
1237 https://bugs.webkit.org/show_bug.cgi?id=129180
1239 Reviewed by Tim Horton.
1241 Build the resources cache for the RenderSVGRoot element when it's been
1242 inserted in the render tree. Remove the resources cache before removing
1243 the RenderSVGRoot from the render tree. No worries for the child <svg>
1244 elements since their renderers are of type RenderSVGViewportContainer.
1246 Tests: svg/clip-path/clip-path-on-svg-003.svg
1247 svg/clip-path/clip-path-on-svg-004.svg
1249 * rendering/svg/RenderSVGRoot.cpp:
1250 (WebCore::RenderSVGRoot::insertedIntoTree):
1251 (WebCore::RenderSVGRoot::willBeRemovedFromTree):
1252 * rendering/svg/RenderSVGRoot.h:
1253 These changes are very similar to what we do for adding and removing the
1254 child SVG elements in RenderSVGRoot::addChild() and removeChild().
1256 2016-08-23 Chris Dumez <cdumez@apple.com>
1258 HTMLAreaElement should have a stringifier
1259 https://bugs.webkit.org/show_bug.cgi?id=161105
1261 Reviewed by Geoffrey Garen.
1263 HTMLAreaElement should have a stringifier:
1264 - https://html.spec.whatwg.org/multipage/embedded-content.html#htmlareaelement
1265 - https://html.spec.whatwg.org/multipage/semantics.html#htmlhyperlinkelementutils
1266 - http://heycam.github.io/webidl/#idl-stringifiers
1267 - http://heycam.github.io/webidl/#es-stringifier
1269 Chrome and Firefox already support this.
1271 This patch does the following:
1272 - Add support for stringifier on attributes to our bindings generator.
1273 - Add stringifier to the HTMLHyperlinkElementUtils.href attribute as
1274 per the specification
1275 - Drops the explicit toString on HTMLAnchorElement as HTMLAnchorElement
1276 implements HTMLHyperlinkElementUtils.
1278 Test: fast/dom/toString_attributes.html
1280 * bindings/scripts/CodeGeneratorJS.pm:
1281 (GenerateInterface):
1282 (AddStringifierOperationIfNeeded):
1283 * bindings/scripts/IDLParser.pm:
1284 (parseAttributeOrOperationOrIterator):
1285 * html/HTMLAnchorElement.cpp:
1286 (WebCore::HTMLAnchorElement::toString): Deleted.
1287 * html/HTMLAnchorElement.h:
1288 * html/HTMLAnchorElement.idl:
1289 * html/HTMLHyperlinkElementUtils.idl:
1291 2016-08-23 Alex Christensen <achristensen@webkit.org>
1293 Fix clean Windows build.
1295 * PlatformWin.cmake:
1296 Add another forwarding headers directory.
1298 2016-08-23 Zalan Bujtas <zalan@apple.com>
1300 ASSERTION FAILED: hasOverflowingCell == this->hasOverflowingCell() in WebCore::RenderTableSection::computeOverflowFromCells
1301 https://bugs.webkit.org/show_bug.cgi?id=155702
1302 <rdar://problem/27720731>
1304 Reviewed by David Hyatt.
1306 The simplified layout path for table/section should also clear the slow path flag for visual overflow (since it recomputes
1307 the overflow for the descendant cells).
1309 Test: fast/table/assert-when-visual-overflow-is-cleared.html
1311 * rendering/RenderTableSection.cpp:
1312 (WebCore::RenderTableSection::layout):
1314 2016-08-23 Myles C. Maxfield <mmaxfield@apple.com>
1316 [Cocoa] Reduce uses of CGFonts
1317 https://bugs.webkit.org/show_bug.cgi?id=160896
1319 Reviewed by Darin Adler.
1321 There are a few places where we unnecessarily use CGFonts instead of
1322 CTFonts. We have had an ongoing effort throughout the past few years
1323 of elliminating all of our uses of CGFonts, and this patch moves us
1326 Most of the changes in this patch are straightforward (e.g.
1327 CGFontGetUnitsPerEm() -> CTFontGetUnitsPerEm()). However, there is
1328 one notable change: from CGContextShowGlyphsWithAdvances() to
1329 CTFontDrawGlyphs(). This migration does not cause a performance
1332 No new tests because there is no behavior change.
1334 * WebCore.xcodeproj/project.pbxproj: Delete unnecessary
1335 FontServicesIOS files.
1336 * platform/graphics/FontMetrics.h:
1337 (WebCore::FontMetrics::xHeight): Migrate to Optional<float>
1338 (WebCore::FontMetrics::setXHeight):
1339 (WebCore::FontMetrics::hasXHeight):
1340 (WebCore::FontMetrics::hasCapHeight): Ditto.
1341 (WebCore::FontMetrics::floatCapHeight):
1342 (WebCore::FontMetrics::setCapHeight):
1343 (WebCore::FontMetrics::capHeight):
1344 (WebCore::FontMetrics::setZeroWidth): No one ever used the
1345 m_hasZeroWidth variable, so this patch removes it.
1346 (WebCore::FontMetrics::reset):
1347 (WebCore::FontMetrics::FontMetrics): Deleted.
1348 (WebCore::FontMetrics::setHasXHeight): Deleted. No one ever calls
1349 this, so this patch removes it.
1350 (WebCore::FontMetrics::hasZeroWidth): Deleted.
1351 (WebCore::FontMetrics::setHasZeroWidth): Deleted.
1352 * platform/graphics/cocoa/FontCascadeCocoa.mm:
1353 (WebCore::TextMatrixRestorer::TextMatrixRestorer): Rather than leaving
1354 the text matrix stale after using it, this class cleans it up after us.
1355 This means that the text matrix doesn't have to be reset in other places
1357 (WebCore::TextMatrixRestorer::~TextMatrixRestorer):
1358 (WebCore::TextMatrixRestorer::savedMatrix):
1359 (WebCore::showGlyphsWithAdvances): Migrate from
1360 CGContextShowGlyphsWithAdvances() to CTFontDrawGlyphs()
1361 (WebCore::FontCascade::drawGlyphs): See above comment about the text
1363 (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
1364 (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
1365 * platform/graphics/cocoa/FontCocoa.mm:
1366 (WebCore::shouldUseAdjustment): Taken from FontServicesIOS.
1367 (WebCore::Font::platformInit): Migrate from CG to CT for some direct
1368 replacement API calls.
1369 (WebCore::Font::platformCharWidthInit): Ditto.
1370 (WebCore::Font::determinePitch): Ditto.
1371 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1372 (WebCore::FontPlatformData::openTypeTable): Ditto.
1373 (WebCore::FontPlatformData::description): Ditto.
1374 * platform/graphics/ios/FontServicesIOS.h: Removed. No longer needed
1375 after migrating from CGContextShowGlyphsWithAdvances() to
1377 (WebCore::FontServicesIOS::ascent): Deleted.
1378 (WebCore::FontServicesIOS::descent): Deleted.
1379 (WebCore::FontServicesIOS::lineGap): Deleted.
1380 (WebCore::FontServicesIOS::lineSpacing): Deleted.
1381 (WebCore::FontServicesIOS::xHeight): Deleted.
1382 (WebCore::FontServicesIOS::capHeight): Deleted.
1383 (WebCore::FontServicesIOS::unitsPerEm): Deleted.
1384 * platform/graphics/ios/FontServicesIOS.mm: Removed. Moved into
1385 Font::platformInit().
1386 (WebCore::shouldUseAdjustment): Deleted.
1387 (WebCore::isCourier): Deleted.
1388 (WebCore::FontServicesIOS::FontServicesIOS): Deleted.
1389 * platform/graphics/opentype/OpenTypeCG.cpp:
1390 (WebCore::OpenType::tryGetTypoMetrics): Migrate from CG to CT for some
1391 direct replacement API calls.
1392 * platform/graphics/opentype/OpenTypeCG.h: Ditto.
1393 * platform/graphics/win/FontCGWin.cpp:
1394 (WebCore::FontCascade::drawGlyphs): Restore the text matrix.
1395 * platform/graphics/win/SimpleFontDataCGWin.cpp:
1396 (WebCore::Font::platformWidthForGlyph): Deleted.
1397 * platform/spi/cg/CoreGraphicsSPI.h:
1398 * platform/spi/cocoa/CoreTextSPI.h:
1399 * rendering/RenderThemeIOS.mm:
1400 (WebCore::paintAttachmentText): Deleted.
1401 * rendering/RenderThemeMac.mm:
1402 (WebCore::paintAttachmentTitle): Deleted.
1403 (WebCore::paintAttachmentSubtitle): Deleted.
1405 2016-08-23 Alex Christensen <achristensen@webkit.org>
1407 Fix CMake build after r204852.
1410 There were some non-ASCII characters here causing problems.
1412 2016-08-22 Filip Pizlo <fpizlo@apple.com>
1414 Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression
1415 https://bugs.webkit.org/show_bug.cgi?id=160125
1417 Reviewed by Geoffrey Garen.
1419 No new tests because no new WebCore behavior.
1421 Just rewiring #includes.
1423 * ForwardingHeaders/heap/HeapInlines.h: Added.
1424 * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Added.
1425 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1426 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1427 * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp:
1428 * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp:
1429 * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp:
1430 * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp:
1431 * bindings/js/JSClientRectCustom.cpp:
1432 * bindings/js/JSDOMBinding.h:
1433 * bindings/js/JSDOMStringListCustom.cpp:
1434 * bindings/js/JSErrorEventCustom.cpp:
1435 * bindings/js/JSPopStateEventCustom.cpp:
1436 * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1437 * contentextensions/ContentExtensionParser.cpp:
1438 * dom/ErrorEvent.cpp:
1439 * inspector/CommandLineAPIModule.cpp:
1440 * testing/GCObservation.cpp:
1441 (WebCore::GCObservation::GCObservation):
1443 2016-08-23 Brady Eidson <beidson@apple.com>
1445 WK2 Gamepad layout test support.
1446 https://bugs.webkit.org/show_bug.cgi?id=134671
1448 Reviewed by Alex Christensen.
1450 No new tests (Covered by changes to existing tests).
1452 Add a MockGamepadProvider and expose it in WebCoreTestSupport.
1455 * WebCore.xcodeproj/project.pbxproj:
1457 * Modules/gamepad/Gamepad.cpp:
1458 (WebCore::Gamepad::Gamepad):
1460 * bindings/generic/RuntimeEnabledFeatures.cpp:
1461 (WebCore::RuntimeEnabledFeatures::reset): Deleted. Gamepads should either always be enabled during tests
1462 (As in Mac WK2), or never enabled (As in all other platforms).
1463 * bindings/generic/RuntimeEnabledFeatures.h:
1465 * platform/gamepad/GamepadProvider.h:
1466 (WebCore::GamepadProvider::isMockGamepadProvider):
1468 * testing/MockGamepad.cpp: Copied from Source/WebKit2/Shared/Gamepad/GamepadData.cpp.
1469 (WebCore::MockGamepad::MockGamepad):
1470 (WebCore::MockGamepad::updateDetails):
1471 (WebCore::MockGamepad::setAxisValue):
1472 (WebCore::MockGamepad::setButtonValue):
1473 * testing/MockGamepad.h: Copied from Source/WebKit2/UIProcess/Gamepad/UIGamepad.h.
1475 * testing/MockGamepadProvider.cpp: Added.
1476 (WebCore::MockGamepadProvider::singleton):
1477 (WebCore::MockGamepadProvider::MockGamepadProvider):
1478 (WebCore::MockGamepadProvider::startMonitoringGamepads):
1479 (WebCore::MockGamepadProvider::stopMonitoringGamepads):
1480 (WebCore::MockGamepadProvider::setMockGamepadDetails):
1481 (WebCore::MockGamepadProvider::connectMockGamepad):
1482 (WebCore::MockGamepadProvider::disconnectMockGamepad):
1483 (WebCore::MockGamepadProvider::setMockGamepadAxisValue):
1484 (WebCore::MockGamepadProvider::setMockGamepadButtonValue):
1485 (WebCore::MockGamepadProvider::gamepadInputActivity):
1487 * testing/MockGamepadProvider.h: Copied from Source/WebKit2/WebProcess/Gamepad/WebGamepadProvider.h.
1488 (WebCore::MockGamepadProvider::~MockGamepadProvider):
1490 * testing/js/WebCoreTestSupport.cpp:
1491 (WebCoreTestSupport::installMockGamepadProvider):
1492 (WebCoreTestSupport::connectMockGamepad):
1493 (WebCoreTestSupport::disconnectMockGamepad):
1494 (WebCoreTestSupport::setMockGamepadDetails):
1495 (WebCoreTestSupport::setMockGamepadAxisValue):
1496 (WebCoreTestSupport::setMockGamepadButtonValue):
1497 * testing/js/WebCoreTestSupport.h:
1499 2016-08-23 Dave Hyatt <hyatt@apple.com>
1501 Add pref for enabling new CSS parsing and move parser files into subdirectory.
1502 https://bugs.webkit.org/show_bug.cgi?id=161095
1504 Reviewed by Sam Weinig.
1507 * WebCore.xcodeproj/project.pbxproj:
1508 * css/CSSParser.cpp: Removed.
1509 * css/CSSParser.h: Removed.
1510 * css/CSSParserMode.h: Removed.
1511 * css/CSSParserValues.cpp: Removed.
1512 * css/CSSParserValues.h: Removed.
1513 * css/SVGCSSParser.cpp: Removed.
1514 * css/parser: Added.
1515 * css/parser/CSSParser.cpp: Copied from css/CSSParser.cpp.
1516 * css/parser/CSSParser.h: Copied from css/CSSParser.h.
1517 * css/parser/CSSParserMode.h: Copied from css/CSSParserMode.h.
1518 * css/parser/CSSParserValues.cpp: Copied from css/CSSParserValues.cpp.
1519 * css/parser/CSSParserValues.h: Copied from css/CSSParserValues.h.
1520 * css/parser/SVGCSSParser.cpp: Copied from css/SVGCSSParser.cpp.
1523 2016-08-23 Eric Carlson <eric.carlson@apple.com>
1525 [MediaStream] Templatize MediaConstraint
1526 https://bugs.webkit.org/show_bug.cgi?id=161092
1528 Reviewed by Jer Noble.
1530 No new tests, no functional change.
1532 * platform/mediastream/MediaConstraints.cpp:
1533 (WebCore::BooleanConstraint::getExact):
1534 (WebCore::BooleanConstraint::getIdeal):
1535 (WebCore::MediaConstraint::getMin): Deleted.
1536 (WebCore::MediaConstraint::getMax): Deleted.
1537 (WebCore::MediaConstraint::getExact): Deleted.
1538 (WebCore::MediaConstraint::getIdeal): Deleted.
1539 (WebCore::IntConstraint::create): Deleted.
1540 (WebCore::IntConstraint::setMin): Deleted.
1541 (WebCore::IntConstraint::setMax): Deleted.
1542 (WebCore::IntConstraint::setExact): Deleted.
1543 (WebCore::IntConstraint::setIdeal): Deleted.
1544 (WebCore::IntConstraint::getMin): Deleted.
1545 (WebCore::IntConstraint::getMax): Deleted.
1546 (WebCore::IntConstraint::getExact): Deleted.
1547 (WebCore::IntConstraint::getIdeal): Deleted.
1548 (WebCore::DoubleConstraint::create): Deleted.
1549 (WebCore::DoubleConstraint::setMin): Deleted.
1550 (WebCore::DoubleConstraint::setMax): Deleted.
1551 (WebCore::DoubleConstraint::setExact): Deleted.
1552 (WebCore::DoubleConstraint::setIdeal): Deleted.
1553 (WebCore::DoubleConstraint::getMin): Deleted.
1554 (WebCore::DoubleConstraint::getMax): Deleted.
1555 (WebCore::DoubleConstraint::getExact): Deleted.
1556 (WebCore::DoubleConstraint::getIdeal): Deleted.
1557 (WebCore::BooleanConstraint::create): Deleted.
1558 (WebCore::BooleanConstraint::setExact): Deleted.
1559 (WebCore::BooleanConstraint::setIdeal): Deleted.
1560 (WebCore::StringConstraint::create): Deleted.
1561 * platform/mediastream/MediaConstraints.h:
1562 (WebCore::MediaConstraint::getMin):
1563 (WebCore::MediaConstraint::getMax):
1564 (WebCore::MediaConstraint::getExact):
1565 (WebCore::MediaConstraint::getIdeal):
1566 (WebCore::NumericConstraint::setMin):
1567 (WebCore::NumericConstraint::setMax):
1568 (WebCore::NumericConstraint::setExact):
1569 (WebCore::NumericConstraint::setIdeal):
1570 (WebCore::NumericConstraint::setHasMin): Deleted.
1571 (WebCore::NumericConstraint::setHasMax): Deleted.
1572 (WebCore::NumericConstraint::setHasExact): Deleted.
1573 (WebCore::NumericConstraint::setHasIdeal): Deleted.
1574 (WebCore::NumericConstraint::hasMin): Deleted.
1575 (WebCore::NumericConstraint::hasMax): Deleted.
1576 (WebCore::NumericConstraint::hasExact): Deleted.
1577 (WebCore::NumericConstraint::hasIdeal): Deleted.
1579 2016-08-23 Anders Carlsson <andersca@apple.com>
1581 Add a workaround for iOS Frameworks that expect DOM bindings to be in WebCore
1582 https://bugs.webkit.org/show_bug.cgi?id=161093
1584 Reviewed by Dan Bernstein.
1586 Create a text-based stub library that looks enough like WebKitLegacy that we can trick the linker
1587 into creating a LC_REEXPORT_DYLIB load command in WebCore.
1589 * Configurations/WebCore.xcconfig:
1590 Link against this WebKitLegacyStub tbd file on iOS 9.0, 9.3 and 10.0.
1592 * Configurations/WebKitLegacyStub.iOS.tbd:
1595 * WebCore.xcodeproj/project.pbxproj:
1598 2016-08-23 Chris Dumez <cdumez@apple.com>
1600 CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
1601 https://bugs.webkit.org/show_bug.cgi?id=161054
1603 Reviewed by Ryosuke Niwa.
1605 CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
1607 - https://html.spec.whatwg.org/multipage/scripting.html#canvasrenderingcontext2d
1609 Firefox and Chrome agree with the specification.
1611 No new tests, rebaselined existing test.
1614 * DerivedSources.cpp:
1615 * DerivedSources.make:
1616 * WebCore.xcodeproj/project.pbxproj:
1617 * bindings/js/JSBindingsAllInOne.cpp:
1618 * bindings/js/JSCanvasRenderingContext.h: Renamed from Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp.
1620 * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1621 (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
1622 (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
1623 * bindings/js/JSDocumentCustom.cpp:
1624 (WebCore::JSDocument::getCSSCanvasContext):
1625 (WebCore::JSDocument::createTouchList): Deleted.
1626 * bindings/js/JSHTMLCanvasElementCustom.cpp:
1627 * bindings/scripts/CodeGeneratorJS.pm:
1628 (GenerateImplementation):
1630 * html/canvas/CanvasRenderingContext.idl: Removed.
1631 * html/canvas/CanvasRenderingContext2D.idl:
1632 * html/canvas/WebGL2RenderingContext.idl:
1633 * html/canvas/WebGLRenderingContext.idl:
1634 * html/canvas/WebGLRenderingContextBase.idl:
1636 2016-08-03 Frederic Wang <fwang@igalia.com>
1638 Share and improve extraction of character for operator and token elements
1639 https://bugs.webkit.org/show_bug.cgi?id=160462
1641 Reviewed by Darin Adler.
1643 No new tests, already covered by existing tests.
1645 * mathml/MathMLElement.cpp:
1646 (WebCore::MathMLElement::stripLeadingAndTrailingWhitespace): Make this a protected member of
1647 MathMLElement so that it can be used in MathMLTokenElement.
1648 (WebCore::skipLeadingAndTrailingWhitespace): Deleted.
1649 * mathml/MathMLElement.h: Declare stripLeadingAndTrailingWhitespace.
1650 * mathml/MathMLOperatorElement.cpp:
1651 (WebCore::MathMLOperatorElement::parseOperatorChar): Use convertToSingleCodePoint to extract
1652 a code point more efficiently. For now, we continue to only handle BMP characters.
1653 * mathml/MathMLTokenElement.cpp:
1654 (WebCore::MathMLTokenElement::convertToSingleCodePoint): Helper function to try and convert a
1655 string to a single code point after having removed leading and trailing space.
1656 * mathml/MathMLTokenElement.h: Declare convertToSingleCodePoint.
1657 * rendering/mathml/RenderMathMLToken.cpp:
1658 (WebCore::RenderMathMLToken::updateMathVariantGlyph): Use convertToSingleCodePoint to extract
1659 a code point more efficiently.
1661 2016-08-23 Frederic Wang <fwang@igalia.com>
1663 Rename MathMLInlineContainerElement to MathMLPresentationElement
1664 https://bugs.webkit.org/show_bug.cgi?id=161053
1666 Reviewed by Manuel Rego Casasnovas.
1668 MathMLInlineContainerElement sounds a bad name for something that is now going to produce
1669 RenderMathMLBlocks. MathML has two kinds of markup (presentation MathML and content MathML).
1670 We only implement presentation MathML and most of the MathML elements are currently
1671 implemented as MathMLInlineContainerElement. Hence we rename MathMLInlineContainerElement
1672 to MathMLPresentationElement and will move more code from MathMLElement into that new class
1673 in follow-up bugs. Also, other elements in the MathML namespace could be handled by a
1674 separate MathMLUnknownElement class for consistency with SVG and HTML classes.
1676 No new tests, behavior is unchanged.
1678 * CMakeLists.txt: Rename MathMLInlineContainerElement to MathMLPresentationElement.
1679 * WebCore.xcodeproj/project.pbxproj: Ditto.
1680 * mathml/MathMLAllInOne.cpp: Ditto.
1681 * mathml/MathMLFractionElement.cpp: Ditto.
1682 * mathml/MathMLFractionElement.h: Ditto.
1683 * mathml/MathMLPresentationElement.cpp: Ditto.
1684 * mathml/MathMLPresentationElement.h: Ditto.
1685 * mathml/MathMLRowElement.cpp: Ditto.
1686 * mathml/MathMLRowElement.h: Ditto.
1687 * mathml/MathMLScriptsElement.cpp: Ditto.
1688 * mathml/MathMLScriptsElement.h: Ditto.
1689 * mathml/mathtags.in: Ditto.
1690 * rendering/mathml/RenderMathMLFraction.h: Remove useless include.
1692 2016-08-23 Youenn Fablet <youenn@apple.com>
1694 Implement redirect support post CORS-preflight
1695 https://bugs.webkit.org/show_bug.cgi?id=159056
1697 Reviewed by Alex Christensen.
1699 Tests: imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-preflight-worker.html
1700 imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-preflight.html
1701 Covered also by rebased tests.
1703 Enabling to follow cross-origin redirections for not-simple requests, through preflight checks.
1704 Making sure that same-origin redirections to cross-origin resources use preflight if they are not simple.
1706 * loader/DocumentThreadableLoader.cpp:
1707 (WebCore::DocumentThreadableLoader::redirectReceived):
1709 2016-08-23 Frederic Wang <fred.wang@free.fr>
1711 Introduce a MathMLRowElement class for mrow-like elements
1712 https://bugs.webkit.org/show_bug.cgi?id=161050
1714 Reviewed by Darin Adler.
1716 We introduce a MathMLRowElement class for elements creating RenderMathMLRow renderers.
1717 We also force constructors of the corresponding renderer classes to accept MathMLRowElement.
1718 It's not clear whether semantics-xml really needs to create RenderMathMLRow but for now
1719 we make MathMLAnnotationElement inherits from MathMLRowElement to preserve that behavior.
1721 No new tests, behavior is unchanged.
1723 * CMakeLists.txt: Add MathMLRowElement files.
1724 * WebCore.xcodeproj/project.pbxproj: Ditto.
1725 * mathml/MathMLAllInOne.cpp: Ditto.
1726 * mathml/MathMLInlineContainerElement.cpp: Remove unused headers.
1727 (WebCore::MathMLInlineContainerElement::createElementRenderer): Handle some mrow-like
1728 elements in the MathMLRowElement class.
1729 (WebCore::MathMLInlineContainerElement::acceptsDisplayStyleAttribute): Ditto.
1730 (WebCore::MathMLInlineContainerElement::childrenChanged): Deleted. We only need to calculate
1731 the form for operators inside a MathMLRowElement.
1732 (WebCore::MathMLInlineContainerElement::acceptsMathVariantAttribute): Deleted. mstyle is
1733 handled in the MathMLRowElement class.
1734 * mathml/MathMLInlineContainerElement.h: Update function declarations.
1735 * mathml/MathMLMathElement.cpp: Make this class inherits from MathMLRowElement.
1736 * mathml/MathMLMathElement.h: Ditto.
1737 * mathml/MathMLPaddedElement.cpp: Ditto.
1738 * mathml/MathMLPaddedElement.h: Ditto.
1739 * mathml/MathMLSelectElement.cpp: Ditto.
1740 * mathml/MathMLSelectElement.h: Ditto.
1741 * mathml/MathMLAnnotationElement.cpp: Ditto.
1742 * mathml/MathMLAnnotationElement.h: Ditto.
1743 * mathml/MathMLRowElement.cpp: New class for mrow-like element.
1744 (WebCore::MathMLRowElement::MathMLRowElement):
1745 (WebCore::MathMLRowElement::create):
1746 (WebCore::MathMLRowElement::childrenChanged): Move code from MathMLInlineContainerElement.
1747 (WebCore::MathMLRowElement::createElementRenderer): Ditto.
1748 (WebCore::MathMLRowElement::acceptsDisplayStyleAttribute): Ditto.
1749 (WebCore::MathMLRowElement::acceptsMathVariantAttribute): Ditto.
1750 * mathml/MathMLRowElement.h:
1751 * mathml/mathtags.in: Map tags creating RenderMathMLRow renderers to MathMLRowElement.
1752 * rendering/mathml/RenderMathMLFenced.cpp: Force the constructor to take MathMLRowElement.
1753 * rendering/mathml/RenderMathMLFenced.h: Ditto.
1754 * rendering/mathml/RenderMathMLMath.cpp: Ditto.
1755 * rendering/mathml/RenderMathMLMath.h: Ditto.
1756 * rendering/mathml/RenderMathMLMenclose.cpp: Force the constructor to take MathMLMencloseElement.
1757 * rendering/mathml/RenderMathMLMenclose.h: Ditto.
1758 * rendering/mathml/RenderMathMLRoot.cpp: Force the constructor to take MathMLRowElement.
1759 * rendering/mathml/RenderMathMLRoot.h: Ditto.
1760 * rendering/mathml/RenderMathMLRow.cpp: Ditto and add an helper function element() to
1761 retrieve the MathMLRowElement.
1762 * rendering/mathml/RenderMathMLRow.h: Ditto.
1764 2016-08-22 Chris Dumez <cdumez@apple.com>
1766 Drop TextTrackCue's constructor as per the latest specification
1767 https://bugs.webkit.org/show_bug.cgi?id=161061
1769 Reviewed by Alex Christensen.
1771 Drop TextTrackCue's constructor as per the latest specification:
1772 - https://html.spec.whatwg.org/#texttrackcue
1774 Firefox and Chrome do not have this constructor. Web Authors
1775 are supposed to use the VTTCue constructor instead.
1777 No new tests, rebaselined existing tests.
1779 * html/track/TextTrackCue.cpp:
1780 (WebCore::TextTrackCue::TextTrackCue): Deleted.
1781 * html/track/TextTrackCue.h:
1782 (WebCore::TextTrackCue::cueShadowPseudoId): Deleted.
1783 * html/track/TextTrackCue.idl:
1785 2016-08-22 Chris Dumez <cdumez@apple.com>
1787 Unreviewed, rolling out r204745.
1789 Broke the Windows build
1793 "CanvasRenderingContext2D should not have a
1794 CanvasRenderingContext parent interface"
1795 https://bugs.webkit.org/show_bug.cgi?id=161054
1796 http://trac.webkit.org/changeset/204745
1798 2016-08-22 Chris Dumez <cdumez@apple.com>
1800 CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
1801 https://bugs.webkit.org/show_bug.cgi?id=161054
1803 Reviewed by Ryosuke Niwa.
1805 CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
1807 - https://html.spec.whatwg.org/multipage/scripting.html#canvasrenderingcontext2d
1809 Firefox and Chrome agree with the specification.
1811 No new tests, rebaselined existing test.
1814 * DerivedSources.cpp:
1815 * DerivedSources.make:
1816 * WebCore.xcodeproj/project.pbxproj:
1817 * bindings/js/JSBindingsAllInOne.cpp:
1818 * bindings/js/JSCanvasRenderingContext.h: Renamed from Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp.
1820 * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1821 (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
1822 (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
1823 * bindings/js/JSDocumentCustom.cpp:
1824 (WebCore::JSDocument::getCSSCanvasContext):
1825 (WebCore::JSDocument::createTouchList): Deleted.
1826 * bindings/js/JSHTMLCanvasElementCustom.cpp:
1827 * bindings/scripts/CodeGeneratorJS.pm:
1828 (GenerateImplementation):
1830 * html/canvas/CanvasRenderingContext.idl: Removed.
1831 * html/canvas/CanvasRenderingContext2D.idl:
1832 * html/canvas/WebGL2RenderingContext.idl:
1833 * html/canvas/WebGLRenderingContext.idl:
1834 * html/canvas/WebGLRenderingContextBase.idl:
1836 2016-08-22 Johan K. Jensen <johan_jensen@apple.com>
1838 Make NetworkLoadTiming use double for higher precision in Resource Timing
1839 https://bugs.webkit.org/show_bug.cgi?id=161051
1841 Reviewed by Alex Christensen.
1843 Test: http/tests/misc/resource-timing-resolution.html
1845 * page/Performance.h:
1846 * page/Performance.cpp:
1847 (WebCore::Performance::now):
1848 (WebCore::Performance::reduceTimeResolution):
1849 Add new function to reduce time resolution.
1851 * page/PerformanceResourceTiming.cpp:
1852 (WebCore::monotonicTimeToDocumentMilliseconds):
1853 (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
1854 Only use the reduced timing resolution for full timestamps and deltas.
1856 (WebCore::PerformanceResourceTiming::connectStart): Use doubles.
1857 * page/PerformanceResourceTiming.h: Use doubles.
1858 * page/PerformanceTiming.cpp: Use doubles.
1859 (WebCore::toIntegerMilliseconds): Use doubles.
1860 (WebCore::PerformanceTiming::connectStart): Use doubles.
1861 (WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart): Use doubles.
1862 * page/PerformanceTiming.h: Use doubles.
1863 * platform/network/NetworkLoadTiming.h: Use doubles.
1864 * platform/network/curl/ResourceHandleManager.cpp: Use doubles.
1865 (WebCore::milisecondsSinceRequest): Use doubles.
1866 (WebCore::calculateWebTimingInformations): Use doubles.
1867 * platform/network/soup/ResourceHandleSoup.cpp: Use doubles.
1868 (WebCore::milisecondsSinceRequest): Use doubles.
1869 (WebCore::networkEventCallback): Use doubles.
1871 2016-08-22 Alex Christensen <achristensen@webkit.org>
1873 Fix Mac CMake build after r204717.
1875 * PlatformMac.cmake:
1877 2016-08-22 Javier Fernandez <jfernandez@igalia.com>
1879 [css-grid] Stretch alignment doesn't work for orthogonal flows
1880 https://bugs.webkit.org/show_bug.cgi?id=160076
1882 Reviewed by Darin Adler.
1884 After implementing orthogonal flow support for track sizing and basic
1885 alignment logic, we can now implement stretching logic in orthogonal
1886 scenarios, which was not allowed so far.
1888 Thanks to the recent changes which made the grid layout code more
1889 independent to the grid container's and its children's flow, the
1890 implementation of the stretching logic can be done in a clearer way.
1892 This patch implements the missing logic and performs some refactoring
1893 so it became flow direction independent.
1895 Test: fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html
1897 * rendering/RenderGrid.cpp:
1898 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1901 2016-08-19 Brent Fulgham <bfulgham@apple.com>
1903 Invalid resource load statistics iterator when redirecting
1904 https://bugs.webkit.org/show_bug.cgi?id=161021
1905 <rdar://problem/27856875>
1907 Reviewed by Dean Jackson.
1909 If a load is the result of a redirect, an additional entry is added to the HashSet
1910 containing the visited domains. This invalidates any existing iterators, so we
1911 need to get a new iterator for further updates.
1913 No change in functionality.
1915 * loader/ResourceLoadObserver.cpp:
1916 (WebCore::ResourceLoadObserver::logSubresourceLoading):
1918 2016-08-22 Ryosuke Niwa <rniwa@webkit.org>
1920 Rename CustomElementsRegistry to CustomElementRegistry
1921 https://bugs.webkit.org/show_bug.cgi?id=161028
1923 Reviewed by Darin Adler.
1925 Renamed CustomElementsRegistry to CustomElementRegistry per https://github.com/w3c/webcomponents/issues/548.
1927 Also hide window.customElements and CustomElementRegistry interface behind a runtime enabled.
1930 * DerivedSources.cpp:
1931 * DerivedSources.make:
1932 * WebCore.xcodeproj/project.pbxproj:
1933 * bindings/js/JSCustomElementRegistryCustom.cpp: Renamed from JSCustomElementsRegistryCustom.cpp.
1934 (WebCore::getCustomElementCallback):
1935 (WebCore::JSCustomElementRegistry::define):
1936 * bindings/js/JSHTMLElementCustom.cpp:
1937 (WebCore::constructJSHTMLElement):
1938 * dom/CustomElementReactionQueue.cpp:
1939 (WebCore::findInterfaceForCustomElement):
1940 * dom/CustomElementRegistry.cpp: Renamed from CustomElementsRegistry.cpp.
1941 (WebCore::CustomElementRegistry::create):
1942 (WebCore::CustomElementRegistry::CustomElementRegistry):
1943 (WebCore::CustomElementRegistry::~CustomElementRegistry):
1944 (WebCore::CustomElementRegistry::addElementDefinition):
1945 (WebCore::CustomElementRegistry::addUpgradeCandidate):
1946 (WebCore::CustomElementRegistry::findInterface):
1947 (WebCore::CustomElementRegistry::containsConstructor):
1948 * dom/CustomElementRegistry.h: Renamed from CustomElementsRegistry.h.
1949 * dom/CustomElementRegistry.idl: Renamed from CustomElementsRegistry.idl.
1951 (WebCore::createUpgradeCandidateElement):
1952 (WebCore::createHTMLElementWithNameValidation):
1953 (WebCore::createFallbackHTMLElement):
1955 * html/parser/HTMLConstructionSite.cpp:
1956 (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
1957 * page/DOMWindow.cpp:
1958 (WebCore::DOMWindow::ensureCustomElementRegistry):
1960 * page/DOMWindow.idl:
1962 2016-08-22 Chris Dumez <cdumez@apple.com>
1964 Add support for GlobalEventHandlers.oncuechange attribute
1965 https://bugs.webkit.org/show_bug.cgi?id=161046
1967 Reviewed by Alex Christensen.
1969 Add support for GlobalEventHandlers.oncuechange attribute:
1970 - https://html.spec.whatwg.org/#handler-oncuechange
1972 Test: fast/media/window-oncuechange.html
1974 * dom/GlobalEventHandlers.idl:
1976 2016-08-22 Alex Christensen <achristensen@webkit.org>
1978 Fix bindings tests after r204717.
1980 * bindings/scripts/CodeGeneratorJS.pm:
1982 There was an extra space.
1984 2016-08-22 Alex Christensen <achristensen@webkit.org>
1986 Mostly fix Mac CMake build after r204717.
1988 * PlatformMac.cmake:
1990 2016-08-22 Antti Koivisto <antti@apple.com>
1992 Can't style descendants in shadow tree using the :host pseudo class
1993 https://bugs.webkit.org/show_bug.cgi?id=160754
1995 Reviewed by Darin Adler.
1997 "The :host pseudo-class, when evaluated in the context of a shadow tree, matches the shadow tree’s shadow host."
1999 Currently :host() works for styling the host element itself (:host(.foo) { ... }). It should also be usable
2000 for styling elements in the shadow tree:
2002 :host(.foo) div { ... }
2004 Test: fast/shadow-dom/css-scoping-host-descendant.html
2006 * css/SelectorChecker.cpp:
2007 (WebCore::SelectorChecker::matchHostPseudoClass):
2008 (WebCore::localContextForParent):
2010 Move to shadow host if we are matching :host and are at the root of the shadow tree.
2011 Set didMoveToShadowHost bit in the context.
2013 (WebCore::SelectorChecker::matchRecursively):
2014 (WebCore::SelectorChecker::checkOne):
2016 Call the existing matchHostPseudoClass to do :host matching if didMoveToShadowHost bit has been set.
2018 * cssjit/SelectorCompiler.cpp:
2019 (WebCore::SelectorCompiler::addPseudoClassType):
2021 Disallow :host in the compiler (cases where it would match didn't reach the compiler before).
2023 2016-08-22 Frederic Wang <fwang@igalia.com>
2025 Use memoize pattern for the menclose notation attribute
2026 https://bugs.webkit.org/show_bug.cgi?id=160461
2028 Reviewed by Darin Adler.
2030 Currently, MathMLMencloseElement::parseAttribute parse the "notation" attribute each time it
2031 is changed. We change this to use the memoize pattern as done for other MathML attributes:
2032 We store m_notationFlags in an Optional<uint16_t> where Optnull means that the
2033 attribute is dirty and must be parsed again.
2035 No new tests, already covered by existing tests.
2037 * mathml/MathMLMencloseElement.cpp:
2038 (WebCore::MathMLMencloseElement::parseNotationAttribute): Move parsing of the "notation"
2039 attribute from parseAttribute into this separate helper function.
2040 (WebCore::MathMLMencloseElement::hasNotation): This now check whether the attribute and
2041 dirty and parse it if necessary.
2042 (WebCore::MathMLMencloseElement::parseAttribute): Just make the attribute dirty rather than
2043 parsing it immediately.
2044 * mathml/MathMLMencloseElement.h: hasNotation is no longer const as it may update the
2045 m_notationsFlags. We declare parseNotationAttribute(). Finally, we wrap m_notationFlags
2046 in an Optional<uint16_t> and make addNotation extract the value.
2048 2016-08-22 Daniel Bates <dabates@apple.com>
2050 [iOS] <a ping> and <area ping> tests time out
2051 https://bugs.webkit.org/show_bug.cgi?id=156857
2053 Reviewed by Simon Fraser.
2055 Export HTMLAreaElement::imageElement() so that we can make use of it in WebKit2.
2057 * html/HTMLAreaElement.h:
2059 2016-08-22 Darin Adler <darin@apple.com>
2061 [Cocoa] Move Objective-C DOM bindings from WebCore to legacy WebKit
2062 https://bugs.webkit.org/show_bug.cgi?id=160654
2064 Reviewed by Alex Christensen.
2066 * DerivedSources.cpp: Removed ExceptionCodeDescription.h from the list here.
2067 It will be included by the .cpp files as appropriate and should not be included
2068 without including config.h first.
2070 * WebCore.xcodeproj/project.pbxproj: Removed the Objective-C DOM source files.
2071 Added private exports of various headers that are now used directly or indirectly
2072 by legacy WebKit to implement the bindings. Moved WebScriptObject.* files from
2073 bindings/objc to bridge/objc. Moved WebKitAvailability.h into platform/cocoa; it
2074 can be moved to WebKit of we move the Objective-C bridge there too. Also ran
2075 sort-Xcode-project-file.
2077 * bindings/js/JSDOMBinding.cpp:
2078 (WebCore::valueToUSVString): Fixed a comment typo.
2080 * bindings/js/JSDOMWindowShell.cpp:
2081 (WebCore::JSDOMWindowShell::toWrapped): Added.
2082 * bindings/js/JSDOMWindowShell.h: Added a toWrapped function for use by the
2083 Objective-C bindings.
2085 * bindings/js/JSMainThreadExecState.h: Exported symbols needed by the Objective-C bindings.
2086 * bindings/js/JSNamedNodeMapCustom.cpp: Updated includes since NamedNodeMap.h no longer
2089 * bindings/js/ScriptController.h: Exported symbols needed by the Objective-C bindings.
2091 * bindings/js/ScriptControllerMac.mm:
2092 (WebCore::ScriptController::windowScriptObject): Removed code that asserted the type of the
2093 object; this assertion can't be done in WebCore any more and is not critical to keep.
2094 (WebCore::ScriptController::disconnectPlatformScriptObjects): Use the new
2095 disconnectWindowWrapper function to call up to the Objective-C bindings code in WebKit.
2097 * bindings/objc/*: Moved all these files to WebKit/mac/DOM, except for a few that were moved
2100 * bindings/scripts/CodeGeneratorJS.pm:
2101 (GenerateHeader): Added support for the new ExportToWrappedFunction attribute so
2102 classes that need to can export what is needed by WebKit.
2104 * bindings/scripts/IDLAttributes.txt: Added ExportToWrappedFunction.
2106 * bridge/objc/WebScriptObject.h: Moved from bindings/objc.
2107 * bridge/objc/WebScriptObject.mm: Moved from bindings/objc.
2108 (WebCore::initializeDOMWrapperHooks): Added. Used by WebKit to add the hooks needed so that
2109 WebScriptObject can integrate with the DOM bindings.
2110 (WebCore::disconnectWindowWrapper): Added.
2111 (+[WebScriptObject scriptObjectForJSObject:originRootObject:rootObject:]): Added code that
2112 uses createDOMWrapperFunction to set up wrappers that are found or created by WebKit.
2113 * bridge/objc/WebScriptObjectPrivate.h: Moved from bindings/objc.
2115 * css/CSSFontFaceRule.h: Exported symbols needed by the Objective-C bindings.
2116 * css/CSSGroupingRule.h: Ditto.
2117 * css/CSSImportRule.h: Ditto.
2118 * css/CSSMediaRule.h: Ditto.
2119 * css/CSSPageRule.h: Ditto.
2120 * css/CSSPrimitiveValue.h: Ditto.
2121 * css/CSSRule.h: Ditto.
2122 * css/CSSRule.idl: Ditto.
2123 * css/CSSRuleList.idl: Ditto.
2124 * css/CSSStyleRule.h: Ditto.
2125 * css/CSSStyleSheet.h: Ditto.
2126 * css/CSSValue.h: Ditto.
2127 * css/CSSValue.idl: Ditto.
2128 * css/Counter.idl: Ditto.
2129 * css/MediaList.h: Ditto.
2130 * css/MediaList.idl: Ditto.
2131 * css/MediaQueryEvaluator.h: Ditto.
2132 * css/RGBColor.h: Ditto.
2133 * css/RGBColor.idl: Ditto.
2134 * css/Rect.idl: Ditto.
2135 * css/StyleSheet.idl: Ditto.
2136 * css/StyleSheetList.h: Ditto.
2137 * css/StyleSheetList.idl: Ditto.
2138 * dom/Attr.h: Ditto.
2139 * dom/CharacterData.h: Ditto.
2140 * dom/CollectionIndexCache.h: Ditto.
2141 * dom/ContainerNode.h: Ditto.
2142 * dom/DOMImplementation.cpp: Ditto.
2143 * dom/DOMImplementation.h: Ditto.
2144 * dom/DOMImplementation.idl: Ditto.
2145 * dom/Document.h: Ditto.
2146 * dom/DocumentFragment.h: Ditto.
2147 * dom/Element.h: Ditto.
2148 * dom/Event.h: Ditto.
2149 * dom/Event.idl: Ditto.
2150 * dom/EventTarget.h: Ditto.
2151 * dom/KeyboardEvent.h: Ditto.
2152 * dom/LifecycleCallbackQueue.h: Ditto.
2153 * dom/MouseEvent.h: Ditto.
2154 * dom/MouseRelatedEvent.h: Ditto.
2155 * dom/MutationEvent.h: Ditto.
2156 * dom/NamedNodeMap.h: Ditto.
2157 * dom/NamedNodeMap.idl: Ditto.
2158 * dom/NativeNodeFilter.h: Ditto.
2159 * dom/Node.h: Ditto.
2160 * dom/NodeIterator.h: Ditto.
2161 * dom/NodeIterator.idl: Ditto.
2162 * dom/NodeList.idl: Ditto.
2163 * dom/NodeTraversal.h: Ditto.
2164 * dom/OverflowEvent.h: Ditto.
2165 * dom/QualifiedName.h: Ditto.
2166 * dom/Range.h: Ditto.
2167 * dom/ScriptElement.h: Ditto.
2168 * dom/Text.h: Ditto.
2169 * dom/TextEvent.h: Ditto.
2170 * dom/TreeScope.h: Ditto.
2171 * dom/TreeWalker.h: Ditto.
2172 * dom/TreeWalker.idl: Ditto.
2173 * dom/UIEvent.h: Ditto.
2174 * dom/WheelEvent.h: Ditto.
2175 * dom/make_dom_exceptions.pl: Ditto.
2176 * editing/EditingStyle.h: Ditto.
2177 * editing/FrameSelection.h: Ditto.
2179 * editing/ios/EditorIOS.mm: Removed unneeded include of Objective-C DOM header.
2180 * editing/mac/EditorMac.mm: Ditto.
2182 * fileapi/Blob.h: Exported symbols needed by the Objective-C bindings.
2183 * fileapi/File.h: Ditto.
2184 * fileapi/FileList.h: Ditto.
2185 * html/DOMTokenList.h: Ditto.
2186 * html/HTMLAnchorElement.h: Ditto.
2187 * html/HTMLAreaElement.h: Ditto.
2188 * html/HTMLBaseElement.h: Ditto.
2189 * html/HTMLButtonElement.h: Ditto.
2190 * html/HTMLCanvasElement.h: Ditto.
2191 * html/HTMLCollection.h: Ditto.
2192 * html/HTMLCollection.idl: Ditto.
2193 * html/HTMLDocument.h: Ditto.
2194 * html/HTMLElement.h: Ditto.
2195 * html/HTMLFormControlElement.h: Ditto.
2196 * html/HTMLFormElement.h: Ditto.
2197 * html/HTMLFrameElementBase.h: Ditto.
2198 * html/HTMLFrameOwnerElement.h: Ditto.
2199 * html/HTMLImageElement.h: Ditto.
2200 * html/HTMLInputElement.h: Ditto.
2202 * html/HTMLLabelElement.cpp:
2203 (WebCore::HTMLLabelElement::setActive): Tweaked types a bit.
2204 (WebCore::HTMLLabelElement::setHovered): Ditto.
2205 (WebCore::HTMLLabelElement::defaultEventHandler): Ditto.
2206 (WebCore::HTMLLabelElement::willRespondToMouseClickEvents): Ditto.
2207 (WebCore::HTMLLabelElement::focus): Ditto.
2208 (WebCore::HTMLLabelElement::accessKeyAction): Ditto.
2210 * html/HTMLLabelElement.h: Exported symbols needed by the Objective-C bindings.
2211 * html/HTMLLinkElement.h: Ditto.
2212 * html/HTMLMapElement.h: Ditto.
2213 * html/HTMLMarqueeElement.h: Ditto.
2214 * html/HTMLMediaElement.h: Ditto.
2215 * html/HTMLOListElement.h: Ditto.
2216 * html/HTMLOptionElement.h: Ditto.
2217 * html/HTMLOptionsCollection.h: Ditto.
2218 * html/HTMLOptionsCollection.idl: Ditto.
2219 * html/HTMLScriptElement.h: Ditto.
2220 * html/HTMLSelectElement.h: Ditto.
2221 * html/HTMLStyleElement.h: Ditto.
2222 * html/HTMLTableCellElement.h: Ditto.
2223 * html/HTMLTableColElement.h: Ditto.
2224 * html/HTMLTableElement.h: Ditto.
2225 * html/HTMLTableRowElement.h: Ditto.
2226 * html/HTMLTableSectionElement.h: Ditto.
2227 * html/HTMLTextAreaElement.h: Ditto.
2228 * html/HTMLTextFormControlElement.h: Ditto.
2229 * html/HTMLTitleElement.h: Ditto.
2230 * html/HTMLVideoElement.h: Ditto.
2231 * html/LabelableElement.h: Ditto.
2233 * loader/EmptyClients.h: Updated documentFragmentFromDelegate, which was
2234 returning a newly created document fragment with a raw pointer. This works
2235 because the implementation internally uses Objective-C and autorelease, but
2236 is too fragile to rely on for the future.
2238 * page/DOMWindow.h: Exported symbols needed by the Objective-C bindings.
2240 * page/EditorClient.h: Updated document fragment functions.
2242 * page/Frame.h: Removed indexCountOfWordPrecedingSelection, already unused.
2243 Removed innerLineHeight and styleAtSelectionStart, formerly used by legacy WebKit,
2244 which used Objective-C DOM objects in their interfaces.
2246 * page/ios/FrameIOS.mm:
2247 (WebCore::Frame::indexCountOfWordPrecedingSelection): Deleted.
2248 (WebCore::Frame::innerLineHeight): Deleted.
2249 (WebCore::Frame::styleAtSelectionStart): Deleted.
2251 * platform/DragImage.h: Exported symbols needed by the Objective-C bindings.
2252 * platform/ScrollView.h: Ditto.
2253 * platform/URL.h: Ditto.
2255 * platform/cocoa/WebKitAvailability.h: Moved from bindings/objc.
2257 * platform/cocoa/WebPlaybackSessionModelMediaElement.mm: Removed unneeded includes
2258 of Objective-C DOM headers.
2259 * platform/cocoa/WebVideoFullscreenModelVideoElement.mm: Ditto.
2260 * platform/ios/PasteboardIOS.mm: Ditto.
2262 * platform/ios/wak/WebCoreThread.mm:
2263 (StartWebThread): Took out the call to WebCoreObjCDeallocOnWebThread for DOMObject.
2264 This class is now defined in legacy WebKit, so we do the code there there along
2265 with the other WebKit classes.
2267 * platform/ios/wak/WebCoreThreadSafe.h: Removed the unwise additional definition of
2268 WebScriptObject and DOMObject in this file. Really this entire file needs to go.
2270 * platform/text/TextEncoding.h: Exported symbols needed by the Objective-C bindings.
2271 * rendering/HitTestResult.h: Ditto.
2272 * rendering/RenderLayer.h: Ditto.
2273 * rendering/RenderObject.h: Ditto.
2275 * rendering/RenderThemeGtk.cpp: Rewrote code that was unnecessarily using
2276 NamedNodeMap and Attr nodes just to get the value of an attribute.
2278 * rendering/style/RenderStyle.h: Exported symbols needed by the Objective-C bindings.
2280 * xml/XMLHttpRequest.cpp: Added include needed now that XMLDocument.h is not
2281 included by DOMImplementation.h.
2283 * xml/XPathExpression.h: Exported symbols needed by the Objective-C bindings.
2284 * xml/XPathExpression.idl: Ditto.
2285 * xml/XPathNSResolver.h: Ditto.
2287 * xml/XPathResult.cpp:
2288 (WebCore::XPathResult::snapshotLength): Use unsigned instead of unsigned long.
2289 (WebCore::XPathResult::snapshotItem): Ditto.
2290 * xml/XPathResult.h: Exported symbols needed by the Objective-C bindings. Also
2291 updated types as above.
2292 * xml/XPathResult.idl: Ditto.
2294 2016-08-22 Frederic Wang <fwang@igalia.com>
2296 Rename MathMLTextElement to MathMLTokenElement
2297 https://bugs.webkit.org/show_bug.cgi?id=160542
2299 Reviewed by Darin Adler.
2301 No new tests, behavior is unchanged.
2303 * CMakeLists.txt: Rename MathMLTextElement to MathMLTokenElement.
2304 * WebCore.xcodeproj/project.pbxproj: Ditto.
2305 * mathml/MathMLAllInOne.cpp: Ditto.
2306 * mathml/MathMLOperatorElement.cpp: Ditto.
2307 * mathml/MathMLOperatorElement.h: Ditto.
2308 * mathml/MathMLTokenElement.cpp: Ditto. Also remove dead code in childShouldCreateRenderer
2309 to handle the case of mspace since that element uses its own class and forbids child creation
2310 in RenderMathMLSpace::isChildAllowed.
2311 * mathml/MathMLTokenElement.h: Rename MathMLTextElement to MathMLTokenElement.
2312 * mathml/mathtags.in: Ditto.
2313 * rendering/mathml/RenderMathMLToken.cpp: Move inclusion of MathMLTokenElement.h and
2314 implementation of element() here.
2315 * rendering/mathml/RenderMathMLToken.h: Do not implement element() in the header so that
2316 we only need need to predeclare MathMLTokenElement instead of including its header.
2318 2016-08-21 Alex Christensen <achristensen@webkit.org>
2320 Use Document& instead of Document* when getting cookies
2321 https://bugs.webkit.org/show_bug.cgi?id=161011
2323 Reviewed by Darin Adler.
2325 No change in behavior.
2327 * Modules/websockets/WebSocketChannel.cpp:
2328 (WebCore::WebSocketChannel::processBuffer):
2329 * Modules/websockets/WebSocketHandshake.cpp:
2330 (WebCore::WebSocketHandshake::clientHandshakeMessage):
2331 (WebCore::WebSocketHandshake::clientHandshakeRequest):
2333 (WebCore::Document::cookie):
2334 (WebCore::Document::setCookie):
2335 (WebCore::Document::referrer):
2336 * inspector/InspectorPageAgent.cpp:
2337 (WebCore::InspectorPageAgent::getCookies):
2338 (WebCore::InspectorPageAgent::deleteCookie):
2339 (WebCore::InspectorPageAgent::getResourceTree):
2340 * loader/CookieJar.cpp:
2341 (WebCore::networkingContext):
2342 (WebCore::storageSession):
2344 (WebCore::setCookies):
2345 (WebCore::cookiesEnabled):
2346 (WebCore::cookieRequestHeaderFieldValue):
2347 (WebCore::getRawCookies):
2348 (WebCore::deleteCookie):
2349 (WebCore::addCookie):
2350 * loader/CookieJar.h:
2351 * page/Navigator.cpp:
2352 (WebCore::Navigator::cookieEnabled):
2353 (WebCore::Navigator::javaEnabled):
2355 2016-08-21 Alex Christensen <achristensen@webkit.org>
2357 URLParser should parse IPv4 addresses
2358 https://bugs.webkit.org/show_bug.cgi?id=161023
2360 Reviewed by Darin Adler.
2362 Covered by new API tests because URLParser isn't used anywhere in WebCore yet.
2364 * platform/URLParser.cpp:
2365 (WebCore::URLParser::authorityEndReached):
2366 (WebCore::serializeIPv4):
2367 (WebCore::parseIPv4Number):
2369 (WebCore::parseIPv4Host):
2370 (WebCore::parseIPv6Host):
2371 (WebCore::URLParser::hostEndReached):
2373 2016-08-21 Sam Weinig <sam@webkit.org>
2375 Remove a few custom bindings
2376 https://bugs.webkit.org/show_bug.cgi?id=161039
2378 Reviewed by Darin Adler.
2380 Remove custom bindings for CanvasRenderingContext2D's webkitLineDash attribute and commit function.
2382 * WebCore.xcodeproj/project.pbxproj:
2385 * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2386 (WebCore::JSCanvasRenderingContext2D::commit): Deleted.
2387 (WebCore::JSCanvasRenderingContext2D::webkitLineDash): Deleted.
2388 (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash): Deleted.
2389 * html/canvas/CanvasRenderingContext2D.cpp:
2390 (WebCore::CanvasRenderingContext2D::webkitLineDashOffset): Deleted.
2391 (WebCore::CanvasRenderingContext2D::setWebkitLineDashOffset): Deleted.
2392 * html/canvas/CanvasRenderingContext2D.h:
2393 * html/canvas/CanvasRenderingContext2D.idl:
2395 2016-08-21 Youenn Fablet <youenn@apple.com>
2397 cross-origin requests redirected fail or drop author requested headers
2398 https://bugs.webkit.org/show_bug.cgi?id=112471
2400 Reviewed by Alex Christensen.
2402 Test: http/tests/xmlhttprequest/redirections-and-user-headers.html
2404 Storing original headers in DocumentThreadableLoader.
2405 In case of cross-origin redirection in CORS mode, set the new request headers to the original headers.
2406 Add a special handling to Authorization header that should not be used when it is already removed by the network layer.
2408 * loader/DocumentThreadableLoader.cpp:
2409 (WebCore::DocumentThreadableLoader::redirectReceived):
2410 (WebCore::DocumentThreadableLoader::loadRequest):
2411 * loader/DocumentThreadableLoader.h:
2413 2016-08-21 Frederic Wang <fwang@igalia.com>
2415 Introduce a MathMLAnnotationElement class for the annotation/annotation-xml elements
2416 https://bugs.webkit.org/show_bug.cgi?id=160540
2418 Reviewed by Darin Adler.
2420 The <annotation> element can only contain text whereas the <annotation-xml> element can
2421 contain some elements as described in the HTML5 RelaxNG schema. For this reason, they have
2422 been implemented in the separate MathMLTextElement and MathMLInlineContainerElement
2423 respectively. However, they are actually closer to each other than to token elements or
2424 presentation containers. In particular they support very different attributes and are
2425 considered by the <semantics> tag. Hence we move their implementations in a new
2426 MathMLAnnotation class.
2428 No new tests, already covered by existing tests.
2430 * CMakeLists.txt: Add MathMLAnnotationElement.
2431 * mathml/MathMLAllInOne.cpp: Ditto.
2432 * WebCore.xcodeproj/project.pbxproj: Ditto.
2433 * mathml/MathMLAnnotationElement.cpp: Added.
2434 (WebCore::MathMLAnnotationElement::MathMLAnnotationElement): ASSERT that this class is only
2435 for annotation and annotation-xml.
2436 (WebCore::MathMLAnnotationElement::create):
2437 (WebCore::MathMLAnnotationElement::createElementRenderer): Move implementation from
2438 MathMLTextElement and MathMLInlineContainerElement.
2439 (WebCore::MathMLAnnotationElement::childShouldCreateRenderer): Move implementation from
2440 MathMLTextElement and MathMLElement.
2441 (WebCore::MathMLAnnotationElement::attributeChanged): Move implementation from MathMLElement.
2442 * mathml/MathMLAnnotationElement.h: Override isSemanticAnnotation and isPresentationMathML
2444 * mathml/MathMLElement.cpp:
2445 (WebCore::MathMLElement::childShouldCreateRenderer): Move the annotation-xml case into
2446 MathMLAnnotationElement.
2447 (WebCore::MathMLElement::attributeChanged): Deleted. This was only used for semantic
2448 annotations and so the code is moved into MathMLAnnotationElement.
2449 * mathml/MathMLElement.h:
2450 (WebCore::MathMLElement::isMathMLToken): Return false and let derived class override this.
2451 (WebCore::MathMLElement::isSemanticAnnotation): Ditto.
2452 (WebCore::MathMLElement::updateSelectedChild): Make this public so that is can be used
2453 by MathMLAnnotationElement::attributeChanged.
2454 * mathml/MathMLInlineContainerElement.cpp:
2455 (WebCore::MathMLInlineContainerElement::createElementRenderer): The annotation-xml case is
2456 now handled in MathMLAnnotationElement.
2457 * mathml/MathMLTextElement.cpp:
2458 (WebCore::MathMLTextElement::createElementRenderer): The annotation case is handled is now
2459 handled in MathMLAnnotationElement.
2460 (WebCore::MathMLTextElement::childShouldCreateRenderer): Ditto.
2461 * mathml/MathMLTextElement.h: Override isToken to return true.
2462 * mathml/mathtags.in: Map annotation and annotation-xml to MathMLAnnotationElement.
2464 2016-08-21 Michael Catanzaro <mcatanzaro@igalia.com>
2466 [GTK] Clean up CursorGtk.cpp
2467 https://bugs.webkit.org/show_bug.cgi?id=157794
2469 Reviewed by Darin Adler.
2471 We use GdkCursorType extensively in CursorGtk.cpp, but GTK+ does not support this anymore
2472 and they're only sure to work under X11. Instead, use supported CSS cursor names. This
2473 follows the grand tradition of replacing constants with hardcoded string values, but such
2474 is the new best practice in GTK+ world.
2476 Also, we have a bunch of custom cursors copied from Firefox. Each of these cursors is
2477 nowadays guaranteed to be provided by GTK+, so we don't need any of these anymore.
2479 * platform/gtk/CursorGtk.cpp:
2480 (WebCore::createNamedCursor):
2481 (WebCore::Cursor::ensurePlatformCursor):
2482 * platform/gtk/CursorGtk.h: Removed.
2484 2016-08-20 Sam Weinig <sam@webkit.org>
2490 2016-08-20 Darin Adler <darin@apple.com>
2492 Removed Objective-C specific attributes from IDL, made conditionals more consistent
2493 https://bugs.webkit.org/show_bug.cgi?id=160900
2495 Reviewed by Sam Weinig.
2497 Removed all Objective-C-specific attributes from all the various IDL files where
2498 they were used. Except, oops, Sam already did that, and so everything just merged!
2499 Now that Objective-C is gone, made all the conditionals be based on LANGUAGE_GOBJECT
2500 specifically. Later we should cut these down because many were not actually needed
2501 for the GObject bindings, actually only for Objective-C. Also made the style of
2502 conditional consistent. Also re-sorted attributes in alphabetical order in many cases
2503 and made formatting more consistent without fancy indentation. Also removed old comments
2504 that tried to document where various operations and attributes were defined; it's not
2505 helpful to track "this was part of DOM level 2" at this point. Also fixed a variety of
2506 types to explicitly state the values are nullable in cases where the generated code
2507 is currently not affected by that; mostly read-only attribute types.
2509 * Modules/mediasession/HTMLMediaElementMediaSession.idl:
2510 * Modules/mediastream/HTMLMediaElementMediaStream.idl:
2511 * animation/AnimationTimeline.idl:
2512 * animation/DocumentAnimation.idl:
2513 * bindings/scripts/IDLAttributes.txt:
2514 * css/CSSMediaRule.idl:
2515 * css/CSSPrimitiveValue.idl:
2517 * css/CSSStyleDeclaration.idl:
2518 * css/CSSStyleSheet.idl:
2521 * css/StyleSheet.idl:
2522 * dom/CharacterData.idl:
2523 * dom/DOMCoreException.idl:
2524 * dom/DOMImplementation.idl:
2526 * dom/DocumentType.idl:
2529 * dom/EventListener.idl:
2530 * dom/EventTarget.idl:
2531 * dom/KeyboardEvent.idl:
2532 * dom/MessageEvent.idl:
2533 * dom/MessagePort.idl:
2534 * dom/MouseEvent.idl:
2535 * dom/MutationEvent.idl:
2536 * dom/NamedNodeMap.idl:
2538 * dom/NodeFilter.idl:
2539 * dom/NonElementParentNode.idl:
2543 * dom/WheelEvent.idl:
2544 * fileapi/FileException.idl:
2545 * html/DOMTokenList.idl:
2546 * html/HTMLAnchorElement.idl:
2547 * html/HTMLAppletElement.idl:
2548 * html/HTMLCollection.idl:
2549 * html/HTMLDocument.idl:
2550 * html/HTMLElement.idl:
2551 * html/HTMLEmbedElement.idl:
2552 * html/HTMLFormElement.idl:
2553 * html/HTMLInputElement.idl:
2554 * html/HTMLMediaElement.idl:
2555 * html/HTMLOptionElement.idl:
2556 * html/HTMLOptionsCollection.idl:
2557 * html/HTMLSelectElement.idl:
2558 * html/HTMLTableColElement.idl:
2559 * html/HTMLVideoElement.idl:
2560 * html/ImageData.idl:
2561 * html/URLUtils.idl:
2562 * html/track/TextTrack.idl:
2563 * page/AbstractView.idl:
2564 * page/DOMSelection.idl:
2565 * page/DOMWindow.idl:
2566 * page/Location.idl:
2567 * svg/SVGDocument.idl:
2568 * svg/SVGElement.idl:
2569 * svg/SVGException.idl:
2570 * svg/SVGExternalResourcesRequired.idl:
2571 * svg/SVGFilterPrimitiveStandardAttributes.idl:
2572 * svg/SVGFitToViewBox.idl:
2573 * svg/SVGPathSeg.idl:
2575 * svg/SVGURIReference.idl:
2576 * svg/SVGZoomAndPan.idl:
2577 * workers/DedicatedWorkerGlobalScope.idl:
2578 * workers/Worker.idl:
2579 * workers/WorkerGlobalScope.idl:
2580 * xml/XPathException.idl:
2581 * xml/XPathExpression.idl:
2582 * xml/XPathNSResolver.idl:
2583 See above for summary of changes.
2585 2016-08-20 Sam Weinig <sam@webkit.org>
2587 Remove Objective-C specific extended attributes from the bindings
2588 https://bugs.webkit.org/show_bug.cgi?id=161034
2590 Reviewed by Dan Bernstein.
2592 - Removes ObjCPolymorphic, ObjCProtocol, ObjCLegacyUnnamedParameters and ObjCExplicitAtomicString
2593 extended attributes.
2595 * animation/AnimationTimeline.idl:
2596 * css/CSSMediaRule.idl:
2597 * css/CSSPrimitiveValue.idl:
2599 * css/CSSStyleDeclaration.idl:
2600 * css/CSSStyleSheet.idl:
2602 * css/StyleSheet.idl:
2603 * dom/CharacterData.idl:
2604 * dom/DOMImplementation.idl:
2608 * dom/EventListener.idl:
2609 * dom/EventTarget.idl:
2610 * dom/MouseEvent.idl:
2611 * dom/MutationEvent.idl:
2612 * dom/NamedNodeMap.idl:
2614 * dom/NodeFilter.idl:
2615 * dom/NonElementParentNode.idl:
2618 * html/HTMLCollection.idl:
2619 * html/HTMLSelectElement.idl:
2620 * svg/SVGExternalResourcesRequired.idl:
2621 * svg/SVGFilterPrimitiveStandardAttributes.idl:
2622 * svg/SVGFitToViewBox.idl:
2623 * svg/SVGPathSeg.idl:
2625 * svg/SVGURIReference.idl:
2626 * svg/SVGZoomAndPan.idl:
2627 * xml/XPathExpression.idl:
2628 * xml/XPathNSResolver.idl:
2630 2016-08-20 Sam Weinig <sam@webkit.org>
2634 2016-08-20 Sam Weinig <sam@webkit.org>
2636 Remove Objective-C specific extended attributes / features from the bindings
2637 https://bugs.webkit.org/show_bug.cgi?id=161034
2639 Reviewed by Dan Bernstein.
2641 - Removes ObjCPolymorphic, ObjCProtocol, ObjCLegacyUnnamedParameters and ObjCExplicitAtomicString
2642 extended attributes.
2643 - Remove support for multiple inheritance from the IDLParser.
2645 * bindings/scripts/CodeGenerator.pm:
2646 * bindings/scripts/IDLParser.pm:
2647 * animation/AnimationTimeline.idl:
2648 * css/CSSMediaRule.idl:
2649 * css/CSSPrimitiveValue.idl:
2651 * css/CSSStyleDeclaration.idl:
2652 * css/CSSStyleSheet.idl:
2654 * css/StyleSheet.idl:
2655 * dom/CharacterData.idl:
2656 * dom/DOMImplementation.idl:
2660 * dom/EventListener.idl:
2661 * dom/EventTarget.idl:
2662 * dom/MouseEvent.idl:
2663 * dom/MutationEvent.idl:
2664 * dom/NamedNodeMap.idl:
2666 * dom/NodeFilter.idl:
2667 * dom/NonElementParentNode.idl:
2670 * html/HTMLCollection.idl:
2671 * html/HTMLSelectElement.idl:
2672 * svg/SVGExternalResourcesRequired.idl:
2673 * svg/SVGFilterPrimitiveStandardAttributes.idl:
2674 * svg/SVGFitToViewBox.idl:
2675 * svg/SVGPathSeg.idl:
2677 * svg/SVGURIReference.idl:
2678 * svg/SVGZoomAndPan.idl:
2679 * xml/XPathExpression.idl:
2680 * xml/XPathNSResolver.idl:
2682 2016-08-20 Sam Weinig <sam@webkit.org>
2684 Stop pretending that AbstractView is a thing, it's not
2685 https://bugs.webkit.org/show_bug.cgi?id=161032
2687 Reviewed by Dan Bernstein.
2689 Remove AbstractView.idl, the AbstractView typedef of DOMWindow, and
2690 all special casing of the name AbstractView in the JS code generator.
2692 No change in behavior.
2694 * DerivedSources.make:
2695 * Modules/indieui/UIRequestEvent.cpp:
2696 (WebCore::UIRequestEvent::createForBindings):
2697 (WebCore::UIRequestEvent::create):
2698 (WebCore::UIRequestEvent::UIRequestEvent):
2699 * Modules/indieui/UIRequestEvent.h:
2700 (WebCore::UIRequestEvent::receiver):
2701 * WebCore.xcodeproj/project.pbxproj:
2702 * bindings/scripts/CodeGeneratorGObject.pm:
2703 * bindings/scripts/CodeGeneratorJS.pm:
2704 (ShouldGenerateToJSDeclaration):
2706 * dom/CompositionEvent.cpp:
2707 (WebCore::CompositionEvent::CompositionEvent):
2708 (WebCore::CompositionEvent::~CompositionEvent):
2709 (WebCore::CompositionEvent::initCompositionEvent):
2710 * dom/CompositionEvent.h:
2711 * dom/FocusEvent.cpp:
2712 (WebCore::FocusEvent::isFocusEvent):
2713 (WebCore::FocusEvent::FocusEvent):
2715 * dom/KeyboardEvent.cpp:
2716 (WebCore::KeyboardEvent::KeyboardEvent):
2717 (WebCore::KeyboardEvent::~KeyboardEvent):
2718 (WebCore::KeyboardEvent::initKeyboardEvent):
2719 * dom/KeyboardEvent.h:
2720 * dom/MouseEvent.cpp:
2721 (WebCore::MouseEvent::createForBindings):
2722 (WebCore::MouseEvent::create):
2723 (WebCore::MouseEvent::MouseEvent):
2724 (WebCore::MouseEvent::~MouseEvent):
2725 (WebCore::MouseEvent::initMouseEvent):
2727 * dom/MouseRelatedEvent.cpp:
2728 (WebCore::MouseRelatedEvent::MouseRelatedEvent):
2729 (WebCore::contentsScrollOffset):
2730 * dom/MouseRelatedEvent.h:
2731 * dom/SimulatedClick.cpp:
2732 * dom/TextEvent.cpp:
2733 (WebCore::TextEvent::createForBindings):
2734 (WebCore::TextEvent::create):
2735 (WebCore::TextEvent::createForPlainTextPaste):
2736 (WebCore::TextEvent::createForFragmentPaste):
2737 (WebCore::TextEvent::createForDrop):
2738 (WebCore::TextEvent::createForDictation):
2739 (WebCore::TextEvent::TextEvent):
2740 (WebCore::TextEvent::~TextEvent):
2741 (WebCore::TextEvent::initTextEvent):
2745 (WebCore::UIEvent::UIEvent):
2746 (WebCore::UIEvent::~UIEvent):
2747 (WebCore::UIEvent::initUIEvent):
2749 (WebCore::UIEvent::create):
2750 (WebCore::UIEvent::createForBindings):
2751 (WebCore::UIEvent::view):
2752 (WebCore::UIEvent::detail):
2753 * dom/UIEventWithKeyState.h:
2754 (WebCore::UIEventWithKeyState::UIEventWithKeyState):
2755 * dom/WheelEvent.cpp:
2756 (WebCore::WheelEvent::WheelEvent):
2757 (WebCore::WheelEvent::initWheelEvent):
2758 (WebCore::WheelEvent::initWebKitWheelEvent):
2760 * page/AbstractView.idl: Removed.
2762 2016-08-19 Sam Weinig <sam@webkit.org>
2764 Location.ancestorOrigins should return a FrozenArray<USVString>
2765 https://bugs.webkit.org/show_bug.cgi?id=161018
2767 Reviewed by Ryosuke Niwa and Chris Dumez.
2769 Updated tests: fast/dom/Window/Location/ancestor-origins.html
2770 fast/dom/indexed-getters-returning-string.html
2772 * Modules/indexeddb/IDBDatabase.cpp:
2773 (WebCore::IDBDatabase::createObjectStore):
2774 (WebCore::IDBDatabase::transaction):
2775 (WebCore::IDBDatabase::deleteObjectStore):
2776 * Modules/indexeddb/IDBDatabase.h:
2777 Remove unused ScriptExecutionContext parameter.
2779 * Modules/indexeddb/IDBDatabase.idl:
2780 There is no need for a custom implementation anymore.
2783 * WebCore.xcodeproj/project.pbxproj:
2784 Remove JSDOMStringListCustom.cpp, which is no longer needed.
2786 * bindings/js/JSDOMBinding.cpp:
2787 (WebCore::jsArray): Deleted.
2788 Remove overload of jsArray that took a DOMStringList.
2790 * bindings/js/JSDOMBinding.h:
2791 (WebCore::jsFrozenArray):
2792 Add jsFrozenArray which returns an JSArray which has had the moral
2793 equivalent of Object.freeze() called on it. This follows
2794 http://heycam.github.io/webidl/#es-frozen-array.
2796 * bindings/js/JSDOMStringListCustom.cpp:
2799 * bindings/js/JSIDBDatabaseCustom.cpp:
2800 (WebCore::JSIDBDatabase::transaction): Deleted.
2801 Remove no longer necessary custom implementation of transaction.
2803 * bindings/scripts/CodeGenerator.pm:
2805 (IsSVGAnimatedType):
2808 (IsFrozenArrayType):
2809 (GetFrozenArrayInnerType):
2810 * bindings/scripts/CodeGeneratorJS.pm:
2811 (AreTypesDistinguishableForOverloadResolution):
2812 (GenerateOverloadedFunctionOrConstructor):
2814 (GetNativeVectorInnerType):
2815 (GetNativeTypeForCallbacks):
2818 * bindings/scripts/IDLParser.pm:
2820 Add support for FrozenArray, closely matching the sequence code.
2822 * bindings/scripts/test/JS/JSTestCallback.cpp:
2823 * bindings/scripts/test/JS/JSTestCallback.h:
2824 * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
2825 * bindings/scripts/test/JS/JSTestCallbackFunction.h:
2826 * bindings/scripts/test/JS/JSTestObj.cpp:
2827 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2828 Updated bindings test results.
2830 * dom/DOMStringList.idl:
2831 Remove JSCustomToNativeObject, which is no longer needed.
2833 * inspector/InspectorIndexedDBAgent.cpp:
2834 Update calls to IDBDatabase::transaction.
2836 * page/Location.cpp:
2837 (WebCore::Location::ancestorOrigins):
2839 Change ancestorOrigins to return a Vector<String> rather than
2842 * page/Location.idl:
2843 Change ancestorOrigins to return a FrozenArray<USVString>, matching
2846 2016-08-19 Chris Dumez <cdumez@apple.com>
2848 Mark CanvasPath operations' parameters as mandatory when they should be
2849 https://bugs.webkit.org/show_bug.cgi?id=161014
2851 Reviewed by Sam Weinig.
2853 Mark CanvasPath operations as mandatory when they should be:
2854 - https://html.spec.whatwg.org/multipage/scripting.html#canvaspath
2856 This patch moves the CanvasPath methods from CanvasRenderingContext2D
2857 and Path2D to a new CanvasPath interface, to avoid duplication and
2858 match the specification.
2860 The parameters were correctly marked as mandatory in WebKit on
2861 CanvasRenderingContext2D but not on Path2D.
2863 Those parameters are correctly marked as mandatory in Chrome and Firefox.
2865 No new tests, rebaselined existing test.
2868 * DerivedSources.make:
2869 * WebCore.xcodeproj/project.pbxproj:
2870 * html/canvas/CanvasPath.cpp: Renamed from Source/WebCore/html/canvas/CanvasPathMethods.cpp.
2871 (WebCore::CanvasPath::closePath):
2872 (WebCore::CanvasPath::moveTo):
2873 (WebCore::CanvasPath::lineTo):
2874 (WebCore::CanvasPath::quadraticCurveTo):
2875 (WebCore::CanvasPath::bezierCurveTo):
2876 (WebCore::CanvasPath::arcTo):
2877 (WebCore::normalizeAngles):
2878 (WebCore::CanvasPath::arc):
2879 (WebCore::CanvasPath::ellipse):
2880 (WebCore::CanvasPath::rect):
2881 * html/canvas/CanvasPath.h: Renamed from Source/WebCore/html/canvas/CanvasPathMethods.h.
2882 (WebCore::CanvasPath::~CanvasPath):
2883 (WebCore::CanvasPath::CanvasPath):
2884 (WebCore::CanvasPath::hasInvertibleTransform):
2885 * html/canvas/CanvasPath.idl: Added.
2886 * html/canvas/CanvasRenderingContext2D.h:
2887 * html/canvas/CanvasRenderingContext2D.idl:
2888 * html/canvas/DOMPath.h:
2889 * html/canvas/DOMPath.idl:
2891 2016-08-19 Zalan Bujtas <zalan@apple.com>
2893 RenderObject::containingBlock() cleanup.
2894 https://bugs.webkit.org/show_bug.cgi?id=161013
2896 Reviewed by Simon Fraser.
2898 Move ::containingBlockForAbsolutePosition and ::containingBlockForFixedPosition
2899 to RenderElement after tightening containingBlock() callsites.
2901 No change in functionality.
2904 (WebCore::layoutOverflowRectContainsAllDescendants):
2905 * rendering/RenderElement.cpp:
2906 (WebCore::RenderElement::containingBlockForFixedPosition):
2907 (WebCore::RenderElement::containingBlockForAbsolutePosition):
2908 * rendering/RenderElement.h:
2909 * rendering/RenderInline.cpp:
2910 (WebCore::RenderInline::styleWillChange):
2911 * rendering/RenderObject.cpp:
2912 (WebCore::RenderObject::containingBlock):
2913 (WebCore::RenderObject::containingBlockForFixedPosition): Deleted.
2914 (WebCore::RenderObject::containingBlockForAbsolutePosition): Deleted.
2915 * rendering/RenderObject.h:
2917 2016-08-19 Dean Jackson <dino@apple.com>
2919 Implement preferLowPowerToHighPerformance for WebGL
2920 https://bugs.webkit.org/show_bug.cgi?id=161017
2921 <rdar://problem/26819135>
2923 Reviewed by Myles Maxfield.
2925 Implement preferLowPowerToHighPerformance on macOS by
2926 passing the correct CGL attribute when creating the
2929 * bindings/js/JSHTMLCanvasElementCustom.cpp:
2930 (WebCore::get3DContextAttributes):
2931 * platform/graphics/mac/GraphicsContext3DMac.mm:
2932 (WebCore::setPixelFormat):
2933 (WebCore::GraphicsContext3D::GraphicsContext3D):
2935 2016-08-19 Joseph Pecoraro <pecoraro@apple.com>
2937 Remove empty files and empty namespace blocks
2938 https://bugs.webkit.org/show_bug.cgi?id=160990
2940 Reviewed by Alex Christensen.
2943 * WebCore.xcodeproj/project.pbxproj:
2944 * dom/DOMAllInOne.cpp:
2945 * dom/MessagePortChannel.cpp: Removed.
2946 * page/DatabaseProvider.h:
2947 * platform/mock/mediasource/MockTracks.cpp: Removed.
2949 2016-08-19 Myles C. Maxfield <mmaxfield@apple.com>
2951 Addressing post-review comments after r204592
2952 https://bugs.webkit.org/show_bug.cgi?id=160895
2956 No new tests because there is no behavior change.
2958 * page/cocoa/ResourceUsageOverlayCocoa.mm:
2959 (WebCore::showText):
2960 * platform/graphics/ca/PlatformCALayer.cpp:
2961 (WebCore::PlatformCALayer::drawTextAtPoint):
2962 * platform/ios/LegacyTileCache.mm:
2963 (WebCore::LegacyTileCache::drawLayer):
2965 2016-08-19 Ryan Haddad <ryanhaddad@apple.com>
2967 Attempt to fix the Windows build after r204652.
2969 Unreviewed build fix.
2971 * dom/DOMAllInOne.cpp:
2973 2016-08-19 Myles C. Maxfield <mmaxfield@apple.com>
2975 Migrate from ints to unsigneds in a few more places in rendering code
2976 https://bugs.webkit.org/show_bug.cgi?id=161006
2978 Reviewed by Alex Christensen.
2980 No new tests because there is no behavior change.
2982 * platform/graphics/GraphicsContext.cpp:
2983 (WebCore::GraphicsContext::drawBidiText):
2984 * platform/mock/MockRealtimeVideoSource.cpp:
2985 (WebCore::MockRealtimeVideoSource::drawText):
2986 * platform/text/BidiResolver.h:
2987 (WebCore::BidiCharacterRun::BidiCharacterRun):
2988 (WebCore::BidiCharacterRun::start):
2989 (WebCore::BidiCharacterRun::stop):
2990 * rendering/BidiRun.cpp:
2991 (WebCore::BidiRun::BidiRun):
2992 * rendering/BidiRun.h:
2993 * rendering/RenderBlockLineLayout.cpp:
2994 (WebCore::setLogicalWidthForTextRun):
2995 (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2996 (WebCore::findFirstTrailingSpace):
2997 (WebCore::RenderBlockFlow::handleTrailingSpaces):
2998 * rendering/line/BreakingContext.h:
3000 2016-08-19 Myles C. Maxfield <mmaxfield@apple.com>
3002 Migrate RenderText::stringView() to unsigneds
3003 https://bugs.webkit.org/show_bug.cgi?id=161005
3005 Reviewed by Alex Christensen.
3007 No new tests because there is no behavior change.
3009 * rendering/RenderBlockLineLayout.cpp:
3010 (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
3011 * rendering/RenderText.cpp:
3012 (WebCore::RenderText::stringView):
3013 * rendering/RenderText.h:
3015 2016-08-18 Ryosuke Niwa <rniwa@webkit.org>
3017 Rename LifecycleCallback to CustomElementReaction
3018 https://bugs.webkit.org/show_bug.cgi?id=160991
3020 Reviewed by Chris Dumez.
3022 Renamed LifecycleCallbackQueue and CustomElementLifecycleProcessingStack
3023 to CustomElementReactionQueue and CustomElementReactionStack per the latest spec:
3024 https://html.spec.whatwg.org/#custom-element-reactions
3026 No new tests since this is just a rename of classes which are not exposed to the Web.
3029 * WebCore.xcodeproj/project.pbxproj:
3031 * bindings/js/JSCustomElementsRegistryCustom.cpp:
3032 (WebCore::getCallback): Renamed from getLifecycleCallback.
3033 (WebCore::JSCustomElementsRegistry::define):
3034 (WebCore::getLifecycleCallback): Deleted.
3036 * bindings/js/JSMainThreadExecState.h:
3037 (WebCore::JSMainThreadNullState):
3039 * bindings/scripts/CodeGeneratorJS.pm:
3040 (GenerateImplementation):
3042 * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
3043 * bindings/scripts/test/TestObj.idl:
3045 * dom/CustomElementReactionQueue.cpp: Moved from Source/WebCore/dom/LifecycleCallbackQueue.cpp.
3046 (WebCore::CustomElementReactionQueueItem::CustomElementReactionQueueItem):
3047 (WebCore::CustomElementReactionQueue::CustomElementReactionQueue):
3048 (WebCore::CustomElementReactionQueue::~CustomElementReactionQueue):
3049 (WebCore::CustomElementReactionQueue::enqueueElementUpgrade):
3050 (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded):
3051 (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded):
3052 (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded):
3053 (WebCore::CustomElementReactionQueue::invokeAll):
3054 (WebCore::CustomElementReactionStack::ensureCurrentQueue):
3055 (WebCore::CustomElementReactionStack::processQueue):
3057 * dom/CustomElementReactionQueue.h: Moved from Source/WebCore/dom/LifecycleCallbackQueue.h.
3058 (WebCore::CustomElementReactionStack::CustomElementReactionStack):
3059 (WebCore::CustomElementReactionStack::~CustomElementReactionStack):
3060 (WebCore::CustomElementReactionStack::hasCurrentProcessingStack):
3063 (WebCore::createFallbackHTMLElement):
3066 (WebCore::Element::attributeChanged):
3067 (WebCore::Element::insertedInto):
3068 (WebCore::Element::removedFrom):
3070 2016-08-19 Chris Dumez <cdumez@apple.com>
3072 Attr.prefix / Element.prefix attribute should be readonly
3073 https://bugs.webkit.org/show_bug.cgi?id=160998
3075 Reviewed by Daniel Bates.
3077 Attr.prefix / Element.prefix attribute should be readonly:
3078 - https://dom.spec.whatwg.org/#element
3079 - https://dom.spec.whatwg.org/#attr
3081 Firefox and Chrome agree with the specification.
3083 No new tests, rebaselined existing test.
3088 2016-08-19 Chris Dumez <cdumez@apple.com>
3090 <command> should be an HTMLUnknownElement and <basefont> should be an HTMLElement
3091 https://bugs.webkit.org/show_bug.cgi?id=161004
3093 Reviewed by Daniel Bates.
3095 <command> should be an HTMLUnknownElement and <basefont> should be an HTMLElement as per:
3096 - https://html.spec.whatwg.org/multipage/dom.html#elements-in-the-dom:element-interface
3098 <basefont> is already an HTMLElement in Firefox and Chrome. <command> is an
3099 HTMLUnknownElement in Firefox but an HTMLElement in Chrome.
3101 No new tests, rebaselined existing test.
3103 * html/HTMLTagNames.in:
3105 2016-08-19 Nan Wang <n_wang@apple.com>
3107 AX: iOS, Wrong axLabel on static text if heading has multiple children
3108 https://bugs.webkit.org/show_bug.cgi?id=160981
3110 Reviewed by Chris Fleizach.
3112 Headings are using textUnderElement to compute the accessibilityLabel on iOS, so normally it's
3113 the concatenation of all the children's accessibilityLabel. Therefore, we shouldn't use accessibilityLabel
3114 to check for user defined text on headings. Instead, baseAccessibilityDescription will return the
3115 alternate text we want.
3117 Changes are covered in the modified test.
3119 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3120 (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
3122 2016-08-19 Johan K. Jensen <johan_jensen@apple.com>
3124 Resource Timing: Make PerformanceEntryList a sequence as per spec
3125 https://bugs.webkit.org/show_bug.cgi?id=160963
3127 Reviewed by Alex Christensen.
3129 Change PerformanceEntryList to be a sequence of PerformanceEntry instead of an object.
3131 Test: http/tests/performance/performance-resource-timing-entries-iterable.html
3134 * DerivedSources.cpp:
3135 * DerivedSources.make:
3136 * PlatformGTK.cmake:
3137 * WebCore.xcodeproj/project.pbxproj:
3138 * bindings/scripts/CodeGeneratorGObject.pm:
3139 Remove references to {JS,}PerformanceEntryList.{cpp,h,idl}.
3141 * page/Performance.cpp:
3142 (WebCore::Performance::getEntries):
3143 (WebCore::Performance::getEntriesByType):
3144 (WebCore::Performance::getEntriesByName):
3145 * page/Performance.h:
3146 Methods now operate on a Vector of PerformanceEntry.
3148 * page/Performance.idl:
3149 Typedef PerformanceEntryList as a sequence of PerformanceEntry.
3151 * page/PerformanceEntryList.cpp: Removed.
3152 (WebCore::PerformanceEntryList::PerformanceEntryList): Deleted.
3153 (WebCore::PerformanceEntryList::~PerformanceEntryList): Deleted.
3154 (WebCore::PerformanceEntryList::length): Deleted.
3155 (WebCore::PerformanceEntryList::item): Deleted.
3156 (WebCore::PerformanceEntryList::append): Deleted.
3157 (WebCore::PerformanceEntryList::appendAll): Deleted.
3158 (WebCore::PerformanceEntryList::sort): Deleted.
3159 * page/PerformanceEntryList.h: Removed.
3160 (WebCore::PerformanceEntryList::create): Deleted.
3161 * page/PerformanceEntryList.idl: Removed.
3163 2016-08-19 Eric Carlson <eric.carlson@apple.com>
3165 [Mac] fix PiP context menu typos
3166 https://bugs.webkit.org/show_bug.cgi?id=160999
3167 <rdar://problem/27885070>
3169 Reviewed by Jer Noble.
3171 * English.lproj/Localizable.strings: "Picture-in-Picture" -> "Picture in Picture".
3173 * platform/LocalizedStrings.cpp:
3174 (WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen): Ditto.
3175 (WebCore::contextMenuItemTagExitVideoEnhancedFullscreen): Ditto.
3177 2016-08-16 Simon Fraser <simon.fraser@apple.com>
3179 Rename didLayout(LayoutMilestones) to didReachLayoutMilestone(), and related WK2 functions
3180 https://bugs.webkit.org/show_bug.cgi?id=160923
3182 Reviewed by Tim Horton.
3184 didLayout(LayoutMilestones) -> didReachLayoutMilestone(LayoutMilestones)
3185 dispatchDidLayout(LayoutMilestones) -> dispatchDidReachLayoutMilestone(LayoutMilestones)
3188 (WebCore::Document::setVisualUpdatesAllowed):
3189 * loader/EmptyClients.h:
3190 * loader/FrameLoader.cpp:
3191 (WebCore::FrameLoader::didReachLayoutMilestone):
3192 (WebCore::FrameLoader::didLayout): Deleted.
3193 * loader/FrameLoader.h:
3194 * loader/FrameLoaderClient.h:
3195 * page/FrameView.cpp:
3196 (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
3197 (WebCore::FrameView::firePaintRelatedMilestonesIfNeeded):
3198 * page/LayoutMilestones.h: Formatting
3200 (WebCore::Page::addRelevantRepaintedObject):
3202 2016-08-19 Chris Dumez <cdumez@apple.com>
3204 DumpRenderTree crashed in com.apple.WebCore: WebCore::DOMWindow::resetDOMWindowProperties + 607
3205 https://bugs.webkit.org/show_bug.cgi?id=160983
3206 <rdar://problem/26768524>
3208 Reviewed by Brent Fulgham.
3210 Update DOMWindow::frameDestroyed() to ref the window object as the crash
3211 traces seem to indicate it can get destroyed during the execution of this
3212 method. Also update the code in the ~Frame destructor to not iterate over
3213 the list of FrameDestructionObservers because observers remove themselves
3214 from the list when they get destroyed.
3216 No new tests, do not know how to reproduce.
3218 * page/DOMWindow.cpp:
3219 (WebCore::DOMWindow::frameDestroyed):
3221 (WebCore::Frame::~Frame):
3223 2016-08-19 Chris Dumez <cdumez@apple.com>
3225 WebKit should unset event propagation flags after dispatch
3226 https://bugs.webkit.org/show_bug.cgi?id=160853
3228 Reviewed by Ryosuke Niwa.
3230 WebKit should unset event propagation flags after dispatch to reflect
3231 the latest DOM specification:
3232 - https://github.com/whatwg/dom/commit/806d4aab584f6fc38c21f8e088b51b8ba3e27e20
3234 No new tests, rebaselined existing tests.
3237 (WebCore::Event::resetPropagationFlags):
3238 * dom/EventDispatcher.cpp:
3239 (WebCore::EventDispatcher::dispatchEvent):
3240 * dom/EventTarget.cpp:
3241 (WebCore::EventTarget::dispatchEvent):
3243 2016-08-18 Daniel Bates <dabates@apple.com>
3245 Ld warns of non-existent PrivateFrameworks directory when building WebKit with the public iOS 9.3 SDK
3246 https://bugs.webkit.org/show_bug.cgi?id=160979
3248 Rubber-stamped by Simon Fraser.
3250 Only add the SDK PrivateFrameworks directory to the FRAMEWORK_SEARCH_PATH when building for
3251 iOS Simulator, building with an iOS SDK that does not support text-based stubs, or building
3252 an Apple-internal build.
3254 * Configurations/Base.xcconfig: Define WK_TARGET_IOS_VERSION_MAJOR.
3255 * Configurations/WebCore.xcconfig:
3257 2016-08-18 Sam Weinig <sam@webkit.org>
3261 Support WebIDL unions (Part 1)
3262 https://bugs.webkit.org/show_bug.cgi?id=160769
3264 Reviewed by Chris Dumez.
3266 This is the first part of an effort to add support for union types
3267 in our code generators. This change:
3268 - Adds a domType struct to hold the parsed type information. For now, we only
3269 use it temporarily while parsing, and don't expose it to the code generators,
3270 but that will change in a later patch.
3271 - Remove support for scoped identifiers for types. They are not supported by WebIDL.
3272 - Make debugging the parser easier by providing backtraces when asserting.
3274 There should be no observable changes.
3276 * bindings/scripts/IDLParser.pm:
3278 2016-08-18 Chris Dumez <cdumez@apple.com>
3280 Move prefix / namespaceURI / localName attributes from Node to Attr / Element
3281 https://bugs.webkit.org/show_bug.cgi?id=160988
3283 Reviewed by Ryosuke Niwa.
3285 Move prefix / namespaceURI / localName attributes from Node to Attr / Element
3286 as per the latest DOM specification:
3287 - https://dom.spec.whatwg.org/#element
3288 - https://dom.spec.whatwg.org/#attr
3290 Firefox and Chrome match the specification.
3292 No new tests, rebaselined existing tests.
3300 2016-08-18 Jonathan Bedard <jbedard@apple.com>
3302 Binding NULL pointer to reference in WebCore::RenderObject
3303 https://bugs.webkit.org/show_bug.cgi?id=160830
3305 Reviewed by Myles C. Maxfield.
3307 No new tests needed, existing functionality not changed.
3309 Fixes a dereferenced NULL pointer bound to a reference through a minor re-factor.
3311 * rendering/InlineIterator.h:
3312 (WebCore::InlineIterator::clear): Explicit clear occurs, instead of a call to moveTo.
3313 (WebCore::InlineIterator::moveToStartOf): Swapped pointer for reference.
3314 (WebCore::InlineIterator::moveTo): Swapped pointer for reference.
3315 (WebCore::InlineIterator::increment): Explicitly call clear for clarity.
3316 * rendering/line/BreakingContext.h:
3317 (WebCore::BreakingContext::commitLineBreakClear): Commit a line break and clear the iterator.
3318 (WebCore::BreakingContext::commitLineBreakAtCurrentWidth): Swapped pointer for reference.
3319 (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Swapped pointer for reference.
3320 (WebCore::BreakingContext::increment): Explicitly call clear for clarity.
3321 (WebCore::BreakingContext::handleBR): Swapped pointer for passed reference.
3322 (WebCore::BreakingContext::handleReplaced): Explicitly call clear for clarity.
3323 (WebCore::tryHyphenating): Swapped pointer for passed reference.
3324 (WebCore::BreakingContext::handleText): Replaced all render object passing with references. Note that the caller explicitly checks if m_current.renderer() exists before calling this function.
3325 (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): Explicitly call clear for clarity.
3326 (WebCore::BreakingContext::handleEndOfLine): Explicitly call clear for clarity.
3328 2016-08-18 Ryosuke Niwa <rniwa@webkit.org>
3330 Windows build fix after r204611. Use the fully qualified name to avoid the ambiguity in VC++.
3332 * bindings/js/JSCustomElementInterface.cpp:
3333 (WebCore::JSCustomElementInterface::invokeCallback):
3334 * bindings/js/JSCustomElementInterface.h:
3335 (WebCore::JSCustomElementInterface::invokeCallback):
3337 2016-08-18 Dean Jackson <dino@apple.com>
3339 Support passing preferLowPowerToHighPerformance and failIfMajorPerformanceCaveat
3340 https://bugs.webkit.org/show_bug.cgi?id=160982
3341 <rdar://problem/27915946>
3343 Reviewed by Simon Fraser.
3345 Update WebGLContextAttributes to be compliant with the specification,
3346 by adding preferLowPowerToHighPerformance and failIfMajorPerformanceCaveat.
3347 They are not implemented yet, so asking the created context what
3348 values it used should give the default.
3350 Test: fast/canvas/webgl/context-creation-attributes.html
3352 * html/canvas/WebGLContextAttributes.cpp:
3353 (WebCore::WebGLContextAttributes::preferLowPowerToHighPerformance):
3354 (WebCore::WebGLContextAttributes::setPreferLowPowerToHighPerformance):
3355 (WebCore::WebGLContextAttributes::failIfMajorPerformanceCaveat):
3356 (WebCore::WebGLContextAttributes::setFailIfMajorPerformanceCaveat):
3357 * html/canvas/WebGLContextAttributes.h:
3358 * html/canvas/WebGLContextAttributes.idl:
3359 * html/canvas/WebGLRenderingContextBase.cpp:
3360 (WebCore::WebGLRenderingContextBase::create): Deleted.
3361 * platform/graphics/GraphicsContext3D.h:
3362 (WebCore::GraphicsContext3D::Attributes::Attributes): Deleted.
3364 2016-08-18 Anders Carlsson <andersca@apple.com>
3366 Move an NPAPI-only function from WebCore to WebKit
3367 https://bugs.webkit.org/show_bug.cgi?id=160967
3369 Reviewed by Sam Weinig.
3371 * WebCore.xcodeproj/project.pbxproj:
3372 * bindings/js/ScriptController.cpp:
3373 (WebCore::ScriptController::createScriptObjectForPluginElement): Deleted.
3374 * bindings/js/ScriptController.h:
3375 * bridge/NP_jsobject.h:
3377 2016-08-18 Ryosuke Niwa <rniwa@webkit.org>
3379 Binding test fix after r204611.
3381 * bindings/scripts/test/TestObj.idl:
3383 2016-08-18 Chris Dumez <cdumez@apple.com>
3385 Unreviewed, nit fix after r204605 reported by Darin.
3387 * platform/text/TextCodecICU.cpp:
3389 2016-08-17 Ryosuke Niwa <rniwa@webkit.org>
3391 Add basic support for connected and disconnected callbacks
3392 https://bugs.webkit.org/show_bug.cgi?id=160950
3394 Reviewed by Chris Dumez.
3396 Added the basic support for custom elements' connectedCallback and disconnectedCallback. These callbacks
3397 are enqueued by inserting and removing a node as spec'ed by https://dom.spec.whatwg.org/#concept-node-insert
3398 and https://dom.spec.whatwg.org/#concept-node-remove
3400 For now, we only support callbacks on appendChild and removeChild to limit the amount of code changes and
3401 tests that need to be included in this patch.
3403 This patch also renames InvokesCustomElementLifecycleCallbacks IDL attribute to CEReactions to match
3404 the latest specification: https://html.spec.whatwg.org/multipage/scripting.html#cereactions
3406 Tests: fast/custom-elements/connected-callbacks.html
3407 fast/custom-elements/disconnected-callbacks.html
3409 * bindings/js/JSCustomElementInterface.cpp:
3410 (WebCore::JSCustomElementInterface::invokeCallback): Extracted from invokeAttributeChangedCallback.
3411 (WebCore::JSCustomElementInterface::setConnectedCallback): Added.
3412 (WebCore::JSCustomElementInterface::invokeConnectedCallback): Added.
3413 (WebCore::JSCustomElementInterface::setDisconnectedCallback): Added.
3414 (WebCore::JSCustomElementInterface::invokeDisconnectedCallback): Added.
3415 (WebCore::JSCustomElementInterface::setAttributeChangedCallback):
3416 (WebCore::JSCustomElementInterface::invokeAttributeChangedCallback): Renamed from attributeChanged.
3417 * bindings/js/JSCustomElementInterface.h: Added m_connectedCallback and m_disconnectedCallback as instance
3418 variables. Also removed the superfluous mutable qualifier from m_constructor m_attributeChangedCallback.
3419 * bindings/js/JSCustomElementsRegistryCustom.cpp:
3420 (WebCore::JSCustomElementsRegistry::define): Store connectedCallback and disconnectedCallback.
3421 * bindings/scripts/CodeGeneratorJS.pm:
3422 (GenerateImplementation):
3423 * bindings/scripts/IDLAttributes.txt:
3424 * dom/CustomElementsRegistry.idl:
3426 (WebCore::Element::insertedInto): Call enqueueConnectedCallbackIfNeeded.
3427 (WebCore::Element::removedFrom): Call enqueueDisconnectedCallbackIfNeeded.
3429 * dom/LifecycleCallbackQueue.cpp:
3430 (WebCore::LifecycleQueueItem::invoke): Added calls to invokeConnectedCallback and invokeDisconnectedCallback.
3431 (WebCore::findInterfaceForCustomElement): Extracted from enqueueAttributeChangedCallbackIfNeeded.
3432 (WebCore::LifecycleCallbackQueue::enqueueConnectedCallbackIfNeeded): Added.
3433 (WebCore::LifecycleCallbackQueue::enqueueDisconnectedCallbackIfNeeded): Added.
3434 (WebCore::LifecycleCallbackQueue::enqueueAttributeChangedCallbackIfNeeded):
3435 (WebCore::CustomElementLifecycleProcessingStack::ensureCurrentQueue):
3436 * dom/LifecycleCallbackQueue.h:
3439 2016-08-18 Beth Dakin <bdakin@apple.com>
3441 Update the accessibility titles for list insertion
3442 https://bugs.webkit.org/show_bug.cgi?id=160972
3444 rdar://problem/27750446
3446 Reviewed by Chris Fleizach.
3448 Update accessibility titles based on feedback.
3449 * English.lproj/Localizable.strings:
3450 * platform/LocalizedStrings.cpp:
3451 (WebCore::insertListTypeNone):
3452 (WebCore::insertListTypeBulleted):
3453 (WebCore::insertListTypeBulletedAccessibilityTitle):
3454 (WebCore::insertListTypeNumbered):
3455 (WebCore::insertListTypeNumberedAccessibilityTitle):
3456 (WebCore::insertListTypeNoneAccessibilityTitle): Deleted.
3457 * platform/LocalizedStrings.h:
3459 2016-08-18 Chris Dumez <cdumez@apple.com>
3461 Align our encoding labels with the encoding specification
3462 https://bugs.webkit.org/show_bug.cgi?id=160931
3464 Reviewed by Darin Adler.
3466 Align our encoding labels with the encoding specification:
3467 - https://encoding.spec.whatwg.org/#names-and-labels
3469 This also aligns with Firefox and Chrome.
3471 No new tests, rebaselined existing test.
3473 * platform/text/TextCodecICU.cpp:
3474 (WebCore::TextCodecICU::registerEncodingNames):
3475 * platform/text/TextCodecLatin1.cpp:
3476 (WebCore::TextCodecLatin1::registerEncodingNames):
3477 (WebCore::newStreamingTextDecoderWindowsLatin1): Deleted.
3478 (WebCore::TextCodecLatin1::registerCodecs): Deleted.
3479 * platform/text/TextCodecUTF8.cpp:
3480 (WebCore::TextCodecUTF8::registerEncodingNames):
3482 2016-08-18 Andy Estes <aestes@apple.com>
3484 [Cocoa] Add SPI to WKProcessPool for enabling cookie storage partitioning
3485 https://bugs.webkit.org/show_bug.cgi?id=160964
3487 Reviewed by Brent Fulgham.
3489 * page/Settings.cpp:
3490 (WebCore::Settings::setCookieStoragePartitioningEnabled): Deleted.
3492 (WebCore::Settings::cookieStoragePartitioningEnabled): Deleted.
3493 * platform/network/NetworkStorageSession.h: