diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-26 10:42:44 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-26 10:42:44 +0200 |
commit | 33b26980cb24288b5a9f2590ccf32a949281bb79 (patch) | |
tree | cc0203dac37338b24b0b25a4694c0b76d4e4164b /Source/WebKit2/Shared/API | |
parent | 715be629d51174233403237bfc563cf150087dc8 (diff) | |
download | qtwebkit-33b26980cb24288b5a9f2590ccf32a949281bb79.tar.gz |
Imported WebKit commit c596dd7f03007fa7ed896b928106497e8784b3b5 (http://svn.webkit.org/repository/webkit/trunk@129610)
New snapshot that removes QtQuick1 support (to be moved into QtQuick1 module)
Diffstat (limited to 'Source/WebKit2/Shared/API')
-rw-r--r-- | Source/WebKit2/Shared/API/c/WKPageLoadTypes.h | 7 | ||||
-rw-r--r-- | Source/WebKit2/Shared/API/c/WKSharedAPICast.h | 29 |
2 files changed, 36 insertions, 0 deletions
diff --git a/Source/WebKit2/Shared/API/c/WKPageLoadTypes.h b/Source/WebKit2/Shared/API/c/WKPageLoadTypes.h index ec8ae99f2..67500b40f 100644 --- a/Source/WebKit2/Shared/API/c/WKPageLoadTypes.h +++ b/Source/WebKit2/Shared/API/c/WKPageLoadTypes.h @@ -48,6 +48,13 @@ enum { }; typedef uint32_t WKSameDocumentNavigationType; +enum { + kWKDidFirstLayout = 1 << 0, + kWKDidFirstVisuallyNonEmptyLayout = 1 << 1, + kWKDidHitRelevantRepaintedObjectsAreaThreshold = 1 << 2 +}; +typedef uint32_t WKLayoutMilestones; + #ifdef __cplusplus } #endif diff --git a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h index 8a73a01fa..94a77e176 100644 --- a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h +++ b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h @@ -47,6 +47,7 @@ #include <WebCore/FloatRect.h> #include <WebCore/FrameLoaderTypes.h> #include <WebCore/IntRect.h> +#include <WebCore/LayoutMilestones.h> #include <wtf/TypeTraits.h> namespace WebKit { @@ -748,6 +749,34 @@ inline WKSameDocumentNavigationType toAPI(SameDocumentNavigationType type) return wkType; } +inline WKLayoutMilestones toWKLayoutMilestones(WebCore::LayoutMilestones milestones) +{ + unsigned wkMilestones = 0; + + if (milestones & WebCore::DidFirstLayout) + wkMilestones |= kWKDidFirstLayout; + if (milestones & WebCore::DidFirstVisuallyNonEmptyLayout) + wkMilestones |= kWKDidFirstVisuallyNonEmptyLayout; + if (milestones & WebCore::DidHitRelevantRepaintedObjectsAreaThreshold) + wkMilestones |= kWKDidHitRelevantRepaintedObjectsAreaThreshold; + + return wkMilestones; +} + +inline WebCore::LayoutMilestones toLayoutMilestones(WKLayoutMilestones wkMilestones) +{ + WebCore::LayoutMilestones milestones = 0; + + if (wkMilestones & kWKDidFirstLayout) + milestones |= WebCore::DidFirstLayout; + if (wkMilestones & kWKDidFirstVisuallyNonEmptyLayout) + milestones |= WebCore::DidFirstVisuallyNonEmptyLayout; + if (wkMilestones & kWKDidHitRelevantRepaintedObjectsAreaThreshold) + milestones |= WebCore::DidHitRelevantRepaintedObjectsAreaThreshold; + + return milestones; +} + inline ImageOptions toImageOptions(WKImageOptions wkImageOptions) { unsigned imageOptions = 0; |