Diff
Modified: trunk/Source/WebCore/ChangeLog (171202 => 171203)
--- trunk/Source/WebCore/ChangeLog 2014-07-17 22:08:48 UTC (rev 171202)
+++ trunk/Source/WebCore/ChangeLog 2014-07-17 22:46:20 UTC (rev 171203)
@@ -1,3 +1,15 @@
+2014-07-17 Enrica Casucci <[email protected]>
+
+ [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
+ https://bugs.webkit.org/show_bug.cgi?id=135023
+ <rdar://problem/17617282>
+
+ Reviewed by Benjamin Poulain.
+
+ Adding some exports.
+
+ * WebCore.exp.in:
+
2014-07-17 Timothy Hatcher <[email protected]>
Make console.profile record to the Timeline.
Modified: trunk/Source/WebCore/WebCore.exp.in (171202 => 171203)
--- trunk/Source/WebCore/WebCore.exp.in 2014-07-17 22:08:48 UTC (rev 171202)
+++ trunk/Source/WebCore/WebCore.exp.in 2014-07-17 22:46:20 UTC (rev 171203)
@@ -2681,6 +2681,7 @@
__ZN7WebCore31enableURLSchemeCanonicalizationEb
__ZN7WebCore33applicationIsTheEconomistOnIPhoneEv
__ZN7WebCore35enclosingRectExtendedToDevicePixelsERKNS_9FloatRectEf
+__ZN7WebCore35isEndOfEditableOrNonEditableContentERKNS_15VisiblePositionE
__ZN7WebCore35positionOfNextBoundaryOfGranularityERKNS_15VisiblePositionENS_15TextGranularityENS_18SelectionDirectionE
__ZN7WebCore41initializeHTTPConnectionSettingsOnStartupEv
__ZN7WebCore4FontC1ERKNS_16FontPlatformDataEN3WTF10PassRefPtrINS_12FontSelectorEEE
@@ -2728,6 +2729,7 @@
__ZN7WebCore8Document13getTouchRectsERN3WTF6VectorINS_7IntRectELm0ENS1_15CrashOnOverflowEEE
__ZN7WebCore8Document19dispatchWindowEventEN3WTF10PassRefPtrINS_5EventEEENS2_INS_11EventTargetEEE
__ZN7WebCore8IntPointC1ERK7CGPoint
+__ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEENS0_10AnchorTypeE
__ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEENS0_19LegacyEditingOffsetE
__ZN7WebCore8SVGNames4initEv
__ZN7WebCore8Settings13gAVKitEnabledE
Modified: trunk/Source/WebKit2/ChangeLog (171202 => 171203)
--- trunk/Source/WebKit2/ChangeLog 2014-07-17 22:08:48 UTC (rev 171202)
+++ trunk/Source/WebKit2/ChangeLog 2014-07-17 22:46:20 UTC (rev 171203)
@@ -1,3 +1,25 @@
+2014-07-17 Enrica Casucci <[email protected]>
+
+ [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
+ https://bugs.webkit.org/show_bug.cgi?id=135023
+ <rdar://problem/17617282>
+
+ Reviewed by Benjamin Poulain and Ryosuke Niwa.
+
+ WKContentView needs to implement hasContent to correctly show
+ the appropriate menu bar content. The patch adds this information
+ to the EditorState.
+
+ * Shared/EditorState.cpp:
+ (WebKit::EditorState::encode):
+ (WebKit::EditorState::decode):
+ * Shared/EditorState.h:
+ (WebKit::EditorState::EditorState):
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView hasContent]):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::editorState):
+
2014-07-17 Benjamin Poulain <[email protected]>
[iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
Modified: trunk/Source/WebKit2/Shared/EditorState.cpp (171202 => 171203)
--- trunk/Source/WebKit2/Shared/EditorState.cpp 2014-07-17 22:08:48 UTC (rev 171202)
+++ trunk/Source/WebKit2/Shared/EditorState.cpp 2014-07-17 22:46:20 UTC (rev 171203)
@@ -48,6 +48,7 @@
#if PLATFORM(IOS)
encoder << isReplaceAllowed;
+ encoder << hasContent;
encoder << characterAfterSelection;
encoder << characterBeforeSelection;
encoder << twoCharacterBeforeSelection;
@@ -96,6 +97,8 @@
#if PLATFORM(IOS)
if (!decoder.decode(result.isReplaceAllowed))
return false;
+ if (!decoder.decode(result.hasContent))
+ return false;
if (!decoder.decode(result.characterAfterSelection))
return false;
if (!decoder.decode(result.characterBeforeSelection))
Modified: trunk/Source/WebKit2/Shared/EditorState.h (171202 => 171203)
--- trunk/Source/WebKit2/Shared/EditorState.h 2014-07-17 22:08:48 UTC (rev 171202)
+++ trunk/Source/WebKit2/Shared/EditorState.h 2014-07-17 22:46:20 UTC (rev 171203)
@@ -55,6 +55,7 @@
, hasComposition(false)
#if PLATFORM(IOS)
, isReplaceAllowed(false)
+ , hasContent(false)
, characterAfterSelection(0)
, characterBeforeSelection(0)
, twoCharacterBeforeSelection(0)
@@ -76,6 +77,7 @@
#if PLATFORM(IOS)
bool isReplaceAllowed;
+ bool hasContent;
UChar32 characterAfterSelection;
UChar32 characterBeforeSelection;
UChar32 twoCharacterBeforeSelection;
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (171202 => 171203)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2014-07-17 22:08:48 UTC (rev 171202)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2014-07-17 22:46:20 UTC (rev 171203)
@@ -2438,7 +2438,7 @@
- (BOOL)hasContent
{
- return YES;
+ return _page->editorState().hasContent;
}
- (void)selectAll
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (171202 => 171203)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-07-17 22:08:48 UTC (rev 171202)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-07-17 22:46:20 UTC (rev 171203)
@@ -730,8 +730,11 @@
// FIXME: The following check should take into account writing direction.
result.isReplaceAllowed = result.isContentEditable && atBoundaryOfGranularity(selection.start(), WordGranularity, DirectionForward);
result.wordAtSelection = plainTextReplacingNoBreakSpace(wordRangeFromPosition(selection.start()).get());
- if (selection.isContentEditable())
+ if (selection.isContentEditable()) {
charactersAroundPosition(selection.start(), result.characterAfterSelection, result.characterBeforeSelection, result.twoCharacterBeforeSelection);
+ Node* root = selection.rootEditableElement();
+ result.hasContent = root && root->hasChildNodes() && !isEndOfEditableOrNonEditableContent(firstPositionInNode(root));
+ }
} else if (selection.isRange()) {
result.caretRectAtStart = view->contentsToRootView(VisiblePosition(selection.start()).absoluteCaretBounds());
result.caretRectAtEnd = view->contentsToRootView(VisiblePosition(selection.end()).absoluteCaretBounds());