#define ENABLE_TIZEN_CHECK_DID_PERFORM_FIRST_NAVIGATION 1 /* Sungman Kim(ssungmai.kim@samsung.com) : To skip sendSync message from WebProcess to UIProcess, doesn't use itemAtIndex() on BackForwardController */
#define ENABLE_TIZEN_CSS_FILTER_OPTIMIZATION 1 /* Hurnjoo Lee(hurnjoo.lee@samsung.com : Optimize performance of css filters */
+#define ENABLE_TIZEN_BACKGROUND_DISK_CACHE 1 /* Byeongha.cho(byeongha.cho@samsung.com), Sungman Kim(ssungmai.kim@samsung.com) : Cache encoded image data to disk on background state. */
+
#if ENABLE(NOTIFICATIONS)
#define ENABLE_TIZEN_NOTIFICATIONS 1 /* Kihong Kwon(kihong.kwon@samsung.com) : Temp patch for notification score in the html5test.com */
#endif
#define ENABLE_TIZEN_INFLATE_NONE_BLUR_SHADOW_AREA 1 /*KyungTae Kim(ktf.kim@samsung.com) : Enlarge the clipping area 1 pixel so that the fill does not bleed (due to antialiasing) if the context is transformed*/
#define ENABLE_TIZEN_NOT_INITIAIZE_BACKGROUND_SIZE_IN_SHORTHAND_WORKAROUND 1 /*KyungTae Kim(ktf.kim@samsung.com) : Do not initialize background-size when the background shorthand doesn't include it(Bug 97761)*/
#define ENABLE_TIZEN_SET_CARET_HEIGHT_TO_OBJECT_HEIGHT 1 /*KyungTae Kim(ktf.kim@samsung.com) : Set caret height from selection height to object height for fix the case that image and text are in the same line (Bug 116424)*/
-#define ENABLE_TIZEN_POSITIONED_CHILD_RELAYOUT 1 /*KyungTae Kim(ktf.kim@samsung.com) : If posChildNeedsLayout() but !m_positionedObjects, normal layout is needed for updating m_positionedObjects*/
+#define ENABLE_TIZEN_POSITIONED_CHILD_RELAYOUT 0 /*KyungTae Kim(ktf.kim@samsung.com) : If posChildNeedsLayout() but !m_positionedObjects, normal layout is needed for updating m_positionedObjects*/
#if USE(FREETYPE)
#define ENABLE_TIZEN_FT_EMBOLDEN_FOR_SYNTHETIC_BOLD 1 /*Younghwan Cho(yhwan.cho@samsung.com) : Use freetype's 'embolden' instead of drawing twice for synthetic bold*/
#endif
#define ENABLE_TIZEN_WEBKIT2_THEME_SET_INTERNAL 1 /* Ryuan Choi(ryuan.choi@samsung.com) : Set to default theme for WK2/tizen */
#define ENABLE_TIZEN_WEBKIT2_PROXY 1 /* Ryuan Choi(ryuan.choi@samsung.com) : Provide API to set proxy */
#define ENABLE_TIZEN_WEBKIT2_POPUP_INTERNAL 1 /* Ryuan Choi(ryuan.choi@samsung.com) : popup implementation for WK2/tizen internal */
+#define ENABLE_TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS 1 /* Byungwoo Lee(bw80.lee@samsung.com) : Notify popup reply status through the smart callback */
#define ENABLE_TIZEN_SCREEN_ORIENTATION_SUPPORT_INTERNAL ENABLE_TIZEN_SCREEN_ORIENTATION_SUPPORT /* Ryuan choi9ryuan.choi@samsung.com) : temporal implementation for screen orientation lock callback */
#define ENABLE_TIZEN_WEBKIT2_FOCUS_RING 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Focus ring implementation for WK2 */
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
#define ENABLE_TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT 1 /* Changhyup Jwa(ch.jwa@samsung.com) : Restore visible content rect on going back and forward */
+#define ENABLE_TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION 1 /*Santosh Mahto(santosh.ma@samsung.com) : save and restore the scrollpostion before page is not rendered fully. */
#endif
#define ENABLE_TIZEN_WEBKIT2_MEMORY_SAVING_MODE 1 /*Eunsol Park(eunsol47.park@samsung.com) : Used for lower memory usage profiling*/
#define ENABLE_TIZEN_WEBKIT2_CONTEXT_X_WINDOW 1 /* Changhyup Jwa(ch.jwa@samsung.com) : WebProcess cannot access to evas, so it needs to obtain window id to get window's orientation. Default root window has sync issue. */
-webkit-overflow-scrolling
#endif
#if defined(ENABLE_TIZEN_CSS_ALIASES) && ENABLE_TIZEN_CSS_ALIASES
-animation = -webkit-animation
-animation-delay = -webkit-animation-delay
-animation-direction = -webkit-animation-direction
-animation-duration = -webkit-animation-duration
-animation-fill-mode = -webkit-animation-fill-mode
-animation-iteration-count = -webkit-animation-iteration-count
-animation-name = -webkit-animation-name
-animation-play-state = -webkit-animation-play-state
-animation-timing-function = -webkit-animation-timing-function
backface-visibility = -webkit-backface-visibility
perspective = -webkit-perspective
perspective-origin = -webkit-perspective-origin
#include "HTMLInputElement.h"
#endif
+#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
+#include "visible_units.h"
+#include "htmlediting.h"
+#endif
+
using namespace WTF;
using namespace Unicode;
#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
if (frame->selection()) {
Node* baseNode = frame->selection()->base().containerNode();
- if (baseNode && baseNode->isTextNode() && (!(baseNode->textContent().isEmpty()))) {
- if (inPasswordField) {
- if (!m_hitTestResult.isSelected())
- appendItem(SelectWordItem, m_contextMenu.get());
- } else {
-#endif
-#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
+ if (inPasswordField) {
+ if (baseNode && baseNode->isTextNode() && !(baseNode->textContent().isEmpty()) && !m_hitTestResult.isSelected())
+ appendItem(SelectWordItem, m_contextMenu.get());
+ } else {
+ VisiblePosition currentPosition = frame->selection()->selection().visibleStart();
+ VisiblePosition startPosition = startOfEditableContent(currentPosition);
+ VisiblePosition endPosition = endOfEditableContent(currentPosition);
+ if (comparePositions(startPosition, endPosition))
appendItem(SelectAllItem, m_contextMenu.get());
-#endif
-#if ENABLE(TIZEN_CONTEXT_MENU_SELECT)
+ if (baseNode && baseNode->isTextNode() && !(baseNode->textContent().isEmpty()))
appendItem(SelectWordItem, m_contextMenu.get());
-#endif
-#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
- }
}
}
+#else
+#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
+ appendItem(SelectAllItem, m_contextMenu.get());
+#endif
#endif
if (!inPasswordField) {
encoder->encode(hasComposition);
#if ENABLE(TIZEN_ISF_PORT)
+ encoder->encode(isTapEventHandling);
encoder->encode(inputMethodContextID);
encoder->encode(inputMethodHints);
encoder->encode(surroundingText);
encoder->encode(editorRect);
encoder->encode(updateEditorRectOnly);
#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+ encoder->encode(underlineState);
+ encoder->encode(italicState);
+ encoder->encode(boldState);
encoder->encode(bgColor);
encoder->encode(color);
+ encoder->encode(fontSize);
#endif
#endif
return false;
#if ENABLE(TIZEN_ISF_PORT)
+ if (!decoder->decode(result.isTapEventHandling))
+ return false;
+
if (!decoder->decode(result.inputMethodContextID))
return false;
return false;
#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+ if (!decoder->decode(result.underlineState))
+ return false;
+
+ if (!decoder->decode(result.italicState))
+ return false;
+
+ if (!decoder->decode(result.boldState))
+ return false;
+
if (!decoder->decode(result.bgColor))
return false;
if (!decoder->decode(result.color))
return false;
+
+ if (!decoder->decode(result.fontSize))
+ return false;
#endif
#endif
, isInPasswordField(false)
, hasComposition(false)
#if ENABLE(TIZEN_ISF_PORT)
+ , isTapEventHandling(false)
, inputMethodContextID(0)
, cursorPosition(0)
#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
, updateEditorRectOnly(false)
+ , underlineState(0)
+ , italicState(0)
+ , boldState(0)
#endif
#if PLATFORM(QT)
, cursorPosition(0)
bool isInPasswordField;
bool hasComposition;
#if ENABLE(TIZEN_ISF_PORT)
+ bool isTapEventHandling;
uintptr_t inputMethodContextID;
WTF::String inputMethodHints;
WTF::String surroundingText;
WebCore::IntRect editorRect;
bool updateEditorRectOnly;
#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+ int underlineState;
+ int italicState;
+ int boldState;
WTF::String bgColor;
WTF::String color;
+ WTF::String fontSize;
#endif
#endif
#if PLATFORM(QT)
// UI Client
typedef WKPageRef (*WKPageCreateNewPageCallback)(WKPageRef page, WKURLRequestRef urlRequest, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
//#if OS(TIZEN)
+//#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+typedef void (*WKPageNotifyPopupReplyWaitingStateCallback)(WKPageRef page, bool isWaiting, const void* clientInfo);
+//#endif
typedef bool (*WKPageRunJavaScriptAlertCallback)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo);
typedef bool (*WKPageRunJavaScriptConfirmCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, const void* clientInfo);
typedef bool (*WKPageRunJavaScriptPromptCallback)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, const void* clientInfo);
WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
WKPageUnavailablePluginButtonClickedCallback unavailablePluginButtonClicked;
-//#if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
// Version 2
+//#if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
WKPageShowColorPickerCallback showColorPicker;
WKPageHideColorPickerCallback hideColorPicker;
//#endif
+//#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ WKPageNotifyPopupReplyWaitingStateCallback notifyPopupReplyWaitingState;
+//#endif
};
typedef struct WKPageUIClient WKPageUIClient;
#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
, m_restoredScaleFactor(0)
#endif
+#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
+ , m_scrollPositionBeforePageRendered(IntPoint())
+#endif
, m_isVisible(true)
, m_isScrollableLayerFocused(false)
, m_isScrollableNodeFocused(false)
#if USE(TILED_BACKING_STORE) && ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
void PageClientImpl::updateViewportSize(const IntSize& viewportSize, const int angle)
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" view size: [%d, %d], angle: [%d]", viewportSize.width(), viewportSize.height(), angle);
+#endif
+
// update viewport size of webkit
- m_visibleContentRect.setSize(viewportSize);
- m_visibleContentRect = adjustVisibleContentRect(m_visibleContentRect, m_scaleFactor);
- m_viewImpl->setScrollPosition(m_visibleContentRect.location());
m_viewImpl->page()->setViewportSize(viewportSize);
}
+
+void PageClientImpl::updateVisibleContentRectSize(const IntSize& size)
+{
+ // update visible content rect's size
+ m_visibleContentRect.setSize(size);
+}
#endif
+void PageClientImpl::prepareRestoredVisibleContectRect()
+{
+ m_restoredScaleFactor = scaleFactor();
+ m_restoredScrollPosition = scrollPosition();
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", m_restoredScrollPosition.x(), m_restoredScrollPosition.y(), m_restoredScaleFactor);
+#endif
+}
+
void PageClientImpl::initializeVisibleContentRect()
{
_ewk_view_resume_painting(m_viewImpl->view());
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
IntPoint initialScrollPosition;
float initialScaleFactor = m_viewportConstraints.initialScale;
+#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
+ initialScrollPosition = m_scrollPositionBeforePageRendered;
+ m_scrollPositionBeforePageRendered = IntPoint();
+#endif
#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
// if scroll position and scale factor are restored by history controller,
// move scroll position and scale factor with them
initialScrollPosition = m_restoredScrollPosition;
initialScaleFactor = m_restoredScaleFactor;
}
+#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
+ m_restoredScaleFactor = 0;
+#endif
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", initialScrollPosition.x(), initialScrollPosition.y(), initialScaleFactor);
+#endif
#endif
setVisibleContentRect(IntRect(initialScrollPosition, m_visibleContentRect.size()), initialScaleFactor);
#else
void PageClientImpl::fitViewportToContent()
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", m_visibleContentRect.x(), m_visibleContentRect.y(), m_viewportConstraints.minimumScale);
+#endif
setVisibleContentRect(m_visibleContentRect, m_viewportConstraints.minimumScale);
}
m_viewportConstraints.minimumScale = availableMinimumScale();
}
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("layout size: [%d, %d], scale: [%.2f, %.2f, %.2f], user scalable: [%s]",
+ m_viewportConstraints.layoutSize.width(), m_viewportConstraints.layoutSize.height(),
+ m_viewportConstraints.initialScale, m_viewportConstraints.minimumScale, m_viewportConstraints.maximumScale,
+ m_viewportConstraints.userScalable ? "TRUE" : "FALSE");
+#endif
+
// setVisibleContentRect() should be called to adjust visible content rect only when view is resized
if (!m_pageDidRendered || m_viewImpl->page()->estimatedProgress() <= 0.1)
return;
if (m_waitFrameOfNewViewortSize)
ewk_view_resume(m_viewImpl->view());
#endif
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f], rotated: [%s]", m_visibleContentRect.x(), m_visibleContentRect.y(), newScale, isRotated ? "Rotated" : "Not rotated");
+#endif
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
setVisibleContentRect(IntRect(newScrollPosition, m_visibleContentRect.size()), newScale);
void PageClientImpl::didChangeContentsSize(const WebCore::IntSize size)
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" [%d, %d]", size.width(), size.height());
+#endif
#if USE(TILED_BACKING_STORE)
if (size.isEmpty())
return;
// adjust visible content rect
bool needScrollAdjustment = (adjustVisibleContentRect(m_visibleContentRect, scaleFactor()) != m_visibleContentRect);
bool needScaleAdjustment = (fabs(adjustScaleWithViewport(scaleFactor()) - scaleFactor()) > numeric_limits<float>::epsilon());
- if (needScrollAdjustment || needScaleAdjustment)
+ if (needScrollAdjustment || needScaleAdjustment) {
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" setVisibleContentRect: [%d, %d], [%.2f]", m_visibleContentRect.x(), m_visibleContentRect.y(), scaleFactor());
+#endif
setVisibleContentRect(m_visibleContentRect, scaleFactor());
+ }
}
void PageClientImpl::pageScaleFactorDidChange()
#if OS(TIZEN)
m_pageDidRendered = false;
m_viewportFitsToContent = false;
-#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
- m_restoredScaleFactor = 0;
-#endif
return;
#endif
notImplemented();
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
IntPoint newPoint = point;
newPoint.scale(scaleFactor(), scaleFactor());
+#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
+ if (!m_pageDidRendered)
+ m_scrollPositionBeforePageRendered = newPoint;
+ else
+ setVisibleContentRect(IntRect(newPoint, m_visibleContentRect.size()), scaleFactor());
+#else
setVisibleContentRect(IntRect(newPoint, m_visibleContentRect.size()), scaleFactor());
#endif
+#endif
}
#endif
m_restoredScrollPosition = point;
m_restoredScrollPosition.scale(scale, scale);
m_restoredScaleFactor = scale;
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", m_restoredScrollPosition.x(), m_restoredScrollPosition.y(), m_restoredScaleFactor);
+#endif
// Before contents size is fixed, just update visible content rect's position
m_visibleContentRect.setLocation(m_restoredScrollPosition);
if (!m_hasSuspendedContent)
return;
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", m_viewImpl->scrollPosition().x(), m_viewImpl->scrollPosition().y(), m_viewImpl->scaleFactor());
+#endif
+
// FIXME: Update visibleContentRect with m_viewImpl after resuming content.
// The concept is that the values of EwkViewImpl and PageClient can be different
// during suspending content and they become same when content is resumed.
{
m_textSelection->initHandlesMouseDownedStatus();
}
+
+void PageClientImpl::changeContextMenuPosition(IntPoint& point)
+{
+ m_textSelection->changeContextMenuPosition(point);
+}
#endif
#if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
}
#endif
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void PageClientImpl::didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState)
-{
- WebCore::IntPoint startPoint, endPoint;
- WebCore::IntRect leftRect, rightRect;
-
- WebCore::IntRect caretRect;
- m_viewImpl->page()->getCaretPosition(caretRect);
- if (!caretRect.isEmpty()) {
- startPoint.setX(caretRect.x());
- startPoint.setY(caretRect.y() + caretRect.height());
-
- endPoint.setX(caretRect.x() + caretRect.width());
- endPoint.setY(caretRect.y() + caretRect.height());
- }
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
- else if (m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect)) {
- startPoint.setX(leftRect.x());
- startPoint.setY(leftRect.y() + leftRect.height());
-
- endPoint.setX(rightRect.x() + rightRect.width());
- endPoint.setY(rightRect.y() + rightRect.height());
- }
-#endif
-
- startPoint.scale(scaleFactor(), scaleFactor());
- endPoint.scale(scaleFactor(), scaleFactor());
-
- int viewPositionX, viewPositionY;
- evas_object_geometry_get(m_viewImpl->view(), &viewPositionX, &viewPositionY, NULL, NULL);
-
- startPoint.move(-scrollPosition().x(), -scrollPosition().y());
- startPoint.move(viewPositionX, viewPositionY);
-
- endPoint.move(-scrollPosition().x(), -scrollPosition().y());
- endPoint.move(viewPositionX, viewPositionY);
-
- ewkViewDidGetTextStyleStateForSelection(m_viewImpl->view(), underlineState, italicState, boldState, startPoint, endPoint);
-}
-#endif
-
void PageClientImpl::didFindZoomableArea(const IntPoint& target, const IntRect& area)
{
ewk_view_zoomable_area_set(m_viewImpl->view(), target, area);
void PageClientEvasGL::updateViewportSize(const WebCore::IntSize& viewportSize, const int angle)
{
+ PageClientImpl::updateViewportSize(viewportSize, angle);
+}
+
+void PageClientEvasGL::updateVisibleContentRectSize(const WebCore::IntSize& size)
+{
if (m_surface) {
evas_gl_surface_destroy(m_evasGL, m_surface);
m_surface = 0;
}
setTargetSurface();
- PageClientImpl::updateViewportSize(viewportSize, angle);
+ PageClientImpl::updateVisibleContentRectSize(size);
}
void PageClientEvasGL::setViewNeedsDisplay(const WebCore::IntRect& rect)
#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
#include "FormDataCandidate.h"
#endif
+using std::numeric_limits;
#endif // #if OS(TIZEN)
class EwkViewImpl;
WebCore::IntSize layoutSize;
};
+ bool userScalable() { return fabs(m_viewportConstraints.minimumScale - m_viewportConstraints.maximumScale) > numeric_limits<float>::epsilon(); }
ViewportConstraints viewportConstraints() { return m_viewportConstraints; }
ViewportConstraints computeViewportConstraints(const WebCore::ViewportAttributes&);
double adjustScaleWithViewport(double);
#if USE(TILED_BACKING_STORE) && ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
TIZEN_VIRTUAL void updateViewportSize(const WebCore::IntSize&, const int);
+ TIZEN_VIRTUAL void updateVisibleContentRectSize(const WebCore::IntSize&);
#endif
+ void prepareRestoredVisibleContectRect();
void initializeVisibleContentRect();
double availableMinimumScale();
void fitViewportToContent();
#endif
void requestToShowTextSelectionHandlesAndContextMenu();
void initTextSelectionHandlesMouseDownedStatus();
-
+ void changeContextMenuPosition(WebCore::IntPoint& point);
#endif
#if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
void setBackgroundColor(double red, double green, double blue, double alpha);
TIZEN_VIRTUAL bool makeContextCurrent() { return true; }
#endif
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- void didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState);
-#endif
virtual void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
WebCore::IntPoint m_restoredScrollPosition;
float m_restoredScaleFactor;
#endif
+#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
+ WebCore::IntPoint m_scrollPositionBeforePageRendered;
+#endif
#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
RefPtr<MainFrameScrollbarTizen> m_horizontalScrollbar;
~PageClientEvasGL();
virtual void updateViewportSize(const WebCore::IntSize&, const int);
+ virtual void updateVisibleContentRectSize(const WebCore::IntSize&);
virtual void setViewNeedsDisplay(const WebCore::IntRect&);
virtual void displayViewport();
virtual void drawContents();
int b;
int a;
} color;
+
+ const char* fontSize;
+ Eina_Bool hasComposition;
};
#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-Ewk_Text_Style* ewkTextStyleCreate(int underlineState, int italicState, int boldState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint, const String& bgColor, const String& color)
+Ewk_Text_Style* ewkTextStyleCreate(const EditorState editorState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint)
{
Ewk_Text_Style* textStyle = new Ewk_Text_Style;
- textStyle->underlineState = static_cast<Ewk_Text_Style_State>(underlineState);
- textStyle->italicState = static_cast<Ewk_Text_Style_State>(italicState);
- textStyle->boldState = static_cast<Ewk_Text_Style_State>(boldState);
+ textStyle->underlineState = static_cast<Ewk_Text_Style_State>(editorState.underlineState);
+ textStyle->italicState = static_cast<Ewk_Text_Style_State>(editorState.italicState);
+ textStyle->boldState = static_cast<Ewk_Text_Style_State>(editorState.boldState);
textStyle->position.startPoint.x = startPoint.x();
textStyle->position.startPoint.y = startPoint.y();
// for example - rgba(255, 255, 255, 255)
// for example - rgb(255, 255, 255)
- if (equalIgnoringCase(bgColor.left(3), "rgb")) {
- size_t startPos = bgColor.find("(");
- size_t endPos = bgColor.find(")");
+ if (equalIgnoringCase(editorState.bgColor.left(3), "rgb")) {
+ size_t startPos = editorState.bgColor.find("(");
+ size_t endPos = editorState.bgColor.find(")");
- String value = bgColor.substring(startPos + 1, endPos - startPos - 1);
+ String value = editorState.bgColor.substring(startPos + 1, endPos - startPos - 1);
Vector<String> colorValues;
value.split(",", colorValues);
textStyle->bgColor.r = colorValues[0].toInt();
textStyle->bgColor.g = colorValues[1].toInt();
textStyle->bgColor.b = colorValues[2].toInt();
- if (equalIgnoringCase(bgColor.left(4), "rgba"))
+ if (equalIgnoringCase(editorState.bgColor.left(4), "rgba"))
textStyle->bgColor.a = colorValues[3].toInt();
else
textStyle->bgColor.a = 255;
}
- if (equalIgnoringCase(color.left(3), "rgb")) {
- size_t startPos = color.find("(");
- size_t endPos = color.find(")");
+ if (equalIgnoringCase(editorState.color.left(3), "rgb")) {
+ size_t startPos = editorState.color.find("(");
+ size_t endPos = editorState.color.find(")");
- String value = color.substring(startPos + 1, endPos - startPos - 1);
+ String value = editorState.color.substring(startPos + 1, endPos - startPos - 1);
Vector<String> colorValues;
value.split(",", colorValues);
textStyle->color.r = colorValues[0].toInt();
textStyle->color.g = colorValues[1].toInt();
textStyle->color.b = colorValues[2].toInt();
- if (equalIgnoringCase(color.left(4), "rgba"))
+ if (equalIgnoringCase(editorState.color.left(4), "rgba"))
textStyle->color.a = colorValues[3].toInt();
else
textStyle->color.a = 255;
}
+ textStyle->fontSize = eina_stringshare_add(editorState.fontSize.utf8().data());
+ textStyle->hasComposition = editorState.hasComposition;
+
return textStyle;
}
{
EINA_SAFETY_ON_NULL_RETURN(textStyle);
+ if (textStyle->fontSize)
+ eina_stringshare_del(textStyle->fontSize);
+
delete textStyle;
}
#endif
return false;
#endif
}
+
+const char* ewk_text_style_font_size_get(Ewk_Text_Style* textStyle)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, 0);
+ return textStyle->fontSize;
+}
+
+Eina_Bool ewk_text_style_has_composition_get(Ewk_Text_Style* textStyle)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, false);
+ return textStyle->hasComposition;
+}
EAPI Eina_Bool ewk_text_style_position_get(Ewk_Text_Style* text_style, Evas_Point* start_point, Evas_Point* end_point);
EAPI Eina_Bool ewk_text_style_bg_color_get(Ewk_Text_Style* textStyle, int* r, int* g, int* b, int* a);
EAPI Eina_Bool ewk_text_style_color_get(Ewk_Text_Style* textStyle, int* r, int* g, int* b, int* a);
+EAPI const char* ewk_text_style_font_size_get(Ewk_Text_Style* textStyle);
+EAPI Eina_Bool ewk_text_style_has_composition_get(Ewk_Text_Style* textStyle);
#ifdef __cplusplus
}
#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
evas_object_image_native_surface_set(smartData->image, 0);
+ Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
+ impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
if (!ewk_view_is_opengl_backend(ewkView))
_ewk_view_composite(smartData);
#endif
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) && !ENABLE(TIZEN_WEBKIT2_EFL_WTR)
Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
- impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
+ impl->pageClient->updateVisibleContentRectSize(IntSize(width, height));
+ if (ewk_view_is_opengl_backend(ewkView))
+ impl->pageClient->displayViewport();
#endif
}
#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+ impl->pageClient->prepareRestoredVisibleContectRect();
impl->pageProxy->reload(/*reloadFromOrigin*/ false);
impl->informURLChange();
IntRect visibleRect = impl->pageClient->visibleContentRect();
IntPoint scrollPosition = visibleRect.location();
- // Do not adjust scroll position if selection rect (caret) is visible after scaling.
- if (!visibleRect.contains(selectionRect)) {
+ // Do not adjust scroll position if content is userscalable or selection rect (caret) is visible after scaling
+ if (impl->pageClient->userScalable() || !visibleRect.contains(selectionRect)) {
// set paddings
scrollPosition = IntPoint(selectionRect.x() - visibleRect.width() / 3, selectionRect.y() - visibleRect.height() / 3);
// If both input field's position x and selection rect can be displayed together,
scrollPosition.setX(focusedNodeRect.x());
}
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", scrollPosition.x(), scrollPosition.y(), newScaleFactor);
+#endif
+
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
impl->pageClient->setVisibleContentRect(IntRect(scrollPosition, impl->size()), newScaleFactor);
#else
// Multiple suspend of ActiveDOMObject makes unintended suspend/resume status of
// the ActiveDOMObject.
if (!impl->suspendedResources && (!impl->isWaitingForJavaScriptPopupReply || !impl->isWaitingForApplicationCachePermission || !impl->isWaitingForExceededQuotaPopupReply)) {
+ impl->pageProxy->suspendAnimations();
impl->pageProxy->suspendJavaScriptAndResource();
impl->suspendedResources = true;
}
// Multiple suspend of ActiveDOMObject makes unintended suspend/resume status of
// the ActiveDOMObject.
if (impl->suspendedResources && (!impl->isWaitingForJavaScriptPopupReply || !impl->isWaitingForApplicationCachePermission || !impl->isWaitingForExceededQuotaPopupReply)) {
+ impl->pageProxy->resumeAnimations();
impl->pageProxy->resumeJavaScriptAndResource();
impl->suspendedResources = false;
}
}
#endif
+#if ENABLE(TIZEN_BACKGROUND_DISK_CACHE)
+Eina_Bool ewk_view_foreground_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+ return true;
+}
+#endif
+
Evas_Object* ewk_view_screenshot_contents_get(const Evas_Object* ewkView, Eina_Rectangle viewArea, float scaleFactor, Evas* canvas)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
return true;
}
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+void ewkViewNotifyPopupReplyWaitingState(Evas_Object* ewkView, bool isWaiting)
+{
+ if (isWaiting)
+ evas_object_smart_callback_call(ewkView, "popup,reply,wait,start", 0);
+ else
+ evas_object_smart_callback_call(ewkView, "popup,reply,wait,finish", 0);
+}
+#endif
+
bool ewkViewRunJavaScriptAlert(Evas_Object* ewkView, WKStringRef alertText)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
}
#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void ewkViewDidGetTextStyleStateForSelection(Evas_Object* ewkView, int underlineState, int italicState, int boldState, const IntPoint& startPoint, const IntPoint& endPoint)
+void ewkViewTextStyleState(Evas_Object* ewkView, const IntPoint& startPoint, const IntPoint& endPoint)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
EditorState editorState = impl->page()->editorState();
-
- Ewk_Text_Style* textStyle = ewkTextStyleCreate(underlineState, italicState, boldState, startPoint, endPoint, editorState.bgColor, editorState.color);
+ Ewk_Text_Style* textStyle = ewkTextStyleCreate(editorState, startPoint, endPoint);
evas_object_smart_callback_call(ewkView, "text,style,state", static_cast<void*>(textStyle));
ewkTextStyleDelete(textStyle);
}
EAPI Eina_Bool ewk_view_visibility_set(Evas_Object* o, Eina_Bool enable);
//#endif
+//#if ENABLE(TIZEN_BACKGROUND_DISK_CACHE)
+/**
+ * Notify the foreground/background status of app.
+ *
+ * @param o view object that is in given status.
+ * @param enable EINA_TRUE to notify that page is foreground, EINA_FALSE otherwise.
+ *
+ * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_foreground_set(Evas_Object* o, Eina_Bool enable);
+//#endif
+
/**
* Returns the evas image object of the specified viewArea of page
*
void ewkViewCustomizeContextMenu(Evas_Object* ewkView, Ewk_Context_Menu* menu);
void ewkViewCustomContextMenuItemSelected(Evas_Object* ewkView, Ewk_Context_Menu_Item* item);
uint64_t ewkContextGetDatabaseQuota(Ewk_Context* ewkContext);
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+void ewkViewNotifyPopupReplyWaitingState(Evas_Object* ewkView, bool isWaiting);
+#endif
bool ewkViewRunJavaScriptAlert(Evas_Object* ewkView, WKStringRef alertText);
bool ewkViewRunJavaScriptConfirm(Evas_Object* ewkView, WKStringRef message);
bool ewkViewRunJavaScriptPrompt(Evas_Object* ewkView, WKStringRef message, WKStringRef defaultValue);
#endif
#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void ewkViewDidGetTextStyleStateForSelection(Evas_Object* ewkView, int underlineState, int italicState, int boldState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint);
-Ewk_Text_Style* ewkTextStyleCreate(int underlineState, int italicState, int boldState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint, const String& bgColor, const String& color);
+void ewkViewTextStyleState(Evas_Object* ewkView, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint);
+Ewk_Text_Style* ewkTextStyleCreate(const WebKit::EditorState editorState, const WebCore::IntPoint& startPoint, const WebCore::IntPoint& endPoint);
void ewkTextStyleDelete(Ewk_Text_Style* textStyle);
#endif
TIZEN_LOGI("result(%d)", result);
if (result == SERVICE_RESULT_SUCCEEDED) {
- char* resultFilename = 0;
- int ret = service_get_extra_data(reply, SERVICE_DATA_SELECTED, &resultFilename);
+ char** resultFilename[] = {0, };
+ int length = 0;
+ int ret = service_get_extra_data_array(reply, SERVICE_DATA_SELECTED, &(*resultFilename), &length);
if (ret != SERVICE_ERROR_NONE)
return;
- if (resultFilename) {
- Eina_List* list = 0;
- int len = strlen(resultFilename) + 1;
- char* fileName = static_cast<char*>(malloc(sizeof(char) * len));
- memset(fileName, 0, sizeof(char) * len);
- strcpy(fileName, resultFilename);
- list = eina_list_append(list, fileName);
+ if (length) {
+ Eina_List* list = 0;
+ for (int i = 0; i < length; ++i) {
+ char* result = *resultFilename[i];
+ int len = strlen(result) + 1;
+ char* fileName = static_cast<char*>(malloc(sizeof(char) * len));
+ memset(fileName, 0, sizeof(char) * len);
+ strcpy(fileName, result);
+ list = eina_list_append(list, fileName);
+ }
ewk_view_open_panel_reply(openPanel->ewkView(), list, true);
} else {
ewk_view_open_panel_reply(openPanel->ewkView(), 0, false);
service_set_operation(svcHandle, SERVICE_OPERATION_CREATE_CONTENT);
service_set_mime(svcHandle, "image/jpg");
service_add_extra_data(svcHandle, "CALLER", "webkit");
+ service_add_extra_data(svcHandle, "http://tizen.org/appcontrol/data/camera/allow_switch", "false");
int ret = service_send_launch_request(svcHandle, _cameraResultCb, this);
if (ret != SERVICE_ERROR_NONE) {
service_set_operation(svcHandle, SERVICE_OPERATION_CREATE_CONTENT);
service_set_mime(svcHandle, "video/3gp");
service_add_extra_data(svcHandle, "CALLER", "webkit");
+ service_add_extra_data(svcHandle, "http://tizen.org/appcontrol/data/camera/allow_switch", "false");
int ret = service_send_launch_request(svcHandle, _cameraResultCb, this);
if (ret != SERVICE_ERROR_NONE) {
if (editorState.updateEditorRectOnly)
return;
+#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+ if (!editorState.shouldIgnoreCompositionSelectionChange)
+ informTextStyleState();
+#endif
+
if (isTextSelectionMode()) {
if (!editorState.selectionIsRange) {
if (editorState.isContentEditable && !evas_object_focus_get(m_viewImpl->view())) {
setIsTextSelectionMode(false);
}
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- m_viewImpl->page()->getTextStyleStateForSelection();
-#endif
} else {
if (!isTextSelectionDowned() && !isTextSelectionHandleDowned()) {
updateHandlers();
showContextMenu();
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- m_viewImpl->page()->getTextStyleStateForSelection();
-#endif
}
}
}
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- else {
- if (editorState.isContentEditable && !editorState.selectionIsRange) {
- WebCore::IntRect caretRect;
- m_viewImpl->page()->getCaretPosition(caretRect);
- if (!caretRect.isEmpty()) {
- m_viewImpl->page()->getTextStyleStateForSelection();
- }
- }
- }
-#endif
}
void TextSelection::setIsTextSelectionMode(bool isTextSelectionMode)
evas_object_geometry_get(m_viewImpl->view(), &webViewX, &webViewY, &webViewWidth, &webViewHeight);
if ((editorLeftEvasPoint.x() <= leftEvasPoint.x() && editorLeftEvasPoint.y() <= leftEvasPoint.y())
&& (webViewX <= leftEvasPoint.x() && webViewY <= leftEvasPoint.y())) {
- m_leftHandle->move(leftEvasPoint);
- m_leftHandle->show();
+ m_leftHandle->move(leftEvasPoint, m_viewImpl->transformToScene().mapRect(leftRect));
+ m_leftHandle->show();
}
if ((editorRightEvasPoint.x() >= rightEvasPoint.x() && editorRightEvasPoint.y() >= rightEvasPoint.y())
&& ((webViewX + webViewWidth) >= rightEvasPoint.x() && (webViewY <= rightEvasPoint.y() && (webViewY + webViewHeight) >= rightEvasPoint.y()))) {
- m_rightHandle->move(rightEvasPoint);
+ m_rightHandle->move(rightEvasPoint, m_viewImpl->transformToScene().mapRect(rightRect));
m_rightHandle->show();
}
} else {
- m_leftHandle->move(leftEvasPoint);
+ m_leftHandle->move(leftEvasPoint, m_viewImpl->transformToScene().mapRect(leftRect));
m_leftHandle->show();
- m_rightHandle->move(rightEvasPoint);
+ m_rightHandle->move(rightEvasPoint, m_viewImpl->transformToScene().mapRect(rightRect));
m_rightHandle->show();
}
}
{
hideMagnifier();
showContextMenu();
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- m_viewImpl->page()->getTextStyleStateForSelection();
-#endif
}
bool TextSelection::isMagnifierVisible()
return;
}
+ EditorState editorState = m_viewImpl->page()->editorState();
+ if (!editorState.selectionIsRange && editorState.isContentEditable)
+ setIsTextSelectionMode(false);
+
if (isShow) {
#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
if (m_viewImpl->pageClient->isClipboardWindowOpened())
showContextMenu();
} else if (!isStartedTextSelectionFromOutside)
setIsTextSelectionMode(false);
-
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- m_viewImpl->page()->getTextStyleStateForSelection();
-#endif
}
#if ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
TextSelectionHandle* TextSelection::getSelectedHandle(const IntPoint& position)
{
WebCore::IntRect leftHandleRect = m_leftHandle->getHandleRect();
- if (leftHandleRect.contains(position))
+ if (!leftHandleRect.isEmpty() && leftHandleRect.contains(position))
return m_leftHandle;
WebCore::IntRect rightHandleRect = m_rightHandle->getHandleRect();
- if (rightHandleRect.contains(position))
+ if (!rightHandleRect.isEmpty() && rightHandleRect.contains(position))
return m_rightHandle;
return 0;
m_rightHandle->setIsMouseDowned(false);
}
+void TextSelection::changeContextMenuPosition(WebCore::IntPoint& position)
+{
+ if (m_leftHandle->isTop()) {
+ IntRect handleRect = m_leftHandle->getHandleRect();
+ position.setY(position.y() - handleRect.height());
+ }
+}
+
+#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+void TextSelection::informTextStyleState()
+{
+ WebCore::IntPoint startPoint, endPoint;
+ WebCore::IntRect leftRect, rightRect;
+
+ WebCore::IntRect caretRect;
+ m_viewImpl->page()->getCaretPosition(caretRect);
+ if (!caretRect.isEmpty()) {
+ startPoint.setX(caretRect.x());
+ startPoint.setY(caretRect.y() + caretRect.height());
+
+ endPoint.setX(caretRect.x() + caretRect.width());
+ endPoint.setY(caretRect.y() + caretRect.height());
+ }
+ else if (m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect)) {
+ startPoint.setX(leftRect.x());
+ startPoint.setY(leftRect.y() + leftRect.height());
+
+ endPoint.setX(rightRect.x() + rightRect.width());
+ endPoint.setY(rightRect.y() + rightRect.height());
+ }
+
+ AffineTransform toEvasTransform = m_viewImpl->transformToScene();
+ WebCore::IntPoint startEvasPoint = toEvasTransform.mapPoint(startPoint);
+ WebCore::IntPoint endEvasPoint = toEvasTransform.mapPoint(endPoint);
+
+ ewkViewTextStyleState(m_viewImpl->view(), startEvasPoint, endEvasPoint);
+}
+#endif
} // namespace WebKit
#endif // TIZEN_WEBKIT2_TEXT_SELECTION
void requestToShow();
void initHandlesMouseDownedStatus();
+ void changeContextMenuPosition(WebCore::IntPoint& position);
+
friend class PageClientImpl; // to allow hideHandlers() call while zooming
private:
TextSelection(EwkViewImpl*);
static Eina_Bool showTimerCallback(void* data);
void showHandlesAndContextMenu();
+#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+ void informTextStyleState();
+#endif
+
private:
EwkViewImpl* m_viewImpl;
TextSelectionHandle* m_leftHandle;
Ecore_Job* TextSelectionHandle::s_job = 0;
TextSelectionHandle::TextSelectionHandle(Evas_Object* object, const char* themePath, const char* part, bool isLeft, TextSelection* textSelection)
- : m_isLeft(isLeft),
- m_textSelection(textSelection),
- m_position(IntPoint(0, 0)),
- m_isMouseDowned(false)
+ : m_isLeft(isLeft)
+ , m_widget(object)
+ , m_textSelection(textSelection)
+ , m_position(IntPoint(0, 0))
+ , m_isMouseDowned(false)
+ , m_isTop(false)
{
Evas* evas = evas_object_evas_get(object);
m_icon = edje_object_add(evas);
}
}
-void TextSelectionHandle::move(const IntPoint& point)
+void TextSelectionHandle::move(const IntPoint& point, const IntRect& selectionRect)
{
- evas_object_move(m_icon, point.x(), point.y());
- m_position = point;
+ IntPoint movePoint = point;
+ int x, y, deviceWidth, deviceHeight;
+ evas_object_geometry_get(m_widget, &x, &y, &deviceWidth, &deviceHeight);
+ IntRect handleRect = getHandleRect();
+
+ if ((movePoint.y() + handleRect.height()) > (y + deviceHeight)) {
+ movePoint.setY(movePoint.y() - selectionRect.height());
+ edje_object_signal_emit(m_icon, "elm,state,top", "elm");
+ m_isTop = true;
+ } else {
+ edje_object_signal_emit(m_icon, "elm,state,bottom", "elm");
+ m_isTop = false;
+ }
+
+ evas_object_move(m_icon, movePoint.x(), movePoint.y());
+ m_position = movePoint;
}
void TextSelectionHandle::show()
#if ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
const IntRect TextSelectionHandle::getHandleRect()
{
+ if (!evas_object_visible_get(m_icon))
+ return IntRect();
+
int x, y;
evas_object_geometry_get(m_icon, &x, &y, 0, 0);
TextSelectionHandle(Evas_Object* object, const char* path, const char* part, bool isLeft, TextSelection* textSelection);
~TextSelectionHandle();
- void move(const WebCore::IntPoint& point);
+ void move(const WebCore::IntPoint& point, const WebCore::IntRect& selectionRect);
void show();
void hide();
bool isLeft() const { return m_isLeft; }
#if ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
const WebCore::IntRect getHandleRect();
#endif
+ bool isTop() const { return m_isTop; }
void mouseDown(const WebCore::IntPoint& point);
void mouseMove(const WebCore::IntPoint& point);
private:
Evas_Object* m_icon;
+ Evas_Object* m_widget;
WebCore::IntPoint m_mousePosition;
static Ecore_Job* s_job;
bool m_isLeft;
WebCore::IntPoint m_firstDownMousePosition;
WebCore::IntPoint m_basePositionForMove;
bool m_isMouseDowned;
+ bool m_isTop;
};
} // namespace WebKit
#endif
#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
+ virtual void prepareRestoredVisibleContectRect() = 0;
virtual void pageDidRequestRestoreVisibleContentRect(const WebCore::IntPoint&, float) = 0;
#endif
#include "InputMethodContextEfl.h"
#endif
+#if ENABLE(TIZEN_VIEWPORT_META_TAG)
+#include <WebCore/EflScreenUtilities.h>
+#endif
+
// This controls what strategy we use for mouse wheel coalescing.
#define MERGE_WHEEL_EVENTS 1
, m_textZoomFactor(1)
, m_pageZoomFactor(1)
, m_pageScaleFactor(1)
- , m_intrinsicDeviceScaleFactor(1)
+ , m_intrinsicDeviceScaleFactor(getMobileDPI() / 160)
, m_customDeviceScaleFactor(0)
#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
, m_layerHostingMode(LayerHostingModeInWindowServer)
process()->responsivenessTimer()->stop();
m_alertReply = reply;
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ m_uiClient.notifyPopupReplyWaitingState(this, true);
+#endif
#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(true);
#endif
process()->responsivenessTimer()->stop();
m_confirmReply = reply;
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ m_uiClient.notifyPopupReplyWaitingState(this, true);
+#endif
#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(true);
#endif
process()->responsivenessTimer()->stop();
m_promptReply = reply;
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ m_uiClient.notifyPopupReplyWaitingState(this, true);
+#endif
#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(true);
#endif
#endif
void suspendPainting();
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
- void suspendPaintingOfInactiveView();
-#endif
void resumePainting();
void suspendJavaScriptAndResource();
void resumeJavaScriptAndResource();
+ void suspendAnimations();
+ void resumeAnimations();
+
#if ENABLE(TIZEN_PLUGIN_SUSPEND_RESUME)
void suspendPlugin();
void resumePlugin();
#endif
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
+ void purgeBackingStoresOfInactiveView();
+#endif
+
#endif // #if OS(TIZEN)
#if USE(TILED_BACKING_STORE)
#endif
#if ENABLE(TIZEN_ISF_PORT)
- void setInputMethodState(bool active);
int getCursorOffset();
void getSurroundingTextAndCursorOffset(String&, int&);
WebCore::IntRect getSelectionRect(bool);
void didRenderFrame();
#endif
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- void getTextStyleStateForSelection();
- void didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState);
-#endif
-
#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
void widgetMapped(uint64_t nativeWindowId);
#endif
UpdateSpellingUIWithMisspelledWord(WTF::String misspelledWord)
UpdateSpellingUIWithGrammarString(WTF::String badGrammarPhrase, WebCore::GrammarDetail grammarDetail)
GetGuessesForWord(WTF::String word, WTF::String context) -> (Vector<WTF::String> guesses)
-#if ENABLE(TIZEN_ISF_PORT)
- SetInputMethodState(bool active);
-#endif
#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
TextChangeInTextField(WTF::String name, WTF::String value)
#endif
SetBackgroundColor(double red, double green, double blue, double alpha)
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- DidGetTextStyleStateForSelection(int underlineState, int italicState, int boldState)
-#endif
-
#if ENABLE(SCREEN_ORIENTATION_SUPPORT) && ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT)
LockOrientation(int32_t orientation) -> (bool result)
UnlockOrientation()
Vector<RefPtr<WebPageProxy> > pages;
copyValuesToVector(m_pageMap, pages);
for (size_t i = 0, size = pages.size(); i < size; ++i)
- pages[i]->suspendPaintingOfInactiveView();
+ pages[i]->purgeBackingStoresOfInactiveView();
}
#endif
} // namespace WebKit
}
#if OS(TIZEN)
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+void WebUIClient::notifyPopupReplyWaitingState(WebPageProxy* page, bool isWaiting)
+{
+ return m_client.notifyPopupReplyWaitingState(toAPI(page), isWaiting, m_client.clientInfo);
+}
+#endif
+
bool WebUIClient::runJavaScriptAlert(WebPageProxy* page, const String& message, WebFrameProxy* frame)
{
#if ENABLE(TIZEN_WEBKIT2_EFL_WTR)
void unfocus(WebPageProxy*);
#if OS(TIZEN)
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ void notifyPopupReplyWaitingState(WebPageProxy*, bool);
+#endif
bool runJavaScriptAlert(WebPageProxy*, const String&, WebFrameProxy*);
bool runJavaScriptConfirm(WebPageProxy*, const String&, WebFrameProxy*);
bool runJavaScriptPrompt(WebPageProxy*, const String&, const String&, WebFrameProxy*);
, m_focused(false)
#if ENABLE(TIZEN_ISF_PORT)
, m_contextID(0)
- , m_useInputMethod(false)
, m_state(ECORE_IMF_INPUT_PANEL_STATE_HIDE)
, m_inputPickerType(-1)
#endif
void InputMethodContextEfl::updateTextInputState()
{
const EditorState& editor = m_viewImpl->page()->editorState();
- if (editor.shouldIgnoreCompositionSelectionChange)
+ if (editor.shouldIgnoreCompositionSelectionChange || editor.updateEditorRectOnly)
return;
- if (editor.isContentEditable && m_useInputMethod)
+ if (editor.isContentEditable)
showIMFContext(editor);
else
hideIMFContext();
ecore_imf_context_input_panel_return_key_type_set(context, returnKeyType);
}
-void InputMethodContextEfl::setUseInputMethod(bool use)
-{
- m_useInputMethod = use;
- updateTextInputState();
-}
-
PassOwnPtr<Ecore_IMF_Context> InputMethodContextEfl::takeContext(uintptr_t contextID)
{
size_t i = m_contextList.size();
void InputMethodContextEfl::showIMFContext(const EditorState& editor)
{
- if (isShow() && m_contextID == editor.inputMethodContextID)
+ if (!editor.isTapEventHandling || (isShow() && m_contextID == editor.inputMethodContextID))
return;
Ewk_Settings* settings = ewk_view_settings_get(m_viewImpl->view());
Vector<std::pair<uintptr_t, OwnPtr<Ecore_IMF_Context> > > m_contextList;
uintptr_t m_contextID;
- bool m_useInputMethod;
int m_state;
WebCore::IntRect m_imeRect;
int m_inputPickerType;
}
#if OS(TIZEN)
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+void PageUIClientEfl::notifyPopupReplyWaitingState(WKPageRef, bool isWaiting, const void* clientInfo)
+{
+ ewkViewNotifyPopupReplyWaitingState(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), isWaiting);
+}
+#endif
+
bool PageUIClientEfl::runJavaScriptAlert(WKPageRef, WKStringRef alertText, WKFrameRef, const void* clientInfo)
{
return ewkViewRunJavaScriptAlert(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), alertText);
uiClient.hideColorPicker = hideColorPicker;
#endif
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ uiClient.notifyPopupReplyWaitingState = notifyPopupReplyWaitingState;
+#endif
+
#if OS(TIZEN)
#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
uiClient.runBeforeUnloadConfirmPanel = runBeforeUnloadConfirmPanel;
static void closePage(WKPageRef, const void*);
static WKPageRef createNewPage(WKPageRef, WKURLRequestRef, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void*);
#if OS(TIZEN)
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ static void notifyPopupReplyWaitingState(WKPageRef, bool, const void*);
+#endif
static bool runJavaScriptAlert(WKPageRef, WKStringRef, WKFrameRef, const void*);
static bool runJavaScriptConfirm(WKPageRef, WKStringRef, WKFrameRef, const void*);
static bool runJavaScriptPrompt(WKPageRef, WKStringRef, WKStringRef, WKFrameRef, const void*);
void WebContext::notifyLowMemory()
{
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+ m_process->platformSurfaceTexturePool()->removeUnusedPlatformSurfaceTextures(m_process.get());
+#else
#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
m_process->releaseBackingStoreMemory();
#endif
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
- m_process->platformSurfaceTexturePool()->removeUnusedPlatformSurfaceTextures(m_process.get());
#endif
}
#if ENABLE(TIZEN_SOUP_COOKIE_CACHE_FOR_WEBKIT2)
#endif
#if ENABLE(TIZEN_ISF_PORT)
-void WebPageProxy::setInputMethodState(bool active)
-{
- InputMethodContextEfl* inputMethodContext = static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->inputMethodContext();
- if (!inputMethodContext)
- return;
-
- inputMethodContext->setUseInputMethod(active);
-}
-
int WebPageProxy::getCursorOffset()
{
if (!isValid())
process()->send(Messages::DrawingArea::SuspendPainting(), m_pageID);
}
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-void WebPageProxy::suspendPaintingOfInactiveView()
-{
- if (!isValid() || isViewVisible())
- return;
-
- process()->send(Messages::DrawingArea::SuspendPainting(), m_pageID);
-}
-#endif
-
void WebPageProxy::resumePainting()
{
if (!isValid())
process()->send(Messages::WebPage::ResumeJavaScriptAndResources(), m_pageID);
}
+void WebPageProxy::suspendAnimations()
+{
+ if (!isValid())
+ return;
+
+ process()->send(Messages::WebPage::SuspendAnimations(), m_pageID);
+}
+
+void WebPageProxy::resumeAnimations()
+{
+ if (!isValid())
+ return;
+
+ process()->send(Messages::WebPage::ResumeAnimations(), m_pageID);
+}
+
#if ENABLE(TIZEN_PLUGIN_SUSPEND_RESUME)
void WebPageProxy::suspendPlugin()
{
}
#endif
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
+void WebPageProxy::purgeBackingStoresOfInactiveView()
+{
+ if (!isValid() || isViewVisible())
+ return;
+
+ process()->send(Messages::LayerTreeCoordinator::PurgeBackingStores(), m_pageID);
+}
+#endif
+
#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
bool WebPageProxy::scrollOverflow(const FloatPoint& offset)
{
m_alertReply->send();
m_alertReply = nullptr;
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ m_uiClient.notifyPopupReplyWaitingState(this, false);
+#endif
#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
#endif
m_confirmReply->send(result);
m_confirmReply = nullptr;
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ m_uiClient.notifyPopupReplyWaitingState(this, false);
+#endif
#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
#endif
m_promptReply->send(result);
m_promptReply = nullptr;
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+ m_uiClient.notifyPopupReplyWaitingState(this, false);
+#endif
#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
#endif
}
#endif
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void WebPageProxy::getTextStyleStateForSelection()
-{
- process()->send(Messages::WebPage::GetTextStyleStateForSelection(), m_pageID, 0);
-}
-
-void WebPageProxy::didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState)
-{
- static_cast<PageClientImpl*>(m_pageClient)->didGetTextStyleStateForSelection(underlineState, italicState, boldState);
-}
-#endif
-
#if ENABLE(TIZEN_ICON_DATABASE)
void WebPageProxy::didReceiveIcon()
{
popupPosition.move(-scrollPosition.x(), -scrollPosition.y());
}
#endif
+ popupPosition.setX(popupPosition.x() + webViewX);
+ popupPosition.setY(popupPosition.y() + webViewY);
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-
- if ( m_pageClientImpl->isTextSelectionMode()) {
+ if (m_pageClientImpl->isTextSelectionMode()) {
elm_object_style_set(m_popup,"copypaste");
elm_ctxpopup_horizontal_set(m_popup, EINA_TRUE);
elm_ctxpopup_direction_priority_set(m_popup, ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_UP);
+
+ m_pageClientImpl->changeContextMenuPosition(popupPosition);
}
#endif
- evas_object_move(m_popup, popupPosition.x() + webViewX, popupPosition.y() + webViewY);
+ evas_object_move(m_popup, popupPosition.x(), popupPosition.y());
evas_object_show(m_popup);
evas_object_smart_callback_add(m_popup, "dismissed", contextMenuPopupDismissedCallback, m_pageClientImpl);
void WebEditorClient::setInputMethodState(bool active)
{
-#if ENABLE(TIZEN_ISF_PORT)
- m_page->send(Messages::WebPageProxy::SetInputMethodState(active));
- return;
-#endif
notImplemented();
}
if (dirtyRect.isEmpty())
return;
+#if OS(TIZEN)
+ m_webPage->didChangeContents(dirtyRect);
+#endif
+
if (m_layerTreeHost) {
ASSERT(m_dirtyRegion.isEmpty());
if (!m_isPaintingEnabled)
return;
+#if OS(TIZEN)
+ m_webPage->didChangeContents(scrollRect);
+#endif
+
if (m_layerTreeHost) {
ASSERT(m_scrollRect.isEmpty());
ASSERT(m_scrollOffset.isEmpty());
result.hasComposition = frame->editor()->hasComposition();
result.shouldIgnoreCompositionSelectionChange = frame->editor()->ignoreCompositionSelectionChange();
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) || ENABLE(TIZEN_ISF_PORT)
+#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+ if (!result.shouldIgnoreCompositionSelectionChange) {
+ result.underlineState = frame->editor()->selectionHasStyle(CSSPropertyWebkitTextDecorationsInEffect, "underline");
+ result.italicState = frame->editor()->selectionHasStyle(CSSPropertyFontStyle, "italic");
+ result.boldState = frame->editor()->selectionHasStyle(CSSPropertyFontWeight, "bold");
+ result.bgColor = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyBackgroundColor);
+ result.color = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyColor);
+ result.fontSize = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyFontSize);
+ }
+#endif
+
+#if ENABLE(TIZEN_ISF_PORT) || ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
Element* rootEditableElement = frame->selection()->rootEditableElement();
if (!rootEditableElement)
return result;
result.editorRect = nodeRect(rootEditableElement);
-
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- result.bgColor = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyBackgroundColor);
- result.color = frame->editor()->selectionStartCSSPropertyValue(CSSPropertyColor);
-#endif
#endif
#if ENABLE(TIZEN_ISF_PORT)
+ result.isTapEventHandling = (currentEvent() && currentEvent()->type() == WebEvent::GestureSingleTap);
+
if (!result.shouldIgnoreCompositionSelectionChange && result.isContentEditable) {
result.inputMethodContextID = reinterpret_cast<uintptr_t>(rootEditableElement);
Settings* settings = m_page->settings();
#if OS(TIZEN)
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" args type: [%d], scale: [%.1f, %.1f, %.1f], layout: [%.1f, %.1f], userScalable: [%.1f]"
+ , static_cast<int>(m_page->viewportArguments().type), m_page->viewportArguments().initialScale
+ , m_page->viewportArguments().minimumScale, m_page->viewportArguments().maximumScale
+ , m_page->viewportArguments().width, m_page->viewportArguments().height, m_page->viewportArguments().userScalable);
+#endif
+
// As android and iphone does, we set layout width to 980 for desktop content
int minimumLayoutFallbackWidth = settings->layoutFallbackWidth();
#else
if (m_viewportSize == size)
return;
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" viewportSize: [%d, %d]", size.width(), size.height());
+#endif
+
m_viewportSize = size;
sendViewportAttributesChanged();
#if USE(TILED_BACKING_STORE)
void WebPage::pageDidRequestScroll(const IntPoint& point)
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" scroll position: [%d, %d]", point.x(), point.y());
+#endif
send(Messages::WebPageProxy::PageDidRequestScroll(point));
}
#endif
#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
void WebPage::pageDidRequestRestoreVisibleContentRect(const IntPoint& point, float scale)
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" scale factor: [%.2f], scroll position: [%d, %d]", scale, point.x(), point.y());
+#endif
send(Messages::WebPageProxy::pageDidRequestRestoreVisibleContentRect(point, scale));
}
#endif
void suspendJavaScriptAndResources();
void resumeJavaScriptAndResources();
+
+ void suspendAnimations();
+ void resumeAnimations();
+
#if ENABLE(TIZEN_SYNC_REQUEST_ANIMATION_FRAME)
void suspendAnimationController();
void resumeAnimationController();
WebCore::HTTPHeaderMap customHeaders();
#endif
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- void getTextStyleStateForSelection();
-#endif
-
#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
#endif
void useSettingsFont();
#endif
+#if OS(TIZEN)
+ void didChangeContents(const WebCore::IntRect&);
+#endif
+
private:
WebPage(uint64_t pageID, const WebPageCreationParameters&);
#endif
SuspendJavaScriptAndResources()
ResumeJavaScriptAndResources()
+
+ SuspendAnimations()
+ ResumeAnimations()
#endif
#if ENABLE(TIZEN_WEB_STORAGE)
CreatePagesToPDF(WebCore::IntSize surfaceSize, WebCore::IntSize contentsSize, WTF::String fileName)
#endif
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
- GetTextStyleStateForSelection()
-#endif
-
#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
WidgetMapped(int64_t id)
#endif
mainFrame->loader()->resumeAllLoaders();
}
+void WebPage::suspendAnimations()
+{
+ Frame* mainFrame = m_page->mainFrame();
+ if (!mainFrame)
+ return;
+
+ for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext())
+ frame->animation()->suspendAnimationsForDocument(frame->document());
+}
+
+void WebPage::resumeAnimations()
+{
+ Frame* mainFrame = m_page->mainFrame();
+ if (!mainFrame)
+ return;
+
+ for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext())
+ frame->animation()->resumeAnimationsForDocument(frame->document());
+}
+
#if ENABLE(TIZEN_SYNC_REQUEST_ANIMATION_FRAME)
void WebPage::suspendAnimationController()
{
}
#endif
-#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void WebPage::getTextStyleStateForSelection()
-{
- Frame* frame = m_page->focusController()->focusedOrMainFrame();
-
- int underlineState = frame->editor()->selectionHasStyle(CSSPropertyWebkitTextDecorationsInEffect, "underline");
- int italicState = frame->editor()->selectionHasStyle(CSSPropertyFontStyle, "italic");
- int boldState = frame->editor()->selectionHasStyle(CSSPropertyFontWeight, "bold");
-
- send(Messages::WebPageProxy::DidGetTextStyleStateForSelection(underlineState, italicState, boldState));
-}
-#endif
-
#if ENABLE(TIZEN_MULTIPLE_SELECT)
void WebPage::didChangeSelectedIndexForActivePopupMenuMultiple(Vector<int32_t> newIndex)
{
// If selection rect size is greater than editor rect size because of round operation,
// selection rect size should be changed to editor rect size.
if (size == 1) {
- Element* selectionRoot = focusedFrame->selection()->rootEditableElement();
- if (selectionRoot) {
- IntRect editorRect = focusedFrame->view()->contentsToWindow(selectionRoot->getPixelSnappedRect());
+ Element* rootEditableElement = focusedFrame->selection()->rootEditableElement();
+ if (rootEditableElement) {
+ IntRect editorRect = nodeRect(rootEditableElement);
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
if (m_editorState.editorRect != editorRect) {
frameView->forceLayout();
}
#endif
+
+void WebPage::didChangeContents(const IntRect& rect)
+{
+ Frame* frame = m_page->focusController()->focusedOrMainFrame();
+ if (!frame || !frame->view() || frame->view()->needsLayout())
+ return;
+
+#if ENABLE(TIZEN_ISF_PORT) || ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+ if (m_editorState.isContentEditable && rect.intersects(m_editorState.editorRect) && frame->selection()->rootEditableElement()) {
+ IntRect currentEditorRect = nodeRect(frame->selection()->rootEditableElement());
+ if (m_editorState.editorRect != currentEditorRect) {
+ m_editorState.editorRect = currentEditorRect;
+ m_editorState.updateEditorRectOnly = true;
+ send(Messages::WebPageProxy::EditorStateChanged(m_editorState));
+ }
+ }
+#endif
+}
#endif // #if OS(TIZEN)
} // namespace WebKit
SET(PROJECT_VERSION_MAJOR 0)
SET(PROJECT_VERSION_MINOR 11)
-SET(PROJECT_VERSION_PATCH 59)
+SET(PROJECT_VERSION_PATCH 65)
SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
# -----------------------------------------------------------------------------
"3D Rendering": ["animations/3d", "transforms/3d"],
}
- # Ports which use compile-time feature detection should define this method and return
- # a dictionary mapping from symbol substrings to possibly disabled test directories.
- # When the symbol substrings are not matched, the directories will be skipped.
- # If ports don't ever enable certain features, then those directories can just be
- # in the Skipped list instead of compile-time-checked here.
- def _missing_symbol_to_skipped_tests(self):
- """Return the supported feature dictionary. The keys are symbol-substrings
- and the values are the lists of directories to skip if that symbol is missing."""
- return {
- "MathMLElement": ["mathml"],
- "GraphicsLayer": ["compositing"],
- "WebCoreHas3DRendering": ["animations/3d", "transforms/3d"],
- "WebGLShader": ["fast/canvas/webgl", "compositing/webgl", "http/tests/canvas/webgl"],
- "MHTMLArchive": ["mhtml"],
- "CSSVariableValue": ["fast/css/variables", "inspector/styles/variables"],
- }
-
def _has_test_in_directories(self, directory_lists, test_list):
if not test_list:
return False
if supported_feature_list is not None:
return reduce(operator.add, [directories for feature, directories in self._missing_feature_to_skipped_tests().items() if feature not in supported_feature_list])
- # Only check the symbols of there are tests in the test_list that might get skipped.
- # This is a performance optimization to avoid the calling nm.
- if self._has_test_in_directories(self._missing_symbol_to_skipped_tests().values(), test_list):
- # Runtime feature detection not supported, fallback to static dectection:
- # Disable any tests for symbols missing from the executable or libraries.
- symbols_string = self._symbols_string()
- if symbols_string is not None:
- return reduce(operator.add, [directories for symbol_substring, directories in self._missing_symbol_to_skipped_tests().items() if symbol_substring not in symbols_string], [])
-
# Failed to get any runtime or symbol information, don't skip any tests.
return []
port._options = MockOptions(webkit_test_runner=False)
self.assertEqual(port.path_to_test_expectations_file(), '/mock-checkout/LayoutTests/platform/testwebkitport/TestExpectations')
- def test_skipped_directories_for_symbols(self):
- # This first test confirms that the commonly found symbols result in the expected skipped directories.
- symbols_string = " ".join(["GraphicsLayer", "WebCoreHas3DRendering", "isXHTMLMPDocument", "fooSymbol"])
- expected_directories = set([
- "mathml", # Requires MathMLElement
- "fast/canvas/webgl", # Requires WebGLShader
- "compositing/webgl", # Requires WebGLShader
- "http/tests/canvas/webgl", # Requires WebGLShader
- "mhtml", # Requires MHTMLArchive
- "fast/css/variables", # Requires CSS Variables
- "inspector/styles/variables", # Requires CSS Variables
- ])
-
- result_directories = set(TestWebKitPort(symbols_string, None)._skipped_tests_for_unsupported_features(test_list=['mathml/foo.html']))
- self.assertEqual(result_directories, expected_directories)
-
- # Test that the nm string parsing actually works:
- symbols_string = """
-000000000124f498 s __ZZN7WebCore13GraphicsLayer12replaceChildEPS0_S1_E19__PRETTY_FUNCTION__
-000000000124f500 s __ZZN7WebCore13GraphicsLayer13addChildAboveEPS0_S1_E19__PRETTY_FUNCTION__
-000000000124f670 s __ZZN7WebCore13GraphicsLayer13addChildBelowEPS0_S1_E19__PRETTY_FUNCTION__
-"""
- # Note 'compositing' is not in the list of skipped directories (hence the parsing of GraphicsLayer worked):
- expected_directories = set(['mathml', 'transforms/3d', 'compositing/webgl', 'fast/canvas/webgl', 'animations/3d', 'mhtml', 'http/tests/canvas/webgl', 'fast/css/variables', 'inspector/styles/variables'])
- result_directories = set(TestWebKitPort(symbols_string, None)._skipped_tests_for_unsupported_features(test_list=['mathml/foo.html']))
- self.assertEqual(result_directories, expected_directories)
-
def test_skipped_directories_for_features(self):
supported_features = ["Accelerated Compositing", "Foo Feature"]
expected_directories = set(["animations/3d", "transforms/3d"])
Name: webkit2-efl
Summary: Webkit2 EFL
-Version: 123997_0.11.59
+Version: 123997_0.11.65
Release: 1
Group: Applications/Internet
License: LGPLv2.1 or BSD