Add scroll view for new calendar picker
https://bugs.webkit.org/show_bug.cgi?id=110137

Reviewed by Kent Tamura.

Adding a scroll view class as part of the new calendar picker (Bug 109439).

No new tests. Code not yet used.

* Resources/pagepopups/calendarPicker.js:
(View):
(View.prototype.offsetRelativeTo): Returns the offset position of this view relative to the given ancestor element.
(View.prototype.attachTo): Attaches view to a node or view.
(View.prototype.bindCallbackMethods): Binds all methods starting with "on" to this.
(ScrollView): A custom scroll view that can contain extremely long content. CSS values have a limit. This can go beyond that.
(ScrollView.prototype.setWidth): Sets the view width.
(ScrollView.prototype.width):
(ScrollView.prototype.setHeight):Sets the view height.
(ScrollView.prototype.height):
(ScrollView.prototype.onScrollAnimatorStep): Callback for scroll animator step.
(ScrollView.prototype.scrollTo): Scrolls to a certain offset.
(ScrollView.prototype.scrollBy): Scrolls by a certain amount.
(ScrollView.prototype.contentOffset): Current content offset.
(ScrollView.prototype.onMouseWheel): Scroll with the mouse wheel.
(ScrollView.prototype.setContentOffset): Sets the content offset.
(ScrollView.prototype.contentPositionForContentOffset): Returns where the content element should be positioned.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused declaration: Element::removeCachedHTMLCollection()

Not reviewed by Antti Koivisto.

* dom/Element.h:
(Element):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Chromium] add a browser test for frames on timeline
https://bugs.webkit.org/show_bug.cgi?id=110592

- factor out timeline recording logic from testPageOverlayUpdate for reuse;
- record timeline while running a simple DOM-based animation;
- assure we have frames and Style Recalc/Layout/Paint events in between.

Reviewed by Yury Semikhatsky.

* src/js/Tests.js:
(.TestSuite.prototype.assertHasKey):
(.TestSuite.prototype.testTimelineFrames.step1):
(.TestSuite.prototype.testTimelineFrames.onTimelineRecorded):
(.TestSuite.prototype.testTimelineFrames):
(.TestSuite.prototype.testPageOverlayUpdate.step4):
(.TestSuite.prototype.testPageOverlayUpdate.onTimelineRecorded):
(.TestSuite.prototype.recordTimeline.addRecord):
(.TestSuite.prototype.recordTimeline.innerAddRecord):
(.TestSuite.prototype.recordTimeline.done):
(.TestSuite.prototype.recordTimeline):
(.TestSuite.prototype.stopTimeline):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ShareableElementData should use zero-length array for storage.
<http://webkit.org/b/109959>

Reviewed by Anders Carlsson.

Use a zero-length Attribute array instead of always casting from void* to an array.
It was done this way originally because I didn't know we could sidestep the MSVC
build error with some #pragma hackery and a default constructor for Attribute.

* dom/Attribute.cpp:
(WebCore::Attribute::Attribute):
* dom/DocumentSharedObjectPool.cpp:
(WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
* dom/Element.cpp:
(WebCore::sizeForShareableElementDataWithAttributeCount):
(WebCore::ShareableElementData::ShareableElementData):
(WebCore::ShareableElementData::~ShareableElementData):
(WebCore::UniqueElementData::UniqueElementData):
* dom/Element.h:
(ShareableElementData):
(WebCore::ElementData::attributeItem):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow child-frame content in hit-tests.
https://bugs.webkit.org/show_bug.cgi?id=95204

Reviewed by Julien Chaffraix.

Source/WebCore:

Refactors how EventHandler::hitTestResultAtPoint handles child-frame content,
it is now handled by the hit test itself controlled by the AllowChildFrameContent
flag in HitTestRequest.

This means that area-based hit-tests can now return elements from all the child frames
they intersect instead of just the one frame containing the center point. The improved
results from area-based hit-tests will among other things also improve touch adjustment
near frame boundaries.

Tests: fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html

* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):
    Recursion into child-frames have been moved to RenderFrameBase::nodeAtPoint, so
    now hitTestResultAtPoint just needs to set AllowChildFrameContent.
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::parentShadowHostOrOwner):
    New function to iterate up across frame boundaries.
(WebCore::TouchAdjustment::compileSubtargetList):
    We need to iterate up across frame boundaries to avoid iframes competing with their
    own content for touch adjustment.
* rendering/HitTestRequest.h:
(WebCore::HitTestRequest::allowsChildFrameContent):
(WebCore::HitTestRequest::isChildFrameHitTest):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::HitTestResult):
(WebCore::HitTestResult::operator=):
(WebCore::HitTestResult::append):
(WebCore::HitTestResult::dictationAlternatives):
* rendering/HitTestResult.h:
(WebCore::HitTestResult::pointInMainFrame):
(WebCore::HitTestResult::pointInInnerNodeFrame):
(HitTestResult):
    m_hitTestLocation is now in main frame coordinates, which make m_pointInMainFrame
    unnecessary, but requires the introduction of m_pointInInnerFrame, to remember
    the coordinates of inner-node in its own frame.
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::nodeAtPoint):
    The recursion into child-frames is now handled here instead of in hitTestResultAtPoint, this
    allows us to recurse into multiple frames, instead of just one.
* rendering/RenderFrameBase.h:
(RenderFrameBase):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):
    RenderLayer should not lie about being hit if the request is child-frame request.
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:
    Extended so nodesFromRect with child-frame content can be tested.

LayoutTests:

A new tests for nodesFromRect that returns result from child frames.

* fast/dom/nodesFromRect/nodesFromRect-child-frame-content-expected.txt: Added.
* fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html: Added.
* fast/dom/nodesFromRect/nodesFromRect-continuation-crash.html:
* fast/dom/nodesFromRect/resources/child-frame.html: Added.
* fast/dom/nodesFromRect/resources/nodesFromRect.js:
(check):
(checkShadowContent):
(nodesFromRectAsString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Skip failing tests on EFL bots.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: show source location after drawer views
https://bugs.webkit.org/show_bug.cgi?id=110156

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-02-22
Reviewed by Pavel Feldman.

- Add statusBarText method
- Add #drawer-view-anchor, which determines layout position of
drawerView
- Fix layout in #panel-status-bar to avoid floating elements.

No new tests.

* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.wasShown): Add statusBarItems before
drawer-view-anchor and statusBarText after.
(WebInspector.Panel.prototype.willHide): Remove statusBarText from DOM in the
way it's done for statusBarItems
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.statusBarText): Added.
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.statusBarText): Added.
(WebInspector.SourceFrame.prototype.statusBarItems):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.get statusBarItems):
* inspector/front-end/View.js:
(WebInspector.View.prototype.statusBarText):
* inspector/front-end/inspector.css:
(#drawer-view-anchor):
(.source-frame-cursor-position):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector.showViewInDrawer):
* inspector/front-end/timelinePanel.css:
(.timeline-records-stats):
(.timeline-records-stats-container):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Multiple Layout Test crashes (ASSERT) on chromium linux debug after r143727
https://bugs.webkit.org/show_bug.cgi?id=110609

Reviewed by Antonio Gomes.

Point based hit tests should not append but assign HitTestResults.

* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::nodeAtPoint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Canvas] do no show a single frame node in data grid
https://bugs.webkit.org/show_bug.cgi?id=110473

Reviewed by Pavel Feldman.

In a single canvas frame capture mode do not show the single "Frame #1" node.
Drive-by: Fix a wrong "this" pointer.

* inspector/front-end/CanvasProfileView.js:
(WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
(WebInspector.CanvasProfileView.prototype.appendDrawCallGroup):
(WebInspector.CanvasProfileView.prototype._flattenSingleFrameNode):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Added platform specific expected files after 143626.

* platform/qt-5.0-wk2/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt:
* platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt:
* platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt:
* platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt:
* platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32-bit build fix after r143706

* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::didReceiveData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] WebKit::initialize should take a Platform* now that WebKitPlatformSupport is empty
https://bugs.webkit.org/show_bug.cgi?id=110605

Reviewed by Adam Barth.

Part of a larger refactoring series; see tracking bug 82948.

* public/WebKit.h:
(WebKit):
* src/WebKit.cpp:
(WebKit::initialize):
(WebKit::initializeWithoutV8):
(WebKit::webKitPlatformSupport):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Add support for emulating legacy Android WebView 'setInitialScale' method
https://bugs.webkit.org/show_bug.cgi?id=109946

Adding a WebView method for permanently setting initial page scale.
This override has higher priority than any calculated page scale
and viewport meta tag value.

Also, this patch eliminates a dubious "fixed layout enabled, viewport disabled" mode
previously used by Android WebView.

Reviewed by Adam Barth.

* public/WebView.h:
(WebView):
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::setInitialPageScaleOverride):
(WebKit):
(WebKit::WebViewImpl::computePageScaleFactorLimits):
* src/WebViewImpl.h:
* tests/WebFrameTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove ProtocolHandler methods from ChromeClientBlackBerry
https://bugs.webkit.org/show_bug.cgi?id=110567

Patch by Carlos Garcia Campos <cargarcia@rim.com> on 2013-02-22
Reviewed by Rob Buis.

They were removed from ChromeClient in r122810 and are now
implemented in NavigatorContentUtilsClientBlackBerry since r131056.

* WebCoreSupport/ChromeClientBlackBerry.cpp:
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Add comments to checkTypeOrDieTrying()
https://bugs.webkit.org/show_bug.cgi?id=110553

Reviewed by Adam Barth.

It is mysterious how the check is helpful. We need comments.

No tests. Just added comments.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementation):
* bindings/v8/ScriptWrappable.h:
(ScriptWrappable):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r143678 and r143702.
http://trac.webkit.org/changeset/143678
http://trac.webkit.org/changeset/143702
https://bugs.webkit.org/show_bug.cgi?id=110613

Breaks fast/loader/stateobjects/state-url-sets-links-
visited.html in Chromium (Requested by abarth on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-22

* fast/js/resources/js-test-pre.js:
* fast/loader/stateobjects/state-url-sets-links-visited-expected.txt:
* fast/loader/stateobjects/state-url-sets-links-visited.html:
* platform/chromium-win/fast/loader/stateobjects/state-url-sets-links-visited-expected.txt: Copied from LayoutTests/fast/loader/stateobjects/state-url-sets-links-visited-expected.txt.
* platform/chromium/TestExpectations:
* platform/win/fast/loader/stateobjects/state-url-sets-links-visited-expected.txt: Copied from LayoutTests/fast/loader/stateobjects/state-url-sets-links-visited-expected.txt.
* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WTR] Do not dump information about empty subframes.
https://bugs.webkit.org/show_bug.cgi?id=110585

Reviewed by Simon Fraser.

Tools:

Follow DumpRenderTree more closely by skipping empty frames
(frames which have no document). We are not really interested in
showing anything about them.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::dumpDescendantFramesText): Do not print subframe names when they
have no associated Document.

LayoutTests:

Remove some platform-specific expectations now that the results match
the base expectations.

* platform/efl/TestExpectations: Unskip tests that are now passing.
* platform/mac-wk2/http/tests/security/cross-origin-xsl-BLOCKED-expected.txt: Removed.
* platform/mac-wk2/http/tests/security/cross-origin-xsl-redirect-BLOCKED-expected.txt: Removed.
* platform/qt-5.0-wk2/http/tests/security/cross-origin-xsl-BLOCKED-expected.txt: Removed.
* platform/qt-5.0-wk2/http/tests/security/cross-origin-xsl-redirect-BLOCKED-expected.txt: Removed.
* platform/win-wk2/http/tests/security/cross-origin-xsl-BLOCKED-expected.txt: Removed.
* platform/win-wk2/http/tests/security/cross-origin-xsl-redirect-BLOCKED-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Rename first/second to key/value in HashMap iterators
https://bugs.webkit.org/show_bug.cgi?id=110577

Patch by Carlos Garcia Campos <cargarcia@rim.com> on 2013-02-22
Reviewed by Rob Buis.

Iterators were renamed to key/value in r130612.

Source/WebCore:

* platform/blackberry/AuthenticationChallengeManager.cpp:
(WebCore::AuthenticationChallengeManager::pageVisibilityChanged):
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyMultipartHeaderReceived):

Source/WebKit/blackberry:

* WebKitSupport/NotificationManager.cpp:
(BlackBerry::WebKit::NotificationManager::show):
(BlackBerry::WebKit::NotificationManager::clearNotifications):
(BlackBerry::WebKit::NotificationManager::removeNotificationFromContextMap):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r143734.
http://trac.webkit.org/changeset/143734
https://bugs.webkit.org/show_bug.cgi?id=110615

Causes linux build failures. (Requested by vollick on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-22

* public/WebKit.h:
(WebKit):
* src/WebKit.cpp:
(WebKit::initialize):
(WebKit::initializeWithoutV8):
(WebKit::webKitPlatformSupport):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Roll ANGLE to r1833
https://bugs.webkit.org/show_bug.cgi?id=110513

Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE: 

Upstream ANGLE r1833 includes webkit side local fixes
1) r139758 build fix for -Wshorten-64-to-32
2) r139665 build fix for uninitialized variables

After this roll, WebKit side ANGLE is the same as upstream ANGLE r1833, except:
1) include/GLSLANG/ShaderLang.h, where "KHR" is removed from include path.

With this roll, we have EXT_draw_buffers support.
        
* ANGLE.xcodeproj/project.pbxproj:
* Target.pri:
* include/GLSLANG/ShaderLang.h:
* src/common/debug.cpp:
* src/common/system.h: Added.
* src/common/version.h:
* src/compiler/ArrayBoundsClamper.cpp: Removed.
* src/compiler/ArrayBoundsClamper.h: Removed.
* src/compiler/Compiler.cpp:
(TCompiler::TCompiler):
(TCompiler::Init):
(TCompiler::compile):
(TCompiler::getArrayBoundsClamper):
(TCompiler::getArrayIndexClampingStrategy):
(TCompiler::getBuiltInFunctionEmulator):
* src/compiler/DetectDiscontinuity.cpp:
(sh::DetectLoopDiscontinuity::traverse):
(sh::DetectLoopDiscontinuity::visitLoop):
(sh):
(sh::DetectLoopDiscontinuity::visitBranch):
* src/compiler/DetectDiscontinuity.h:
(DetectLoopDiscontinuity):
* src/compiler/Initialize.cpp:
(InitExtensionBehavior):
* src/compiler/Intermediate.cpp:
(TIntermConstantUnion::fold):
(TIntermTraverser::hash):
* src/compiler/MapLongVariableNames.cpp:
(LongNameMap::Size):
(MapLongVariableNames::mapGlobalLongName):
* src/compiler/MapLongVariableNames.h:
(LongNameMap):
* src/compiler/OutputESSL.cpp:
(TOutputESSL::TOutputESSL):
* src/compiler/OutputESSL.h:
(TOutputESSL):
* src/compiler/OutputGLSL.cpp:
(TOutputGLSL::TOutputGLSL):
* src/compiler/OutputGLSL.h:
(TOutputGLSL):
* src/compiler/OutputGLSLBase.cpp:
(TOutputGLSLBase::TOutputGLSLBase):
(TOutputGLSLBase::writeConstantUnion):
(TOutputGLSLBase::visitBinary):
* src/compiler/OutputGLSLBase.h:
(TOutputGLSLBase):
* src/compiler/OutputHLSL.cpp:
(sh::OutputHLSL::output):
(sh::OutputHLSL::visitLoop):
(sh::OutputHLSL::writeConstantUnion):
* src/compiler/ParseHelper.cpp:
(TParseContext::constructorErrorCheck):
(PaParseStrings):
* src/compiler/ParseHelper.h:
* src/compiler/ShHandle.h:
(TCompiler):
* src/compiler/ShaderLang.cpp:
(checkActiveUniformAndAttribMaxLengths):
(checkMappedNameMaxLength):
(getVariableInfo):
(ShInitBuiltInResources):
(ShCompile):
(ShGetInfo):
(ShGetActiveAttrib):
(ShGetActiveUniform):
(ShGetNameHashingEntry):
* src/compiler/SymbolTable.h:
(TFunction::getParamCount):
(TFunction::getParam):
(TSymbolTable::setDefaultPrecision):
* src/compiler/TranslatorESSL.cpp:
(TranslatorESSL::translate):
* src/compiler/TranslatorGLSL.cpp:
(TranslatorGLSL::translate):
* src/compiler/ValidateLimitations.cpp:
(ValidateLimitations::validateFunctionCall):
* src/compiler/VariablePacker.cpp:
(VariablePacker::GetNumRows):
* src/compiler/glslang.h:
* src/compiler/glslang.l:
* src/compiler/glslang.y:
* src/compiler/glslang_lex.cpp:
(string_input):
(glslang_scan):
* src/compiler/glslang_tab.cpp:
* src/compiler/preprocessor/ExpressionParser.cpp:
* src/compiler/preprocessor/ExpressionParser.y:
* src/compiler/preprocessor/Input.cpp:
(pp::Input::Input):
(pp::Input::read):
* src/compiler/preprocessor/Input.h:
(Input):
(pp::Input::count):
(pp::Input::string):
(pp::Input::length):
(Location):
* src/compiler/preprocessor/Preprocessor.cpp:
(pp::Preprocessor::init):
* src/compiler/preprocessor/Preprocessor.h:
(Preprocessor):
* src/compiler/preprocessor/Tokenizer.cpp:
(pp::Tokenizer::init):
* src/compiler/preprocessor/Tokenizer.h:
(Tokenizer):
* src/compiler/preprocessor/Tokenizer.l:
* src/third_party: Added.
* src/third_party/compiler: Added.
* src/third_party/compiler/ArrayBoundsClamper.cpp: Added.
(ArrayBoundsClamper::ArrayBoundsClamper):
(ArrayBoundsClamper::SetClampingStrategy):
(ArrayBoundsClamper::MarkIndirectArrayBoundsForClamping):
(ArrayBoundsClamper::OutputClampingFunctionDefinition):
* src/third_party/compiler/ArrayBoundsClamper.h: Added.
(ArrayBoundsClamper):
(ArrayBoundsClamper::Cleanup):
(ArrayBoundsClamper::GetArrayBoundsClampDefinitionNeeded):
(ArrayBoundsClamper::SetArrayBoundsClampDefinitionNeeded):
* src/third_party/compiler/LICENSE: Added.
* src/third_party/compiler/README.angle: Added.

Source/WebCore: 

* CMakeLists.txt:
* GNUmakefile.list.am:


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