Commit fd7c5cf6 authored by bdakin@apple.com's avatar bdakin@apple.com

Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309

Expose fixed layout through WebKit SPI
-and corresponding-
<rdar://problem/8844464>

Reviewed by Anders Carlsson.

Source/WebCore: 

And now with getters!
* WebCore.exp.in:

WebKit/mac: 

And now with getters!
* WebView/WebView.mm:
(-[WebView _useFixedLayout]):
(-[WebView _fixedLayoutSize]):
* WebView/WebViewPrivate.h:

WebKit2: 

And now with getters!
* UIProcess/API/C/WKPage.cpp:
(WKPageUseFixedLayout):
(WKPageFixedLayoutSize):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::useFixedLayout):
(WebKit::WebPageProxy::fixedLayoutSize):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7791a801
2011-01-12 Beth Dakin <bdakin@apple.com>
Reviewed by Anders Carlsson.
Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309
Expose fixed layout through WebKit SPI
-and corresponding-
<rdar://problem/8844464>
And now with getters!
* WebCore.exp.in:
2011-01-12 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
......
......@@ -948,6 +948,8 @@ __ZNK7WebCore10RenderText9firstRunYEv
__ZNK7WebCore10ScrollView12contentsSizeEv
__ZNK7WebCore10ScrollView12documentViewEv
__ZNK7WebCore10ScrollView14scrollbarModesERNS_13ScrollbarModeES2_
__ZNK7WebCore10ScrollView14useFixedLayoutEv
__ZNK7WebCore10ScrollView15fixedLayoutSizeEv
__ZNK7WebCore10ScrollView16contentsToWindowERKNS_7IntRectE
__ZNK7WebCore10ScrollView16contentsToWindowERKNS_8IntPointE
__ZNK7WebCore10ScrollView18visibleContentRectEb
......
2011-01-12 Beth Dakin <bdakin@apple.com>
Reviewed by Anders Carlsson.
Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309
Expose fixed layout through WebKit SPI
-and corresponding-
<rdar://problem/8844464>
And now with getters!
* WebView/WebView.mm:
(-[WebView _useFixedLayout]):
(-[WebView _fixedLayoutSize]):
* WebView/WebViewPrivate.h:
2011-01-12 Beth Dakin <bdakin@apple.com>
Reviewed by Anders Carlsson.
......
......@@ -2682,6 +2682,32 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
view->forceLayout();
}
- (BOOL)_useFixedLayout
{
Frame* coreFrame = [self _mainCoreFrame];
if (!coreFrame)
return NO;
FrameView* view = coreFrame->view();
if (!view)
return NO;
return view->useFixedLayout();
}
- (NSSize)_fixedLayoutSize
{
Frame* coreFrame = [self _mainCoreFrame];
if (!coreFrame)
return IntSize();
FrameView* view = coreFrame->view();
if (!view)
return IntSize();
return view->fixedLayoutSize();
}
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit
{
return [self countMatchesForText:string options:(caseFlag ? 0 : WebFindOptionsCaseInsensitive) highlight:highlight limit:limit markMatches:YES];
......
......@@ -550,6 +550,9 @@ Could be worth adding to the API.
- (void)_setUseFixedLayout:(BOOL)fixed;
- (void)_setFixedLayoutSize:(NSSize)size;
- (BOOL)_useFixedLayout;
- (NSSize)_fixedLayoutSize;
// Deprecated. Use the methods in pending public above instead.
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit;
- (WebNSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit markMatches:(BOOL)markMatches;
......
2011-01-12 Beth Dakin <bdakin@apple.com>
Reviewed by Anders Carlsson.
Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309
Expose fixed layout through WebKit SPI
-and corresponding-
<rdar://problem/8844464>
And now with getters!
* UIProcess/API/C/WKPage.cpp:
(WKPageUseFixedLayout):
(WKPageFixedLayoutSize):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::useFixedLayout):
(WebKit::WebPageProxy::fixedLayoutSize):
2011-01-12 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
......@@ -275,6 +275,16 @@ void WKPageSetFixedLayoutSize(WKPageRef pageRef, WKSize size)
toImpl(pageRef)->setFixedLayoutSize(toIntSize(size));
}
bool WKPageUseFixedLayout(WKPageRef pageRef)
{
return toImpl(pageRef)->useFixedLayout();
}
WKSize WKPageFixedLayoutSize(WKPageRef pageRef)
{
return toAPI(toImpl(pageRef)->fixedLayoutSize());
}
double WKPageGetViewScaleFactor(WKPageRef pageRef)
{
return toImpl(pageRef)->viewScaleFactor();
......
......@@ -309,6 +309,8 @@ WK_EXPORT double WKPageGetViewScaleFactor(WKPageRef page);
WK_EXPORT void WKPageSetUseFixedLayout(WKPageRef page, bool fixed);
WK_EXPORT void WKPageSetFixedLayoutSize(WKPageRef page, WKSize size);
WK_EXPORT bool WKPageUseFixedLayout(WKPageRef pageRef);
WK_EXPORT WKSize WKPageFixedLayoutSize(WKPageRef pageRef);
WK_EXPORT void WKPageFindString(WKPageRef page, WKStringRef string, WKFindOptions findOptions, unsigned maxMatchCount);
WK_EXPORT void WKPageHideFindUI(WKPageRef page);
......
......@@ -245,6 +245,9 @@ public:
void setUseFixedLayout(bool);
void setFixedLayoutSize(const WebCore::IntSize&);
bool useFixedLayout() const { return m_useFixedLayout; };
const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; };
#if PLATFORM(MAC)
void sendAccessibilityPresenterToken(const CoreIPC::DataReference&);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment