Changeset 220443 in webkit


Ignore:
Timestamp:
Aug 8, 2017 10:36:57 PM (7 years ago)
Author:
Wenson Hsieh
Message:

Unreviewed, rolling out r220393.

This patch regresses the performance of WebPage::editorState.

Reverted changeset:

"[iOS WK2] WKWebView schedules nonstop layout after pressing
cmb+b,i,u inside a contenteditable div"
https://bugs.webkit.org/show_bug.cgi?id=175116
http://trac.webkit.org/changeset/220393

Location:
trunk
Files:
4 deleted
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r220442 r220443  
     12017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Unreviewed, rolling out r220393.
     4
     5        This patch regresses the performance of WebPage::editorState.
     6
     7        Reverted changeset:
     8
     9        "[iOS WK2] WKWebView schedules nonstop layout after pressing
     10        cmb+b,i,u inside a contenteditable div"
     11        https://bugs.webkit.org/show_bug.cgi?id=175116
     12        http://trac.webkit.org/changeset/220393
     13
    1142017-08-08  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/LayoutTests/platform/ios-wk2/editing/inserting/insert-div-024-expected.txt

    r220393 r220443  
    6565        RenderText {#text} at (14,15) size 36x28
    6666          text run at (14,15) width 36: "xxx"
     67      RenderBlock (anonymous) at (0,320) size 784x0
    6768      RenderBlock {P} at (0,320) size 784x58 [border: (2px solid #0000FF)]
    6869        RenderBR {BR} at (14,15) size 0x28 [bgcolor=#008000]
  • trunk/LayoutTests/platform/ios-wk2/editing/inserting/insert-div-026-expected.txt

    r220393 r220443  
    5555          RenderText {#text} at (21,3) size 13x28
    5656            text run at (21,3) width 13: "x"
     57        RenderBlock (anonymous) at (0,34) size 784x0
    5758caret: position 3 of child 0 {#text} of child 0 {B} of child 1 {DIV} of child 3 {DIV} of body
  • trunk/LayoutTests/platform/ios-wk2/editing/style/5084241-expected.txt

    r220393 r220443  
    1515          RenderText {#text} at (150,0) size 159x19
    1616            text run at (150,0) width 159: "This text should be blue."
     17      RenderBlock (anonymous) at (0,76) size 784x0
    1718caret: position 25 of child 0 {#text} of child 1 {FONT} of child 2 {DIV} of body
  • trunk/LayoutTests/platform/ios-wk2/editing/style/unbold-in-bold-expected.txt

    r220393 r220443  
    8787            text run at (170,15) width 72: "xxxxxx"
    8888        RenderInline {SPAN} at (0,0) size 0x28
     89      RenderBlock (anonymous) at (0,58) size 784x0
    8990selection start: position 0 of child 1 {#text} of child 1 {DIV} of body
    9091selection end:   position 7 of child 1 {#text} of child 1 {DIV} of body
  • trunk/Source/WebCore/ChangeLog

    r220442 r220443  
     12017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Unreviewed, rolling out r220393.
     4
     5        This patch regresses the performance of WebPage::editorState.
     6
     7        Reverted changeset:
     8
     9        "[iOS WK2] WKWebView schedules nonstop layout after pressing
     10        cmb+b,i,u inside a contenteditable div"
     11        https://bugs.webkit.org/show_bug.cgi?id=175116
     12        http://trac.webkit.org/changeset/220393
     13
    1142017-08-08  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebCore/css/StyleProperties.cpp

    r220393 r220443  
    3232#include "CSSValueList.h"
    3333#include "CSSValuePool.h"
    34 #include "Color.h"
    3534#include "Document.h"
    3635#include "PropertySetCSSStyleDeclaration.h"
     
    241240}
    242241
    243 std::optional<Color> StyleProperties::propertyAsColor(CSSPropertyID property) const
    244 {
    245     auto colorValue = getPropertyCSSValue(property);
    246     if (!is<CSSPrimitiveValue>(colorValue.get()))
    247         return std::nullopt;
    248 
    249     auto& primitiveColor = downcast<CSSPrimitiveValue>(*colorValue);
    250     return primitiveColor.isRGBColor() ? primitiveColor.color() : CSSParser::parseColor(colorValue->cssText());
    251 }
    252 
    253 CSSValueID StyleProperties::propertyAsValueID(CSSPropertyID property) const
    254 {
    255     auto cssValue = getPropertyCSSValue(property);
    256     return is<CSSPrimitiveValue>(cssValue.get()) ? downcast<CSSPrimitiveValue>(*cssValue).valueID() : CSSValueInvalid;
    257 }
    258 
    259242String StyleProperties::getCustomPropertyValue(const String& propertyName) const
    260243{
  • trunk/Source/WebCore/css/StyleProperties.h

    r220393 r220443  
    3737class CSSStyleDeclaration;
    3838class CachedResource;
    39 class Color;
    4039class ImmutableStyleProperties;
    4140class URL;
     
    114113    WEBCORE_EXPORT RefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const;
    115114    WEBCORE_EXPORT String getPropertyValue(CSSPropertyID) const;
    116 
    117     WEBCORE_EXPORT std::optional<Color> propertyAsColor(CSSPropertyID) const;
    118     WEBCORE_EXPORT CSSValueID propertyAsValueID(CSSPropertyID) const;
    119 
    120115    bool propertyIsImportant(CSSPropertyID) const;
    121116    String getPropertyShorthand(CSSPropertyID) const;
  • trunk/Source/WebCore/editing/EditingStyle.cpp

    r220393 r220443  
    14141414}
    14151415
    1416 bool EditingStyle::hasStyle(CSSPropertyID propertyID, const String& value)
    1417 {
    1418     return EditingStyle::create(propertyID, value)->triStateOfStyle(this) != FalseTriState;
    1419 }
    1420 
    14211416RefPtr<EditingStyle> EditingStyle::styleAtSelectionStart(const VisibleSelection& selection, bool shouldUseBackgroundColorInEffect)
    14221417{
  • trunk/Source/WebCore/editing/EditingStyle.h

    r220393 r220443  
    166166    TextDecorationChange strikeThroughChange() const { return static_cast<TextDecorationChange>(m_strikeThroughChange); }
    167167
    168     WEBCORE_EXPORT bool hasStyle(CSSPropertyID, const String& value);
    169168    WEBCORE_EXPORT static RefPtr<EditingStyle> styleAtSelectionStart(const VisibleSelection&, bool shouldUseBackgroundColorInEffect = false);
    170169    static WritingDirection textDirectionForSelection(const VisibleSelection&, EditingStyle* typingStyle, bool& hasNestedOrMultipleEmbeddings);
  • trunk/Source/WebCore/editing/Editor.cpp

    r220393 r220443  
    917917bool Editor::selectionStartHasStyle(CSSPropertyID propertyID, const String& value) const
    918918{
    919     if (auto editingStyle = EditingStyle::styleAtSelectionStart(m_frame.selection().selection(), propertyID == CSSPropertyBackgroundColor))
    920         return editingStyle->hasStyle(propertyID, value);
    921     return false;
     919    return EditingStyle::create(propertyID, value)->triStateOfStyle(
     920        EditingStyle::styleAtSelectionStart(m_frame.selection().selection(), propertyID == CSSPropertyBackgroundColor).get());
    922921}
    923922
  • trunk/Source/WebKit/ChangeLog

    r220442 r220443  
     12017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Unreviewed, rolling out r220393.
     4
     5        This patch regresses the performance of WebPage::editorState.
     6
     7        Reverted changeset:
     8
     9        "[iOS WK2] WKWebView schedules nonstop layout after pressing
     10        cmb+b,i,u inside a contenteditable div"
     11        https://bugs.webkit.org/show_bug.cgi?id=175116
     12        http://trac.webkit.org/changeset/220393
     13
    1142017-08-08  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h

    r220393 r220443  
    7979
    8080- (void)_webView:(WKWebView *)webView runBeforeUnloadConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL result))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    81 - (void)_webView:(WKWebView *)webView editorStateDidChange:(NSDictionary *)editorState WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    8281
    8382#if TARGET_OS_IPHONE
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r220393 r220443  
    10841084
    10851085    _page->setViewportSizeForCSSViewportUnits(viewportSizeForViewportUnits);
    1086 }
    1087 
    1088 static NSTextAlignment nsTextAlignment(WebKit::TextAlignment alignment)
    1089 {
    1090     switch (alignment) {
    1091     case WebKit::NoAlignment:
    1092         return NSTextAlignmentNatural;
    1093     case WebKit::LeftAlignment:
    1094         return NSTextAlignmentLeft;
    1095     case WebKit::RightAlignment:
    1096         return NSTextAlignmentRight;
    1097     case WebKit::CenterAlignment:
    1098         return NSTextAlignmentCenter;
    1099     case WebKit::JustifiedAlignment:
    1100         return NSTextAlignmentJustified;
    1101     }
    1102     ASSERT_NOT_REACHED();
    1103     return NSTextAlignmentNatural;
    1104 }
    1105 
    1106 static NSDictionary *dictionaryRepresentationForEditorState(const WebKit::EditorState& state)
    1107 {
    1108     if (state.isMissingPostLayoutData)
    1109         return @{ @"post-layout-data" : @NO };
    1110 
    1111     auto& postLayoutData = state.postLayoutData();
    1112     return @{
    1113         @"post-layout-data" : @YES,
    1114         @"bold": postLayoutData.typingAttributes & WebKit::AttributeBold ? @YES : @NO,
    1115         @"italic": postLayoutData.typingAttributes & WebKit::AttributeItalics ? @YES : @NO,
    1116         @"underline": postLayoutData.typingAttributes & WebKit::AttributeUnderline ? @YES : @NO,
    1117         @"text-alignment": @(nsTextAlignment(static_cast<WebKit::TextAlignment>(postLayoutData.textAlignment))),
    1118         @"text-color": (NSString *)postLayoutData.textColor.cssText()
    1119     };
    1120 }
    1121 
    1122 - (void)_didChangeEditorState
    1123 {
    1124     id <WKUIDelegatePrivate> uiDelegate = (id <WKUIDelegatePrivate>)self.UIDelegate;
    1125     if ([uiDelegate respondsToSelector:@selector(_webView:editorStateDidChange:)])
    1126         [uiDelegate _webView:self editorStateDidChange:dictionaryRepresentationForEditorState(_page->editorState())];
    11271086}
    11281087
     
    36813640}
    36823641
    3683 - (void)_web_editorStateDidChange
    3684 {
    3685     [self _didChangeEditorState];
    3686 }
    3687 
    36883642- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event
    36893643{
     
    57025656}
    57035657
    5704 - (void)_executeEditCommand:(NSString *)command argument:(NSString *)argument completion:(void (^)(BOOL))completion
    5705 {
    5706     _page->executeEditCommand(command, argument, [capturedCompletionBlock = makeBlockPtr(completion)](WebKit::CallbackBase::Error error) {
    5707         capturedCompletionBlock(error == WebKit::CallbackBase::Error::None);
    5708     });
    5709 }
    5710 
    57115658#if PLATFORM(IOS)
    57125659
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h

    r220393 r220443  
    120120- (void)_hidePasswordView;
    121121
    122 - (void)_didChangeEditorState;
    123 
    124122- (void)_addShortcut:(id)sender;
    125123- (void)_arrowKey:(id)sender;
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h

    r220393 r220443  
    408408
    409409- (void)_disableBackForwardSnapshotVolatilityForTesting WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
    410 - (void)_executeEditCommand:(NSString *)command argument:(NSString *)argument completion:(void (^)(BOOL))completion WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    411410
    412411@end
  • trunk/Source/WebKit/UIProcess/API/mac/WKView.mm

    r220393 r220443  
    10301030}
    10311031
    1032 - (void)_web_editorStateDidChange
    1033 {
    1034 }
    1035 
    10361032- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event
    10371033{
  • trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h

    r220418 r220443  
    8787- (void)_web_dismissContentRelativeChildWindows;
    8888- (void)_web_dismissContentRelativeChildWindowsWithAnimation:(BOOL)animate;
    89 - (void)_web_editorStateDidChange;
    9089
    9190- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event;
  • trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm

    r220420 r220443  
    26112611        requestCandidatesForSelectionIfNeeded();
    26122612#endif
    2613 
    2614     [m_view _web_editorStateDidChange];
    26152613}
    26162614
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r220393 r220443  
    16431643    m_maintainsInactiveSelection = newValue;
    16441644}
    1645 
    1646 void WebPageProxy::executeEditCommand(const String& commandName, const String& argument, WTF::Function<void(CallbackBase::Error)>&& callbackFunction)
    1647 {
    1648     if (!isValid()) {
    1649         callbackFunction(CallbackBase::Error::Unknown);
    1650         return;
    1651     }
    1652 
    1653     auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken());
    1654     m_process->send(Messages::WebPage::ExecuteEditCommandWithCallback(commandName, argument, callbackID), m_pageID);
    1655 }
    16561645   
    16571646void WebPageProxy::executeEditCommand(const String& commandName, const String& argument)
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r220393 r220443  
    480480    bool isMediaStreamCaptureMuted() const { return m_mutedState & WebCore::MediaProducer::CaptureDevicesAreMuted; }
    481481    void setMediaStreamCaptureMuted(bool);
    482     void executeEditCommand(const String& commandName, const String& argument, WTF::Function<void(CallbackBase::Error)>&&);
    483482       
    484483#if PLATFORM(IOS)
     484    void executeEditCommand(const String& commandName, WTF::Function<void (CallbackBase::Error)>&&);
    485485    double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
    486486    const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedContentRect(); }
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r220435 r220443  
    35733573    [self beginSelectionChange];
    35743574    RetainPtr<WKContentView> view = self;
    3575     _page->executeEditCommand(commandName, { }, [view](WebKit::CallbackBase::Error) {
     3575    _page->executeEditCommand(commandName, [view](WebKit::CallbackBase::Error) {
    35763576        [view endSelectionChange];
    35773577    });
     
    39253925    if (_usingGestureForSelection)
    39263926        [self _updateChangedSelection];
    3927 
    3928     [_webView _didChangeEditorState];
    39293927}
    39303928
  • trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

    r220393 r220443  
    477477}
    478478
     479void WebPageProxy::executeEditCommand(const String& commandName, WTF::Function<void (CallbackBase::Error)>&& callbackFunction)
     480{
     481    if (!isValid()) {
     482        callbackFunction(CallbackBase::Error::Unknown);
     483        return;
     484    }
     485   
     486    auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken());
     487    m_process->send(Messages::WebPage::ExecuteEditCommandWithCallback(commandName, callbackID), m_pageID);
     488}
     489
    479490bool WebPageProxy::applyAutocorrection(const String& correction, const String& originalText)
    480491{
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r220393 r220443  
    862862        auto& postLayoutData = result.postLayoutData();
    863863        if (!selection.isNone()) {
    864             if (auto editingStyle = EditingStyle::styleAtSelectionStart(selection)) {
    865                 if (editingStyle->hasStyle(CSSPropertyFontWeight, "bold"))
     864            Node* nodeToRemove;
     865            if (auto* style = Editor::styleForSelectionStart(&frame, nodeToRemove)) {
     866                if (isFontWeightBold(style->fontCascade().weight()))
    866867                    postLayoutData.typingAttributes |= AttributeBold;
    867 
    868                 if (editingStyle->hasStyle(CSSPropertyFontStyle, "italic") || editingStyle->hasStyle(CSSPropertyFontStyle, "oblique"))
     868                if (isItalic(style->fontCascade().italic()))
    869869                    postLayoutData.typingAttributes |= AttributeItalics;
    870870
    871                 if (editingStyle->hasStyle(CSSPropertyWebkitTextDecorationsInEffect, "underline"))
     871                RefPtr<EditingStyle> typingStyle = frame.selection().typingStyle();
     872                if (typingStyle && typingStyle->style()) {
     873                    String value = typingStyle->style()->getPropertyValue(CSSPropertyWebkitTextDecorationsInEffect);
     874                if (value.contains("underline"))
    872875                    postLayoutData.typingAttributes |= AttributeUnderline;
    873 
    874                 if (auto* styleProperties = editingStyle->style()) {
    875                     bool isLeftToRight = styleProperties->propertyAsValueID(CSSPropertyDirection) == CSSValueLtr;
    876                     switch (styleProperties->propertyAsValueID(CSSPropertyTextAlign)) {
    877                     case CSSValueRight:
    878                     case CSSValueWebkitRight:
    879                         postLayoutData.textAlignment = RightAlignment;
    880                         break;
    881                     case CSSValueLeft:
    882                     case CSSValueWebkitLeft:
    883                         postLayoutData.textAlignment = LeftAlignment;
    884                         break;
    885                     case CSSValueCenter:
    886                     case CSSValueWebkitCenter:
    887                         postLayoutData.textAlignment = CenterAlignment;
    888                         break;
    889                     case CSSValueJustify:
    890                         postLayoutData.textAlignment = JustifiedAlignment;
    891                         break;
    892                     case CSSValueStart:
    893                         postLayoutData.textAlignment = isLeftToRight ? LeftAlignment : RightAlignment;
    894                         break;
    895                     case CSSValueEnd:
    896                         postLayoutData.textAlignment = isLeftToRight ? RightAlignment : LeftAlignment;
    897                         break;
    898                     default:
    899                         break;
    900                     }
    901                     if (auto textColor = styleProperties->propertyAsColor(CSSPropertyColor))
    902                         postLayoutData.textColor = *textColor;
     876                } else {
     877                    if (style->textDecorationsInEffect() & TextDecorationUnderline)
     878                        postLayoutData.typingAttributes |= AttributeUnderline;
    903879                }
    904             }
    905 
    906             if (auto* enclosingListElement = enclosingList(selection.start().containerNode())) {
    907                 if (is<HTMLUListElement>(*enclosingListElement))
    908                     postLayoutData.enclosingListType = UnorderedList;
    909                 else if (is<HTMLOListElement>(*enclosingListElement))
    910                     postLayoutData.enclosingListType = OrderedList;
    911                 else
    912                     ASSERT_NOT_REACHED();
     880
     881                if (style->visitedDependentColor(CSSPropertyColor).isValid())
     882                    postLayoutData.textColor = style->visitedDependentColor(CSSPropertyColor);
     883
     884                switch (style->textAlign()) {
     885                case RIGHT:
     886                case WEBKIT_RIGHT:
     887                    postLayoutData.textAlignment = RightAlignment;
     888                    break;
     889                case LEFT:
     890                case WEBKIT_LEFT:
     891                    postLayoutData.textAlignment = LeftAlignment;
     892                    break;
     893                case CENTER:
     894                case WEBKIT_CENTER:
     895                    postLayoutData.textAlignment = CenterAlignment;
     896                    break;
     897                case JUSTIFY:
     898                    postLayoutData.textAlignment = JustifiedAlignment;
     899                    break;
     900                case TASTART:
     901                    postLayoutData.textAlignment = style->isLeftToRightDirection() ? LeftAlignment : RightAlignment;
     902                    break;
     903                case TAEND:
     904                    postLayoutData.textAlignment = style->isLeftToRightDirection() ? RightAlignment : LeftAlignment;
     905                    break;
     906                }
     907               
     908                HTMLElement* enclosingListElement = enclosingList(selection.start().deprecatedNode());
     909                if (enclosingListElement) {
     910                    if (is<HTMLUListElement>(*enclosingListElement))
     911                        postLayoutData.enclosingListType = UnorderedList;
     912                    else if (is<HTMLOListElement>(*enclosingListElement))
     913                        postLayoutData.enclosingListType = OrderedList;
     914                    else
     915                        ASSERT_NOT_REACHED();
     916                } else
     917                    postLayoutData.enclosingListType = NoList;
     918
     919                if (nodeToRemove)
     920                    nodeToRemove->remove();
    913921            }
    914922        }
     
    921929
    922930    return result;
    923 }
    924 
    925 static bool shouldEnsureEditorStateUpdateAfterExecutingCommand(const String& commandName)
    926 {
    927     // These commands will always ensure an EditorState update in the UI process.
    928     // FIXME: This logic was moved here from iOS platform-specific code; we should investigate whether this makes sense for all platforms.
    929     return commandName == "toggleBold" || commandName == "toggleItalic" || commandName == "toggleUnderline";
    930 }
    931 
    932 void WebPage::executeEditCommandWithCallback(const String& commandName, const String& argument, CallbackID callbackID)
    933 {
    934     executeEditCommand(commandName, argument);
    935     if (shouldEnsureEditorStateUpdateAfterExecutingCommand(commandName))
    936         send(Messages::WebPageProxy::EditorStateChanged(editorState()));
    937     send(Messages::WebPageProxy::VoidCallback(callbackID));
    938931}
    939932
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r220393 r220443  
    517517
    518518    void viewportPropertiesDidChange(const WebCore::ViewportArguments&);
    519     void executeEditCommandWithCallback(const String&, const String& argument, CallbackID);
    520519
    521520#if PLATFORM(IOS)
     
    589588
    590589    void contentSizeCategoryDidChange(const String&);
     590    void executeEditCommandWithCallback(const String&, CallbackID);
    591591
    592592    Seconds eventThrottlingDelay() const;
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in

    r220393 r220443  
    3838    ViewWillEndLiveResize()
    3939
    40     ExecuteEditCommandWithCallback(String name, String argument, WebKit::CallbackID callbackID)
    4140    KeyEvent(WebKit::WebKeyboardEvent event)
    4241    MouseEvent(WebKit::WebMouseEvent event)
     
    9392    ApplicationDidBecomeActive()
    9493    ContentSizeCategoryDidChange(String contentSizeCategory)
     94    ExecuteEditCommandWithCallback(String name, WebKit::CallbackID callbackID)
    9595    GetSelectionContext(WebKit::CallbackID callbackID)
    9696    SetAllowsMediaDocumentInlinePlayback(bool allows)
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r220393 r220443  
    22462246}
    22472247
     2248void WebPage::executeEditCommandWithCallback(const String& commandName, CallbackID callbackID)
     2249{
     2250    executeEditCommand(commandName, String());
     2251    if (commandName == "toggleBold" || commandName == "toggleItalic" || commandName == "toggleUnderline")
     2252        send(Messages::WebPageProxy::EditorStateChanged(editorState()));
     2253    send(Messages::WebPageProxy::VoidCallback(callbackID));
     2254}
     2255
    22482256Seconds WebPage::eventThrottlingDelay() const
    22492257{
  • trunk/Tools/ChangeLog

    r220434 r220443  
     12017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Unreviewed, rolling out r220393.
     4
     5        This patch regresses the performance of WebPage::editorState.
     6
     7        Reverted changeset:
     8
     9        "[iOS WK2] WKWebView schedules nonstop layout after pressing
     10        cmb+b,i,u inside a contenteditable div"
     11        https://bugs.webkit.org/show_bug.cgi?id=175116
     12        http://trac.webkit.org/changeset/220393
     13
    1142017-08-08  obinna obike  <oobike@apple.com>
    215
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r220418 r220443  
    663663                F42DA5161D8CEFE400336F40 /* large-input-field-focus-onload.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F42DA5151D8CEFDB00336F40 /* large-input-field-focus-onload.html */; };
    664664                F4451C761EB8FD890020C5DA /* two-paragraph-contenteditable.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F4451C751EB8FD7C0020C5DA /* two-paragraph-contenteditable.html */; };
    665                 F44D06451F395C26001A0E29 /* editor-state-test-harness.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F44D06441F395C0D001A0E29 /* editor-state-test-harness.html */; };
    666                 F44D06471F39627A001A0E29 /* EditorStateTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = F44D06461F395C4D001A0E29 /* EditorStateTests.mm */; };
    667                 F44D064A1F3962F2001A0E29 /* EditingTestHarness.mm in Sources */ = {isa = PBXBuildFile; fileRef = F44D06491F3962E3001A0E29 /* EditingTestHarness.mm */; };
    668665                F4538EF71E8473E600B5C953 /* large-red-square.png in Copy Resources */ = {isa = PBXBuildFile; fileRef = F4538EF01E846B4100B5C953 /* large-red-square.png */; };
    669666                F45B63FB1F197F4A009D38B9 /* image-map.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F45B63FA1F197F33009D38B9 /* image-map.html */; };
     
    818815                                A155022C1E050D0300A24C57 /* duplicate-completion-handler-calls.html in Copy Resources */,
    819816                                9984FACE1CFFB090008D198C /* editable-body.html in Copy Resources */,
    820                                 F44D06451F395C26001A0E29 /* editor-state-test-harness.html in Copy Resources */,
    821817                                51C8E1A91F27F49600BF731B /* EmptyGrandfatheredResourceLoadStatistics.plist in Copy Resources */,
    822818                                A14AAB651E78DC5400C1ADC2 /* encrypted.pdf in Copy Resources */,
     
    16771673                F42DA5151D8CEFDB00336F40 /* large-input-field-focus-onload.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = "large-input-field-focus-onload.html"; path = "Tests/WebKit2Cocoa/large-input-field-focus-onload.html"; sourceTree = SOURCE_ROOT; };
    16781674                F4451C751EB8FD7C0020C5DA /* two-paragraph-contenteditable.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "two-paragraph-contenteditable.html"; sourceTree = "<group>"; };
    1679                 F44D06441F395C0D001A0E29 /* editor-state-test-harness.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "editor-state-test-harness.html"; sourceTree = "<group>"; };
    1680                 F44D06461F395C4D001A0E29 /* EditorStateTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EditorStateTests.mm; sourceTree = "<group>"; };
    1681                 F44D06481F3962E3001A0E29 /* EditingTestHarness.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingTestHarness.h; sourceTree = "<group>"; };
    1682                 F44D06491F3962E3001A0E29 /* EditingTestHarness.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EditingTestHarness.mm; sourceTree = "<group>"; };
    16831675                F4538EF01E846B4100B5C953 /* large-red-square.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "large-red-square.png"; sourceTree = "<group>"; };
    16841676                F45B63FA1F197F33009D38B9 /* image-map.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "image-map.html"; sourceTree = "<group>"; };
     
    18201812                        children = (
    18211813                                A13EBB441B87332B00097110 /* WebProcessPlugIn */,
    1822                                 F44D06481F3962E3001A0E29 /* EditingTestHarness.h */,
    1823                                 F44D06491F3962E3001A0E29 /* EditingTestHarness.mm */,
    18241814                                5C726D6D1D3EE06800C5E1A1 /* InstanceMethodSwizzler.h */,
    18251815                                5C726D6E1D3EE06800C5E1A1 /* InstanceMethodSwizzler.mm */,
     
    18911881                                A1A4FE5D18DD3DB700B5EA8A /* Download.mm */,
    18921882                                A15502281E05020B00A24C57 /* DuplicateCompletionHandlerCalls.mm */,
    1893                                 F44D06461F395C4D001A0E29 /* EditorStateTests.mm */,
    18941883                                2D8104CB1BEC13E70020DA46 /* FindInPage.mm */,
    18951884                                2D1FE0AF1AD465C1006CD9E6 /* FixedLayoutSize.mm */,
     
    21252114                                A155022B1E050BC500A24C57 /* duplicate-completion-handler-calls.html */,
    21262115                                9984FACD1CFFB038008D198C /* editable-body.html */,
    2127                                 F44D06441F395C0D001A0E29 /* editor-state-test-harness.html */,
    21282116                                51C8E1A81F27F47300BF731B /* EmptyGrandfatheredResourceLoadStatistics.plist */,
    21292117                                F4C2AB211DD6D94100E06D5B /* enormous-video-with-sound.html */,
     
    31113099                                7CCE7EBE1A411A7E00447C4C /* DynamicDeviceScaleFactor.mm in Sources */,
    31123100                                5C0BF8921DD599B600B00328 /* EarlyKVOCrash.mm in Sources */,
    3113                                 F44D064A1F3962F2001A0E29 /* EditingTestHarness.mm in Sources */,
    31143101                                7CCE7EE01A411A9A00447C4C /* EditorCommands.mm in Sources */,
    3115                                 F44D06471F39627A001A0E29 /* EditorStateTests.mm in Sources */,
    31163102                                7CCE7EBF1A411A7E00447C4C /* ElementAtPointInWebFrame.mm in Sources */,
    31173103                                07492B3B1DF8B14C00633DE1 /* EnumerateMediaDevices.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.