1 2015-06-27 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3 [Streams API] Implement ReadableStreamController.desiredSize property
4 https://bugs.webkit.org/show_bug.cgi?id=146311
6 Reviewed by Darin Adler.
8 Covered by rebased tests.
10 * Modules/streams/ReadableStreamController.h: Adding desiredSize getter.
11 (WebCore::ReadableStreamController::desiredSize): Ditto.
12 * Modules/streams/ReadableStreamController.idl: Added desiredSize attribute.
14 2015-06-27 Carlos Garcia Campos <cgarcia@igalia.com>
16 [GTK][SOUP] Implement WebCore::PublicSuffix for soup and enable PUBLIC_SUFFIX_LIST for GTK+
17 https://bugs.webkit.org/show_bug.cgi?id=146318
19 Reviewed by Sergio Villar Senin.
21 This is covered by unit tests.
24 * platform/soup/PublicSuffixSoup.cpp: Added.
25 (WebCore::isPublicSuffix):
26 (WebCore::topPrivatelyControlledDomain):
28 2015-06-26 Myles C. Maxfield <mmaxfield@apple.com>
30 [iOS] AppleGothic has been superseded by Apple SD Gothic Neo
31 https://bugs.webkit.org/show_bug.cgi?id=146372
32 <rdar://problem/21574004>
34 Reviewed by Dean Jackson.
36 Test: fast/text/hangul-generic-font-families.html
38 * page/mac/SettingsMac.mm:
39 (WebCore::Settings::initializeDefaultFontFamilies):
41 2015-06-26 Matt Daiter <mdaiter@apple.com>
43 Supporting getStartDate and added tests
44 https://bugs.webkit.org/show_bug.cgi?id=145676
45 <rdar://problem/20876076>
47 Reviewed by Brent Fulgham.
49 Test: http/tests/media/hls/video-controller-getStartDate.html
51 * bindings/js/JSDOMBinding.cpp:
52 (WebCore::jsDateOrNaN):
53 * bindings/js/JSDOMBinding.h:
54 * bindings/scripts/CodeGeneratorJS.pm: Added features to return
56 * bindings/scripts/CodeGeneratorGObject.pm: Needed to add
57 type checking code for GObject (no date)
59 * bindings/scripts/IDLAttributes.txt:
60 * html/HTMLMediaElement.cpp: Added getStartDate function
61 (WebCore::HTMLMediaElement::getStartDate):
62 * html/HTMLMediaElement.h: Needed to add declarations
63 * html/HTMLMediaElement.idl: Needed to modify for returning NaN
64 * platform/graphics/MediaPlayer.cpp:
65 (WebCore::MediaPlayer::getStartDate):
66 * platform/graphics/MediaPlayer.h:
67 * platform/graphics/MediaPlayerPrivate.h: Added in Mac-specific platform
68 (WebCore::MediaPlayerPrivateInterface::getStartDate):
69 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
70 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
71 (WebCore::MediaPlayerPrivateAVFoundationObjC::getStartDate):
73 2015-06-26 Beth Dakin <bdakin@apple.com>
75 WebPage::getPositionInformation() should not copy an image that is larger than the
77 https://bugs.webkit.org/show_bug.cgi?id=146367
79 Reviewed by Tim Horton.
81 Export the rect version of this function too.
82 * platform/graphics/GraphicsContext.h:
84 2015-06-26 Eric Carlson <eric.carlson@apple.com>
86 [Mac] Muted videos should not automatically play to AppleTV
87 https://bugs.webkit.org/show_bug.cgi?id=146366
89 Reviewed by Dean Jackson.
91 * html/HTMLMediaElement.cpp:
92 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_initiallyMuted.
93 (WebCore::HTMLMediaElement::scheduleDelayedAction): Support CheckMediaState.
94 (WebCore::HTMLMediaElement::setReadyState): Set m_initiallyMuted to true if the element is
95 muted or the volume is less than 5%.
96 (WebCore::HTMLMediaElement::setMuted): Update media state asynchronously so multiple state
97 changes can be coalesced.
98 (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Ditto.
99 (WebCore::HTMLMediaElement::setPlaying): Ditto.
100 (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
101 (WebCore::HTMLMediaElement::removeEventListener): Ditto.
102 (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
103 (WebCore::HTMLMediaElement::updateMediaState): Update after a timer when passed UpdateMediaState::Asynchronously.
104 (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate flag if
105 m_initiallyMuted is true.
106 * html/HTMLMediaElement.h:
107 * html/HTMLMediaElementEnums.h:
109 2015-06-26 Daniel Bates <dabates@apple.com>
112 https://bugs.webkit.org/show_bug.cgi?id=145200
114 Reverting r184660 because it caused a regression.
116 * English.lproj/Localizable.strings:
117 * html/TextFieldInputType.cpp:
118 (WebCore::TextFieldInputType::createAutoFillButton): Deleted.
119 * platform/LocalizedStrings.cpp:
120 (WebCore::AXAutoFillButtonText): Deleted.
121 * platform/LocalizedStrings.h:
122 * platform/efl/LocalizedStringsEfl.cpp:
123 (WebCore::AXAutoFillButtonText): Deleted.
124 * platform/gtk/LocalizedStringsGtk.cpp:
125 (WebCore::AXAutoFillButtonText): Deleted.
127 2015-06-26 Daniel Bates <dabates@apple.com>
130 https://bugs.webkit.org/show_bug.cgi?id=146243
133 https://bugs.webkit.org/show_bug.cgi?id=145241
135 Reverting r185881 and r185828 because the latter caused a regression.
137 * accessibility/AccessibilityRenderObject.cpp:
138 (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Deleted.
139 (WebCore::AccessibilityRenderObject::accessibilityHitTest): Deleted.
140 * accessibility/AccessibilityRenderObject.h:
142 2015-06-26 Dean Jackson <dino@apple.com>
144 No audio on animated page with the attached fixed layout epub
145 https://bugs.webkit.org/show_bug.cgi?id=146365
147 Reviewed by Eric Carlson.
149 The new restriction RequireUserGestureForAudioRateChange conflicted
150 with existing clients who expected RequireUserGestureForRateChange
151 to allow autoplaying audio. Update the logic to ensure that
152 RequireUserGestureForRateChange covers all media when set to
155 This may require a revisit once we're using RequireUserGestureForAudioRateChange
156 in production, because the global setting will trump that, and
157 most clients have the global setting to false. We'll need to come
158 up with a way to allow legacy clients to preserve their behaviour.
160 * html/HTMLMediaElement.cpp:
161 (WebCore::HTMLMediaElement::HTMLMediaElement): Only restrict audio
162 if RequireUserGestureForRateChange is also false.
164 2015-06-25 Anders Carlsson <andersca@apple.com>
166 Get rid of ScrollbarThemeClient now that it's unused
167 https://bugs.webkit.org/show_bug.cgi?id=146327
169 Reviewed by Beth Dakin.
171 * WebCore.vcxproj/WebCore.vcxproj:
172 * WebCore.vcxproj/WebCore.vcxproj.filters:
173 * WebCore.xcodeproj/project.pbxproj:
174 * platform/Scrollbar.cpp:
175 (WebCore::Scrollbar::scrollbarOverlayStyle): Deleted.
176 (WebCore::Scrollbar::isScrollableAreaActive): Deleted.
177 (WebCore::Scrollbar::isScrollViewScrollbar): Deleted.
178 (WebCore::Scrollbar::root): Deleted.
179 * platform/Scrollbar.h:
180 (WebCore::Scrollbar::isCustomScrollbar):
181 (WebCore::Scrollbar::orientation):
182 (WebCore::Scrollbar::value):
183 (WebCore::Scrollbar::currentPos):
184 (WebCore::Scrollbar::visibleSize):
185 (WebCore::Scrollbar::totalSize):
186 (WebCore::Scrollbar::maximum):
187 (WebCore::Scrollbar::controlSize):
188 (WebCore::Scrollbar::lineStep):
189 (WebCore::Scrollbar::pageStep):
190 (WebCore::Scrollbar::pressedPart):
191 (WebCore::Scrollbar::hoveredPart):
192 (WebCore::Scrollbar::enabled):
193 (WebCore::Scrollbar::styleChanged):
194 (WebCore::Scrollbar::isAlphaLocked):
195 (WebCore::Scrollbar::setIsAlphaLocked):
196 * platform/ScrollbarTheme.h:
197 * platform/ScrollbarThemeClient.h: Removed.
198 (WebCore::ScrollbarThemeClient::~ScrollbarThemeClient): Deleted.
199 * platform/mac/ScrollbarThemeMac.mm:
200 (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
201 * rendering/RenderScrollbarTheme.cpp:
203 2015-06-26 Chris Dumez <cdumez@apple.com>
205 Prevent new loads while in PageCache (or being added to PageCache)
206 https://bugs.webkit.org/show_bug.cgi?id=146299
207 <rdar://problem/21523788>
209 Reviewed by Darin Adler.
211 Generalize the change in r185337 to prevent new loads while in the
212 PageCache (or being added to the PageCache), instead of merely
213 preventing new loads in pagehide event handlers. We should never
214 have any pages that are still loading inside the PageCache.
216 The fix in r185337 was apparently insufficient to address the
217 problem so generalizing the check / policy will hopefully catch
218 more cases where content is able to start loads while being added
219 to the PageCache. This patch also removes some of the complexity
220 added in r185337 as it is no longer needed.
222 No new tests, already covered by:
223 http/tests/navigation/image-load-in-pagehide-handler.html
224 http/tests/navigation/subframe-pagehide-handler-starts-load.html
225 http/tests/navigation/subframe-pagehide-handler-starts-load2.html
227 * loader/FrameLoader.cpp:
228 (WebCore::FrameLoader::stopLoading):
229 (WebCore::FrameLoader::loadURL):
230 (WebCore::FrameLoader::loadWithDocumentLoader):
231 (WebCore::FrameLoader::stopAllLoaders):
232 (WebCore::FrameLoader::handleBeforeUnloadEvent):
233 (WebCore::FrameLoader::FrameLoader): Deleted.
234 * loader/FrameLoader.h:
235 (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
236 * loader/ImageLoader.cpp:
237 (WebCore::pageIsBeingDismissed):
238 * loader/cache/CachedResource.cpp:
239 (WebCore::CachedResource::load):
240 * loader/cache/CachedResourceLoader.cpp:
241 (WebCore::CachedResourceLoader::requestImage):
243 (WebCore::Page::inPageCache):
245 (WebCore::Page::group): Deleted.
247 2015-06-26 Simon Fraser <simon.fraser@apple.com>
249 [OS X] Change the layer tiling threshold from 2000 to 2048 pixels
250 https://bugs.webkit.org/show_bug.cgi?id=146353
252 Reviewed by Tim Horton.
254 Programmers love powers of two.
256 * platform/graphics/ca/GraphicsLayerCA.cpp:
258 2015-06-26 Myles C. Maxfield <mmaxfield@apple.com>
260 [Cocoa] Sans-serif generic font family should map to PingFang
261 https://bugs.webkit.org/show_bug.cgi?id=146333
262 <rdar://problem/21521217>
264 Reviewed by Alexey Proskuryakov.
266 Also performs a little bit of cleanup.
268 Test: fast/text/han-generic-font-families.html
270 * page/mac/SettingsMac.mm:
271 (WebCore::sansSerifTraditionalHanFontFamily):
272 (WebCore::sansSerifSimplifiedHanFontFamily):
273 (WebCore::Settings::initializeDefaultFontFamilies):
275 2015-06-26 Per Arne Vollan <peavo@outlook.com>
277 [Curl] Compile errors; ResourceResponseBase::resourceLoadTiming() has changed return type.
278 https://bugs.webkit.org/show_bug.cgi?id=146343
280 Reviewed by Brent Fulgham.
282 * platform/network/curl/ResourceHandleManager.cpp:
283 (WebCore::calculateWebTimingInformations):
284 (WebCore::headerCallback):
285 (WebCore::ResourceHandleManager::initializeHandle):
286 (WebCore::ResourceHandleManager::initCookieSession):
287 (WebCore::sockoptfunction): Deleted.
289 2015-06-26 Chris Fleizach <cfleizach@apple.com>
291 iOS speech synthesizer should expose names
292 https://bugs.webkit.org/show_bug.cgi?id=146319
294 Reviewed by Mario Sanchez Prada.
296 Use newer API to get the name and identifier of each voice asset.
298 * platform/ios/PlatformSpeechSynthesizerIOS.mm:
299 (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
301 2015-06-26 Csaba Osztrogonác <ossy@webkit.org>
303 [EFL] Remove unnecessary overriden methods from ScrollBarEfl
304 https://bugs.webkit.org/show_bug.cgi?id=146342
306 Reviewed by Gyuyoung Kim.
308 * platform/efl/ScrollbarEfl.cpp:
309 (WebCore::ScrollbarEfl::setParent): Deleted.
310 (WebCore::ScrollbarEfl::setFrameRect): Deleted.
311 (WebCore::ScrollbarEfl::frameRectsChanged): Deleted.
312 (WebCore::ScrollbarEfl::invalidate): Deleted.
313 * platform/efl/ScrollbarEfl.h:
315 2015-06-26 Csaba Osztrogonác <ossy@webkit.org>
317 Convert some of WebCore/dom over to range-for loops
318 https://bugs.webkit.org/show_bug.cgi?id=126250
320 Reviewed by Darin Adler.
322 Based on the original patch of Sam Weinig <sam@webkit.org>.
324 * dom/ContainerNode.cpp:
325 (WebCore::ContainerNode::replaceChild):
326 (WebCore::willRemoveChildren):
327 (WebCore::ContainerNode::appendChild):
328 * dom/MutationObserver.cpp:
329 (WebCore::MutationObserver::disconnect):
330 (WebCore::MutationObserver::getObservedNodes):
331 (WebCore::MutationObserver::deliver):
332 * dom/MutationObserverInterestGroup.cpp:
333 (WebCore::MutationObserverInterestGroup::isOldValueRequested):
334 (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
335 * dom/MutationObserverRegistration.cpp:
336 (WebCore::MutationObserverRegistration::clearTransientRegistrations):
337 (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
339 (WebCore::Node::dumpStatistics):
340 (WebCore::collectMatchingObserversForMutation):
341 (WebCore::Node::notifyMutationObserversNodeWillDetach):
343 2015-06-25 Lucas Forschler <lforschler@apple.com>
345 Unreviewed build fix.
347 * platform/audio/VectorMath.cpp:
348 (WebCore::VectorMath::vsmul):
349 (WebCore::VectorMath::vadd):
350 (WebCore::VectorMath::vmul):
351 (WebCore::VectorMath::zvmul):
353 2015-06-25 Stephanie Lewis <slewis@apple.com>
359 * platform/audio/DirectConvolver.cpp:
360 (WebCore::DirectConvolver::process):
362 2015-06-25 Chris Fleizach <cfleizach@apple.com>
364 AX: improve list heuristics (presentational use versus actual lists)
365 https://bugs.webkit.org/show_bug.cgi?id=134187
367 Rolling this change back in.
368 It was taken out to allow clients to have time to update their expectations of what is a list vs. a group
370 Test: accessibility/list-detection2.html
372 * accessibility/AccessibilityList.cpp:
373 (WebCore::AccessibilityList::isDescriptionList):
374 (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
375 (WebCore::AccessibilityList::determineAccessibilityRole):
376 * accessibility/AccessibilityList.h:
378 2015-06-25 Brent Fulgham <bfulgham@apple.com>
380 Unreviewed build fix after r185964.
382 Correct a few pointers-that-should-be-references-now errors.
384 * platform/win/PopupMenuWin.cpp:
385 (WebCore::AccessiblePopupMenu::accLocation):
386 (WebCore::AccessiblePopupMenu::accHitTest):
388 2015-06-25 Doug Russell <d_russell@apple.com>
390 Bug 146300 AX: AccessibilityObject focus events that don't cause a selection
391 change can leave m_isSynchronizingSelection set to true
392 https://bugs.webkit.org/show_bug.cgi?id=146300
394 Reviewed by Chris Fleizach.
396 Added a clearTextSelectionIntent() convenience function to be used after any
397 event that can, but isn't guaranteed to result in a selection change. Matches
398 calls to setTextSelectionIntent() convenience function.
399 Added support for tests listening for focus change notifications.
401 Test: platform/mac/accessibility/focus-setting-selection-syncronizing-not-clearing.html
403 * accessibility/AccessibilityRenderObject.cpp:
404 (WebCore::clearTextSelectionIntent):
405 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
406 (WebCore::AccessibilityRenderObject::setFocused):
407 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
408 * accessibility/mac/AXObjectCacheMac.mm:
409 (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
411 2015-06-25 Alex Christensen <achristensen@webkit.org>
413 [Content Extensions] Add a way to match a domain but not subdomains
414 https://bugs.webkit.org/show_bug.cgi?id=146241
415 rdar://problem/21557754
417 Reviewed by Darin Adler.
419 This patch makes it possible to have a trigger with an if-domain apply to sub2.sub1.webkit.org
420 but not sub1.webkit.org by making the domains default to only applying to the domain and not subdomains.
421 To make a domain apply to a domain and any subdomains, the domain must begin with a '*'.
423 * contentextensions/CombinedURLFilters.cpp:
424 (WebCore::ContentExtensions::CombinedURLFilters::addDomain):
425 (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
426 Make domains apply only to the exact domain unless there is a * at the beginning,
427 in which case they apply to the domain and any subdomains.
429 2015-06-25 Simon Fraser <simon.fraser@apple.com>
431 [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
432 https://bugs.webkit.org/show_bug.cgi?id=146329
433 rdar://problem/21233010
435 Reviewed by Tim Horton.
437 Have the Compositing log channel dump the visible rect used for layer flushing.
439 * rendering/RenderLayerCompositor.cpp:
440 (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
442 2015-06-25 Brent Fulgham <bfulgham@apple.com>
444 [WIN] Enable WEB_TIMING API
445 https://bugs.webkit.org/show_bug.cgi?id=146330
446 <rdar://problem/21530765>
448 Reviewed by Dean Jackson.
450 Tested by internal HLS tests.
452 Enable WEB_TIMING features on Windows by activating the feature flag,
453 and correcting some build errors.
455 * platform/network/cf/ResourceHandleCFNet.cpp:
456 (WebCore::ResourceHandle::start): "setCollectionTimingData" is only
457 defined for PLATFORM(COCOA).
458 * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
459 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
460 The 'ResourceHandle::getConnectionTimingData' method is only defined
463 2015-06-25 Dean Jackson <dino@apple.com>
465 Inline media controls disappear when returning a video to inline
466 https://bugs.webkit.org/show_bug.cgi?id=146328
467 <rdar://problem/21142862>
469 Reviewed by Tim Horton.
471 We were getting into a state where the controls were being
472 hidden via a timer while we were in fullscreen or on
473 another tab. Meanwhile, we could exit from such
474 a condition to a point where the controls were
475 not visible, but not completely removed from the DOM, confusing
476 the logic that decided whether to show them on tap.
478 * Modules/mediacontrols/mediaControlsApple.js:
479 (Controller.prototype.hideControls): If we are in the act of hiding
480 controls, we can clear any existing timers that are going to try
482 (Controller.prototype.resetHideControlsTimer): Make sure we null
483 out the hideTimer object, since we look at its value often to
484 decide whether or not a timer exists.
485 * Modules/mediacontrols/mediaControlsiOS.js:
486 (ControllerIOS.prototype.handlePlayButtonTouchEnd): If the user
487 taps play, then we should call showControls, which resets the hide
488 timers amongst other things. We need to do this due to the next change,
489 so that a timer started before we pressed play doesn't cause the
490 controls to instantly disappear as soon as we start playing.
491 (ControllerIOS.prototype.handleWrapperTouchStart): We can get into
492 the state where controls are invisible but still in the tree. Since the
493 controlsAreHidden() logic only looks for the latter, we need to also
494 look for invisible when the user taps for the controls. Yes, this
495 naming doesn't make much sense :(
497 2015-06-25 Joseph Pecoraro <pecoraro@apple.com>
499 [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
500 https://bugs.webkit.org/show_bug.cgi?id=146324
502 Reviewed by Timothy Hatcher.
504 * inspector/InspectorFrontendClient.h:
505 * inspector/InspectorFrontendClientLocal.h:
506 Do nothing or pass it up to the the frontend client.
508 * inspector/InspectorFrontendHost.h:
509 * inspector/InspectorFrontendHost.idl:
510 * inspector/InspectorFrontendHost.cpp:
511 (WebCore::InspectorFrontendHost::startWindowDrag):
512 Add a new host function to get native window dragging behavior.
514 2015-06-25 Tim Horton <timothy_horton@apple.com>
516 Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
517 https://bugs.webkit.org/show_bug.cgi?id=146322
518 <rdar://problem/21413884>
520 Reviewed by Simon Fraser.
522 * page/FrameView.cpp:
523 (WebCore::FrameView::viewportSizeForCSSViewportUnits):
524 Use the fixed layout size, if enabled, instead of the visibleContentRect,
525 for the viewport unit size. This ensures that viewport units take up the whole
526 fixed-layout viewport, not just the size of the view scaled by the page scale
527 (which visibleContentRect provides).
529 2015-06-25 Eric Carlson <eric.carlson@apple.com>
531 [Mac] AirPlay menu button still doesn't always show on page load
532 https://bugs.webkit.org/show_bug.cgi?id=146325
534 Reviewed by Dean Jackson.
536 * html/HTMLMediaElement.cpp:
537 (WebCore::HTMLMediaElement::mediaState): A player that can't currently play to a wireless
538 target does require target monitoring if an availability event listner has been registered,
539 otherwise we may not register for availability change notifications.
541 2015-06-25 Anders Carlsson <andersca@apple.com>
543 Stop using ScrollbarThemeClient and just use Scrollbar directly
544 https://bugs.webkit.org/show_bug.cgi?id=146320
546 Reviewed by Tim Horton.
548 * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
549 (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
550 * platform/ScrollableArea.cpp:
551 (WebCore::ScrollableArea::setScrollbarOverlayStyle):
552 * platform/Scrollbar.cpp:
553 (WebCore::Scrollbar::Scrollbar):
554 (WebCore::Scrollbar::~Scrollbar):
555 (WebCore::Scrollbar::offsetDidChange):
556 (WebCore::Scrollbar::updateThumb):
557 (WebCore::Scrollbar::paint):
558 (WebCore::thumbUnderMouse):
559 (WebCore::Scrollbar::autoscrollPressedPart):
560 (WebCore::Scrollbar::startTimerIfNeeded):
561 (WebCore::Scrollbar::moveThumb):
562 (WebCore::Scrollbar::setHoveredPart):
563 (WebCore::Scrollbar::setPressedPart):
564 (WebCore::Scrollbar::mouseMoved):
565 (WebCore::Scrollbar::mouseUp):
566 (WebCore::Scrollbar::mouseDown):
567 (WebCore::Scrollbar::setEnabled):
568 * platform/ScrollbarTheme.h:
569 (WebCore::ScrollbarTheme::updateEnabledState):
570 (WebCore::ScrollbarTheme::paint):
571 (WebCore::ScrollbarTheme::hitTest):
572 (WebCore::ScrollbarTheme::updateScrollbarOverlayStyle):
573 (WebCore::ScrollbarTheme::invalidateParts):
574 (WebCore::ScrollbarTheme::invalidatePart):
575 (WebCore::ScrollbarTheme::paintTickmarks):
576 (WebCore::ScrollbarTheme::shouldCenterOnThumb):
577 (WebCore::ScrollbarTheme::shouldSnapBackToDragOrigin):
578 (WebCore::ScrollbarTheme::shouldDragDocumentInsteadOfThumb):
579 (WebCore::ScrollbarTheme::thumbPosition):
580 (WebCore::ScrollbarTheme::thumbLength):
581 (WebCore::ScrollbarTheme::trackPosition):
582 (WebCore::ScrollbarTheme::trackLength):
583 (WebCore::ScrollbarTheme::registerScrollbar):
584 (WebCore::ScrollbarTheme::unregisterScrollbar):
585 * platform/ScrollbarThemeComposite.cpp:
586 (WebCore::ScrollbarThemeComposite::paint):
587 (WebCore::ScrollbarThemeComposite::hitTest):
588 (WebCore::ScrollbarThemeComposite::invalidatePart):
589 (WebCore::ScrollbarThemeComposite::splitTrack):
590 (WebCore::usedTotalSize):
591 (WebCore::ScrollbarThemeComposite::thumbPosition):
592 (WebCore::ScrollbarThemeComposite::thumbLength):
593 (WebCore::ScrollbarThemeComposite::minimumThumbLength):
594 (WebCore::ScrollbarThemeComposite::trackPosition):
595 (WebCore::ScrollbarThemeComposite::trackLength):
596 (WebCore::ScrollbarThemeComposite::thumbRect):
597 * platform/ScrollbarThemeComposite.h:
598 (WebCore::ScrollbarThemeComposite::willPaintScrollbar):
599 (WebCore::ScrollbarThemeComposite::didPaintScrollbar):
600 (WebCore::ScrollbarThemeComposite::paintScrollbarBackground):
601 (WebCore::ScrollbarThemeComposite::paintTrackBackground):
602 (WebCore::ScrollbarThemeComposite::paintTrackPiece):
603 (WebCore::ScrollbarThemeComposite::paintButton):
604 (WebCore::ScrollbarThemeComposite::paintThumb):
605 (WebCore::ScrollbarThemeComposite::constrainTrackRectToTrackPieces):
606 * platform/efl/ScrollbarThemeEfl.h:
607 * platform/gtk/ScrollbarThemeGtk.cpp:
608 (WebCore::ScrollbarThemeGtk::hasThumb):
609 (WebCore::ScrollbarThemeGtk::backButtonRect):
610 (WebCore::ScrollbarThemeGtk::forwardButtonRect):
611 (WebCore::ScrollbarThemeGtk::trackRect):
612 (WebCore::ScrollbarThemeGtk::registerScrollbar):
613 (WebCore::ScrollbarThemeGtk::unregisterScrollbar):
614 (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
615 (WebCore::ScrollbarThemeGtk::thumbRect):
616 (WebCore::ScrollbarThemeGtk::paintTrackBackground):
617 (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
618 (WebCore::ScrollbarThemeGtk::paintThumb):
619 (WebCore::ScrollbarThemeGtk::paintButton):
620 (WebCore::ScrollbarThemeGtk::paint):
621 (WebCore::ScrollbarThemeGtk::shouldCenterOnThumb):
622 (WebCore::ScrollbarThemeGtk::buttonSize):
623 (WebCore::ScrollbarThemeGtk::minimumThumbLength):
624 * platform/gtk/ScrollbarThemeGtk.h:
625 (WebCore::ScrollbarThemeGtk::hasButtons):
626 * platform/ios/ScrollbarThemeIOS.h:
627 * platform/ios/ScrollbarThemeIOS.mm:
628 (WebCore::ScrollbarThemeIOS::registerScrollbar):
629 (WebCore::ScrollbarThemeIOS::unregisterScrollbar):
630 (WebCore::ScrollbarThemeIOS::hasButtons):
631 (WebCore::ScrollbarThemeIOS::hasThumb):
632 (WebCore::ScrollbarThemeIOS::backButtonRect):
633 (WebCore::ScrollbarThemeIOS::forwardButtonRect):
634 (WebCore::ScrollbarThemeIOS::trackRect):
635 (WebCore::ScrollbarThemeIOS::minimumThumbLength):
636 (WebCore::ScrollbarThemeIOS::shouldCenterOnThumb):
637 (WebCore::ScrollbarThemeIOS::paint):
638 * platform/mac/ScrollAnimatorMac.mm:
639 (scrollbarPainterForScrollbar):
640 (-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
641 (-[WebScrollbarPartAnimation startAnimation]):
642 (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
643 (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
644 (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
645 (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
646 (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
647 (-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
648 (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
649 (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
650 (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
651 (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
652 (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
653 (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
654 (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
655 (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
656 (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
657 (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
658 (WebCore::ScrollAnimatorMac::updateScrollerStyle):
659 * platform/mac/ScrollbarThemeMac.h:
660 * platform/mac/ScrollbarThemeMac.mm:
661 (WebCore::ScrollbarThemeMac::registerScrollbar):
662 (WebCore::ScrollbarThemeMac::unregisterScrollbar):
663 (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
664 (WebCore::ScrollbarThemeMac::painterForScrollbar):
665 (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
666 (WebCore::ScrollbarThemeMac::hasButtons):
667 (WebCore::ScrollbarThemeMac::hasThumb):
668 (WebCore::ScrollbarThemeMac::backButtonRect):
669 (WebCore::ScrollbarThemeMac::forwardButtonRect):
670 (WebCore::ScrollbarThemeMac::trackRect):
671 (WebCore::ScrollbarThemeMac::minimumThumbLength):
672 (WebCore::ScrollbarThemeMac::shouldCenterOnThumb):
673 (WebCore::ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb):
674 (WebCore::ScrollbarThemeMac::updateEnabledState):
675 (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
676 (WebCore::ScrollbarThemeMac::paint):
677 * platform/mock/ScrollbarThemeMock.cpp:
678 (WebCore::ScrollbarThemeMock::trackRect):
679 (WebCore::ScrollbarThemeMock::paintTrackBackground):
680 (WebCore::ScrollbarThemeMock::paintThumb):
681 * platform/mock/ScrollbarThemeMock.h:
682 (WebCore::ScrollbarThemeMock::hasButtons): Deleted.
683 (WebCore::ScrollbarThemeMock::hasThumb): Deleted.
684 (WebCore::ScrollbarThemeMock::backButtonRect): Deleted.
685 (WebCore::ScrollbarThemeMock::forwardButtonRect): Deleted.
686 (WebCore::ScrollbarThemeMock::maxOverlapBetweenPages): Deleted.
687 (WebCore::ScrollbarThemeMock::isMockTheme): Deleted.
688 * platform/win/ScrollbarThemeSafari.cpp:
689 (WebCore::ScrollbarThemeSafari::hasButtons):
690 (WebCore::ScrollbarThemeSafari::hasThumb):
691 (WebCore::ScrollbarThemeSafari::backButtonRect):
692 (WebCore::ScrollbarThemeSafari::forwardButtonRect):
693 (WebCore::ScrollbarThemeSafari::trackRect):
694 (WebCore::ScrollbarThemeSafari::minimumThumbLength):
695 (WebCore::ScrollbarThemeSafari::shouldCenterOnThumb):
696 (WebCore::ScrollbarThemeSafari::paintTrackBackground):
697 (WebCore::ScrollbarThemeSafari::paintButton):
698 (WebCore::ScrollbarThemeSafari::paintThumb):
699 * platform/win/ScrollbarThemeSafari.h:
700 * platform/win/ScrollbarThemeWin.cpp:
701 (WebCore::ScrollbarThemeWin::hasThumb):
702 (WebCore::ScrollbarThemeWin::backButtonRect):
703 (WebCore::ScrollbarThemeWin::forwardButtonRect):
704 (WebCore::ScrollbarThemeWin::trackRect):
705 (WebCore::ScrollbarThemeWin::shouldCenterOnThumb):
706 (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
707 (WebCore::ScrollbarThemeWin::paintTrackBackground):
708 (WebCore::ScrollbarThemeWin::paintTrackPiece):
709 (WebCore::ScrollbarThemeWin::paintButton):
710 (WebCore::paintGripper):
711 (WebCore::ScrollbarThemeWin::paintThumb):
712 * platform/win/ScrollbarThemeWin.h:
713 * rendering/RenderScrollbar.h:
715 * rendering/RenderScrollbarPart.cpp:
716 (WebCore::RenderScrollbarPart::styleDidChange):
717 (WebCore::RenderScrollbarPart::imageChanged):
718 * rendering/RenderScrollbarTheme.cpp:
719 (WebCore::RenderScrollbarTheme::buttonSizesAlongTrackAxis):
720 (WebCore::RenderScrollbarTheme::hasButtons):
721 (WebCore::RenderScrollbarTheme::hasThumb):
722 (WebCore::RenderScrollbarTheme::minimumThumbLength):
723 (WebCore::RenderScrollbarTheme::backButtonRect):
724 (WebCore::RenderScrollbarTheme::forwardButtonRect):
725 (WebCore::RenderScrollbarTheme::trackRect):
726 (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
727 (WebCore::RenderScrollbarTheme::willPaintScrollbar):
728 (WebCore::RenderScrollbarTheme::didPaintScrollbar):
729 (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
730 (WebCore::RenderScrollbarTheme::paintTrackBackground):
731 (WebCore::RenderScrollbarTheme::paintTrackPiece):
732 (WebCore::RenderScrollbarTheme::paintButton):
733 (WebCore::RenderScrollbarTheme::paintThumb):
734 (WebCore::RenderScrollbarTheme::paintTickmarks):
735 * rendering/RenderScrollbarTheme.h:
737 2015-06-24 Matt Rajca <mrajca@apple.com>
739 MediaSession: fall back to "content" kind when an unsupported media session kind is passed in
740 https://bugs.webkit.org/show_bug.cgi?id=146293
742 Reviewed by Eric Carlson.
744 * Modules/mediasession/MediaSession.cpp:
745 (WebCore::MediaSession::parseKind): Parse the media session kind to one of the four supported types.
746 (WebCore::MediaSession::MediaSession):
747 (WebCore::MediaSession::kind): Format the value as a string (which the JS bindings expect).
748 * Modules/mediasession/MediaSession.h: The media session kind is now stored as an enum rather than a string
749 since we only support a small, fixed number of values.
751 2015-06-25 Eric Carlson <eric.carlson@apple.com>
753 [Mac] Crash in WebCore::MediaPlayer::canPlayToWirelessPlaybackTarget
754 https://bugs.webkit.org/show_bug.cgi?id=146317
756 Reviewed by Brent Fulgham.
758 * html/HTMLMediaElement.cpp:
759 (WebCore::HTMLMediaElement::mediaState): NULL-check m_player before using it.
761 2015-06-25 Commit Queue <commit-queue@webkit.org>
763 Unreviewed, rolling out r185956.
764 https://bugs.webkit.org/show_bug.cgi?id=146321
766 Causes massive crashes on test bots (Requested by bfulgham on
771 "Enabling MEDIA_STREAM"
772 https://bugs.webkit.org/show_bug.cgi?id=145947
773 http://trac.webkit.org/changeset/185956
775 2015-06-25 Brent Fulgham <bfulgham@apple.com>
777 [Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
778 https://bugs.webkit.org/show_bug.cgi?id=146302
779 <rdar://problem/19726553>
781 Reviewed by Eric Carlson.
783 Tested by existing media tests.
785 Update the AVFoundationCF version of 'supportsType' to more closely match the AVFoundation
786 version. Use this new code when the necessary AVFoundationCF functions are present.
788 * AVFoundationSupport.py: Check for presence of AVCFURLAssetIsPlayableExtendedMIMEType.
789 (fileContains): Added helper function.
790 * WebCore.vcxproj/WebCoreGenerated.vcxproj: Add AVFoundationSupport.py to project file to make
792 * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Ditto.
793 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
794 (WebCore::MediaPlayerPrivateAVFoundation::isUnsupportedMIMEType): Moved from ObjC version.
795 (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Ditto.
796 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
797 * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add missing declaration.
798 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
799 (WebCore::avfMIMETypes): Added CF version of AVFoundation code.
800 (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Update to use new AVCF
801 method if it is available.
802 (WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack): Handle case of a
803 null language locale. This is a drive-by fix of a bug found during testing.
804 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
805 (WebCore::isUnsupportedMIMEType): Deleted.
806 (WebCore::staticMIMETypeList): Deleted.
808 2015-06-25 Matthew Daiter <mdaiter@apple.com>
810 Enabling MEDIA_STREAM
811 https://bugs.webkit.org/show_bug.cgi?id=145947
812 <rdar://problem/21365829>
814 Reviewed by Brent Fulgham.
816 * Configurations/FeatureDefines.xcconfig:
817 * Modules/mediastream/UserMediaClient.h:
818 * WebCore.xcodeproj/project.pbxproj:
819 * platform/mediastream/mac/AVAudioCaptureSource.mm:
820 * platform/mock/UserMediaClientMock.h:
822 2015-06-25 Zalan Bujtas <zalan@apple.com>
824 Do not send touch events to the slider's thumb when it does not have a renderer.
825 https://bugs.webkit.org/show_bug.cgi?id=146307
826 rdar://problem/21539399
828 Reviewed by Simon Fraser.
830 Bail out early if either the touch target or the renderer() is null.
832 Test: fast/events/touch/input-range-with-thumb-display-none-crash.html
834 * html/shadow/SliderThumbElement.cpp:
835 (WebCore::findTouchWithIdentifier):
836 (WebCore::SliderThumbElement::handleTouchStart):
837 (WebCore::SliderThumbElement::handleTouchMove):
838 (WebCore::SliderThumbElement::handleTouchEndAndCancel):
840 2015-06-25 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
842 [Streams API] Implement HighWaterMark
843 https://bugs.webkit.org/show_bug.cgi?id=146235
845 Reviewed by Darin Adler.
847 Retrieval of HighWaterMark parameter from arguments passed to the ReadableStream JS constructor.
848 Retrieval of size function callback from arguments passed to the ReadableStream JS constructor.
849 Calling doPull() if buffer size is below HighWaterMark.
851 Covered by rebased tests.
853 * Modules/streams/ReadableStream.cpp:
854 (WebCore::ReadableStream::pull): Adding precise check for HWM.
855 * Modules/streams/ReadableStream.h: Introducing hasEnoughValues.
856 * bindings/js/ReadableJSStream.cpp:
857 (WebCore::getHighWaterMark): Utility routine to get properly HWM value.
858 (WebCore::ReadableJSStream::create): Retrieval of HWM and size function.
859 (WebCore::ReadableJSStream::ReadableJSStream):
860 * bindings/js/ReadableJSStream.h: Adding hasEnoughValues and desiredSize prototypes.
862 2015-06-25 Tim Horton <timothy_horton@apple.com>
864 Try to fix the iOS EWS build.
866 * platform/spi/cocoa/SecuritySPI.h:
868 2015-06-25 Carlos Garcia Campos <cgarcia@igalia.com>
870 [GTK] Empty gtk-font-name setting causes WebProcess crash rendering pages
871 https://bugs.webkit.org/show_bug.cgi?id=146246
873 Reviewed by Sergio Villar Senin.
875 Return early if system font is empty.
877 * rendering/RenderThemeGtk.cpp:
878 (WebCore::RenderThemeGtk::updateCachedSystemFontDescription):
880 2015-06-24 Chris Dumez <cdumez@apple.com>
882 Unreviewed, EFL build fix after r185940.
884 Members were initialized in wrong order.
886 * Modules/mediastream/MediaDeviceInfo.cpp:
887 (WebCore::MediaDeviceInfo::MediaDeviceInfo):
889 2015-06-24 Chris Dumez <cdumez@apple.com>
891 Unreviewed, Build fix after r185940.
893 Move implementation inside WebCore namespace.
895 * Modules/mediastream/MediaDeviceInfo.cpp:
897 2015-06-24 Chris Dumez <cdumez@apple.com>
899 Unreviewed, speculative GTK build fix after 185940.
901 Add new cpp file to CMakeLists.txt.
905 2015-06-24 Matt Daiter <mdaiter@apple.com>
907 Building MediaDeviceInfo for enumerateDevices
908 https://bugs.webkit.org/show_bug.cgi?id=146257
909 <rdar://problem/21513462>
911 Reviewed by Eric Carlson.
913 MediaDeviceInfo necessary for enumerateDevices
915 * CMakeLists.txt: Added MediaDevicesInfo.idl
916 * DerivedSources.make: Added MediaDevicesInfo.idl
917 * Modules/mediastream/MediaDeviceInfo.h: Created class for MediaDevicesInfo
918 (WebCore::MediaDeviceInfo::create): Allocates class
919 (WebCore::MediaDeviceInfo::MediaDeviceInfo): Creates class for public
920 (WebCore::MediaDeviceInfo::~MediaDeviceInfo):
921 (WebCore::MediaDeviceInfo::label):
922 (WebCore::MediaDeviceInfo::deviceId):
923 (WebCore::MediaDeviceInfo::groupId):
924 (WebCore::MediaDeviceInfo::kind):
925 * Modules/mediastream/MediaDeviceInfo.idl:
926 * WebCore.xcodeproj/project.pbxproj:
928 2015-06-24 Anders Carlsson <andersca@apple.com>
930 Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
931 https://bugs.webkit.org/show_bug.cgi?id=146301
933 Reviewed by Tim Horton.
935 * WebCore.xcodeproj/project.pbxproj:
936 * platform/spi/cocoa/SecuritySPI.h:
938 2015-06-24 Said Abou-Hallawa <sabouhallawa@apple.com>
940 Add a new color -apple-wireless-playback-target-active
941 https://bugs.webkit.org/show_bug.cgi?id=146269
942 <rdar://problem/21465189>
944 Reviewed by Dean Jackson.
946 At the moment we use -apple-system-blue to indicate an Airplay route is
947 active. This might not always be blue, so we need to add another system
948 color with a name that will allow us to change the underlying color.
949 Initially -apple-wireless-playback-target-active will be an alias to
952 Existing tests are modified to include the new color value.
954 * Modules/mediacontrols/mediaControlsApple.js:
955 (Controller.prototype.updateWirelessTargetPickerButton):
956 * Modules/mediacontrols/mediaControlsiOS.css:
957 (video::-webkit-media-controls-wireless-playback-picker-button.playing):
958 Use the new color value in the media controls.
961 (WebCore::isAppleLegacyCssValueKeyword): Returns true if the value keyword
962 has an '-apple' prefix which has to be replaced by '-webkit'
964 (WebCore::cssValueKeywordID): Call a new function which handles all the
965 '-apple' legacy keywords.
967 * css/CSSValueKeywords.in: Define the new color keyword.
969 * rendering/RenderThemeIOS.mm:
970 (WebCore::RenderThemeIOS::systemColor):
971 * rendering/RenderThemeMac.mm:
972 (WebCore::RenderThemeMac::systemColor):
973 Define the value of the new color keyword to be an alias of systemBlueColor.
975 2015-06-24 Matt Rajca <mrajca@apple.com>
977 MediaSession: propagate MediaSessionMetadata to WebPageProxy
978 https://bugs.webkit.org/show_bug.cgi?id=146282
980 Reviewed by Darin Adler and Tim Horton.
982 * Modules/mediasession/MediaSession.cpp:
983 (WebCore::MediaSession::setMetadata):
985 2015-06-24 Chris Dumez <cdumez@apple.com>
987 Null dereference in DocumentLoader::areAllLoadersPageCacheAcceptable()
988 https://bugs.webkit.org/show_bug.cgi?id=146286
989 <rdar://problem/21523788>
991 Reviewed by Sam Weinig.
993 Add null check for the Page in areAllLoadersPageCacheAcceptable()
994 to fix this top crasher until I can investigate how this can happen.
996 * loader/DocumentLoader.cpp:
997 (WebCore::areAllLoadersPageCacheAcceptable):
999 2015-06-24 Anders Carlsson <andersca@apple.com>
1001 Move PluginMainThreadScheduler to WebKit/win
1002 https://bugs.webkit.org/show_bug.cgi?id=146289
1004 Reviewed by Tim Horton.
1007 * Configurations/WebCore.xcconfig:
1008 * WebCore.vcxproj/WebCore.vcxproj:
1009 * WebCore.vcxproj/WebCore.vcxproj.filters:
1010 * WebCore.xcodeproj/project.pbxproj:
1011 * plugins/PluginMainThreadScheduler.cpp:
1012 (WebCore::PluginMainThreadScheduler::scheduler): Deleted.
1013 (WebCore::PluginMainThreadScheduler::PluginMainThreadScheduler): Deleted.
1014 (WebCore::PluginMainThreadScheduler::scheduleCall): Deleted.
1015 (WebCore::PluginMainThreadScheduler::registerPlugin): Deleted.
1016 (WebCore::PluginMainThreadScheduler::unregisterPlugin): Deleted.
1017 (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin): Deleted.
1018 (WebCore::PluginMainThreadScheduler::dispatchCalls): Deleted.
1019 (WebCore::PluginMainThreadScheduler::mainThreadCallback): Deleted.
1020 * plugins/PluginMainThreadScheduler.h:
1021 (WebCore::PluginMainThreadScheduler::Call::Call): Deleted.
1022 (WebCore::PluginMainThreadScheduler::Call::performCall): Deleted.
1024 2015-06-24 Dean Jackson <dino@apple.com>
1026 Better fix for Element with blur backdrop-filter shows edge duplication and dark edges
1027 https://bugs.webkit.org/show_bug.cgi?id=146287
1028 <rdar://problem/21530437>
1030 Reviewed by Simon Fraser.
1032 There is no need to carry around a bit in FilterOperations indicating what
1033 type of source property the object came from. Whether or not to clip to the
1034 bounds of the filter region is purely a property of the type of CALayer
1035 we are applying the filter to.
1037 This basically reverts r185846.
1039 Covered by the test for the previous commit.
1041 * css/CSSPropertyNames.in:
1042 * css/StyleBuilderConverter.h:
1043 (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): Deleted.
1044 * page/animation/CSSPropertyAnimation.cpp:
1045 (WebCore::blendFilterOperations): Deleted.
1046 * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Set the normalized
1047 edges property if we are a CABackdropLayer.
1048 * platform/graphics/filters/FilterOperations.cpp:
1049 (WebCore::FilterOperations::operator==):
1050 (WebCore::FilterOperations::operationsMatch):
1051 (WebCore::FilterOperations::operator=): Deleted.
1052 * platform/graphics/filters/FilterOperations.h:
1053 (WebCore::FilterOperations::isUsedForBackdropFilters): Deleted.
1054 (WebCore::FilterOperations::setUsedForBackdropFilters): Deleted.
1056 2015-06-24 Doug Russell <d_russell@apple.com>
1058 Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject
1059 when posting a selection notification when on the border between two accessibilityObjects
1060 https://bugs.webkit.org/show_bug.cgi?id=146177
1062 Reviewed by Darin Adler.
1064 Add support for position to be passed for selection changes to allow checking.
1065 for boundaries in the case of ignored elements.
1066 Add support for searching for unignored siblings of AccessibilityObjects.
1067 Include AccessibilityObject wrappers in notifications for tests.
1069 Test: platform/mac/accessibility/selection-element-tabbing-to-link.html
1071 * accessibility/AXObjectCache.cpp:
1072 (WebCore::AXObjectCache::postTextStateChangeNotification):
1073 * accessibility/AXObjectCache.h:
1074 * accessibility/AccessibilityObject.cpp:
1075 (WebCore::AccessibilityObject::previousSiblingUnignored):
1076 (WebCore::AccessibilityObject::nextSiblingUnignored):
1077 * accessibility/AccessibilityObject.h:
1078 * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1079 (isValueTypeSupported):
1080 (arrayRemovingNonSupportedTypes):
1081 (dictionaryRemovingNonSupportedTypes):
1082 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
1083 * editing/mac/FrameSelectionMac.mm:
1084 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1086 2015-06-24 Anders Carlsson <andersca@apple.com>
1088 Enable -Winconsistent-missing-override when building with Xcode
1089 https://bugs.webkit.org/show_bug.cgi?id=146288
1091 Reviewed by Sam Weinig.
1093 * Configurations/Base.xcconfig:
1094 * Modules/encryptedmedia/MediaKeySession.h:
1095 * Modules/webdatabase/DatabaseTask.h:
1096 * html/DateTimeLocalInputType.h:
1097 * page/scrolling/ios/ScrollingCoordinatorIOS.h:
1098 * page/scrolling/mac/ScrollingCoordinatorMac.h:
1099 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1100 (WebCore::MediaPlayerPrivateAVFoundation::platformLayer): Deleted.
1101 (WebCore::MediaPlayerPrivateAVFoundation::supportsScanning): Deleted.
1102 (WebCore::MediaPlayerPrivateAVFoundation::fileSize): Deleted.
1103 (WebCore::MediaPlayerPrivateAVFoundation::engineDescription): Deleted.
1104 (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode): Deleted.
1105 (WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Deleted.
1106 * platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
1107 (WebCore::VideoTrackPrivateAVF::trackIndex): Deleted.
1108 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
1109 (WebCore::CDMSessionAVFoundationObjC::type): Deleted.
1110 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1111 (WebCore::CDMSessionMediaSourceAVFObjC::type): Deleted.
1112 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1113 (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsAcceleratedRendering): Deleted.
1114 (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayToWirelessPlaybackTarget): Deleted.
1115 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1116 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Deleted.
1117 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Deleted.
1118 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Deleted.
1119 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Deleted.
1120 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Deleted.
1121 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1122 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Deleted.
1123 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1124 (WebCore::MediaPlayerPrivateQTKit::supportsScanning): Deleted.
1125 (WebCore::MediaPlayerPrivateQTKit::networkState): Deleted.
1126 (WebCore::MediaPlayerPrivateQTKit::readyState): Deleted.
1127 (WebCore::MediaPlayerPrivateQTKit::maximumDurationToCacheMediaTime): Deleted.
1128 (WebCore::MediaPlayerPrivateQTKit::engineDescription): Deleted.
1129 * platform/mac/ScrollAnimatorMac.h:
1130 * platform/mac/SerializedPlatformRepresentationMac.h:
1131 (WebCore::SerializedPlatformRepresentationMac::platformType): Deleted.
1132 * platform/mac/ThemeMac.h:
1133 (WebCore::ThemeMac::controlRequiresPreWhiteSpace): Deleted.
1134 * testing/MockCDM.cpp:
1135 (WebCore::MockCDMSession::setClient): Deleted.
1137 2015-06-24 Youenn Fablet <youenn.fablet@crf.canon.fr>
1139 Improve JSDOMPromise callPromiseFunction naming
1140 https://bugs.webkit.org/show_bug.cgi?id=146280
1144 No change in behavior.
1146 * bindings/js/JSDOMPromise.h:
1147 (WebCore::callPromiseFunction):
1149 2015-06-24 Tim Horton <timothy_horton@apple.com>
1151 REGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizons.com/BackupCareRequest.aspx
1152 <rdar://problem/21525376>
1154 Reviewed by Sam Weinig.
1156 * page/TextIndicator.cpp:
1157 (WebCore::TextIndicator::createWithRange):
1160 2015-06-24 Zalan Bujtas <zalan@apple.com>
1162 Subpixel rendering: roundToDevicePixel() snaps to wrong value.
1163 https://bugs.webkit.org/show_bug.cgi?id=146273
1164 rdar://problem/18509840
1166 Reviewed by Simon Fraser.
1168 Due to the floating point approximate representation, we can't always produce
1169 the correct snap value. This patch addresses the issue by removing redundant kFixedPointDenominator multiplication
1170 and by changing the rounding in roundToDevicePixel() from float to double.
1174 * platform/LayoutUnit.h:
1175 (WebCore::roundToDevicePixel):
1177 2015-06-23 Matt Rajca <mrajca@apple.com>
1179 MediaSession: Support setting of metadata
1180 https://bugs.webkit.org/show_bug.cgi?id=146253
1182 Reviewed by Eric Carlson.
1184 * Modules/mediasession/MediaSession.cpp:
1185 (WebCore::MediaSession::MediaSession): Store a reference to the document so we can use it in setMetadata.
1186 (WebCore::MediaSession::setMetadata): Implemented as described in the Media Session spec.
1187 * Modules/mediasession/MediaSession.h:
1188 * Modules/mediasession/MediaSession.idl: Added the setMetadata method.
1189 * Modules/mediasession/MediaSessionMetadata.h:
1190 (WebCore::MediaSessionMetadata::MediaSessionMetadata): Added to keep track of media session metadata.
1191 (WebCore::MediaSessionMetadata::title):
1192 (WebCore::MediaSessionMetadata::artist):
1193 (WebCore::MediaSessionMetadata::album):
1194 (WebCore::MediaSessionMetadata::artworkURL):
1195 * WebCore.xcodeproj/project.pbxproj: Added MediaSessionMetadata.h.
1197 2015-06-24 Daniel Bates <dabates@apple.com>
1199 Content Security Policy error message when frame load is blocked does not read well
1200 https://bugs.webkit.org/show_bug.cgi?id=146279
1202 Reviewed by Csaba Osztrogonác.
1204 Substitute "Refused to load frame" for "Refused to frame" as the prefix of the error message
1205 emitted when the Content Security Policy of the page blocks a frame load.
1207 * page/ContentSecurityPolicy.cpp:
1208 (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
1210 2015-06-11 Sergio Villar Senin <svillar@igalia.com>
1212 intrinsic size keywords don't work for heights
1213 https://bugs.webkit.org/show_bug.cgi?id=113610
1215 Reviewed by Darin Adler.
1217 Based on Blink's r148314 & r150355 by <cbiesinger@chromium.org>.
1219 Adds intrinsic values support to heigh & min/max-height. This involves the
1221 - RenderBox needs to pass the content height through to computeLogicalHeight and
1222 related functions, which needs it to resolve max-content, et. al.
1223 - Make the callers pass the content height to this function. Some callers pass
1224 logicalHeight() (adjusted for border/padding) which works because if
1225 logicalHeight is not the content height, then it is the height we ended up using,
1226 so the constrain* functions will just constrain to that value again.
1227 - Parsing code needs to be adjusted to support intrinsic values for heights.
1229 Tests: fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
1230 fast/css-intrinsic-dimensions/height-css-tables.html
1231 fast/css-intrinsic-dimensions/height-flexbox.html
1232 fast/css-intrinsic-dimensions/height-positioned-replaced.html
1233 fast/css-intrinsic-dimensions/height-positioned.html
1234 fast/css-intrinsic-dimensions/height-replaced.html
1235 fast/css-intrinsic-dimensions/height-tables-collapsed.html
1236 fast/css-intrinsic-dimensions/height-tables.html
1237 fast/css-intrinsic-dimensions/height.html
1239 * css/CSSParser.cpp:
1240 (WebCore::CSSParser::isValidSize): Refactored from validateWidth and
1242 (WebCore::CSSParser::parseValue):
1243 (WebCore::CSSParser::validateWidth): Deleted.
1244 (WebCore::CSSParser::validateHeight): Deleted.
1246 * platform/Length.h:
1247 (WebCore::Length::isFillAvailable):
1248 (WebCore::Length::isFitContent):
1249 * rendering/RenderBox.cpp:
1250 (WebCore::RenderBox::constrainLogicalHeightByMinMax):
1251 (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
1252 (WebCore::RenderBox::computeLogicalHeight):
1253 (WebCore::RenderBox::computeLogicalHeightUsing):
1254 (WebCore::RenderBox::computeContentLogicalHeight):
1255 (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
1256 (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
1257 (WebCore::RenderBox::computePercentageLogicalHeight):
1258 (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1259 (WebCore::RenderBox::availableLogicalHeight):
1260 (WebCore::RenderBox::availableLogicalHeightUsing):
1261 (WebCore::RenderBox::computePositionedLogicalHeight):
1262 (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1263 * rendering/RenderBox.h:
1264 * rendering/RenderFlexibleBox.cpp:
1265 (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1266 (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
1267 * rendering/RenderFlowThread.cpp:
1268 (WebCore::RenderFlowThread::addForcedRegionBreak):
1269 * rendering/RenderGrid.cpp:
1270 (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1271 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1272 * rendering/RenderMultiColumnSet.cpp:
1273 (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
1274 * rendering/RenderReplaced.cpp:
1275 (WebCore::RenderReplaced::hasReplacedLogicalHeight):
1276 * rendering/RenderTable.cpp:
1277 (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1278 (WebCore::RenderTable::layout):
1280 2015-06-24 Commit Queue <commit-queue@webkit.org>
1282 Unreviewed, rolling out r185906.
1283 https://bugs.webkit.org/show_bug.cgi?id=146276
1285 MSVC doesn't yet provide a const-qualified std::array<T,
1286 N>::size(), failing to compile the static_assert (Requested by
1287 zdobersek on #webkit).
1291 "Improve the source code generated by make_names.pl"
1292 https://bugs.webkit.org/show_bug.cgi?id=146208
1293 http://trac.webkit.org/changeset/185906
1295 2015-06-24 Zan Dobersek <zdobersek@igalia.com>
1297 Improve the source code generated by make_names.pl
1298 https://bugs.webkit.org/show_bug.cgi?id=146208
1300 Reviewed by Darin Adler.
1302 Clean up and optimize the output that's generated by the make_names.pl script
1303 when generating large sets of DOM names for attributes and tags.
1305 The GenerateStrings() function in the StaticString.pm module is split into
1306 GenerateStringData() and GenerateASCIILiteral() so that the two new functions
1307 can be used independently, with the original function still being called when
1308 generating font names.
1310 Tags and attributes have the corresponding static QualifiedName globals defined
1311 as before. After that, two static const std::array<> objects are defined for
1312 both types -- the first is an ordered array of addresses of the QualifiedName
1313 objects (corresponding to the C array that was defined in getHTMLTags(),
1314 getSVGAttrs() etc.), and the second is an ordered array of StringImpl::StaticASCIILiteral
1315 objects that replaces separately defined StringImpl::StaticASCIILiteral objects
1316 and the additional tables that contained pairs of QualifiedName object addresses
1317 and the corresponding StaticASCIILiteral object references in the init() function.
1318 This is all generated by the printStaticData() function in make_names.pl.
1320 The printQualifiedNameCreation() function generates a static_assert() that ensures
1321 that the corresponding std::array<QualifiedName*> and std::array<StaticASCIILiteral>
1322 objects have the same amount of items, and then sets up a loop that walks through
1323 the two arrays and properly constructs the QualifiedName objects from the static
1326 On the GTK port, this shaves off ~54kB from the final stripped shared library
1327 on a 64-bit build, and ~21kB on a 32-bit build.
1329 * bindings/scripts/StaticString.pm:
1330 (GenerateStringData):
1331 (GenerateASCIILiteral):
1333 * dom/make_names.pl:
1335 (printNamesCppFile):
1337 (printQualifiedNameCreation):
1338 (printInit): Deleted.
1339 (printDefinitions): Deleted.
1341 2015-06-24 Youenn Fablet <youenn.fablet@crf.canon.fr>
1343 Refactor UserMediaRequest to share more codes between MediaDevices.getUserMedia and legacy webkitGetUserMedia
1344 https://bugs.webkit.org/show_bug.cgi?id=146237
1346 Reviewed by Darin Adler.
1348 Covered by existing tests, no change in behavior.
1350 * Modules/mediastream/MediaConstraintsImpl.cpp:
1351 (WebCore::MediaConstraintsImpl::create): Simplified error handling by removing exception code parameter.
1352 * Modules/mediastream/MediaConstraintsImpl.h: Ditto.
1353 * Modules/mediastream/MediaDevices.cpp:
1354 (WebCore::MediaDevices::getUserMedia): Removed code now in UserMediaRequest::start.
1355 * Modules/mediastream/NavigatorUserMedia.cpp:
1356 (WebCore::NavigatorUserMedia::webkitGetUserMedia): Ditto.
1357 * Modules/mediastream/UserMediaRequest.cpp:
1358 (WebCore::parseOptions): Simplified error handling by removing exception code parameter.
1359 (WebCore::UserMediaRequest::start): Renamed create in start and added common code.
1360 * Modules/mediastream/UserMediaRequest.h:
1362 2015-06-23 Andreas Kling <akling@apple.com>
1364 Should reduce tile coverage for the first paint after a tab switch.
1365 <https://webkit.org/b/146252>
1366 <rdar://problem/19821583>
1368 Reviewed by Darin Adler.
1370 Reduce the number of tiles we need to paint after switching tabs,
1371 to shorten the time it takes before we can flush pixels to screen.
1373 We accomplish this by piggybacking on the "speculative tiling enabled"
1374 mode of FrameView, which was previously only used to throttle painting
1375 and layer flushes during page load.
1377 When a FrameView becomes visible, which is what happens when you
1378 switch to its tab, we revert the speculative tiling optimization to
1379 its initial state, and reset the "scrolled by user" flag.
1381 In practice this means that after switching tabs, we only generate
1382 enough tiles to fill the viewport. Then, after 500ms has passed
1383 or the user scrolls the page, we go back to the usual speculative
1386 * page/FrameView.cpp:
1387 (WebCore::FrameView::show):
1389 2015-06-23 Anders Carlsson <andersca@apple.com>
1391 Remove windowResizerRect code, nobody is using it anymore
1392 https://bugs.webkit.org/show_bug.cgi?id=146265
1394 Reviewed by Beth Dakin.
1396 * loader/EmptyClients.h:
1398 (WebCore::Chrome::windowResizerRect): Deleted.
1400 * page/ChromeClient.h:
1401 * page/FrameView.cpp:
1402 (WebCore::FrameView::windowResizerRect): Deleted.
1404 * platform/ScrollView.cpp:
1405 (WebCore::ScrollView::ScrollView): Deleted.
1406 (WebCore::ScrollView::windowResizerRectChanged): Deleted.
1407 (WebCore::ScrollView::containsScrollbarsAvoidingResizer): Deleted.
1408 (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount): Deleted.
1409 (WebCore::ScrollView::setParent): Deleted.
1410 * platform/ScrollView.h:
1411 (WebCore::ScrollView::windowResizerRect): Deleted.
1412 * platform/Scrollbar.cpp:
1413 (WebCore::Scrollbar::Scrollbar): Deleted.
1414 (WebCore::Scrollbar::setFrameRect): Deleted.
1415 (WebCore::Scrollbar::setParent): Deleted.
1416 * platform/Scrollbar.h:
1418 2015-06-23 Dean Jackson <dino@apple.com>
1420 Media controls are missing the white backdrop in UIWebViews
1421 https://bugs.webkit.org/show_bug.cgi?id=146251
1422 <rdar://problem/20181345>
1424 Reviewed by Simon Fraser.
1426 Implement two new CALayer subclasses that explicitly set
1427 something that resembles the system appearance for
1428 media-controls-dark-bar-background and media-controls-light-bar-background.
1429 This way, WebKit1 clients get a visible result.
1431 Creating the actual system recipes is tracked by:
1432 https://bugs.webkit.org/show_bug.cgi?id=146250
1434 * WebCore.xcodeproj/project.pbxproj: Add new files.
1435 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1436 (PlatformCALayerCocoa::PlatformCALayerCocoa): Use the new CALayer subclasses for
1437 the appropriate layer types.
1438 * platform/graphics/ca/cocoa/WebSystemBackdropLayer.h: Added.
1439 * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm: Added.
1440 (-[WebLightSystemBackdropLayer init]):
1441 (-[WebLightSystemBackdropLayer setBackgroundColor:]): Only set to a light grey.
1442 (-[WebDarkSystemBackdropLayer init]):
1443 (-[WebDarkSystemBackdropLayer setBackgroundColor:]): Only set to a dark grey.
1445 2015-06-18 Matt Rajca <mrajca@apple.com>
1447 Support releasing media sessions
1448 https://bugs.webkit.org/show_bug.cgi?id=146132
1450 Reviewed by Darin Adler.
1452 * Modules/mediasession/MediaSession.cpp: Implemented as described in the Media Session spec.
1453 (WebCore::MediaSession::releaseSession):
1454 (WebCore::MediaSession::releaseInternal):
1455 * Modules/mediasession/MediaSession.h:
1457 2015-06-23 Chris Fleizach <cfleizach@apple.com>
1459 AX: iOS: VoiceOver and ARIA: has popup property not announced
1460 https://bugs.webkit.org/show_bug.cgi?id=146188
1462 Reviewed by Darin Adler.
1464 Expose the existing "has popup" property to the iOS Accessibility API.
1466 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1467 (-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
1469 2015-06-23 Javier Fernandez <jfernandez@igalia.com>
1471 [CSS Grid Layout] Performance optimization: avoid computing overflow alignment if not needed
1472 https://bugs.webkit.org/show_bug.cgi?id=146231
1474 Reviewed by Sergio Villar Senin.
1476 We don't need to apply any overflow handling if alignment value don't have a potential
1477 risk of data loss, as it's the case of 'start' value.
1479 This patch avoid computing the overflow in all the cases, since it adds an unneeded
1480 overhead which affects performance.
1482 New code improves performance around 3%-8%, depending on the grid tests.
1484 No new tests, no new funcitonality.
1486 * rendering/RenderGrid.cpp:
1487 (WebCore::RenderGrid::rowPositionForChild):
1488 (WebCore::RenderGrid::columnPositionForChild):
1490 2015-06-23 Youenn Fablet <youenn.fablet@crf.canon.fr>
1492 MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
1493 https://bugs.webkit.org/show_bug.cgi?id=146200
1495 Reviewed by Darin Adler.
1497 Introduced DOMPromiseWithCallback to resolve/reject promises while allowing promise clients to use a typed callback approach.
1498 Migrated MediaDevices.getUserMedia from callbacks to DOMPromiseWithCallback.
1499 Removed MediaDevices.getUserMedia custom binding.
1501 Covered by existing tests.
1503 * CMakeLists.txt: Removing custom binding.
1504 * Modules/mediastream/MediaDevices.cpp:
1505 (WebCore::MediaDevices::getUserMedia): Moving from callback to promise.
1506 * Modules/mediastream/MediaDevices.h: Ditto.
1507 * Modules/mediastream/MediaDevices.idl: Removing custom binding.
1508 * Modules/mediastream/NavigatorUserMedia.cpp:
1509 (WebCore::NavigatorUserMedia::webkitGetUserMedia): Converting from promise callback to API callbacks.
1510 * Modules/mediastream/UserMediaRequest.cpp:
1511 (WebCore::UserMediaRequest::create): Moving from callback to promise.
1512 (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
1513 (WebCore::UserMediaRequest::didCreateStream): Ditto.
1514 (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Ditto.
1515 (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Ditto.
1516 * Modules/mediastream/UserMediaRequest.h: Ditto.
1517 * bindings/js/JSDOMPromise.h: Introducing DOMPromiseWithCallback and removing crypto specific header.
1518 (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback):
1519 (WebCore::Error>::resolve):
1520 (WebCore::Error>::reject):
1521 * bindings/js/JSMediaDevicesCustom.cpp: Removed.
1522 * bindings/js/JSSubtleCryptoCustom.cpp: Updating headers.
1524 2015-06-23 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1526 [Streams API] Implement ReadableStream js source "'cancel" callback
1527 https://bugs.webkit.org/show_bug.cgi?id=146204
1529 Reviewed by Darin Adler.
1531 Calling "cancel" JS function when web app is cancelling a JS readable stream.
1532 Handling of promise returned value in case of async cancel.
1534 Covered by rebased tests.
1536 * bindings/js/ReadableJSStream.cpp:
1537 (WebCore::ReadableJSStream::invoke): Refactoring to pass cancel reason or controller to the JS function.
1538 (WebCore::ReadableJSStream::doStart): Ditto.
1539 (WebCore::startReadableStreamAsync): Renaming readableStream as protectedStream.
1540 (WebCore::createPullResultFulfilledFunction): Ditto.
1541 (WebCore::ReadableJSStream::doPull): Refactoring to pass cancel reason or controller to the JS function.
1542 (WebCore::createCancelResultFulfilledFunction): Cancel promise fullfil callback.
1543 (WebCore::createCancelResultRejectedFunction): Cancel promise reject callback.
1544 (WebCore::ReadableJSStream::doCancel): Calling cancel JS callback and handling promise returned value.
1545 * bindings/js/ReadableJSStream.h: Refactoring to pass cancel reason or controller to the JS function.
1547 2015-06-22 Ryuan Choi <ryuan.choi@navercorp.com>
1549 [EFL] Hyphenation is not supported
1550 https://bugs.webkit.org/show_bug.cgi?id=89830
1552 Reviewed by Gyuyoung Kim.
1554 Share libHyphen backend of GTK port.
1556 Rebased fast/text/hyphenate-*.html
1558 * PlatformEfl.cmake:
1559 * PlatformGTK.cmake:
1560 * platform/efl/FileSystemEfl.cpp:
1561 (WebCore::listDirectory): Deleted because of lack of functionality.
1562 eina_file_ls returns full directory path so fnmatch fails to check dict file.
1563 This patch reuse Posix implementation instead of EFL port specific function.
1564 * platform/posix/FileSystemPOSIX.cpp: Ditto.
1565 * platform/text/gtk/HyphenationLibHyphen.cpp: Moved to platform/text/hyphen
1566 * platform/text/hyphen/HyphenationLibHyphen.cpp:
1567 Renamed from Source/WebCore/platform/text/gtk/HyphenationLibHyphen.cpp.
1568 (WebCore::scanTestDictionariesDirectoryIfNecessary):
1569 Added PLATFORM guard and EFL implementation for the test directory
1571 2015-06-22 Chris Dumez <cdumez@apple.com>
1573 [WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permission request
1574 https://bugs.webkit.org/show_bug.cgi?id=146228
1575 <rdar://problem/15179262>
1577 Reviewed by Daniel Bates.
1579 Add Geolocation::resetIsAllowed() API that merely resets
1580 m_allowGeolocation to Unknown, so that we will request the permission
1581 again the next time a position is requested.
1583 * Modules/geolocation/Geolocation.h:
1584 (WebCore::Geolocation::resetIsAllowed):
1586 2015-06-22 Simon Fraser <simon.fraser@apple.com>
1588 ASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering suppressed
1589 https://bugs.webkit.org/show_bug.cgi?id=146225
1591 Reviewed by Zalan Bujtas.
1593 Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
1594 been updated; this happens to work most of the time because painting updates them,
1595 but if incremental rendering is suppressed, we may not have painted yet.
1597 Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.
1599 * rendering/RenderLayer.cpp:
1600 (WebCore::RenderLayer::hitTest):
1601 (WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
1602 dirty bits is cheaper than calling isStackingContext().
1604 2015-06-22 Dean Jackson <dino@apple.com>
1606 Rename PlatformCA*Mac to PlatformCA*Cocoa
1607 https://bugs.webkit.org/show_bug.cgi?id=146224
1608 <rdar://problem/21497182>
1610 Reviewed by Simon Fraser.
1612 Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
1613 to the more accurate Cocoa suffix.
1615 * WebCore.xcodeproj/project.pbxproj:
1616 * page/mac/ServicesOverlayController.mm:
1617 * platform/graphics/ca/GraphicsLayerCA.cpp:
1618 * platform/graphics/ca/PlatformCAAnimation.h:
1619 * platform/graphics/ca/PlatformCALayer.h:
1620 * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Renamed from Source/WebCore/platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp.
1621 * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h.
1622 * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
1623 * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm.
1624 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h.
1625 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
1626 * platform/graphics/ca/cocoa/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h.
1627 * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm.
1628 * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
1629 * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1630 * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
1631 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1632 * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
1634 2015-06-22 Alex Christensen <achristensen@webkit.org>
1636 [cssjit] Disable compiling scrollbar pseudoclass selectors
1637 https://bugs.webkit.org/show_bug.cgi?id=146220
1639 Reviewed by Benjamin Poulain.
1641 * cssjit/SelectorCompiler.cpp:
1642 (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
1643 Don't compile selectors with scrollbar pseudoclasses.
1645 2015-06-22 Simon Fraser <simon.fraser@apple.com>
1647 -webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
1648 https://bugs.webkit.org/show_bug.cgi?id=146218
1649 rdar://problem/21127840
1651 Reviewed by Zalan Bujtas.
1653 The clip path is computed using the RenderLayer's bounding box, so needs to be offset
1654 by the offsetFromRenderer when set on the mask layer.
1656 Test: compositing/masks/compositing-clip-path-origin.html
1658 * rendering/RenderLayerBacking.cpp:
1659 (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
1661 2015-06-22 Michael Catanzaro <mcatanzaro@igalia.com>
1663 Web sockets should be treated as active mixed content
1664 https://bugs.webkit.org/show_bug.cgi?id=140624
1666 Reviewed by Sam Weinig.
1668 Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
1669 http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html
1671 * Modules/websockets/WebSocket.cpp:
1672 (WebCore::WebSocket::connect): Block ws:// WebSocket connections from https:// pages, and
1673 emit the onerror event after doing so.
1674 * platform/SchemeRegistry.cpp:
1675 (WebCore::secureSchemes): Add wss:// to the list of secure schemes.
1677 2015-06-22 Dean Jackson <dino@apple.com>
1679 Element with blur backdrop-filter shows edge duplication and dark edges
1680 https://bugs.webkit.org/show_bug.cgi?id=146215
1681 <rdar://problem/20367695>
1683 Reviewed by Tim Horton.
1685 The input images to backdrop filters should duplicate their edge pixels
1686 outwards, rather than using transparent pixels. This is a flag we
1687 set on the Gaussian blur, but means we have to remember if the
1688 FilterOperations list came from a regular filter or a backdrop filter.
1690 Test: css3/filters/backdrop/blur-input-bounds.html
1692 * css/CSSPropertyNames.in: New custom convertor for backdrop-filter.
1693 * css/StyleBuilderConverter.h:
1694 (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): New convertor
1695 that sets the backdrop flag, but is otherwise the same as a normal filter
1697 * page/animation/CSSPropertyAnimation.cpp:
1698 (WebCore::blendFilterOperations): Inherit the backdrop flag if either of our
1700 * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Set the inputNormalizeEdges
1701 key on the CAFilter if necessary.
1702 * platform/graphics/filters/FilterOperations.cpp: Add a new flag indicating if
1703 these operations are intended for backdrops.
1704 (WebCore::FilterOperations::operator=):
1705 (WebCore::FilterOperations::operator==):
1706 * platform/graphics/filters/FilterOperations.h:
1707 (WebCore::FilterOperations::isUsedForBackdropFilters):
1708 (WebCore::FilterOperations::setUsedForBackdropFilters):
1710 2015-06-22 Tim Horton <timothy_horton@apple.com>
1712 [TextIndicator] Text shifts one pixel to the left when I force click to bring up Lookup in Mail messages
1713 https://bugs.webkit.org/show_bug.cgi?id=146214
1714 <rdar://problem/20782970>
1716 Reviewed by Dean Jackson.
1718 * page/mac/TextIndicatorWindow.mm:
1719 (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
1720 (WebCore::TextIndicatorWindow::setTextIndicator):
1721 (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]): Deleted.
1722 When the WebView is at a nonintegral position, we can end up needing a TextIndicator
1723 with a nonintegral position. We need to round the window position, so we need to apply
1724 the fractional part to the indicator layers inside, not to the window.
1726 2015-06-22 Myles C. Maxfield <mmaxfield@apple.com>
1728 [iOS] Arabic text styled with Georgia is rendered as boxes
1729 https://bugs.webkit.org/show_bug.cgi?id=145681
1730 <rdar://problem/21169844>
1732 Reviewed by Darin Adler.
1734 Georgia doesn't support Arabic, so we ask CoreText what font does support Arabic. It returns
1735 TimesNewRomanPSMT. However, WebKit explicitly disallows this font on iOS. Therefore, instead
1736 of using TimesNewRomanPSMT, we will simply just use GeezaPro.
1738 Test: fast/text/arabic-times-new-roman.html
1740 * platform/graphics/ios/FontCacheIOS.mm:
1741 (WebCore::FontCache::systemFallbackForCharacters):
1742 * platform/graphics/Font.h: Let FontCacheIOS call fontFamilyShouldNotBeUsedForArabic()
1743 * platform/graphics/cocoa/FontCocoa.mm:
1744 (WebCore::fontFamilyShouldNotBeUsedForArabic):
1746 2015-06-22 Alex Christensen <achristensen@webkit.org>
1748 Unreviewed non-mac debug build fix after r185840.
1750 * loader/ResourceLoader.cpp:
1751 (WebCore::ResourceLoader::willSendRequest):
1752 Added enable flag around assertion.
1754 2015-06-20 Alex Christensen <achristensen@webkit.org>
1756 [Content Extensions] Add SPI to reload without content blocking.
1757 https://bugs.webkit.org/show_bug.cgi?id=146128
1758 rdar://problem/20351903
1760 Reviewed by Sam Weinig.
1762 * html/HTMLMediaElement.cpp:
1763 (WebCore::HTMLMediaElement::loadResource):
1764 * loader/ResourceLoader.cpp:
1765 (WebCore::ResourceLoader::willSendRequest):
1766 * loader/cache/CachedResourceLoader.cpp:
1767 (WebCore::CachedResourceLoader::requestResource):
1768 * page/DOMWindow.cpp:
1769 (WebCore::DOMWindow::open):
1771 (WebCore::Page::userContentController):
1772 (WebCore::Page::userContentExtensionsEnabled):
1773 (WebCore::Page::setUserContentExtensionsEnabled):
1774 (WebCore::Page::group):
1775 * page/UserContentController.cpp:
1776 (WebCore::UserContentController::removeAllUserContentExtensions):
1777 (WebCore::UserContentController::processContentExtensionRulesForLoad):
1778 (WebCore::UserContentController::actionsForResourceLoad):
1779 * page/UserContentController.h:
1781 2015-06-22 Zalan Bujtas <zalan@apple.com>
1783 REGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtreeData.
1784 https://bugs.webkit.org/show_bug.cgi?id=146116
1785 rdar://problem/20959369
1787 Reviewed by Brent Fulgham.
1789 This patch ensures that we don't adjust the selection unless the visual selection still matches this subtree root.
1791 When multiple selection roots are present we need to ensure that a RenderObject
1792 only shows up in one of them.
1793 RenderView::splitSelectionBetweenSubtrees(), as the name implies, splits the
1794 selection and sets the selection range (start/end) on each selection root.
1795 However, SelectionSubtreeRoot::adjustForVisibleSelection() later recomputes the range
1796 based on visible selection and that could end up collecting renderers as selection start/end
1797 from another selection subtree.
1798 RenderObject's holds the last selection state (RenderObject::setSelectionState).
1799 If we set a renderer first as "on selection border" and later "inside" using multiple selection roots,
1800 we can't clean up selections properly when this object gets destroyed.
1801 One of the roots ends up with a dangling RenderObject pointer.
1803 Test: fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html
1805 * rendering/SelectionSubtreeRoot.cpp:
1806 (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
1808 2015-06-22 Jeremy Jones <jeremyj@apple.com>
1810 Do not exit fullscreen when starting PiP since this is done automatically.
1811 https://bugs.webkit.org/show_bug.cgi?id=144871
1813 Reviewed by Darin Adler.
1815 Since we don't explicitly exit fullscreen, update state in shouldExitFullscreenWithReason()
1817 * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare shouldExitFullscreenWithReason().
1818 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1819 (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Forward to WebVideoFullscreenInterfaceAVKit.
1820 (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Added.
1821 (WebVideoFullscreenInterfaceAVKit::willStartPictureInPicture): Remove enter fullscreen code.
1822 * platform/spi/cocoa/AVKitSPI.h: Add missing enums.
1824 2015-06-22 Daniel Bates <dabates@apple.com>
1826 AX: UI Automation cannot find AutoFill or search cancel buttons
1827 https://bugs.webkit.org/show_bug.cgi?id=145241
1828 <rdar://problem/21051411>
1830 Reviewed by Chris Fleizach.
1832 Add support for hit testing the search cancel button and AutoFill button so that
1833 they can be accessed by UI Automation.
1835 Currently the accessibility hit test machinery ignores nodes in a shadow tree.
1836 So, it neither finds the <input type="search"> cancel button nor the AutoFill button
1837 when it performs a hit test. Therefore these buttons cannot be accessed using
1840 Tests: accessibility/hit-test-input-auto-fill-button.html
1841 accessibility/hit-test-input-search-cancel-button.html
1842 accessibility/input-search-cancel-button.html
1844 * accessibility/AccessibilityRenderObject.cpp:
1845 (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Added; returns
1846 the AccessibilityObject for the search cancel button or AutoFill text field decoration as applicable.
1847 (WebCore::AccessibilityRenderObject::accessibilityHitTest): Check whether the hit node
1848 is a text field decoration.
1850 2015-06-22 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1852 [Streams API] Implement ReadableStream cancel (abstract part)
1853 https://bugs.webkit.org/show_bug.cgi?id=146111
1855 Reviewed by Darin Adler.
1857 This patch implements ReadableStream and ReadableStreamReader cancel.
1858 The reader delegates cancellation to its stream.
1860 This patch also ensures that controller.close() will not throw in case cancellation is on-going.
1862 A follow-up patch will implement the calling of 'cancel' JS callback for JS sources.
1864 Covered by rebased tests.
1866 * Modules/streams/ReadableStream.cpp:
1867 (WebCore::ReadableStream::cancel): Checks whether locked or not before cancelling.
1868 (WebCore::ReadableStream::cancelNoCheck): Cancel without lock check.
1869 (WebCore::ReadableStream::notifyCancelSucceeded): Async cancel callback.
1870 (WebCore::ReadableStream::notifyCancelFailed): Ditto.
1871 * Modules/streams/ReadableStream.h:
1872 * Modules/streams/ReadableStream.idl: Cleaned up IDL.
1873 * Modules/streams/ReadableStreamReader.cpp:
1874 (WebCore::ReadableStreamReader::cancel):
1875 * Modules/streams/ReadableStreamReader.h:
1876 * Modules/streams/ReadableStreamReader.idl: Cleaned up IDL
1877 * bindings/js/JSReadableStreamControllerCustom.cpp:
1878 (WebCore::JSReadableStreamController::close):
1879 * bindings/js/JSReadableStreamCustom.cpp:
1880 (WebCore::JSReadableStream::cancel):
1881 * bindings/js/JSReadableStreamReaderCustom.cpp:
1882 (WebCore::JSReadableStreamReader::cancel):
1883 * bindings/js/ReadableJSStream.cpp:
1884 (WebCore::ReadableJSStream::doCancel):
1885 * bindings/js/ReadableJSStream.h:
1887 2015-06-22 Adam Bergkvist <adam.bergkvist@ericsson.com>
1889 WebRTC: Navigator.webkitGetUserMedia() requires three arguments
1890 https://bugs.webkit.org/show_bug.cgi?id=146022
1892 Reviewed by Eric Carlson.
1894 Updated custom binding to make the third error callback argument
1895 mandatory. Updated and unskipped three tests (for the GTK+ port).
1897 * bindings/js/JSNavigatorCustom.cpp:
1898 (WebCore::JSNavigator::webkitGetUserMedia):
1900 2015-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
1902 Unreviewed. Fix GTK+ build after r185818.
1904 Actually rollout r185320.
1906 * platform/network/soup/DNSSoup.cpp:
1907 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1908 (WebCore::DNSResolveQueue::platformResolve):
1909 (WebCore::gotProxySettingsCallback): Deleted.
1910 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
1912 2015-06-16 Gavin Barraclough <barraclough@apple.com>
1914 Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
1915 https://bugs.webkit.org/show_bug.cgi?id=146198
1919 * platform/network/DNSResolveQueue.cpp:
1920 (WebCore::DNSResolveQueue::DNSResolveQueue):
1921 (WebCore::DNSResolveQueue::isUsingProxy):
1922 (WebCore::DNSResolveQueue::add):
1923 (WebCore::DNSResolveQueue::timerFired):
1924 * platform/network/DNSResolveQueue.h:
1925 * platform/network/cf/DNSCFNet.cpp:
1926 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1927 (WebCore::clientCallback):
1928 (WebCore::DNSResolveQueue::platformResolve):
1929 (WebCore::proxyIsEnabledInSystemPreferences): Deleted.
1930 (WebCore::isUsingProxy): Deleted.
1931 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
1932 * platform/network/soup/DNSSoup.cpp:
1934 2015-06-21 Alexey Proskuryakov <ap@apple.com>
1936 REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
1937 https://bugs.webkit.org/show_bug.cgi?id=146121
1938 rdar://problem/21395180
1940 Reviewed by Darin Adler.
1942 Revert to previous behavior, which is wrong in many ways, but not as wrong as the new one.
1944 * platform/mac/Language.mm:
1945 (WebCore::httpStyleLanguageCode):
1946 (WebCore::platformUserPreferredLanguages):
1947 * platform/spi/cf/CFBundleSPI.h:
1949 2015-06-19 Andy Estes <aestes@apple.com>
1951 Give Node::didNotifySubtreeInsertions() a better name
1952 https://bugs.webkit.org/show_bug.cgi?id=146170
1954 Reviewed by Darin Adler.
1956 didNotifySubtreeInsertions() is not a good name. It sounds like we are notifying the subtree insertions, which doesn't make sense.
1958 This function is really about notifying the Node that the subtree it's a part of has finished being inserted into the DOM
1959 (i.e. all nodes have received their call to insertedInto()). Change the name to finishedInsertingSubtree() to better reflect this.
1961 * dom/ContainerNode.cpp:
1962 (WebCore::ContainerNode::notifyChildInserted):
1963 * dom/ContainerNodeAlgorithms.h:
1964 (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
1965 (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
1967 (WebCore::Element::addShadowRoot):
1969 (WebCore::Node::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1970 (WebCore::Node::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1971 * dom/ScriptElement.cpp:
1972 (WebCore::ScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1973 (WebCore::ScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1974 * dom/ScriptElement.h:
1975 * html/HTMLFrameElementBase.cpp:
1976 (WebCore::HTMLFrameElementBase::insertedInto):
1977 (WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1978 (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1979 * html/HTMLFrameElementBase.h:
1980 * html/HTMLScriptElement.cpp:
1981 (WebCore::HTMLScriptElement::insertedInto):
1982 (WebCore::HTMLScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1983 (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1984 * html/HTMLScriptElement.h:
1985 * svg/SVGFEImageElement.cpp:
1986 (WebCore::SVGFEImageElement::insertedInto):
1987 (WebCore::SVGFEImageElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1988 (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1989 * svg/SVGFEImageElement.h:
1990 * svg/SVGMPathElement.cpp:
1991 (WebCore::SVGMPathElement::insertedInto):
1992 (WebCore::SVGMPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1993 (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1994 * svg/SVGMPathElement.h:
1995 * svg/SVGScriptElement.cpp:
1996 (WebCore::SVGScriptElement::insertedInto):
1997 (WebCore::SVGScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1998 (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1999 * svg/SVGScriptElement.h:
2000 * svg/SVGTRefElement.cpp:
2001 (WebCore::SVGTRefElement::insertedInto):
2002 (WebCore::SVGTRefElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
2003 (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
2004 * svg/SVGTRefElement.h:
2005 * svg/SVGTextPathElement.cpp:
2006 (WebCore::SVGTextPathElement::insertedInto):
2007 (WebCore::SVGTextPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
2008 (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
2009 * svg/SVGTextPathElement.h:
2010 * svg/animation/SVGSMILElement.cpp:
2011 (WebCore::SVGSMILElement::insertedInto):
2012 (WebCore::SVGSMILElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
2013 (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
2014 * svg/animation/SVGSMILElement.h:
2016 2015-06-21 Philip Chimento <philip.chimento@gmail.com>
2018 libwebkit2gtk fails to link without opengl
2019 https://bugs.webkit.org/show_bug.cgi?id=138332
2021 Reviewed by Carlos Garcia Campos.
2023 * CMakeLists.txt: The third-party ANGLE directories need to be
2024 included even if ENABLE(GRAPHICS_CONTEXT_3D) is false. They must
2025 be included after the OpenGL headers as the comment says.
2026 * platform/graphics/texmap/BitmapTexturePool.cpp: Remove
2027 reference to no longer existent header file.
2029 2015-06-20 Tim Horton <timothy_horton@apple.com>
2031 Deselection of text causes a noticeable jump on force touch machines
2032 https://bugs.webkit.org/show_bug.cgi?id=146173
2033 <rdar://problem/20992842>
2035 Reviewed by Sam Weinig.
2037 When we have a TextIndicator of type Crossfade, we end up putting
2038 a layer with the blue highlight + text painted into it on top of the
2039 content, and cross-fading that layer to the yellow-highlighted text.
2041 This is necessary for BounceAndCrossfade TextIndicators, because the
2042 blue highlight has to bounce, but is not necessary for Crossfade-only
2043 ones; we can just fade in the yellow highlight on top of the
2044 existing blue page highlight, and all is well.
2046 So, get rid of the Crossfade TextIndicator type and use FadeIn, separately
2047 keeping track of whether or not we can add a margin (we still can't
2048 add a margin to TextIndicators that indicate the page's current selection,
2049 because the blue highlight cannot have the margin applied to it, and we
2050 want the bounds to match exactly).
2052 * page/TextIndicator.cpp:
2053 (WebCore::TextIndicator::createWithRange):
2054 If the range is the same as the selection, turn off the margin.
2055 We were previously doing this based on the presentation transition, but now
2056 there's no difference in presentation transition in this case.
2058 (WebCore::TextIndicator::createWithSelectionInFrame):
2059 (WebCore::TextIndicator::wantsBounce):
2060 (WebCore::TextIndicator::wantsContentCrossfade):
2061 (WebCore::TextIndicator::wantsFadeIn):
2062 (WebCore::TextIndicator::wantsManualAnimation):
2063 * page/TextIndicator.h:
2064 Get rid of TextIndicatorPresentationTransition::Crossfade.
2066 (WebCore::TextIndicator::setWantsMargin):
2067 (WebCore::TextIndicator::wantsMargin):
2068 Keep track of whether we want a margin.
2070 * page/mac/TextIndicatorWindow.mm:
2071 (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
2072 Determine if we should use a margin based on wantsMargin instead of the
2073 presentation transition.
2075 2015-06-20 Ryuan Choi <ryuan.choi@navercorp.com>
2077 [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
2078 https://bugs.webkit.org/show_bug.cgi?id=146171
2080 Reviewed by Gyuyoung Kim.
2082 * platform/efl/EflInspectorUtilities.cpp:
2083 (WebCore::inspectorResourcePath): Only used WEB_INSPECTOR_DIR which CMake decides properly.
2085 2015-06-19 Michael Catanzaro <mcatanzaro@igalia.com>
2087 Fix absolute value warning in LocalizedStringsGtk.cpp
2088 https://bugs.webkit.org/show_bug.cgi?id=145919
2090 Reviewed by Martin Robinson.
2092 Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
2093 warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
2096 * platform/gtk/LocalizedStringsGtk.cpp:
2097 (WebCore::localizedMediaTimeDescription):
2099 2015-06-19 Devin Rousso <drousso@apple.com>
2101 Web Inspector: Highlight currently edited CSS selector
2102 https://bugs.webkit.org/show_bug.cgi?id=145658
2104 Reviewed by Joseph Pecoraro.
2106 Test: inspector/dom/highlight-multiple-shapes.html
2108 * inspector/InspectorController.cpp:
2109 (WebCore::InspectorController::buildObjectForHighlightedNode):
2110 * inspector/InspectorController.h:
2111 * inspector/InspectorDOMAgent.cpp:
2112 (WebCore::InspectorDOMAgent::highlightSelector): Gets a list of all nodes matching a given selector string and highlights each of them.
2113 * inspector/InspectorDOMAgent.h:
2114 * inspector/InspectorOverlay.cpp:
2115 (WebCore::InspectorOverlay::hideHighlight):
2116 (WebCore::InspectorOverlay::highlightNodeList): Loops through a given NodeList to create highlightObjects for each of them.
2117 (WebCore::InspectorOverlay::shouldShowOverlay):
2118 (WebCore::buildObjectForElementData): Don't show flow fragments when highlighting multiple nodes.
2119 (WebCore::InspectorOverlay::buildHighlightObjectForNode):
2120 (WebCore::InspectorOverlay::buildObjectForHighlightedNode): Now returns an array containing the highlightObject for each highligthed node.
2121 (WebCore::InspectorOverlay::drawNodeHighlight): Now sends an array to the InspectorOverlayPage.js to provide support for highlighting multiple nodes.
2122 * inspector/InspectorOverlay.h:
2123 * inspector/InspectorOverlayPage.js: Now expects an array as its parameter and loops through it to highlight each node given.
2124 If the parameter array contains more than one element, do not draw the textbox containing info on that node.
2125 (drawNodeHighlight):
2127 2015-06-19 Joseph Pecoraro <pecoraro@apple.com>
2129 Crash under WebCore::PageConsoleClient::addMessage attempting to log insecure content message in ImageDocument
2130 https://bugs.webkit.org/show_bug.cgi?id=146096
2132 Reviewed by Timothy Hatcher.
2134 Was able to reproduce this using a user stylesheet with an http css font
2135 on a pdf (ImageDocument) main document loaded over https. Was unable to
2136 create a reliable test for this scenario.
2138 * page/PageConsoleClient.cpp:
2139 (WebCore::getParserLocationForConsoleMessage):
2140 The scriptableDocumentParser could be null, such as in an ImageDocument.
2142 2015-06-19 Dean Jackson <dino@apple.com>
2144 Extremely large canvas crashes on pre-El Capitan machines
2145 https://bugs.webkit.org/show_bug.cgi?id=146169
2146 <rdar://problem/21410046>
2148 Reviewed by Tim Horton.
2150 On machines before El Capitan, make the maximum canvas size
2153 Covered by existing tests.
2155 * html/HTMLCanvasElement.cpp:
2157 2015-06-19 Tim Horton <timothy_horton@apple.com>
2159 Selection services cannot be invoked when force click is enabled
2160 https://bugs.webkit.org/show_bug.cgi?id=146166
2161 <rdar://problem/21468362>
2163 Reviewed by Darin Adler.
2165 * page/mac/ServicesOverlayController.h:
2166 Turn Highlight::Type into something we can use for dirty flags.
2168 * page/mac/ServicesOverlayController.mm:
2169 (WebCore::ServicesOverlayController::Highlight::createForSelection):
2170 (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
2171 (WebCore::ServicesOverlayController::ServicesOverlayController):
2172 (WebCore::ServicesOverlayController::selectionRectsDidChange):
2173 (WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
2174 (WebCore::ServicesOverlayController::invalidateHighlightsOfType):
2175 (WebCore::ServicesOverlayController::buildPotentialHighlightsIfNeeded):
2176 (WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
2177 (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
2178 (WebCore::ServicesOverlayController::buildSelectionHighlight):
2179 (WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
2180 (WebCore::ServicesOverlayController::determineActiveHighlight):
2181 (WebCore::ServicesOverlayController::didScrollFrame):
2182 (WebCore::ServicesOverlayController::handleClick):
2183 Coalesce highlight rebuilding so that things (like TextIndicator creation)
2184 that change the selection and then reset it immediately don't cause us
2185 to lose the active highlight.
2187 This also means that if the selection changes multiple times in a runloop
2188 (easily possible from script), we won't waste a lot of time rebuilding highlights.
2190 (WebCore::ServicesOverlayController::didRebuildPotentialHighlights):
2191 Merged into buildPotentialHighlightsIfNeeded.
2193 2015-06-19 Matt Baker <mattbaker@apple.com>
2195 Web Inspector: TimelineAgent needs to handle nested runloops
2196 https://bugs.webkit.org/show_bug.cgi?id=145090
2198 Reviewed by Joseph Pecoraro.
2200 Previously nested run loops caused InspectorTimelineAgent to prematurely pop the current run loop record. This
2201 patch adds a counter to track the run loop nesting level, and rendering frame records are only pushed/popped
2202 when the nesting level is zero. Run loop entry/exit notifications received while the debugger is paused do not
2203 affect the nesting level.
2205 * inspector/InspectorTimelineAgent.cpp:
2206 (WebCore::InspectorTimelineAgent::internalStart):
2207 (WebCore::InspectorTimelineAgent::internalStop):
2208 (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2209 * inspector/InspectorTimelineAgent.h:
2211 2015-06-19 Brent Fulgham <bfulgham@apple.com>
2213 Follow-up fix to r185766.
2214 https://bugs.webkit.org/show_bug.cgi?id=22132
2216 Reviewed by Zalan Bujtas.
2218 Suggested by Darin Adler in the bug.
2220 * platform/graphics/filters/FETile.cpp:
2221 (WebCore::FETile::platformApplySoftware): Use WTF::move when passing
2222 the new tileImageCopy RefPtr.
2224 2015-06-19 Michael Catanzaro <mcatanzaro@igalia.com>
2226 [SOUP] Fix return-type-c-linkage warning after r185553
2227 https://bugs.webkit.org/show_bug.cgi?id=146014
2229 Reviewed by Martin Robinson.
2231 * platform/network/soup/WebKitSoupRequestGeneric.cpp:
2232 (webkitSoupRequestGenericGetRequest): Return a pointer rather than a reference.
2233 * platform/network/soup/WebKitSoupRequestGeneric.h: webkitSoupRequestGenericGetRequest now
2234 returns a pointer rather than a reference.
2236 2015-06-19 Dean Jackson <dino@apple.com>
2238 Played <audio> looks invisible against the gray background
2239 https://bugs.webkit.org/show_bug.cgi?id=146164
2240 <rdar://problem/21014284>
2242 Reviewed by Brent Fulgham.
2244 The plus-darker blend mode was not allowing any white to
2245 show through in the rendering. We don't need this for
2246 audio controls, where we draw on an opaque grey background.
2248 * Modules/mediacontrols/mediaControlsiOS.css:
2249 (audio::-webkit-media-controls-panel): Darken the color of the controls a
2250 little to make white stand out more.
2251 (audio::-webkit-media-controls-timeline): Remove the plus-darker blending.
2252 (video::-webkit-media-controls-timeline): Apply blending only to video.
2254 2015-06-19 Andy Estes <aestes@apple.com>
2256 Various assertion failures occur when executing script in the midst of DOM insertion
2257 https://bugs.webkit.org/show_bug.cgi?id=132482
2259 Reviewed by Darin Adler.
2261 Prior to this change, when an element containing a <script> child was inserted into a document, the script was
2262 executed in ScriptElement::insertedInto(). That script can access nodes that follow it in the newly-inserted
2263 hierarchy but are not yet fully inserted, leading to at least the following problems:
2265 - The script could remove a node that is not yet marked as in the document.
2266 - The script could remove a named <map> that has yet to be added to TreeScope::m_imageMapsByName.
2267 - The script could remove a form control that has yet to be added to FormController::m_formElementsWithState.
2269 These scenarios all result in assertion failures. This change ensures that each node in the newly-inserted
2270 hierarchy is fully inserted before executing any scripts.
2272 Tests: fast/dom/element-removed-while-inserting-parent-crash.html
2273 fast/dom/named-map-removed-while-inserting-parent-crash.html
2274 fast/forms/form-control-removed-while-inserting-parent-crash.html
2275 svg/dom/element-removed-while-inserting-parent-crash.html
2277 * dom/ScriptElement.cpp:
2278 (WebCore::ScriptElement::shouldNotifySubtreeInsertions): Renamed from insertedInto().
2279 Returned true in the case where insertedInto() would've called prepareScript().
2280 (WebCore::ScriptElement::didNotifySubtreeInsertions): Called prepareScript().
2281 (WebCore::ScriptElement::insertedInto): Renamed to shouldNotifySubtreeInsertions().
2282 * dom/ScriptElement.h:
2283 * html/HTMLScriptElement.cpp:
2284 (WebCore::HTMLScriptElement::insertedInto): If shouldNotifySubtreeInsertions() is true, returned InsertionShouldCallDidNotifySubtreeInsertions.
2285 Otherwise, returned InsertionDone.
2286 (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
2287 * html/HTMLScriptElement.h:
2288 * svg/SVGScriptElement.cpp:
2289 (WebCore::SVGScriptElement::insertedInto): Did the same as HTMLScriptElement::insertedInto().
2290 (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
2291 * svg/SVGScriptElement.h:
2293 2015-06-19 Brent Fulgham <bfulgham@apple.com>
2295 All calls of ImageBuffer::create should null check the return value
2296 https://bugs.webkit.org/show_bug.cgi?id=22132
2298 Reviewed by Zalan Bujtas.
2300 ImageBuffer::create returns nullptr for a number of reasons, and should be
2301 expected to do so. We missed this check in a few places, resulting in
2302 crashes on some systems. Likewise, ImageBuffer::copyImage may return nullptr
2303 in normal use and should be checked.
2305 * platform/graphics/BitmapImage.cpp:
2306 (WebCore::BitmapImage::drawPattern): Add nullptr check for create and copyImage. Remove
2307 extra call to 'setImageObserver'.
2308 * platform/graphics/cairo/ImageBufferCairo.cpp:
2309 (WebCore::ImageBuffer::drawPattern): Add nullptr check for copyImage.
2310 * platform/graphics/cg/ImageBufferCG.cpp:
2311 (WebCore::ImageBuffer::drawPattern): Add nullptr checks for copyImage.
2312 * platform/graphics/filters/FETile.cpp:
2313 (WebCore::FETile::platformApplySoftware): Add nullptr check for copyImage.
2314 * platform/graphics/filters/FilterEffect.cpp:
2315 (WebCore::FilterEffect::asImageBuffer): Add nullptr check for create.
2316 (WebCore::FilterEffect::openCLImageToImageBuffer): Ditto.
2317 * platform/graphics/texmap/BitmapTexture.cpp:
2318 (WebCore::BitmapTexture::updateContents): Add nullptr checks for create and copyImage.
2319 * svg/graphics/SVGImage.cpp:
2320 (WebCore::SVGImage::drawPatternForContainer): Add nullptr check for copyImage.
2322 2015-06-19 Jeremy Jones <jeremyj@apple.com>
2324 Get CAContext directly for CALayer instead of walking the layer tree.
2325 https://bugs.webkit.org/show_bug.cgi?id=146138
2326 <rdar://problem/21455974>
2328 Reviewed by Darin Adler.
2330 This will get the context directly from the CALayer instead of getting all CAContexts, walking the layer tree
2331 to the root and comparing that against each CAContext's root layer.
2333 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2334 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
2336 2015-06-18 Brent Fulgham <bfulgham@apple.com>
2338 [iOS] scrollIntoViewIfNeeded is not working with scroll-snap points
2339 https://bugs.webkit.org/show_bug.cgi?id=145318
2340 <rdar://problem/21081501>
2342 Reviewed by Simon Fraser.
2344 Use the ScrollController in iOS to track the scroll snap point state.
2345 We do not need the animation implementation or timers since the actual
2346 animation is handled by UIKit.
2348 This change lets us communicate the current offset into the scroll snap
2349 offset vector between the WebProcess and RemoteScrollingTree so that
2350 both sides stay in sync regardless of whether user gestures or style
2351 updates have caused us to shift to a different snap point.
2353 * page/scrolling/AsyncScrollingCoordinator.cpp:
2354 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Set the
2355 current horizontal and vertical scroll snap offset indices.
2356 (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Ditto.
2357 * page/scrolling/AsyncScrollingCoordinator.h: Mark the setActiveScrollSnapIndices
2358 for export so that it can be reached by the UIProcess.
2359 * page/scrolling/ScrollingCoordinator.h: Keep track of horizontal and
2360 vertical scroll snap offset indices.
2361 * page/scrolling/ScrollingStateScrollingNode.cpp:
2362 (WebCore::ScrollingStateScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
2363 (WebCore::ScrollingStateScrollingNode::setCurrentVerticalSnapPointIndex): Added.
2364 * page/scrolling/ScrollingStateScrollingNode.h:
2365 (WebCore::ScrollingStateScrollingNode::currentHorizontalSnapPointIndex): Added.
2366 (WebCore::ScrollingStateScrollingNode::currentVerticalSnapPointIndex): Added.
2367 * page/scrolling/ScrollingTree.h:
2368 * page/scrolling/ScrollingTreeScrollingNode.cpp:
2369 (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): Update the scroll snap
2370 point offset indices if either has changed.
2371 * page/scrolling/ScrollingTreeScrollingNode.h:
2372 (WebCore::ScrollingTreeScrollingNode::currentHorizontalSnapPointIndex): Added.
2373 (WebCore::ScrollingTreeScrollingNode::currentVerticalSnapPointIndex): Added.
2374 (WebCore::ScrollingTreeScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
2375 (WebCore::ScrollingTreeScrollingNode::setCurrentVerticalSnapPointIndex): Added.
2376 * page/scrolling/ThreadedScrollingTree.cpp:
2377 (WebCore::ThreadedScrollingTree::currentSnapPointIndicesDidChange): New method
2378 to handle notifications about scroll snap index changes from the UIProcess.
2379 * page/scrolling/ThreadedScrollingTree.h:
2380 * page/scrolling/ios/ScrollingTreeIOS.cpp:
2381 (WebCore::ScrollingTreeIOS::currentSnapPointIndicesDidChange): New method
2382 to handle notifications about scroll snap index changes from the UIProcess.
2383 * page/scrolling/ios/ScrollingTreeIOS.h:
2384 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2385 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Update scroll
2386 snap point current offset indices if they have changed.
2387 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Remove unneeded
2388 PLATFORM(MAC) macro.
2389 * platform/ScrollAnimator.cpp:
2390 (WebCore::ScrollAnimator::ScrollAnimator): We have a ScrollController if we are
2391 supporting scroll snap points or rubber banding.
2392 (WebCore::ScrollAnimator::processWheelEventForScrollSnap): This method is not needed
2394 (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): Enable this on iOS.
2395 (WebCore::ScrollAnimator::updateScrollSnapState): Renamed from 'updateScrollAnimatorsAndTimers'
2397 (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Deleted.
2398 * platform/ScrollAnimator.h: Enable some scroll snap methods on iOS.
2399 * platform/ScrollableArea.cpp:
2400 (WebCore::ScrollableArea::handleWheelEvent): Enable scroll snap index bookkeeping on iOS, too.
2401 (WebCore::ScrollableArea::updateScrollSnapState): Revise to call 'updateScrollSnapState' instead
2402 of 'updateScrollAnimatorsAndTimers'.
2403 * platform/cocoa/ScrollController.h: Enable some methods on iOS. Reorder methods to
2404 reduce the number of macros needed to do so.
2405 * platform/cocoa/ScrollController.mm:
2406 (systemUptime): Only build for Mac.
2407 (WebCore::ScrollController::ScrollController): Disable rubber band-specific members on iOS.
2408 (WebCore::ScrollController::handleWheelEvent): Only build this on Mac.
2409 (WebCore::ScrollController::isRubberBandInProgress): Always return 'false' on iOS.
2410 (WebCore::ScrollController::startSnapRubberbandTimer): Only build this on Mac.
2411 (WebCore::ScrollController::shouldRubberBandInHorizontalDirection): Ditto.
2412 (WebCore::ScrollController::scrollSnapPointState): Enable on iOS.
2413 (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Only build on Mac.
2414 (WebCore::ScrollController::updateScrollSnapState): renamed from 'updateScrollAnimatorsAndTimers'
2415 (WebCore::ScrollController::startScrollSnapTimer): Only build on Mac.
2416 (WebCore::ScrollController::initializeGlideParameters): Ditto.
2417 (WebCore::ScrollController::activeScrollSnapIndexForAxis): Enable on iOS.
2418 (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset): Ditto.
2419 (WebCore::ScrollController::beginScrollSnapAnimation): Only build on Mac.
2420 (WebCore::ScrollController::computeGlideDelta): Ditto.
2421 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Deleted.
2422 * rendering/RenderLayerCompositor.cpp:
2423 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Capture any changes in scroll
2424 snap offset indices.
2426 2015-06-19 Jeremy Jones <jeremyj@apple.com>
2428 Fullscreen view should not update bounds of video when in PiP.
2429 https://bugs.webkit.org/show_bug.cgi?id=146134
2431 Reviewed by Darin Adler.
2433 Don't update bounds on video layer when it is not a child.
2435 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2436 (-[WebAVVideoLayer setBounds:]):
2438 2015-06-19 Zalan Bujtas <zalan@apple.com>
2440 RenderRubyText requires RenderRubyRun parent.
2441 https://bugs.webkit.org/show_bug.cgi?id=146148
2442 rdar://problem/21423319
2444 Reviewed by Simon Fraser.
2446 RenderRubyText expects its parent to be RenderRubyRun and since a
2447 a non-block <rt> requires anonymous wrapper, we should check whether
2448 the display type is actually block.
2450 Test: fast/ruby/crash-when-ruby-rt-is-non-block.html
2452 * html/RubyTextElement.cpp:
2453 (WebCore::RubyTextElement::createElementRenderer):
2455 2015-06-19 Jeremy Jones <jeremyj@apple.com>
2457 cancelPreviousPerformRequestsWithTarget for -resolveBounds in wrong class.
2458 https://bugs.webkit.org/show_bug.cgi?id=146140
2460 Reviewed by Eric Carlson.
2462 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2463 (-[WebCALayerHostWrapper dealloc]): Added.
2464 (-[WebAVVideoLayer dealloc]): Deleted.
2466 2015-06-19 Per Arne Vollan <peavo@outlook.com>
2468 [WinCairo] Null pointer crash in BitmapTexture::updateContents.
2469 https://bugs.webkit.org/show_bug.cgi?id=146147
2471 Reviewed by Brent Fulgham.
2473 Added null pointer check.
2475 * platform/graphics/texmap/BitmapTexture.cpp:
2476 (WebCore::BitmapTexture::updateContents):
2478 2015-06-19 Anders Carlsson <andersca@apple.com>
2480 Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
2481 https://bugs.webkit.org/show_bug.cgi?id=146124
2482 rdar://problem/21449395
2484 Reviewed by Geoffrey Garen.
2486 * platform/spi/cg/CoreGraphicsSPI.h:
2488 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
2490 Remove unnecessary svn:executable flags
2491 https://bugs.webkit.org/show_bug.cgi?id=146107
2493 Reviewed by Alexey Proskuryakov.
2495 * html/canvas/CanvasRenderingContext2D.cpp: Removed property svn:executable.
2496 * mathml/MathMLMencloseElement.cpp: Removed property svn:executable.
2497 * mathml/MathMLMencloseElement.h: Removed property svn:executable.
2498 * platform/efl/RenderThemeEfl.cpp: Removed property svn:executable.
2499 * rendering/mathml/RenderMathMLMenclose.cpp: Removed property svn:executable.
2500 * rendering/mathml/RenderMathMLMenclose.h: Removed property svn:executable.
2502 2015-06-19 Youenn Fablet <youenn.fablet@crf.canon.fr>
2504 Bindings generator should generate code to catch exception and reject promises for Promise-based APIs
2505 https://bugs.webkit.org/show_bug.cgi?id=146060
2507 Reviewed by Darin Adler.
2509 The binding generator splits the function that binds JS to the DOM class implementation in two for functions returning promise.
2510 The first function, called from JS, is responsible of casting this to the expected JSXXX class.
2511 If casting fails, an exception is raised. Otherwise, it calls the second function.
2512 After calling the second function, it checks whether an exception is raised, in which case it returns a rejected promise.
2513 The second function is responsible of argument conversion and calling the DOM class function.
2515 Covered by expectations and AudioContext promise still working.
2516 A test case is added for a promise returning function taking a typed argument as input (if argument value cannot be typed, the promise is rejected).
2517 A second test case is a promise-returning function that can raise an exception. In that case the DOMException is used as rejection value.
2519 As can be seen from generated code, this generalized code adds a mandatory check (is there an exception?) at the end of the function.
2520 This check is done even in cases we know there will be no exception.
2521 This may be covered by another patch if this optimization is thought useful enough.
2523 * bindings/js/JSDOMPromise.cpp:
2524 (WebCore::rejectPromiseWithExceptionIfAny): Utility method for the binding code.
2525 (WebCore::callPromiseFunction): Ditto.
2526 * bindings/js/JSDOMPromise.h:
2527 * bindings/scripts/CodeGeneratorJS.pm:
2528 (GenerateImplementation):
2529 (GenerateFunctionCastedThis): Extracted from GenerateImplementationFunctionCall to reuse it in case of promise-returning functions.
2530 (GenerateImplementationFunctionCall):
2531 (GenerateCallbackImplementation): Deleted.
2532 * bindings/scripts/test/JS/JSTestObj.cpp:
2533 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
2534 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
2535 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
2536 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
2537 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
2538 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
2539 * bindings/scripts/test/TestObj.idl:
2541 2015-06-18 Jeremy Jones <jeremyj@apple.com>
2543 Disable UIWindow for fullscreen video for selected clients.
2544 https://bugs.webkit.org/show_bug.cgi?id=145852
2546 Reviewed by Simon Fraser.
2548 Disable UIWindow for fullscreen video doesn't work everywhere (rdar://problem/21315993), so just disable it when creating a UIWindow won't work.
2549 Fix some interface hiding and layout problems that showed up in the non UIWindow code path.
2551 * platform/RuntimeApplicationChecksIOS.h:
2552 * platform/RuntimeApplicationChecksIOS.mm: Remove iAD bundle identifier.
2553 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2554 (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Opt out of UIWindow when hosted in another process. And fix view parenting for non-window case.
2555 (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Fix for AVKit exit fullscreen complaining about -needsLayout.
2557 (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
2558 (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
2559 (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen):
2560 (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen):
2561 (WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen):
2562 (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen):
2563 These hide and show the view controller where we hide and show the window.
2565 2015-06-18 Dean Jackson <dino@apple.com>
2567 Provide a way for web developers to draw a Theme-specific Wireless Playback icon
2568 https://bugs.webkit.org/show_bug.cgi?id=146123
2569 <rdar://problem/21119287>
2571 Reviewed by Simon Fraser.
2573 Implement a -webkit-named-image() CSS <image> generator that allows a site to
2574 request artwork by name and get the platform variant. At the moment
2575 we only support "wireless-playback" which returns a generic image everywhere
2576 but Cocoa platforms, where we render the AirPlay icon.
2578 In order to do this I added a ThemeCocoa to share any Theme code between
2581 Test: fast/css/named-icons.html
2583 * WebCore.xcodeproj/project.pbxproj: Add new files CSSNamedImageValue, NamedImageGeneratedImage and ThemeCocoa.
2585 * css/CSSImageGeneratorValue.cpp: Handle the new NamedImageClass in the switch statements for downcasting.
2586 (WebCore::CSSImageGeneratorValue::image):
2587 (WebCore::CSSImageGeneratorValue::isFixedSize):
2588 (WebCore::CSSImageGeneratorValue::isPending):
2589 (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
2591 * css/CSSNamedImageValue.cpp: New class. Just holds a name String.
2592 (WebCore::CSSNamedImageValue::customCSSText):
2593 (WebCore::CSSNamedImageValue::image):
2594 (WebCore::CSSNamedImageValue::equals):
2595 * css/CSSNamedImageValue.h:
2596 (WebCore::CSSNamedImageValue::create):
2597 (WebCore::CSSNamedImageValue::isFixedSize):
2598 (WebCore::CSSNamedImageValue::isPending):
2599 (WebCore::CSSNamedImageValue::CSSNamedImageValue):
2601 * css/CSSParser.cpp:
2602 (WebCore::CSSParser::isGeneratedImageValue): Allow "-webkit-named-image(".
2603 (WebCore::CSSParser::parseGeneratedImage): Call parseNamedImage if we hit named-icon.
2604 (WebCore::CSSParser::parseNamedImage): Parse the function looking for a CSS ident.
2607 * css/CSSValue.cpp: Handle NamedImageClass in the various switch statements.
2608 (WebCore::CSSValue::equals):
2609 (WebCore::CSSValue::cssText):
2610 (WebCore::CSSValue::destroy):
2612 (WebCore::CSSValue::isNamedImageValue): Helper to detect the correct CSSValue subclass.
2614 * platform/Theme.cpp:
2615 (WebCore::Theme::drawNamedImage): Draw a generic wireless playback icon.
2616 * platform/Theme.h: Add drawNamedImage.
2618 * platform/cocoa/ThemeCocoa.cpp: New shared base class for ThemeMac and ThemeIOS.
2619 (WebCore::fitContextToBox):
2620 (WebCore::ThemeCocoa::drawNamedImage): Draw an AirPlay icon for wireless playback.
2621 * platform/cocoa/ThemeCocoa.h:
2623 * platform/graphics/CrossfadeGeneratedImage.h: Drive-by removal of unnecessary forward class definition.
2625 * platform/graphics/ImageBuffer.h: Add NamedImageGeneratedImage as a friend class.
2627 * platform/graphics/NamedImageGeneratedImage.cpp: New class. Calls into the Theme to render the artwork.
2628 (WebCore::NamedImageGeneratedImage::NamedImageGeneratedImage):
2629 (WebCore::NamedImageGeneratedImage::draw):
2630 (WebCore::NamedImageGeneratedImage::drawPattern):
2631 * platform/graphics/NamedImageGeneratedImage.h:
2633 * platform/ios/ThemeIOS.h: Inherit from ThemeCocoa.
2634 * platform/mac/ThemeMac.h: Ditto.
2636 2015-06-18 KyungTae Kim <ktf.kim@samsung.com> and Myles C. Maxfield <mmaxfield@apple.com>
2638 [CSS3] Add support for the word-break:keep-all CSS property
2639 https://bugs.webkit.org/show_bug.cgi?id=123782
2641 Reviewed by Darin Adler.
2643 Add support for word-break:keep-all CSS property by CSS3 spec:
2644 http://www.w3.org/TR/2013/WD-css-text-3-20131010/#word-break-property
2646 Test: fast/text/word-break-keep-all.html
2648 * css/CSSParser.cpp:
2649 (WebCore::isValidKeywordPropertyAndValue):
2650 * css/CSSPrimitiveValueMappings.h:
2651 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2652 (WebCore::CSSPrimitiveValue::operator EWordBreak):
2653 * css/CSSValueKeywords.in:
2654 * rendering/RenderText.cpp:
2655 (WebCore::RenderText::computePreferredLogicalWidths):
2656 * rendering/break_lines.h:
2657 (WebCore::nextBreakablePositionKeepingAllWords):
2658 (WebCore::nextBreakablePositionKeepingAllWordsIgnoringNBSP):
2659 (WebCore::isBreakable):
2660 * rendering/line/BreakingContext.h:
2661 (WebCore::BreakingContext::handleText):
2662 (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
2663 * rendering/style/RenderStyleConstants.h:
2665 2015-06-18 Jon Lee <jonlee@apple.com>
2667 Update AVKit usage of pip
2668 https://bugs.webkit.org/show_bug.cgi?id=146095
2669 <rdar://problem/21386853>
2671 Reviewed by Eric Carlson.
2673 - Rename enum VideoFullscreenModeOptimized to VideoFullscreenModePictureInPicture
2674 - Rename MediaElementSession::allowsAlternateFullscreen to allowsPictureInPicture
2675 - Rename Settings::allowsAlternateFullscreen to allowsPictureInPictureMediaPlayback
2676 - Update AVKit calls and AVKitSPI.h
2677 - Rename WebVideoFullscreenInterfaceAVKit delegate functions and member variables
2679 * html/HTMLMediaElement.cpp:
2680 * html/HTMLVideoElement.cpp:
2681 * html/MediaElementSession.cpp:
2682 (WebCore::MediaElementSession::allowsPictureInPicture): Renamed.
2683 (WebCore::MediaElementSession::allowsAlternateFullscreen): Deleted.
2684 * html/MediaElementSession.h:
2685 * page/Settings.cpp:
2687 * platform/graphics/MediaPlayerEnums.h:
2688 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2689 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2690 * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove unused setIsOptimized.
2691 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2692 * platform/spi/cocoa/AVKitSPI.h: Remove unused typedef.
2693 * platform/spi/mac/AVFoundationSPI.h:
2695 2015-06-18 Jeremy Jones <jeremyj@apple.com>
2697 Fix crash when entering fullscreen during exit fullscreen animation.
2698 https://bugs.webkit.org/show_bug.cgi?id=146117
2700 Reviewed by Simon Fraser.
2702 Because enterFullscreen can be called during exitFullscreen animation, the exit fullscreen teardown
2703 should not imply a fullscreen state change on video element.
2705 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2706 (WebVideoFullscreenControllerContext::exitFullscreen): May be called from mainThread
2707 (-[WebVideoFullscreenController exitFullscreen]): May be called from mainThread
2708 * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2709 (WebVideoFullscreenModelVideoElement::setVideoElement):
2710 Changing associated video element does not imply fullscreen mode change.
2712 2015-06-18 Brian J. Burg <burg@cs.washington.edu>
2714 Web Inspector: improve generated types for objects passed to backend commands
2715 https://bugs.webkit.org/show_bug.cgi?id=146091
2717 Reviewed by Joseph Pecoraro.
2719 Update type signatures for backend command implementations. In a few cases, clean
2720 up relevant helper function signatures and copy data out of parameter objects where
2721 the code previously held onto a reference.
2723 No new tests, no behavior changed.
2725 * inspector/InspectorCSSAgent.cpp:
2726 (WebCore::computePseudoClassMask):
2727 (WebCore::InspectorCSSAgent::setStyleText):
2728 (WebCore::InspectorCSSAgent::setRuleSelector):
2729 (WebCore::InspectorCSSAgent::forcePseudoState):
2730 * inspector/InspectorCSSAgent.h:
2731 * inspector/InspectorDOMAgent.cpp:
2732 (WebCore::parseColor):
2733 (WebCore::parseConfigColor):
2734 (WebCore::parseQuad):
2735 (WebCore::InspectorDOMAgent::performSearch):
2736 (WebCore::InspectorDOMAgent::setSearchingForNode):
2737 (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
2738 (WebCore::InspectorDOMAgent::setInspectModeEnabled):
2739 (WebCore::InspectorDOMAgent::highlightRect):
2740 (WebCore::InspectorDOMAgent::highlightQuad):
2741 (WebCore::InspectorDOMAgent::innerHighlightQuad):
2742 (WebCore::InspectorDOMAgent::highlightNode):
2743 (WebCore::InspectorDOMAgent::highlightFrame):
2744 * inspector/InspectorDOMAgent.h:
2745 * inspector/InspectorDOMStorageAgent.cpp:
2746 (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2747 (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2748 (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2749 (WebCore::InspectorDOMStorageAgent::findStorageArea):
2750 * inspector/InspectorDOMStorageAgent.h:
2751 * inspector/InspectorIndexedDBAgent.cpp:
2752 (WebCore::InspectorIndexedDBAgent::requestData):
2753 * inspector/InspectorIndexedDBAgent.h:
2754 * inspector/InspectorReplayAgent.cpp:
2755 (WebCore::InspectorReplayAgent::replayToPosition):
2756 * inspector/InspectorReplayAgent.h:
2757 * inspector/InspectorResourceAgent.cpp:
2758 (WebCore::InspectorResourceAgent::willSendRequest):
2759 (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
2760 Clean up extraHTTPHeaders to copy header key/values out of the InspectorObject, rather
2761 than retaining the protocol object indefinitely. This matches the ownership scheme used
2764 * inspector/InspectorResourceAgent.h:
2765 * inspector/InspectorStyleSheet.h:
2766 (WebCore::InspectorCSSId::InspectorCSSId):
2767 * inspector/InspectorWorkerAgent.cpp:
2768 (WebCore::InspectorWorkerAgent::sendMessageToWorker):
2769 * inspector/InspectorWorkerAgent.h:
2771 2015-06-18 Anders Carlsson <andersca@apple.com>
2773 Remove shouldInterruptJavaScript
2774 https://bugs.webkit.org/show_bug.cgi?id=146118
2776 Reviewed by Antti Koivisto.
2778 The WebKit SPI methods for deciding whether JavaScript execution should be interrupted hasn't been used
2779 for many releases. Furthermore, they don't make sense in the multi-process architecture since it's still possible
2780 to interrupt execution (by closing the browser tab or window) from the UI process.
2782 * bindings/js/JSDOMWindowBase.cpp:
2783 (WebCore::JSDOMWindowBase::shouldInterruptScript):
2784 * loader/EmptyClients.h:
2786 (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
2788 * page/ChromeClient.h:
2790 2015-06-18 Benjamin Poulain <bpoulain@apple.com>
2792 [CSS JIT][ARMv7] The pseudo element early exit trashes r6
2793 https://bugs.webkit.org/show_bug.cgi?id=146078
2795 Reviewed by Alex Christensen.
2797 The pseudo element early failure runs before we generate the prologue.
2798 The reason is that we can often exit immediately on function entry, before
2799 we even touch any memory.
2801 On ARMv7, we don't have many spare registers so the MacroAssembler
2802 uses r6 as a scratch register and the client code is expected to save
2805 In the early failure case, we were not pushing r6 before using the MacroAssembler
2806 and its value could be trashed.
2808 This patch push the macro assembler registers separately from the prologue.
2810 For restoring the registers, a new function generateFunctionEnding() encapsulate
2811 the pop() and ret().
2813 * cssjit/SelectorCompiler.cpp:
2814 (WebCore::SelectorCompiler::SelectorCodeGenerator::pushMacroAssemblerRegisters):
2815 (WebCore::SelectorCompiler::SelectorCodeGenerator::popMacroAssemblerRegisters):
2816 (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2817 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
2818 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2820 * cssjit/StackAllocator.h:
2821 (WebCore::StackAllocator::operator=):
2822 We have a new case for the stack allocator: some stack changes are conditional
2823 at compile time instead of runtime. This is easy to deal with by overriding
2824 the stack if a path is not taken at compile time.
2826 2015-06-17 Conrad Shultz <conrad_shultz@apple.com>
2828 REGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
2829 https://bugs.webkit.org/show_bug.cgi?id=144399
2831 Reviewed by Darin Adler.
2833 Earlier work made the array of web-visible plug-ins dynamic, but allowed DOMPlugin (and, indirectly by extension,
2834 DOMMimeType) to continue keeping a reference to a plug-in in terms of an index into that array. This superficially
2835 appeared correct since DOMPlugin immutably holds onto a PluginData instance, which in turn immutably holds onto a
2836 Page instance. PluginStrategy::getWebVisiblePluginInfo() is passed this Page, which is used to determine the contents
2837 of the plugin array. The expectation was that keeping an index would still be safe since the Page is not changing,
2838 but this is not strictly correct since relevant attributes of the Page and/or the available plugins may still change.
2840 It's not entirely clear why the test failures are intermittent and occur only on certain configurations, but address
2841 them by eliminating the incorrect storage of indexes in favor of keeping copies of the relevant plugin info itself.
2843 * plugins/DOMMimeType.cpp:
2844 (WebCore::DOMMimeType::DOMMimeType):
2845 Instead of storing the MIME type index, retrieve and store the MIME class info and plugin info.
2846 (WebCore::DOMMimeType::type):
2847 Directly access the m_mimeClassInfo member.
2848 (WebCore::DOMMimeType::suffixes):
2850 (WebCore::DOMMimeType::description):
2852 (WebCore::DOMMimeType::enabledPlugin):
2853 Directly access the m_pluginInfo member.
2854 (WebCore::DOMMimeType::mimeClassInfo): Deleted.
2856 * plugins/DOMMimeType.h:
2857 Update member variables.
2859 * plugins/DOMPlugin.cpp:
2860 (WebCore::DOMPlugin::DOMPlugin):
2861 Instead of storing the plugin index, store the plugin info directly.
2862 (WebCore::DOMPlugin::name):
2863 Directly access m_pluginInfo.
2864 (WebCore::DOMPlugin::filename):
2866 (WebCore::DOMPlugin::description):
2868 (WebCore::DOMPlugin::length):
2870 (WebCore::DOMPlugin::item):
2871 Access m_pluginInfo directly; find the matching plug-in based on matching PluginInfo (for which an overloaded
2872 comparator is supplied below).
2873 (WebCore::DOMPlugin::pluginInfo): Deleted.
2875 * plugins/DOMPlugin.h:
2876 Update member variables.
2877 (WebCore::DOMPlugin::create):
2878 Accept a PluginInfo instead of a plugin index.
2880 * plugins/DOMPluginArray.cpp:
2881 (WebCore::DOMPluginArray::item):
2882 (WebCore::DOMPluginArray::namedItem):
2884 * plugins/PluginData.h:
2885 (WebCore::operator==):
2886 Added; compare PluginInfo structs on the basis of member equality.
2888 2015-06-17 Alex Christensen <achristensen@webkit.org>
2890 [Content Extensions] Log blocked loads to the WebInspector console
2891 https://bugs.webkit.org/show_bug.cgi?id=146089
2893 Reviewed by Joseph Pecoraro.
2895 * contentextensions/ContentExtensionsBackend.cpp:
2896 (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2897 (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
2898 Log which URLs are blocked and the URL of the page they are blocked from.
2900 2015-06-18 Joseph Pecoraro <pecoraro@apple.com>
2902 Crash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to log console message
2903 https://bugs.webkit.org/show_bug.cgi?id=146093
2905 Reviewed by Timothy Hatcher.
2907 * page/DOMWindow.cpp:
2908 (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
2909 The console could be null so null check its use.
2911 2015-06-18 Csaba Osztrogonác <ossy@webkit.org>
2913 Suppress null-conversion warnings in ANGLE
2914 https://bugs.webkit.org/show_bug.cgi?id=145125
2916 Reviewed by Alex Christensen.
2920 2015-06-18 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
2922 [Streams API] Implement ReadableStreamReader.releaseLock
2923 https://bugs.webkit.org/show_bug.cgi?id=145299
2925 Reviewed by Darin Adler.
2927 Covered by rebased tests.
2929 * Modules/streams/ReadableStream.cpp:
2930 (WebCore::ReadableStream::close): Moving some close code to newly added releaseReader.
2931 (WebCore::ReadableStream::releaseReader): Implements reader release and callbacks finalization.
2932 (WebCore::ReadableStream::changeStateToErrored): Calls releaseReader.
2933 * Modules/streams/ReadableStream.h:
2934 (WebCore::ReadableStream::hasReadPendingRequests): Added to enable reader.releaseLock throwing if read requests are pending.
2935 * Modules/streams/ReadableStreamReader.cpp:
2936 (WebCore::ReadableStreamReader::releaseLock): Implementation of releaseLock
2937 * Modules/streams/ReadableStreamReader.h:
2938 * Modules/streams/ReadableStreamReader.idl:
2939 (WebCore::releaseLock): Deleted.
2941 2015-06-18 Youenn Fablet <youenn.fablet@crf.canon.fr>
2943 GObject and ObjC bindings generator should not generate code for promise-based APIs
2944 https://bugs.webkit.org/show_bug.cgi?id=146059
2946 Reviewed by Darin Adler.
2948 Covered by rebased expectations.
2950 * bindings/scripts/CodeGeneratorGObject.pm:
2951 (SkipFunction): Disabling GObject DOM binding for functions returning promises.
2952 * bindings/scripts/CodeGeneratorObjC.pm:
2953 (SkipFunction): Disabling ObjC DOM binding for functions returning promises.
2954 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Rebasing expectation.
2955 (webkit_dom_test_obj_get_read_only_long_attr): Deleted.
2956 (webkit_dom_test_obj_get_read_only_string_attr): Deleted.
2957 * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Rebasing expectation.
2958 * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
2959 * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
2962 2015-06-17 Ryuan Choi <ryuan.choi@navercorp.com>
2964 [EFL] test_ewk2_context_url_scheme_register has been crashed since r185553
2965 https://bugs.webkit.org/show_bug.cgi?id=146075
2967 Reviewed by Carlos Garcia Campos.
2969 Since r185553, CustomProtocolManager sends StartLoading message to UIProcess
2970 with request of SoupGenericRequest instead of request itself.
2971 But, request of SoupGenericRequest is nullptr in EFL port because EFL port
2972 does not use m_initiatingPageID.
2974 This patch updates request of SoupGenericRequest although m_initiatingPageID is null.
2976 * platform/network/soup/ResourceRequestSoup.cpp:
2977 (WebCore::ResourceRequest::updateSoupRequest):
2979 2015-06-17 Daniel Bates <dabates@apple.com>
2981 Client may receive began editing callback for already focused text field
2982 https://bugs.webkit.org/show_bug.cgi?id=146074
2983 <rdar://problem/21293562>
2985 Reviewed by Darin Adler.
2987 Fixes an issue where the client would be notified that began editing in a text field
2988 for each programmatic DOM focus event dispatched at the text field regardless of
2989 whether the field was focused. The client should only be notified that began editing
2990 exactly once when a text field becomes focused (either programmatically or by user interaction).
2992 * html/TextFieldInputType.cpp:
2993 (WebCore::TextFieldInputType::forwardEvent): Move logic to dispatch editing began callback from here...
2994 (WebCore::TextFieldInputType::handleFocusEvent): to here. This function is called when the
2995 text field becomes newly focused.
2996 * html/TextFieldInputType.h:
2998 2015-06-17 Alex Christensen <achristensen@webkit.org>
3000 [Content Extensions] Fail to parse invalid arrays
3001 https://bugs.webkit.org/show_bug.cgi?id=146079
3002 rdar://problem/21422649
3004 Reviewed by Benjamin Poulain.
3006 Covered by new and corrected API tests.
3008 * contentextensions/ContentExtensionParser.cpp:
3009 (WebCore::ContentExtensions::loadTrigger):
3010 Fail to parse invalid arrays for if-domain, unless-domain, resource-type, and load-type arrays.
3012 2015-06-16 Jon Honeycutt <jhoneycutt@apple.com>
3014 Position::findParent() should take a reference
3015 https://bugs.webkit.org/show_bug.cgi?id=146038
3017 Reviewed by Darin Adler.
3020 (WebCore::Position::containerNode):
3021 (WebCore::Position::parentAnchoredEquivalent):
3022 Pass a reference; there is already a null check.
3023 (WebCore::Position::previous):
3024 Add a missing null check. Code below this expects that node is non-null.
3025 (WebCore::Position::next):
3027 (WebCore::Position::atStartOfTree):
3028 (WebCore::Position::atEndOfTree):
3030 (WebCore::Position::findParent):
3031 Changed to take a reference.
3036 2015-06-17 Brent Fulgham <bfulgham@apple.com>
3038 Overflow regions with scroll snap points are not reliably rubber banding
3039 https://bugs.webkit.org/show_bug.cgi?id=142522
3040 <rdar://problem/20100726>
3042 Reviewed by Darin Adler.
3044 When computing the target scroll destination, update the nearest snap point index
3045 and other bookkeeping, but keep the original gesture target if it would have taken
3046 us beyond either limit of the scroll container.
3048 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3049 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3050 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollExtents): Add new method
3051 to support client API.
3052 * platform/ScrollAnimator.cpp:
3053 (WebCore::ScrollAnimator::scrollExtents): Add new method to support client API.
3054 * platform/ScrollAnimator.h:
3055 * platform/cocoa/ScrollController.h:
3056 (WebCore::ScrollControllerClient::scrollExtents): Added new pure virtual method to API.
3057 * platform/cocoa/ScrollController.mm:
3058 (WebCore::ScrollController::beginScrollSnapAnimation): Hold onto original user gesture
3059 target, and use that instead of our nearest snap point if the gesture takes us past
3060 either extreme of the scroll container.
3062 2015-06-17 Tim Horton <timothy_horton@apple.com>
3064 Swipe gesture can get stuck, preventing scrolling and other gestures
3065 https://bugs.webkit.org/show_bug.cgi?id=146088
3066 <rdar://problem/16056087>
3068 Reviewed by Darin Adler.
3070 * WebCore.xcodeproj/project.pbxproj:
3071 * platform/spi/mac/NSEventSPI.h: Added.
3074 2015-06-16 Matt Rajca <mrajca@apple.com>
3076 MediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
3077 https://bugs.webkit.org/show_bug.cgi?id=146028
3079 Reviewed by Darin Adler.
3081 * Modules/mediasession/MediaRemoteControls.idl: Added nexttrack/previoustrack event handlers.
3082 * Modules/mediasession/MediaSession.cpp: Dispatch the nexttrack/previoustrack events.
3083 (WebCore::MediaSession::skipToNextTrack):
3084 (WebCore::MediaSession::skipToPreviousTrack):
3085 * Modules/mediasession/MediaSession.h:
3086 * Modules/mediasession/MediaSessionManager.cpp: Skip to the next/previous track as described in the media session spec.
3087 (WebCore::MediaSessionManager::skipToNextTrack):
3088 (WebCore::MediaSessionManager::skipToPreviousTrack):
3089 * Modules/mediasession/MediaSessionManager.h:
3090 * dom/EventNames.h: Added the nexttrack/previoustrack event names.
3091 * page/Page.cpp: Tell MediaSessionManager to handle the new track-skipping events.
3092 (WebCore::Page::handleMediaEvent):
3094 2015-06-17 Chris Fleizach <cfleizach@apple.com>
3096 AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
3097 https://bugs.webkit.org/show_bug.cgi?id=146066
3099 Reviewed by Darin Adler.
3101 Allow the region role to identify as a landmark type.
3103 Updated test: platform/ios-simulator/accessibility/landmark-types.html
3105 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3106 (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
3108 2015-06-17 Simon Fraser <simon.fraser@apple.com>
3110 REGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field
3111 https://bugs.webkit.org/show_bug.cgi?id=146073
3112 rdar://problem/21022203
3114 Reviewed by Tim Horton.
3116 Text controls (text inputs and textareas) need backing store even when empty, because
3117 they need to be able to paint a caret.
3119 Test: compositing/backing/form-controls-backing.html
3121 * rendering/RenderLayerBacking.cpp:
3122 (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
3124 2015-06-17 Zalan Bujtas <zalan@apple.com>
3126 Selection cache produces invalid result when ancestor has float element.
3127 https://bugs.webkit.org/show_bug.cgi?id=146042
3128 rdar://problem/20604592
3130 Reviewed by Ryosuke Niwa.
3132 Selection cache already takes floats into account, however it's not enough to check current
3133 block against floats. Any of the ancestor's float starting from the selection root block
3134 can impact the selection offsets.
3136 Test: fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float.html
3138 * rendering/LogicalSelectionOffsetCaches.h:
3139 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo):
3140 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
3141 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::block):
3142 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::cache):
3143 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFlowThreads):
3144 (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
3146 2015-06-17 Joanmarie Diggs <jdiggs@igalia.com>
3148 AX: [ATK] Expose element tag name as an object attribute
3149 https://bugs.webkit.org/show_bug.cgi?id=146062
3151 Reviewed by Mario Sanchez Prada.
3153 Expose the element tag name as an object attribute with name "tag" and
3154 value being the lowercase tag name, both being what Gecko does for ATK.
3156 No new tests. We already have sufficient coverage for AtkObject attributes.
3157 These tests have been updated to reflect the addition of the new attribute.
3159 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3160 (webkitAccessibleGetAttributes):
3162 2015-06-17 Antti Koivisto <antti@apple.com>
3164 iOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock
3165 https://bugs.webkit.org/show_bug.cgi?id=146072
3166 rdar://problem/21149759
3168 Reviewed by Simon Fraser
3170 There are some scenarios where we end up drawing without web lock due to client or system issues.
3171 This can cause crashes.
3173 * platform/ios/LegacyTileLayer.mm:
3174 (-[LegacyTileLayer setNeedsDisplayInRect:]):
3175 (-[LegacyTileLayer drawInContext:]):
3177 Ensure we have the web lock when called in main thread (even though we should have it already).
3179 2015-06-17 Brent Fulgham <bfulgham@apple.com>
3181 CSS scroll snap: defining snap points on axis that does not scroll does not work properly
3182 https://bugs.webkit.org/show_bug.cgi?id=146043
3183 <rdar://problem/20125511>
3185 Reviewed by Simon Fraser.
3187 Tested by css3/scroll-snap/scroll-snap-mismatch.html
3189 We always seed the set of scroll snap points with the start and end of the scroll container. This is not
3190 the right behavior if there are no scroll points defined, because we end up creating a snap for the start
3191 and end of the container, and any scroll gesture just takes us across the entire element.
3193 Instead, when we do not find any scroll snap points, we should clear the snap point state for the container.
3195 * page/scrolling/AxisScrollSnapOffsets.cpp:
3196 (WebCore::updateFromStyle): If we did not find any snap points (i.e., the snapOffsets container
3197 only holds '0', return an empty Vector.
3198 (WebCore::updateSnapOffsetsForScrollableArea): If the set of snap points produced by 'updateFromStyle' is empty,
3199 clear the horizontal (or vertical) snap offsets for the scroll area.
3202 2015-06-17 Chris Fleizach <cfleizach@apple.com>
3204 AX: input role="spinbutton" gets skipped in voiceover
3205 https://bugs.webkit.org/show_bug.cgi?id=145514
3207 Reviewed by Mario Sanchez Prada.
3209 SpinButton role was added, but left out of iOS.
3210 To prevent this from happening again, explicitly list every role in the switch statement that
3211 determines accessible visibility.
3213 Test: platform/ios-simulator/accessibility/spinbutton.html
3215 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3216 (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
3217 (-[WebAccessibilityObjectWrapper isAccessibilityElement]):
3219 2015-06-17 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3221 [Streams API] ReadableJSStream should handle promises returned by JS source pull callback
3222 https://bugs.webkit.org/show_bug.cgi?id=145965
3224 Reviewed by Darin Adler.
3226 Implemented asynchronous pulling.
3227 In particular, ensuring that doPull is not called as long as previous call to doPull is finished.
3228 Storing whether to pull automatically when the current pull is finished.
3230 Covered by rebased tests.
3232 * Modules/streams/ReadableStream.cpp:
3233 (WebCore::ReadableStream::pull): stores whether to pull again.
3234 (WebCore::ReadableStream::finishPulling): called when pulling finishes.
3235 * Modules/streams/ReadableStream.h:
3236 * bindings/js/ReadableJSStream.cpp:
3237 (WebCore::createPullResultFulfilledFunction): The promise resolve callback.
3238 (WebCore::ReadableJSStream::doPull): Handling of promise.
3239 * bindings/js/ReadableJSStream.h:
3241 2015-06-16 Carlos Garcia Campos <cgarcia@igalia.com>
3243 WebProcess crashes after too many redirect error when there's an active NPAPI plugin
3244 https://bugs.webkit.org/show_bug.cgi?id=146019
3246 Reviewed by Darin Adler.
3248 This happens with the GTK+ port after a navigation action ends up
3249 in an infinite redirection and the ResourceHandle fails with too
3250 many redirections error. I should actually happen after any error
3251 is reported by the ResourceHnalder before the load is
3252 committed. But tt only happens if there's an active NPAPI
3253 plugin. The problem is that FrameLoader::receivedMainResourceError()
3254 is called recursively because DocumentLoader::stopLoading() ends up
3255 calling mainReceivedError() that calls FrameLoader::receivedMainResourceError()
3256 again. DocumentLoader::stopLoading() checks if the document is
3257 still loading, which can happen if the main resource is loading,
3258 if there's any subresource loading or if there's a plugin
3259 loading. So, in case of being loading, those cases are handled
3260 individually to cancel the main resource, or set an error in the
3261 document loader and cancel subresources and plugins, except for
3262 this case of plugins, that mainReceivedError is called instead of
3263 setting cancelled error on the document loader.
3265 * loader/DocumentLoader.cpp:
3266 (WebCore::DocumentLoader::stopLoading): If the document is still
3267 loading because there are active plugins, set the cancelled error
3268 on the document instead of calling mainReceivedError again.
3270 2015-06-16 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
3272 [Streams API] Implement ReadableStream locked property
3273 https://bugs.webkit.org/show_bug.cgi?id=146023
3275 Reviewed by Darin Adler.
3277 Covered by rebased tests.
3279 * Modules/streams/ReadableStream.h:
3280 (WebCore::ReadableStream::locked): Renamed isLocked by locked.
3281 * Modules/streams/ReadableStream.idl: Adding locked.
3282 * bindings/js/JSReadableStreamCustom.cpp:
3283 (WebCore::JSReadableStream::getReader): Using isLocked.
3284 * bindings/js/JSReadableStreamReaderCustom.cpp:
3285 (WebCore::constructJSReadableStreamReader): Using isLocked.
3287 2015-06-16 Myles C. Maxfield <mmaxfield@apple.com>
3289 REGRESSION(r184899): [Cocoa] font-variant: small-caps is not honored with web fonts
3290 https://bugs.webkit.org/show_bug.cgi?id=145873
3291 <rdar://problem/21314282>
3293 Reviewed by Dean Jackson.
3295 When font-variant: small-caps is applied, we create a smaller version of the original font
3296 and draw capital characters in that smaller font. CGFontRefs do not have an intrinsic size,
3297 and web fonts historically only had a CGFontRef, which means that there was no need to
3298 convert the CGFontRef to be smaller (as opposed to regular fonts, which had a CTFontRef and
3299 therefore needed the conversion). Instead, we just changed m_size, which represents
3300 the size that the text should be drawn in.
3302 However, r184899 gave CTFontRefs to web fonts. This means that now the FontPlatformData's
3303 m_size variable disagreed with the CTFontRef member. The solution here is to unify the web
3304 font and regular font codepaths, and treat them the same throughout.
3306 Note that this patch removes the last use of the m_isCustomFont variable. As soon as we
3307 entirely migrate to CORETEXT_WEB_FONTS, we should delete this variable.
3309 Test: fast/text/small-caps-web-font.html
3311 * platform/graphics/cocoa/FontCocoa.mm:
3312 (WebCore::Font::platformCreateScaledFont): Treat web fonts the same as regular fonts.
3313 * platform/text/TextFlags.h: Add a comment regarding teh deletion of m_isCustomFont.
3315 2015-06-16 Alex Christensen <achristensen@webkit.org>
3317 [Content Extensions] Implement branch compaction for DFA bytecode.
3318 https://bugs.webkit.org/show_bug.cgi?id=145619
3320 Reviewed by Benjamin Poulain.
3322 This patch adds another pass to the DFABytecodeCompiler which finds where the bytecode from each node
3323 would be if it were compiled with no branch compaction, then uses that as a worst-case value to determine
3324 how many bytes are needed to store the relative jump distance. Then when linking, it will fill in the
3325 value as it already did, but with a variable size jump. The jumps are also now signed distances relative to
3326 where the jump is stored.
3328 This patch is covered by existing tests, which have many jumps that are near the -128/127 byte boundary,
3329 and the switch from 16-bit jumps to 32-bit jumps near the -65536/65535 byte boundary is analogous.
3331 * contentextensions/ContentExtensionCompiler.cpp:
3332 (WebCore::ContentExtensions::compileRuleList):
3333 * contentextensions/DFABytecode.h:
3334 (WebCore::ContentExtensions::smallestPossibleJumpSize):
3335 (WebCore::ContentExtensions::instructionSizeWithArguments):
3336 * contentextensions/DFABytecodeCompiler.cpp:
3337 (WebCore::ContentExtensions::append):
3338 (WebCore::ContentExtensions::appendZeroes):
3339 (WebCore::ContentExtensions::setBits):
3340 (WebCore::ContentExtensions::appendActionBytecodeSize):
3341 (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
3342 (WebCore::ContentExtensions::DFABytecodeCompiler::longestPossibleJump):
3343 (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
3344 (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
3345 (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
3346 (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
3347 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
3348 (WebCore::ContentExtensions::DFABytecodeCompiler::compiledNodeMaxBytecodeSize):
3349 (WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
3350 (WebCore::ContentExtensions::DFABytecodeCompiler::checkForRangeMaxBytecodeSize):
3351 (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
3352 (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
3353 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
3354 (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
3355 (WebCore::ContentExtensions::set32Bits): Deleted.
3356 * contentextensions/DFABytecodeCompiler.h:
3357 * contentextensions/DFABytecodeInterpreter.cpp:
3358 (WebCore::ContentExtensions::getBits):
3359 (WebCore::ContentExtensions::getInstruction):
3360 (WebCore::ContentExtensions::jumpSizeInBytes):
3361 (WebCore::ContentExtensions::getJumpSize):
3362 (WebCore::ContentExtensions::getJumpDistance):
3363 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
3364 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
3365 (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
3366 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3367 * loader/ResourceLoadInfo.h:
3369 2015-06-16 Carlos Alberto Lopez Perez <clopez@igalia.com>
3371 [GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
3372 https://bugs.webkit.org/show_bug.cgi?id=145701
3374 Reviewed by Darin Adler.
3376 No new tests, no behavior changes.
3378 When building both targets, we have to include the wayland-egl
3379 headers in order to build the Wayland target. This causes that
3380 EGLNativePixmapType and EGLNativeWindowType get defined as
3381 different types than when building only the X11 target.
3383 By type casting them to the ones that are expected, we are able
3384 to build both targets at the same time.
3386 I have done tests (building each target alone as also both targets
3387 at the same time), and everything seems to works as expected.
3389 Once built for both targets, if you try to launch the MiniBrowser
3390 from inside a Wayland compositor (Weston on top of X for example),
3391 it will trigger the X11 target if the DISPLAY environment variable
3392 is set and the environment variable GDK_BACKEND is not set to wayland,
3393 otherwise it will trigger the Wayland target.
3395 * platform/graphics/GLContext.cpp:
3396 (WebCore::GLContext::createContextForWindow): Add type casts. We have
3397 to consider here two different type casts depending on the type of
3398 GLNativeWindowType to avoid a build failure on 32-bits platforms.
3399 The static_cast one was already beeing done as an implicit cast
3400 (from uint64_t to XID), the reinterpret_cast is the new one that
3401 we need to do only when building on both platforms.
3402 * platform/graphics/egl/GLContextEGL.cpp: Add missing include when
3403 building both targets that is required for defining DefaultRootWindow().
3404 (WebCore::GLContextEGL::createPixmapContext): Add type cast.
3406 2015-06-15 Jon Honeycutt <jhoneycutt@apple.com>
3408 [iOS] Crash long pressing on <input type=file>
3409 https://bugs.webkit.org/show_bug.cgi?id=146009
3410 <rdar://problem/21234453>
3412 Reviewed by Ryosuke Niwa.