1 2015-02-12 Timothy Horton <timothy_horton@apple.com>
3 Crashes under detectItemAroundHitTestResult when DataDetectors is not available
4 https://bugs.webkit.org/show_bug.cgi?id=141549
5 <rdar://problem/19180955>
7 Reviewed by Dan Bernstein.
9 * editing/mac/DataDetection.mm:
10 (WebCore::DataDetection::detectItemAroundHitTestResult):
11 Bail out from data detection if either of the relevant frameworks aren't loaded.
13 2015-02-12 Dean Jackson <dino@apple.com>
15 [iOS Media] Audio should hide timeline scrubber until playback starts
16 https://bugs.webkit.org/show_bug.cgi?id=141542
17 <rdar://problem/19820685>
19 Reviewed by Eric Carlson.
21 We regressed from the system behaviour in iOS 7, where the timeline
22 scrubber for an audio element is not shown until the user starts
25 * Modules/mediacontrols/mediaControlsiOS.css:
26 (video::-webkit-media-controls-panel): Fix the alignment of the flexbox.
27 (audio::-webkit-media-controls-status-display): Add the style for the status display.
28 * Modules/mediacontrols/mediaControlsiOS.js:
29 (ControllerIOS.prototype.configureInlineControls): Start hidden if we are an <audio>.
30 (ControllerIOS.prototype.configureFullScreenControls): Drive by comment change.
31 (ControllerIOS.prototype.setPlaying): Unhide the timeline.
33 2015-02-12 Chris Dumez <cdumez@apple.com>
35 Drop the quirks-mode exception for CSS MIME types
36 https://bugs.webkit.org/show_bug.cgi?id=141501
38 Reviewed by Alexey Proskuryakov.
40 Drop the quirks-mode exception for CSS MIME types.
41 This matches Firefox's behavior.
43 This patch is based on the following Blink revision:
44 http://src.chromium.org/viewvc/blink?view=revision&revision=189669
47 - http/tests/misc/css-accept-any-type.html
48 - http/tests/security/cross-origin-css.html
50 * css/StyleSheetContents.cpp:
51 (WebCore::StyleSheetContents::parseAuthorStyleSheet):
52 * dom/ProcessingInstruction.cpp:
53 (WebCore::ProcessingInstruction::setCSSStyleSheet):
54 * inspector/InspectorPageAgent.cpp:
55 (WebCore::InspectorPageAgent::cachedResourceContent):
56 * loader/cache/CachedCSSStyleSheet.cpp:
57 (WebCore::CachedCSSStyleSheet::sheetText):
58 (WebCore::CachedCSSStyleSheet::canUseSheet):
59 * loader/cache/CachedCSSStyleSheet.h:
61 2015-02-12 Beth Dakin <bdakin@apple.com>
63 REGRESSION: Should not send wheel events with a delta of 0
64 https://bugs.webkit.org/show_bug.cgi?id=141537
66 rdar://problem/18903118
68 Reviewed by Simon Fraser.
70 This code should not have been removed entirely to accommodate rubber-banding, it
71 just needs to return false instead of true in order to allow the MayBegin and
72 Ended phases to be handled by the ElasticityController.
74 (WebCore::Element::dispatchWheelEvent):
76 2015-02-12 Dean Jackson <dino@apple.com>
78 [iOS Media] Implement 3-style media timeline (buffered, played, unavailable)
79 https://bugs.webkit.org/show_bug.cgi?id=141526
80 <rdar://problem/19603337>
82 Reviewed by Eric Carlson and Antoine Quint.
84 Implement a 3-style media scrubber for iOS. This draws white for
85 the region that has been played (before the playhead), black
86 for the region that is buffered, and is hollow for the rest.
88 * Modules/mediacontrols/mediaControlsApple.js:
89 (Controller.prototype.updateProgress): Update progress is now completely
90 shared between OS X and iOS. This calls the implementation specific
91 drawTimelineBackground.
92 (Controller.prototype.drawTimelineBackground): Move the OS X code to here.
93 * Modules/mediacontrols/mediaControlsiOS.css:
94 (audio::-webkit-media-controls-timeline): New styles for the timeline. Updated thumb image, etc.
95 (video::-webkit-media-controls-timeline::-webkit-slider-runnable-track):
96 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
97 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb:active):
98 (video::-webkit-media-controls-time-remaining-display):
99 * Modules/mediacontrols/mediaControlsiOS.js:
100 (ControllerIOS): Create a globally unique canvas context name in the constructor.
101 (ControllerIOS.prototype.createControls): Set the background of the timeline to a canvas.
102 (ControllerIOS.prototype.addRoundedRect): Helper function.
103 (ControllerIOS.prototype.drawTimelineBackground): Draw the 3-style content.
104 (ControllerIOS.prototype.updateProgress): Deleted.
106 2015-02-12 Daniel Bates <dabates@apple.com>
108 Fix some Mac linker warnings
109 https://bugs.webkit.org/show_bug.cgi?id=141522
111 Reviewed by Alex Christensen.
113 Following <https://trac.webkit.org/changeset/179945>, the linker warns about the following hidden WebCore symbols:
115 ld: warning: cannot export hidden symbol __ZN7WebCore20LogNotYetImplementedE from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/Logging.o
116 ld: warning: cannot export hidden symbol _wkCreateURLPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCoreSystemInterface.o
117 ld: warning: cannot export hidden symbol _wkCreateURLNPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCoreSystemInterface.o
119 * WebCore.exp.in: Remove symbols for functions wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName.
120 * platform/Logging.h: Export WTFLogChannel for LogNotYetImplemented, which is referenced from
121 notImplementedLoggingChannel() in file NotImplemented.cpp. We make use of the associated
122 header, NotImplemented.h, in both WebKit and WebKit2.
123 * platform/mac/WebCoreSystemInterface.mm: Remove declarations for functions
124 wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName that
125 were inadvertently not removed in r25494.
127 2015-02-12 Joseph Pecoraro <pecoraro@apple.com>
129 Web Inspector: Crash inspecting styles of element with mutated stylesheet
130 https://bugs.webkit.org/show_bug.cgi?id=141451
132 Reviewed by Timothy Hatcher.
134 Test: inspector/css/stylesheet-with-mutations.html
136 * css/CSSStyleSheet.h:
137 * css/CSSStyleSheet.cpp:
138 (WebCore::CSSStyleSheet::CSSStyleSheet):
139 (WebCore::CSSStyleSheet::didMutateRules):
140 Keep a flag on the CSSStyleSheet to know when it has had a rule
141 mutation from the contents.
143 * inspector/InspectorStyleSheet.h:
144 * inspector/InspectorStyleSheet.cpp:
145 (WebCore::InspectorStyleSheet::reparseStyleSheet):
146 When completely replacing the stylesheet's contents, we will have
147 destroyed any previous rules, so clear the has mutations flag.
149 (WebCore::selectorsFromSource):
150 Previously there was a mismatch between the rules the parsed
151 SourceData had, and the actual CSSSelectors we were iterating.
152 We use the SourceData so we can get the exact user authored
153 text instead of generated longhands from actualy selector objects.
154 Add an ASSERT and bail to catch and more gracefully handle
155 any possible mismatches in the future.
157 (WebCore::InspectorStyleSheet::styleSheetMutated):
158 (WebCore::InspectorStyleSheet::ensureParsedDataReady):
159 When a CSSStyleSheet has been mutated beyond the inspector's
160 knowledge right now, fall back to readonly generated selectors.
161 We should better handle this in the future:
162 <https://webkit.org/b/141450> Web Inspector: Better support for CSSOM StyleSheet mutations (insertRule/deleteRule)
164 2015-02-12 Commit Queue <commit-queue@webkit.org>
166 Unreviewed, rolling out r179987.
167 https://bugs.webkit.org/show_bug.cgi?id=141525
169 caused debug tests to fail (Requested by alexchristensen on
174 "[CSS Grid Layout] Invalid initialization of track sizes with
175 non spanning grid items"
176 https://bugs.webkit.org/show_bug.cgi?id=140763
177 http://trac.webkit.org/changeset/179987
179 2015-02-12 Brian J. Burg <burg@cs.washington.edu>
181 REGRESSION(r178060): empty arguments are passed when logging to system console
182 https://bugs.webkit.org/show_bug.cgi?id=141511
184 Reviewed by Timothy Hatcher.
186 * page/PageConsoleClient.cpp:
187 (WebCore::PageConsoleClient::messageWithTypeAndLevel): Change premature move to copyRef.
189 2015-02-12 Alex Christensen <achristensen@webkit.org>
191 [Win] Unreviewed debug build fix after r179980.
193 * svg/SVGSVGElement.cpp:
194 (WebCore::SVGSVGElement::currentViewportSize):
195 Explicitly call constructor.
197 2015-01-23 Sergio Villar Senin <svillar@igalia.com>
199 [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items
200 https://bugs.webkit.org/show_bug.cgi?id=140763
202 Reviewed by Antti Koivisto.
204 Content sized tracks with non-spanning grid items were not
205 properly sized because the growth limit was sometimes infinity
206 (-1) after calling resolveContentBasedTrackSizingFunctions() when
207 it should not. This patch adds an special initialization phase for
208 non-spanning grid items as the new track sizing algorithm
211 Granted, that was handled in the old algorithm in
212 distributeSpaceToTracks() as a special case. The problem is that
213 it regressed after the optimization added in r173868 because that
214 method is no longer called when the space to distribute is 0.
216 That's why we could fix this by allowing calls to
217 distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing
218 it with an explicit initialization our implementation becomes
219 closer to the new algorithm and the initialization is now explicit
220 in the code instead of a side effect of calling
221 distributeSpaceToTracks() with no space to be distributed. It also
222 brings a slight performance improvement as we save sorts and hash
225 I also took the change to add caching to several GridTrackSize
226 methods that were hot on the profiler (each one accounted for ~1%
227 of the total time, now they account for ~0.3% each).
229 Test: fast/css-grid-layout/grid-initialize-span-one-items.html
231 * rendering/RenderGrid.cpp:
232 (WebCore::GridItemWithSpan::span): New helper method for ASSERTs.
233 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
234 Exclude non spanning grid items from the calls to
235 resolveContentBasedTrackSizingFunctionsForItems().
236 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
237 New method to resolve track sizes only using non-spanning grid
239 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
240 Ensure that it isn't called for non-spanning grid items.
241 * rendering/RenderGrid.h:
242 * rendering/style/GridTrackSize.h:
243 (WebCore::GridTrackSize::GridTrackSize): Cache return values.
244 (WebCore::GridTrackSize::setLength): Ditto.
245 (WebCore::GridTrackSize::setMinMax): Ditto.
246 (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method
247 that caches the return values for hasXXXTrackBreadth() methods.
248 (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use
249 the cached return value.
250 (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto.
251 (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto.
252 (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto.
253 (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto.
254 (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto.
255 (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
257 (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
260 2015-02-12 Zan Dobersek <zdobersek@igalia.com>
262 Remove the USE(ACCELERATED_COMPOSITING) guard from the
263 MediaPlayerPrivateGStreamerBase destructor.
265 The guard was removed in r163079. It was still defined through CMake
266 for the EFL and GTK ports when the guarded code was introduced in
267 r172828. In r171741 the macro was finally removed for the GTK and EFL
268 ports as well, but the guards for the affected code weren't updated
269 so TextureMapperPlatformLayer::Client::platformLayerWillBeDestroyed()
270 wasn't being called anymore.
272 Rubber-stamped by Philippe Normand.
274 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
275 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
277 2015-02-11 Darin Adler <darin@apple.com>
279 Streamline and simplify SVGSVGElement and related classes
280 https://bugs.webkit.org/show_bug.cgi?id=141463
282 Reviewed by Antti Koivisto.
284 * dom/Document.cpp: Removed unneeded include of SVGSVGElement.h.
285 * loader/FrameLoader.cpp: Ditto.
286 * rendering/RenderBoxModelObject.cpp: Ditto.
287 * rendering/svg/RenderSVGForeignObject.cpp: Ditto.
288 * svg/SVGImageElement.cpp: Ditto.
289 * svg/SVGMarkerElement.cpp: Ditto.
290 * svg/SVGPathElement.cpp: Ditto.
291 * svg/SVGPatternElement.cpp: Ditto.
292 * svg/SVGTransform.cpp: Ditto.
294 * page/FrameView.cpp:
295 (WebCore::FrameView::scrollToAnchor): Updated to call the SVGSVGElement function
296 named scrollToAnchor (was setupInitialView). Also refactored to avoid repeating
297 the expression frame().document() so often.
299 * platform/graphics/FloatSize.h: Added operator/.
301 * svg/SVGDocument.cpp:
302 (WebCore::SVGDocument::rootElement): Rearranged to use early return.
303 (WebCore::SVGDocument::zoomAndPanEnabled): Ditto.
304 (WebCore::SVGDocument::startPan): Ditto. Also used FloatPoint math instead
305 of breaking things apart into x and y.
306 (WebCore::SVGDocument::updatePan): Ditto.
308 * svg/SVGDocument.h: Removed some unneeded includes and forward declarations.
309 Moved function bodies out of the class to make it more readable. Renamed
310 m_translate to m_panningOffset and made it a FloatSize instead of FloatPoint.
312 * svg/SVGDocumentExtensions.cpp:
313 (WebCore::SVGDocumentExtensions::startAnimations): Use a modern for loop
314 and update since timeContainer() now returns a reference.
316 * svg/SVGSVGElement.cpp: Removed many unneeded includes.
317 (WebCore::SVGSVGElement::SVGSVGElement): Moved initialization of scalars to
318 the class definition. Updated since m_timerContainer is a Ref (later should
319 change it to be a std::unique_ptr or just directly contained in SVGSVGElement).
320 (WebCore::SVGSVGElement::~SVGSVGElement): Removed comment that doesn't say much,
321 but is worded in a confusing way.
322 (WebCore::SVGSVGElement::contentScriptType): Use NeverDestroyed instead of
323 DEPRECATED_DEFINE_STATIC_LOCAL.
324 (WebCore::SVGSVGElement::contentStyleType): Ditto.
325 (WebCore::SVGSVGElement::viewport): Streamlined a bit.
326 (WebCore::SVGSVGElement::pixelUnitToMillimeterX): Ditto.
327 (WebCore::SVGSVGElement::pixelUnitToMillimeterY): Ditto.
328 (WebCore::SVGSVGElement::currentView): Changed to return a reference.
329 (WebCore::SVGSVGElement::frameForCurrentScale): Added. Helper for the two
331 (WebCore::SVGSVGElement::currentScale): Updated to use frameForCurrentScale.
332 (WebCore::SVGSVGElement::setCurrentScale): Ditto.
333 (WebCore::SVGSVGElement::setCurrentTranslate): Optimized the case where there
334 is no change to the translation. Also changed the data member's name to
335 m_currentTranslate to more directly match the DOM API naming.
336 (WebCore::SVGSVGElement::parseAttribute): Simplified the parsing a bit, and
337 changed to pass a reference to SVGZoomAndPan::parseAttribute.
338 (WebCore::SVGSVGElement::svgAttributeChanged): Tweaked formatting and removed
339 code that converts the renderer pointer to a RenderObject* unnecessarily.
340 (WebCore::SVGSVGElement::suspendRedraw): Removed FIXME about implementing this,
341 since we don't really plan to do that.
342 (WebCore::SVGSVGElement::unsuspendRedraw): Ditto.
343 (WebCore::SVGSVGElement::unsuspendRedrawAll): Ditto.
344 (WebCore::SVGSVGElement::forceRedraw): Ditto.
345 (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList): Changed return
346 type to Ref, and pass in a function instead of an enumeration value.
347 (WebCore::SVGSVGElement::getIntersectionList): Updated for above.
348 (WebCore::SVGSVGElement::getEnclosureList): Ditto.
349 (WebCore::SVGSVGElement::checkIntersection): Use && instead of early return
351 (WebCore::SVGSVGElement::checkEnclosure): Ditto.
352 (WebCore::SVGSVGElement::createSVGLength): Use initialization list syntax
354 (WebCore::SVGSVGElement::createSVGAngle): Ditto.
355 (WebCore::SVGSVGElement::createSVGPoint): Ditto.
356 (WebCore::SVGSVGElement::createSVGMatrix): Ditto.
357 (WebCore::SVGSVGElement::createSVGRect): Ditto.
358 (WebCore::SVGSVGElement::createSVGTransform): Removed unneeded explicit
359 constructor invocation.
360 (WebCore::SVGSVGElement::createSVGTransformFromMatrix): Removed unneeded cast.
361 (WebCore::SVGSVGElement::insertedInto): Updated since timeContainer() now
363 (WebCore::SVGSVGElement::setCurrentTime): Use isfinite instead of isnan, so
364 we won't store infinity as the current time.
365 (WebCore::SVGSVGElement::currentViewBoxRect): Renamed locals and changed
366 to use initializer lists for brevity.
367 (WebCore::SVGSVGElement::currentViewportSize): Streamlined code by using
368 initializer lists, using local variables only for things used more than once,
369 and using the / operator defined above.
370 (WebCore::SVGSVGElement::viewBoxToViewTransform): Use the concatenate function
371 in a way that is more straightforward, rather than doing it with a temporary.
372 (WebCore::SVGSVGElement::scrollToAnchor): Renamed this from
374 (WebCore::SVGSVGElement::inheritViewAttributes): Changed this to work with
375 references rather than pointers.
376 (WebCore::SVGSVGElement::getElementById): Use getAllElementsById as the
377 FIXME comment suggested for better efficiency when there are a lot of descendants
378 of the <svg> element at the cost of making it less efficient if there are
379 a lot of elements all with the desired ID, but not inside the <svg> element.
380 (WebCore::SVGSVGElement::isValid): Moved here from the header.
382 * svg/SVGSVGElement.h: Removed unneeded forward declarations. Moved the
383 animated properties to the top of the file, then other DOM, the other
384 public members. Changed return types to references and Ref. Moved
385 function bodies out of the class definition. Made createSVGNumber inline.
387 * svg/SVGViewElement.cpp: Removed unneeded includes.
388 (WebCore::SVGViewElement::isSupportedAttribute): Deleted.
389 (WebCore::SVGViewElement::parseAttribute): Changed to not rely on
390 isSupportedAttribute. Eventually I will do this in all the SVG classes.
392 * svg/SVGViewSpec.cpp: Removed unneeded include of SVGSVGElement.h.
393 (WebCore::SVGViewSpec::parseViewSpec): Updated for change in the name
394 of the parse function in the SVGZoomAndPan class.
396 * svg/SVGZoomAndPan.cpp:
397 (WebCore::SVGZoomAndPan::isKnownAttribute): Deleted.
398 (WebCore::SVGZoomAndPan::addSupportedAttributes): Deleted.
399 (WebCore::SVGZoomAndPan::parse): Renamed from parseZoomAndPan since
400 this is a member of the SVGZoomAndPan class and also has an argument
401 of SVGZoomAndPanType.
402 (WebCore::SVGZoomAndPan::parseAttributeValue): Added. Helper so the
403 template function is not so big. Also write it in a simpler way.
404 (WebCore::SVGZoomAndPan::ref): Deleted.
405 (WebCore::SVGZoomAndPan::deref): Deleted.
406 (WebCore::SVGZoomAndPan::setZoomAndPan): Deleted.
408 * svg/SVGZoomAndPan.h: Removed unneeded includes. Reformatted the enum.
409 Moved function bodies out of the class definition. Removed many unneeded
412 * svg/animation/SVGSMILElement.cpp:
413 (WebCore::SVGSMILElement::insertedInto): Updated since timeContainer
414 now returns a reference rather than a pointer.
416 2015-02-11 Darin Adler <darin@apple.com>
418 SVGUseElement follow-up improvements
419 https://bugs.webkit.org/show_bug.cgi?id=141382
421 Reviewed by Antti Koivisto.
423 * loader/cache/CachedSVGDocumentClient.h: Removed unneeded forward declaration.
425 * page/EventHandler.cpp: Removed unneeded include of SVGUseElement.h.
426 * rendering/svg/RenderSVGViewportContainer.cpp: Ditto.
428 * svg/SVGDocumentExtensions.cpp:
429 (WebCore::SVGDocumentExtensions::clearTargetDependencies): Removed too-specific
430 check that assumed that SVG elements in shadow trees are always for <use> elements.
431 This amounted to an unneeded optimization that could be removed with no bad effect.
433 * svg/SVGElement.cpp:
434 (WebCore::SVGElement::correspondingElement): Removed the assertions so this could
435 be used more freely outside of cases where the shadow tree state is fully consistent.
436 It's fine to have this just be a mechanical getter; there's nothing super-tricky
437 here that needs to be caught by the assertion.
438 (WebCore::SVGElement::title): Removed unneeded special handling for titles inside
441 * svg/SVGGElement.cpp:
442 (WebCore::SVGGElement::create): Added an overload that doesn't require explicitly
443 passing in the tag name.
444 * svg/SVGGElement.h: Ditto.
445 * svg/SVGSVGElement.cpp:
446 (WebCore::SVGSVGElement::create): Ditto.
447 * svg/SVGSVGElement.h: Ditto.
449 * svg/SVGUseElement.cpp: Removed a lot of unneeded includes.
450 (WebCore::SVGUseElement::SVGUseElement): Removed code to initialize some booleans.
451 We do that in the class definition now.
452 (WebCore::SVGUseElement::create): Removed the code that calls the
453 ensureUserAgentShadowRoot function unconditionally. That's properly done when
454 needed; no need to do it here.
455 (WebCore::SVGUseElement::~SVGUseElement): Removed unneeded code to destroy the
456 shadow tree (that happens automatically) and simplified the code to stop loading
457 the external document.
458 (WebCore::SVGUseElement::isSupportedAttribute): Deleted.
459 (WebCore::SVGUseElement::parseAttribute): Simplified this. Removed assumptions
460 about the intersection of various sets of attributes, and also removed the
461 isSupportedAttribute function. This seems to serve no purpose here, or in any
462 other SVG element class. I plan to remove it everywhere over time.
463 (WebCore::isWellFormedDocument): Deleted.
464 (WebCore::SVGUseElement::insertedInto): Simplified code by removing all the
465 special cases during initial parsing, and did the invalidation here rather than
466 deferring it to didNotifySubtreeInsertions. Added a call to the new function,
467 updateExternalDocument, since that won't do anything when the element is not
469 (WebCore::SVGUseElement::didNotifySubtreeInsertions): Deleted.
470 (WebCore::SVGUseElement::removedFrom): Added code to call clearShadowTree and
471 updateExternalDocument. Both are efficient when doing nothing, and both are
472 appropriate since the element is no longer in a document.
473 (WebCore::SVGUseElement::referencedDocument): Deleted. No longer needed.
474 (WebCore::SVGUseElement::externalDocument): Streamlined the logic here, removing
475 multiple unneeded checks.
476 (WebCore::SVGUseElement::transferSizeAttributesToTargetClone): Renamed since
477 "target clone" is clear enough within this class, without explicitly stating
478 "shadow tree". All the clones are in the shadow tree.
479 (WebCore::SVGUseElement::svgAttributeChanged): Removed unneeded code calling
480 isSupportedAttribute. Changed the code that detects changes in href to just
481 call updateExternalDocument (for the document URL) and invalidateShadowTree
482 (for the fragment). Also updated the transferSizeAttributesToTargetClone logic
483 to only trigger on width and height and updated names.
484 (WebCore::SVGUseElement::willAttachRenderers): Updated for the new name of
485 m_shouldRebuildShadowTree and added a call through to the base class.
486 (WebCore::createAllowedElementSet): Added. A more efficient way to implement
487 the initialization of the set for isDisallowedElement.
488 (WebCore::isDisallowedElement): Simplified this by using the function above,
489 and also overloaded for both SVGElement and Element for a tiny efficiency boost.
490 (WebCore::SVGUseElement::clearShadowTree): Renamed form clearResourceReferences.
491 This is a much more straightforward name. Also deleted the code that sets the
492 m_needsShadowTreeRecreation flag to false. That should be done by the build
494 (WebCore::SVGUseElement::buildPendingResource): Made this just invalidate the
495 shadow tree now instead of explicitly building it.
496 (WebCore::SVGUseElement::updateShadowTree): Moved the code to create a shadow
497 tree here from buildPendingResource. ALso changed the logic so that we
498 always blow away the old shadow tree. Moved the comment about rebuilding things
499 every time here. Updated the code to use the findTarget and cloneTarget functions,
500 eliminating the buildShadowTree function entirely. Moved the call to
501 transferSizeAttributesToShadowTreeTargetClone inside cloneTarget. Also updated
502 for the name change for m_shouldRebuildShadowTree.
503 (WebCore::SVGUseElement::targetClone): Renamed from shadowTreeTargetClone.
504 No need to emphasize "shadow tree" since that's where all clones are.
505 (WebCore::isDirectReference): Streamlined a bit using "using namespace".
506 (WebCore::SVGUseElement::toClipPath): Rewrote to use early return and updated
507 for name changes. Also used ASCIILiteral.
508 (WebCore::SVGUseElement::rendererClipChild): Changed local variable names.
509 (WebCore::removeDisallowedElementsFromSubtree): Wrote the iteration in a
510 slightly more idiomatic style.
511 (WebCore::SVGUseElement::findTarget): Added. This new function implements
512 the rule for finding a valid target for a use element. This replaces logic
513 that was duplicated in two different places and it also includes all the
514 rules that were formerly in the isValidTarget function. Also, this implements
515 a correct check for a cycle that handles cases the code in isValidTarget did not.
516 (WebCore::SVGUseElement::isValidTarget): Deleted.
517 (WebCore::SVGUseElement::cloneTarget): Added. Helper function used both when
518 cloning the target of the top level <use> elements and for other <use> elements
519 inside the shadow tree.
520 (WebCore::cloneDataAndChildren): Added. Helper function that allows both the
521 <use> and <symbol> element expanding functions to be shorter and share more code.
522 (WebCore::SVGUseElement::expandUseElementsInShadowTree): Removed unneeded checks
523 of cachedDocumentIsStillLoading. Used the new findTarget function, which handles
524 finding the target cross-document correctly. Removed the incorrect use of
525 referencedDocument when creating new elements and finding targets. Refactored
526 to use the new cloneDataAndChildren function and also moved the code that removes
527 the special attributes here, replacing the transferAttributesToShadowTreeReplacement
528 function. Made a few other simplifications.
529 (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto, just like the
530 <use> changes only simpler.
531 (WebCore::SVGUseElement::transferEventListenersToShadowTree): Made this const.
532 Removed unneeded assertions.
533 (WebCore::SVGUseElement::invalidateShadowTree): Updated for name change.
534 (WebCore::SVGUseElement::invalidateDependentShadowTrees): Removed assertion.
535 (WebCore::SVGUseElement::transferAttributesToShadowTreeReplacement): Deleted.
536 (WebCore::SVGUseElement::selfHasRelativeLengths): Tweaked names.
537 (WebCore::SVGUseElement::notifyFinished): Removed the inDocument check, since
538 this function will only be called for elements that are in a document.
539 (WebCore::SVGUseElement::cachedDocumentIsStillLoading): Deleted.
540 (WebCore::SVGUseElement::finishParsingChildren): Removed the code that calls
541 buildPendingResource here. Shadow tree updating is driven solely by renderer
543 (WebCore::SVGUseElement::updateExternalDocument): Replaced setCachedDocument
544 with this. This function knows how to load a different document if the URL
545 has changed, or leave it alone if not, and also stop the load if it should.
546 (WebCore::SVGUseElement::isValid): Moved this here from the header, since it's
547 always being called virtually.
548 (WebCore::SVGUseElement::haveLoadedRequiredResources): Ditto.
549 (WebCore::SVGUseElement::setHaveFiredLoadEvent): Ditto.
550 (WebCore::SVGUseElement::haveFiredLoadEvent): Ditto.
551 (WebCore::SVGUseElement::svgLoadEventTimer): Ditto.
553 * svg/SVGUseElement.h: Removed unneeded include. Moved the animated properties
554 to the top of the class because they are public DOM API and so are logical to
555 list first. I'd like to do that for other classes too over time. Changed to
556 derive privately from CachedSVGDocumentClient. Made the function
557 invalidateDependentShadowTrees private. Removed didNotifySubtreeInsertions,
558 isSupportedAttribute, clearResourceReferences, buildShadowTree,
559 transferAttributesToShadowTreeReplacement, isParserInserted, and
560 m_wasInsertedByParser. Added updateExternalDocument, cloneTarget, targetClone,
561 updateShadowTree, and clearShadowTree. Also did a couple other renames,
562 including renaming m_cachedDocument to m_externalDocument.
564 * svg/svgtags.in: Removed constructorNeedsCreatedByParser from the <use>
565 element since we don't have to handle constructing by the parser specially.
567 2015-02-11 Dhi Aurrahman <diorahman@rockybars.com>
569 CSS selector JIT compilation support for :lang()
570 https://bugs.webkit.org/show_bug.cgi?id=140818
572 Reviewed by Benjamin Poulain.
574 Add the JIT support for :lang(), to ensure :lang() no longer force the engine to
577 Test: fast/selectors/lang-chained-multiple.html
579 * cssjit/SelectorCompiler.cpp:
580 (WebCore::SelectorCompiler::addPseudoClassType):
581 Get rid of the FunctionType::CannotCompile
582 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
583 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
585 2015-02-11 Alex Christensen <achristensen@webkit.org>
587 Fix more weak external symbol errors.
589 * bindings/scripts/CodeGeneratorJS.pm:
591 * page/make_settings.pl:
592 (printGetterAndSetter):
593 Remove some WEBCORE_EXPORT macros.
595 2015-02-11 Alex Christensen <achristensen@webkit.org>
597 Do not export functions defined in headers.
598 This prevents weak external symbol errors in some configurations.
601 (WebCore::Range::startContainer):
602 (WebCore::Range::startOffset):
603 (WebCore::Range::endContainer):
604 (WebCore::Range::endOffset):
605 * inspector/InspectorController.h:
607 (WebCore::Settings::setMediaKeysStorageDirectory):
608 * page/make_settings.pl:
609 (printGetterAndSetter):
610 * platform/network/cocoa/ProtectionSpaceCocoa.h:
611 (WebCore::ProtectionSpace::encodingRequiresPlatformData):
612 * platform/text/TextEncoding.h:
613 (WebCore::TextEncoding::decode):
614 Removed WEBCORE_EXPORT macros.
616 2015-02-11 Chris Dumez <cdumez@apple.com>
618 [WK2] Add logging to validate the network cache efficacy (Part 2)
619 https://bugs.webkit.org/show_bug.cgi?id=141345
620 <rdar://problem/19632080>
622 Reviewed by Sam Weinig.
624 Add a few more diagnostic logging keys for the network cache efficacy
627 2015-02-11 Sam Weinig <sam@webkit.org>
629 REGRESSION(r179166): Crash when accessing document.dir on a document with no elements
630 <rdar://problem/19804351>
631 https://bugs.webkit.org/show_bug.cgi?id=141480
633 Reviewed by Chris Dumez.
635 Test: fast/dom/document-dir-empty-document-crash.html
637 * html/HTMLDocument.cpp:
638 (WebCore::HTMLDocument::dir):
639 Don't unnecessarily dereference the documentElement. is<HTMLHtmlElement>() will handle null just fine.
641 2015-02-11 Mark Rowe <mrowe@apple.com>
643 <https://webkit.org/b/141492> extract-localizable-strings.pl shouldn't update the target file if the contents haven't changed
645 Avoid updating the target file if the contents haven't changed. This prevents Xcode from copying the identical
646 file into the framework and resigning it, which avoids the resulting relinking of all targets that depend on
649 Reviewed by Dan Bernstein.
651 * extract-localizable-strings.pl: Write our output to a temporary file. If the output differs from the
652 existing contents of the target file, move the temporary file over the target file. Otherwise, delete
655 2015-02-11 Chris Dumez <cdumez@apple.com>
657 Turn recent assertions into release assertions to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
658 https://bugs.webkit.org/show_bug.cgi?id=141484
659 <rdar://problem/13811738>
661 Reviewed by Andy Estes.
663 Turn recent assertions into release assertions to help track down crash in
664 DocumentLoader::stopLoadingForPolicyChange(). This should increase the
665 likelyhood of tripping them so that we better understand why this happens.
667 * loader/DocumentLoader.cpp:
668 (WebCore::DocumentLoader::~DocumentLoader):
669 (WebCore::DocumentLoader::detachFromFrame):
671 2015-02-11 Jer Noble <jer.noble@apple.com>
673 [MSE] SampleMap::addRange() returns an inverted iterator_range, possibly causing a crash when that iterator_range is traversed.
674 https://bugs.webkit.org/show_bug.cgi?id=141479
675 rdar://problem/19067597
677 Reviewed by Chris Dumez.
679 When looking backwards through a presentationOrder map to find samples, we then reverse our iterators
680 and put them in an iterator_range to return to the caller. But in addition to reversing the iterators
681 themselves, we also need to put them in the iterator_range in reverse order, so that when the caller
682 iterates from iterator_range.first -> iterator_range.second, they don't end up off the end of the
683 the underlying storage.
685 * Modules/mediasource/SampleMap.cpp:
686 (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd):
688 2015-02-11 Simon Fraser <simon.fraser@apple.com>
690 Improve the showFrameTree() output slightly
691 https://bugs.webkit.org/show_bug.cgi?id=141482
693 Reviewed by Zalan Bujtas.
695 Have showFrameTree() show the Frame's RenderView so it can be correlated with
696 layer dumps, and show styleRecalc and needsLayout state.
698 * page/FrameTree.cpp:
700 * page/FrameView.cpp:
701 (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): Add an explanatory
702 comment about why we don't walk the Frame tree.
704 2015-02-11 Alex Christensen <achristensen@webkit.org>
706 Stop using WebCore.exp.in on Mac and iOS.
707 https://bugs.webkit.org/show_bug.cgi?id=141413
709 Reviewed by Dan Bates.
711 * Configurations/Base.xcconfig:
712 Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
713 * platform/PlatformExportMacros.h:
714 Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
716 2015-02-11 ChangSeok Oh <changseok.oh@collabora.com>
718 Div having contentEditable and display:flex cannot be edited if it is empty.
719 https://bugs.webkit.org/show_bug.cgi?id=141218
721 Reviewed by Ryosuke Niwa.
723 RenderFlexibleBox should be treated as a candidate for visible position. Visible selection
724 in an editable area is recalculated whenever an inner value of div is changed. If the inner value
725 is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
726 is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox
727 in Position::isCandidate so that a calculated ending VisiblePosition for an editable div
728 having "display : flex" goes weird and VisibleSelection is empty accordingly.
730 Test: fast/events/key-events-in-editable-flexbox.html
733 (WebCore::Position::isCandidate):
735 2015-02-11 ChangSeok Oh <changseok.oh@collabora.com>
737 Activate ReliefLogger of a memory pressure handler for linux system.
738 https://bugs.webkit.org/show_bug.cgi?id=123611
740 Reviewed by Anders Carlsson.
742 Put more logs for the time when a system goes under memory pressure or viceversa.
744 No new tests since no engine behavior changed.
746 * platform/linux/MemoryPressureHandlerLinux.cpp:
747 (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent): Wait a memory pressure event
748 from cgroup in a seperated thread. Once a pressure event happens, respondToMemoryPressure()
749 would be called to get back some resources.
750 (WebCore::MemoryPressureHandler::install): Install memoryPressureHandler module
753 2015-02-11 Alex Christensen <achristensen@webkit.org>
755 Final preparations to switch to WEBCORE_EXPORT.
757 * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
758 Export the vtable and a function.
760 2015-02-11 Sam Weinig <sam@webkit.org>
762 performance.now can crash if accessed from a window that has navigated
763 <rdar://problem/16892506>
764 https://bugs.webkit.org/show_bug.cgi?id=141478
766 Reviewed by Alexey Proskuryakov.
768 Test: fast/performance/performance-now-crash-on-navigated-window.html
770 * page/Performance.cpp:
771 (WebCore::Performance::now):
772 Check for a null frame, which can happen when the window has been navigated.
774 2015-02-10 Alexey Proskuryakov <ap@apple.com>
776 URL::setUser and URL::setPass don't percent encode
777 https://bugs.webkit.org/show_bug.cgi?id=141453
778 rdar://problem/14844503&16551802&19623145
780 Reviewed by Darin Adler.
782 Tests: fast/url/url-credentials-escaping.html
783 http/tests/xmlhttprequest/basic-auth-credentials-escaping.html
785 Start adding some code that performs escaping in a way that matches the URL Standard.
786 Right now, it's only used where we failed to do any escaping at all, and over time,
787 we'll be moving towards a new implementation.
790 (WebCore::URLUtils<T>::username):
791 (WebCore::URLUtils<T>::password):
793 (WebCore::isSchemeFirstChar):
794 (WebCore::URL::user):
795 (WebCore::URL::pass):
796 (WebCore::URL::encodedUser):
797 (WebCore::URL::encodedPass):
798 (WebCore::URL::setUser):
799 (WebCore::URL::setPass):
800 (WebCore::encodeWithURLEscapeSequences):
803 2015-02-11 Alex Christensen <achristensen@webkit.org>
805 Add a few more WEBCORE_EXPORT macros for debug and iOS builds.
807 * page/EventHandler.h:
808 * page/ios/WebEventRegion.h:
809 * platform/sql/SQLiteDatabaseTracker.h:
811 2015-02-11 Darin Adler <darin@apple.com>
813 REGRESSION(r179476): It broke the !ENABLE(PICTURE_SIZES) build
814 https://bugs.webkit.org/show_bug.cgi?id=141327
816 Reviewed by Csaba Osztrogonác.
818 * html/parser/HTMLPreloadScanner.cpp:
819 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
820 Put #if around use of m_sizesAttribute.
822 2015-02-11 Commit Queue <commit-queue@webkit.org>
824 Unreviewed, rolling out r179921.
825 https://bugs.webkit.org/show_bug.cgi?id=141473
827 caused about 30 test failures on yosemite and mavericks
828 (Requested by alexchristensen on #webkit).
832 "Div having contentEditable and display:flex cannot be edited
834 https://bugs.webkit.org/show_bug.cgi?id=141218
835 http://trac.webkit.org/changeset/179921
837 2015-02-11 ChangSeok Oh <changseok.oh@collabora.com>
839 Div having contentEditable and display:flex cannot be edited if it is empty.
840 https://bugs.webkit.org/show_bug.cgi?id=141218
842 Reviewed by Ryosuke Niwa.
844 RenderFlexibleBox should be treated as a candidate for visible position. Visible selection
845 in an editable area is recalculated whenever an inner value of div is changed. If the inner value
846 is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
847 is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox
848 in Position::isCandidate so that a calculated ending VisiblePosition for an editable div
849 having "display : flex" goes weird and VisibleSelection is empty accordingly.
851 Test: fast/events/key-events-in-editable-flexbox.html
854 (WebCore::Position::isCandidate):
856 2015-02-11 Commit Queue <commit-queue@webkit.org>
858 Unreviewed, rolling out r179910.
859 https://bugs.webkit.org/show_bug.cgi?id=141464
861 Caused assertions on debug bots (Requested by ap on #webkit).
865 "[WK2] Add logging to validate the network cache efficacy
867 https://bugs.webkit.org/show_bug.cgi?id=141345
868 http://trac.webkit.org/changeset/179910
870 2015-02-10 Chris Dumez <cdumez@apple.com>
872 Optimize MutableStyleProperties::removePropertiesInSet()
873 https://bugs.webkit.org/show_bug.cgi?id=141460
875 Reviewed by Andreas Kling.
877 Optimize MutableStyleProperties::removePropertiesInSet() by doing an
878 in-place removal of the vector properties, using the new and efficient
879 Vector::removalAllMatching().
881 I see a ~11% speed-up on CSS/CSSPropertySetterGetter.html performance
884 This change was inspired by the following Blink revision:
885 https://src.chromium.org/viewvc/blink?view=rev&revision=189387
887 Test: PerformanceTests/CSS/CSSPropertySetterGetter.html
889 * css/StyleProperties.cpp:
890 (WebCore::MutableStyleProperties::removePropertiesInSet):
892 2015-02-10 Alex Christensen <achristensen@webkit.org>
894 [Win] Fix debug build after r179807.
895 https://bugs.webkit.org/show_bug.cgi?id=141461
897 Reviewed by Benjamin Poulain.
899 * dom/TypedElementDescendantIterator.h:
900 Explicitly call Iterator constructor to reduce complexity when iterating descendantsOfType.
902 2015-02-10 Chris Dumez <cdumez@apple.com>
904 [WK2] Add logging to validate the network cache efficacy (Part 2)
905 https://bugs.webkit.org/show_bug.cgi?id=141345
907 Reviewed by Antti Koivisto.
909 Add a few more diagnostic logging keys for the network cache efficacy
912 2015-02-10 Commit Queue <commit-queue@webkit.org>
914 Unreviewed, rolling out r179896.
915 https://bugs.webkit.org/show_bug.cgi?id=141452
917 broke linking debug builds (Requested by thorton on #webkit).
921 "Stop using WebCore.exp.in on Mac and iOS."
922 https://bugs.webkit.org/show_bug.cgi?id=141413
923 http://trac.webkit.org/changeset/179896
925 2015-02-10 Alex Christensen <achristensen@webkit.org>
927 Fix bindings tests after r179886.
929 * bindings/scripts/test/ObjC/DOMFloat64Array.h:
930 * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
931 * bindings/scripts/test/ObjC/DOMTestCallback.h:
932 * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
933 * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
934 * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
935 * bindings/scripts/test/ObjC/DOMTestException.h:
936 * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
937 * bindings/scripts/test/ObjC/DOMTestInterface.h:
938 * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
939 * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
940 * bindings/scripts/test/ObjC/DOMTestNode.h:
941 * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
942 * bindings/scripts/test/ObjC/DOMTestObj.h:
943 * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
944 * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
945 * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
946 * bindings/scripts/test/ObjC/DOMattribute.h:
947 * bindings/scripts/test/ObjC/DOMreadonly.h:
949 2015-02-10 Alex Christensen <achristensen@webkit.org>
951 Stop using WebCore.exp.in on Mac and iOS.
952 https://bugs.webkit.org/show_bug.cgi?id=141413
954 Reviewed by Dan Bates.
956 * Configurations/Base.xcconfig:
957 Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
958 * platform/PlatformExportMacros.h:
959 Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
961 2015-02-10 Chris Dumez <cdumez@apple.com>
963 Add another assertion to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
964 https://bugs.webkit.org/show_bug.cgi?id=141447
965 <rdar://problem/13811738>
967 Reviewed by Alexey Proskuryakov.
969 Add another assertion to help track down crash in
970 DocumentLoader::stopLoadingForPolicyChange().
972 The trace seems to hint that frameLoader() returns null when
973 stopLoadingForPolicyChange() is called. frameLoader() can only return
974 null after DocumentLoader::detachFromFrame() has been called.
975 Also, stopLoadingForPolicyChange() here is called from the
976 DocumentLoader::continueAfterContentPolicy() policy callback which
977 requires m_waitingForContentPolicy to be true. Therefore, we should
978 assert that m_waitingForContentPolicy is false when m_frame is cleared
979 in DocumentLoader::detachFromFrame().
981 * loader/DocumentLoader.cpp:
982 (WebCore::DocumentLoader::detachFromFrame):
984 2015-02-10 Alex Christensen <achristensen@webkit.org>
986 Stop using WebCore.exp.in on Mac and iOS.
987 https://bugs.webkit.org/show_bug.cgi?id=141413
989 Reviewed by Dan Bates.
991 * Configurations/Base.xcconfig:
992 Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
993 * platform/PlatformExportMacros.h:
994 Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
996 2015-02-10 Alex Christensen <achristensen@webkit.org>
998 Add more WEBCORE_EXPORT macros for iOS.
999 https://bugs.webkit.org/show_bug.cgi?id=141430
1001 Reviewed by Tim Horton.
1003 * bindings/objc/WebScriptObject.h:
1004 * bindings/scripts/CodeGeneratorObjC.pm:
1008 * editing/FrameSelection.h:
1009 * html/HTMLFormControlElement.h:
1010 * html/HTMLMediaSession.h:
1013 * platform/ScrollView.h:
1014 * platform/ios/PasteboardIOS.mm:
1015 * platform/ios/wak/WAKAppKitStubs.h:
1016 * platform/ios/wak/WAKClipView.h:
1017 * platform/ios/wak/WAKScrollView.h:
1018 * platform/ios/wak/WAKView.h:
1019 * platform/ios/wak/WAKWindow.h:
1020 * platform/ios/wak/WAKWindow.mm:
1021 * platform/ios/wak/WKContentObservation.h:
1022 * platform/ios/wak/WKGraphics.h:
1023 * platform/ios/wak/WebCoreThread.h:
1024 * platform/ios/wak/WebCoreThread.mm:
1025 * platform/ios/wak/WebCoreThreadRun.h:
1026 * platform/ios/wak/WebCoreThreadSystemInterface.h:
1027 * platform/network/ios/QuickLook.h:
1028 * platform/text/TextBreakIterator.h:
1030 2015-02-09 David Hyatt <hyatt@apple.com>
1032 text-underline-position: under is broken
1033 https://bugs.webkit.org/show_bug.cgi?id=141400
1034 <rdar://problem/18569583>
1036 Reviewed by Simon Fraser.
1038 Added fast/text/text-underline-position-under.html
1040 * rendering/InlineFlowBox.cpp:
1041 (WebCore::InlineFlowBox::computeMaxLogicalBottom):
1042 (WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
1043 * rendering/InlineFlowBox.h:
1044 Switch to using the bottom to compute the offset. Using the top is incorrect, since
1045 the heights of boxes can vary.
1047 Fix a bug where the y() of the box was being used instead of the logical value, making the result
1048 wrong for vertical text.
1050 * rendering/RootInlineBox.cpp:
1051 (WebCore::RootInlineBox::maxLogicalBottom):
1052 (WebCore::RootInlineBox::maxLogicalTop): Deleted.
1053 Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
1054 since the old code just ignored the root's placement.
1056 * rendering/RootInlineBox.h:
1057 * style/InlineTextBoxStyle.cpp:
1058 (WebCore::computeUnderlineOffset):
1059 Call the bottom function now instead of the top.
1061 2015-02-10 Chris Dumez <cdumez@apple.com>
1063 Add assertion to help track down WebCore::DocumentLoader::stopLoadingForPolicyChange() crash
1064 https://bugs.webkit.org/show_bug.cgi?id=141441
1065 <rdar://problem/13811738>
1067 Reviewed by Alexey Proskuryakov.
1069 Add assertion to help track down a crash in
1070 WebCore::DocumentLoader::stopLoadingForPolicyChange().
1072 * loader/DocumentLoader.cpp:
1073 (WebCore::DocumentLoader::~DocumentLoader):
1074 Make sure the DocumentLoader is not waiting for a content policy
1075 response when it is destroyed. If this were to happen, then the
1076 lambda function passed to PolicyChecker::checkContentPolicy()
1077 would outlive the DocumentLoader. This is an issue because
1078 that lambda function captures [this], which is the DocumentLoader.
1079 This would cause DocumentLoader::continueAfterContentPolicy() to
1080 be called after the DocumentLoader has been destroyed, which would
1083 2015-02-07 Zalan Bujtas <zalan@apple.com>
1085 REGRESSION (r168046): Crash in WebCore::InlineBox::renderer / WebCore::RenderFlowThread::checkLinesConsistency
1086 https://bugs.webkit.org/show_bug.cgi?id=133462
1088 Reviewed by David Hyatt.
1090 RenderFlowThread::m_lineToRegionMap stores pointers to the root inlineboxes in the block flow.
1091 Normally root inlineboxes remove themselves from this map in their dtors. However when collapsing an anonymous block,
1092 we detach the inline tree first and destroy them after. The detached root boxes can't access
1093 the flowthread containing block and we end up with dangling pointers in this map.
1094 Call removeFlowChildInfo() before detaching the subtree to ensure proper pointer removal.
1096 Test: fast/multicol/newmulticol/crash-when-switching-to-floating.html
1098 * rendering/RenderBlock.cpp:
1099 (WebCore::RenderBlock::collapseAnonymousBoxChild):
1101 2015-02-10 Julien Isorce <j.isorce@samsung.com>
1103 Render: properly update body's background image
1104 https://bugs.webkit.org/show_bug.cgi?id=140183
1106 When HTML and BODY renderers are both composited the
1107 skipBodyBackground condition should also take into account
1108 if the HTML's layer can draw its contents.
1110 Reviewed by Darin Adler.
1112 Test: animations/animation-background-image.html
1114 * rendering/RenderBox.cpp:
1115 (WebCore::skipBodyBackground): Do not skip
1116 if document's layer cannot draw its content.
1117 Previously both body and html did not paint the background
1118 when they are both composited.
1120 * rendering/RenderLayerBacking.cpp:
1121 (WebCore::RenderLayerBacking::contentChanged): Also redisplay
1124 2015-02-10 Eric Carlson <eric.carlson@apple.com>
1126 [iOS] don't get out of sync when interrupt/resume calls are not balanced
1127 https://bugs.webkit.org/show_bug.cgi?id=141310
1129 Reviewed by Jer Noble.
1131 No new tests, updated media/video-interruption-with-resume-allowing-play.html.
1133 * platform/audio/MediaSession.cpp:
1134 (WebCore::MediaSession::beginInterruption): Count interruptions.
1135 (WebCore::MediaSession::endInterruption): Ignore calls when m_interruptionCount is already zero.
1136 * platform/audio/MediaSession.h:
1138 2015-02-10 Carlos Garcia Campos <cgarcia@igalia.com>
1140 [GTK] GMutexLocker build issue
1141 https://bugs.webkit.org/show_bug.cgi?id=141381
1143 Reviewed by Žan Doberšek.
1145 Use always WTF::GMutexLocker because newer glib versions have a
1146 GMutexLocker in the public API.
1148 * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
1149 (WebCore::AudioSourceProviderGStreamer::provideInput):
1150 (WebCore::AudioSourceProviderGStreamer::handleAudioBuffer):
1151 (WebCore::AudioSourceProviderGStreamer::clearAdapters):
1152 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1153 (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
1154 (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
1155 (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
1156 (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1157 * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1158 (webkitVideoSinkTimeoutCallback):
1159 (webkitVideoSinkRender):
1160 (unlockSampleMutex):
1161 (webkitVideoSinkUnlockStop):
1162 (webkitVideoSinkStart):
1163 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1164 (webKitWebSrcGetProperty):
1166 (webKitWebSrcStart):
1167 (webKitWebSrcChangeState):
1168 (webKitWebSrcQueryWithParent):
1169 (webKitWebSrcGetUri):
1170 (webKitWebSrcSetUri):
1171 (webKitWebSrcNeedDataMainCb):
1172 (webKitWebSrcNeedDataCb):
1173 (webKitWebSrcEnoughDataMainCb):
1174 (webKitWebSrcEnoughDataCb):
1175 (webKitWebSrcSeekDataCb):
1176 (webKitWebSrcSetMediaPlayer):
1177 (StreamingClient::createReadBuffer):
1178 (StreamingClient::handleResponseReceived):
1179 (StreamingClient::handleDataReceived):
1180 (StreamingClient::handleNotifyFinished):
1181 (ResourceHandleStreamingClient::wasBlocked):
1182 (ResourceHandleStreamingClient::cannotShowURL):
1184 2015-02-09 Alex Christensen <achristensen@webkit.org>
1186 Update WEBCORE_EXPORT to prepare to start using it.
1187 https://bugs.webkit.org/show_bug.cgi?id=141409
1189 Reviewed by Tim Horton.
1191 * bindings/js/JSDOMGlobalObject.h:
1192 * bindings/objc/DOMInternal.h:
1193 * bindings/objc/ExceptionHandlers.mm:
1194 * bindings/objc/WebScriptObjectPrivate.h:
1195 * bindings/scripts/CodeGeneratorJS.pm:
1197 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1198 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1199 * bindings/scripts/test/JS/JSTestEventConstructor.h:
1200 * bindings/scripts/test/JS/JSTestEventTarget.h:
1201 * bindings/scripts/test/JS/JSTestException.h:
1202 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1203 * bindings/scripts/test/JS/JSTestInterface.h:
1204 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1205 * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1206 * bindings/scripts/test/JS/JSTestNondeterministic.h:
1207 * bindings/scripts/test/JS/JSTestObj.h:
1208 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1209 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1210 * bindings/scripts/test/JS/JSTestTypedefs.h:
1211 * bindings/scripts/test/JS/JSattribute.h:
1212 * bindings/scripts/test/JS/JSreadonly.h:
1213 * css/StyleProperties.h:
1214 * dom/DeviceMotionData.h:
1217 * dom/ScriptExecutionContext.h:
1219 * editing/htmlediting.h:
1220 * html/HTMLInputElement.h:
1221 * html/TimeRanges.h:
1222 * loader/FrameLoader.h:
1223 * loader/cache/CacheValidation.h:
1224 * loader/cache/MemoryCache.h:
1225 * loader/icon/IconDatabase.h:
1226 * page/DatabaseProvider.h:
1227 * page/DiagnosticLoggingKeys.h:
1228 * page/EventHandler.h:
1229 * page/FrameSnapshotting.h:
1231 * page/PageConsoleClient.h:
1232 * page/PageOverlay.h:
1233 * platform/CrossThreadCopier.h:
1234 * platform/FileSystem.h:
1235 * platform/PlatformSpeechSynthesizer.h:
1236 * platform/RemoteCommandListener.h:
1237 * platform/RuntimeApplicationChecks.h:
1238 * platform/graphics/Font.h:
1239 * platform/graphics/FontCache.h:
1240 * platform/graphics/FontGlyphs.h:
1241 * platform/graphics/FontRanges.h:
1242 * platform/graphics/GeometryUtilities.h:
1243 * platform/graphics/GlyphPage.h:
1244 * platform/graphics/Region.h:
1245 * platform/graphics/ca/PlatformCALayer.h:
1246 * platform/graphics/ca/TileController.h:
1247 * platform/graphics/transforms/TransformationMatrix.h:
1248 * platform/mac/WebCoreFullScreenWarningView.h:
1249 * platform/network/BlobDataFileReference.h:
1250 * platform/network/ResourceRequestBase.h:
1251 * platform/network/ResourceResponseBase.h:
1252 * platform/network/create-http-header-name-table:
1253 * platform/network/mac/WebCoreURLResponse.h:
1254 * platform/sql/SQLiteDatabaseTracker.h:
1255 * platform/sql/SQLiteStatement.h:
1256 * rendering/HitTestLocation.h:
1257 * rendering/HitTestResult.h:
1258 * storage/StorageEventDispatcher.h:
1259 Added WEBCORE_EXPORT macros.
1261 2015-02-09 Chris Dumez <cdumez@apple.com>
1263 Check for self-assignment in Length::operator=(const Length&)
1264 https://bugs.webkit.org/show_bug.cgi?id=141402
1266 Reviewed by Andreas Kling.
1268 Check for self-assignment in Length::operator=(const Length&) as
1269 calling memcpy() with the same source and destination addresses has
1272 * platform/Length.h:
1273 (WebCore::Length::operator=):
1275 2015-02-09 Roger Fong <roger_fong@apple.com>
1277 WebGL: Update 1.0.2 conformance layout tests and address new failure.
1278 https://bugs.webkit.org/show_bug.cgi?id=141408.
1279 <rdar://problem/19773236>
1281 Reviewed by Dean Jackson.
1283 Tests covered by updated 1.0.2 conformance tests.
1285 * html/canvas/WebGLRenderingContextBase.cpp:
1286 Return null string instead of empty string if parameter validation fails.
1287 (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
1288 (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
1289 (WebCore::WebGLRenderingContextBase::getShaderSource):
1291 2015-02-09 Timothy Horton <timothy_horton@apple.com>
1293 Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
1294 https://bugs.webkit.org/show_bug.cgi?id=141353
1296 Reviewed by Anders Carlsson.
1298 No new tests, because there's no behavior change.
1300 * platform/graphics/DisplayRefreshMonitorManager.cpp:
1301 (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
1302 (WebCore::DisplayRefreshMonitorManager::unregisterClient):
1303 (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
1304 * platform/graphics/DisplayRefreshMonitorManager.h:
1305 Use a Vector of RefPtr<DisplayRefreshMonitor> instead of a HashMap
1306 from uint64_t to RefPtr<DisplayRefreshMonitor>. There's usually only one
1307 display, so there's usually only one DisplayRefreshMonitor. Linear search
1308 on the Vector will be faster than the hash lookup in all conceivable cases.
1309 This also avoids the situation mentioned in the comments in DisplayRefreshMonitorManager.h
1310 where we don't know enough about PlatformDisplayID to safely hash it.
1312 2015-02-09 Jer Noble <jer.noble@apple.com>
1314 [Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
1315 https://bugs.webkit.org/show_bug.cgi?id=141399
1317 Reviewed by Eric Carlson.
1319 Apparenty -[AVPlayer rate] means different things for HLS and progressive content; for progressive,
1320 the -rate is the actual rate of playback. For HLS, the -rate is the requested rate, and will return
1321 the requested value even if time is not progressing.
1323 We added the currentTime estimation engine because asking AVFoundation for its -currentTime used to
1324 be expensive, but we've been assured that in recent iOS and OS X releases, -currentTime should be
1325 very fast. That, in combination with the HLS behavior of -rate and how it breaks the currentTime
1326 estimation, means we should probably turn it off for iOS and Yosemite.
1328 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1329 (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Move implementation to .mm.
1330 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1331 (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Disable on iOS and >=10.10.
1333 2015-02-07 Roger Fong <roger_fong@apple.com>
1335 WebGL 2: Texture call format, internal format, and type validation.
1336 https://bugs.webkit.org/show_bug.cgi?id=141318.
1337 <rdar://problem/19733828>
1339 Reviewed by Brent Fulgham.
1341 Tests will be covered by WebGL2 conformance tests.
1343 * html/canvas/WebGL2RenderingContext.cpp:
1344 (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Add missing ExceptionCode argument.
1345 (WebCore::WebGL2RenderingContext::copyTexImage2D): Validate texture formats based on GLES3 spec.
1346 (WebCore::WebGL2RenderingContext::texSubImage2DBase): Validate using internal format from texture target.
1347 (WebCore::WebGL2RenderingContext::texSubImage2DImpl): Validate using internal format from texture target.
1348 (WebCore::WebGL2RenderingContext::texSubImage2D): Validate using internal format from texture target.
1349 (WebCore::WebGL2RenderingContext::validateTexFuncParameters): Do extra validation for copyTexImage2D.
1350 (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Validate internal format, format and type combination.
1351 (WebCore::WebGL2RenderingContext::validateTexFuncData): Validate new data types.
1352 This method now accepts an internal format argument.
1353 (WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
1354 Helper method to convert internal format to base internal format.
1355 * html/canvas/WebGL2RenderingContext.h:
1357 * html/canvas/WebGLRenderingContext.cpp:
1358 (WebCore::WebGLRenderingContext::copyTexImage2D): Moved from WebGLRenderingContextBase.
1359 (WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto.
1360 (WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto.
1361 (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
1362 (WebCore::WebGLRenderingContext::validateTexFuncParameters): Ditto.
1363 (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): Ditto.
1364 (WebCore::WebGLRenderingContext::validateTexFuncData): Ditto.
1365 * html/canvas/WebGLRenderingContext.h:
1367 * html/canvas/WebGLRenderingContextBase.cpp:
1368 (WebCore::WebGLRenderingContextBase::texImage2DBase):
1369 (WebCore::WebGLRenderingContextBase::validateTexFunc):
1370 (WebCore::WebGLRenderingContextBase::texImage2D):
1371 (WebCore::WebGLRenderingContextBase::copyTexImage2D): Deleted.
1372 (WebCore::WebGLRenderingContextBase::texSubImage2DBase): Deleted.
1373 (WebCore::WebGLRenderingContextBase::texSubImage2DImpl): Deleted.
1374 (WebCore::WebGLRenderingContextBase::texSubImage2D): Deleted.
1375 (WebCore::WebGLRenderingContextBase::validateTexFuncFormatAndType): Deleted.
1376 (WebCore::WebGLRenderingContextBase::validateTexFuncParameters): Deleted.
1377 (WebCore::WebGLRenderingContextBase::validateTexFuncData): Deleted.
1378 * html/canvas/WebGLRenderingContextBase.h: Modify validation type enums to differentiate between CopyImage, TexImage and TexSubImage calls.
1379 (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder): Moved from WebGLRenderingContextBase.
1380 (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Ditto.
1381 (WebCore::clip1D): Ditto.
1382 (WebCore::clip2D): Ditto.
1383 * platform/graphics/GraphicsContext3D.h: Rename a typo'ed enum.
1385 2015-02-09 Commit Queue <commit-queue@webkit.org>
1387 Unreviewed, rolling out r179494.
1388 https://bugs.webkit.org/show_bug.cgi?id=141395
1390 Caused slowdown in a WebKit client test scenario (Requested by
1395 "[Cocoa] Make decoded image data purgeable ASAP."
1396 https://bugs.webkit.org/show_bug.cgi?id=140298
1397 http://trac.webkit.org/changeset/179494
1399 2015-02-09 Jer Noble <jer.noble@apple.com>
1401 [WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.
1402 https://bugs.webkit.org/show_bug.cgi?id=140955
1404 Reviewed by Eric Carlson.
1406 Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html
1407 webaudio/audiobuffersource-negative-playbackrate.html
1409 Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of
1410 start() to set the initial playback position at the end of the play range if the rate of playback
1413 * Modules/webaudio/AudioBufferSourceNode.cpp:
1414 (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32].
1415 (WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max"
1416 for clarity. Add a non-interpolated and interpolated render step for negative playback.
1417 (WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02.
1418 (WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback.
1419 (WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative.
1421 2015-02-09 Darin Adler <darin@apple.com>
1423 Try to fix build on platforms that use SVG "all in one" file (Windows).
1425 * svg/SVGAElement.cpp: Don't do "using namespace HTMLNames;" outside of
1426 function boundaries, because that will be inherited by other files.
1427 (WebCore::SVGAElement::isURLAttribute): Use XLinkNames directly here
1428 instead of using HTMLNames implicitly.
1430 * svg/SVGElement.cpp: Don't do "using namespace HTMLNames;" outside of
1431 function boundaries, because that will be inherited by other files.
1432 (WebCore::populateAttributeNameToCSSPropertyIDMap): Instead do it in here.
1433 (WebCore::populateAttributeNameToAnimatedPropertyTypeMap): And here.
1434 (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): And here.
1435 (WebCore::SVGElement::parseAttribute): And use HTMLNames directly here
1436 instead of implicitly.
1438 2015-02-09 Eric Carlson <eric.carlson@apple.com>
1440 [iOS] exit from fullscreen when player view controller calls delegate
1441 https://bugs.webkit.org/show_bug.cgi?id=141350
1443 Reviewed by Jer Noble.
1445 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1446 (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): New, ask delegate
1447 to exit from fullscreen.
1449 2015-02-06 Sergio Villar Senin <svillar@igalia.com>
1451 ASSERTION FAILED: resolvedInitialPosition <= resolvedFinalPosition in WebCore::GridSpan::GridSpan
1452 https://bugs.webkit.org/show_bug.cgi?id=141328
1454 Reviewed by Darin Adler.
1457 GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition()
1458 was trying to place an item with span, it was completely ignoring
1459 the resolvedInitialPosition returned by
1460 GridResolvedPosition::resolveGridPositionAgainstOppositePosition()
1461 and only using the finalResolvedPosition. This works with an
1462 unlimited grid which can indefinitely grow. But if the item spans
1463 over the grid track limits, then it might happen that the final
1464 resolved position is placed before the initial resolved position,
1465 something that is forbidden.
1467 The solution is to directly use the GridSpan returned by
1468 GridResolvedPosition::resolveGridPositionAgainstOppositePosition(), if the item
1469 does not surpass the track limits then the returned initialResolvedPosition
1470 is identical to the provided one, otherwise it's properly corrected to respect
1473 * rendering/style/GridResolvedPosition.cpp:
1474 (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
1476 2015-01-22 Sergio Villar Senin <svillar@igalia.com>
1478 [CSS Grid Layout] Tracks' growth limits must be >= base sizes
1479 https://bugs.webkit.org/show_bug.cgi?id=140540
1481 Reviewed by Antti Koivisto.
1483 The track sizing algorithm is supposed to avoid those situations
1484 but they easily (specially when we mix absolute lengths and
1485 intrinsic lengths in min and max track sizing functions) and
1486 frequently appear. In those cases the outcome from the algorithm
1487 is wrong, tracks are not correctly sized.
1489 In order to fulfill the restriction, m_usedBreadth and
1490 m_maxBreadth are now private members of GridTrack and the class
1491 now provides a couple of methods to modify them respecting the
1492 growthLimit >= baseSize precondition.
1494 Apart from that, the members and methods of GridTrack were also
1495 renamed to match the ones used in the recent algorithm rewrite:
1496 usedBreadth became baseSize and maxBreadth is now growthLimit.
1498 Although the algorithm was not modified at all, this change
1499 detected and fixed several invalid results (tracks and/or grids
1500 bigger than expected).
1502 * rendering/RenderGrid.cpp:
1503 (WebCore::GridTrack::GridTrack): Renamed fields and methods. Added
1505 (WebCore::GridTrack::baseSize): Renamed from usedBreadth.
1506 (WebCore::GridTrack::growthLimit): Renamed from maxBreadth.
1507 (WebCore::GridTrack::setBaseSize):
1508 (WebCore::GridTrack::setGrowthLimit):
1509 (WebCore::GridTrack::growBaseSize): Renamed from growUsedBreadth.
1510 (WebCore::GridTrack::growGrowthLimit): Renamed from growMaxBreadth.
1511 (WebCore::GridTrack::growthLimitIsInfinite): New helper method.
1512 (WebCore::GridTrack::growthLimitIfNotInfinite): Renamed from
1513 maxBreadthIfNotInfinite.
1514 (WebCore::GridTrack::isGrowthLimitBiggerThanBaseSize): New helper
1515 method to verify ASSERTs are true.
1516 (WebCore::GridTrack::ensureGrowthLimitIsBiggerThanBaseSize): Ditto.
1517 (WebCore::GridTrackForNormalization::GridTrackForNormalization):
1518 (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1519 (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1520 (WebCore::RenderGrid::computeNormalizedFractionBreadth):
1521 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1522 (WebCore::sortByGridTrackGrowthPotential):
1523 (WebCore::RenderGrid::distributeSpaceToTracks):
1524 (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
1525 (WebCore::RenderGrid::layoutGridItems):
1526 (WebCore::RenderGrid::gridAreaBreadthForChild):
1527 (WebCore::RenderGrid::populateGridPositions):
1528 (WebCore::GridTrack::growUsedBreadth): Renamed to growBaseSize.
1529 (WebCore::GridTrack::usedBreadth): Renamed to baseSize.
1530 (WebCore::GridTrack::growMaxBreadth): Renamed to growGrowthLimit.
1531 (WebCore::GridTrack::maxBreadthIfNotInfinite): Renamed to
1532 growthLimitIfNotInfinite.
1533 * rendering/RenderGrid.h:
1535 2015-02-08 Chris Fleizach <cfleizach@apple.com>
1537 AX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus or blur events
1538 https://bugs.webkit.org/show_bug.cgi?id=140485
1540 Reviewed by Anders Carlsson.
1542 If setting an accessibility attribute results in a modal alert being displayed, it can cause VoiceOver
1543 to hang. A simple solution is perform the actual work after a short delay, which will ensure the call
1544 returns without hanging.
1546 Test: platform/mac/accessibility/setting-attributes-is-asynchronous.html
1548 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1549 (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1550 (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1552 2015-02-08 Benjamin Poulain <benjamin@webkit.org>
1554 Add parsing support for CSS Selector L4's case-insensitive attribute
1555 https://bugs.webkit.org/show_bug.cgi?id=141373
1557 Reviewed by Darin Adler.
1559 This patch adds parsing for the case-insensitive attribute value
1560 matching of CSS Selectors Level 4: http://dev.w3.org/csswg/selectors-4/#attribute-case
1561 Excuse of a grammar: http://dev.w3.org/csswg/selectors-4/#grammar
1563 This patch also covers serialization for CSSOM. The serialization
1564 is defined here: http://dev.w3.org/csswg/cssom/#serializing-selectors
1566 Matching is completely ignored in this patch. All the simple selectors
1567 are treated as regular attribute selectors.
1569 Tests: fast/css/parsing-css-attribute-case-insensitive-value-1.html
1570 fast/css/parsing-css-attribute-case-insensitive-value-2.html
1571 fast/css/parsing-css-attribute-case-insensitive-value-3.html
1572 fast/css/parsing-css-attribute-case-insensitive-value-4.html
1574 * css/CSSGrammar.y.in:
1575 * css/CSSParserValues.h:
1576 (WebCore::CSSParserSelector::setAttributeValueMatchingIsCaseInsensitive):
1577 * css/CSSSelector.cpp:
1578 (WebCore::CSSSelector::CSSSelector):
1579 (WebCore::CSSSelector::selectorText):
1580 * css/CSSSelector.h:
1581 (WebCore::CSSSelector::CSSSelector):
1582 (WebCore::CSSSelector::setAttributeValueMatchingIsCaseInsensitive):
1583 (WebCore::CSSSelector::attributeValueMatchingIsCaseInsensitive):
1585 2015-02-08 Darin Adler <darin@apple.com>
1587 Fix CMake-based build.
1589 * CMakeLists.txt: Added a dependency on the CMakeLists.txt itself, analogous
1590 to the one I added in DerivedSources.make.
1592 2015-02-08 Darin Adler <darin@apple.com>
1596 * bindings/js/JSEventListener.h: Removed a call to forwardEventListeners.
1598 2015-02-08 Darin Adler <darin@apple.com>
1600 Remove the SVG instance tree
1601 https://bugs.webkit.org/show_bug.cgi?id=140602
1603 Reviewed by Dean Jackson.
1605 * CMakeLists.txt: Removed SVGElementInstance source files.
1606 * DerivedSources.cpp: Ditto.
1607 * DerivedSources.make: Ditto.
1608 * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1609 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1610 * WebCore.xcodeproj/project.pbxproj: Ditto.
1611 * bindings/js/JSBindingsAllInOne.cpp: Ditto.
1613 * bindings/js/JSEventListener.cpp:
1614 (WebCore::forwardsEventListeners): Deleted. Only returned true for JSSVGElementInstance.
1615 (WebCore::correspondingElementWrapper): Deleted. Only used for JSSVGElementInstance.
1616 (WebCore::createJSEventListenerForAttribute): Deleted. Argument type was JSSVGElementInstance.
1617 (WebCore::createJSEventListenerForAdd): Removed most of the code; later we can delete this entirely.
1619 * bindings/js/JSEventListener.h: Removed the overload of createJSEventListenerForAttribute
1620 that takes a JSSVGElementInstance.
1622 * bindings/js/JSSVGElementInstanceCustom.cpp: Removed.
1624 * dom/ContainerNodeAlgorithms.h: Updated comment to reflect the fact that
1625 this code is really now only used for ContainerNode and no longer needs to
1626 exist in a generic form.
1628 * dom/EventTarget.h: Removed forward declaration of SVGElementInstance.
1629 * svg/SVGElement.h: Ditto.
1631 * dom/EventTargetFactory.in: Removed SVGElementInstance.
1633 * svg/SVGElementInstance.cpp: Removed.
1634 * svg/SVGElementInstance.h: Removed.
1635 * svg/SVGElementInstance.idl: Removed.
1637 * svg/SVGUseElement.cpp:
1638 (WebCore::SVGUseElement::insertedInto): Removed obsolete comment.
1639 (WebCore::SVGUseElement::instanceTreeIsLoading): Deleted. Unused
1640 function that I forgot to delete in my last patch. It also had a
1641 glaring mistake, a missing "return" before the recursive call to
1642 itself that would cause it to return false when it should return true.
1644 * svg/SVGUseElement.h: Removed instanceTreeIsLoading.
1646 * dom/EventDispatcher.cpp: Removed include of SVGElementInstance.h.
1647 * page/EventHandler.cpp: Ditto.
1648 * rendering/svg/RenderSVGViewportContainer.cpp: Ditto.
1649 * svg/SVGAElement.cpp: Ditto.
1650 * svg/SVGAllInOne.cpp: Ditto.
1651 * svg/SVGAnimateMotionElement.cpp: Ditto.
1652 * svg/SVGAnimatedTypeAnimator.h: Ditto.
1653 * svg/SVGAnimationElement.cpp: Ditto.
1654 * svg/SVGCircleElement.cpp: Ditto.
1655 * svg/SVGClipPathElement.cpp: Ditto.
1656 * svg/SVGComponentTransferFunctionElement.cpp: Ditto.
1657 * svg/SVGCursorElement.cpp: Ditto.
1658 * svg/SVGElement.cpp: Ditto.
1659 * svg/SVGEllipseElement.cpp: Ditto.
1660 * svg/SVGFEBlendElement.cpp: Ditto.
1661 * svg/SVGFEColorMatrixElement.cpp: Ditto.
1662 * svg/SVGFECompositeElement.cpp: Ditto.
1663 * svg/SVGFEConvolveMatrixElement.cpp: Ditto.
1664 * svg/SVGFEDiffuseLightingElement.cpp: Ditto.
1665 * svg/SVGFEDisplacementMapElement.cpp: Ditto.
1666 * svg/SVGFEDropShadowElement.cpp: Ditto.
1667 * svg/SVGFEGaussianBlurElement.cpp: Ditto.
1668 * svg/SVGFEImageElement.cpp: Ditto.
1669 * svg/SVGFELightElement.cpp: Ditto.
1670 * svg/SVGFEMergeNodeElement.cpp: Ditto.
1671 * svg/SVGFEMorphologyElement.cpp: Ditto.
1672 * svg/SVGFEOffsetElement.cpp: Ditto.
1673 * svg/SVGFESpecularLightingElement.cpp: Ditto.
1674 * svg/SVGFETileElement.cpp: Ditto.
1675 * svg/SVGFETurbulenceElement.cpp: Ditto.
1676 * svg/SVGFilterElement.cpp: Ditto.
1677 * svg/SVGFilterPrimitiveStandardAttributes.cpp: Ditto.
1678 * svg/SVGForeignObjectElement.cpp: Ditto.
1679 * svg/SVGGElement.cpp: Ditto.
1680 * svg/SVGGradientElement.cpp: Ditto.
1681 * svg/SVGGraphicsElement.cpp: Ditto.
1682 * svg/SVGImageElement.cpp: Ditto.
1683 * svg/SVGLineElement.cpp: Ditto.
1684 * svg/SVGLinearGradientElement.cpp: Ditto.
1685 * svg/SVGMarkerElement.cpp: Ditto.
1686 * svg/SVGMaskElement.cpp: Ditto.
1687 * svg/SVGPathElement.cpp: Ditto.
1688 * svg/SVGPatternElement.cpp: Ditto.
1689 * svg/SVGPolyElement.cpp: Ditto.
1690 * svg/SVGRadialGradientElement.cpp: Ditto.
1691 * svg/SVGRectElement.cpp: Ditto.
1692 * svg/SVGSVGElement.cpp: Ditto.
1693 * svg/SVGScriptElement.cpp: Ditto.
1694 * svg/SVGStopElement.cpp: Ditto.
1695 * svg/SVGSymbolElement.cpp: Ditto.
1696 * svg/SVGTRefElement.cpp: Ditto.
1697 * svg/SVGTextContentElement.cpp: Ditto.
1698 * svg/SVGTextElement.cpp: Ditto.
1699 * svg/SVGTextPathElement.cpp: Ditto.
1700 * svg/SVGTextPositioningElement.cpp: Ditto.
1702 2015-02-07 Dean Jackson <dino@apple.com>
1704 Tweak inline playback controls to match system spec
1705 https://bugs.webkit.org/show_bug.cgi?id=141375
1706 <rdar://problem/19760754>
1708 Reviewed by Sam Weinig.
1710 Rework the UI of the inline media controls on iOS, to
1711 better match the system specification. I've batched a
1712 few changes into one patch because many of them are
1713 inter-dependent, and not very aggressive. Changes are:
1715 - updated artwork for the buttons.
1716 - separate artwork for normal and active states.
1717 - background images are now explicitly sized and positioned
1718 in the middle of the element, allowing audio and video
1719 to use the same glyphs even though the elements are
1721 - use plus-darker blend mode on the button glyphs.
1722 - rearranged some of the rules to group things in a
1724 - time should front-pad a "0" character, if less than 10.
1725 - no need for an "active" class on the Airplay button (although
1726 I won't be surprised if this changes back).
1728 * Modules/mediacontrols/mediaControlsiOS.css:
1729 (::-webkit-media-controls):
1730 (video::-webkit-media-controls-wireless-playback-picker-button.active): Deleted.
1731 (audio::-webkit-media-controls-wireless-playback-picker-button.active): Deleted.
1732 (audio::-webkit-media-controls-play-button:active): Deleted.
1733 (audio::-webkit-media-controls-play-button.paused): Deleted.
1734 (video::-webkit-media-controls-timeline): Deleted.
1735 * Modules/mediacontrols/mediaControlsiOS.js:
1736 (ControllerIOS.prototype.updateWirelessPlaybackStatus): No need
1737 for the "active" class.
1738 (ControllerIOS.prototype.formatTime): Pad with a leading zero.
1740 2015-02-08 Darin Adler <darin@apple.com>
1742 Make SVGUseElement work without creating any SVGElementInstance objects
1743 https://bugs.webkit.org/show_bug.cgi?id=141374
1745 Reviewed by Sam Weinig.
1747 * dom/ElementIterator.h: Changed the * and -> operators to be const.
1748 There is no need for the iterator itself to be modified just to dereference it.
1750 * dom/TypedElementDescendantIterator.h: Added DoubleTypedElementDescendantIterator.
1751 This allows callers to call descendantsOfType on two elements, as long as the caller
1752 can guarantee that both have the same number of descendants of that type. It's handy
1753 for walking a tree of cloned elements to set up something between each original and
1754 its clone. In the future we might instead change the cloning machinery so it can do
1755 this work as we clone, and if so, we could consider deleting this.
1757 * svg/SVGElement.cpp:
1758 (WebCore::SVGElement::correspondingElement): Made this const.
1759 (WebCore::SVGElement::invalidateInstances): Got rid of the rule that said "this can
1760 only be done for an element in a document", since it's useful to do this on an element
1761 that has just been removed from a document. Removed the "updateStyleIfNeeded" call
1762 here now that the other changes make it no longer needed. Removed an unimportant
1763 assertion that we only invalidate use elements that are in a document; that's not
1764 a necessary restriction. Streamlined the logic a bit.
1766 * svg/SVGElement.h: Made correspondingElement const.
1768 * svg/SVGUseElement.cpp:
1769 (WebCore::SVGUseElement::insertedInto): Removed an assertion about
1770 m_targetElementInstance since that's gone now.
1771 (WebCore::SVGUseElement::svgAttributeChanged): Changed code that transfers
1772 size attributes to the shadow tree to use shadowTreeTargetClone instead of
1773 m_targetElementInstance.
1774 (WebCore::SVGUseElement::clearResourceReferences): Removed code to detach
1775 m_targetElementInstance, and also the call to removeAllTargetReferencesForElement,
1776 because we no longer use those.
1777 (WebCore::SVGUseElement::buildPendingResource): Moved the code to build the
1778 shadow tree in here and deleted the buildShadowAndInstanceTree function.
1779 Also changed logic so that we use a pending resource any time the target is not
1780 a valid one. That helps us correctly handle cases where we initially have an
1781 invalid target, but later get a value one
1782 (WebCore::SVGUseElement::buildShadowAndInstanceTree): Deleted. The code here
1783 was greatly simplified and moved into buildPendingResource.
1784 (WebCore::SVGUseElement::buildInstanceTree): Deleted.
1785 (WebCore::SVGUseElement::hasCycleUseReferencing): Deleted. Cycles are now
1786 detected by the new isValidTarget function and so there's no need for a
1787 separate explicit check for a cycle.
1788 (WebCore::associateClonesWithOriginals): Added. Helper that makes
1789 functions that build the shadow tree simpler and easier to read.
1790 (WebCore::associateReplacementCloneWithOriginal): Added. Helper to
1791 make associateReplacementClonesWithOriginals simple.
1792 (WebCore::associateReplacementClonesWithOriginals): Added. Helper that
1793 makes functions that build the shadow tree simpler and easier to read.
1794 (WebCore::SVGUseElement::buildShadowTree): Call associateClonesWithOriginals
1795 since associateInstancesWithShadowTreeElements no longer does this.
1796 (WebCore::SVGUseElement::isValidTarget): Added. Covers all the different
1797 reasons a target might not be valid: type of element, reference cycles, and
1798 also "not in document" (refactored in here; not sure when that can happen
1799 in practice, might be possible to remove it later).
1800 (WebCore::SVGUseElement::expandUseElementsInShadowTree): Add checks for
1801 documents that are still loading; this used to be checked when building the
1802 instance tree. Added calls to associateReplacementClonesWithOriginals and
1803 associateClonesWithOriginals; that used to be done by later in the
1804 associateInstancesWithShadowTreeElements function. Use isValidTarget so
1805 we handle cycles as well as invalid target types.
1806 (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Added a call to
1807 associateReplacementClonesWithOriginals, since we can no longer do that in
1808 associateInstancesWithShadowTreeElements.
1809 (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): Deleted.
1810 (WebCore::SVGUseElement::instanceForShadowTreeElement): Deleted.
1811 (WebCore::SVGUseElement::invalidateDependentShadowTrees): Removed a comment
1812 that simply restated the name of the function.
1814 * svg/SVGUseElement.h: Removed instanceForShadowTreeElement,
1815 buildShadowAndInstanceTree, detachInstance, buildInstanceTree,
1816 hasCycleUseReferencing, associateInstancesWithShadowTreeElements,
1817 instanceForShadowTreeElement, and m_targetElementInstance. Added isValidTarget.
1819 2015-02-08 Chris Dumez <cdumez@apple.com>
1821 [WK2] Add logging to validate the network cache efficacy (Part 1)
1822 https://bugs.webkit.org/show_bug.cgi?id=141269
1823 <rdar://problem/19632080>
1825 Reviewed by Antti Koivisto.
1827 Export an extra symbol.
1831 2015-02-07 Chris Fleizach <cfleizach@apple.com>
1833 AX: The input element with type="search" has no default focus outline
1834 https://bugs.webkit.org/show_bug.cgi?id=140326
1836 Reviewed by Darin Adler.
1838 The platform RenderTheme takes care of the search field, and that code
1839 was missing a check for whether the element was focused.
1841 Test: fast/css/focus-ring-exists-for-search-field.html
1843 * rendering/RenderThemeMac.mm:
1844 (WebCore::RenderThemeMac::paintSearchField):
1846 2015-02-07 Tim Horton <timothy_horton@apple.com>
1848 Add some dictionary lookup tests
1849 https://bugs.webkit.org/show_bug.cgi?id=141355
1851 Reviewed by Darin Adler.
1853 Tests: platform/mac/editing/dictionary-lookup/dictionary-lookup-input.html
1854 platform/mac/editing/dictionary-lookup/dictionary-lookup-inside-selection.html
1855 platform/mac/editing/dictionary-lookup/dictionary-lookup-outside-selection.html
1856 platform/mac/editing/dictionary-lookup/dictionary-lookup-rtl.html
1857 platform/mac/editing/dictionary-lookup/dictionary-lookup.html
1860 Remove an unneeded export.
1862 * editing/mac/DictionaryLookup.h:
1863 Use OBJC_CLASS instead of @class so that this can be included in pure-C++ files.
1865 * testing/Internals.cpp:
1866 (WebCore::Internals::rangeForDictionaryLookupAtLocation):
1867 * testing/Internals.h:
1868 * testing/Internals.idl:
1869 Expose rangeForDictionaryLookupAtHitTestResult fairly directly to JavaScript.
1871 2015-02-07 Chris Dumez <cdumez@apple.com>
1873 Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
1874 https://bugs.webkit.org/show_bug.cgi?id=141321
1876 Reviewed by Darin Adler.
1878 Use new Vector::removeFirstMatching() / removeAllMatching() methods.
1880 2015-02-07 Darin Adler <darin@apple.com>
1882 Stop dispatching events to with SVGElementInstance objects as their targets
1883 https://bugs.webkit.org/show_bug.cgi?id=141108
1885 Reviewed by Anders Carlsson.
1887 Test: svg/custom/use-event-retargeting.html
1889 * dom/EventDispatcher.cpp:
1890 (WebCore::eventTargetRespectingTargetRules): Replaced the code that retargeted
1891 events at SVGElementInstance objects with code that retargets them at the use
1892 element instead. Also wrote the code in a simpler way.
1894 2015-02-07 Jer Noble <jer.noble@apple.com>
1896 [Mac] Set -contentsScale on AVPlayerLayer to allow AVPlayer to select the appropriate HLS variant.
1897 https://bugs.webkit.org/show_bug.cgi?id=141354
1898 rdar://problem/19717591
1900 Reviewed by Darin Adler.
1902 AVPlayer will try to determine the correct HLS variant based on the bounds of an AVPlayerLayer.
1903 When not in a layer tree, AVFoundation is not able to determine the correct mapping from logical
1904 units to pixel values. To provide AVPlayer with that scaling value, set -contentsScale based on
1905 both the current device scale and the current page scale.
1907 Since this needs to be set at initialization time, before the AVPlayer is has any AVPlayerItems,
1908 add some plumbing up from MediaPlayer to as the HTMLMediaElement for the appropriate contents
1911 * html/HTMLMediaElement.cpp:
1912 (WebCore::HTMLMediaElement::mediaPlayerContentsScale):
1913 * html/HTMLMediaElement.h:
1914 * platform/graphics/MediaPlayer.h:
1915 (WebCore::MediaPlayerClient::mediaPlayerContentsScale):
1916 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1917 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1918 * platform/graphics/ca/GraphicsLayerCA.cpp:
1919 (WebCore::GraphicsLayerCA::updateContentsScale):
1921 2015-02-07 Alexey Proskuryakov <ap@apple.com>
1923 ASan complains about plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
1924 https://bugs.webkit.org/show_bug.cgi?id=141352
1925 rdar://problem/19717490
1927 Reviewed by Anders Carlsson.
1929 * dom/Document.cpp: (WebCore::Document::ensurePlugInsInjectedScript): This string
1930 is not null terminated.
1932 2015-02-06 Zalan Bujtas <zalan@apple.com>
1934 ASSERT repaintContainer->hasLayer() in WebCore::RenderObject::repaintUsingContainer
1935 https://bugs.webkit.org/show_bug.cgi?id=140750
1937 Reviewed by Simon Fraser.
1939 There's a short period of time when RenderObject::layer() still returns a valid pointer
1940 even though we already cleared the hasLayer() flag.
1941 Do not use the layer as repaint container in such cases.
1943 Test: compositing/repaint-container-assertion-when-toggling-compositing.html
1945 * rendering/RenderObject.cpp:
1946 (WebCore::RenderObject::enclosingLayer):
1948 2015-02-06 Chris Dumez <cdumez@apple.com>
1950 Have SQLiteStatement::database() return a reference
1951 https://bugs.webkit.org/show_bug.cgi?id=141348
1953 Reviewed by Andreas Kling.
1955 Have SQLiteStatement::database() return a reference as it can never
1958 * loader/icon/IconDatabase.cpp:
1959 (WebCore::readySQLiteStatement):
1960 * platform/sql/SQLiteStatement.h:
1961 (WebCore::SQLiteStatement::database):
1963 2015-02-06 Brent Fulgham <bfulgham@apple.com>
1965 Add youtube-nocookie URL to isYouTubeURL predicate
1966 https://bugs.webkit.org/show_bug.cgi?id=141347
1967 <rdar://problem/19430657>
1969 Reviewed by Eric Carlson.
1971 * Modules/plugins/YouTubePluginReplacement.cpp:
1972 (WebCore::isYouTubeURL): Update for additional youtube-nocookie site.
1974 2015-02-06 Said Abou-Hallawa <sabouhallawa@apple.com>
1976 Invalid cast in WebCore::SVGAnimateElement::calculateAnimatedValue.
1977 https://bugs.webkit.org/show_bug.cgi?id=135171.
1979 Reviewed by Dean Jackson.
1981 The bug happens when an SVG element is animated by <animateMotion> followed by an
1982 <animateColor> or an <animate> and the values of the "attributeName" in both elements
1983 are the same. The problem is <animateMotion> should not have an attribute to animate.
1984 If it does by fuzz or by mistake, then we assume the <animateMotion> and the <animate>
1985 animate the same attribute for the same element target. Therefore we schedule them in
1986 the same AnimationVector in SMILTimeContainer::schedule(). When we call
1987 SVGAnimateElementBase::calculateAnimatedValue() for an SVGAnimateColorElement and the
1988 resultElement is SVGAnimateMotionElement, we fail to cast it to SVGAnimateElementBase
1989 because SVGAnimateMotionElement is derived from SVGAnimationElement which is the base
1990 class of all animate elements including SVGAnimateElementBase.
1992 The fix is to nullify setting "attributeName" of an SVGAnimationElement. By doing so,
1993 "attributeName" and its value will be ignored from the <animateMotion> which is correct.
1995 Tests: svg/animations/animate-montion-invalid-attribute.svg.
1997 * svg/SVGAnimateElementBase.cpp:
1998 (WebCore::SVGAnimateElementBase::setAttributeName):
1999 Do not call SVGAnimationElement::setAttributeName() since SVGAnimationElement should
2000 not have an attribute to animate. We prevent this by bypassing the parent in the class
2001 hierarchy: SVGAnimationElement and calling SVGSMILElement::setAttributeName() directly.
2003 * svg/SVGAnimationElement.cpp:
2004 (WebCore::SVGAnimationElement::setAttributeName): Deleted.
2005 * svg/SVGAnimationElement.h:
2006 SVGAnimationElement should not have an attribute to animate. So implement its
2007 setAttributeName() as a null function.
2009 2015-02-06 Simon Fraser <simon.fraser@apple.com>
2011 Convert the compositing overlap map to use LayoutRects
2012 https://bugs.webkit.org/show_bug.cgi?id=141346
2013 rdar://problem/18206365
2015 Reviewed by Zalan Bujtas.
2017 If two compositing layers were adjoining but not overlapping, but happened to
2018 have non-integral offsets, then using enclosing IntRects in the overlap map
2019 would cause us to think they are overlapping, and create unnecessary backing store.
2021 Fix by converting the overlap map to use LayoutRects.
2023 Test: compositing/layer-creation/subpixel-adjacent-layers-overlap.html
2025 * rendering/RenderLayerCompositor.cpp:
2026 (WebCore::OverlapMapContainer::add):
2027 (WebCore::OverlapMapContainer::overlapsLayers):
2028 (WebCore::RenderLayerCompositor::OverlapMap::add):
2029 (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
2030 (WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
2031 (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
2032 (WebCore::RenderLayerCompositor::logLayerInfo):
2033 (WebCore::RenderLayerCompositor::addToOverlapMap):
2034 (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2035 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2036 * rendering/RenderLayerCompositor.h:
2038 2015-02-06 Andreas Kling <akling@apple.com>
2040 Ref-ify various getters that return HTMLCollection.
2041 <https://webkit.org/b/141336>
2043 Reviewed by Anders Carlsson.
2045 Make all the getters that return HTMLCollection objects (and never return nullptr)
2046 return Ref instead of RefPtr.
2048 Removed a couple of useless null checks that were exposed by this change.
2050 * accessibility/AccessibilityRenderObject.cpp:
2051 (WebCore::AccessibilityRenderObject::getDocumentLinks):
2052 * bindings/js/JSDOMWindowCustom.cpp:
2053 (WebCore::namedItemGetter):
2054 * bindings/js/JSHTMLDocumentCustom.cpp:
2055 (WebCore::JSHTMLDocument::nameGetter):
2057 (WebCore::Document::ensureCachedCollection):
2058 (WebCore::Document::images):
2059 (WebCore::Document::applets):
2060 (WebCore::Document::embeds):
2061 (WebCore::Document::plugins):
2062 (WebCore::Document::scripts):
2063 (WebCore::Document::links):
2064 (WebCore::Document::forms):
2065 (WebCore::Document::anchors):
2066 (WebCore::Document::all):
2067 (WebCore::Document::windowNamedItems):
2068 (WebCore::Document::documentNamedItems):
2069 (WebCore::Document::iconURLs):
2072 (WebCore::Element::ensureCachedHTMLCollection):
2074 * html/ColorInputType.cpp:
2075 (WebCore::ColorInputType::suggestions):
2076 * html/HTMLDataListElement.cpp:
2077 (WebCore::HTMLDataListElement::options):
2078 * html/HTMLDataListElement.h:
2079 * html/HTMLElement.cpp:
2080 (WebCore::HTMLElement::children):
2081 * html/HTMLElement.h:
2082 * html/HTMLFieldSetElement.cpp:
2083 (WebCore::HTMLFieldSetElement::elements):
2084 * html/HTMLFieldSetElement.h:
2085 * html/HTMLFormElement.cpp:
2086 (WebCore::HTMLFormElement::elements):
2087 * html/HTMLFormElement.h:
2088 * html/HTMLInputElement.cpp:
2089 (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
2090 * html/HTMLMapElement.cpp:
2091 (WebCore::HTMLMapElement::areas):
2092 * html/HTMLMapElement.h:
2093 * html/HTMLSelectElement.cpp:
2094 (WebCore::HTMLSelectElement::selectedOptions):
2095 (WebCore::HTMLSelectElement::options):
2096 * html/HTMLSelectElement.h:
2097 * html/HTMLTableElement.cpp:
2098 (WebCore::HTMLTableElement::rows):
2099 (WebCore::HTMLTableElement::tBodies):
2100 * html/HTMLTableElement.h:
2101 * html/HTMLTableRowElement.cpp:
2102 (WebCore::HTMLTableRowElement::insertCell):
2103 (WebCore::HTMLTableRowElement::deleteCell):
2104 (WebCore::HTMLTableRowElement::cells):
2105 * html/HTMLTableRowElement.h:
2106 * html/HTMLTableSectionElement.cpp:
2107 (WebCore::HTMLTableSectionElement::insertRow):
2108 (WebCore::HTMLTableSectionElement::deleteRow):
2109 (WebCore::HTMLTableSectionElement::rows):
2110 * html/HTMLTableSectionElement.h:
2111 * html/RangeInputType.cpp:
2112 (WebCore::RangeInputType::updateTickMarkValues):
2113 * rendering/RenderTheme.cpp:
2114 (WebCore::RenderTheme::paintSliderTicks):
2116 2015-02-06 Brent Fulgham <bfulgham@apple.com>
2118 [iOS] Implement audio track selection in fullscreen.
2119 https://bugs.webkit.org/show_bug.cgi?id=131236
2120 <rdar://problem/16552632>
2122 Reviewed by Eric Carlson.
2124 * platform/ios/WebVideoFullscreenModelVideoElement.h:
2125 * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2126 (WebVideoFullscreenModelVideoElement::selectAudioMediaOption): Provide implementation.
2127 (WebVideoFullscreenModelVideoElement::updateLegibleOptions): Add audio track information
2128 to menu displayed to user.
2130 2015-02-06 Bartlomiej Gajda <b.gajda@samsung.com>
2132 [MSE] Implement Append Error algorithm.
2133 https://bugs.webkit.org/show_bug.cgi?id=139439
2135 Reviewed by Jer Noble.
2137 If Source Buffer has not received first init segment, then it shall call endOfStream after receiving
2138 Media Segment, as per Media Source spec. (from 17 July 2014) in paragraph 3.5.1 point 6.1.
2140 Based this change on Editor's Draft 12 December 2014, as it clarifies order of events.
2142 Test: media/media-source/media-source-append-media-segment-without-init.html
2144 * Modules/mediasource/MediaSource.cpp:
2145 (WebCore::MediaSource::streamEndedWithError):
2146 * Modules/mediasource/MediaSource.h:
2147 * Modules/mediasource/SourceBuffer.cpp:
2148 (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
2149 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2150 (WebCore::SourceBuffer::validateInitializationSegment):
2151 (WebCore::SourceBuffer::appendError):
2152 * Modules/mediasource/SourceBuffer.h:
2154 2015-02-06 Timothy Horton <timothy_horton@apple.com>
2156 REGRESSION: Lookup doesn't work in RTL
2157 https://bugs.webkit.org/show_bug.cgi?id=141338
2158 <rdar://problem/19738407>
2160 Reviewed by Dan Bernstein.
2162 * editing/Editor.cpp:
2163 (WebCore::Editor::scanSelectionForTelephoneNumbers):
2164 * editing/mac/DictionaryLookup.mm:
2165 (WebCore::rangeExpandedAroundPositionByCharacters):
2166 Positions are independent of writing direction, so we don't
2167 need to (and shouldn't) do anything special for RTL here.
2169 2015-02-06 Maciej Stachowiak <mjs@apple.com>
2171 REGRESSION(r179706): Caused memory corruption on some tests (Requested by _ap_ on #webkit).
2172 https://bugs.webkit.org/show_bug.cgi?id=141324
2174 Reviewed by Alexey Proskuryakov.
2176 No new tests. This is caught by existing tests under ASAN, and I don't know how to reproduce
2179 * rendering/RenderLineBoxList.cpp:
2180 (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Give up
2181 and just always invalidate the next line. It's too hard to come up
2182 with the condition that catches all needed cases, doesn't itself
2183 cause a crash, and isn't overzealous. And we do this for the
2184 previous line anyway. Also clean up the code a bit since it
2185 confusingly reuses a variable, and declares it uninitialized, for
2188 2015-02-05 Dhi Aurrahman <diorahman@rockybars.com>
2190 Remove duplicate loop after r179532
2191 https://bugs.webkit.org/show_bug.cgi?id=141300
2193 Reviewed by Benjamin Poulain.
2195 No new tests, no behavior changed.
2197 * css/SelectorCheckerTestFunctions.h:
2198 (WebCore::matchesLangPseudoClass):
2200 2015-02-05 Commit Queue <commit-queue@webkit.org>
2202 Unreviewed, rolling out r179725.
2203 https://bugs.webkit.org/show_bug.cgi?id=141320
2205 caused 2 layout tests to fail (Requested by zalan on #webkit).
2209 "[MSE] Implement Append Error algorithm."
2210 https://bugs.webkit.org/show_bug.cgi?id=139439
2211 http://trac.webkit.org/changeset/179725
2213 2015-02-05 Andreas Kling <akling@apple.com>
2215 [iOS] Run a full garbage collection on memory warning.
2216 <https://webkit.org/b/141313>
2217 <rdar://problem/19738024>
2219 Reviewed by Chris Dumez.
2221 Make sure that we run a full GC when trying to free up memory, as this might
2222 be our last chance to execute before the kernel suspends this process.
2224 This aligns WebKit2 with the old WebKit1 behavior.
2226 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2227 (WebCore::MemoryPressureHandler::platformReleaseMemory):
2230 2015-02-05 Hyungwook Lee <hyungwook.lee@navercorp.com>
2232 Fix ASSERTION FAILED: !root->needsLayout() in FrameView::layout()
2233 https://bugs.webkit.org/show_bug.cgi?id=141032
2235 Reviewed by Darin Adler.
2237 This patch moves the !root->needsLayout() assert statement above
2238 updateLayerPositionsAfterLayout() that can modify dirty bit system
2239 when we have RenderMarquee.
2241 * page/FrameView.cpp:
2242 (WebCore::FrameView::layout):
2244 2015-02-05 Bartlomiej Gajda <b.gajda@samsung.com>
2246 [MSE] Implement Append Error algorithm.
2247 https://bugs.webkit.org/show_bug.cgi?id=139439
2249 Reviewed by Jer Noble.
2251 If Source Buffer has not received first init segment, then it shall call endOfStream after receiving
2252 Media Segment, as per Media Source spec. (from 17 July 2014) in paragraph 3.5.1 point 6.1.
2254 Based this change on Editor's Draft 12 December 2014, as it clarifies order of events.
2256 Test: media/media-source/media-source-append-media-segment-without-init.html
2258 * Modules/mediasource/MediaSource.cpp:
2259 (WebCore::MediaSource::streamEndedWithError):
2260 * Modules/mediasource/MediaSource.h:
2261 * Modules/mediasource/SourceBuffer.cpp:
2262 (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
2263 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2264 (WebCore::SourceBuffer::validateInitializationSegment):
2265 (WebCore::SourceBuffer::appendError):
2266 * Modules/mediasource/SourceBuffer.h:
2268 2015-02-05 Maciej Stachowiak <mjs@apple.com>
2270 Crash due to failing to dirty a removed text node's line box
2271 https://bugs.webkit.org/show_bug.cgi?id=136544
2273 Reviewed by David Hyatt.
2275 Test: fast/text/remove-text-node-linebox-not-dirty-crash.html
2277 * rendering/RenderLineBoxList.cpp:
2278 (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Make the check for dirtying the next
2279 line box a bit more inclusive to avoid a case of a line box for a destroyed render object not
2280 being dirtied. In particular, when the text node's parent has no line boxes but contains BRs.
2282 2015-02-05 Chris Dumez <cdumez@apple.com>
2284 Free memory read under MemoryCache::pruneLiveResourcesToSize()
2285 https://bugs.webkit.org/show_bug.cgi?id=141292
2286 <rdar://problem/19725522>
2288 Reviewed by Antti Koivisto.
2290 In MemoryCache::pruneLiveResourcesToSize(), we were iterating over the
2291 m_liveDecodedResources ListHashSet and possibly calling
2292 CachedResource::destroyDecodedData() on the current value. Doing so
2293 would cause a call to ListHashSet::remove() to remove the value pointed
2294 by the current iterator, thus invalidating our iterator.
2296 In this patch, we increment the ListHashSet iterator *before* calling
2297 CachedResource::destroyDecodedData(), while the current iterator is
2298 still valid. Note that this is safe because unlike iteration of most
2299 WTF Hash data structures, iteration is guaranteed safe against mutation
2300 of the ListHashSet, except for removal of the item currently pointed to
2301 by a given iterator.
2303 Test: http/tests/cache/memory-cache-pruning.html
2305 * loader/cache/MemoryCache.cpp:
2306 (WebCore::MemoryCache::pruneLiveResourcesToSize):
2308 2015-02-05 Jer Noble <jer.noble@apple.com>
2310 [Mac] HLS <video> will not fire 'progress' events, only 'stalled'.
2311 https://bugs.webkit.org/show_bug.cgi?id=141284
2313 Reviewed by Brent Fulgham.
2315 Test: http/tests/media/hls/hls-progress.html
2317 totalBytes() will always return 0 for HLS streams, which will cause didLoadingProgress() to always
2318 return false. Skip this optimization.
2320 Drive-by fix: duration() will always return 0 for this class as well. Use durationMediaTime() instead.
2322 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2323 (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress):
2325 2015-02-05 Darin Adler <darin@apple.com>
2327 Move InstanceInvalidationGuard/UpdateBlocker to SVGElement from SVGElementInstance
2328 https://bugs.webkit.org/show_bug.cgi?id=141148
2330 Reviewed by Brent Fulgham and Anders Carlsson.
2332 Inspired by this change Rob Buis made in Blink:
2334 http://src.chromium.org/viewvc/blink?view=revision&revision=173343
2336 I actually wrote the whole thing and then discovered we did it almost identically.
2338 * svg/SVGAnimatedTypeAnimator.cpp:
2339 (WebCore::SVGElementAnimatedPropertyList::setInstanceUpdatesBlocked): Added this
2340 helper function to get around a circular header dependency.
2341 * svg/SVGAnimatedTypeAnimator.h:
2342 (WebCore::SVGAnimatedTypeAnimator::executeAction): Use setInstanceUpdatesBlocked.
2344 * svg/SVGElement.cpp:
2345 (WebCore::SVGElement::removedFrom): Use invalidateInstances.
2346 (WebCore::SVGElement::finishParsingChildren): Ditto.
2347 (WebCore::SVGElement::svgAttributeChanged): Ditto.
2348 (WebCore::SVGElement::childrenChanged): Ditto.
2349 (WebCore::SVGElement::setInstanceUpdatesBlocked): Added an assertion that will
2350 catch anyone who nests InstanceUpdateBlocker by accident.
2351 (WebCore::SVGElement::invalidateInstances): Moved this here from
2352 SVGElementInstance::invalidateAllInstancesOfElement. I had already modified this
2353 so it had nothing to do with SVGElementInstance, so it was a simple matter of
2354 converting this into a member function. Added a FIXME about the mysterious
2355 updateStyleIfNeeded that makes multiple tests fail if it's removed.
2357 * svg/SVGElement.h: Added public InstanceUpdateBlocker class, protected
2358 InstanceInvalidationGuard class, and private invalidateInstances function.
2359 Unlike the ones in SVGElementInstance these use references so they are then
2360 not copyable without using the WTF_MAKE_NONCOPYABLE macro.
2362 * svg/SVGElementInstance.cpp:
2363 (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Deleted.
2364 (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker): Deleted.
2365 (WebCore::SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker): Deleted.
2366 * svg/SVGElementInstance.h: Removed InvalidationGuard, InstanceUpdateBlocker, and
2367 invalidateAllInstancesOfElement. Didn't do any further cleanup since we soon will
2368 delete this entire file.
2370 * svg/SVGAElement.cpp:
2371 (WebCore::SVGAElement::svgAttributeChanged): Updated to use new name and reference
2373 * svg/SVGAnimateElementBase.cpp:
2374 (WebCore::applyCSSPropertyToTargetAndInstances): Ditto.
2375 (WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
2376 (WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
2377 * svg/SVGAnimatedPath.cpp:
2378 (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Ditto.
2379 * svg/SVGCircleElement.cpp:
2380 (WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
2381 * svg/SVGClipPathElement.cpp:
2382 (WebCore::SVGClipPathElement::svgAttributeChanged): Ditto.
2383 * svg/SVGComponentTransferFunctionElement.cpp:
2384 (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): Ditto.
2385 * svg/SVGCursorElement.cpp:
2386 (WebCore::SVGCursorElement::svgAttributeChanged): Ditto.
2387 * svg/SVGEllipseElement.cpp:
2388 (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
2389 * svg/SVGFEBlendElement.cpp:
2390 (WebCore::SVGFEBlendElement::svgAttributeChanged): Ditto.
2391 * svg/SVGFEColorMatrixElement.cpp:
2392 (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Ditto.
2393 * svg/SVGFECompositeElement.cpp:
2394 (WebCore::SVGFECompositeElement::svgAttributeChanged): Ditto.
2395 * svg/SVGFEConvolveMatrixElement.cpp:
2396 (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Ditto.
2397 * svg/SVGFEDiffuseLightingElement.cpp:
2398 (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Ditto.
2399 * svg/SVGFEDisplacementMapElement.cpp:
2400 (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Ditto.
2401 * svg/SVGFEDropShadowElement.cpp:
2402 (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Ditto.
2403 * svg/SVGFEGaussianBlurElement.cpp:
2404 (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Ditto.
2405 * svg/SVGFEImageElement.cpp:
2406 (WebCore::SVGFEImageElement::svgAttributeChanged): Ditto.
2407 * svg/SVGFELightElement.cpp:
2408 (WebCore::SVGFELightElement::svgAttributeChanged): Ditto.
2409 * svg/SVGFEMergeNodeElement.cpp:
2410 (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Ditto.
2411 * svg/SVGFEMorphologyElement.cpp:
2412 (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Ditto.
2413 * svg/SVGFEOffsetElement.cpp:
2414 (WebCore::SVGFEOffsetElement::svgAttributeChanged): Ditto.
2415 * svg/SVGFESpecularLightingElement.cpp:
2416 (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Ditto.
2417 * svg/SVGFETileElement.cpp:
2418 (WebCore::SVGFETileElement::svgAttributeChanged): Ditto.
2419 * svg/SVGFETurbulenceElement.cpp:
2420 (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Ditto.
2421 * svg/SVGFilterElement.cpp:
2422 (WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
2423 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2424 (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged): Ditto.
2425 * svg/SVGForeignObjectElement.cpp:
2426 (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
2427 * svg/SVGGElement.cpp:
2428 (WebCore::SVGGElement::svgAttributeChanged): Ditto.
2429 * svg/SVGGradientElement.cpp:
2430 (WebCore::SVGGradientElement::svgAttributeChanged): Ditto.
2431 * svg/SVGGraphicsElement.cpp:
2432 (WebCore::SVGGraphicsElement::svgAttributeChanged): Ditto.
2433 * svg/SVGImageElement.cpp:
2434 (WebCore::SVGImageElement::svgAttributeChanged): Ditto.
2435 * svg/SVGLineElement.cpp:
2436 (WebCore::SVGLineElement::svgAttributeChanged): Ditto.
2437 * svg/SVGLinearGradientElement.cpp:
2438 (WebCore::SVGLinearGradientElement::svgAttributeChanged): Ditto.
2439 * svg/SVGMPathElement.cpp:
2440 (WebCore::SVGMPathElement::svgAttributeChanged): Ditto.
2441 * svg/SVGMarkerElement.cpp:
2442 (WebCore::SVGMarkerElement::svgAttributeChanged): Ditto.
2443 * svg/SVGMaskElement.cpp:
2444 (WebCore::SVGMaskElement::svgAttributeChanged): Ditto.
2445 * svg/SVGPathElement.cpp:
2446 (WebCore::SVGPathElement::svgAttributeChanged): Ditto.
2447 * svg/SVGPatternElement.cpp:
2448 (WebCore::SVGPatternElement::svgAttributeChanged): Ditto.
2449 * svg/SVGPolyElement.cpp:
2450 (WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
2451 * svg/SVGRadialGradientElement.cpp:
2452 (WebCore::SVGRadialGradientElement::svgAttributeChanged): Ditto.
2453 * svg/SVGRectElement.cpp:
2454 (WebCore::SVGRectElement::svgAttributeChanged): Ditto.
2455 * svg/SVGSVGElement.cpp:
2456 (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
2457 * svg/SVGScriptElement.cpp:
2458 (WebCore::SVGScriptElement::svgAttributeChanged): Ditto.
2459 * svg/SVGStopElement.cpp:
2460 (WebCore::SVGStopElement::svgAttributeChanged): Ditto.
2461 * svg/SVGSymbolElement.cpp:
2462 (WebCore::SVGSymbolElement::svgAttributeChanged): Ditto.
2463 * svg/SVGTRefElement.cpp:
2464 (WebCore::SVGTRefElement::svgAttributeChanged): Ditto.
2465 * svg/SVGTextContentElement.cpp:
2466 (WebCore::SVGTextContentElement::svgAttributeChanged): Ditto.
2467 * svg/SVGTextPathElement.cpp:
2468 (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto.
2469 * svg/SVGTextPositioningElement.cpp:
2470 (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto.
2471 * svg/SVGUseElement.cpp:
2472 (WebCore::SVGUseElement::svgAttributeChanged): Ditto.
2473 * svg/animation/SVGSMILElement.cpp:
2474 (WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
2476 2015-02-05 Brent Fulgham <bfulgham@apple.com>
2478 Remind ourselves to remove work-around code
2479 https://bugs.webkit.org/show_bug.cgi?id=141289
2481 Unreviewed gardening: Add a reminder FIXME to CSSParser
2482 so we can remove the MSVC-specific hack in the future.
2484 * css/CSSParser.cpp:
2486 2015-02-05 Zalan Bujtas <zalan@apple.com>
2488 Do not destroy RenderQuote's text fragment child when quotation mark string is changing.
2489 https://bugs.webkit.org/show_bug.cgi?id=141271
2490 rdar://problem/18169375
2492 Reviewed by Antti Koivisto.
2494 Similar approach as https://codereview.chromium.org/679593004/
2496 This patch ensures that laying out a RenderQuote does not force a sibling RenderQuote's
2497 child renderer(RenderText) to be destroyed.
2498 BreakingContext holds a pointer to the next renderer on the line (BreakingContext::m_nextObject).
2499 While laying out the line, initiated by BreakingContext, placing the current renderer could end up destroying the "next" renderer.
2500 This happens when the pseudo after quotation mark(RenderQuote) becomes floated, the sibling <q>'s pseudo
2501 before text needs to be changed (from " to ') so that we don't end up with 2 sets of the same opening
2503 The fix is to reuse the RenderTextFragment object instead of destroy/recreate it.
2505 Test: fast/css/content/quote-crash-when-floating.html
2507 * rendering/RenderQuote.cpp:
2508 (WebCore::RenderQuote::RenderQuote):
2509 (WebCore::fragmentChild):
2510 (WebCore::RenderQuote::updateText):
2511 * rendering/RenderQuote.h:
2512 * rendering/RenderTextFragment.cpp:
2513 (WebCore::RenderTextFragment::setText):
2514 (WebCore::RenderTextFragment::setContentString):
2515 * rendering/RenderTextFragment.h:
2517 2015-02-04 Dean Jackson <dino@apple.com>
2519 [Media iOS] Add a debug setting to always show the optimized fullscreen button
2520 https://bugs.webkit.org/show_bug.cgi?id=141277
2521 <rdar://problem/19724471>
2523 Reviewed by Eric Carlson.
2525 Add a debug option so that we can test the optimized fullscreen
2526 control on media that doesn't support it.
2528 * Modules/mediacontrols/mediaControlsiOS.js: Add gSimulateOptimizedFullscreenAvailable.
2529 (ControllerIOS.prototype.createControls): Check the setting.
2530 (ControllerIOS.prototype.configureInlineControls): Ditto.
2531 (ControllerIOS.prototype.formatTime): Drive-by whitespace cleanup.
2532 (ControllerIOS.prototype.handleBaseGestureChange):
2533 (ControllerIOS.prototype.handleWrapperTouchStart):
2534 (ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd):
2535 (ControllerIOS.prototype.handlePresentationModeChange): Drive-by variable renaming.
2537 2015-02-05 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
2539 [Streams API] Implement a barebone ReadableStream interface
2540 https://bugs.webkit.org/show_bug.cgi?id=141045
2542 Reviewed by Benjamin Poulain.
2544 This patch implements the ReadableStream IDL (https://streams.spec.whatwg.org/#rs-model).
2545 No functionality is yet added.
2546 ReadableStreamSource is expected to be implemented for native sources (such as HTTP sources)
2547 as well as JavaScript source through ReadableStreamJSSource.
2549 Test: streams/readablestream-constructor.html
2552 * Configurations/FeatureDefines.xcconfig:
2553 * DerivedSources.cpp:
2554 * DerivedSources.make:
2555 * Modules/streams/ReadableStream.cpp: Added.
2556 (WebCore::ReadableStream::create):
2557 (WebCore::ReadableStream::ReadableStream):
2558 (WebCore::ReadableStream::~ReadableStream):
2559 (WebCore::ReadableStream::state):
2560 (WebCore::ReadableStream::closed):
2561 (WebCore::ReadableStream::ready):
2562 * Modules/streams/ReadableStream.h: Added.
2563 * Modules/streams/ReadableStream.idl: Added.
2564 * Modules/streams/ReadableStreamSource.h: Added.
2565 * WebCore.vcxproj/WebCore.vcxproj:
2566 * WebCore.vcxproj/WebCore.vcxproj.filters:
2567 * WebCore.vcxproj/WebCoreCommon.props:
2568 * WebCore.xcodeproj/project.pbxproj:
2569 * bindings/js/JSBindingsAllInOne.cpp:
2570 * bindings/js/JSReadableStreamCustom.cpp: Added.
2571 (WebCore::JSReadableStream::read):
2572 (WebCore::JSReadableStream::ready):
2573 (WebCore::JSReadableStream::closed):
2574 (WebCore::JSReadableStream::cancel):
2575 (WebCore::JSReadableStream::pipeTo):
2576 (WebCore::JSReadableStream::pipeThrough):
2577 (WebCore::constructJSReadableStream):
2578 * bindings/js/ReadableStreamJSSource.cpp: Added.
2579 (WebCore::ReadableStreamJSSource::create):
2580 (WebCore::ReadableStreamJSSource::ReadableStreamJSSource):
2581 (WebCore::ReadableStreamJSSource::setInternalError):
2582 * bindings/JSReadableStreamJSSource.h: Added.
2584 2015-02-04 Brent Fulgham <bfulgham@apple.com>
2586 [Win] Unreviewed project file corrections.
2588 Correct some parsing errors caused by recent manual editing of
2591 * WebCore.vcxproj/WebCore.vcxproj:
2592 * WebCore.vcxproj/WebCore.vcxproj.filters:
2594 2015-02-04 Eric Carlson <eric.carlson@apple.com>
2596 [iOS] add method to toggle playback when in the background
2597 https://bugs.webkit.org/show_bug.cgi?id=141270
2599 Reviewed by Dean Jackson.
2601 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2602 (-[WebAVPlayerController togglePlaybackEvenWhenInBackground:]): Added.
2604 2015-02-04 Jer Noble <jer.noble@apple.com>
2606 [Mac][EME] Support ClearKey encryption with AES128-encrypted HLS
2607 https://bugs.webkit.org/show_bug.cgi?id=140825
2609 Reviewed by Eric Carlson.
2611 Test: http/tests/media/clearkey/clear-key-hls-aes128.html
2613 Add support for ClearKey encryption when used with an AES-128 encrypted HLS stream.
2615 * Modules/encryptedmedia/CDM.cpp:
2616 (WebCore::installedCDMFactories): Add the CDMPrivateClearKey factory.
2617 * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
2618 (WebCore::CDMPrivateClearKey::supportsKeySystem): Support the "org.w3c.clearkey" key system.
2619 (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Ditto.
2620 (WebCore::CDMPrivateClearKey::supportsMIMEType): Ditto.
2621 (WebCore::CDMPrivateClearKey::createSession): Create a CDMSessionClearKey.
2622 * Modules/encryptedmedia/CDMPrivateClearKey.h:
2623 (WebCore::CDMPrivateClearKey::create): Simple factory.
2624 (WebCore::CDMPrivateClearKey::~CDMPrivateClearKey): Virtual destructor.
2625 (WebCore::CDMPrivateClearKey::CDMPrivateClearKey): Simple destructor.
2626 * Modules/encryptedmedia/CDMSessionClearKey.cpp: Added.
2627 (WebCore::clearKeyVM): Static method returning the VM to be used by JSON parsing.
2628 (WebCore::CDMSessionClearKey::CDMSessionClearKey): Simple constructor.
2629 (WebCore::CDMSessionClearKey::~CDMSessionClearKey): Simple destructor.
2630 (WebCore::CDMSessionClearKey::generateKeyRequest): Store the initData, ensure that it consists of a UTF8-encoded key
2631 URI, and return same.
2632 (WebCore::CDMSessionClearKey::releaseKeys): Purged all cached keys.
2633 (WebCore::CDMSessionClearKey::update): Parse raw JSON-encoded JWK keys, rejecting non-AES, non-oct keys.
2634 (WebCore::CDMSessionClearKey::cachedKeyForKeyID): Return cached keys.
2635 * Modules/encryptedmedia/CDMSessionClearKey.h:
2637 Add support for the "org.w3c.clearkey" CDM to MediaPlayerPrivateAVFoundationObjC, and do so in a platform-agnostic
2638 way by simply asking for raw key data from MediaPlayerClient when notified that a key has been added.
2640 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2641 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2642 (WebCore::keySystemIsSupported):
2643 (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2644 (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
2645 (WebCore::fulfillRequestWithKeyData): Added utility method.
2646 (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2647 (WebCore::MediaPlayerPrivateAVFoundationObjC::keyAdded):
2649 Pipe a keyAdded() notification down to MediaPlayer and a cachedKeyForKeyId() request up to CDMSessionClearKey:
2651 * Modules/encryptedmedia/MediaKeySession.cpp:
2652 (WebCore::MediaKeySession::cachedKeyForKeyId):
2653 (WebCore::MediaKeySession::addKeyTimerFired):
2654 * Modules/encryptedmedia/MediaKeySession.h:
2655 * Modules/encryptedmedia/MediaKeys.cpp:
2656 (WebCore::MediaKeys::keyAdded):
2657 (WebCore::MediaKeys::cachedKeyForKeyId):
2658 * Modules/encryptedmedia/MediaKeys.h:
2659 * html/HTMLMediaElement.cpp:
2660 (WebCore::HTMLMediaElement::keyAdded):
2661 * html/HTMLMediaElement.h:
2662 * platform/graphics/CDMSession.h:
2663 (WebCore::CDMSession::cachedKeyForKeyID):
2664 * platform/graphics/MediaPlayer.cpp:
2665 (WebCore::MediaPlayer::keyAdded):
2666 (WebCore::MediaPlayer::cachedKeyForKeyId):
2667 * platform/graphics/MediaPlayer.h:
2668 (WebCore::MediaPlayerClient::mediaPlayerCachedKeyForKeyId):
2669 * platform/graphics/MediaPlayerPrivate.h:
2670 (WebCore::MediaPlayerPrivateInterface::keyAdded):
2672 Add new files to project:
2674 * WebCore.xcodeproj/project.pbxproj:
2676 * WebCore.vcxproj/WebCore.vcxproj:
2677 * WebCore.vcxproj/WebCore.vcxproj.filters:
2679 2015-02-04 Commit Queue <commit-queue@webkit.org>
2681 Unreviewed, rolling out r179618.
2682 https://bugs.webkit.org/show_bug.cgi?id=141263
2684 Off-by-one error causing flaky behavior in webaudio
2685 /audiobuffersource-negative-playbackrate.html (Requested by
2686 jernoble_ on #webkit).
2690 "[WebAudio] AudioBufferSourceNodes should accurately play
2691 backwards if given a negative playbackRate."
2692 https://bugs.webkit.org/show_bug.cgi?id=140955
2693 http://trac.webkit.org/changeset/179618
2695 2015-02-03 David Hyatt <hyatt@apple.com>
2697 Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
2698 https://bugs.webkit.org/show_bug.cgi?id=141207
2699 <rdar://problem/18387659>
2701 Reviewed by Dean Jackson.
2703 Added fast/multicol/table-dynamic-movement.html
2705 Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.
2707 Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
2708 ended up getting marked for relayout.
2710 Make sure rows do the right thing as well.
2712 * rendering/RenderBlock.cpp:
2713 (WebCore::RenderBlock::layoutPositionedObjects):
2714 (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
2715 * rendering/RenderBlock.h:
2716 * rendering/RenderBlockFlow.cpp:
2717 (WebCore::RenderBlockFlow::layoutBlockChild):
2718 (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
2719 (WebCore::RenderBlockFlow::positionNewFloats):
2720 * rendering/RenderDeprecatedFlexibleBox.cpp:
2721 (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2722 (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2723 * rendering/RenderTable.cpp:
2724 (WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
2725 * rendering/RenderTable.h:
2726 * rendering/RenderTableRow.cpp:
2727 (WebCore::RenderTableRow::layout):
2728 * rendering/RenderTableSection.cpp:
2729 (WebCore::RenderTableSection::layout):
2731 2015-02-04 Said Abou-Hallawa <sabouhallawa@apple.com>
2733 When using SVG as an image, we should load datauri images when these images are not in the image cache.
2734 https://bugs.webkit.org/show_bug.cgi?id=99677.
2736 Reviewed by Darin Adler.
2738 Data URI sub-resources are not loaded because the networking context of FrameLoader
2739 attached to the SubResourceLoader is set to null. This is done intentionally to
2740 disallow any resource from loading external sub-resources. For example if an <img>
2741 tag has its 'src' attribute points to an svg file, this svg is not allowed to load
2742 an external image through the 'xlink' attribute of an <image> element. This restriction
2743 is not valid if the value of the 'xlink' attribute is a data URI. In this case the image
2744 should be loaded into memory since there is no network traffic involved. All we need
2745 to do is to decode the data part of the URI.
2747 The fix is to pass the root FrameLoader, which has a valid NetworkingContext, through
2748 the FrameLoaderClient, to the ResourceHandle::create() which uses the NetworkingContext
2749 to decode the data and fire the load events of the data URI resources.
2751 Tests: svg/as-image/svg-image-with-data-uri-background.html
2752 svg/as-image/svg-image-with-data-uri-from-canvas.html
2753 svg/as-image/svg-image-with-data-uri-images-disabled.html
2754 svg/as-image/svg-image-with-data-uri-reloading.html
2755 svg/as-image/svg-image-with-data-uri-use-data-uri.svg
2756 svg/as-image/svg-image-with-svg-data-uri.html
2758 * accessibility/AccessibilityRenderObject.cpp:
2759 Remove unreferenced header file.
2761 * loader/FrameLoaderClient.h:
2762 Define the null virtual function dataProtocolLoader() which should return the FrameLoader
2763 for loading data URI resources.
2765 * loader/ResourceLoader.cpp:
2766 (WebCore::ResourceLoader::start):
2767 (WebCore::ResourceLoader::dataProtocolFrameLoader):
2768 * loader/ResourceLoader.h:
2769 Add ResourceLoader::dataProtocolFrameLoader() which returns the root FrameLoader. The
2770 root FrameLoader is used to get a valid NetworkingContext which can be passed to
2771 ResourceHandle::create() when url().protocolIsData().
2773 * loader/cache/CachedImage.cpp:
2774 (WebCore::CachedImage::load):
2775 (WebCore::CachedImage::finishLoading):
2776 * loader/cache/CachedResourceLoader.cpp:
2777 (WebCore::CachedResourceLoader::shouldPerformImageLoad):
2778 (WebCore::CachedResourceLoader::shouldDeferImageLoad):
2779 * loader/cache/CachedResourceLoader.h:
2780 Allow loading data URI sub-resources as long as loading images is not disabled. Also we
2781 need to call setDataProtocolLoader() before calling setData() for the isSVGImage case,
2782 setData() will create a page by calling Page::createPageFromBuffer() via SVGImage::dataChanged(),
2783 and we need to pass the correct FrameLoaderClient to the created FrameLoader of the main
2786 * svg/graphics/SVGImage.cpp:
2787 (WebCore::SVGImage::SVGImage):
2788 (WebCore::SVGImage::dataChanged):
2789 * svg/graphics/SVGImage.h:
2790 Create a new FrameLoaderClient of type SVGFrameLoaderClient and set it in pageConfiguration
2791 which is used when creating the page from the SVG data URI.
2793 * WebCore.xcodeproj/project.pbxproj:
2794 * svg/graphics/SVGImageChromeClient.h: Removed.
2795 * svg/graphics/SVGImageClients.h: Added.
2796 Add a new class SVGImageChromeClient which overrides the function dataProtocolLoader().
2797 Rename the header file SVGImageChromeClient.h to be SVGImageClients.h since it now
2798 includes the classes SVGImageChromeClient and SVGFrameLoaderClient.
2800 2015-02-04 Timothy Horton <timothy_horton@apple.com>
2802 Fix a misplaced include in CaptionUserPreferencesMediaAF
2803 https://bugs.webkit.org/show_bug.cgi?id=141239
2805 Reviewed by Jer Noble.
2807 * page/CaptionUserPreferencesMediaAF.cpp:
2808 CoreText is a system header, and there's already a good spot for it!
2810 2015-02-04 Jer Noble <jer.noble@apple.com>
2812 [WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.
2813 https://bugs.webkit.org/show_bug.cgi?id=140955
2815 Reviewed by Eric Carlson.
2817 Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html
2818 webaudio/audiobuffersource-negative-playbackrate.html
2820 Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of
2821 start() to set the initial playback position at the end of the play range if the rate of playback
2824 * Modules/webaudio/AudioBufferSourceNode.cpp:
2825 (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32].
2826 (WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max"
2827 for clarity. Add a non-interpolated and interpolated render step for negative playback.
2828 (WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02.
2829 (WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback.
2830 (WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative.
2832 2015-02-04 Eric Carlson <eric.carlson@apple.com>
2834 video.attribute should not return true just because of fullscreen
2835 https://bugs.webkit.org/show_bug.cgi?id=141219
2837 Reviewed by Dean Jackson.
2839 No new tests, updated media/video-fullscreeen-only-controls.html
2841 * Modules/mediacontrols/mediaControlsApple.js:
2842 (Controller.prototype.shouldHaveControls):
2843 * Modules/mediacontrols/mediaControlsiOS.js:
2844 (ControllerIOS.prototype.isFullScreen):
2846 * html/HTMLMediaElement.cpp:
2847 (WebCore::HTMLMediaElement::controls): Don't consider fullscreen status.
2848 (WebCore::HTMLMediaElement::configureMediaControls): Create controls if a video element
2849 isn't allowed to play inline, or if it is in fullscreen.
2851 2015-02-04 Mark Lam <mark.lam@apple.com>
2853 Remove concept of makeUsableFromMultipleThreads().
2854 <https://webkit.org/b/141221>
2856 Reviewed by Mark Hahnenberg.
2860 * bindings/js/JSDOMWindowBase.cpp:
2861 (WebCore::JSDOMWindowBase::commonVM):
2863 2015-02-04 Simon Fraser <simon.fraser@apple.com>
2865 [iOS WK2] Assert in ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren() on tab switching
2866 https://bugs.webkit.org/show_bug.cgi?id=141223
2867 rdar://problem/18458993
2869 Reviewed by Tim Horton.
2871 It's possible to submit a RemoteLayerTree transaction that contains data
2872 about a created layer, but doesn't have any properties for that layer. This
2873 happens when the newly created layer isn't reached during the traversal that
2874 gathers layer properties (i.e. it's not rooted). However, whether we create
2875 a scrolling layer or not requires having properties; they are missing, so we
2876 create a normal layer, but then the scrolling tree commit asserts that we
2877 should have a scrolling layer.
2879 Fix by making scrolling layers have a corresponding layer type, which is
2880 stored in layer creation properties. This required exposing layer types
2881 up through GraphicsLayer, but that allows for some nice cleanup:
2883 1. No need to have the hokey shouldUseTiledBacking() GraphicsLayerClient hack
2884 for creating the page tiled layer.
2885 2. The notion of "custom behaviors" can be removed from GraphicsLayer entirely.
2887 Not testable because it requires tab switching.
2890 * platform/graphics/GraphicsLayer.cpp:
2891 (WebCore::GraphicsLayer::GraphicsLayer):
2892 * platform/graphics/GraphicsLayer.h:
2893 (WebCore::GraphicsLayer::initialize):
2894 (WebCore::GraphicsLayer::setCustomBehavior): Deleted.
2895 (WebCore::GraphicsLayer::customBehavior): Deleted.
2896 * platform/graphics/GraphicsLayerClient.h:
2897 (WebCore::GraphicsLayerClient::shouldUseTiledBacking): Deleted.
2898 * platform/graphics/GraphicsLayerFactory.h:
2899 * platform/graphics/ca/GraphicsLayerCA.cpp:
2900 (WebCore::GraphicsLayer::create):
2901 (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2902 (WebCore::GraphicsLayerCA::initialize):
2903 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2904 (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2905 (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2906 (WebCore::GraphicsLayerCA::updateCustomBehavior): Deleted.
2907 (WebCore::GraphicsLayerCA::setCustomBehavior): Deleted.
2908 * platform/graphics/ca/GraphicsLayerCA.h:
2909 (WebCore::GraphicsLayerCA::moveAnimations):
2910 (WebCore::GraphicsLayerCA::copyAnimations):
2911 * platform/graphics/ca/PlatformCALayer.h:
2912 * platform/graphics/ca/mac/PlatformCALayerMac.h:
2913 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2914 (PlatformCALayerMac::PlatformCALayerMac):
2915 (PlatformCALayerMac::commonInit):
2916 (PlatformCALayerMac::updateCustomBehavior): Deleted.
2917 * rendering/RenderLayerBacking.cpp:
2918 (WebCore::RenderLayerBacking::createGraphicsLayer):
2919 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2920 (WebCore::RenderLayerBacking::updateScrollingLayers):
2921 (WebCore::RenderLayerBacking::shouldUseTiledBacking): Deleted.
2922 * rendering/RenderLayerBacking.h:
2924 2015-02-04 Dean Jackson <dino@apple.com>
2926 [Media] Fullscreen button should always come last in inline controls (141245)
2927 https://bugs.webkit.org/show_bug.cgi?id=141245
2928 <rdar://problem/19714622>
2930 Reviewed by Eric Carlson.
2932 Make sure the optimizedFullscreen button is inserted before the
2933 normal fullscreen button.
2935 * Modules/mediacontrols/mediaControlsiOS.js:
2936 (ControllerIOS.prototype.configureInlineControls):
2938 2015-02-04 Dean Jackson <dino@apple.com>
2940 REGRESSION: AirPlay button not visible but present in inline toolbar
2941 https://bugs.webkit.org/show_bug.cgi?id=141244
2942 <rdar://problem/19328322>
2944 Reviewed by Eric Carlson.
2946 Replace the use of mask-image with a background-image (which matches
2947 what the other buttons are doing).
2949 * Modules/mediacontrols/mediaControlsiOS.css:
2950 (::-webkit-media-controls):
2951 (video::-webkit-media-controls-wireless-playback-picker-button):
2952 (audio::-webkit-media-controls-wireless-playback-picker-button):
2953 (video::-webkit-media-controls-wireless-playback-picker-button.active):
2954 (audio::-webkit-media-controls-wireless-playback-picker-button.active):
2956 2015-02-04 Chris Dumez <cdumez@apple.com>
2958 Add removeFirst(value) / removeAll(value) methods to WTF::Vector
2959 https://bugs.webkit.org/show_bug.cgi?id=141192
2961 Reviewed by Benjamin Poulain.
2963 Use new Vector::removeFirst(value) / removeAll(value) API to simplify the
2966 * css/StyleSheetContents.cpp:
2967 (WebCore::StyleSheetContents::unregisterClient):
2968 * html/HTMLFormElement.cpp:
2969 (WebCore::HTMLFormElement::removeFormElement):
2970 (WebCore::HTMLFormElement::removeImgElement):
2971 (WebCore::removeFromVector): Deleted.
2973 (WebCore::Chrome::unregisterPopupOpeningObserver):
2974 * page/PageOverlayController.cpp:
2975 (WebCore::PageOverlayController::uninstallPageOverlay):
2976 * page/SecurityPolicy.cpp:
2977 (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
2978 * platform/graphics/GraphicsLayer.cpp:
2979 (WebCore::GraphicsLayer::removeFromParent):
2980 * platform/graphics/texmap/TextureMapperAnimation.cpp:
2981 (WebCore::TextureMapperAnimations::remove):
2982 * rendering/RenderSearchField.cpp:
2983 (WebCore::RenderSearchField::addSearchResult):
2984 * rendering/RenderTable.cpp:
2985 (WebCore::RenderTable::removeCaption):
2986 * rendering/svg/RenderSVGText.cpp:
2987 (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
2988 * svg/SVGDocumentExtensions.cpp:
2989 (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget):
2990 * svg/animation/SMILTimeContainer.cpp:
2991 (WebCore::SMILTimeContainer::unschedule):
2993 2015-02-03 Maciej Stachowiak <mjs@apple.com>
2995 Crash when printing snapshotted plugins
2996 https://bugs.webkit.org/show_bug.cgi?id=141212
2998 Reviewed by Simon Fraser.
3000 Test: plugins/snapshotting/print-snapshotted-plugin.html
3002 * html/HTMLPlugInImageElement.cpp:
3003 (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer): New
3004 method. If the current renderer is a snapshotted plugin, only
3005 allow children to create renderers if they are part of the
3006 snapshot shadow dom. Otherwise RenderEmbeddedObject invariants
3007 will be violated. This DOM class can have many other renderers, but they
3008 can just follow their own rules.
3009 (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay): Make this
3010 const-correct, and don't create UA shadow DOM as a side effect if it doesn't
3012 * html/HTMLPlugInImageElement.h:
3014 2015-02-03 Chris Dumez <cdumez@apple.com>
3016 Regression(r179584): Assertion hit in toResourceLoadPriority() on Yosemite
3017 https://bugs.webkit.org/show_bug.cgi?id=141230
3019 Reviewed by Alexey Proskuryakov.
3021 Handle -1 priority value again in toResourceLoadPriority() as it seems to
3022 be returned by CFNetwork on some configurations.
3024 No new tests, already covered by existing tests.
3026 * platform/network/cf/ResourceRequestCFNet.h:
3027 (WebCore::toResourceLoadPriority):
3029 2015-02-03 Chris Dumez <cdumez@apple.com>
3031 Drop ResourceLoadPriorityUnresolved resource load priority and use Optional<> instead
3032 https://bugs.webkit.org/show_bug.cgi?id=141186
3034 Reviewed by Antti Koivisto.
3036 Drop ResourceLoadPriorityUnresolved resource load priority value and use
3037 Optional<ResourceLoadPriority> when needed instead. If the Optional
3038 doesn't have a value, then it means it is unresolved. Having
3039 ResourceLoadPriorityUnresolved in ResourceLoadPriority was confusing
3040 because this value is only valid in CachedResourceRequest, it is not
3041 a valid value in CachedResource or in ResourceRequest. After this
3042 refactoring, it now becomes more obvious.
3044 2015-02-03 Chris Dumez <cdumez@apple.com>
3046 REGRESSION(176609): Very high memory usage in Canvas/reuse.html performance test
3047 https://bugs.webkit.org/show_bug.cgi?id=139812
3049 Reviewed by Geoffrey Garen.
3051 Update DOMTimerFireState.elementsChangedOutsideViewport to keep only
3052 weak pointers to the Elements, instead of ref'ing them, so as to not
3053 extend their life unnecessarily (by preventing garbage-collection).
3054 The same approach was already adopted in r176496 for
3055 DOMTimer.m_elementsCausingThrottling to address the same issue.
3057 No new tests, already covered by Canvas/reuse.html performance test.
3059 * page/DOMTimer.cpp:
3060 (WebCore::DOMTimerFireState::setScriptMadeNonUserObservableChangesToElement):
3061 (WebCore::DOMTimerFireState::elementsChangedOutsideViewport):
3063 2015-02-03 Jer Noble <jer.noble@apple.com>
3065 [MSE] Setting timestampOffset does not change the timestamps in the actual sample, leading to visual and audible errors.
3066 https://bugs.webkit.org/show_bug.cgi?id=140929
3068 Reviewed by Alexey Proskuryakov.
3070 Fixes http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html.
3072 Only apply the timestamp offset to the actual sample after step 1.6, where we may loop back to
3073 the top, to avoid double-offsetting the same sample.
3075 * Modules/mediasource/SourceBuffer.cpp:
3076 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3078 2015-02-03 Jeremy Jones <jeremyj@apple.com>
3080 Restore interface before exiting optimized fullscreen mode.
3081 https://bugs.webkit.org/show_bug.cgi?id=141167
3083 Reviewed by Simon Fraser.
3085 This change allows the user interface to be restored before exiting optimized fullscreen mode.
3087 * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add declaration.
3088 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3089 (-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]): Added.
3090 (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline): Added.
3091 * platform/spi/ios/AVKitSPI.h: Add new SPI.
3093 2015-02-03 Jeremy Jones <jeremyj@apple.com>
3095 Prevent flicker when exiting fullscreen by synchronizing transactions.
3096 https://bugs.webkit.org/show_bug.cgi?id=140897
3098 Reviewed by Tim Horton.
3100 Synchronize across CAContexts when moving the video layer between layer hierarchies.
3101 Normally transactions involving multiple CAContexts are not synchronized.
3103 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3104 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
3105 * platform/spi/cocoa/QuartzCoreSPI.h: add additional CAContext SPI declarations.
3107 2015-02-03 Ryosuke Niwa <rniwa@webkit.org>
3109 Smart quoting could move the caret backwards in some configurations
3110 https://bugs.webkit.org/show_bug.cgi?id=141203
3111 <rdar://problem/17452543>
3113 Reviewed by Enrica Casucci.
3115 The bug was caused by markAndReplaceFor not running the code to preserve the selection after
3116 text replacement only when smart quote is enabled. Furthermore, when smart link was disabled,
3117 we never applied smart quote due to the following condition at line 2502:
3119 if (!(shouldPerformReplacement || shouldCheckForCorrection || shouldMarkLink) || !doReplacement)
3122 This condition prevented the code to apply smart quote from running when both continuous
3123 spellchecking, smart link, and text replacement are disabled.
3125 Fixed the bug by treating smart quotes and smart dashes like any other text replacement and set
3126 shouldPerformReplacement to true whenever either one of those text checking options are present.
3128 Smart link didn't have this issue due to the explicit check for shouldMarkLink.
3130 Smart dashes didn't suffer this problem either because dashes replacement happens only once
3131 the caret has moved past the dashes but his patch makes go through the same code path to preserve
3132 the selection as well for consistency.
3134 Test: editing/inserting/smart-quote-with-all-configurations.html
3136 * editing/Editor.cpp:
3137 (WebCore::Editor::markAndReplaceFor):
3139 2015-02-02 Enrica Casucci <enrica@apple.com>
3141 Additional emoji support.
3142 https://bugs.webkit.org/show_bug.cgi?id=141047
3143 rdar://problem/19045135
3145 Reviewed by Darin Adler.
3147 Adds support for emoji modifiers and group emoji.
3149 Test: editing/deleting/delete-emoji.html
3151 * platform/graphics/FontCascade.cpp:
3152 (WebCore::FontCascade::characterRangeCodePath):
3153 * platform/text/TextBreakIterator.cpp:
3154 (WebCore::cursorMovementIterator):
3155 * rendering/RenderText.cpp:
3156 (WebCore::isEmojiGroupCandidate):
3157 (WebCore::isEmojiModifier):
3158 (WebCore::RenderText::previousOffsetForBackwardDeletion):
3160 2015-02-03 Jer Noble <jer.noble@apple.com>
3162 Passing invalid values to OfflineAudioContext's constructor should not crash.
3163 https://bugs.webkit.org/show_bug.cgi?id=141197
3165 Reviewed by Darin Adler.
3167 Test: webaudio/offlineaudiocontext-constructor.html
3169 Throw a SYNTAX_ERR exception if passed in a zero for channelCount or numberOfSamples. This avoids
3170 a crash where OfflineAudioDestinationNode is passed a null renderTarget.
3172 * Modules/webaudio/OfflineAudioContext.cpp:
3173 (WebCore::OfflineAudioContext::create):
3175 2015-02-03 Jer Noble <jer.noble@apple.com>
3177 [MSE] Setting timestampOffset does not change the timestamps in the actual sample, leading to visual and audible errors.
3178 https://bugs.webkit.org/show_bug.cgi?id=140929
3180 Reviewed by Darin Adler.
3182 Test: media/media-source/media-source-timeoffset.html
3184 Changing timestampOffset will correctly offset the presentation and decode times within SourceBuffer and
3185 will correctly modify things like buffered ranges. But those changes need to be reflected in the underlying
3186 MediaSample for decoders to decode and display the samples at the correct times.
3188 Add a method to MediaSample which allows the caller to offset timestamps of the underlying PlatformMediaSample.
3190 * Modules/mediasource/SourceBuffer.cpp:
3191 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Call offsetTimestampsBy() on the sample.
3192 * platform/MediaSample.h:
3193 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3194 (WebCore::MediaSampleAVFObjC::offsetTimestampsBy): Create a new sample with the same underlying data
3195 but with a new timing info array, each timing info offset by the requested amount.
3196 * platform/mock/mediasource/MockBox.h:
3197 (WebCore::MockBox::offsetTimestampsBy): Offset m_presentationTimestamp and m_decodeTimestamp;
3198 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3199 (WebCore::MockMediaSample::offsetTimestampsBy): Pass to MockBox.
3201 2015-02-03 Jer Noble <jer.noble@apple.com>
3203 [Mac][EME] Crash in CDMSessionMediaSourceAVFObjC::layerDidReceiveError() - NSError not KVO compliant for key NSUnderlyingError.
3204 https://bugs.webkit.org/show_bug.cgi?id=140529
3206 Reviewed by Darin Adler.
3208 The underlying error should be fetched from the userInfo dictionary, not the error itself.
3210 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3211 (WebCore::systemCodeForError):
3213 2015-02-03 Commit Queue <commit-queue@webkit.org>
3215 Unreviewed, rolling out r179548.
3216 https://bugs.webkit.org/show_bug.cgi?id=141201
3218 Hits debug assertions in 50+ SVG tests (Requested by brrian on
3223 "Move InstanceInvalidationGuard/UpdateBlocker to SVGElement
3224 from SVGElementInstance"
3225 https://bugs.webkit.org/show_bug.cgi?id=141148
3226 http://trac.webkit.org/changeset/179548
3228 2015-02-03 Jer Noble <jer.noble@apple.com>
3230 [Mac] HLS audio is not correctly selected according to system language
3231 https://bugs.webkit.org/show_bug.cgi?id=140398
3232 rdar://problem/19218487
3234 Reviewed by Darin Adler.
3236 Test: http/tests/media/hls/hls-audio-tracks-locale-selection.html
3238 When AVMediaSelectionOptions come and go and no explicit track selection choice has
3239 been made, automatically pick the most appropriate track according to the user's
3240 current preferred locale settings.
3242 * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
3243 * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
3244 (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC): Set m_shouldSelectOptionAutomatically
3246 (WebCore::MediaSelectionGroupAVFObjC::updateOptions): If m_shouldSelectOptionAutomatically is set
3247 pick the most appropriate media selection option.
3248 (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set m_shouldSelectOptionAutomatically to false.
3249 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3250 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Remove these automatic selection
3251 requests as they are ineffective when -appliesMediaSelectionCriteriaAutomatically is NO.
3253 2015-02-03 Darin Adler <darin@apple.com>
3255 Move InstanceInvalidationGuard/UpdateBlocker to SVGElement from SVGElementInstance
3256 https://bugs.webkit.org/show_bug.cgi?id=141148
3258 Reviewed by Brent Fulgham.
3260 Inspired by this change Rob Buis made in Blink:
3262 http://src.chromium.org/viewvc/blink?view=revision&revision=173343
3264 I actually wrote the whole thing and then discovered we did it almost identically.
3266 * svg/SVGAnimatedTypeAnimator.cpp:
3267 (WebCore::SVGElementAnimatedPropertyList::setInstanceUpdatesBlocked): Added this
3268 helper function to get around a circular header dependency.
3269 * svg/SVGAnimatedTypeAnimator.h:
3270 (WebCore::SVGAnimatedTypeAnimator::executeAction): Use setInstanceUpdatesBlocked.
3272 * svg/SVGElement.cpp:
3273 (WebCore::SVGElement::removedFrom): Use invalidateInstances.
3274 (WebCore::SVGElement::finishParsingChildren): Ditto.
3275 (WebCore::SVGElement::svgAttributeChanged): Ditto.
3276 (WebCore::SVGElement::childrenChanged): Ditto.
3277 (WebCore::SVGElement::setInstanceUpdatesBlocked): Added an assertion that will
3278 catch anyone who nests InstanceUpdateBlocker by accident.
3279 (WebCore::SVGElement::invalidateInstances): Moved this here from
3280 SVGElementInstance::invalidateAllInstancesOfElement. I had already modified this
3281 so it had nothing to do with SVGElementInstance, so it was a simple matter of
3282 converting this into a member function. Added a FIXME about the mysterious
3283 updateStyleIfNeeded that makes multiple tests fail if it's removed.
3285 * svg/SVGElement.h: Added public InstanceUpdateBlocker class, protected
3286 InstanceInvalidationGuard class, and private invalidateInstances function.
3287 Unlike the ones in SVGElementInstance these use references so they are then
3288 not copyable without using the WTF_MAKE_NONCOPYABLE macro.
3290 * svg/SVGElementInstance.cpp:
3291 (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Deleted.
3292 (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker): Deleted.
3293 (WebCore::SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker): Deleted.
3294 * svg/SVGElementInstance.h: Removed InvalidationGuard, InstanceUpdateBlocker, and
3295 invalidateAllInstancesOfElement. Didn't do any further cleanup since we soon will
3296 delete this entire file.
3298 * svg/SVGAElement.cpp:
3299 (WebCore::SVGAElement::svgAttributeChanged): Updated to use new name and reference
3301 * svg/SVGAnimateElementBase.cpp:
3302 (WebCore::applyCSSPropertyToTargetAndInstances): Ditto.
3303 (WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
3304 (WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
3305 * svg/SVGAnimatedPath.cpp:
3306 (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Ditto.
3307 * svg/SVGCircleElement.cpp:
3308 (WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
3309 * svg/SVGClipPathElement.cpp:
3310 (WebCore::SVGClipPathElement::svgAttributeChanged): Ditto.
3311 * svg/SVGComponentTransferFunctionElement.cpp:
3312 (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): Ditto.
3313 * svg/SVGCursorElement.cpp:
3314 (WebCore::SVGCursorElement::svgAttributeChanged): Ditto.
3315 * svg/SVGEllipseElement.cpp:
3316 (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
3317 * svg/SVGFEBlendElement.cpp:
3318 (WebCore::SVGFEBlendElement::svgAttributeChanged): Ditto.
3319 * svg/SVGFEColorMatrixElement.cpp:
3320 (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Ditto.
3321 * svg/SVGFECompositeElement.cpp:
3322 (WebCore::SVGFECompositeElement::svgAttributeChanged): Ditto.
3323 * svg/SVGFEConvolveMatrixElement.cpp:
3324 (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Ditto.
3325 * svg/SVGFEDiffuseLightingElement.cpp:
3326 (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Ditto.
3327 * svg/SVGFEDisplacementMapElement.cpp:
3328 (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Ditto.
3329 * svg/SVGFEDropShadowElement.cpp:
3330 (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Ditto.
3331 * svg/SVGFEGaussianBlurElement.cpp:
3332 (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Ditto.
3333 * svg/SVGFEImageElement.cpp:
3334 (WebCore::SVGFEImageElement::svgAttributeChanged): Ditto.
3335 * svg/SVGFELightElement.cpp:
3336 (WebCore::SVGFELightElement::svgAttributeChanged): Ditto.
3337 * svg/SVGFEMergeNodeElement.cpp:
3338 (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Ditto.
3339 * svg/SVGFEMorphologyElement.cpp:
3340 (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Ditto.
3341 * svg/SVGFEOffsetElement.cpp:
3342 (WebCore::SVGFEOffsetElement::svgAttributeChanged): Ditto.
3343 * svg/SVGFESpecularLightingElement.cpp:
3344 (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Ditto.
3345 * svg/SVGFETileElement.cpp:
3346 (WebCore::SVGFETileElement::svgAttributeChanged): Ditto.
3347 * svg/SVGFETurbulenceElement.cpp:
3348 (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Ditto.
3349 * svg/SVGFilterElement.cpp:
3350 (WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
3351 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3352 (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged): Ditto.
3353 * svg/SVGForeignObjectElement.cpp:
3354 (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
3355 * svg/SVGGElement.cpp:
3356 (WebCore::SVGGElement::svgAttributeChanged): Ditto.
3357 * svg/SVGGradientElement.cpp:
3358 (WebCore::SVGGradientElement::svgAttributeChanged): Ditto.
3359 * svg/SVGGraphicsElement.cpp:
3360 (WebCore::SVGGraphicsElement::svgAttributeChanged): Ditto.
3361 * svg/SVGImageElement.cpp:
3362 (WebCore::SVGImageElement::svgAttributeChanged): Ditto.
3363 * svg/SVGLineElement.cpp:
3364 (WebCore::SVGLineElement::svgAttributeChanged): Ditto.
3365 * svg/SVGLinearGradientElement.cpp:
3366 (WebCore::SVGLinearGradientElement::svgAttributeChanged): Ditto.
3367 * svg/SVGMPathElement.cpp:
3368 (WebCore::SVGMPathElement::svgAttributeChanged): Ditto.
3369 * svg/SVGMarkerElement.cpp:
3370 (WebCore::SVGMarkerElement::svgAttributeChanged): Ditto.
3371 * svg/SVGMaskElement.cpp:
3372 (WebCore::SVGMaskElement::svgAttributeChanged): Ditto.
3373 * svg/SVGPathElement.cpp:
3374 (WebCore::SVGPathElement::svgAttributeChanged): Ditto.
3375 * svg/SVGPatternElement.cpp:
3376 (WebCore::SVGPatternElement::svgAttributeChanged): Ditto.
3377 * svg/SVGPolyElement.cpp:
3378 (WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
3379 * svg/SVGRadialGradientElement.cpp:
3380 (WebCore::SVGRadialGradientElement::svgAttributeChanged): Ditto.
3381 * svg/SVGRectElement.cpp:
3382 (WebCore::SVGRectElement::svgAttributeChanged): Ditto.
3383 * svg/SVGSVGElement.cpp:
3384 (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
3385 * svg/SVGScriptElement.cpp:
3386 (WebCore::SVGScriptElement::svgAttributeChanged): Ditto.
3387 * svg/SVGStopElement.cpp:
3388 (WebCore::SVGStopElement::svgAttributeChanged): Ditto.
3389 * svg/SVGSymbolElement.cpp:
3390 (WebCore::SVGSymbolElement::svgAttributeChanged): Ditto.
3391 * svg/SVGTRefElement.cpp:
3392 (WebCore::SVGTRefElement::svgAttributeChanged): Ditto.
3393 * svg/SVGTextContentElement.cpp:
3394 (WebCore::SVGTextContentElement::svgAttributeChanged): Ditto.
3395 * svg/SVGTextPathElement.cpp:
3396 (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto.
3397 * svg/SVGTextPositioningElement.cpp:
3398 (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto.
3399 * svg/SVGUseElement.cpp:
3400 (WebCore::SVGUseElement::svgAttributeChanged): Ditto.
3401 * svg/animation/SVGSMILElement.cpp:
3402 (WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
3404 2015-02-02 Darin Adler <darin@apple.com>
3406 REGRESSION (r170576): Storage leaks in parsing of CSS image sizes
3407 https://bugs.webkit.org/show_bug.cgi?id=141026
3409 Reviewed by Brent Fulgham.
3411 Forgot to actually fix the leak in the successful parse case!
3413 * css/CSSParser.cpp:
3414 (WebCore::CSSParser::sourceSize): Added a call to destroy.
3416 2015-02-02 Benjamin Poulain <benjamin@webkit.org>
3418 JIT Compile simple cases of :nth-last-child()
3419 https://bugs.webkit.org/show_bug.cgi?id=141053
3421 Reviewed by Andreas Kling.
3423 This patch adds the code generator for :nth-last-child(), skipping
3424 any :nth-last-child(An+B of selector list).
3426 The code generator is boring here, nothing fancy.
3427 There is no optimization opportunity here so it is basically the same
3428 speed as the code generated by Clang when the simple selector is alone.
3430 The only reason to JIT compile this is to avoid going to slow-path
3431 for every selector that contain :nth-last-child().
3433 * cssjit/SelectorCompiler.cpp:
3434 (WebCore::SelectorCompiler::addNthChildType):
3435 The code creating the intermediate representation of :nth-child() is exactly
3436 the same as what we need for :nth-last-child(). I extracted the code from addPseudoClassType()
3437 and share it for both simple selectors.
3439 (WebCore::SelectorCompiler::addPseudoClassType):
3440 I fail :nth-last-child(An+B of selector list). Let's add it later.
3442 (WebCore::SelectorCompiler::minimumRegisterRequirements):
3443 Oops, there was a bug with nthChildOfFilters.
3445 (WebCore::SelectorCompiler::hasAnyCombinators):
3446 (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
3447 (WebCore::SelectorCompiler::computeBacktrackingInformation):
3448 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3449 (WebCore::SelectorCompiler::setChildrenAffectedByBackwardPositionalRules):
3450 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
3452 2015-02-02 Zalan Bujtas <zalan@apple.com>
3454 Simple line layout: Rename FlowContentsIterator to TextFragmentIterator.
3455 https://bugs.webkit.org/show_bug.cgi?id=141177
3457 Rubber-stamped by Antti Koivisto
3459 FlowContentsIterator is easy to confuse with FlowContents::Iterator.
3460 TextFragmentIterator reflects the functionality better.
3462 No change in functionality.
3465 * WebCore.vcxproj/WebCore.vcxproj:
3466 * WebCore.vcxproj/WebCore.vcxproj.filters:
3467 * WebCore.xcodeproj/project.pbxproj:
3468 * rendering/SimpleLineLayout.cpp:
3469 (WebCore::SimpleLineLayout::LineState::setOverflowedFragment):
3470 (WebCore::SimpleLineLayout::LineState::overflowedFragment):
3471 (WebCore::SimpleLineLayout::LineState::appendFragment):
3472 (WebCore::SimpleLineLayout::begin):
3473 (WebCore::SimpleLineLayout::end):
3474 (WebCore::SimpleLineLayout::preWrap):
3475 (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3476 (WebCore::SimpleLineLayout::splitFragmentToFitLine):
3477 (WebCore::SimpleLineLayout::firstFragment):
3478 (WebCore::SimpleLineLayout::createLineRuns):
3479 (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
3480 (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary):
3481 (WebCore::SimpleLineLayout::createTextRuns):
3482 * rendering/SimpleLineLayoutTextFragmentIterator.cpp: Renamed from Source/WebCore/rendering/SimpleLineLayoutFlowContentsIterator.cpp.
3483 (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
3484 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
3485 (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
3486 (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
3487 (WebCore::SimpleLineLayout::nextBreakablePosition):
3488 (WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition):
3489 (WebCore::SimpleLineLayout::findNextNonWhitespace):
3490 (WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition):
3491 (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
3492 * rendering/SimpleLineLayoutTextFragmentIterator.h: Renamed from Source/WebCore/rendering/SimpleLineLayoutFlowContentsIterator.h.
3493 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
3494 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::start):
3495 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::end):
3496 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::width):
3497 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::type):
3498 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsed):
3499 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isBreakable):
3500 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isEmpty):
3501 (WebCore::SimpleLineLayout::TextFragmentIterator::style):
3502 (WebCore::SimpleLineLayout::TextFragmentIterator::segmentForPosition):
3503 (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split):
3504 (WebCore::SimpleLineLayout::TextFragmentIterator::characterAt):
3505 (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
3506 (WebCore::SimpleLineLayout::TextFragmentIterator::isEnd):
3508 2015-02-02 Chris Dumez <cdumez@apple.com>
3510 Add diagnostic logging for ResourceResponse's source
3511 https://bugs.webkit.org/show_bug.cgi?id=141170
3512 <rdar://problem/19632080>
3514 Reviewed by Antti Koivisto.
3516 Add diagnostic logging for ResourceResponse's source (network, disk
3517 cache, disk cache after validation) to give us an idea of our network
3520 * loader/ResourceLoader.cpp:
3521 (WebCore::logResourceResponseSource):
3522 (WebCore::ResourceLoader::didReceiveResponse):
3523 * page/DiagnosticLoggingKeys.cpp:
3524 (WebCore::DiagnosticLoggingKeys::networkKey):
3525 (WebCore::DiagnosticLoggingKeys::diskCacheKey):
3526 (WebCore::DiagnosticLoggingKeys::diskCacheAfterValidationKey):
3527 (WebCore::DiagnosticLoggingKeys::resourceResponseKey):
3528 (WebCore::DiagnosticLoggingKeys::scriptKey):
3529 (WebCore::DiagnosticLoggingKeys::sourceKey):
3530 * page/DiagnosticLoggingKeys.h:
3532 2015-02-02 Dhi Aurrahman <diorahman@rockybars.com>
3534 Optimize matchesLangPseudoClass() of :lang()
3535 https://bugs.webkit.org/show_bug.cgi?id=140873
3537 Reviewed by Darin Adler.
3539 Avoid unnecessary memory allocation.
3541 No new tests, no behavior changed.
3543 * css/SelectorCheckerTestFunctions.h:
3544 (WebCore::equalIgnoringASCIICase):
3545 (WebCore::containslanguageSubtagMatchingRange):
3546 (WebCore::matchesLangPseudoClass):
3548 2015-02-02 Roger Fong <roger_fong@apple.com>
3550 WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 2).
3551 https://bugs.webkit.org/show_bug.cgi?id=141096
3552 <rdar://problem/15002469>
3554 Reviewed by Brent Fulgham.
3556 This patch handles some of the valid arguments that could be passed into getParameter.
3557 The unhandled cases will be implemented as the associated WebGL2 features are implemented.
3558 In addition, getParameter queries that return 64 bit integer currently just return 0 as
3559 we need to use ::glGetInteger64v which is only available in GLES 3.0 headers.
3560 I will be adding these headers in a future patch.
3562 * bindings/js/JSWebGL2RenderingContextCustom.cpp:
3563 (WebCore::toJS): Accept a 64 bit integer type.
3564 * html/canvas/WebGL2RenderingContext.cpp: Handle various parameter inputs.
3565 (WebCore::WebGL2RenderingContext::getParameter):
3566 * html/canvas/WebGLGetInfo.cpp: Add a 64 bit integer type.
3567 (WebCore::WebGLGetInfo::WebGLGetInfo):
3568 (WebCore::WebGLGetInfo::getInt64):
3569 * html/canvas/WebGLGetInfo.h:
3570 * html/canvas/WebGLRenderingContextBase.cpp:
3571 (WebCore::WebGLRenderingContextBase::getInt64Parameter):
3572 * html/canvas/WebGLRenderingContextBase.h:
3573 * platform/graphics/GraphicsContext3D.h:
3574 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3575 (WebCore::GraphicsContext3D::getInteger64v):
3577 2015-02-02 Zalan Bujtas <zalan@apple.com>
3579 Simple line layout: use std::upper_bound in splitFragmentToFitLine()
3580 https://bugs.webkit.org/show_bug.cgi?id=141146
3582 Reviewed by Antti Koivisto.
3584 Replace the custom binary search implementation with std::upper_bound and
3585 move splitting functionality to TextFragment.
3587 No change in functionality.
3589 * rendering/SimpleLineLayout.cpp:
3590 (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator):
3591 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++):
3592 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=):
3593 (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*):
3594 (WebCore::SimpleLineLayout::begin):
3595 (WebCore::SimpleLineLayout::end):
3596 (WebCore::SimpleLineLayout::splitFragmentToFitLine):
3597 * rendering/SimpleLineLayoutFlowContentsIterator.cpp:
3598 (WebCore::SimpleLineLayout::FlowContentsIterator::runWidth):
3599 * rendering/SimpleLineLayoutFlowContentsIterator.h:
3600 (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::split):
3602 2015-02-02 Geoffrey Garen <ggaren@apple.com>
3604 Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
3605 https://bugs.webkit.org/show_bug.cgi?id=140900
3607 Reviewed by Mark Hahnenberg.
3609 Re-landing just the HandleBlock piece of this patch.
3611 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3612 (WebCore::MemoryPressureHandler::install):
3614 2015-02-02 Brent Fulgham <bfulgham@apple.com>
3616 [Win] 64-bit build fix after r179492.
3618 * WebCore.vcxproj/WebCore.vcxproj: Forgot to build these files
3619 as standalone under 64-bit target.
3621 2015-02-02 Benjamin Poulain <bpoulain@apple.com>
3623 Clean up attribute handling: part 2 - attributeNode
3624 https://bugs.webkit.org/show_bug.cgi?id=141109
3626 Reviewed by Andreas Kling.
3628 Our implementation was covering some old legacy behaviors of Firefox,
3629 even copying bugs in some cases.
3631 The spec (https://dom.spec.whatwg.org) now defines the behavior precisely,
3632 let's move a bit closer to that.
3634 Tests: fast/dom/Element/attribute-ascii-case-insensitive-3.html
3635 fast/dom/Element/attribute-setAttributeNode-multiple-times.html
3636 fast/dom/Element/attribute-setAttributeNodeNS-multiple-times.html
3637 fast/dom/Element/mozilla-dom-base-tests/test_bug1075702.html
3638 fast/dom/Element/mozilla-dom-base-tests/test_bug339494.html
3639 fast/dom/Element/mozilla-dom-base-tests/test_bug364092.xhtml
3640 fast/dom/Element/setAttributeNode-overriding-lowercase-values.html
3643 (WebCore::findAttrNodeInList):
3644 New getter for the name-without-namespace case.
3646 (WebCore::Element::setAttributeNode):
3647 This one is the tricky one: https://dom.spec.whatwg.org/#dom-element-setattributenode
3649 When setAttributeNode() is used with an AttributeNode without namespace,
3650 getting the old value behaves like getAttribute(), with ASCII lowercase name matching.
3651 When used with a namespace, getting the old value behaves like getAttributeNS().
3653 Setting the value is a whole different story, the name used always keeps
3656 Now that's a bit tricky for us because AttributeNodes are just legacy stuff we don't
3659 We have 4 cases to handle:
3660 1) The name being set is lowercase, there was no conflicting name on the element.
3661 That's easy, we just override any node that would exist, set the name otherwise.
3662 2) The name is lowercase but there was an existing attribute for it.
3663 -We create a new AttributeNode for the name to represent the old name.
3664 -We check the names are the same with attribute.name().matches(attrNode->qualifiedName())
3665 and override the value.
3666 3) The name has uppercase characters, there is no conflicting name.
3667 We would not find an element to remove, we just use setAttributeInternal() as usual
3668 to add the attribute;
3669 4) The name has uppercase characters, there is a lowercase conflicing name.
3670 This is the weird behavior: we need to nuke the old attribute, then add the new attribute
3671 with a different case.
3673 First we remove the attribute with a lowercase name with removeAttributeInternal().
3674 That becomes the old node.
3676 There might still be an element of the same name as what we are trying to add. We don't want
3677 to add another version of the same attribute. We need to use findAttributeIndexByName() again
3678 to find if there is a conflicting attribute. Then we call setAttributeInternal() which handle
3679 the both the cases where there was an element or not.
3681 (WebCore::Element::setAttributeNodeNS):
3682 This should work like any "NS" method.
3684 (WebCore::Element::removeAttributeNode):
3685 The method removeAttributeNode() is supposed to be exact.
3687 (WebCore::Element::getAttributeNode):
3688 (WebCore::Element::hasAttribute):
3689 (WebCore::Element::attrIfExists):
3691 * dom/ElementData.cpp:
3692 (WebCore::ElementData::findAttributeIndexByNameSlowCase): Deleted.
3693 (WebCore::ElementData::findAttributeIndexByNameForAttributeNode): Deleted.
3694 Kill the slow case, every caller has been updated now.
3695 * dom/ElementData.h:
3696 (WebCore::ElementData::findAttributeIndexByName):
3697 * dom/QualifiedName.h:
3698 (WebCore::QualifiedName::matchesIgnoringCaseForLocalName): Deleted.
3700 2015-02-02 peavo@outlook.com <peavo@outlook.com>
3702 Memory is written to after deallocated, in GraphicsLayer::setMaskLayer.
3703 https://bugs.webkit.org/show_bug.cgi?id=141168
3705 Reviewed by Brent Fulgham.
3707 Visual Studio detected that a deallocated heap block had been modified in GraphicsLayer::setMaskLayer,
3708 when called from RenderLayerBacking::updateChildClippingStrategy.
3710 * rendering/RenderLayerBacking.cpp:
3711 (WebCore::RenderLayerBacking::updateChildClippingStrategy):
3713 2015-02-02 Andreas Kling <akling@apple.com>
3715 [Cocoa] Make decoded image data purgeable ASAP.
3716 <https://webkit.org/b/140298>
3717 <rdar://problem/19623377>
3719 Reviewed by Antti Koivisto.
3721 Re-landing this patch since it turned out to not be the cause of
3722 the memory regression we saw around that revision.
3724 Mark decoded images as "transient" which makes CoreGraphics mark
3725 the backing stores as purgeable shortly after they're used.
3727 The decoded representation will remain in CoreGraphics's caches
3728 indefinitely unless the kernel gets starved and needs the pages.
3730 Most resources will now reach a state where the encoded data is
3731 mmap'ed from disk cache (once the entire resource is downloaded)
3732 and the decoded data is purgeable.
3734 This also has the side effect of making the MemoryCache more
3735 palatial since the decoded data cost can be deducted for images,
3736 allowing us to cache more resources.
3738 Note that the worst case for this new behavior would be something
3739 like hovering below 100% memory utilization and constantly having
3740 to drop and re-decode images. While churny, it still beats
3741 crashing the process, plus there's tiling to remove many of the
3742 reasons we'd need the decoded data.
3744 * platform/graphics/cg/ImageSourceCG.cpp:
3745 (WebCore::ImageSource::createFrameAtIndex):
3747 2015-02-02 Joseph Pecoraro <pecoraro@apple.com>
3749 Web Inspector: Support console.table
3750 https://bugs.webkit.org/show_bug.cgi?id=141058
3752 Reviewed by Timothy Hatcher.
3754 * inspector/CommandLineAPIModuleSource.js:
3755 Include "table(foo)" as an alias of "console.table(foo)" on
3758 2015-02-02 Roger Fong <roger_fong@apple.com>
3760 [Win] Build fix following r179482.
3762 * WebCore.vcxproj/WebCore.vcxproj:
3763 * WebCore.vcxproj/WebCore.vcxproj.filters:
3764 * bindings/js/JSBindingsAllInOne.cpp:
3765 * platform/graphics/GraphicsContext3D.h:
3767 2015-02-02 Chris Dumez <cdumez@apple.com>
3769 Access MemoryCache singleton using MemoryCache::singleton()
3770 https://bugs.webkit.org/show_bug.cgi?id=141104
3772 Reviewed by Andreas Kling.
3774 Access MemoryCache singleton using MemoryCache::singleton() static
3775 member function, instead of a free function, as per the recent
3776 coding style discussion on WebKit-dev.
3778 2015-02-02 Zalan Bujtas <zalan@apple.com>
3780 Ambiguous naming: Do not call replacedContentRect()'s return value paint rect.
3781 https://bugs.webkit.org/show_bug.cgi?id=141125
3783 Reviewed by Simon Fraser.
3785 It's the content box rect with the object-fit adjustment.
3787 No change in functionality.
3789 * rendering/RenderHTMLCanvas.cpp:
3790 (WebCore::RenderHTMLCanvas::paintReplaced):
3791 * rendering/RenderImage.cpp:
3792 (WebCore::RenderImage::updateInnerContentRect):
3793 (WebCore::RenderImage::paintReplaced):
3794 * rendering/RenderReplaced.cpp:
3795 (WebCore::RenderReplaced::replacedContentRect):
3796 * rendering/SimpleLineLayout.cpp:
3797 (WebCore::SimpleLineLayout::splitFragmentToFitLine):
3799 2015-02-02 Brent Fulgham <bfulgham@apple.com>
3801 [Win] Build fix after r179476.
3802 https://bugs.webkit.org/show_bug.cgi?id=141026
3804 Reviewed by Anders Carlsson.
3806 MSVC has a compiler bug that forces us to make some explicit statements about how
3807 the passed pointer values are handled.
3809 * css/CSSParser.cpp:
3810 (WebCore::CSSParser::SourceSize::SourceSize):
3811 (WebCore::CSSParser::sourceSize):
3814 2015-02-02 Benjamin Poulain <benjamin@webkit.org>
3816 Get rid of invalidSelectorVector, use Bison's error recovery instead
3817 https://bugs.webkit.org/show_bug.cgi?id=141147
3819 Reviewed by Darin Adler.
3821 * css/CSSGrammar.y.in:
3822 Instead of reducing a null selector, we can use a real parsing error
3823 to get out of invalid selector endings.
3825 When that happens, Bison will pop the stack until it can reduce any
3826 valid error recovery rules.
3828 The problem is to make sure there is no floating values because
3829 none of the reduce block between the error and the recovery would
3832 In this case, "nth_selector_ending" is a non-recursive production of
3833 the NTHCHILDFUNCTIONS. In turn, NTHCHILDFUNCTIONS are productions
3834 of the non-recursive "pseudo". "pseudo" is only used as a trivial
3835 production of "specifier". "specifier" is only used by "specifier_list".
3837 "specifier_list" has error recovery code -> no production could have
3838 generated a floating values between "specifier_list" and "nth_selector_ending".
3840 2015-01-30 Roger Fong <roger_fong@apple.com>
3842 WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 1).
3843 https://bugs.webkit.org/show_bug.cgi?id=141096
3844 <rdar://problem/15002469>
3846 Reviewed by Brent Fulgham.
3848 This patch implements the WebGL2 versions of getParameter, getIndexedParameter and isEnabled.
3849 It also removes the WebGL1 implementations from WebGLRenderingContextBase and moves it to WebGLRenderingContext.
3850 I’ve stubbed out most of the parameters for now, some of which will be implemented in Part 2,
3851 and the rest as the our WebGL2 implementation progresses.
3853 * bindings/js/JSWebGL2RenderingContextCustom.cpp:
3855 (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
3856 * html/canvas/WebGL2RenderingContext.cpp:
3857 (WebCore::WebGL2RenderingContext::getIndexedParameter):
3858 (WebCore::WebGL2RenderingContext::getParameter):
3859 (WebCore::WebGL2RenderingContext::validateCapability):
3860 * html/canvas/WebGL2RenderingContext.h:
3861 * html/canvas/WebGL2RenderingContext.idl:
3862 * html/canvas/WebGLRenderingContext.cpp:
3863 (WebCore::WebGLRenderingContext::getParameter):
3864 (WebCore::WebGLRenderingContext::validateCapability):
3865 * html/canvas/WebGLRenderingContext.h:
3866 * html/canvas/WebGLRenderingContextBase.cpp:
3867 (WebCore::WebGLRenderingContextBase::getParameter): Deleted.
3868 (WebCore::WebGLRenderingContextBase::validateCapability): Deleted.
3869 * html/canvas/WebGLRenderingContextBase.h:
3870 * html/canvas/WebGLRenderingContextBase.idl:
3871 * platform/graphics/GraphicsContext3D.h:
3873 2015-02-02 Daniel Bates <dabates@apple.com>
3875 [iOS] ASSERTION FAILED: m_scriptExecutionContext->isContextThread() in ContextDestructionObserver::observeContext
3876 https://bugs.webkit.org/show_bug.cgi?id=141057
3877 <rdar://problem/19068790>
3879 Reviewed by Alexey Proskuryakov.
3881 Fixes an issue where we would create-/delete- the RSA crypto keys and dispatch callbacks on the wrong
3882 thread in WebKit1 for iOS. In iOS WebKit1 we should perform such operations on thread WebThread.
3884 This change is covered by existing layout tests.
3886 * crypto/mac/CryptoKeyRSAMac.cpp:
3887 (WebCore::CryptoKeyRSA::generatePair):
3889 2015-02-02 Jeremy Jones <jeremyj@apple.com>
3891 Prevent crash when accessing WebAVPlayerController.delegate.
3892 https://bugs.webkit.org/show_bug.cgi?id=140893
3894 Reviewed by Darin Adler.
3896 This patch aims to prevent a null delegate access during invalidation by adding null checks before accessing the delegate, by making explicit the recreation of m_playerController, and by consolidating and correcting the teardown sequence.
3899 * platform/ios/WebVideoFullscreenInterface.h: add resetMediaState()
3900 * platform/ios/WebVideoFullscreenInterfaceAVKit.h: ditto.
3901 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3902 (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Check for null before accessing delegate.
3903 (-[WebAVPlayerController play:]): ditto.
3904 (-[WebAVPlayerController pause:]): ditto.
3905 (-[WebAVPlayerController togglePlayback:]): ditto.
3906 (-[WebAVPlayerController setPlaying:]): ditto.
3907 (-[WebAVPlayerController beginScrubbing:]): ditto.
3908 (-[WebAVPlayerController endScrubbing:]): ditto.
3909 (-[WebAVPlayerController seekToTime:]): ditto.
3910 (-[WebAVPlayerController beginScanningForward:]): ditto.
3911 (-[WebAVPlayerController endScanningForward:]): ditto.
3912 (-[WebAVPlayerController beginScanningBackward:]): ditto.
3913 (-[WebAVPlayerController endScanningBackward:]): ditto.
3914 (-[WebAVPlayerController seekToBeginning:]): ditto.
3915 (-[WebAVPlayerController seekToEnd:]): ditto.
3916 (-[WebAVPlayerController setCurrentAudioMediaSelectionOption:]): ditto.
3917 (-[WebAVPlayerController setCurrentLegibleMediaSelectionOption:]): ditto.
3918 (-[WebAVPlayerController layoutSublayersOfLayer:]): ditto.
3919 (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): initialize m_playerController
3920 (WebVideoFullscreenInterfaceAVKit::resetMediaState): Added.
3921 (WebVideoFullscreenInterfaceAVKit::setDuration): remove playerController()
3922 (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto.
3923 (WebVideoFullscreenInterfaceAVKit::setRate): ditto.
3924 (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto.
3925 (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto.
3926 (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse): ditto.
3927 (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto.
3928 (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto.
3929 (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto.
3930 (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): ditto.
3931 (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): ditto.
3932 (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): consolidated cleanup code from invalidate()
3933 (WebVideoFullscreenInterfaceAVKit::invalidate): consolidate cleanup code.
3934 (WebVideoFullscreenInterfaceAVKit::playerController): Deleted.
3935 * platform/ios/WebVideoFullscreenModelVideoElement.mm:
3936 (WebVideoFullscreenModelVideoElement::setVideoElement): call resetMediaState()
3938 2015-02-02 Darin Adler <darin@apple.com>
3940 REGRESSION (r170576): Storage leaks in parsing of CSS image sizes
3941 https://bugs.webkit.org/show_bug.cgi?id=141026
3943 Reviewed by Anders Carlsson.
3945 * css/CSSGrammar.y.in: Fixed all the shift/reduce conflicts caused
3946 by the ENABLE_PICTURE_SIZES code by removing all the redundant
3947 maybe_space which caused them. Rearranged the productions for
3948 ENABLE_PICTURE_SIZES to tighten up the code quite a bit. Changed
3949 the code to build up the source size vector as a Vector instead of
3950 a special class, and use the SourceSize struct from inside the
3953 * css/CSSParser.cpp:
3954 (WebCore::CSSParser::setupParser): Changed this to take a StringView.
3955 In the future we can change all the parsing functions to take StringView,
3956 since they don't work with the String in place.
3957 (WebCore::CSSParser::parseSizesAttribute): Changed to return a vector