From: KyungTae Kim Date: Wed, 3 Jul 2013 05:08:34 +0000 (+0900) Subject: ToggleBold does not work in specific editable contents X-Git-Tag: submit/tizen_2.2/20130716.180414~1 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fweb%2Fwebkit-efl.git;a=commitdiff_plain;h=8efef7fd3aea9598945bad72aa53a0a298ec4913 ToggleBold does not work in specific editable contents [Title] ToggleBold does not work in specific editable contents [Issue] P130610-4137 [Problem] In Email, ToggleBold does not work after 'select all' for some mails. [Cause] The invisible text elements was included when checking triStateOfStyle. [Solution] Add a checking routine for 'node->renderer' so that the invisible elements can't make the state as 'mixed'. Added on opensource: http://webkit.org/b/118285 Change-Id: I721599d62b87a07bd39ca4a124c5d3e6f4059575 --- diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index f78e14b..0621ea4 100755 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -787,6 +787,8 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/ #define ENABLE_TIZEN_ADJUST_CONTENTS_SIZE_FOR_MINUS_X_WORKAROUND 1 /*KyungTae Kim(ktf.kim@samsung.com) : Workaround patch that adjusts contents size of minus x position contents */ #define ENABLE_TIZEN_EWK_CONTEXT_CACHE_MANAGER_NULL_CHECK_WORKAROUND 1 /* KyungTae Kim(ktf.kim@samsung.com) : Add null check to fix crash issue. */ #define ENABLE_TIZEN_FRAMEVIEW_NULL_CHECK_WORKAROUND 1 /* KyungTae Kim(ktf.kim@samsung.com) : Add null check to fix crash issue. */ +#define ENABLE_TIZEN_EDITING_IGNORE_NONVISIBLE 1 /*KyungTae Kim(ktf.kim@samsung.com) : When checking styles for editing, ignore the element without renderer, to prevent to get 'mixed' although all the visible elements are 'true'*/ + #define ENABLE_TIZEN_DO_NOT_APPLY_SCROLLOFFSET_FOR_DELEGATESSCROLLING 1 /* Eunmi Lee(eunmi15.lee@samsung.com) : Fix the wrong position of hitTest result when we do hit test in the subFrame (It should be contributed to the opensource) */ diff --git a/Source/WebCore/editing/EditingStyle.cpp b/Source/WebCore/editing/EditingStyle.cpp index e9f6048..e649fb4 100644 --- a/Source/WebCore/editing/EditingStyle.cpp +++ b/Source/WebCore/editing/EditingStyle.cpp @@ -694,7 +694,11 @@ TriState EditingStyle::triStateOfStyle(const VisibleSelection& selection) const TriState nodeState = triStateOfStyle(nodeStyle.get(), node->isTextNode() ? EditingStyle::DoNotIgnoreTextOnlyProperties : EditingStyle::IgnoreTextOnlyProperties); if (node == selection.start().deprecatedNode()) state = nodeState; +#if ENABLE(TIZEN_EDITING_IGNORE_NONVISIBLE) + else if (state != nodeState && node->isTextNode() && node->renderer()) { +#else else if (state != nodeState && node->isTextNode()) { +#endif state = MixedTriState; break; }