1 2015-06-05 Manuel Rego Casasnovas <rego@igalia.com>
3 [CSS Grid Layout] Support dots sequences in grid-template-areas
4 https://bugs.webkit.org/show_bug.cgi?id=145693
6 Reviewed by Sergio Villar Senin.
8 The CSS WG agreed to consider a sequence of "." characters a single null
9 cell token for grid-template-areas. That way authors can match the
10 number of dots to the width of the column.
12 For more information see:
13 https://lists.w3.org/Archives/Public/www-style/2015May/0175.html
15 Added new test cases to check the new behavior.
18 (WebCore::containsOnlyDots): New helper function to check that the grid
19 area name is composed by only dots.
20 (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
21 function to look for unnamed areas.
23 2015-06-04 Joonghun Park <jh718.park@samsung.com>
25 Purge PassRefPtr create() factory functions in WebCore/css
26 https://bugs.webkit.org/show_bug.cgi?id=144905
28 Reviewed by Darin Adler.
30 Return Ref instead of PassRefPtr in create() factory functions in css,
31 because the factory can't return null.
33 No new tests, no new behaviours.
35 * css/BasicShapeFunctions.cpp:
36 (WebCore::valueForCenterCoordinate):
37 (WebCore::basicShapeRadiusToCSSValue):
38 (WebCore::valueForBasicShape):
39 * css/BasicShapeFunctions.h:
40 * css/CSSBasicShapes.h:
41 * css/CSSCalculationValue.cpp:
43 (WebCore::CSSCalcValue::create):
44 * css/CSSCalculationValue.h:
45 * css/CSSCharsetRule.h:
46 * css/CSSComputedStyleDeclaration.cpp:
47 (WebCore::valueForNinePieceImageSlice):
48 (WebCore::valueForNinePieceImageQuad):
49 (WebCore::zoomAdjustedPixelValue):
50 (WebCore::zoomAdjustedNumberValue):
51 (WebCore::zoomAdjustedPixelValueForLength):
52 (WebCore::valueForReflection):
53 (WebCore::createPositionListForLayer):
54 (WebCore::positionOffsetValue):
55 (WebCore::percentageOrZoomAdjustedValue):
56 (WebCore::autoOrZoomAdjustedValue):
57 (WebCore::getBorderRadiusCornerValues):
58 (WebCore::getBorderRadiusCornerValue):
59 (WebCore::getBorderRadiusShorthandValue):
60 (WebCore::matrixTransformValue):
61 (WebCore::computedTransform):
62 (WebCore::adjustLengthForZoom):
63 (WebCore::ComputedStyleExtractor::valueForShadow):
64 (WebCore::ComputedStyleExtractor::valueForFilter):
65 (WebCore::specifiedValueForGridTrackBreadth):
66 (WebCore::specifiedValueForGridTrackSize):
67 (WebCore::valueForGridTrackList):
68 (WebCore::scrollSnapDestination):
69 (WebCore::scrollSnapPoints):
70 (WebCore::scrollSnapCoordinates):
71 (WebCore::createAnimationTriggerValue):
72 (WebCore::getAnimationTriggerValue):
73 (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
74 (WebCore::fillSizeToCSSValue):
75 (WebCore::lineHeightFromStyle):
76 (WebCore::fontSizeFromStyle):
77 (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
78 (WebCore::shapePropertyValue):
79 (WebCore::ComputedStyleExtractor::propertyValue):
80 * css/CSSComputedStyleDeclaration.h:
82 (WebCore::CSSFontFace::create):
83 * css/CSSFontFaceLoadEvent.h:
84 * css/CSSFontFaceRule.h:
85 * css/CSSGrammar.y.in:
86 * css/CSSGridLineNamesValue.cpp:
87 (WebCore::CSSGridLineNamesValue::cloneForCSSOM):
88 * css/CSSGridLineNamesValue.h:
89 (WebCore::CSSGridLineNamesValue::create):
90 * css/CSSImportRule.h:
91 * css/CSSKeyframeRule.h:
92 (WebCore::StyleKeyframe::create):
93 * css/CSSKeyframesRule.h:
97 (WebCore::CSSParser::parseGridLineNames):
98 (WebCore::CSSParser::parseDashboardRegions):
99 (WebCore::CSSParser::parseClipShape):
100 (WebCore::CSSParser::parseBasicShape):
101 (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
102 (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
104 (WebCore::CSSParser::ValueWithCalculation::calculation):
105 * css/CSSPrimitiveValue.cpp:
106 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
107 (WebCore::CSSPrimitiveValue::init):
108 (WebCore::CSSPrimitiveValue::cloneForCSSOM):
109 * css/CSSPrimitiveValue.h:
110 (WebCore::CSSPrimitiveValue::create):
111 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
112 * css/CSSPropertySourceData.h:
113 (WebCore::CSSStyleSourceData::create):
114 (WebCore::CSSRuleSourceData::create):
115 (WebCore::CSSRuleSourceData::createUnknown):
117 * css/CSSSegmentedFontFace.h:
118 (WebCore::CSSSegmentedFontFace::create):
119 * css/CSSSelector.cpp:
120 (WebCore::CSSSelector::createRareData):
122 (WebCore::CSSSelector::RareData::create):
123 * css/CSSStyleRule.h:
124 * css/CSSSupportsRule.h:
125 * css/CSSValuePool.h:
126 (WebCore::CSSValuePool::createValue):
127 * css/FontLoader.cpp:
128 (WebCore::LoadFontCallback::create):
129 * css/LengthRepeat.h:
130 (WebCore::LengthRepeat::create):
131 (WebCore::LengthRepeat::cloneForCSSOM):
133 (WebCore::MediaQuerySet::create):
134 (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
135 (WebCore::MediaList::create):
136 * css/MediaQueryList.cpp:
137 (WebCore::MediaQueryList::create):
138 * css/MediaQueryList.h:
139 * css/MediaQueryMatcher.h:
140 (WebCore::MediaQueryMatcher::create):
142 (WebCore::Pair::create):
144 (WebCore::Rect::create):
145 (WebCore::Rect::cloneForCSSOM):
146 (WebCore::Quad::create):
147 (WebCore::Quad::cloneForCSSOM):
148 * css/SVGCSSComputedStyleDeclaration.cpp:
149 (WebCore::paintOrder):
150 (WebCore::ComputedStyleExtractor::svgPropertyValue):
152 (WebCore::StyleMedia::create):
153 * css/StyleResolver.cpp:
154 (WebCore::StyleResolver::keyframeStylesForAnimation):
155 * css/StyleSheetList.h:
156 (WebCore::StyleSheetList::create):
157 * css/ViewportStyleResolver.h:
158 (WebCore::ViewportStyleResolver::create):
159 * css/WebKitCSSMatrix.h:
160 * css/WebKitCSSRegionRule.h:
161 * css/WebKitCSSViewportRule.h:
162 * page/animation/CSSPropertyAnimation.cpp:
163 (WebCore::blendFilter):
164 * rendering/style/RenderStyle.h:
165 (WebCore::adjustFloatForAbsoluteZoom):
166 * rendering/style/StyleInheritedData.h:
168 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
170 The last 2 merged DFAs are not minimized by DFACombiner
172 * contentextensions/DFACombiner.cpp:
173 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
174 I introduced a bug when I made minimization conditional: the last merge
175 does not minimize if we do not reach the minimum size.
177 2015-06-04 Brent Fulgham <bfulgham@apple.com>
179 Latching algorithm in findEnclosingOverflowScroll is broken
180 https://bugs.webkit.org/show_bug.cgi?id=145642
181 <rdar://problem/21242308>
183 Reviewed by Simon Fraser.
185 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
187 * page/mac/EventHandlerMac.mm:
188 (WebCore::scrollableAreaForBox): Added helper function.
189 (WebCore::findEnclosingScrollableContainer): Renamed from findEnclosingOverflowScroll.
190 Only identify something as our scroll element if it can be scrolled in either
191 axis of the gesture's motion.
192 (WebCore::scrollableAreaForContainerNode): Use new helper function.
193 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
194 name, and pass horizontal and vertical deltas.
195 (WebCore::findEnclosingOverflowScroll): Deleted.
197 2015-06-04 Gyuyoung Kim <gyuyoung.kim@webkit.org>
199 REGRESSION(r185091): Crash happens on indexdb tests
200 https://bugs.webkit.org/show_bug.cgi?id=145549
202 Reviewed by Darin Adler.
204 * Modules/indexeddb/IDBDatabaseError.h:
205 (WebCore::IDBDatabaseError::create): Revert Ref usage of IDBDatabaseError::create().
207 2015-06-04 Simon Fraser <simon.fraser@apple.com>
209 Crash in EventDispatcher::dispatchEvent entering a location on Google Maps
210 https://bugs.webkit.org/show_bug.cgi?id=145677
211 rdar://problem/20698280
213 Reviewed by Dean Jackson.
215 If a transition is running on a pseudo-element, and the host element is removed
216 from the DOM just as the transition ends, and there is a transition event listener,
217 then we'd crash with a null dereference in event dispatch code.
219 AnimationController tries to clean up running animations when renderers are destroyed,
220 but omitted to remove the element from two vectors that store element references.
221 Elements are only added to these vectors briefly on animation end, before firing
222 events, but failure to remove the vector entries could result in attempting
223 to fire an event on a pseudo-element with no host element.
225 Also convert EventDispatcher code to be more robust to potentially null event
226 targets, since it's not clear that eventTargetRespectingTargetRules() can always
227 manage to return a non-null node.
229 Hard to make a test because this is timing sensitive.
231 * dom/EventDispatcher.cpp:
232 (WebCore::eventTargetRespectingTargetRules):
233 (WebCore::EventDispatcher::dispatchScopedEvent):
234 (WebCore::EventDispatcher::dispatchEvent):
235 (WebCore::EventPath::EventPath):
236 * page/animation/AnimationController.cpp:
237 (WebCore::AnimationControllerPrivate::clear):
239 2015-06-04 Hunseop Jeong <hs85.jeong@samsung.com>
241 Replace 0 with nullptr in WebCore/Page.
242 https://bugs.webkit.org/show_bug.cgi?id=145631
244 Reviewed by Darin Adler.
246 No new tests, no behavior changes.
248 * page/AutoscrollController.cpp:
249 (WebCore::AutoscrollController::AutoscrollController):
250 (WebCore::AutoscrollController::stopAutoscrollTimer):
251 * page/ContentSecurityPolicy.cpp:
252 (WebCore::CSPSourceList::parseSource):
253 * page/ContentSecurityPolicy.h:
254 * page/ContextMenuController.cpp:
255 (WebCore::ContextMenuController::clearContextMenu):
256 * page/DOMSelection.cpp:
257 (WebCore::DOMSelection::clearTreeScope):
258 * page/DOMWindow.cpp:
259 (WebCore::DOMWindow::resetDOMWindowProperties):
260 (WebCore::DOMWindow::localStorage):
261 (WebCore::DOMWindow::focus):
263 * page/DOMWindowExtension.cpp:
264 (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
265 (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
266 * page/DOMWindowProperty.cpp:
267 (WebCore::DOMWindowProperty::DOMWindowProperty):
268 (WebCore::DOMWindowProperty::~DOMWindowProperty):
269 (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
270 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
271 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
272 * page/DragController.cpp:
273 (WebCore::DragController::dragEnded):
274 (WebCore::DragController::performDragOperation):
275 (WebCore::DragController::tryDocumentDrag):
276 (WebCore::DragController::concludeEditDrag):
277 (WebCore::DragController::startDrag):
278 * page/EventHandler.cpp:
279 (WebCore::EventHandler::EventHandler):
280 (WebCore::EventHandler::resizeLayerDestroyed):
281 (WebCore::EventHandler::freeDataTransfer):
282 (WebCore::EventHandler::dragSourceEndedAt):
283 (WebCore::EventHandler::handleDrag):
284 * page/EventHandler.h:
285 * page/FocusController.cpp:
286 (WebCore::FocusController::advanceFocusInDocumentOrder):
288 (WebCore::Frame::~Frame):
289 (WebCore::Frame::searchForLabelsBeforeElement):
290 (WebCore::Frame::willDetachPage):
291 (WebCore::Frame::createView):
293 (WebCore::Frame::detachFromPage):
294 * page/FrameDestructionObserver.cpp:
295 (WebCore::FrameDestructionObserver::FrameDestructionObserver):
296 (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
297 (WebCore::FrameDestructionObserver::frameDestroyed):
298 * page/FrameTree.cpp:
299 (WebCore::FrameTree::~FrameTree):
300 (WebCore::FrameTree::removeChild):
302 (WebCore::FrameTree::FrameTree):
303 (WebCore::FrameTree::detachFromParent):
305 (WebCore::History::History):
307 (WebCore::Page::Page):
308 (WebCore::Page::~Page):
309 (WebCore::Page::findStringMatchingRanges):
310 * page/PageGroup.cpp:
311 * page/Performance.cpp:
312 (WebCore::Performance::Performance):
313 * page/PointerLockController.cpp:
314 (WebCore::PointerLockController::didLosePointerLock):
315 (WebCore::PointerLockController::clearElement):
316 * page/SecurityOrigin.h:
317 (WebCore::SecurityOrigin::canAccessDatabase):
319 (WebCore::Settings::Settings):
320 * page/SpatialNavigation.cpp:
321 (WebCore::FocusCandidate::FocusCandidate):
322 * page/SpatialNavigation.h:
323 (WebCore::FocusCandidate::FocusCandidate):
324 * page/scrolling/ScrollingTreeNode.cpp:
325 (WebCore::ScrollingTreeNode::ScrollingTreeNode):
326 * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
327 (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
329 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
331 Combine tiny DFAs into slightly larger ones
332 https://bugs.webkit.org/show_bug.cgi?id=145572
334 Reviewed by Alex Christensen.
336 This patch changes the ContentExtensions compiler to combine tiny DFA
337 until they reach a minimum size.
339 The main tool introduced here is DFAMerger. It combines 2 DFAs into
340 a single DFA that represent the union of the two machines.
341 That is done by a simple subset construction on the "name" of the nodes
344 Since we only merge 2 machines, and they are both deterministic, we know that
345 we can only be in one state of each machine, or a state in one machine without
346 equivalent in the other machine.
347 We exploit that to identify the mapping between nodes. To identify a node in
348 the new machine from nodes in the original machines, we just concatenate the node
349 IDs into a single 64 bits number. If there is no node in one of the machine, we
352 The current algorithm does not have any subgraph pruning, machines grow very very
353 quickly. Because of that, we only merge very small DFAs at the moment.
355 Test: http/tests/contentextensions/filters-with-quantifiers-combined.html
357 * WebCore.xcodeproj/project.pbxproj:
358 * contentextensions/ContentExtensionCompiler.cpp:
359 (WebCore::ContentExtensions::compileRuleList):
360 * contentextensions/ContentExtensionsDebugging.h:
361 * contentextensions/DFA.cpp:
362 (WebCore::ContentExtensions::DFA::graphSize):
363 (WebCore::ContentExtensions::DFA::debugPrintDot):
364 * contentextensions/DFA.h:
365 * contentextensions/DFACombiner.cpp: Added.
366 (WebCore::ContentExtensions::DFAMerger::DFAMerger):
367 (WebCore::ContentExtensions::DFAMerger::merge):
368 (WebCore::ContentExtensions::DFAMerger::signatureForIndices):
369 (WebCore::ContentExtensions::DFAMerger::extractIndexA):
370 (WebCore::ContentExtensions::DFAMerger::extractIndexB):
371 (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
372 (WebCore::ContentExtensions::DFAMerger::setHalfSignature):
373 (WebCore::ContentExtensions::DFAMerger::populateTransitions):
374 (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions):
375 (WebCore::ContentExtensions::DFAMerger::createTransitions):
376 (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded):
377 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
378 * contentextensions/DFACombiner.h: Copied from Source/WebCore/contentextensions/DFA.h.
379 (WebCore::ContentExtensions::DFACombiner::addDFA):
381 2015-06-04 Matt Rajca <mrajca@apple.com>
383 Rename MediaSessionManager to PlatformMediaSessionManager for consistency with PlatformMediaSession.
384 https://bugs.webkit.org/show_bug.cgi?id=145648
386 Reviewed by Eric Carlson.
388 * WebCore.vcxproj/WebCore.vcxproj:
389 * WebCore.vcxproj/WebCore.vcxproj.filters:
390 * WebCore.xcodeproj/project.pbxproj:
391 * html/HTMLMediaElement.cpp:
392 * html/MediaElementSession.cpp:
393 (WebCore::MediaElementSession::effectivePreloadForElement):
394 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
395 * platform/audio/PlatformMediaSession.cpp:
396 (WebCore::PlatformMediaSession::PlatformMediaSession):
397 (WebCore::PlatformMediaSession::~PlatformMediaSession):
398 (WebCore::PlatformMediaSession::clientWillBeginPlayback):
399 (WebCore::PlatformMediaSession::clientWillPausePlayback):
400 (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
401 (WebCore::PlatformMediaSession::updateClientDataBuffering):
402 * platform/audio/PlatformMediaSessionManager.cpp: Renamed from Source/WebCore/platform/audio/MediaSessionManager.cpp.
403 (WebCore::PlatformMediaSessionManager::sharedManager):
404 (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
405 (WebCore::PlatformMediaSessionManager::resetRestrictions):
406 (WebCore::PlatformMediaSessionManager::has):
407 (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
408 (WebCore::PlatformMediaSessionManager::count):
409 (WebCore::PlatformMediaSessionManager::beginInterruption):
410 (WebCore::PlatformMediaSessionManager::endInterruption):
411 (WebCore::PlatformMediaSessionManager::addSession):
412 (WebCore::PlatformMediaSessionManager::removeSession):
413 (WebCore::PlatformMediaSessionManager::addRestriction):
414 (WebCore::PlatformMediaSessionManager::removeRestriction):
415 (WebCore::PlatformMediaSessionManager::restrictions):
416 (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
417 (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
418 (WebCore::PlatformMediaSessionManager::setCurrentSession):
419 (WebCore::PlatformMediaSessionManager::currentSession):
420 (WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback):
421 (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):
422 (WebCore::PlatformMediaSessionManager::applicationWillEnterBackground):
423 (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground):
424 (WebCore::PlatformMediaSessionManager::updateSessionState):
425 (WebCore::PlatformMediaSessionManager::didReceiveRemoteControlCommand):
426 (WebCore::PlatformMediaSessionManager::systemWillSleep):
427 (WebCore::PlatformMediaSessionManager::systemDidWake):
428 (WebCore::PlatformMediaSessionManager::audioOutputDeviceChanged):
429 * platform/audio/PlatformMediaSessionManager.h: Renamed from Source/WebCore/platform/audio/MediaSessionManager.h.
430 (WebCore::PlatformMediaSessionManager::~PlatformMediaSessionManager):
431 (WebCore::PlatformMediaSessionManager::configureWireLessTargetMonitoring):
432 (WebCore::PlatformMediaSessionManager::hasWirelessTargetsAvailable):
433 (WebCore::PlatformMediaSessionManager::sessions):
434 * platform/audio/mac/AudioDestinationMac.cpp:
435 * platform/audio/mac/MediaSessionManagerMac.cpp:
436 (PlatformMediaSessionManager::updateSessionState):
437 (MediaSessionManager::updateSessionState): Deleted.
438 * testing/Internals.cpp:
440 2015-06-04 Eric Carlson <eric.carlson@apple.com>
442 [Mac] Don't show default controls after playing to wireless target, again
443 https://bugs.webkit.org/show_bug.cgi?id=145620
444 <rdar://problem/21145806>
446 Reviewed by Dean Jackson.
448 Follow up to fix two tests broken by r185207.
450 * Modules/mediacontrols/mediaControlsApple.js:
451 (Controller.prototype.updateControls): Always show controls when the video element
452 is the fullscreen element because custom controls aren't possible.
454 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
456 [Cocoa] Add ASSERT to FontPlatformData::ctFont()
457 https://bugs.webkit.org/show_bug.cgi?id=145659
459 Reviewed by Dean Jackson.
461 The new ASSERT needs to be guarded with CORETEXT_WEB_FONTS, which is defined in FontCustomPlatformData.h,
462 and is not accessible to FontPlatformData. Therefore, I've moved the definition into TextFlags.h, which
465 No new tests because there is no behavior change.
467 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
468 (WebCore::FontPlatformData::ctFont): Add the ASSERT.
469 * platform/graphics/mac/FontCustomPlatformData.h: Move the CORETEXT_WEB_FONTS preprocessor
471 * platform/text/TextFlags.h: ... to here.
473 2015-06-04 Commit Queue <commit-queue@webkit.org>
475 Unreviewed, rolling out r185208.
476 https://bugs.webkit.org/show_bug.cgi?id=145655
478 platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-
479 latched-select.html (Requested by shallawa on #webkit).
483 "Latching algorithm in findEnclosingOverflowScroll is broken"
484 https://bugs.webkit.org/show_bug.cgi?id=145642
485 http://trac.webkit.org/changeset/185208
487 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
489 [Cocoa] Remove unnecessary code from FontPlatformData::ctFont()
490 https://bugs.webkit.org/show_bug.cgi?id=145652
492 Hoefler Text Italic no longer has initial and final swashes by default, so there
493 is no reason to explicitly disable them.
495 Reviewed by Andreas Kling.
497 No new tests because there is no behavior change.
499 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
500 (WebCore::FontPlatformData::ctFont):
501 (WebCore::createFeatureSettingDictionary): Deleted.
502 (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Deleted.
504 2015-06-04 Brent Fulgham <bfulgham@apple.com>
506 Latching algorithm in findEnclosingOverflowScroll is broken
507 https://bugs.webkit.org/show_bug.cgi?id=145642
508 <rdar://problem/21242308>
510 Reviewed by Simon Fraser.
512 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
514 * page/mac/EventHandlerMac.mm:
515 (WebCore::findEnclosingOverflowScrollForDominantDirection): Renamed from
516 'findEnclosingOverflowScroll'. Only identify element as our overflow
517 scroll element if it can be scrolled in either axis of the gesture's
519 (WebCore::scrolledToEdgeInDominantDirection): Renamed.
520 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
521 name, and pass horizontal and vertical deltas.
522 (WebCore::findEnclosingOverflowScroll): Deleted.
524 2015-06-04 Eric Carlson <eric.carlson@apple.com>
526 [Mac] Don't show default controls after playing to wireless target, again
527 https://bugs.webkit.org/show_bug.cgi?id=145620
528 <rdar://problem/21145806>
530 Reviewed by Dean Jackson.
532 * Modules/mediacontrols/mediaControlsApple.js:
533 (Controller.prototype.updateControls): Show or hide the panel as appropriate.
534 (Controller.prototype.handleWrapperMouseMove): Early return if !video.controls.
535 (Controller.prototype.addControls): Call updateControls instead of this.setNeedsTimelineMetricsUpdate
536 so all needed setup is done.
537 (Controller.prototype.resetHideControlsTimer): Only start the hide timer if playing.
539 2015-06-04 Chris Dumez <cdumez@apple.com>
541 [WK2] Prune more resources from the MemoryCache before process suspension
542 https://bugs.webkit.org/show_bug.cgi?id=145633
544 Reviewed by Andreas Kling.
546 Prune more resources from the MemoryCache before process suspension or
547 on simulated memory warning by doing a synchronous JS garbage collection
548 and sweep *before* pruning dead resources from the memory cache.
549 Previously, we would do the garbage collection after pruning the
550 MemoryCache which meant that a lot of resources became dead after we
553 At the end a basic browsing on apple.com, we are able to remove ~17%
554 more resources from the MemoryCache on simulated memory warning with this
557 Pruning as much as we can from the memory cache on critical memory
558 pressure or before process suspension is not only useful to free up
559 memory but also to make room in the vnode table as a lot of
560 CachedResources are mmmap'd from the network disk cache.
562 * platform/MemoryPressureHandler.cpp:
563 (WebCore::MemoryPressureHandler::MemoryPressureHandler):
564 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
566 - Pass 'synchronous' argument so that we know if we need to do a
567 synchronous JS garbage collection.
568 - Move here code from in the Cocoa handler that is doing a JS garbage
569 collection as well as a sweep, and make this code cross-platform.
570 This code used to be iOS specific but I see no reason we shouldn't
573 (WebCore::MemoryPressureHandler::releaseMemory):
574 * platform/MemoryPressureHandler.h:
576 Use enum class arguments for critical / synchronous. The 'synchronous'
577 argument is new so that the call site can let us know if memory needs
578 to be freed synchronously (e.g. in case of imminent process suspension).
580 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
581 (WebCore::MemoryPressureHandler::platformReleaseMemory):
583 Remove iOS-specific code that was doing a JS garbage collection and
584 sweep as this code is now in the generic memory pressure handler.
586 (WebCore::MemoryPressureHandler::install):
588 On simulated memory pressure, set 'synchronous' argument to Yes so that
589 a synchronous GC is done by the generic memory pressure handler. This
590 way, we no longer need to do a sync GC after calling the memory pressure
591 handler. This avoids code duplication and makes sure the GC is done
592 before pruning the memory cache.
595 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
597 [Cocoa] Clean up m_isEmoji in FontPlatformData
598 https://bugs.webkit.org/show_bug.cgi?id=145644
600 Reviewed by Andreas Kling.
602 m_isEmoji used to be a public member variable only defined on iOS. This
603 means that, whenever it was consulted, the sites were surrounded by
604 PLATFORM(IOS) guards. A cleaner design is to use a getter and setter,
605 which on non-iOS platforms, always return false / do nothing. Then, the
606 use sites can just use these functions without having ugly guards.
608 No new tests because there is no behavior change.
610 * platform/graphics/FontPlatformData.h:
611 (WebCore::FontPlatformData::hash): Simplify isEmoji use site.
612 (WebCore::FontPlatformData::isEmoji): Getter. Returns false on Mac.
613 (WebCore::FontPlatformData::setIsEmoji): Setter. Does nothing on Mac.
614 * platform/graphics/cocoa/FontCascadeCocoa.mm:
615 (WebCore::pointAdjustedForEmoji): Simplify isEmoji use site.
616 (WebCore::FontCascade::drawGlyphs): Ditto.
617 * platform/graphics/cocoa/FontCocoa.mm:
618 (WebCore::Font::platformInit): Ditto.
619 (WebCore::canUseFastGlyphAdvanceGetter): Ditto.
620 (WebCore::isEmoji): Deleted.
621 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
622 (WebCore::FontPlatformData::platformDataInit): Simplify isEmoji use
624 (WebCore::FontPlatformData::platformDataAssign): Ditto.
625 (WebCore::FontPlatformData::platformIsEqual): Ditto.
626 (WebCore::FontPlatformData::ctFontSize): Ditto.
627 * platform/graphics/ios/FontCacheIOS.mm:
628 (WebCore::FontCache::getSystemFontFallbackForCharacters): Ditto.
629 (WebCore::FontCache::createFontPlatformData): Ditto.
630 * platform/graphics/mac/ComplexTextController.cpp:
631 (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
633 2015-06-03 Brent Fulgham <bfulgham@apple.com>
635 REGRESSION (r181879): Scrolling order on pages with focused iframe is broken.
636 https://bugs.webkit.org/show_bug.cgi?id=145637
637 <rdar://problem/20635581>
639 Reviewed by Zalan Bujtas.
641 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
643 This page revealed a bug in our RenderBox code caused by the mismatch between
644 our scrolling units, which are all integrally snapped, with our client height
645 and widths, which are not snapped at all.
647 In certain cases, the client height would have a small subpixel difference compared
648 to the scroll height, which would cause WebKit to believe it was scrollable. When
649 this happened, it would get stuck latched to this element and block scrolling events.
652 (WebCore::Frame::scrollOverflowLayer): Use roundToInt for clientWidth and clientHeight,
653 rather than integer truncation.
654 * rendering/RenderBox.cpp:
655 (WebCore::RenderBox::canBeScrolledAndHasScrollableArea): Need to round clientWidth
656 and clientHeight to compare with scrollWidth/scrollHeight.
657 * rendering/RenderBox.h:
658 (WebCore::RenderBox::hasScrollableOverflowX): Ditto.
659 (WebCore::RenderBox::hasScrollableOverflowY): Ditto.
660 * rendering/RenderMarquee.cpp:
661 (WebCore::RenderMarquee::computePosition): Use roundToInt for clientWidth and
662 clientHeight, rather than integer truncation.
664 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
666 [Cocoa] Clean up m_font inside FontPlatformData
667 https://bugs.webkit.org/show_bug.cgi?id=145634
669 Reviewed by Andreas Kling.
671 FontPlatformDatas are used as keys in a HashMap. This means that they need
672 to be able to represent a "deleted" value. Previously, this "deleted" value
673 was represented as setting the pointer value of m_font to -1, and guarding
674 all uses of m_font to make sure it wasn't -1 before dereferencing it.
676 This patch simplifies FontPlatformData to represent a "deleted" value using
677 a separate boolean member variable. This class is already big enough that
678 the increased space is negligable (the class already contains two CoreText
679 fonts in addition to a CoreGraphics font). Because of this simplification,
680 m_font can now be a RetainPtr, instead of being manually retained and
683 There is still a long way to go before FontPlatformData is acceptably
684 clean and understandable. This patch improves one aspect of it, and more
685 improvements will eventually follow.
687 No new tests because there is no behavior change.
689 * platform/graphics/FontCache.cpp: Remove unused variable.
690 * platform/graphics/FontPlatformData.cpp:
691 (WebCore::FontPlatformData::FontPlatformData): Clean up all the PLATFORM
692 macros in favor of a single bool. Also, update to include new state.
693 (WebCore::FontPlatformData::operator=): Update to include new state.
694 * platform/graphics/FontPlatformData.h:
695 (WebCore::FontPlatformData::font): Update to account for RetainPtr.
696 (WebCore::FontPlatformData::nsFont): Ditto.
697 (WebCore::FontPlatformData::setNSFont): Ditto.
698 (WebCore::FontPlatformData::hash): Update to include new state.
699 (WebCore::FontPlatformData::operator==): Ditto.
700 (WebCore::FontPlatformData::isHashTableDeletedValue): Use new state.
701 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
702 (WebCore::FontPlatformData::isValidCTFontRef): Deleted.
703 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
704 (WebCore::FontPlatformData::platformDataInit): No need for manual retain
706 (WebCore::FontPlatformData::platformDataAssign): Ditto.
707 (WebCore::FontPlatformData::platformIsEqual): Update to account for
709 (WebCore::FontPlatformData::setFont): No need for manual retain and
711 (WebCore::FontPlatformData::FontPlatformData): Deleted.
712 (WebCore::FontPlatformData::~FontPlatformData): Deleted.
713 * platform/graphics/win/FontPlatformDataCairoWin.cpp:
714 (WebCore::FontPlatformData::~FontPlatformData): m_scaledFont is always
716 (WebCore::FontPlatformData::platformDataAssign): Ditto.
718 2015-06-03 Carlos Alberto Lopez Perez <clopez@igalia.com>
720 [GTK] [Wayland] Build is broken on trunk
721 https://bugs.webkit.org/show_bug.cgi?id=142879
723 Reviewed by Carlos Garcia Campos.
725 No new tests, no behavior changes.
727 Patch on GLContext.h picked from bug 136831 by
728 Iago Toral <itoral@igalia.com> and Zan Dobersek <zdobersek@igalia.com>
730 * platform/graphics/GLContext.h: Include wayland-egl.h before eglplatform.h
731 to use the Wayland platform when building for Wayland.
732 * platform/graphics/PlatformDisplay.cpp: Fix the include of GDK
733 headers for the different targets.
734 * platform/graphics/wayland/WaylandSurface.cpp: Fix build after r183731.
735 (WebCore::WaylandSurface::~WaylandSurface):
737 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
739 [Streams API] Implement ReadableStreamController enqueue
740 https://bugs.webkit.org/show_bug.cgi?id=145210
742 Reviewed by Darin Adler.
744 Added possibility to enqueue any JSValue within ReadableJSStream.
745 They are stored in a Vector of strongified JSValue.
747 Added support for streams that contain data but are asked to close.
748 This is done through m_closeRequested boolean and splitting actual closing of the stream from changeStateToClosed().
750 Chunk size and backpressure mechanism is not yet implemented.
751 Neither is pulling once enqueued data is processed.
753 Covered by rebased tests.
755 * Modules/streams/ReadableStream.cpp:
756 (WebCore::ReadableStream::changeStateToClosed): Split method with newly added close().
757 (WebCore::ReadableStream::close): Does the actual closing of stream once stream has no more values.
758 (WebCore::ReadableStream::read): Close the stream when stream is emptied and close is requested.
759 (WebCore::ReadableStream::resolveReadCallback): Added to enable ReadableJSStream to resolve read callbacks immediatly at enqueue time.
760 * Modules/streams/ReadableStream.h:
761 (WebCore::ReadableStream::isErrored): Getter added for the custom binding code.
762 (WebCore::ReadableStream::isCloseRequested): Ditto.
763 * bindings/js/JSReadableStreamControllerCustom.cpp:
764 (WebCore::JSReadableStreamController::enqueue): binding code for enqueue, taking care of raising exception if readable stream cannot enqueue.
765 * bindings/js/ReadableJSStream.cpp:
766 (WebCore::ReadableJSStream::hasValue):
767 (WebCore::ReadableJSStream::read):
768 (WebCore::ReadableJSStream::enqueue):
769 * bindings/js/ReadableJSStream.h:
771 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
773 [Streams API] ReadableJSStream does not need a ReadableStreamSource
774 https://bugs.webkit.org/show_bug.cgi?id=145601
776 Reviewed by Darin Adler.
778 Covered by existing tests.
780 * Modules/streams/ReadableStream.cpp:
781 (WebCore::ReadableStream::ReadableStream): Remoed m_source.
782 * Modules/streams/ReadableStream.h: Ditto
783 * Modules/streams/ReadableStreamSource.h: Deleted.
784 * WebCore.vcxproj/WebCore.vcxproj: Removing Modules/streams/ReadableStreamSource.h.
785 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
786 * WebCore.xcodeproj/project.pbxproj: Ditto.
787 * bindings/js/ReadableJSStream.cpp:
788 (WebCore::ReadableJSStream::globalObject):
789 (WebCore::ReadableJSStream::doStart): Equivalent of ReadableJSStream::Source::start().
790 (WebCore::ReadableJSStream::create): Updated according new constructor.
791 (WebCore::ReadableJSStream::ReadableJSStream):
792 (WebCore::startReadableStreamAsync): Deleted.
793 (WebCore::ReadableJSStream::jsController): Deleted.
794 (WebCore::ReadableJSStream::storeError): Deleted.
795 * bindings/js/ReadableJSStream.h: Added m_source member to store the JS source as a JS object.
797 2015-06-04 Zan Dobersek <zdobersek@igalia.com>
799 Shrink the ArabicCharShapingMode enum in SVGGlyph.cpp
800 https://bugs.webkit.org/show_bug.cgi?id=145564
802 Reviewed by Darin Adler.
804 Shrink the ArabicCharShapingMode enum to just one byte.
805 This drops the size of the static s_arabicCharShapingMode
806 array of ArabicCharShapingMode values from 888 bytes to 222.
808 * platform/graphics/SVGGlyph.cpp:
809 (WebCore::processArabicFormDetection):
811 2015-06-03 Zalan Bujtas <zalan@apple.com>
813 Use borderBoxRect instead of contentBoxRect for backdrop filter.
814 https://bugs.webkit.org/show_bug.cgi?id=145606
816 Reviewed by Simon Fraser.
818 Backdrop filter should use border box rect. It also needs to take css clip into account.
820 Tests: css3/filters/backdrop/backdrop-filter-with-cliprect.html
821 css3/filters/backdrop/backdrop-filter-with-mask.html
823 * rendering/RenderLayerBacking.cpp:
824 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
826 2015-06-03 Youenn Fablet <youenn.fablet@crf.canon.fr>
828 MediaDevices.getUserMedia should put promises in resolve/reject state synchronously
829 https://bugs.webkit.org/show_bug.cgi?id=145308
831 Reviewed by Darin Adler.
833 Removed the calls to callToMainThread in which were resolved and rejected promises.
834 Cleaned up the code to remove unneeded callback copies.
836 Covered by existing tests.
838 * Modules/mediastream/UserMediaRequest.cpp:
839 (WebCore::UserMediaRequest::create):
840 (WebCore::UserMediaRequest::UserMediaRequest):
841 (WebCore::UserMediaRequest::didCreateStream):
842 (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
843 (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
844 * Modules/mediastream/UserMediaRequest.h:
846 2015-06-03 Simon Fraser <simon.fraser@apple.com>
848 REGRESSION (r184968): missing media player buttons (control bar exists, but no buttons)
849 https://bugs.webkit.org/show_bug.cgi?id=145630
851 Reviewed by Zalan Bujtas.
853 r184968 changed the initial value of m_intersectsCoverageRect to false. However,
854 this triggered a bug with mask layers, whose value of m_intersectsCoverageRect was never
857 Fix by copying the value of m_intersectsCoverageRect from the main layer to its
858 mask layer, just as we do for m_visibleRect and m_coverageRect.
860 Test: compositing/visible-rect/mask-layer-coverage.html
862 * platform/graphics/ca/GraphicsLayerCA.cpp:
863 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
865 2015-06-03 Simon Fraser <simon.fraser@apple.com>
867 Layer tree dumps should include mask layers
868 https://bugs.webkit.org/show_bug.cgi?id=145629
870 Reviewed by Zalan Bujtas.
872 Dumping the layer tree omitted to dump the mask layer, so fix
873 GraphicsLayer::dumpProperties() to dump this layer.
875 * platform/graphics/GraphicsLayer.cpp:
876 (WebCore::GraphicsLayer::dumpProperties):
878 2015-06-03 Greg Hughes <ghughes@apple.com>
880 AX: Expose field sets to accessibility clients
881 https://bugs.webkit.org/show_bug.cgi?id=145585
883 Expose fieldsets to the accessibility API via a subrole of AXFieldset.
885 Reviewed by Chris Fleizach.
887 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
888 (-[WebAccessibilityObjectWrapper subrole]):
890 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
892 Remove dead code FontPlatformData::roundsGlyphAdvances()
893 https://bugs.webkit.org/show_bug.cgi?id=145628
895 Reviewed by Simon Fraser.
897 No new tests because there is no behavior change.
900 * platform/graphics/FontPlatformData.h:
901 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
902 (WebCore::FontPlatformData::roundsGlyphAdvances): Deleted.
904 2015-06-03 Ryuan Choi <ryuan.choi@navercorp.com>
906 [CoordinatedGraphics] Merge CoordinatedTile into Tile
907 https://bugs.webkit.org/show_bug.cgi?id=145602
909 Reviewed by Darin Adler.
911 CoordinatedTile only implements Tile since Qt and WebKit1/Efl were dropped.
912 So, there is no reason that CoordinatedTile inherits Tile interface.
914 No new tests, no behavior changes.
918 * WebCore.vcxproj/WebCore.vcxproj:
919 * WebCore.vcxproj/WebCore.vcxproj.filters:
920 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
921 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
922 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp: Renamed to Tile.cpp
923 * platform/graphics/texmap/coordinated/CoordinatedTile.h: Merged into Tile.h
924 (WebCore::CoordinatedTile::coordinate): Deleted.
925 (WebCore::CoordinatedTile::rect): Deleted.
926 * platform/graphics/texmap/coordinated/Tile.cpp: Renamed from CoordinatedTile.cpp.
927 * platform/graphics/texmap/coordinated/Tile.h:
928 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
929 (WebCore::TiledBackingStore::createTiles):
931 2015-06-03 Matt Rajca <mrajca@apple.com>
933 Add basic Media Session support to HTMLMediaElement.
934 https://bugs.webkit.org/show_bug.cgi?id=145581
936 Reviewed by Eric Carlson.
938 HTMLMediaElements now have:
940 - a 'kind' attribute representing the intrinsic media category
941 - a 'session' attribute representing the current media session, if any
943 * CMakeLists.txt: Include the new HTMLMediaElementMediaSession sources.
944 * DerivedSources.make: Include the new IDL file.
945 * Modules/mediasession/HTMLMediaElementMediaSession.cpp: Added.
946 (WebCore::HTMLMediaElementMediaSession::session):
947 * Modules/mediasession/HTMLMediaElementMediaSession.h: Added basic translation of the IDL file.
948 (WebCore::HTMLMediaElementMediaSession::kind):
949 (WebCore::HTMLMediaElementMediaSession::setKind):
950 (WebCore::HTMLMediaElementMediaSession::setSession):
951 * Modules/mediasession/HTMLMediaElementMediaSession.idl: Added from the Media Session spec.
952 * PlatformMac.cmake: Include DOMHTMLMediaElementMediaSession.cpp.
953 * WebCore.xcodeproj/project.pbxproj: Include the new HTMLMediaElementMediaSession sources.
954 * html/HTMLMediaElement.h: Added accessors for 'kind' and 'session'.
955 (WebCore::HTMLMediaElement::kind):
956 (WebCore::HTMLMediaElement::setKind):
957 (WebCore::HTMLMediaElement::session):
958 (WebCore::HTMLMediaElement::setSession):
960 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
962 Cleanup after r185175.
963 https://bugs.webkit.org/show_bug.cgi?id=145569
964 <rdar://problem/20671711>
968 No new tests because there is no behavior change.
970 * platform/graphics/WidthIterator.h:
972 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
974 SoftBank Emoji are not transformed by shaping when in a run of their own
975 https://bugs.webkit.org/show_bug.cgi?id=145569
976 <rdar://problem/20671711>
978 Reviewed by Dean Jackson.
980 Normally, we don't perform shaping on single glyphs. However, these particular codepoints
981 need to have shaping run on them, even if they are alone.
983 Test: fast/text/softbank-emoji.html Note that this test may fail in different locales on
984 different platforms. This patch disables the test on iOS.
986 * Source/WebCore/platform/graphics/WidthIterator.cpp:
987 (WebCore::applyFontTransforms): Move the length-of-1 check into shouldApplyFontTransforms()
988 (WebCore::shouldApplyFontTransforms): Return true if we have one of these emoji characters in
990 (WebCore::advanceInternal): Keep track of the previous character, and use it to call
991 shouldApplyFontTransforms.
992 * Source/WebCore/platform/graphics/WidthIterator.h: shouldApplyFontTransforms() needs
993 some more information to perform its duties.
995 2015-06-03 Daniel Bates <dabates@apple.com>
997 Caps lock indicator should not be shown in read-only or disabled field
998 https://bugs.webkit.org/show_bug.cgi?id=145612
999 <rdar://problem/21227454>
1001 Reviewed by Darin Adler.
1003 * html/TextFieldInputType.cpp:
1004 (WebCore::TextFieldInputType::disabledAttributeChanged): Update caps lock indicator state.
1005 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
1006 (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator): Do not draw the caps lock indicator
1007 when the field is read-only or disabled.
1009 2015-06-03 Dean Jackson <dino@apple.com>
1011 Crash in GraphicsContext3D::getInternalFramebufferSize
1012 https://bugs.webkit.org/show_bug.cgi?id=145479
1013 <rdar://problem/16461048>
1015 Reviewed by Eric Carlson.
1017 If we are in an unitialized or lost state, don't try to access the context.
1019 In order to test this, I added an Internal setting that always
1020 forces WebGL into a pending state.
1022 Test: fast/canvas/webgl/useWhilePending.html
1024 * html/canvas/WebGLRenderingContextBase.cpp:
1025 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
1026 a forced pending state.
1027 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
1028 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
1029 * page/Settings.cpp: New Internal setting for forcing a pending policy.
1030 (WebCore::Settings::Settings):
1031 (WebCore::Settings::setForcePendingWebGLPolicy):
1033 (WebCore::Settings::isForcePendingWebGLPolicy):
1034 * testing/InternalSettings.cpp:
1035 (WebCore::InternalSettings::Backup::Backup):
1036 (WebCore::InternalSettings::Backup::restoreTo):
1037 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
1038 * testing/InternalSettings.h:
1039 * testing/InternalSettings.idl:
1041 2015-06-03 Hunseop Jeong <hs85.jeong@samsung.com>
1043 Use modern for-loops in WebCore/page.
1044 https://bugs.webkit.org/show_bug.cgi?id=145455
1046 Reviewed by Darin Adler.
1048 No new tests, no behavior changes.
1051 (WebCore::Chrome::notifyPopupOpeningObservers):
1052 * page/ContentSecurityPolicy.cpp:
1053 (WebCore::CSPSourceList::matches):
1054 (WebCore::CSPDirectiveList::gatherReportURIs):
1055 (WebCore::ContentSecurityPolicy::copyStateFrom):
1056 (WebCore::isAllowedByAll):
1057 (WebCore::isAllowedByAllWithState):
1058 (WebCore::isAllowedByAllWithContext):
1059 (WebCore::isAllowedByAllWithURL):
1060 (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
1061 (WebCore::ContentSecurityPolicy::allowPluginType):
1062 (WebCore::ContentSecurityPolicy::reflectedXSSDisposition):
1063 (WebCore::ContentSecurityPolicy::gatherReportURIs):
1064 * page/ContextMenuController.cpp:
1065 (WebCore::ContextMenuController::populate):
1066 * page/DOMWindow.cpp:
1067 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
1068 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
1069 (WebCore::DOMWindow::willDestroyCachedFrame):
1070 (WebCore::DOMWindow::willDestroyDocumentInFrame):
1071 (WebCore::DOMWindow::willDetachDocumentFromFrame):
1072 (WebCore::DOMWindow::disconnectDOMWindowProperties):
1073 (WebCore::DOMWindow::reconnectDOMWindowProperties):
1074 (WebCore::DOMWindow::getMatchedCSSRules):
1075 * page/DeviceController.cpp:
1076 (WebCore::DeviceController::dispatchDeviceEvent):
1077 (WebCore::DeviceController::fireDeviceEvent):
1078 * page/EventHandler.cpp:
1079 (WebCore::EventHandler::updateMouseEventTargetNode):
1080 (WebCore::EventHandler::handleTouchEvent):
1081 * page/FocusController.cpp:
1082 (WebCore::FocusController::setIsVisibleAndActiveInternal):
1084 (WebCore::Frame::orientationChanged):
1085 (WebCore::Frame::injectUserScriptsForWorld):
1086 * page/FrameView.cpp:
1087 (WebCore::FrameView::scrollContentsFastPath):
1088 (WebCore::FrameView::serviceScriptedAnimations):
1089 (WebCore::FrameView::trackedRepaintRectsAsText):
1090 (WebCore::FrameView::updateWidgetPositions):
1091 (WebCore::FrameView::notifyWidgets):
1093 (WebCore::networkStateChanged):
1094 (WebCore::Page::stringToViewMode):
1095 (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
1096 (WebCore::Page::refreshPlugins):
1097 (WebCore::Page::lockAllOverlayScrollbarsToHidden):
1098 (WebCore::Page::pluginViews):
1099 (WebCore::Page::storageBlockingStateChanged):
1100 (WebCore::Page::setIsVisibleInternal):
1101 * page/PageGroup.cpp:
1102 (WebCore::PageGroup::captionPreferencesChanged):
1103 * page/PageGroupLoadDeferrer.cpp:
1104 (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
1105 (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
1106 * page/PageSerializer.cpp:
1107 (WebCore::PageSerializer::serializeFrame):
1108 * page/Performance.cpp:
1109 (WebCore::Performance::webkitGetEntriesByType):
1110 (WebCore::Performance::webkitGetEntriesByName):
1111 * page/PerformanceResourceTiming.cpp:
1112 (WebCore::passesTimingAllowCheck):
1113 * page/PerformanceUserTiming.cpp:
1114 (WebCore::convertToEntrySequence):
1115 * page/SecurityPolicy.cpp:
1116 (WebCore::SecurityPolicy::isAccessWhiteListed):
1117 * page/UserContentURLPattern.cpp:
1118 (WebCore::UserContentURLPattern::matchesPatterns):
1119 * page/WindowFeatures.cpp:
1120 (WebCore::WindowFeatures::parseDialogFeatures):
1121 * page/animation/AnimationController.cpp:
1122 (WebCore::AnimationControllerPrivate::updateAnimations):
1123 (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
1124 (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
1125 (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
1126 (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
1127 * page/animation/CSSPropertyAnimation.cpp:
1128 (WebCore::ShorthandPropertyWrapper::equals):
1129 (WebCore::ShorthandPropertyWrapper::blend):
1130 * page/scrolling/AsyncScrollingCoordinator.cpp:
1131 (WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
1132 * page/scrolling/ScrollingCoordinator.cpp:
1133 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
1134 (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
1136 2015-06-03 Daniel Bates <dabates@apple.com>
1138 AutoFill button should not be shown in read-only or disabled field
1139 https://bugs.webkit.org/show_bug.cgi?id=145579
1140 <rdar://problem/21212494>
1142 Reviewed by Darin Adler.
1144 Fixes an issue where the AutoFill button is shown in a read-only or disabled
1145 field. We should not show the AutoFill button in such cases.
1147 Tests: fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html
1148 fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html
1149 fast/forms/auto-fill-button/input-auto-fill-button.html
1150 fast/forms/auto-fill-button/input-disabled-auto-fill-button.html
1151 fast/forms/auto-fill-button/input-readonly-auto-fill-button.html
1152 fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html
1154 * html/TextFieldInputType.cpp:
1155 (WebCore::TextFieldInputType::disabledAttributeChanged): Update AutoFill button state.
1156 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
1157 (WebCore::TextFieldInputType::shouldDrawAutoFillButton): Do not draw AutoFill button
1158 when the field is disabled or read-only.
1160 2015-06-03 Brent Fulgham <bfulgham@apple.com>
1162 REGRESSION: (r181879): Scrolling in select/option region in iFrame scrolls both select and iframe
1163 https://bugs.webkit.org/show_bug.cgi?id=145574
1164 <rdar://problem/20966828>
1166 Reviewed by Simon Fraser.
1168 Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html
1170 When the scroll gesture is started when the latched scrollable container is not at the limit of its
1171 scroll region, we are NOT supposed to propagate the scroll event to the enclosing region. However,
1172 we were doing two things wrong:
1173 (1) When we recognized we were latching, we were using the right wheel event target, but not using
1174 the latched scrollable container.
1175 (2) Likewise, we were not using latched ScrollableArea when handling wheel events.
1177 Instead, we were using the current scrollable container and ScrollableArea under the mouse pointer,
1178 which could be different from the point we started latching as the content scrolled.
1180 The fix was to properly track the scrollable container and scrollable area during latching.
1182 I attempted to store the latched ScrollableArea in the latchingState object, like we already do for the
1183 scrollable container, but found that this did not work properly. I think the life cycle of the
1184 ScrollableArea may not match the scrollable container, and since they are not reference counted I
1185 simply retrieve the ScrollableArea when needed.
1187 * page/mac/EventHandlerMac.mm:
1188 (WebCore::scrollableAreaForContainerNode): Helper function to return the correct ScrollableArea
1189 for the two types of RenderBox elements.
1190 (WebCore::latchedToFrameOrBody): Helper predicate to identify Frame and Body elements.
1191 (WebCore::EventHandler::platformPrepareForWheelEvents): Use the correct ScrollableArea for the given
1192 ContainerNode. When latching, make sure to use the ScrollableArea that is related to the latched scrollable
1193 container, not the area currently underneath the mouse pointer.
1195 2015-06-03 Brady Eidson <beidson@apple.com>
1197 REGRESSION (r183498): Certain types of frame loads in iframes with <base target="_blank"> can open urls in new window/tabs
1198 https://bugs.webkit.org/show_bug.cgi?id=145580
1200 Reviewed by Mark Lam.
1202 Tests: fast/loader/fragment-navigation-base-blank.html
1203 fast/loader/iframe-meta-refresh-base-blank.html
1204 fast/loader/iframe-set-location-base-blank.html
1205 fast/loader/refresh-iframe-base-blank.html
1207 Before 183498, callers of FrameLoader::changeLocation() got automatically assigned a frame name of "_self".
1208 After 183498, many remained without a frame name.
1210 Later on, FrameLoader applies the <base> target as their frame name if they don't already have one.
1212 When the <base> target is "_blank", that causes a new window/tab.
1214 Restoring "_self" to these call sites fixes this.
1216 * inspector/InspectorFrontendClientLocal.cpp:
1217 (WebCore::InspectorFrontendClientLocal::openInNewTab):
1219 * inspector/InspectorPageAgent.cpp:
1220 (WebCore::InspectorPageAgent::navigate):
1222 * loader/FrameLoadRequest.h:
1223 (WebCore::FrameLoadRequest::FrameLoadRequest):
1225 * loader/NavigationScheduler.cpp:
1226 (WebCore::NavigationScheduler::scheduleLocationChange):
1228 * page/DOMWindow.cpp:
1229 (WebCore::DOMWindow::createWindow):
1231 2015-06-03 Alexey Proskuryakov <ap@apple.com>
1233 More iOS build fixing.
1235 * platform/spi/mac/AVFoundationSPI.h:
1237 2015-06-03 Zalan Bujtas <zalan@apple.com>
1239 Subpixel rendering: Composited layer with subpixel gap does not get painted properly when its position changes.
1240 https://bugs.webkit.org/show_bug.cgi?id=145587
1242 Reviewed by Simon Fraser.
1244 The composited layer always snaps to an enclosing device pixel (floors) while the renderer rounds.
1245 At certain positions (for example 0.5px on a 1x display), a gap is formed between the layer(0px) and its renderer(1px).
1246 In such cases, when the the renderer moves to a position (1.1px) where the gap is closed, we need to issue repaint on the layer
1247 in order to get the renderering right.
1249 Test: compositing/child-layer-with-subpixel-gap-needs-repaint-when-parent-moves.html
1251 * rendering/RenderLayerBacking.cpp:
1252 (WebCore::RenderLayerBacking::updateAfterLayout):
1253 (WebCore::devicePixelFractionGapFromRendererChanged):
1254 (WebCore::RenderLayerBacking::updateGeometry):
1255 * rendering/RenderLayerBacking.h:
1257 2015-06-03 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1259 [Streams API] ReadableStreamReader::closed() should be called once by binding code
1260 https://bugs.webkit.org/show_bug.cgi?id=145551
1262 Reviewed by Darin Adler.
1264 Covered by existing tests.
1266 * bindings/js/JSReadableStreamReaderCustom.cpp:
1267 (WebCore::JSReadableStreamReader::closed): Calling ReadableStreamReader::closed only at creation of the promise.
1269 2015-06-02 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1271 [EFL][GTK] Fix build error since r185137
1272 https://bugs.webkit.org/show_bug.cgi?id=145596
1274 Unreviewed, fix build break on EFL and GTK port.
1277 (WebCore::Text::formatForDebugger): Use strncpy() instead of strlcpy().
1279 2015-06-02 Sergio Villar Senin <svillar@igalia.com>
1281 [CSS Grid Layout] Switch from parenthesis to brackets for grid line names
1282 https://bugs.webkit.org/show_bug.cgi?id=144996
1284 Reviewed by Darin Adler.
1286 Grid line names are now enclosed by brackets instead of parentheses
1287 as mentioned in the latest version of the spec. Appartently the CSS
1288 code is now more readable and avoids issues with tools like SASS.
1290 * css/CSSGrammar.y.in:
1291 * css/CSSGridLineNamesValue.cpp:
1292 (WebCore::CSSGridLineNamesValue::customCSSText):
1294 2015-06-02 Alexey Proskuryakov <ap@apple.com>
1298 * platform/spi/mac/AVFoundationSPI.h:
1300 2015-06-02 Commit Queue <commit-queue@webkit.org>
1302 Unreviewed, rolling out r185128 and r185132.
1303 https://bugs.webkit.org/show_bug.cgi?id=145597
1305 The new test hits a bad assertion (Requested by ap on
1308 Reverted changesets:
1310 "Crash in GraphicsContext3D::getInternalFramebufferSize"
1311 https://bugs.webkit.org/show_bug.cgi?id=145479
1312 http://trac.webkit.org/changeset/185128
1314 "Skip webgl/useWhilePending.html on WebKit 1."
1315 http://trac.webkit.org/changeset/185132
1317 2015-06-02 Ryuan Choi <ryuan.choi@navercorp.com>
1319 [CoordinatedGraphics] Refactor TiledBackingStoreClient
1320 https://bugs.webkit.org/show_bug.cgi?id=145577
1322 Reviewed by Gyuyoung Kim.
1324 This patch removes and simplifies unnecessary virtual methods of TiledBackingStoreClient.
1326 No new tests, no behavior changes.
1328 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1329 (WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers): Renamed from tiledBackingStorePaintEnd.
1330 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintBegin): Deleted.
1331 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd): Deleted.
1332 (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreBackgroundColor):
1333 Deleted because tiledBackingStoreBackgroundColor() is not used anywhere.
1334 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1335 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
1336 (WebCore::CoordinatedTile::updateBackBuffer):
1337 Simplified not to call unnecessary methods. In addition, used modern for loop.
1338 (WebCore::CoordinatedTile::swapBackBufferToFront): Deleted.
1339 * platform/graphics/texmap/coordinated/CoordinatedTile.h:
1340 * platform/graphics/texmap/coordinated/Tile.h:
1341 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
1342 (WebCore::TiledBackingStore::updateTileBuffers):
1343 * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
1345 2015-06-02 Doug Russell <d_russell@apple.com>
1347 AX: debugging attributes for text markers
1348 https://bugs.webkit.org/show_bug.cgi?id=145283
1350 Reviewed by Chris Fleizach.
1352 AXTextMarkerDebugDescription: returns the result of
1353 VisiblePosition::formatForDebugger() for the visible position that a text marker
1355 AXTextMarkerNodeDebugDescription: calls Node::showNode() and
1356 Node::showNodePathForThis() for the visible position that a text marker
1358 AXTextMarkerNodeTreeDebugDescription: calls Node::showTreeForThis() for the
1359 visible position that a text marker represents.
1360 AXTextMarkerRangeDebugDescription: returns the result of
1361 formatForDebugger(VisiblePositionRange) for the visible position range that a text
1362 marker range represents.
1364 This is debug only tooling. Tests would be flakey and not very helpful.
1366 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1367 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarker:]):
1368 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarkerRange:]):
1369 (-[WebAccessibilityObjectWrapper showNodeForTextMarker:]):
1370 (-[WebAccessibilityObjectWrapper showNodeTreeForTextMarker:]):
1371 (formatForDebugger):
1372 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1374 (WebCore::Text::formatForDebugger):
1376 2015-06-02 Matt Rajca <mrajca@apple.com>
1378 MediaSessions should keep track of their current state.
1379 https://bugs.webkit.org/show_bug.cgi?id=145575
1381 Reviewed by Alex Christensen.
1383 * Modules/mediasession/MediaSession.h: Per the Media Session spec, the state can be 'Idle', 'Active', or
1384 'Interrupted'. Sessions are created in an 'Idle' state.
1386 2015-06-02 Jon Lee <jonlee@apple.com>
1388 Build fix when building with internal SDKs
1389 https://bugs.webkit.org/show_bug.cgi?id=145576
1390 rdar://problem/21089476
1392 Reviewed by Alexey Proskuryakov.
1394 * platform/spi/mac/AVFoundationSPI.h: Include the right header.
1396 2015-06-02 Dean Jackson <dino@apple.com>
1398 No need to guard the sizes attribute against PICTURE_SIZES in preload scanner.
1399 https://bugs.webkit.org/show_bug.cgi?id=145573
1400 <rdar://problem/21210038>
1402 Reviewed by Myles Maxfield.
1404 The PICTURE_SIZES feature flag doesn't need to be used to
1405 guard preloading of the sizes attribute.
1407 * html/parser/HTMLPreloadScanner.cpp:
1408 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Deleted.
1409 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.
1411 2015-06-02 Anders Carlsson <andersca@apple.com>
1413 Use UUIDs for WebSQL database filenames instead of a sequential number
1414 https://bugs.webkit.org/show_bug.cgi?id=145571
1416 Reviewed by Dan Bernstein.
1418 This is a first step towards getting rid of the iOS specific code path where we truncate
1419 database files instead of deleting them (in order to avoid file corruption).
1421 * Modules/webdatabase/DatabaseTracker.cpp:
1422 (WebCore::generateDatabaseFileName):
1423 (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
1424 * platform/sql/SQLiteFileSystem.cpp:
1425 (WebCore::SQLiteFileSystem::getFileNameForNewDatabase): Deleted.
1426 * platform/sql/SQLiteFileSystem.h:
1428 2015-06-02 Dean Jackson <dino@apple.com>
1430 Crash in GraphicsContext3D::getInternalFramebufferSize
1431 https://bugs.webkit.org/show_bug.cgi?id=145479
1432 <rdar://problem/16461048>
1434 Reviewed by Eric Carlson.
1436 If we are in an unitialized or lost state, don't try to access the context.
1438 In order to test this, I added an Internal setting that always
1439 forces WebGL into a pending state.
1441 Test: fast/canvas/webgl/useWhilePending.html
1443 * html/canvas/WebGLRenderingContextBase.cpp:
1444 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
1445 a forced pending state.
1446 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
1447 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
1448 * page/Settings.cpp: New Internal setting for forcing a pending policy.
1449 (WebCore::Settings::Settings):
1450 (WebCore::Settings::setForcePendingWebGLPolicy):
1452 (WebCore::Settings::isForcePendingWebGLPolicy):
1453 * testing/InternalSettings.cpp:
1454 (WebCore::InternalSettings::Backup::Backup):
1455 (WebCore::InternalSettings::Backup::restoreTo):
1456 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
1457 * testing/InternalSettings.h:
1458 * testing/InternalSettings.idl:
1460 2015-06-02 Matt Rajca <mrajca@apple.com>
1462 Added a stub implementation of MediaSession, part of the Media Session spec.
1463 https://bugs.webkit.org/show_bug.cgi?id=145530
1465 Reviewed by Eric Carlson.
1467 * CMakeLists.txt: Added new MediaSession sources.
1468 * DerivedSources.make:
1469 * Modules/mediasession/MediaSession.cpp: Added stub implementation.
1470 (WebCore::MediaSession::MediaSession): Per the Media Session spec, a Media Remote Controls object should only be
1471 set for 'content' sessions; it is null otherwise.
1472 (WebCore::MediaSession::~MediaSession):
1473 (WebCore::MediaSession::controls):
1474 (WebCore::MediaSession::releaseSession):
1475 * Modules/mediasession/MediaSession.h: Added basic translation of IDL file.
1476 * Modules/mediasession/MediaSession.idl: Added from the Media Session spec.
1477 * WebCore.xcodeproj/project.pbxproj: Added new MediaSession sources.
1479 2015-06-02 Zalan Bujtas <zalan@apple.com>
1481 Backdrop filter is pulling in content from behind the window.
1482 https://bugs.webkit.org/show_bug.cgi?id=145561
1483 rdar://problem/20909309
1485 Reviewed by Simon Fraser.
1487 This patch ensures that the backdrop filter layer is positioned and sized properly.
1489 The backdrop filter layer should take its size and position from its renderer and not
1490 directly from the composited layer.
1491 In certain cases the composited layer's size is expanded to cover items like box shadow or an absolute positioned descendant.
1492 In such cases, we ended up applying the backdrop filter to those areas as well.
1494 Tests: css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html
1495 css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html
1497 * platform/graphics/GraphicsLayer.h:
1498 (WebCore::GraphicsLayer::setBackdropFiltersRect):
1499 (WebCore::GraphicsLayer::backdropFiltersRect):
1500 * platform/graphics/ca/GraphicsLayerCA.cpp:
1501 (WebCore::GraphicsLayerCA::setBackdropFiltersRect):
1502 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1503 (WebCore::GraphicsLayerCA::updateBackdropFilters):
1504 (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
1505 (WebCore::GraphicsLayerCA::updateContentsRects):
1506 (WebCore::GraphicsLayerCA::updateGeometry): Deleted.
1507 * platform/graphics/ca/GraphicsLayerCA.h:
1508 * rendering/RenderLayerBacking.cpp:
1509 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
1510 (WebCore::RenderLayerBacking::updateGeometry):
1511 * rendering/RenderLayerBacking.h:
1513 2015-06-02 Eric Carlson <eric.carlson@apple.com>
1515 [Mac] occasional crash in Document::playbackTargetAvailabilityDidChange
1516 https://bugs.webkit.org/show_bug.cgi?id=145559
1518 Reviewed by Darin Adler.
1520 No new tests, covered by existing tests.
1522 * html/HTMLMediaElement.cpp:
1523 (WebCore::HTMLMediaElement::registerWithDocument): Pass document to m_mediaSession->registerWithDocument.
1524 (WebCore::HTMLMediaElement::unregisterWithDocument): Pass document to m_mediaSession->unRegisterWithDocument.
1525 (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Ditto.
1526 (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
1528 * html/MediaElementSession.cpp:
1529 (WebCore::MediaElementSession::registerWithDocument): Take a document.
1530 (WebCore::MediaElementSession::unregisterWithDocument): Ditto.
1531 * html/MediaElementSession.h:
1533 2015-06-02 Chris Dumez <cdumez@apple.com>
1535 Calling FrameView::viewportContentsChanged() after style recalcs is too expensive
1536 https://bugs.webkit.org/show_bug.cgi?id=145554
1537 <rdar://problem/21189478>
1539 Reviewed by Darin Adler and Simon Fraser.
1541 Only call FrameView::viewportContentsChanged() after a style recalc if
1542 composited layers have been updated (and there is no pending layout).
1544 We already viewportContentsChanged() after layout so we only need to
1545 call viewportContentsChanged() after a style recalc if it did not cause
1546 a layout but may have caused an element to become visible. In
1547 particular, this can happen in the case of composited animations (e.g.
1548 using -webkit-transform to move an element inside the viewport).
1549 Therefore, we now only call viewportContentsChanged() after a style
1550 recalc if it caused composited layers to be updated. This avoids a lot
1551 of unnecessary calls to viewportContentsChanged(), which is expensive.
1553 No new tests, already covered by:
1554 fast/images/animated-gif-webkit-transform.html
1557 (WebCore::Document::recalcStyle):
1558 * page/FrameView.cpp:
1559 (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
1561 * rendering/RenderLayerCompositor.cpp:
1562 (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
1563 (WebCore::RenderLayerCompositor::updateCompositingLayers):
1564 * rendering/RenderLayerCompositor.h:
1566 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
1568 Remove use of CTFontSetRenderingParameters()
1569 https://bugs.webkit.org/show_bug.cgi?id=145560
1571 Reviewed by Simon Fraser.
1573 Instead, always use CTFontSetRenderingStyle().
1575 No new tests because there is no behavior change.
1577 * platform/graphics/cocoa/FontCascadeCocoa.mm:
1578 (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
1579 (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
1581 2015-06-02 Anders Carlsson <andersca@apple.com>
1583 Move WKFontAntialiasingStateSaver to its own file
1584 https://bugs.webkit.org/show_bug.cgi?id=145557
1585 rdar://problem/21134776
1587 Reviewed by Dan Bernstein.
1589 Also rename it to FontAntialiasingStateSaver. Also, change it to use the CoreGraphicsSPI.h header for its
1590 CGFontAntialiasingStyle definition instead of using an explicit typedef.
1592 * WebCore.xcodeproj/project.pbxproj:
1593 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1594 (PlatformCALayer::drawLayerContents):
1595 * platform/graphics/ios/FontAntialiasingStateSaver.h: Copied from Source/WebCore/platform/ios/wak/WKGraphics.h.
1596 (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
1597 (WebCore::FontAntialiasingStateSaver::setup):
1598 (WebCore::FontAntialiasingStateSaver::restore):
1599 * platform/ios/LegacyTileCache.mm:
1600 (WebCore::LegacyTileCache::drawWindowContent):
1601 * platform/ios/wak/WKGraphics.h:
1602 (WKFontAntialiasingStateSaver::WKFontAntialiasingStateSaver): Deleted.
1603 * platform/ios/wak/WKGraphics.mm:
1604 (WKFontAntialiasingStateSaver::setup): Deleted.
1605 (WKFontAntialiasingStateSaver::restore): Deleted.
1607 2015-06-02 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1609 [Streams API] Implement ReadableStreamReader read method in closed and errored state
1610 https://bugs.webkit.org/show_bug.cgi?id=144790
1612 Reviewed by Darin Adler.
1614 Reader delegates read() promise handling to its stream except if reader is no longer locking the stream and stream is readable.
1615 Storing of reader read() promise callbacks as a Vector in ReadableStream.
1616 Added resolution/rejection of read() promises in case of errored/closed streams.
1618 Test: streams/readable-stream-reader-read.html
1620 * ForwardingHeaders/runtime/IteratorOperations.h: Added.
1621 * Modules/streams/ReadableStream.cpp:
1622 (WebCore::ReadableStream::cleanCallbacks): Clean the read requests.
1623 (WebCore::ReadableStream::changeStateToClosed): Run success callbacks with undefined for read requests.
1624 (WebCore::ReadableStream::changeStateToErrored): Run failure callbacks with the errors for read requests.
1625 (WebCore::ReadableStream::closed): Parameter name changed.
1626 (WebCore::ReadableStream::read): Added. Succeeds with empty when closed, fails with error when errored, reads a
1627 value if there is one and pushes the callbacks to the queue otherwise.
1628 * Modules/streams/ReadableStream.h:
1629 (WebCore::ReadableStream::ReadCallbacks::ReadCallbacks): Struct containing success and failure callbacks.
1630 * Modules/streams/ReadableStreamReader.cpp:
1631 (WebCore::ReadableStreamReader::closed): Parameter name changed.
1632 (WebCore::ReadableStreamReader::read): Invoke success with empty if we streams if we don't have the right reader
1633 and call the stream otherwise to read.
1634 * Modules/streams/ReadableStreamReader.h:
1635 * bindings/js/JSReadableStreamReaderCustom.cpp:
1636 (WebCore::JSReadableStreamReader::read): Create the callback lambdas and invoke read. Failure rejects the
1637 promise and success creates the result from the read value.
1638 * bindings/js/ReadableJSStream.cpp:
1639 (WebCore::ReadableJSStream::hasValue):
1640 (WebCore::ReadableJSStream::read): Not implemented yet.
1641 * bindings/js/ReadableJSStream.h:
1643 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
1645 [Cocoa] FontPlatformData's equality check should always use reference URLs
1646 https://bugs.webkit.org/show_bug.cgi?id=144168
1648 Reviewed by Tim Horton.
1650 <rdar://problem/18985642> is not fixed, so we need to continue using the older
1651 objectForEqualityCheck().
1653 No new tests because there is no behavior change.
1655 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1656 (WebCore::FontPlatformData::objectForEqualityCheck):
1658 2015-06-02 Andy Estes <aestes@apple.com>
1660 [Mac] REGRESSION (r175941): Max.app crashes when adding a sound file to a patch due to removing cursor resources from WebCore.framework
1661 https://bugs.webkit.org/show_bug.cgi?id=145555
1663 Reviewed by Darin Adler.
1665 Re-added the cursor resources used by Max.app and ran sort-Xcode-project-file.
1667 * Resources/copyCursor.png: Added.
1668 * Resources/moveCursor.png: Added.
1669 * Resources/northEastSouthWestResizeCursor.png: Added.
1670 * Resources/northSouthResizeCursor.png: Added.
1671 * Resources/northWestSouthEastResizeCursor.png: Added.
1672 * WebCore.xcodeproj/project.pbxproj:
1674 2015-06-02 Brady Eidson <beidson@apple.com>
1676 WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
1677 rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
1679 Reviewed by Alex Christensen.
1681 Tests: loader/navigation-policy/should-open-external-urls/main-frame-click.html
1682 loader/navigation-policy/should-open-external-urls/main-frame-navigated-programatically-by-subframe.html
1683 loader/navigation-policy/should-open-external-urls/main-frame-with-flag-progamatic.html
1684 loader/navigation-policy/should-open-external-urls/main-frame-without-flag-programatic.html
1685 loader/navigation-policy/should-open-external-urls/subframe-click-target-self.html
1686 loader/navigation-policy/should-open-external-urls/subframe-click-target-top.html
1687 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html
1688 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html
1689 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html
1690 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html
1691 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html
1692 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html
1693 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html
1694 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html
1695 loader/navigation-policy/should-open-external-urls/window-open-with-flag-from-subframe.html
1696 loader/navigation-policy/should-open-external-urls/window-open-with-flag.html
1697 loader/navigation-policy/should-open-external-urls/window-open-without-flag-from-subframe.html
1698 loader/navigation-policy/should-open-external-urls/window-open-without-flag.html
1700 The "should open external URLs" flag is only for main frames.
1701 It doesn't enforce any sort of policy internal to WebKit, but rather is for notifications to the policy delegate.
1703 It is set from one of two places:
1704 1 - A main frame is navigated by any frame as the result of a user gesture.
1705 2 - WebKit2 API explicitly states the flag is true.
1707 The flag value propagates when:
1708 1 - When a main frame document is navigated to a new main frame document.
1709 2 - When a new window is opened from a page whose main frame had the flag set.
1710 3 - When a new window is opened as the result of a user gesture.
1712 The flag resets to false when:
1713 1 - A subframe navigates a main frame without a user gesture.
1715 This patch is large, but does little more than the following:
1716 1 - Adds a ShouldOpenExternalURLs flag to both FrameLoadRequest and NavigationAction.
1717 2 - Makes sure anybody who creates either of those objects sets a sensible for that flag.
1718 3 - When FrameLoader creates a new DocumentLoader, it sets its flag based on whether or not the load is in a main frame,
1719 whether or not the load is from a user gesture, and based on the initiator's value of the flag.
1722 (WebCore::Document::processHttpEquiv):
1723 (WebCore::Document::shouldOpenExternalURLsPolicyToPropagate):
1726 * html/HTMLAnchorElement.cpp:
1727 (WebCore::HTMLAnchorElement::handleClick):
1729 * html/HTMLLinkElement.cpp:
1730 (WebCore::HTMLLinkElement::handleClick):
1732 * html/parser/XSSAuditorDelegate.cpp:
1733 (WebCore::XSSAuditorDelegate::didBlockScript):
1735 * inspector/InspectorFrontendClientLocal.cpp:
1736 (WebCore::InspectorFrontendClientLocal::openInNewTab):
1738 * inspector/InspectorPageAgent.cpp:
1739 (WebCore::InspectorPageAgent::navigate):
1741 * loader/DocumentLoader.cpp:
1742 (WebCore::DocumentLoader::setTriggeringAction):
1743 (WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate):
1744 * loader/DocumentLoader.h:
1745 (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy): Deleted.
1747 * loader/FrameLoadRequest.cpp:
1748 (WebCore::FrameLoadRequest::FrameLoadRequest):
1749 * loader/FrameLoadRequest.h:
1750 (WebCore::FrameLoadRequest::FrameLoadRequest):
1752 * loader/FrameLoader.cpp:
1753 (WebCore::FrameLoader::urlSelected):
1754 (WebCore::FrameLoader::receivedFirstData):
1755 (WebCore::FrameLoader::loadURLIntoChildFrame):
1756 (WebCore::FrameLoader::loadURL):
1757 (WebCore::FrameLoader::load):
1758 (WebCore::FrameLoader::loadWithNavigationAction):
1759 (WebCore::FrameLoader::reloadWithOverrideEncoding):
1760 (WebCore::FrameLoader::reload):
1761 (WebCore::FrameLoader::loadPostRequest):
1762 (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1763 (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
1764 * loader/FrameLoader.h:
1766 * loader/NavigationAction.cpp:
1767 (WebCore::NavigationAction::NavigationAction):
1768 (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
1769 * loader/NavigationAction.h:
1770 (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy): Deleted.
1772 * loader/NavigationScheduler.cpp:
1773 (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
1774 (WebCore::ScheduledRedirect::ScheduledRedirect):
1775 (WebCore::ScheduledLocationChange::ScheduledLocationChange):
1776 (WebCore::ScheduledRefresh::ScheduledRefresh):
1777 (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
1778 (WebCore::NavigationScheduler::scheduleRedirect):
1779 (WebCore::NavigationScheduler::scheduleLocationChange):
1780 (WebCore::NavigationScheduler::scheduleRefresh):
1781 * loader/NavigationScheduler.h:
1783 * loader/PolicyChecker.cpp:
1784 (WebCore::PolicyChecker::checkNavigationPolicy):
1786 * loader/SubframeLoader.cpp:
1787 (WebCore::SubframeLoader::loadOrRedirectSubframe):
1789 * loader/appcache/ApplicationCacheGroup.cpp:
1790 (WebCore::ApplicationCacheGroup::selectCache):
1792 * page/ContextMenuController.cpp:
1793 (WebCore::openNewWindow):
1794 (WebCore::ContextMenuController::contextMenuItemSelected):
1796 * page/DOMWindow.cpp:
1797 (WebCore::DOMWindow::setLocation):
1798 (WebCore::DOMWindow::createWindow):
1799 (WebCore::DOMWindow::open):
1801 * page/DragController.cpp:
1802 (WebCore::DragController::performDragOperation):
1804 * page/Location.cpp:
1805 (WebCore::Location::reload):
1807 * replay/ReplayInputDispatchMethods.cpp:
1808 (WebCore::InitialNavigation::dispatch):
1810 * svg/SVGAElement.cpp:
1811 (WebCore::SVGAElement::defaultEventHandler):
1813 2015-06-02 Yusuke Suzuki <utatane.tea@gmail.com>
1815 Heap-use-after-free read of size 4 in JavaScriptCore: WTF::StringImpl::isSymbol() (StringImpl.h:496)
1816 https://bugs.webkit.org/show_bug.cgi?id=145532
1818 Reviewed by Geoffrey Garen.
1820 Hold the ownership of AtomicStringImpl*.
1822 * bindings/scripts/CodeGeneratorJS.pm:
1823 (GenerateParametersCheck):
1824 * dom/TreeScope.cpp:
1825 (WebCore::TreeScope::getElementById):
1827 2015-06-02 Youenn Fablet <youenn.fablet@crf.canon.fr>
1829 SharedBuffer::copy should return a Ref<SharedBuffer>
1830 https://bugs.webkit.org/show_bug.cgi?id=145499
1832 Reviewed by Andreas Kling.
1834 Changing SharedBuffer::copy to return a Ref<> and adapting some code accordingly.
1836 Covered by existing tests.
1838 * loader/SubresourceLoader.cpp:
1839 (WebCore::SubresourceLoader::didReceiveResponse):
1840 * loader/appcache/ApplicationCacheResource.cpp:
1841 (WebCore::ApplicationCacheResource::deliver):
1842 * platform/SharedBuffer.cpp:
1843 (WebCore::SharedBuffer::copy):
1844 * platform/SharedBuffer.h:
1846 2015-06-01 Hunseop Jeong <hs85.jeong@samsung.com>
1848 Use modern for-loops in WebCore/Modules - 1
1849 https://bugs.webkit.org/show_bug.cgi?id=145507
1851 Reviewed by Darin Adler.
1853 No new tests, no behavior changes.
1855 * Modules/battery/BatteryController.cpp:
1856 (WebCore::BatteryController::~BatteryController):
1857 (WebCore::BatteryController::updateBatteryStatus):
1858 (WebCore::BatteryController::didChangeBatteryStatus):
1859 * Modules/encryptedmedia/CDM.cpp:
1860 (WebCore::CDMFactoryForKeySystem):
1861 * Modules/encryptedmedia/MediaKeys.cpp:
1862 (WebCore::MediaKeys::~MediaKeys):
1863 * Modules/geolocation/Geolocation.cpp:
1864 (WebCore::Geolocation::resumeTimerFired):
1865 (WebCore::Geolocation::resetAllGeolocationPermission):
1866 (WebCore::Geolocation::makeCachedPositionCallbacks):
1867 (WebCore::Geolocation::sendError):
1868 (WebCore::Geolocation::sendPosition):
1869 (WebCore::Geolocation::stopTimer):
1870 (WebCore::Geolocation::cancelRequests):
1871 (WebCore::Geolocation::extractNotifiersWithCachedPosition):
1872 (WebCore::Geolocation::copyToSet):
1873 (WebCore::Geolocation::handlePendingPermissionNotifiers):
1874 * Modules/geolocation/GeolocationController.cpp:
1875 (WebCore::GeolocationController::positionChanged):
1876 (WebCore::GeolocationController::errorOccurred):
1877 * Modules/indexeddb/IDBDatabase.cpp:
1878 (WebCore::IDBDatabase::objectStoreNames):
1879 (WebCore::IDBDatabase::transaction):
1880 (WebCore::IDBDatabase::forceClose):
1881 (WebCore::IDBDatabase::closeConnection):
1882 (WebCore::IDBDatabase::findObjectStoreId):
1883 * Modules/indexeddb/IDBDatabaseBackend.cpp:
1884 (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
1885 (WebCore::IDBDatabaseBackend::deleteDatabase):
1886 (WebCore::IDBDatabaseBackend::close):
1887 * Modules/indexeddb/IDBDatabaseMetadata.cpp:
1888 (WebCore::IDBDatabaseMetadata::isolatedCopy):
1889 (WebCore::IDBObjectStoreMetadata::isolatedCopy):
1890 * Modules/indexeddb/IDBKey.cpp:
1891 (WebCore::IDBKey::isValid):
1892 * Modules/indexeddb/IDBKey.h:
1893 (WebCore::IDBKey::createMultiEntryArray):
1894 (WebCore::IDBKey::createArray):
1895 * Modules/indexeddb/IDBKeyPath.cpp:
1896 (WebCore::IDBKeyPath::IDBKeyPath):
1897 (WebCore::IDBKeyPath::isValid):
1898 (WebCore::IDBKeyPath::isolatedCopy):
1899 * Modules/indexeddb/IDBObjectStore.cpp:
1900 (WebCore::IDBObjectStore::indexNames):
1901 (WebCore::IDBObjectStore::put):
1902 Rename the two 'i's to 'keyData' and 'indexKeyData'.
1903 (WebCore::IDBObjectStore::index):
1904 (WebCore::IDBObjectStore::findIndexId):
1905 * Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
1906 (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
1907 * Modules/indexeddb/IDBRequest.cpp:
1908 (WebCore::IDBRequest::abort):
1909 * Modules/indexeddb/IDBTransaction.cpp:
1910 (WebCore::IDBTransaction::closeOpenCursors):
1911 (WebCore::IDBTransaction::onAbort):
1912 (WebCore::IDBTransaction::dispatchEvent):
1913 * Modules/indexeddb/IDBTransactionBackend.cpp:
1914 (WebCore::IDBTransactionBackend::create):
1915 (WebCore::IDBTransactionBackend::closeOpenCursors):
1916 * Modules/mediasource/MediaSource.cpp:
1917 (WebCore::MediaSource::onReadyStateChange):
1918 * Modules/mediastream/MediaConstraintsImpl.cpp:
1919 (WebCore::MediaConstraintsImpl::initialize):
1920 (WebCore::MediaConstraintsImpl::getMandatoryConstraints):
1921 (WebCore::MediaConstraintsImpl::getOptionalConstraintValue):
1922 * Modules/mediastream/MediaStream.cpp:
1923 (WebCore::MediaStream::create):
1924 (WebCore::MediaStream::cloneMediaStreamTrackVector):
1925 (WebCore::MediaStream::addTrack):
1926 (WebCore::MediaStream::removeTrack):
1927 (WebCore::MediaStream::haveTrackWithSource):
1928 (WebCore::MediaStream::getTrackById):
1929 (WebCore::MediaStream::getTracks):
1930 (WebCore::MediaStream::trackDidEnd):
1931 (WebCore::MediaStream::scheduledEventTimerFired):
1932 * Modules/mediastream/MediaStreamCapabilities.cpp:
1933 (WebCore::MediaStreamCapabilities::sourceType):
1934 (WebCore::MediaStreamCapabilities::sourceId):
1935 (WebCore::MediaStreamCapabilities::facingMode):
1936 * Modules/mediastream/MediaStreamTrack.cpp:
1937 (WebCore::MediaStreamTrack::trackDidEnd):
1938 * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
1939 (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
1941 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
1943 [SVG -> OTF Converter] Remove unnecessary hacks
1944 https://bugs.webkit.org/show_bug.cgi?id=145088
1946 Reviewed by Simon Fraser.
1950 Test: svg/text/offset-square-svg-font.html
1952 * svg/SVGToOTFFontConversion.cpp:
1953 (WebCore::SVGToOTFFontConverter::appendKERNTable):
1954 (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
1956 2015-06-01 Andreas Kling <akling@apple.com>
1958 CSS animations in filling-forwards state shouldn't force compositing.
1959 <https://webkit.org/b/145389>
1960 <rdar://problem/17923642>
1962 Reviewed by Simon Fraser.
1964 Stop checking if a CSS animation is filling forwards when computing
1965 compositing requirements.
1967 This prevents finished animations from pinning elements in composited
1968 state, and frees up a bunch of IOSurface memory on some content.
1970 * page/animation/AnimationBase.h:
1971 (WebCore::AnimationBase::isAnimatingProperty): Deleted.
1972 * rendering/RenderLayerBacking.cpp:
1973 (WebCore::RenderLayerBacking::updateGeometry):
1974 * rendering/RenderLayerCompositor.cpp:
1975 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1977 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
1979 Out of bounds read in WebCore::ComplexTextController::adjustGlyphsAndAdvances
1980 https://bugs.webkit.org/show_bug.cgi?id=145537
1981 <rdar://problem/20959267>
1983 Reviewed by Darin Adler.
1985 U16_IS_SURROGATE_LEAD(ch) assumes U16_IS_SURROGATE(ch). In this case, that isn't true.
1987 Test: fast/text/crash-complex-text-surrogate.html
1989 * platform/graphics/mac/ComplexTextController.cpp:
1990 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1992 2015-05-30 Zalan Bujtas <zalan@apple.com>
1994 REGRESSION (179771): zooming on facebook images covers image
1995 https://bugs.webkit.org/show_bug.cgi?id=145485
1997 Reviewed by Simon Fraser.
1999 Scaling an infinite rect should always produce an infinite rect.
2000 (Based on Simon Fraser's patch)
2002 Test: compositing/layer-creation/zoomed-clip-intersection.html
2004 * platform/graphics/LayoutRect.cpp:
2005 (WebCore::LayoutRect::scale):
2007 2015-06-01 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2009 Purge PassRefPtr in WebCore/Modules - 3
2010 https://bugs.webkit.org/show_bug.cgi?id=145508
2012 Reviewed by Darin Adler.
2014 As a step to purge PassRefPtr, this patch removes PassRefPtr, then use Ref or RefPtr.
2016 * Modules/indexeddb/IDBCursor.cpp:
2017 (WebCore::IDBCursor::create):
2018 * Modules/indexeddb/IDBCursor.h:
2019 * Modules/indexeddb/IDBCursorBackend.h:
2020 (WebCore::IDBCursorBackend::create):
2021 * Modules/indexeddb/IDBCursorBackendOperations.h:
2022 (WebCore::CursorIterationOperation::create):
2023 (WebCore::CursorAdvanceOperation::create):
2024 * Modules/indexeddb/IDBDatabase.cpp:
2025 (WebCore::IDBDatabase::create):
2026 * Modules/indexeddb/IDBDatabase.h:
2027 * Modules/indexeddb/IDBDatabaseBackend.cpp:
2028 (WebCore::IDBDatabaseBackend::create):
2029 * Modules/indexeddb/IDBDatabaseBackend.h:
2030 * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
2031 (WebCore::IDBDatabaseCallbacksImpl::create):
2032 * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
2033 * Modules/indexeddb/IDBDatabaseError.h:
2034 (WebCore::IDBDatabaseError::create):
2035 * Modules/indexeddb/IDBIndex.h:
2036 (WebCore::IDBIndex::create):
2037 * Modules/indexeddb/IDBKey.h:
2038 (WebCore::IDBKey::createInvalid):
2039 (WebCore::IDBKey::createNumber):
2040 (WebCore::IDBKey::createString):
2041 (WebCore::IDBKey::createDate):
2042 (WebCore::IDBKey::createArray):
2043 * Modules/indexeddb/IDBKeyRange.cpp:
2044 (WebCore::IDBKeyRange::create):
2045 * Modules/indexeddb/IDBKeyRange.h:
2046 (WebCore::IDBKeyRange::create):
2047 * Modules/indexeddb/IDBObjectStore.cpp:
2048 * Modules/indexeddb/IDBObjectStore.h:
2049 (WebCore::IDBObjectStore::create):
2050 * Modules/indexeddb/IDBOpenDBRequest.cpp:
2051 (WebCore::IDBOpenDBRequest::create):
2052 * Modules/indexeddb/IDBOpenDBRequest.h:
2053 * Modules/indexeddb/IDBRecordIdentifier.h:
2054 (WebCore::IDBRecordIdentifier::create):
2055 * Modules/indexeddb/IDBRequest.cpp:
2056 (WebCore::IDBRequest::create):
2057 (WebCore::IDBRequest::getResultCursor):
2058 * Modules/indexeddb/IDBRequest.h:
2059 * Modules/indexeddb/IDBTransaction.cpp:
2060 (WebCore::IDBTransaction::create):
2061 * Modules/indexeddb/IDBTransaction.h:
2062 * Modules/indexeddb/IDBTransactionBackend.cpp:
2063 (WebCore::IDBTransactionBackend::create):
2064 * Modules/indexeddb/IDBTransactionBackend.h:
2065 * Modules/indexeddb/IDBTransactionBackendOperations.h:
2066 (WebCore::CreateObjectStoreOperation::create):
2067 (WebCore::DeleteObjectStoreOperation::create):
2068 (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
2069 (WebCore::CreateObjectStoreAbortOperation::create):
2070 (WebCore::DeleteObjectStoreAbortOperation::create):
2071 (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
2072 (WebCore::CreateIndexOperation::create):
2073 (WebCore::CreateIndexAbortOperation::create):
2074 (WebCore::DeleteIndexOperation::create):
2075 (WebCore::DeleteIndexAbortOperation::create):
2076 (WebCore::GetOperation::create):
2077 (WebCore::PutOperation::create):
2078 (WebCore::SetIndexesReadyOperation::create):
2079 (WebCore::OpenCursorOperation::create):
2080 (WebCore::CountOperation::create):
2081 (WebCore::DeleteRangeOperation::create):
2082 (WebCore::ClearObjectStoreOperation::create):
2083 * Modules/mediasource/VideoPlaybackQuality.cpp:
2084 (WebCore::VideoPlaybackQuality::create):
2085 * Modules/mediasource/VideoPlaybackQuality.h:
2086 * Modules/mediastream/MediaConstraintsImpl.cpp:
2087 (WebCore::MediaConstraintsImpl::create):
2088 * Modules/mediastream/MediaConstraintsImpl.h:
2089 * Modules/mediastream/MediaStream.cpp:
2090 (WebCore::MediaStream::create):
2091 * Modules/mediastream/MediaStream.h:
2092 * Modules/mediastream/RTCDTMFSender.cpp:
2093 (WebCore::RTCDTMFSender::create):
2094 * Modules/mediastream/RTCDTMFSender.h:
2095 * Modules/mediastream/RTCOfferAnswerOptions.cpp:
2096 (WebCore::RTCOfferAnswerOptions::create):
2097 (WebCore::RTCOfferOptions::create):
2098 * Modules/mediastream/RTCOfferAnswerOptions.h:
2099 * Modules/mediastream/RTCPeerConnection.cpp:
2100 (WebCore::RTCPeerConnection::parseConfiguration):
2101 (WebCore::RTCPeerConnection::create):
2102 * Modules/mediastream/RTCPeerConnection.h:
2103 * Modules/webaudio/AudioContext.cpp:
2104 (WebCore::AudioContext::create):
2105 * Modules/webdatabase/AbstractDatabaseServer.h:
2106 * Modules/webdatabase/DOMWindowWebDatabase.cpp:
2107 (WebCore::DOMWindowWebDatabase::openDatabase):
2108 * Modules/webdatabase/DOMWindowWebDatabase.h:
2109 * Modules/webdatabase/DatabaseManager.cpp:
2110 (WebCore::DatabaseManager::existingDatabaseContextFor):
2111 (WebCore::DatabaseManager::databaseContextFor):
2112 (WebCore::DatabaseManager::openDatabase):
2113 * Modules/webdatabase/DatabaseManager.h:
2114 * Modules/webdatabase/DatabaseServer.cpp:
2115 (WebCore::DatabaseServer::openDatabase):
2116 (WebCore::DatabaseServer::createDatabase):
2117 * Modules/webdatabase/DatabaseServer.h:
2119 2015-06-01 Daniel Bates <dabates@apple.com>
2121 Notify client that we began editing when text field is focused
2122 https://bugs.webkit.org/show_bug.cgi?id=145439
2123 <rdar://problem/21142108>
2125 Reviewed by Anders Carlsson.
2127 Inform the editor client that we began editing when a text field is focused either
2128 by being explicitly focused (programmatically or by user interaction) or implicitly
2129 focused when the window became active.
2131 Currently we only notify the editor client that we began editing a text field when
2132 when a person actually changes the value of the field. And we always notify the
2133 client that we ended editing when a text field is defocused regardless of whether
2134 we executed a began editing callback. Moreover we notify a client that we
2135 ended editing when the field is defocused (either explicitly or implicitly when the
2136 window becomes inactive). Instead we should always notify the client that we began
2137 editing when the field is focused so that this callback is symmetric with the end
2140 * html/SearchInputType.cpp:
2141 (WebCore::SearchInputType::didSetValueByUserEdit): Remove parameter for ValueChangeState,
2142 which was used to determine whether we should notify the client that we began editing, because
2143 we we will notify the client that editing began when the text field is focused as opposed to
2144 when the value of text field first changes.
2145 * html/SearchInputType.h: Ditto.
2146 * html/TextFieldInputType.cpp:
2147 (WebCore::TextFieldInputType::forwardEvent): Notify the client that we began editing when
2148 the text field is focused.
2149 (WebCore::TextFieldInputType::subtreeHasChanged): Update call site of didSetValueByUserEdit()
2150 following the removal of its parameter.
2151 (WebCore::TextFieldInputType::didSetValueByUserEdit): Ditto.
2152 * html/TextFieldInputType.h:
2154 2015-06-01 Anders Carlsson <andersca@apple.com>
2156 WAKScrollView.h cannot be imported standalone
2157 https://bugs.webkit.org/show_bug.cgi?id=145529
2159 Reviewed by Dan Bernstein.
2161 * page/mac/WebCoreFrameView.h:
2162 Remove the __cplusplus #ifdefs since WebCoreFrameView.h is only used by Objective-C++ code.
2163 (The different non-C++ method declarations were wrong anyway!)
2165 * platform/ScrollTypes.h:
2166 Remove the #ifdef __cplusplus surrounding the code, add header includes to make the file self-contained,
2167 and reformat the enum definitions.
2169 2015-06-01 Alex Christensen <achristensen@webkit.org>
2171 [Content Extensions] resource-type and load-type should be independent.
2172 https://bugs.webkit.org/show_bug.cgi?id=145528
2173 rdar://problem/21190765
2175 Reviewed by Benjamin Poulain.
2177 Covered by existing tests and a new API test.
2179 Right now we use the same uint16_t to store all the load-type and resource-type flags,
2180 then we just do a bitwise and to check both at the same time. This results in a trigger
2181 with load-type and resource-type firing if either condition is met, not both conditions.
2182 A trigger with both resource-type and load-type conditions should only fire if both conditions are met.
2184 * contentextensions/DFABytecodeInterpreter.cpp:
2185 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
2186 Check and correctly handle rules with both resource-type and load-type flags.
2187 * loader/ResourceLoadInfo.h:
2188 Add masks to separate flags from resource-type and load-type.
2190 2015-06-01 Alex Christensen <achristensen@webkit.org>
2192 [Content Extensions] Reduce DFA memory usage.
2193 https://bugs.webkit.org/show_bug.cgi?id=145526
2195 Reviewed by Benjamin Poulain.
2197 * contentextensions/DFA.cpp:
2198 (WebCore::ContentExtensions::DFA::memoryUsed):
2199 (WebCore::ContentExtensions::DFANode::transitions):
2200 (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination):
2201 (WebCore::ContentExtensions::DFANode::changeFallbackTransition):
2202 (WebCore::ContentExtensions::DFANode::addFallbackTransition):
2203 (WebCore::ContentExtensions::DFANode::containsTransition):
2204 (WebCore::ContentExtensions::DFANode::kill):
2205 * contentextensions/DFA.h:
2206 * contentextensions/DFAMinimizer.cpp:
2207 (WebCore::ContentExtensions::DFAMinimizer::minimize):
2208 * contentextensions/NFAToDFA.cpp:
2209 (WebCore::ContentExtensions::NFAToDFA::convert):
2210 Use separate Vectors for the transition characters and destinations to avoid wasting memory to padding a std::pair.
2212 2015-06-01 Matt Rajca <mrajca@apple.com>
2214 Implemented the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as
2215 some required infrastructure.
2216 https://bugs.webkit.org/show_bug.cgi?id=145523
2218 Reviewed by Eric Carlson.
2220 * Modules/mediasession/MediaRemoteControls.cpp:
2221 (WebCore::MediaRemoteControls::MediaRemoteControls): Initialize all instance variables.
2222 * Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution
2223 context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented.
2224 (WebCore::MediaRemoteControls::create):
2225 * Modules/mediasession/MediaRemoteControls.idl: Indicate MediaRemoteControls now takes a constructor that is
2226 passed in a script execution context. To prevent build errors, event handlers have been removed until they are
2228 * WebCore.xcodeproj/project.pbxproj: We should be building the derived JSMediaRemoteControls class with WebCore.
2229 * dom/EventTargetFactory.in: Ensure a MediaRemoteControlsEventTargetInterfaceType is generated.
2231 2015-06-01 Benjamin Poulain <bpoulain@apple.com>
2233 [CSS JIT] Fail to compile when we are out of executable memory
2234 https://bugs.webkit.org/show_bug.cgi?id=145483
2235 rdar://problem/21166612
2237 Reviewed by Andreas Kling.
2239 We should use a soft failure when the Linker fails to allocate
2240 executable memory for the CSS JIT. We will just fallback to slow
2241 code when that happen, better slow CSS than crashing.
2243 Credit to Chris for finding this problem.
2245 * cssjit/SelectorCompiler.cpp:
2246 (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
2248 2015-06-01 Chris Dumez <cdumez@apple.com>
2250 ASSERT(revalidatingResource.inCache()) in MemoryCache when reloading tumblr.com
2251 https://bugs.webkit.org/show_bug.cgi?id=145518
2252 <rdar://problem/21168573>
2254 Reviewed by Darin Adler.
2256 There was an assertion in MemoryCache::revalidationSucceeded() making
2257 sure that the resource that was revalidated is still in the memory
2258 cache. However, nothing prevents this resource from being pruned while
2259 it is being revalidated. We do make sure that the resource in question
2260 cannot be destroyed though (see CachedResource::canDelete()).
2262 This patch gets rid of this assertion as it is incorrect. Also, the
2263 fact that the resource is no longer in the memory cache is not an
2264 issue. We are merely going to call MemoryCache::remove() to remove
2265 it from the memory cache before re-adding it and updating its
2266 HTTP response. The call to MemoryCache::remove() will simply be a
2267 no-op in this case and we will not have any problem adding the
2268 resource back to the memory cache because the resource is kept alive.
2270 Test: http/tests/cache/memory-cache-pruning-during-revalidation.html
2272 * loader/cache/MemoryCache.cpp:
2273 (WebCore::MemoryCache::revalidationSucceeded): Deleted.
2275 2015-06-01 Matt Rajca <mrajca@apple.com>
2277 Add stub implementation of MediaRemoteControls, part of the Media Session spec.
2278 https://bugs.webkit.org/show_bug.cgi?id=145462
2280 Reviewed by Eric Carlson.
2282 * CMakeLists.txt: Added IDL file as well as the corresponding implementation file.
2283 * DerivedSources.make: Included the new IDL file.
2284 * Modules/mediasession/MediaRemoteControls.cpp: Added an empty implementation file.
2285 (MediaRemoteControls::~MediaRemoteControls):
2286 * Modules/mediasession/MediaRemoteControls.h: Added a stubbed header file with accessors for the four attributes declared in the IDL file.
2287 (WebCore::MediaRemoteControls::previousTrackEnabled):
2288 (WebCore::MediaRemoteControls::setPreviousTrackEnabled):
2289 (WebCore::MediaRemoteControls::nextTrackEnabled):
2290 (WebCore::MediaRemoteControls::setNextTrackEnabled):
2291 (WebCore::MediaRemoteControls::seekForwardEnabled):
2292 (WebCore::MediaRemoteControls::setSeekForwardEnabled):
2293 (WebCore::MediaRemoteControls::seekBackwardEnabled):
2294 (WebCore::MediaRemoteControls::setSeekBackwardEnabled):
2295 * Modules/mediasession/MediaRemoteControls.idl: Added from the Media Session spec.
2296 * WebCore.xcodeproj/project.pbxproj: Included the new IDL file and MediaRemoteControls.cpp/.h sources.
2298 2015-06-01 Sergio Villar Senin <svillar@igalia.com>
2300 [CSS Grid Layout] Simplify the interface of GridResolvedPosition
2301 https://bugs.webkit.org/show_bug.cgi?id=139077
2303 Reviewed by Darin Adler.
2305 The interface of GridResolvedPosition is full of static methods
2306 that are used only internally, we should not expose them.
2308 Apart from that resolveGridPositionsFromStyle() do always return
2309 a valid GridSpan from now on meaning that the caller has to ensure
2310 that the resolution does not require running the auto-placement
2311 algorithm. A new class called GridUnresolvedSpan was added for
2314 No new tests as this is a refactoring.
2316 * rendering/RenderGrid.cpp:
2317 (WebCore::RenderGrid::placeItemsOnGrid):
2318 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
2319 (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
2320 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2321 * rendering/style/GridPosition.h:
2322 * rendering/style/GridResolvedPosition.cpp:
2323 (WebCore::gridLinesForSide):
2324 (WebCore::implicitNamedGridLineForSide):
2325 (WebCore::isNonExistentNamedLineOrArea):
2326 (WebCore::GridUnresolvedSpan::requiresAutoPlacement):
2327 (WebCore::GridUnresolvedSpan::adjustGridPositionsFromStyle):
2328 (WebCore::adjustGridPositionForRowEndColumnEndSide):
2329 (WebCore::adjustGridPositionForSide):
2330 (WebCore::resolveNamedGridLinePositionFromStyle):
2331 (WebCore::firstNamedGridLineBeforePosition):
2332 (WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
2333 (WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
2334 (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
2335 (WebCore::resolveGridPositionAgainstOppositePosition):
2336 (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
2337 (WebCore::resolveGridPositionFromStyle):
2338 (WebCore::GridResolvedPosition::GridResolvedPosition):
2339 (WebCore::GridResolvedPosition::unresolvedSpanFromStyle):
2340 (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
2341 (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Deleted.
2342 (WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle): Deleted.
2343 (WebCore::GridResolvedPosition::resolveGridPositionFromStyle): Deleted.
2344 (WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition): Deleted.
2345 (WebCore::GridResolvedPosition::resolveNamedGridLinePositionAgainstOppositePosition): Deleted.
2346 (WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Deleted.
2347 (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Deleted.
2348 * rendering/style/GridResolvedPosition.h:
2349 (WebCore::GridUnresolvedSpan::GridUnresolvedSpan): New class.
2350 (WebCore::GridUnresolvedSpan::initialPosition):
2351 (WebCore::GridUnresolvedSpan::finalPosition):
2352 (WebCore::GridUnresolvedSpan::initialPositionSide):
2353 (WebCore::GridUnresolvedSpan::finalPositionSide):
2354 (WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide): Deleted.
2355 (WebCore::GridResolvedPosition::adjustGridPositionForSide): Deleted.
2356 (WebCore::GridResolvedPosition::GridResolvedPosition): Deleted.
2358 2015-06-01 Csaba Osztrogonác <ossy@webkit.org>
2360 Fix the !ENABLE(VIDEO_TRACK) build after r184799
2361 https://bugs.webkit.org/show_bug.cgi?id=145510
2363 Reviewed by Eric Carlson.
2365 * testing/Internals.cpp:
2366 (WebCore::Internals::userPreferredAudioCharacteristics):
2367 (WebCore::Internals::setUserPreferredAudioCharacteristic):
2369 2015-06-01 Csaba Osztrogonác <ossy@webkit.org>
2371 Fix logical-not-parentheses warning in CachedScript.cpp
2372 https://bugs.webkit.org/show_bug.cgi?id=145254
2374 Reviewed by Sam Weinig.
2376 * loader/cache/CachedScript.cpp:
2377 (WebCore::CachedScript::mimeTypeAllowedByNosniff): "!X==Y" should be "X!=Y" here.
2379 2015-05-31 Dan Bernstein <mitz@apple.com>
2381 Remove Panther support
2382 https://bugs.webkit.org/show_bug.cgi?id=145506
2384 Reviewed by Sam Weinig.
2386 * platform/ios/wak/WAKAppKitStubs.h: Don't check for pre-Tiger SDKs.
2388 2015-05-31 Carlos Alberto Lopez Perez <clopez@igalia.com>
2390 Remove unused variable kZoomTicks.
2391 https://bugs.webkit.org/show_bug.cgi?id=145504
2393 Reviewed by Sam Weinig.
2395 No new tests, no behavior changes.
2397 * platform/ScrollAnimatorNone.cpp:
2399 2015-05-31 Youenn Fablet <youenn.fablet@crf.canon.fr>
2401 Async XMLHttpRequest should get access to AppCache resources stored as flat files
2402 https://bugs.webkit.org/show_bug.cgi?id=138506
2404 Reviewed by Darin Adler.
2406 This patch reads flat file data when DocumentLoader substituteResource delivery timer is fired.
2407 Refactoring to remove ApplicationCacheHost/DocumentLoader friend link.
2408 Added ResourceLoader::deliverResponseAndData helper function, taking a SharedBuffer as input to remove an unneeded copy for flat files (no change for other files).
2410 Test: http/tests/appcache/simple-video-async.html
2412 * loader/DocumentLoader.cpp:
2413 (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
2414 (WebCore::DocumentLoader::scheduleArchiveLoad):
2415 (WebCore::DocumentLoader::scheduleSubstituteResourceLoad): Helper function to remove ApplicationCacheHost friend link.
2416 * loader/DocumentLoader.h:
2417 * loader/ResourceLoader.cpp:
2418 (WebCore::ResourceLoader::deliverResponseAndData): Helper function, code mostly moved from DocumentLoader::substituteResourceDeliveryTimerFired.
2419 * loader/ResourceLoader.h:
2420 * loader/SubstituteResource.h:
2421 (WebCore::SubstituteResource::deliver): Introduced to be overriden by ApplicationCacheResource to take care of flat file case.
2422 * loader/appcache/ApplicationCacheHost.cpp:
2423 (WebCore::ApplicationCacheHost::maybeLoadResource):
2424 (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
2425 * loader/appcache/ApplicationCacheResource.cpp:
2426 (WebCore::ApplicationCacheResource::deliver): Use SharedBuffer::createWithContentsOfFile to load data stored in flat file.
2427 * loader/appcache/ApplicationCacheResource.h:
2429 2015-05-31 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2431 [Streams API] Implement ReadableStreamController constructor
2432 https://bugs.webkit.org/show_bug.cgi?id=143752
2434 Reviewed by Darin Adler.
2436 Covered by rebased test and expectation.
2438 * Modules/streams/ReadableStreamController.idl: Adding CustomConstructor.
2439 * bindings/js/JSReadableStreamControllerCustom.cpp:
2440 (WebCore::constructJSReadableStreamController): Throws an exception whenever called.
2442 2015-05-30 Brady Eidson <beidson@apple.com>
2444 Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
2445 https://bugs.webkit.org/show_bug.cgi?id=145495
2447 Reviewed by Alexey Proskuryakov.
2449 No new tests (No change in behavior).
2451 In most cases ownership of the Event is not actually being transferred, and these functions are all rarely called anyways.
2453 * html/HTMLLinkElement.cpp:
2454 (WebCore::HTMLLinkElement::handleClick):
2456 * loader/FrameLoader.cpp:
2457 (WebCore::FrameLoader::urlSelected):
2458 (WebCore::FrameLoader::loadFrameRequest):
2459 (WebCore::FrameLoader::loadURL):
2460 (WebCore::FrameLoader::loadPostRequest):
2461 * loader/FrameLoader.h:
2463 2015-05-30 Andreas Kling <akling@apple.com>
2465 [iOS] Tiling coverage sometimes inflated by outdated scale factor.
2466 <https://webkit.org/b/145494>
2467 <rdar://problem/20989389>
2469 Reviewed by Benjamin Poulain.
2471 Have GraphicsLayerCA plumb the current contents scale through to TileController::adjustCoverageRect()
2472 instead of TileController getting it from TileGrid.
2474 This avoids a situation where adjustCoverageRect() could cause temporarily oversized tiling coverage
2475 if called while TileGrid's content scale is outdated, and we're neither zooming or pinching, following
2476 a pinch zoom that increased the scale factor.
2478 Specifically, if all the velocity data is zero, we pad the coverage rect by a horizontal and vertical
2479 margin computed like so:
2481 margin = defaultTileSize / tileGrid.scale
2483 If the actual scale is 5, but the TileGrid's outdated scale is e.g 0.8, you'll get a much larger
2484 margin than you really wanted. Then the whole thing gets scaled up by 5x later on, and we explode
2485 in a fiery feast of IOSurface allocations.
2487 * platform/graphics/TiledBacking.h:
2488 * platform/graphics/ca/GraphicsLayerCA.cpp:
2489 (WebCore::GraphicsLayerCA::adjustCoverageRect):
2490 * platform/graphics/ca/TileController.cpp:
2491 (WebCore::TileController::computeTileCoverageRect):
2492 * platform/graphics/ca/TileController.h:
2494 2015-05-30 Brady Eidson <beidson@apple.com>
2496 Fix Windows tests broken by r185007.
2497 https://bugs.webkit.org/show_bug.cgi?id=145472
2499 Unreviewed. Discussed with Alexey Proskuryakov.
2501 No new tests (Fixing the four broken ones should suffice).
2503 The bug was that evaluating arguments in a method/constructor call has no guaranteed sequencing.
2505 Clang seems to always do LTR, allowing the PassRefPtr to be evaluated as a bool in the call to
2506 navigationType() before it is "consumed" by the PassRefPtr argument.
2508 In Visual Studio the PassRefPtr consumption happened before the bool evaluation, meaning `false`
2509 was always passed in to navigationType(), breaking the four tests.
2511 The fix? Using PassRefPtr here was silly in the first place.
2512 No ownership is being transferred.
2515 * loader/FrameLoader.cpp:
2516 (WebCore::FrameLoader::loadURL):
2517 (WebCore::FrameLoader::loadPostRequest):
2518 * loader/NavigationAction.cpp:
2520 (WebCore::NavigationAction::NavigationAction):
2521 * loader/NavigationAction.h: Nobody is actually transferring ownership of these Events.
2522 Raw pointers will work just fine, thanks.
2524 2015-05-29 Joseph Pecoraro <pecoraro@apple.com>
2526 Unreviewed bindings test rebaseline after r185023.
2528 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2529 (WebCore::isObservable): Deleted.
2530 (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots): Deleted.
2532 2015-05-29 Andreas Kling <akling@apple.com>
2534 [iOS] Reduce tiling coverage when doing a pure pinch zoom with no panning.
2535 <https://webkit.org/b/145481>
2536 <rdar://problem/20989389>
2538 Reviewed by Benjamin Poulain.
2540 When we're zooming in with a pinch gesture but not panning the page
2541 at the same time, make the coverage rect be the visible rect.
2543 This reduces memory pressure during zooming, especially on slower
2544 devices that struggle to keep up with the current viewport.
2546 * platform/graphics/ca/TileController.cpp:
2547 (WebCore::TileController::computeTileCoverageRect):
2549 2015-05-29 Keith Miller <keith_miller@apple.com>
2551 WeakMap reference w/ DOM element as key does not survive long enough.
2552 https://bugs.webkit.org/show_bug.cgi?id=137651
2554 Reviewed by Geoffrey Garen.
2556 Remove isObservable functions as an "unobservable wrappers"
2557 optimization is invalid with WeakMaps. Performance testing
2558 will be done after the code is commited. If major
2559 performance issues occur the patch will be rolled out.
2561 Test: js/dom/weakmap-gc-unobservable-dom-nodes.html
2563 * bindings/js/JSNodeCustom.cpp:
2564 (WebCore::isReachableFromDOM):
2565 (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
2566 (WebCore::JSNode::insertBefore):
2567 (WebCore::isObservable): Deleted.
2568 * bindings/scripts/CodeGeneratorJS.pm:
2569 (GenerateImplementation):
2571 2015-05-29 Anders Carlsson <andersca@apple.com>
2573 Get rid of WAKViewPrivate.h
2574 https://bugs.webkit.org/show_bug.cgi?id=145482
2575 rdar://problem/21162149
2577 Reviewed by Dan Bernstein.
2579 Merge WAKViewPrivate.h into WAKViewInternal.h and move the NSView sizing enum
2580 to WAKView.h since that was the only thing WebKit used (indirectly) from WAKViewPrivate.h.
2582 * WebCore.xcodeproj/project.pbxproj:
2583 * platform/WAKViewInternal.h:
2584 (WAKViewForWKViewRef):
2585 * platform/ios/ScrollViewIOS.mm:
2586 * platform/ios/wak/WAKResponder.m:
2587 * platform/ios/wak/WAKView.h:
2588 * platform/ios/wak/WAKView.mm:
2589 * platform/ios/wak/WAKViewPrivate.h: Removed.
2590 (WAKViewForWKViewRef): Deleted.
2591 * platform/ios/wak/WAKWindow.mm:
2592 * platform/ios/wak/WKView.h:
2593 * platform/ios/wak/WKView.mm:
2595 2015-05-29 Daniel Bates <dabates@apple.com>
2597 Clean up logic for updating caps lock indicator state
2598 https://bugs.webkit.org/show_bug.cgi?id=145329
2600 Reviewed by Sam Weinig.
2602 Remove logic to explicitly update the state of the caps lock indicator, which was used
2603 when the caps logic indicator was implemented as part of RenderTextControl. Currently,
2604 the caps logic indicator is implemented as part of a shadow DOM and we have existing
2605 logic to forward DOM focus and blur events to it so that it may update its state.
2607 No change in behavior.
2609 * editing/FrameSelection.cpp:
2610 (WebCore::FrameSelection::focusedOrActiveStateChanged): Deleted.
2611 * editing/FrameSelection.h:
2612 * page/EventHandler.cpp:
2613 (WebCore::EventHandler::keyEvent): Inline the code from EventHandler::capsLockStateMayHaveChanged()
2614 into this function because it is the only caller of EventHandler::capsLockStateMayHaveChanged() after
2615 we removed the call site in FrameSelection::focusedOrActiveStateChanged().
2616 (WebCore::EventHandler::capsLockStateMayHaveChanged): Deleted.
2617 * page/EventHandler.h:
2619 2015-05-29 Zalan Bujtas <zalan@apple.com>
2621 Text disappears shortly after page load on Nexus 7 site.
2622 https://bugs.webkit.org/show_bug.cgi?id=145467
2623 rdar://problem/18327239
2625 Reviewed by Simon Fraser.
2627 This patch ensures that overlap testing for composited layers works properly when the sibling
2628 layer gets composited through its child.
2630 When a layer gets composited through its child content, the recursive overlap testing should build up the
2631 overlapmap stack so that sibling content is intersected both against the child and its parent bounds.
2633 Tests: compositing/sibling-layer-does-not-get-composited-overflow-hidden-case.html
2634 compositing/sibling-layer-does-not-get-composited-transform-case.html
2636 * rendering/RenderLayerCompositor.cpp:
2637 (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2638 (WebCore::RenderLayerCompositor::OverlapMap::contains): Deleted.
2640 2015-05-29 Brady Eidson <beidson@apple.com>
2642 Review feedback followup for r185003.
2643 https://bugs.webkit.org/show_bug.cgi?id=145463
2645 Reviewed by Darin Adler.
2647 * platform/sql/SQLiteDatabase.cpp:
2648 (WebCore::SQLiteDatabase::overrideUnauthorizedFunctions): `static const` one thing, c++-style cast another.
2650 2015-05-29 Chris Dumez <cdumez@apple.com>
2652 WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
2653 https://bugs.webkit.org/show_bug.cgi?id=145422
2654 <rdar://problem/20613631>
2656 Reviewed by Brady Eidson.
2658 We sometimes crash when destroying a PageCache CachedFrame because its
2659 DocumentLoader is still loading. This should never happen as we are not
2660 supposed to let pages are still have pending loads into the PageCache.
2662 However, we were using DocumentLoader::isLoadingInAPISense() as check
2663 in PageCache::canCachePageContainingThisFrame() which is not exactly
2664 what we want. isLoadingInAPISense() no longer considers subresource
2665 loads once the frame as loaded. This means if the JS triggers a new
2666 load in a subframe after it has been loaded, then isLoadingInAPISense()
2667 will return false, despite the pending load.
2669 This patch replaces the isLoadingInAPISense() check with isLoading()
2670 as this will consider all pending loads, even after the frame is
2673 In most cases, using isLoadingInAPISense() was not an issue because
2674 we call DocumentLoader::stopLoading() in all subframes before starting
2675 a provisional load. However, nothing seems to prevent JS from
2676 triggering a new load after that and before the new load gets committed
2677 (which is when we save the page into PageCache).
2679 No new test as we don't have a reliable reproduction case and the
2680 issue is timing related.
2682 * history/PageCache.cpp:
2683 (WebCore::logCanCacheFrameDecision):
2684 (WebCore::PageCache::canCachePageContainingThisFrame):
2685 * page/DiagnosticLoggingKeys.cpp:
2686 (WebCore::DiagnosticLoggingKeys::isLoading):
2687 (WebCore::DiagnosticLoggingKeys::loadingAPISenseKey): Deleted.
2688 * page/DiagnosticLoggingKeys.h:
2690 2015-05-29 Chris Dumez <cdumez@apple.com>
2692 Consider throttling DOM timers in iframes outside the viewport
2693 https://bugs.webkit.org/show_bug.cgi?id=145465
2694 <rdar://problem/20768957>
2696 Reviewed by Darin Adler.
2698 Throttle DOM timers in iframes that are outside the viewport to decrease
2699 CPU usage, improve performance and reduce power use.
2701 The approach is similar to what we already did for requestAnimationFrame
2704 We already has support for throttling DOM timers at:
2705 - Page level: for backgound pages
2706 - DOM timer level: for timers changing the style of an element outside
2707 the viewport or drawing on a canvas outside the viewport.
2709 This patch adds support for throttling DOM timers at Document level so
2710 we can throttle all timers inside a specific iframe / Document. It relies
2711 on the same timerAlignmentInterval that is used for throttling at Page
2712 level with tweaks so that different Documents inside the same Page can
2713 have a different timerAlignmentInterval.
2715 Test: fast/dom/timer-throttling-subframe.html
2718 (WebCore::Document::setTimerThrottlingEnabled):
2719 (WebCore::Document::timerAlignmentInterval):
2721 (WebCore::Document::isTimerThrottlingEnabled):
2722 * page/DOMTimer.cpp:
2723 (WebCore::DOMTimer::alignedFireTime):
2724 The previous code was not throttling the timer if its fireTime was in
2725 the past. This was causing some aggressive timers on mashable.com to
2726 not be throttled so I got rid of this behavior. I don't see any reason
2727 why we would not throttle a timer simply because it is supposed to have
2730 * page/FrameView.cpp:
2731 (WebCore::FrameView::viewportContentsChanged):
2732 (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
2735 * testing/Internals.cpp:
2736 (WebCore::Internals::areTimersThrottled):
2737 * testing/Internals.h:
2738 * testing/Internals.idl:
2739 Add API to facilitate layout testing of this functionality.
2741 2015-05-29 Brady Eidson <beidson@apple.com>
2743 NavigationAction constructor cleanup.
2744 https://bugs.webkit.org/show_bug.cgi?id=145472
2746 Reviewed by Alex Christensen.
2748 No new tests (Refactor, no change in behavior).
2750 * loader/NavigationAction.cpp:
2751 (WebCore::NavigationAction::NavigationAction): Delegate many of the various constructors
2752 to a single full-featured constructor.
2753 * loader/NavigationAction.h:
2755 2015-05-29 Matt Rajca <mrajca@apple.com>
2757 Rename MediaSession and MediaSessionClient to PlatformMediaSession and PlatformMediaSessionClient so we can use MediaSession for the formal implementation of the Media Session spec.
2758 https://bugs.webkit.org/show_bug.cgi?id=145447
2760 Reviewed by Eric Carlson.
2762 * Modules/webaudio/AudioContext.cpp:
2763 (WebCore::AudioContext::AudioContext):
2764 (WebCore::AudioContext::suspendPlayback):
2765 * Modules/webaudio/AudioContext.h:
2766 * WebCore.vcxproj/WebCore.vcxproj:
2767 * WebCore.vcxproj/WebCore.vcxproj.filters:
2768 * WebCore.xcodeproj/project.pbxproj:
2769 * html/HTMLAudioElement.h:
2770 * html/HTMLMediaElement.cpp:
2771 (WebCore::HTMLMediaElement::pausedForUserInteraction):
2772 (WebCore::HTMLMediaElement::mediaType):
2773 (WebCore::HTMLMediaElement::presentationType):
2774 (WebCore::HTMLMediaElement::displayType):
2775 (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand):
2776 * html/HTMLMediaElement.h:
2777 * html/HTMLMediaSession.cpp:
2778 (WebCore::HTMLMediaSession::HTMLMediaSession):
2779 (WebCore::HTMLMediaSession::requiresFullscreenForVideoPlayback):
2780 * html/HTMLMediaSession.h:
2781 * html/HTMLVideoElement.h:
2782 * platform/RemoteCommandListener.h:
2783 * platform/audio/MediaSessionManager.cpp:
2784 (WebCore::MediaSessionManager::resetRestrictions):
2785 (WebCore::MediaSessionManager::has):
2786 (WebCore::MediaSessionManager::activeAudioSessionRequired):
2787 (WebCore::MediaSessionManager::count):
2788 (WebCore::MediaSessionManager::beginInterruption):
2789 (WebCore::MediaSessionManager::endInterruption):
2790 (WebCore::MediaSessionManager::addSession):
2791 (WebCore::MediaSessionManager::removeSession):
2792 (WebCore::MediaSessionManager::addRestriction):
2793 (WebCore::MediaSessionManager::removeRestriction):
2794 (WebCore::MediaSessionManager::restrictions):
2795 (WebCore::MediaSessionManager::sessionWillBeginPlayback):
2796 (WebCore::MediaSessionManager::sessionWillEndPlayback):
2797 (WebCore::MediaSessionManager::setCurrentSession):
2798 (WebCore::MediaSessionManager::currentSession):
2799 (WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
2800 (WebCore::MediaSessionManager::sessionCanLoadMedia):
2801 (WebCore::MediaSessionManager::applicationWillEnterBackground):
2802 (WebCore::MediaSessionManager::applicationWillEnterForeground):
2803 (WebCore::MediaSessionManager::didReceiveRemoteControlCommand):
2804 (WebCore::MediaSessionManager::systemWillSleep):
2805 (WebCore::MediaSessionManager::systemDidWake):
2806 * platform/audio/MediaSessionManager.h:
2807 (WebCore::MediaSessionManager::sessions):
2808 * platform/audio/PlatformMediaSession.cpp: Renamed from Source/WebCore/platform/audio/MediaSession.cpp.
2809 (WebCore::stateName):
2810 (WebCore::PlatformMediaSession::create):
2811 (WebCore::PlatformMediaSession::PlatformMediaSession):
2812 (WebCore::PlatformMediaSession::~PlatformMediaSession):
2813 (WebCore::PlatformMediaSession::setState):
2814 (WebCore::PlatformMediaSession::beginInterruption):
2815 (WebCore::PlatformMediaSession::endInterruption):
2816 (WebCore::PlatformMediaSession::clientWillBeginPlayback):
2817 (WebCore::PlatformMediaSession::clientWillPausePlayback):
2818 (WebCore::PlatformMediaSession::pauseSession):
2819 (WebCore::PlatformMediaSession::mediaType):
2820 (WebCore::PlatformMediaSession::presentationType):
2821 (WebCore::PlatformMediaSession::title):
2822 (WebCore::PlatformMediaSession::duration):
2823 (WebCore::PlatformMediaSession::currentTime):
2824 (WebCore::PlatformMediaSession::canReceiveRemoteControlCommands):
2825 (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand):
2826 (WebCore::PlatformMediaSession::visibilityChanged):
2827 (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
2828 (WebCore::PlatformMediaSession::updateClientDataBuffering):
2829 (WebCore::PlatformMediaSession::isHidden):
2830 (WebCore::PlatformMediaSession::displayType):
2831 (WebCore::PlatformMediaSessionClient::mediaSessionTitle):
2832 (WebCore::PlatformMediaSessionClient::mediaSessionDuration):
2833 (WebCore::PlatformMediaSessionClient::mediaSessionCurrentTime):
2834 * platform/audio/PlatformMediaSession.h: Renamed from Source/WebCore/platform/audio/MediaSession.h.
2835 (WebCore::PlatformMediaSession::state):
2836 (WebCore::PlatformMediaSession::canPlayToWirelessPlaybackTarget):
2837 (WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTarget):
2838 (WebCore::PlatformMediaSession::requiresPlaybackTargetRouteMonitoring):
2839 (WebCore::PlatformMediaSession::client):
2840 (WebCore::PlatformMediaSessionClient::PlatformMediaSessionClient):
2841 (WebCore::PlatformMediaSessionClient::displayType):
2842 (WebCore::PlatformMediaSessionClient::setShouldBufferData):
2843 (WebCore::PlatformMediaSessionClient::elementIsHidden):
2844 (WebCore::PlatformMediaSessionClient::wirelessRoutesAvailableDidChange):
2845 (WebCore::PlatformMediaSessionClient::setWirelessPlaybackTarget):
2846 (WebCore::PlatformMediaSessionClient::canPlayToWirelessPlaybackTarget):
2847 (WebCore::PlatformMediaSessionClient::isPlayingToWirelessPlaybackTarget):
2848 (WebCore::PlatformMediaSessionClient::setShouldPlayToPlaybackTarget):
2849 (WebCore::PlatformMediaSessionClient::~PlatformMediaSessionClient):
2850 * platform/audio/ios/MediaSessionManagerIOS.h:
2851 * platform/audio/ios/MediaSessionManagerIOS.mm:
2852 (WebCore::MediaSessionManageriOS::resetRestrictions):
2853 (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback):
2854 (WebCore::MediaSessionManageriOS::sessionWillEndPlayback):
2855 (WebCore::MediaSessionManageriOS::updateNowPlayingInfo):
2856 (WebCore::MediaSessionManageriOS::sessionCanLoadMedia):
2857 (-[WebMediaSessionHelper interruption:]):
2858 * platform/audio/mac/MediaSessionManagerMac.cpp:
2859 (MediaSessionManager::updateSessionState):
2860 * platform/graphics/MediaPlayer.cpp:
2861 (WebCore::MediaPlayer::handlePlaybackCommand):
2862 * platform/graphics/MediaPlayer.h:
2863 (WebCore::MediaPlayerClient::mediaPlayerHandlePlaybackCommand):
2864 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2865 (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
2866 * platform/ios/RemoteCommandListenerIOS.mm:
2867 (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS):
2868 * testing/Internals.cpp:
2869 (WebCore::Internals::beginMediaSessionInterruption):
2870 (WebCore::Internals::endMediaSessionInterruption):
2871 (WebCore::Internals::setMediaSessionRestrictions):
2872 (WebCore::Internals::postRemoteControlCommand):
2874 2015-05-29 Alex Christensen <achristensen@webkit.org>
2876 [Content Extensions] Decrease maxNFASize
2877 https://bugs.webkit.org/show_bug.cgi?id=145461
2879 Reviewed by Gavin Barraclough.
2881 * contentextensions/ContentExtensionCompiler.cpp:
2882 (WebCore::ContentExtensions::compileRuleList):
2883 Decrease maxNFASize based on analysis of memory usage and compiling and interpreting time.
2885 2015-05-29 Brady Eidson <beidson@apple.com>
2887 WebSQL default functions can bypass authorizer.
2888 <rdar://problem/21048994> and https://bugs.webkit.org/show_bug.cgi?id=145463
2890 Reviewed by Sam Weinig and Alexey Proskuryakov.
2894 * platform/sql/SQLiteDatabase.cpp:
2895 (WebCore::unauthorizedSQLFunction): Function to install into SQLite to override some built-in functions.
2896 (WebCore::SQLiteDatabase::open):
2897 (WebCore::SQLiteDatabase::overrideUnauthorizedFunctions): Install function overrides for functions that
2898 take arbitrary input that are also meant to be disabled by virtue of them not being whitelisted.
2899 * platform/sql/SQLiteDatabase.h:
2901 2015-05-29 Roger Fong <roger_fong@apple.com>
2903 Unreviewed. Shift fullscreen controls down 20px.
2904 <rdar://problem/21161523>
2906 * Modules/mediacontrols/mediaControlsApple.css:
2907 (video:-webkit-full-screen::-webkit-media-controls-panel):
2908 Fullscreen control panel is too high and overlaps with caption menu.
2911 2015-05-28 Simon Fraser <simon.fraser@apple.com>
2913 Some assertion failures in compositing code after r183820
2914 https://bugs.webkit.org/show_bug.cgi?id=144630
2916 Reviewed by Alexey Proskuryakov.
2918 Reinstate the assertion commented out in r183843. Fixed by having blending no longer
2919 escape the media elements, which was fixed via bug 145420.
2921 * rendering/RenderLayerCompositor.cpp:
2922 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2924 2015-05-29 Hunseop Jeong <hs85.jeong@samsung.com>
2926 Use modern for-loops in WebCore/plugins, storage, style, testing and workers.
2927 https://bugs.webkit.org/show_bug.cgi?id=145425
2929 Reviewed by Darin Adler.
2931 No new tests, no behavior changes.
2933 * plugins/DOMMimeTypeArray.cpp:
2934 (WebCore::DOMMimeTypeArray::canGetItemsForName):
2935 * plugins/DOMPlugin.cpp:
2936 (WebCore::DOMPlugin::canGetItemsForName):
2937 * plugins/DOMPluginArray.cpp:
2938 (WebCore::DOMPluginArray::canGetItemsForName):
2939 * plugins/PluginData.cpp:
2940 (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
2941 * plugins/PluginMainThreadScheduler.cpp:
2942 (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin):
2943 (WebCore::PluginMainThreadScheduler::dispatchCalls):
2944 * storage/StorageEventDispatcher.cpp:
2945 (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
2946 (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
2947 (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
2948 * storage/StorageMap.cpp:
2949 (WebCore::StorageMap::importItems):
2950 * style/StyleResolveTree.cpp:
2951 (WebCore::Style::pseudoStyleCacheIsInvalid):
2952 * testing/Internals.cpp:
2953 (WebCore::Internals::nodesFromRect):
2954 * workers/Worker.cpp:
2955 (WebCore::networkStateChanged):
2956 * workers/WorkerGlobalScope.cpp:
2957 (WebCore::WorkerGlobalScope::importScripts):
2959 2015-05-29 Alex Christensen <achristensen@webkit.org>
2961 Unreviewed build fix when using content extensions debugging.
2963 * contentextensions/ContentExtensionCompiler.cpp:
2964 (WebCore::ContentExtensions::compileRuleList):
2965 Update variable name.
2967 2015-05-29 Brady Eidson <beidson@apple.com>
2969 Typo followup to r184987
2973 * loader/FrameLoader.cpp:
2974 (WebCore::FrameLoader::loadURLIntoChildFrame): Misplaced brace.
2976 2015-05-29 Brady Eidson <beidson@apple.com>
2978 Small FrameLoader refactoring.
2979 https://bugs.webkit.org/show_bug.cgi?id=145459
2981 Reviewed by Alex Christensen.
2983 No new tests (No behavior change).
2985 * loader/FrameLoader.cpp:
2986 (WebCore::FrameLoader::loadURLIntoChildFrame):
2987 (WebCore::FrameLoader::loadFrameRequest):
2988 (WebCore::FrameLoader::loadURL):
2989 (WebCore::FrameLoader::loadPostRequest):
2990 * loader/FrameLoader.h:
2992 2015-05-29 Youenn Fablet <youenn.fablet@crf.canon.fr>
2994 MediaDevices.getUserMedia should reject promise instead of throwing exceptions
2995 https://bugs.webkit.org/show_bug.cgi?id=145282
2997 Reviewed by Darin Adler.
2999 Ensuring at the custom binding level that all potential errors are used to reject promise.
3000 Cleaned up the wrappers by removing unneeded RefPtr.
3002 Covered by modified test.
3004 * Modules/mediastream/MediaDevices.cpp:
3005 (WebCore::MediaDevices::getUserMedia):
3006 * Modules/mediastream/MediaDevices.h:
3007 * Modules/mediastream/UserMediaRequest.cpp:
3008 (WebCore::UserMediaRequest::create):
3009 * bindings/js/JSMediaDevicesCustom.cpp:
3010 (WebCore::JSMediaDevices::getUserMedia):
3012 2015-05-28 Hunseop Jeong <hs85.jeong@samsung.com>
3014 Replaced 0 with nullptr in WebCore/accessibility.
3015 https://bugs.webkit.org/show_bug.cgi?id=145309
3017 Reviewed by Chris Fleizach.
3019 No new tests, no behavior change.
3021 * accessibility/AccessibilityRenderObject.cpp:
3022 (WebCore::AccessibilityRenderObject::mathPrescripts):
3023 (WebCore::AccessibilityRenderObject::mathPostscripts):
3024 * accessibility/AccessibilityScrollView.cpp:
3025 (WebCore::AccessibilityScrollView::scrollBar):
3026 * accessibility/atk/AXObjectCacheAtk.cpp:
3027 (WebCore::notifyChildrenSelectionChange):
3028 * accessibility/atk/WebKitAccessibleHyperlink.cpp:
3029 (webkitAccessibleHyperlinkInit):
3030 * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
3031 (webkitAccessibleDocumentGetAttributes):
3032 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3033 (getAttributeSetForAccessibilityObject):
3034 (attributeSetDifference):
3035 * accessibility/atk/WebKitAccessibleUtil.h:
3036 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3037 (webkitAccessibleRefChild):
3038 (webkitAccessibleGetAttributes):
3039 (webkitAccessibleGetObjectLocale):
3040 (getInterfaceMaskFromObject):
3041 (objectFocusedAndCaretOffsetUnignored):
3042 (cacheAndReturnAtkProperty):
3044 2015-05-28 Zalan Bujtas <zalan@apple.com>
3046 Subpixel rendering: Pixel crack in text selection of simple text in <textarea>.
3047 https://bugs.webkit.org/show_bug.cgi?id=145393
3048 rdar://problem/19918941
3050 Reviewed by Darin Adler.
3052 Float to LayoutUnit conversion is lossy. To ensure that selection
3053 painting always lines up (snaps) properly, the calculated width needs to
3054 be adjusted by ceiling the float to the next LayoutUnit value.
3056 Test: fast/text/hidpi-text-selection-gap-between-words.html
3058 * platform/graphics/FontCascade.cpp:
3059 (WebCore::FontCascade::adjustSelectionRectForSimpleText):
3060 * platform/graphics/cocoa/FontCascadeCocoa.mm:
3061 (WebCore::FontCascade::adjustSelectionRectForComplexText):
3063 2015-05-28 Andreas Kling <akling@apple.com>
3065 GraphicsLayerCA should start out with m_intersectsCoverageRect=false
3066 <https://webkit.org/b/145443>
3067 <rdar://problem/19685798>
3069 Reviewed by Simon Fraser.
3071 Since the coverage rect of a newly-constructed GraphicsLayerCA is always empty,
3072 there's no way that the layer's own bounding box can intersect with it.
3073 Hence the m_intersectsCoverageRect flag should be false after construction.
3075 This fixes an issue where compositing layers in subframes would be marked as
3076 non-volatile, despite being far outside the viewport and coverage rect.
3078 Test: compositing/visible-rect/iframe-with-layers-outside-viewport.html
3080 * platform/graphics/ca/GraphicsLayerCA.cpp:
3081 (WebCore::GraphicsLayerCA::GraphicsLayerCA):
3083 2015-05-28 Commit Queue <commit-queue@webkit.org>
3085 Unreviewed, rolling out r184796 and r184832.
3086 https://bugs.webkit.org/show_bug.cgi?id=145449
3088 2% performance regression (Requested by litherum on #webkit).
3090 Reverted changesets:
3092 "[Cocoa] Use CTFontDrawGlyphs() instead of
3093 CGContextShowGlyphsWithAdvances()/CGContextShowGlyphsAtPositions()"
3094 https://bugs.webkit.org/show_bug.cgi?id=145234
3095 http://trac.webkit.org/changeset/184796
3097 "Cleanup after r184796"
3098 https://bugs.webkit.org/show_bug.cgi?id=145333
3099 http://trac.webkit.org/changeset/184832
3101 2015-05-28 Matt Rajca <mrajca@apple.com>
3103 Rename HTMLMediaSession to MediaElementSession to reserve "media session" for the Media Session API.
3104 https://bugs.webkit.org/show_bug.cgi?id=145440
3106 Reviewed by Eric Carlson.
3109 * WebCore.vcxproj/WebCore.vcxproj:
3110 * WebCore.vcxproj/WebCore.vcxproj.filters:
3111 * WebCore.xcodeproj/project.pbxproj:
3112 * html/HTMLMediaElement.cpp:
3113 (WebCore::HTMLMediaElement::HTMLMediaElement):
3114 (WebCore::HTMLMediaElement::loadInternal):
3115 (WebCore::HTMLMediaElement::loadResource):
3116 (WebCore::HTMLMediaElement::suspend):
3117 (WebCore::HTMLMediaElement::resume):
3118 (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
3119 (WebCore::HTMLMediaElement::mediaState):
3120 * html/HTMLMediaElement.h:
3121 (WebCore::HTMLMediaElement::mediaSession):
3122 * html/MediaElementSession.cpp: Renamed from Source/WebCore/html/HTMLMediaSession.cpp.
3123 (WebCore::restrictionName):
3124 (WebCore::MediaElementSession::MediaElementSession):
3125 (WebCore::MediaElementSession::registerWithDocument):
3126 (WebCore::MediaElementSession::unregisterWithDocument):
3127 (WebCore::MediaElementSession::addBehaviorRestriction):
3128 (WebCore::MediaElementSession::removeBehaviorRestriction):
3129 (WebCore::MediaElementSession::playbackPermitted):
3130 (WebCore::MediaElementSession::dataLoadingPermitted):
3131 (WebCore::MediaElementSession::fullscreenPermitted):
3132 (WebCore::MediaElementSession::pageAllowsDataLoading):
3133 (WebCore::MediaElementSession::pageAllowsPlaybackAfterResuming):
3134 (WebCore::MediaElementSession::showPlaybackTargetPicker):
3135 (WebCore::MediaElementSession::hasWirelessPlaybackTargets):
3136 (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
3137 (WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
3138 (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
3139 (WebCore::MediaElementSession::setPlaybackTarget):
3140 (WebCore::MediaElementSession::targetAvailabilityChangedTimerFired):
3141 (WebCore::MediaElementSession::externalOutputDeviceAvailableDidChange):
3142 (WebCore::MediaElementSession::canPlayToWirelessPlaybackTarget):
3143 (WebCore::MediaElementSession::isPlayingToWirelessPlaybackTarget):
3144 (WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):
3145 (WebCore::MediaElementSession::mediaStateDidChange):
3146 (WebCore::MediaElementSession::effectivePreloadForElement):
3147 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
3148 (WebCore::MediaElementSession::mediaEngineUpdated):
3149 (WebCore::MediaElementSession::allowsAlternateFullscreen):
3150 (WebCore::MediaElementSession::maximumMediaSourceBufferSize):
3151 * html/MediaElementSession.h: Renamed from Source/WebCore/html/HTMLMediaSession.h.
3152 * testing/Internals.cpp:
3153 (WebCore::Internals::setMediaElementRestrictions):
3154 (WebCore::Internals::setAudioContextRestrictions):
3156 2015-05-28 Myles C. Maxfield <mmaxfield@apple.com>
3158 Crash under ICU with ASAN during editing/selection/move-by-word-visually-crash-test-5.html
3159 https://bugs.webkit.org/show_bug.cgi?id=145429
3160 <rdar://problem/20992218>
3162 Reviewed by Alexey Proskuryakov.
3164 WebKit uses some strings which contain the lower 8-bits of UTF-16 (thereby saving space). However,
3165 ICU doesn't understand this encoding. When we want to use ICU functions with strings in this encoding,
3166 we create a UTextProvider which converts our encoded strings to UTF-16 for ICU, one chunk at a time.
3167 This object contains a vtable which we populate to perform the conversion.
3169 The WebKit function which actually returns the UTF-16 chunks has two relevant arguments: an index into
3170 the encoded string which ICU is requesting, and a direction from that index which ICU is interested
3171 in. This function populates a "chunk" which is characterized by a pointer to a buffer, the length of
3172 the populated data in the buffer, and an offset into the chunk which represents the index that the
3173 requested character was put into.
3175 When ICU requests data going backward, we fill in the chunk accordingly, with the requested character
3176 all the way at the end. We then set the offset equal to the length of the buffer. However, this length
3177 value is stale from the previous time the function ran. Therefore, ICU was reading the wrong index in
3178 the chunk when expecting the requested character.
3180 Covered by editing/selection/move-by-word-visually-crash-test-5.html.
3182 * platform/text/icu/UTextProviderLatin1.cpp:
3183 (WebCore::uTextLatin1Access):
3185 2015-05-28 Eric Carlson <eric.carlson@apple.com>
3187 [iOS] Fix controls bug caused by r184794
3188 https://bugs.webkit.org/show_bug.cgi?id=145445
3190 Reviewed by Dean Jackson.
3192 * Modules/mediacontrols/mediaControlsiOS.js:
3193 (ControllerIOS.prototype.showControls): Check video.controls instead of trying to call
3194 showInlinePlaybackPlaceholderOnly, which doesn't exist.
3196 2015-05-28 Said Abou-Hallawa <sabouhallawa@apple.com>
3198 Code clean up for extracting information from the mix of WritingMode and TextDirection
3199 https://bugs.webkit.org/show_bug.cgi?id=143399
3201 Reviewed by Darin Adler.
3203 There should be eight TextFlows. A TextFlow consists of two directions.
3204 The first one controls the inline growing direction and the second one
3205 controls the block growing direction. We are going to use the cardinal
3206 directions to define these combinations.
3208 We need to extract the following information easily from the TextFlow
3210 -- isTextFlowReversed() // RTL
3211 -- isTextFlowFlipped() // the opposite direction to normal
3212 -- isTextFlowVertical() // The line grows vertically
3214 Mixing WritingMode and TextDirection into TextFlow and choosing their values
3215 carefully to ease implementing the above functions can make things clearer.
3217 * Modules/notifications/Notification.h:
3218 * platform/graphics/TextRun.h:
3219 * platform/ios/SelectionRect.h:
3220 * platform/text/BidiResolver.h:
3221 * platform/text/StringWithDirection.h:
3222 * platform/text/TextFlags.h:
3223 (WebCore::isLeftToRightDirection): Deleted.
3224 enum TextDirection is moved from TextFlags.h to WritingMode.h. So include
3225 WritingMode.h instead of including TextFlags.h.
3227 * css/CSSProperty.cpp:
3228 (WebCore::resolveToPhysicalProperty): Instead of handling the eight possible
3229 cases of the text flows one by one, we can map from a LogicalSide to a
3230 PhysicalSide using the TextFlow value.
3232 * platform/LengthBox.h:
3233 (WebCore::BoxExtent::before):
3234 (WebCore::BoxExtent::after):
3235 (WebCore::BoxExtent::start):
3236 (WebCore::BoxExtent::end):
3237 Use mapLogicalSideToPhysicalSide() to convert from a LogicalSide to a PhysicalSide.
3239 * platform/text/WritingMode.h:
3240 (WebCore::isLeftToRightDirection): Usually the default enum is defined
3241 first. And usually the default value is equal to zero. Since LTR is the
3242 default for the text direction, it should be defined before RTL.
3244 (WebCore::makeTextFlow): Returns a TextFlow given a WritingMode and a
3247 (WebCore::isReversedTextFlow): Returns true if the text direction is RTL.
3249 (WebCore::isFlippedTextFlow):
3250 (WebCore::isFlippedWritingMode): Returns true if the block growing direction
3251 is in the opposite direction of normal.
3253 (WebCore::isVerticalTextFlow):
3254 (WebCore::isVerticalWritingMode): Returns true if the line grows vertically.
3256 (WebCore::isHorizontalWritingMode):
3257 (WebCore::isFlippedLinesWritingMode): Use isVerticalWritingMode() and
3258 isFlippedWritingMode() to answer these questions.
3260 (WebCore::isHorizontalPhysicalSide):
3261 (WebCore::mirrorPhysicalSide): top <-> bottom and left <-> right conversion.
3262 (WebCore::rotatePhysicalSide): top <-> left and right <-> bottom conversion.
3264 (WebCore::mapLogicalSideToPhysicalSide): Maps a LogicalSide to a PhysicalSide
3265 using either the TextFlow or the WritingMode.
3267 (WebCore::isFlippedBlocksWritingMode): Deleted.
3268 * rendering/RenderMultiColumnSet.cpp:
3269 (WebCore::RenderMultiColumnSet::collectLayerFragments):
3270 (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
3271 * rendering/shapes/Shape.cpp:
3272 (WebCore::physicalRectToLogical):
3273 (WebCore::physicalPointToLogical):
3274 * rendering/style/RenderStyle.h:
3275 Rename isFlippedBlocksWritingMode() to be isFlippedWritingMode() so we can
3276 be consistent with other WritingMode query functions.
3278 2015-05-28 Matt Rajca <mrajca@apple.com>
3280 Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
3281 https://bugs.webkit.org/show_bug.cgi?id=145415
3283 Reviewed by Eric Carlson.
3285 * Configurations/FeatureDefines.xcconfig:
3287 2015-05-28 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3289 [Streams API] ReadableStreamReader should not be exposed
3290 https://bugs.webkit.org/show_bug.cgi?id=143564
3292 Reviewed by Darin Adler.
3294 Covered by rebased tests.
3296 * Modules/streams/ReadableStreamReader.idl: Adding NoInterfaceObject to ReadableStreamReader.idl.
3298 2015-05-28 Carlos Alberto Lopez Perez <clopez@igalia.com>
3300 [CMake] Improve detection and usage of GL/GLES/EGL libraries.
3301 https://bugs.webkit.org/show_bug.cgi?id=145408
3303 Reviewed by Carlos Garcia Campos.
3305 No new tests, no behavior changes.
3307 * CMakeLists.txt: Ensure that we include the libraries and includes
3308 for the GL/GLESv2/EGL libraries before including the ANGLE directories.
3309 Define also any CFLAG that the system GL/GLESv2/EGL libraries may need.
3310 * PlatformEfl.cmake: Remove some includes that are now unneeded,
3311 because we are including now the EGL libraries on CMakeLists.txt
3312 * PlatformGTK.cmake: Remove unneeded include (We are including the EGL
3313 libraries now on CMakeLists.txt)
3315 2015-05-28 Youenn Fablet <youenn.fablet@crf.canon.fr>
3317 Binding generator should support interfaces with CustomConstructor and NoInterfaceObject
3318 https://bugs.webkit.org/show_bug.cgi?id=145016
3320 Reviewed by Darin Adler.
3322 Updated code generator to generate the necessary declarations (constructor property in the prototype, the constructor class).
3323 In the case of CustomConstructor with NoInterfaceObject, the implementation of the constructor property related JS function is changed as follow:
3324 It creates a constructor object and shadows the constructor property JS function with this object.
3325 This ensures that only one constructor object is created per prototype.
3326 The constructor is not exposed as it is not added to the global object constructor map.
3328 NoInterfaceObject is asking to not make the interface visible, which is contradictory with having a visible constructor of the interface.
3329 The case for having NoInterfaceObject and CustomConstructor is the following:
3330 We do not want to expose the interface but we still want to have a constructor property on the prototype of objects implementing the interface.
3331 One such case is https://streams.spec.whatwg.org/#globals
3333 Added TestCustomConstructorWithNoInterfaceObject.idl to check that case.
3335 * bindings/scripts/CodeGeneratorJS.pm:
3337 (GenerateAttributesHashTable):
3338 (GenerateImplementation):
3339 (HasConstructorProperty):
3340 * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.cpp: Added.
3343 (WebKit::wrapTestCustomConstructorWithNoInterfaceObject):
3344 (webkit_dom_test_custom_constructor_with_no_interface_object_finalize):
3345 (webkit_dom_test_custom_constructor_with_no_interface_object_constructor):
3346 (webkit_dom_test_custom_constructor_with_no_interface_object_class_init):
3347 (webkit_dom_test_custom_constructor_with_no_interface_object_init):
3348 * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.h: Added.
3349 * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObjectPrivate.h: Added.
3350 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Added.
3351 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::create):
3352 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure):
3353 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::JSTestCustomConstructorWithNoInterfaceObjectPrototype):
3354 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
3355 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
3356 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
3357 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
3358 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
3359 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
3360 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
3361 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype):
3362 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype):
3363 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::destroy):
3364 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
3365 (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
3366 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getConstructor):
3367 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots):
3368 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
3370 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
3371 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Added.
3372 (WebCore::wrapperOwner):
3374 * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.h: Added.
3375 * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm: Added.
3376 (-[DOMTestCustomConstructorWithNoInterfaceObject dealloc]):
3377 (-[DOMTestCustomConstructorWithNoInterfaceObject finalize]):
3380 * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObjectInternal.h: Added.
3381 * bindings/scripts/test/TestCustomConstructor.idl: Added.
3383 2015-05-19 Jon Honeycutt <jhoneycutt@apple.com>
3385 [iOS] When viewing an MJPEG stream as the main resource, only the first
3388 <https://bugs.webkit.org/show_bug.cgi?id=145185>
3389 <rdar://problem/20124694>
3391 This bug is caused by state not being restored between successive loads
3392 of multipart/x-mixed-replace content. Each part of the stream is not
3393 treated as a wholly new load, so if state is cleared as part of the
3394 previous page being destroyed, it may not be restored when loading
3395 the next stream part.
3397 On WK1, tile cache updates are disabled in FrameView::clear(), which is
3398 called as the previous page is destroyed, but were not being
3399 reenabled when loading new replacement content from the stream.
3401 On WK2, the exposed content rect was being reset to an empty rect as
3402 the previous page was destroyed, but it was not being reset by loading
3403 replacement content.
3405 To fix these issues, I added two WebFrameLoaderClient callbacks;
3406 willReplaceMultipartContent() and didReplaceMultipartContent(). These
3407 are used to save and restore state between successive loads.
3409 Reviewed by Darin Adler.
3411 * loader/DocumentLoader.cpp:
3412 Call the new client callbacks.
3413 (WebCore::DocumentLoader::commitLoad):
3414 If replacing content in a multipart/x-mixed-replace stream, call the