Timeline
Jul 21, 2019:
- 8:35 PM Changeset in webkit [247679] by
-
- 8 edits in trunk
[iOS] [WebKit2] Add limited support for -isPosition:atBoundary:inDirection: in WKContentView
https://bugs.webkit.org/show_bug.cgi?id=199993
<rdar://problem/49523528>
Reviewed by Beth Dakin.
Source/WebKit:
Add support for -isPosition:atBoundary:inDirection:, only in the cases where the given position is the start or
and position and the given granularity is UITextGranularityParagraph.
Test: EditorStateTests.ParagraphBoundary
- Shared/EditorState.cpp:
(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):
- Shared/EditorState.h:
Add a couple of bits to indicate whether the selection start or end positions are at paragraph boundaries.
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView isPosition:atBoundary:inDirection:]):
Implement this to return selectionStartIsAtParagraphBoundary or selectionEndIsAtParagraphBoundary.
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState const):
Tools:
Add a new API test to verify the behavior of -isPosition:atBoundary:inDirection:.
- TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:
(TestWebKitAPI::TEST):
- TestWebKitAPI/cocoa/TestWKWebView.h:
- 3:59 PM Changeset in webkit [247678] by
-
- 3 edits in trunk/Source/WebCore
Add DataListButtonElement.cpp to unified sources
https://bugs.webkit.org/show_bug.cgi?id=199989
Reviewed by Michael Catanzaro.
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- 3:15 PM Changeset in webkit [247677] by
-
- 8 edits in trunk
Add accessibilityInsertText for text insertion in edit fields.
https://bugs.webkit.org/show_bug.cgi?id=199973
Patch by Andres Gonzalez <Andres Gonzalez> on 2019-07-21
Reviewed by Chris Fleizach.
Renamed accessibilityInsertText to _accessibilityInsertText.
Source/WebCore:
- accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityInsertText:]):
(-[WebAccessibilityObjectWrapper accessibilityInsertText:]): Deleted.
- accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper _accessibilityInsertText:]):
(-[WebAccessibilityObjectWrapper accessibilityInsertText:]): Deleted.
Tools:
- DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::insertText):
- DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::insertText):
- WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::insertText):
- WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::insertText):
- 11:35 AM Changeset in webkit [247676] by
-
- 3 edits2 adds in trunk
[WHLSL] Checker needs to setError() when a property access node can't commit its base type
https://bugs.webkit.org/show_bug.cgi?id=199978
Reviewed by Dean Jackson.
Source/WebCore:
Test: webgpu/whlsl/null-array-property-access.html
- Modules/webgpu/WHLSL/WHLSLChecker.cpp:
(WebCore::WHLSL::Checker::finishVisiting):
LayoutTests:
- webgpu/whlsl/null-array-property-access-expected.txt: Added.
- webgpu/whlsl/null-array-property-access.html: Added.
- 11:31 AM Changeset in webkit [247675] by
-
- 3 edits2 adds in trunk
[WHLSL] Return the zero-value enum in the enum-from-integer constructor when the integer is not a valid enum value
https://bugs.webkit.org/show_bug.cgi?id=199853
Reviewed by Dean Jackson.
Source/WebCore:
Test: webgpu/whlsl/enum-integer-constructor.html
- Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
(WebCore::WHLSL::Metal::writeNativeFunction):
LayoutTests:
- webgpu/whlsl/enum-integer-constructor-expected.txt: Added.
- webgpu/whlsl/enum-integer-constructor.html: Added.
- 10:23 AM Changeset in webkit [247674] by
-
- 12 edits2 adds in trunk
[iOS] Fast and complex text codepaths disagree about how to lay out bopomofo with tone marks
https://bugs.webkit.org/show_bug.cgi?id=199912
<rdar://problem/52182454>
Reviewed by Simon Fraser.
Source/WebCore:
This is because CoreText has special composition rules for CJK languages, which we don't have in our simple
text codepath. Rather than implementing the composition rules in WebKit, we can simply disable them in
CoreText.
Test: fast/text/international/system-language/composition.html
- platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::Font::getCFStringAttributes const):
Source/WebCore/PAL:
- pal/spi/cocoa/CoreTextSPI.h:
LayoutTests:
- css3/font-feature-font-face-local-expected.html:
- css3/font-feature-font-face-local.html:
- editing/mac/selection/word-thai-expected.txt:
- editing/mac/selection/word-thai.html:
- fast/text/international/system-language/composition-expected.txt: Added.
- fast/text/international/system-language/composition.html: Added.
- platform/ios/fast/text/crash-complex-text-surrogate-expected.txt:
- svg/custom/glyph-selection-arabic-forms-expected.txt:
Jul 20, 2019:
- 8:53 PM Changeset in webkit [247673] by
-
- 9 edits in trunk
Speed up HashTable decoding by reserving capacity and avoiding rehashing
https://bugs.webkit.org/show_bug.cgi?id=199982
Reviewed by Saam Barati.
Source/WebKit:
Use HashMap::reserveInitialCapacity() in the HashMap IPC decoder for
performance. I measured a ~35% improvement when decoding a very large
HashMap of Strings (~160k entries) in the context of the
StorageManager::GetValues IPC.
- Platform/IPC/ArgumentCoders.h:
- Shared/API/c/WKDictionary.cpp:
(WKDictionaryCreate):
Source/WTF:
Introduce reserveInitialCapacity() on HashMap to reserve capacity on a
HashMap and cut down on rehashing cost when possible.
- wtf/HashMap.h:
- wtf/HashTable.h:
(WTF::HashTable::reserveInitialCapacity):
- wtf/persistence/PersistentCoders.h:
Use HashMap::reserveInitialCapacity() in the HashMap persistent decoder for
performance.
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
- 6:04 PM Changeset in webkit [247672] by
-
- 3 edits in trunk/Source/WebKit
Micro-optimize HashMap & String IPC decoding
https://bugs.webkit.org/show_bug.cgi?id=199967
Reviewed by Geoffrey Garen.
The legacy HashMap decoder (returning a boolean) was failing to WTFMove()
the key & value when calling HashMap::add(). The modern decoder (returning
an Optional) was properly using WTFMove(). Rewrite the legacy HashMap decoder
to call the modern one to reduce code duplication and to get this optimization.
Also, encode HashMap::size() as a uint32_t instead of a uint64_t since
HashMap::size() returns an 'unsigned int' type. Finally, update the modern
decoder to WTFMove(hashMap) when returning. Because the function returns an
Optional<HashMap> and not a HashMap, I do not believe we get return value
optimization (RVO).
Do similar changes to String IPC coders.
- Platform/IPC/ArgumentCoders.cpp:
(IPC::decodeStringText):
(IPC::ArgumentCoder<String>::decode):
- Platform/IPC/ArgumentCoders.h:
- 3:04 PM Changeset in webkit [247671] by
-
- 19 edits2 adds in trunk
Add accessibilityInsertText for text insertion in edit fields.
https://bugs.webkit.org/show_bug.cgi?id=199973
Patch by Andres Gonzalez <Andres Gonzalez> on 2019-07-20
Reviewed by Chris Fleizach.
Source/WebCore:
Tests: accessibility/insert-newline.html
accessibility/ios-simulator/insert-newline.html
Accessibility clients like VoiceOver and Voice Control were entering
text in text fields by replacing the entire content of the field
(SetValue) and then setting the insertion point to the appropriate
offset (SetSelectedTextRange). accessibilityInsertText gives a simpler
interface to clients to insert text at the insertion point location.
In addition, this provides a workaround for the issue encountered with
the previous method when inserting a linebreak.
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::insertText):
- accessibility/AccessibilityObject.h:
- accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
- accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
Tools:
Glue code to run new LayoutTests.
- WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
- WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
- WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::insertText):
- WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::insertText):
- WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::insertText):
- WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::insertText):
LayoutTests:
Tests for inserting a newline in the middle of a text line and checking
that the insertion point and text ranges are correct.
- accessibility/insert-newline-expected.txt: Added.
- accessibility/insert-newline.html: Added.
- accessibility/ios-simulator/insert-newline-expected.txt: Added.
- accessibility/ios-simulator/insert-newline.html: Added.
- 1:11 PM Changeset in webkit [247670] by
-
- 8 edits in trunk/Source
REGRESSION(r246033/r246496): [GTK] Kinetic scrolling doesn't work
https://bugs.webkit.org/show_bug.cgi?id=199322
Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-07-20
Reviewed by Michael Catanzaro.
Source/WebCore:
Check ENABLE(KINETIC_SCROLLING) instead of ENABLE(ASYNC_SCROLLING) for kinetic scrolling.
- platform/PlatformWheelEvent.h:
- platform/generic/ScrollAnimatorGeneric.cpp:
(WebCore::ScrollAnimatorGeneric::handleWheelEvent):
- platform/gtk/PlatformWheelEventGtk.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
Source/WebKit:
Check ENABLE(KINETIC_SCROLLING) instead of ENABLE(ASYNC_SCROLLING) when setting wheel event phase and momentum phase.
- Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
Source/WTF:
Introduce ENABLE_KINETIC_SCROLLING to explicitly always have kinetic scrolling on GTK.
- wtf/Platform.h:
- 11:53 AM Changeset in webkit [247669] by
-
- 4 edits7 adds in trunk/Source/WebCore
[LFC][TFC] Introduce table formatting context.
https://bugs.webkit.org/show_bug.cgi?id=199979
<rdar://problem/53346292>
Reviewed by Antti Koivisto.
Add the basic class structure for the table formatting context.
https://www.w3.org/TR/CSS22/tables.html
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- layout/FormattingState.h:
(WebCore::Layout::FormattingState::isTableFormattingState const):
- layout/tableformatting/TableFormattingContext.cpp: Added.
(WebCore::Layout::TableFormattingContext::TableFormattingContext):
(WebCore::Layout::TableFormattingContext::layout const):
- layout/tableformatting/TableFormattingContext.h: Added.
- layout/tableformatting/TableFormattingState.cpp: Added.
(WebCore::Layout::TableFormattingState::TableFormattingState):
(WebCore::Layout::TableFormattingState::~TableFormattingState):
- layout/tableformatting/TableFormattingState.h: Added.
- layout/tableformatting/TableInvalidation.cpp: Added.
(WebCore::Layout::TableInvalidation::invalidate):
- layout/tableformatting/TableInvalidation.h: Added.
- 11:52 AM Changeset in webkit [247668] by
-
- 6 edits in trunk/Source/WebCore
[LFC][IFC] Add support for mid-word break.
https://bugs.webkit.org/show_bug.cgi?id=199976
<rdar://problem/53337349>
Reviewed by Antti Koivisto.
Introduce leading and trailing InlineTextItem to support incoming and outgoing partial content.
TextUtil::split is a straight copy of SimpleLineLayout::split.
- layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
(WebCore::Layout::inlineItemWidth):
(WebCore::Layout::LineLayout::close):
(WebCore::Layout::LineLayout::placeInlineItem):
(WebCore::Layout::LineLayout::layout):
- layout/inlineformatting/InlineTextItem.cpp:
(WebCore::Layout::InlineTextItem::split const):
(WebCore::Layout::InlineTextItem::split): Deleted.
- layout/inlineformatting/InlineTextItem.h:
(WebCore::Layout::InlineTextItem::inlineBox const):
- layout/inlineformatting/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::split):
- layout/inlineformatting/text/TextUtil.h:
- 6:47 AM Changeset in webkit [247667] by
-
- 10 edits in trunk/Source
[Text autosizing] Do not nuke the style on dynamicViewportSizeUpdate
https://bugs.webkit.org/show_bug.cgi?id=199718
<rdar://problem/53344961>
Reviewed by Simon Fraser.
Source/WebCore:
When the page scale changes (e.g. as the result of shink to fit mode) we need to visit all the text content on the page and check whether they need to be boosted.
Currently we call setNeedsRecalcStyleInAllFrames() to accomplish it. Unfortunatelly setNeedsRecalcStyleInAllFrames destroys all the style information which means that the
subsequent styleResolve() needs to start from scratch.
This patch addresses this issue by directly adjusting the computed style information when text boosting is required and schedules layout accordingly. We also trigger this style adjusting
on a timer so that rapid dynamicViewportSizeUpdate() calls won't trigger redundant layouts.
- css/StyleResolver.cpp:
(WebCore::hasTextChild):
(WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):
(WebCore::hasTextChildren): Deleted.
- css/StyleResolver.h:
- page/FrameView.h:
- page/Page.cpp:
(WebCore::Page::invalidateTextAutoSizeInAllFrames):
- page/Page.h:
Source/WebKit:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAutoSizingAdjustmentTimer):
(WebKit::WebPage::close):
(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::textAutoSizingAdjustmentTimerFired):
(WebKit::m_shrinkToFitContentTimer): Deleted.
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::resetIdempotentTextAutosizingIfNeeded):
(WebKit::WebPage::resetTextAutosizing):
(WebKit::WebPage::viewportConfigurationChanged):
- 5:40 AM Changeset in webkit [247666] by
-
- 10 edits4 adds in trunk
[WHLSL] Make enums work
https://bugs.webkit.org/show_bug.cgi?id=199634
Reviewed by Robin Morisset.
Source/WebCore:
This patch makes enums work. There were a couple changes needed to do this work:
- In the metal codegen, we were emitting code like "EnumType.EnumValue"
instead of "EnumType::EnumValue".
- Inside the enumeration declaration AST node, we track enums in a HashMap
because we need to look up names of enum values in that map in parts of the
compiler. However, HashMap is not ordered but we were relying on the iteration
order of it to generate the default values of enums. E.g, in: "enum { Foo = 10, Bar }",
Bar should be 11. However, there was no guarantee that we iterated over Bar
after Foo. Instead, we just track the default values as we parse an enum
inside of the parser. This allows us to continue to keep using HashMap without
also adding an auxiliary data structure (or using more memory in some way) to
track the order of the enum elements.
I've also filed a patch to do follow-up work on implementing the correct
operational behavior when constructing an enum from its underlying type when
the underlying value does not match any enum value:
https://bugs.webkit.org/show_bug.cgi?id=199853
Tests: webgpu/whlsl/enums-2.html
webgpu/whlsl/enums.html
- Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
(WebCore::WHLSL::AST::EnumerationMember::EnumerationMember):
(WebCore::WHLSL::AST::EnumerationMember::value):
(WebCore::WHLSL::AST::EnumerationMember::setValue): Deleted.
- Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::constantExpressionString):
- Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
(WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
- Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
(WebCore::WHLSL::ASTDumper::visit):
- Modules/webgpu/WHLSL/WHLSLChecker.cpp:
(WebCore::WHLSL::Checker::visit):
- Modules/webgpu/WHLSL/WHLSLParser.cpp:
(WebCore::WHLSL::Parser::parseEnumerationDefinition):
(WebCore::WHLSL::Parser::parseEnumerationMember):
- Modules/webgpu/WHLSL/WHLSLParser.h:
- Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
(WebCore::WHLSL::Visitor::visit):
LayoutTests:
- webgpu/whlsl/enums-2-expected.txt: Added.
- webgpu/whlsl/enums-2.html: Added.
- webgpu/whlsl/enums-expected.txt: Added.
- webgpu/whlsl/enums.html: Added.