[iOS] Using CSS viewport units causes incorrect layout.
[WebKit-https.git] / Source / WebCore / ChangeLog
index 93416d8..67f7c7d 100644 (file)
@@ -1,3 +1,432 @@
+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
+        https://bugs.webkit.org/show_bug.cgi?id=145064
+
+        Reviewed by Darin Adler.
+
+        Rejecting resume/suspend/close promises with InvalidStateError values in case context is offline.
+        Removed unneeded calls to postTask for resolving/rejecting promises.
+        Adding promise rejection of DOM Exception values, 0 being equivalent of no error passed to reject callback.
+
+        Test: webaudio/audiocontext-promise-throwing.html
+
+        * Modules/webaudio/AudioContext.cpp:
+        (WebCore::AudioContext::suspendContext): Rejecting promise in lieu of throwing exception.
+        (WebCore::AudioContext::resumeContext): Ditto.
+        (WebCore::AudioContext::closeContext): Ditto.
+        * Modules/webaudio/AudioContext.h:
+        * bindings/js/JSAudioContextCustom.cpp:
+        (WebCore::JSAudioContext::suspend): Removing ExceptionCode handling.
+        (WebCore::JSAudioContext::resume): Ditto.
+        (WebCore::JSAudioContext::close): Ditto.
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::createDOMException): Splitting DOM exception creation from throwing.
+        (WebCore::setDOMException): Ditto.
+        * bindings/js/JSDOMBinding.h: Adding createDOMException prototype.
+        * bindings/js/JSDOMPromise.h:
+        (WebCore::DeferredWrapper::reject<ExceptionCode>):
+
+2015-05-20  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r184645.
+        https://bugs.webkit.org/show_bug.cgi?id=145220
+
+        Broken build (Requested by jacob_nielsen on #webkit).
+
+        Reverted changeset:
+
+        "AX: AutoFill button is not accessible with VoiceOver"
+        https://bugs.webkit.org/show_bug.cgi?id=145200
+        http://trac.webkit.org/changeset/184645
+
+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  Alex Christensen  <achristensen@webkit.org>
+
+        [Content Extensions] Relax restrictions on triggers that match everything.
+        https://bugs.webkit.org/show_bug.cgi?id=145069
+
+        Reviewed by Benjamin Poulain.
+
+        Added API tests that cover the new functionality and test for correctness in behavior.
+
+        * contentextensions/CompiledContentExtension.cpp:
+        (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
+        * contentextensions/ContentExtensionCompiler.cpp:
+        (WebCore::ContentExtensions::addUniversalActionsToDFA):
+        (WebCore::ContentExtensions::compileRuleList):
+        Put universalActionsWithoutDomains into the DFA from filtersWithoutDomains and
+        put universalActionsWithDomains into the DFA from filtersWithDomains.        
+        * contentextensions/ContentExtensionError.cpp:
+        (WebCore::ContentExtensions::contentExtensionErrorCategory):
+        * contentextensions/ContentExtensionError.h:
+        Remove error codes for errors that are not errors any more.
+        * contentextensions/ContentExtensionsBackend.cpp:
+        (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
+        * contentextensions/ContentExtensionsBackend.h:
+        * contentextensions/DFABytecode.h:
+        (WebCore::ContentExtensions::instructionSizeWithArguments):
+        * contentextensions/DFABytecodeCompiler.cpp:
+        (WebCore::ContentExtensions::set32Bits):
+        (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
+        (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
+        (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
+        (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
+        (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
+        (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
+        (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction): Deleted.
+        * contentextensions/DFABytecodeCompiler.h:
+        * contentextensions/DFABytecodeInterpreter.cpp:
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot): Deleted.
+        * contentextensions/DFABytecodeInterpreter.h:
+        Add a new bytecode AppendActionDefaultStylesheet to mark actions that are css-display-none
+        that need to be put in the default stylesheet to be ignored or not as a whole.
+        css-display-none actions with flags or domain rules and css-display-none actions 
+        after ignore-previous-rules actions are not to be in this precompiled stylesheet, but
+        they will be applied as needed per page.  The precompiled stylesheet is already applied
+        if no ignore-previous-rules action is triggered.
+        * loader/ResourceLoadInfo.h:
+
+2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
+
+        JS binding generator should create a member variable for each Promise attribute of an interface
+        https://bugs.webkit.org/show_bug.cgi?id=145056
+
+        Reviewed by Darin Adler.
+
+        For each attribute XXX whose type is Promise, a member m_XXXPromiseDeferred is created, its type being a JSC::Strong of JSPromiseDeferred.
+        The purpose is to enable custom getters to create the JSPromiseDeferred and store ino the class member to ensure the same promise is returned each time
+        the custom getter is called.
+        This patch will enable simplifying ReadableStreamReader custom binding.
+
+        Covered by added attribute in TestObj.idl.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+        (webkit_dom_test_obj_get_property):
+        (webkit_dom_test_obj_class_init):
+        (webkit_dom_test_obj_get_test_promise_attr):
+        (webkit_dom_test_obj_set_nullable_string_value): Deleted.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjTestPromiseAttr):
+        (WebCore::jsTestObjAttributeWithReservedEnumType): Deleted.
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.mm:
+        (-[DOMTestObj testPromiseAttr]):
+        (-[DOMTestObj attribute]): Deleted.
+        * bindings/scripts/test/TestObj.idl:
+
+2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
+
+        AudioContext suspend/resume/close should resolve promises immediately when state is already suspended/active/closed
+        https://bugs.webkit.org/show_bug.cgi?id=145164
+
+        Reviewed by Jer Noble.
+
+        Test: webaudio/audiocontext-promise.html
+
+        * Modules/webaudio/AudioContext.cpp:
+        (WebCore::AudioContext::suspendContext): Immediatly call callbacks whenever possible to resolve/reject promises.
+        (WebCore::AudioContext::resumeContext): Ditto.
+        (WebCore::AudioContext::closeContext): Ditto
+
 2015-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         REGRESSION(r184420): [GTK] webkit_dom_html_element_get_children has been removed