[iOS] Using CSS viewport units causes incorrect layout.
[WebKit-https.git] / Source / WebCore / ChangeLog
index 80e9f0c..67f7c7d 100644 (file)
@@ -1,3 +1,270 @@
+2015-05-20  Enrica Casucci  <enrica@apple.com>
+
+        [iOS] Using CSS viewport units causes incorrect layout.
+        https://bugs.webkit.org/show_bug.cgi?id=145225
+        rdar://problem/20924495
+
+        Reviewed by Benjamin Poulain.
+
+        * page/ViewportConfiguration.cpp:
+        (WebCore::ViewportConfiguration::initialScaleFromSize):
+        (WebCore::ViewportConfiguration::initialScale):
+        (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize):
+        * page/ViewportConfiguration.h:
+        (WebCore::ViewportConfiguration::initialScaleFromSize):
+        (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize):
+
+2015-05-20  Chris Fleizach  <cfleizach@apple.com>
+
+        AX: improve list heuristics (presentational use versus actual lists)
+        https://bugs.webkit.org/show_bug.cgi?id=134187
+
+        Reviewed by Darin Adler.
+
+        Improve heuristics for list detection by:
+            1. Not exposing lists without list markers (unless explicitly marked as lists)
+            2. Recognizing css: before-content as list markers
+
+        Test: accessibility/list-detection2.html
+
+        * accessibility/AccessibilityList.cpp:
+        (WebCore::AccessibilityList::isDescriptionList):
+        (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
+        (WebCore::AccessibilityList::determineAccessibilityRole):
+        * accessibility/AccessibilityList.h:
+
+2015-05-20  Antti Koivisto  <antti@apple.com>
+
+        REGRESSION (r172591): Can no longer style <optgroup> with colors (LayoutTests/fast/forms/select/optgroup-rendering.html)
+        https://bugs.webkit.org/show_bug.cgi?id=145227
+        rdar://problem/20967472
+
+        Reviewed by Darin Adler.
+
+        Test: fast/forms/select/select-painting.html
+
+        Use computedStyle() consistently for option and optgroup items.
+
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::paintItemForeground):
+        (WebCore::RenderListBox::paintItemBackground):
+
+            We can always use computedStyle() and it can't be null. If there was renderer style it would return that.
+
+        * rendering/RenderMenuList.cpp:
+        (RenderMenuList::itemStyle):
+        (RenderMenuList::getItemBackgroundColor):
+
+2015-05-19  Jer Noble  <jer.noble@apple.com>
+
+        Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
+        https://bugs.webkit.org/show_bug.cgi?id=145193
+
+        Reviewed by Eric Carlson.
+
+        HTMLMediaElement.h and MediaPlayer.h are included in a number of headers solely for access to the enums
+        defined within the classes contained within. Move these enums into their own--otherwise empty--classes.
+        Then add `using` declarations to pull those inherited enums back into the namespace of HTMLMediaElement
+        and MediaPlayer.
+
+        Classes and headers which do not need to directly include HTMLMediaElement.h can now include HTMLMediaElementEnums.h
+        instead; the same goes for MediaPlayer.h and MediaPlayerEnums.h.
+
+        * WebCore.xcodeproj/project.pbxproj: Add new files to project.
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Move definition here from the header.
+        * html/HTMLMediaElement.h:
+        (WebCore::HTMLMediaElement::videoFullscreenGravity): MediaPlayer -> MediaPlayerEnums.
+        (WebCore::HTMLMediaElement::preloadValue): Ditto.
+        (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Deleted; moved to implementation file.
+        * html/HTMLMediaElementEnums.h: Added.
+        * html/MediaControllerInterface.h: Inherit from HTMLMediaElementEnums.
+        * page/ChromeClient.h: HTMLMediaElement -> HTMLMediaElementEnums.
+        * platform/graphics/MediaPlayer.h: MediaPlayer -> MediaPlayerEnums.
+        * platform/graphics/MediaPlayerEnums.h: Added.
+        * platform/ios/WebVideoFullscreenControllerAVKit.h:
+        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+        (-[WebVideoFullscreenController enterFullscreen:mode:]): HTMLMediaElement -> HTMLMediaElementEnums.
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::setMode): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::clearMode): Ditto.
+        * platform/ios/WebVideoFullscreenModel.h:
+        * platform/ios/WebVideoFullscreenModelVideoElement.h:
+        * platform/ios/WebVideoFullscreenModelVideoElement.mm:
+        (WebVideoFullscreenModelVideoElement::setVideoElement): Ditto.
+        (WebVideoFullscreenModelVideoElement::fullscreenModeChanged): Ditto.
+
+2015-05-20  Roger Fong  <roger_fong@apple.com>
+
+        Media Controls stop updating after hovering for a few seconds.
+        https://bugs.webkit.org/show_bug.cgi?id=144770.
+        <rdar://problem/19823121>
+
+        Reviewed by Jer Noble.
+
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.createBase):
+        We should never hide controls immediately as a result of mousing out of the controls.
+        It should only happen when the mouse leaves the video entirely.
+        (Controller.prototype.updateTimelineMetricsIfNeeded):
+        Don’t update if controls are hidden, timeline dimensions will be 0.
+        (Controller.prototype.handlePanelTransitionEnd): 
+        Instead of adjusting visibility via adding and removing classes,
+        remove controls entirely from the tree.
+        (Controller.prototype.showControls):
+        Add controls back into the tree when showing controls.
+        (Controller.prototype.updateForShowingControls):
+        Helper method for showControls.
+        (Controller.prototype.controlsAreHidden):
+        Controls also hidden if removed from tree.
+
+        Remove forceUpdate logic, no longer necessary.
+        (Controller.prototype.handleDurationChange): 
+        (Controller.prototype.updateProgress):
+        (Controller.prototype.updateTime):
+
+        Override methods to use add and remove panelContainer for iOS.
+        * Modules/mediacontrols/mediaControlsiOS.js:
+        (ControllerIOS.prototype.handlePanelTransitionEnd):
+        (ControllerIOS.prototype.showControls):
+        (ControllerIOS.prototype.controlsAreHidden):
+
+2015-05-20  Eric Carlson  <eric.carlson@apple.com>
+
+        [Mac] inform media session of all state changes
+        https://bugs.webkit.org/show_bug.cgi?id=145222
+
+        Reviewed by Dean Jackson.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::~HTMLMediaElement): Call updateMediaState.
+        (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Ditto.
+        (WebCore::HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable): Ditto.
+        (WebCore::HTMLMediaElement::removeEventListener): Ditto.
+        (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
+
+2015-05-20  Daniel Bates  <dabates@apple.com>
+
+        AX: AutoFill button is not accessible with VoiceOver
+        https://bugs.webkit.org/show_bug.cgi?id=145200
+        <rdar://problem/20507480>
+
+        Reviewed by Chris Fleizach.
+
+        Add ARIA label and role attributes to the AutoFill button markup so that VoiceOver
+        can identify and interact with it.
+
+        Test: accessibility/input-auto-fill-button.html
+
+        * English.lproj/Localizable.strings: Add placeholder localized string for AutoFill button.
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::createAutoFillButton): Add ARIA label and role attributes.
+        * platform/LocalizedStrings.cpp:
+        (WebCore::AXAutoFillButtonText): Added; returns the localized string for the AutoFill button.
+        * platform/LocalizedStrings.h:
+        * platform/efl/LocalizedStringsEfl.cpp:
+        (WebCore::AXAutoFillButtonText): Ditto.
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        (WebCore::AXAutoFillButtonText): Ditto.
+
+2015-05-20  Dean Jackson  <dino@apple.com>
+
+        Label text for default buttons don’t have the correct white color
+        https://bugs.webkit.org/show_bug.cgi?id=145221
+        <rdar://problem/20985817>
+
+        Reviewed by Tim Horton.
+
+        Use a 85% solid white for the active text color on buttons.
+
+        As has been disappointingly pointed out in other patches, we don't
+        have a good way to test ActiveButtonText since it only applies at
+        paint time.
+
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::systemColor): Move to an 85% solid white.
+
+2015-05-20  Alexey Proskuryakov  <ap@apple.com>
+
+        ThreadableLoaderOptions::isolatedCopy() doesn't produce a copy that is safe for sending to another thread
+        https://bugs.webkit.org/show_bug.cgi?id=145217
+
+        Reviewed by Anders Carlsson.
+
+        Caught by existing tests, rarely. I don't know how to catch such bugs more reliably.
+
+        * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoaderOptions::isolatedCopy):
+        * loader/ThreadableLoader.h:
+
+2015-05-20  Tim Horton  <timothy_horton@apple.com>
+
+        Add a mechanism to opt-out of the automatic scaling applied to not-really-responsive sites
+        https://bugs.webkit.org/show_bug.cgi?id=144760
+
+        Reviewed by Darin Adler.
+
+        Add a new viewport property, shrink-to-fit, which can be used to disable
+        the automatic scaling introduced in r181400. This provides sites with a
+        way to tell WebKit that they're really sure they want to be laid out at
+        window-width/height, even if they fail to fit within that size.
+
+        * dom/ViewportArguments.cpp:
+        (WebCore::ViewportArguments::resolve):
+        (WebCore::findBooleanValue):
+        (WebCore::setViewportFeature):
+        * dom/ViewportArguments.h:
+        (WebCore::ViewportArguments::ViewportArguments):
+        (WebCore::ViewportArguments::operator==):
+        * page/ViewportConfiguration.cpp:
+        (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
+        (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
+        (WebCore::ViewportConfiguration::webpageParameters):
+        (WebCore::ViewportConfiguration::textDocumentParameters):
+        (WebCore::ViewportConfiguration::imageDocumentParameters):
+        (WebCore::ViewportConfiguration::testingParameters):
+        (WebCore::booleanViewportArgumentIsSet):
+        (WebCore::ViewportConfiguration::updateConfiguration):
+        (WebCore::ViewportConfigurationTextStream::operator<<):
+        (WebCore::viewportArgumentUserZoomIsSet): Deleted.
+        * page/ViewportConfiguration.h:
+        (WebCore::ViewportConfiguration::Parameters::Parameters):
+        Plumb the shrink-to-fit viewport property through.
+        If shrink-to-fit is set to yes, or not set, we behave as usual; if it is
+        set to no, we will bail from shouldIgnore[Horizontal|Vertical]ScalingConstraints,
+        effectively disabling the automatic scaling introduced in r181400.
+
+2015-05-20  Antti Koivisto  <antti@apple.com>
+
+        Assertion failure in WebCore::BidiRun::BidiRun()
+        https://bugs.webkit.org/show_bug.cgi?id=145203
+        rdar://problem/20958973
+
+        Reviewed by Andreas Kling.
+
+        Test: fast/text/text-combine-crash.html
+
+        * rendering/line/BreakingContext.h:
+        (WebCore::BreakingContext::handleText):
+
+            Renove !isCombined() check. RenderCombineText::combineText() doesn't
+            do any work unless needed and text may become uncombined too.
+
+        * rendering/line/LineBreaker.cpp:
+        (WebCore::LineBreaker::skipLeadingWhitespace):
+
+            Same here.
+
 2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
 
         AudioContext resume/close/suspend should reject promises with a DOM exception in lieu of throwing exceptions