REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button...
[WebKit-https.git] / Source / WebCore / ChangeLog
index 5d83c27..9917e8f 100644 (file)
@@ -1,3 +1,316 @@
+2018-11-26  Daniel Bates  <dabates@apple.com>
+
+        REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown
+        https://bugs.webkit.org/show_bug.cgi?id=191969
+        <rdar://problem/46247569>
+
+        Reviewed by Dean Jackson.
+
+        Following r238078 we now support drawing the caps lock indicator in password fields on iOS.
+        However it is not meaningful to show the caps lock indicator when the Strong Password button
+        is visible because the password field is not editable. We should not paint the caps lock
+        indicator when the Strong Password button is visible.
+
+        Tests: fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button.html
+               fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html
+
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const): Do not draw the caps
+        lock indicator when the password field has the Strong Password button.
+        (WebCore::TextFieldInputType::updateAutoFillButton): Call capsLockStateMayHaveChanged() to
+        update the visibility of the caps lock indicator when the auto fill button has changed.
+
+2018-11-26  Sam Weinig  <sam@webkit.org>
+
+        Streamline ListHashSet use in floating object code
+        https://bugs.webkit.org/show_bug.cgi?id=191957
+
+        Reviewed by Alex Christensen.
+
+        Simplify use of ListHashSet by using new raw pointer overloads and
+        making use of reversed order of template arguments in the find() and
+        contains() overloads that take hash translators.  
+
+        * rendering/FloatingObjects.cpp:
+        (WebCore::FloatingObjects::remove):
+        Use raw pointer overloads of contains and remove. Remove seperate call
+        to find / check agains end() which is unnecessary as remove() already
+        does that.
+        
+        * rendering/FloatingObjects.h:
+        (WebCore::FloatingObjectHashFunctions::hash):
+        (WebCore::FloatingObjectHashFunctions::equal):
+        (WebCore::FloatingObjectHashTranslator::hash):
+        (WebCore::FloatingObjectHashTranslator::equal):
+        Add hash()/equal() overloads for the raw pointer cases. As the FIXME
+        notes, this could be simplified by changing PtrHashBase to use designated
+        bottleneck functions for hash() and equal().
+
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::containsFloat const):
+        (WebCore::RenderBlockFlow::insertFloatingObject):
+        (WebCore::RenderBlockFlow::removeFloatingObject):
+        (WebCore::RenderBlockFlow::hasOverhangingFloat):
+        (WebCore::RenderBlockFlow::addIntrudingFloats):
+        Use simplified calls.
+        
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
+        (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
+        Use simplified calls.
+
+2018-11-26  Jeremy Jones  <jeremyj@apple.com>
+
+        Use Full Screen consistently in localizable strings.
+        https://bugs.webkit.org/show_bug.cgi?id=190363
+        rdar://problem/43882333
+
+        Reviewed by Jon Lee.
+
+        No new tests because only change is to localizable strings.
+
+        Rename "Fullscreen" to "Full Screen" in localizable strings for consistency.
+
+        * English.lproj/Localizable.strings:
+        * platform/LocalizedStrings.cpp:
+        (WebCore::contextMenuItemTagEnterVideoFullscreen):
+        (WebCore::contextMenuItemTagExitVideoFullscreen):
+        (WebCore::localizedMediaControlElementHelpText):
+
+2018-11-26  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Reduce the use of WKSI library calls: CoreAnimation
+        https://bugs.webkit.org/show_bug.cgi?id=191777
+        <rdar://problem/46140542>
+
+        Reviewed by Zalan Bujtas.
+
+        Update the Windows build of WebKit to refer to the SPI headers, rather than WebKitSystemInterface.
+        Move a small amount of glue code from WKSI to WebCore, and remove any includes or link
+        directives for WebKitSystemInterface.lib.
+        
+        No new tests. No change in behavior.
+
+        * platform/graphics/BitmapImage.cpp:
+        * platform/graphics/ca/win/CACFLayerTreeHost.h:
+        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
+        (layerTreeHostForLayer):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        * platform/graphics/cg/PathCG.cpp:
+        * platform/graphics/cg/PatternCG.cpp:
+        * platform/graphics/win/WKCAImageQueue.cpp:
+
+2018-11-25  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC][IFC] Use float box's margin box to adjust the line constraints.
+        https://bugs.webkit.org/show_bug.cgi?id=191961
+
+        Reviewed by Antti Koivisto.
+
+        Test: fast/inline/inline-content-with-float-and-margin.html
+
+        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
+        (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
+        * layout/inlineformatting/InlineFormattingContext.cpp:
+        (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
+
+2018-11-26  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Accessing default web context before gtk_init results in drawing failure (Gtk-WARNING **: drawing failure for widget 'WebKitWebView': invalid value for an input Visual*)
+        https://bugs.webkit.org/show_bug.cgi?id=150303
+
+        Reviewed by Michael Catanzaro.
+
+        Ensure gtk has been initialized before trying to get the default display.
+
+        * platform/graphics/PlatformDisplay.cpp:
+        (WebCore::PlatformDisplay::createPlatformDisplay):
+
+2018-11-26  Javier Fernandez  <jfernandez@igalia.com>
+
+        [css-grid] absolute positioned child is sized wrongly when using auto-fit, generating spurious collapsed tracks
+        https://bugs.webkit.org/show_bug.cgi?id=191938
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        The guttersSize function has a complex logic to compute the gaps in a
+        specific GridSpan, considering different scenarios of collapsed tracks
+        for such span.
+
+        The first case is avoiding the duplicated gap because of trailing
+        collapsed tracks.
+
+        The second case considered is looking for non-empty tracks before the
+        GridSpan end, if it points to an empty track, so we must add this gap.
+
+        The last case is to consider the gap of non-empty tracks after the
+        GridSpan end line, if it points to an empty track.
+
+        There are several cases that are not considered or incorrectly computed.
+        This patch addresses those cases; basically, we should only consider gaps
+        when there are non-empty tracks before and after the collapsed tracks.
+        Additionally, we should avoid duplicating the gaps size adding both,
+        before and after non-empty track's gap.
+
+        No new tests, this change is covered by current tests and make several cases to pass now.
+
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::guttersSize const):
+
+2018-11-26  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [css-grid] Fix grid container sizing under min-content height
+        https://bugs.webkit.org/show_bug.cgi?id=191889
+
+        Reviewed by Javier Fernandez.
+
+        The spec is quite clear
+        (https://drafts.csswg.org/css-sizing/#valdef-width-min-content):
+          "min-content
+             If specified for the inline axis, use the min-content inline size;
+             otherwise behaves as the property‚Äôs initial value."
+
+        So if a grid container has "height: min-content" it should behave
+        the same than with "height: auto".
+
+        The patch removes computeIntrinsicLogicalContentHeightUsing() in
+        RenderGrid as we don't need a custom one anymore.
+        We can also get rid of m_minContentHeight and m_maxContentHeight
+        attributes that were only used for this logic.
+
+        Test: fast/css-grid-layout/grid-track-sizing-with-orthogonal-flows.html
+              fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html
+              imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-sizing-constraints-001.html
+
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::layoutBlock):
+        (WebCore::RenderGrid::computeIntrinsicLogicalWidths const):
+        (WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const):
+        * rendering/RenderGrid.h:
+
+2018-11-25  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC] Remove PointInContainingBlock and PositionInContainingBlock
+        https://bugs.webkit.org/show_bug.cgi?id=191954
+
+        Reviewed by Antti Koivisto.
+
+        Use Point and Position instead. Points and positions are by default in the containing block's coordinate system.
+
+        * layout/FormattingContextGeometry.cpp:
+        (WebCore::Layout::contentHeightForFormattingContextRoot):
+        * layout/LayoutUnits.h:
+        (WebCore::Layout::Position::operator LayoutUnit const):
+        (WebCore::Layout::operator<):
+        (WebCore::Layout::operator==):
+        * layout/floats/FloatAvoider.cpp:
+        (WebCore::Layout::FloatAvoider::FloatAvoider):
+        (WebCore::Layout::FloatAvoider::setHorizontalConstraints):
+        (WebCore::Layout::FloatAvoider::horizontalPositionCandidate):
+        (WebCore::Layout::FloatAvoider::initialHorizontalPosition const):
+        * layout/floats/FloatBox.cpp:
+        (WebCore::Layout::FloatBox::horizontalPositionCandidate):
+        (WebCore::Layout::FloatBox::verticalPositionCandidate):
+        (WebCore::Layout::FloatBox::initialVerticalPosition const):
+        * layout/floats/FloatingContext.cpp:
+        (WebCore::Layout::FloatingContext::positionForFloat const):
+        (WebCore::Layout::FloatingContext::positionForFloatAvoiding const):
+        (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
+        (WebCore::Layout::FloatingContext::floatingPosition const):
+        (WebCore::Layout::FloatingPair::horizontalConstraints const):
+        (WebCore::Layout::FloatingPair::bottom const):
+        * layout/floats/FloatingContext.h:
+        * layout/floats/FloatingState.cpp:
+        (WebCore::Layout::FloatingState::constraints const):
+        (WebCore::Layout::FloatingState::bottom const):
+        * layout/floats/FloatingState.h:
+        (WebCore::Layout::FloatingState::FloatItem::bottom const):
+        * layout/inlineformatting/InlineFormattingContext.cpp:
+        (WebCore::Layout::InlineFormattingContext::initializeNewLine const):
+
+2018-11-25  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC] Rename Layout::Position to Layout::Point
+        https://bugs.webkit.org/show_bug.cgi?id=191950
+
+        Reviewed by Antti Koivisto.
+
+        It actually represents a point.
+
+        * layout/FormattingContext.cpp:
+        (WebCore::Layout::FormattingContext::mapTopLeftToAncestor):
+        (WebCore::Layout::FormattingContext::mapCoordinateToAncestor):
+        * layout/FormattingContext.h:
+        * layout/LayoutUnits.h:
+        (WebCore::Layout::Point::Point):
+        (WebCore::Layout::Point::moveBy):
+        (WebCore::Layout::Position::operator LayoutPoint const): Deleted.
+        (WebCore::Layout::Position::Position): Deleted.
+        (WebCore::Layout::Position::moveBy): Deleted.
+        * layout/blockformatting/BlockFormattingContext.h:
+        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
+        (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
+        * layout/floats/FloatingState.cpp:
+        (WebCore::Layout::FloatingState::constraints const):
+
+2018-11-25  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC] Floating code should use typed positions (PositionInContextRoot).
+        https://bugs.webkit.org/show_bug.cgi?id=191949
+
+        Reviewed by Antti Koivisto.
+
+        Use PositionInContextRoot instead of LayoutUnit.
+
+        * layout/floats/FloatingState.cpp:
+        (WebCore::Layout::FloatingState::constraints const):
+        (WebCore::Layout::FloatingState::bottom const):
+        * layout/floats/FloatingState.h:
+        (WebCore::Layout::FloatingState::leftBottom const):
+        (WebCore::Layout::FloatingState::rightBottom const):
+        (WebCore::Layout::FloatingState::bottom const):
+
+2018-11-25  Zalan Bujtas  <zalan@apple.com>
+
+        Fix build after r238472.
+
+        * layout/inlineformatting/InlineFormattingContext.cpp:
+        (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
+        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
+        (WebCore::Layout::InlineFormattingContext::Geometry::runWidth):
+        * layout/inlineformatting/InlineLineBreaker.cpp:
+        (WebCore::Layout::InlineLineBreaker::textWidth const):
+
+2018-11-25  Tim Horton  <timothy_horton@apple.com>
+
+        Make it possible to insert editable images with a gesture
+        https://bugs.webkit.org/show_bug.cgi?id=191937
+
+        Reviewed by Wenson Hsieh.
+
+        Tests:
+            editing/images/redo-insert-editable-image-maintains-strokes.html,
+            editing/images/undo-insert-editable-image.html,
+            editing/images/basic-editable-image-from-execCommand.html
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * Source/WebCore/editing/EditorCommand.cpp:
+        * Source/WebCore/en.lproj/Localizable.strings:
+        * editing/EditAction.h:
+        * editing/Editor.cpp:
+        (WebCore::Editor::insertEditableImage):
+        * editing/Editor.h:
+        * editing/InsertEditableImageCommand.cpp: Added.
+        (WebCore::InsertEditableImageCommand::InsertEditableImageCommand):
+        (WebCore::InsertEditableImageCommand::doApply):
+        * editing/InsertEditableImageCommand.h: Added.
+        (WebCore::InsertEditableImageCommand::create):
+        * editing/VisibleSelection.cpp:
+        Add an editor command that inserts an editable image.
+        It will likely get a bit more complicated, but for now it just inserts
+        a 100% by 300px editable image.
+
 2018-11-24  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [Cocoa] Fix a few localizable string descriptions in WebEditCommandProxy.cpp and WebEditorClient.mm