iframe constrained by max-width in full screen
https://bugs.webkit.org/show_bug.cgi?id=118250

Patch by Zalan Bujtas <zalan@apple.com> on 2013-07-05
Reviewed by Antti Koivisto.

Ensure that contents inside iframe can go full screen properly.

Set max-width and max-height values to the default 'none', so that iframes are not
constrained when entering full screen.

Source/WebCore:

Test: fullscreen/full-screen-iframe-with-max-width-height.html

* css/fullscreen.css:
(iframe:-webkit-full-screen):

LayoutTests:

* fullscreen/full-screen-iframe-with-max-width-height-expected.txt: Added.
* fullscreen/full-screen-iframe-with-max-width-height.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wk2] Add API to lock the scroll position at the top or bottom of the page
https://bugs.webkit.org/show_bug.cgi?id=118429
<rdar://problem/14120323>

Reviewed by Anders Carlsson.

Test (API): WebKit2.ScrollPinningBehaviors

* WebCore.exp.in:
Expose FrameView::setScrollPinningBehavior.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
Our pinning behavior should be DoNotPin by default.

* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::minimumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
Fix the minimum scroll position's vertical location to the maximum if
we're pinned to the bottom, and vice-versa if we're pinned to the top.

(WebCore::FrameView::setScrollPinningBehavior): Added.
If scroll pinning behavior has changed, inform ScrollingCoordinator
and update scrollbars (which will also re-pin the scroll position).

* page/FrameView.h:
Override minimumScrollPosition, add setScrollPinningBehavior,
and storage for m_scrollPinningBehavior.

* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::setScrollPinningBehavior): Added.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):
Our pinning behavior should be DoNotPin by default.

(WebCore::ScrollingTree::setScrollPinningBehavior):
(WebCore::ScrollingTree::scrollPinningBehavior):
Getter/setter for m_scrollPinningBehavior, scrolling-thread-safe.

* page/scrolling/ScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::setScrollPinningBehavior):
Inform ScrollingTree of the scroll pinning behavior change.

* platform/ScrollTypes.h:
Add ScrollPinningBehavior enum.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/ScrollPinningBehaviors.cpp: Added.
(TestWebKitAPI::didFinishDocumentLoadForFrame):
(TestWebKitAPI::TEST):
Add a test that ensures that the three pinning modes (DoNotPin, PinToTop, PinToBottom)
all work correctly in the face of resizing the view and scrolling from JS.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
Pass the current ScrollPinningBehavior across to the WebPage upon creation.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetScrollPinningBehavior):
(WKPageSetScrollPinningBehavior):
* UIProcess/API/C/WKPagePrivate.h:
SPI to get/set the WebPageProxy's current ScrollPinningBehavior.
Convert between WK API type and WebCore enum.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::creationParameters):
Send ScrollPinningBehavior when creating a WebPage.

(WebKit::WebPageProxy::setScrollPinningBehavior):
Pass ScrollPinningBehavior changes across to the WebProcess (and save it
in WebPageProxy so it can be sent back across if the WebProcess crashes).

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::scrollPinningBehavior):
Getter/setter and storage for m_scrollPinningBehavior.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Inform new FrameViews of the current ScrollPinningBehavior.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Set our ScrollPinningBehavior based on our creation parameters.

(WebKit::WebPage::setScrollPinningBehavior):
Inform the FrameView of ScrollPinningBehavior changes.

* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::scrollPinningBehavior): Added.
(WebKit::WebPage::setScrollPinningBehavior): Added.
Add storage for m_scrollPinningBehavior.

* WebProcess/WebPage/WebPage.messages.in:
Add SetScrollPinningBehavior message.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Identify OS-level at build-time.
https://bugs.webkit.org/show_bug.cgi?id=118428

Reviewed by Anders Carlsson.

../WebCore: 

* DerivedSources.make: Activate legible output features if present.
* WebCorePrefix.h: Activate MSVC 2010 workarounds for CGFloat if
building with VS2010.
* config.h: Activate legible output features if present.

../WTF: 

* WTF.vcxproj/WTFGenerated.make: Check for Legible Output featurs
and set build environment as appropriate.
* wtf/Platform.h: Activate Legible Output features if present.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build correction.

* WTF.vcxproj/WTFGenerated.make: Use space (rather than double
quotes) when handling the no-Legible-Output case.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Nix upstreaming - Adding Nix render theme files
https://bugs.webkit.org/show_bug.cgi?id=118368

Patch by Tullio Lucena <tullio.lucena@openbossa.org> on 2013-07-05
Reviewed by Benjamin Poulain.

All files related to render theme stuff.

No new tests. They will be uploaded on another patch during the upstreaming process.

* platform/nix/RenderThemeNix.cpp: Added.
* platform/nix/RenderThemeNix.h: Added.
* platform/nix/ScrollbarThemeNix.cpp: Added.
* platform/nix/ScrollbarThemeNix.h: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152428 268f45cc-cd09-0410-ab3c-d52691b4dbfc