WebKit/mac shouldn't have code for Mac 10.5 and earlier
https://bugs.webkit.org/show_bug.cgi?id=113746

Reviewed by Darin Adler.

Deleted the code for 10.5 and removed if-defs for 10.6.

* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView createPlugin]):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView createPlugin]):
(-[WebNetscapePluginView getVariable:forURL:value:length:]):
(-[WebNetscapePluginView _workaroundSilverlightFullscreenBug:]):
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::selectItemWritingDirectionIsNatural):
(WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection):
* WebCoreSupport/WebEditorClient.mm:
(core):
(WebEditorClient::checkTextOfParagraph):
(WebEditorClient::requestCheckingOfString):
* WebView/WebDynamicScrollBarsView.mm:
(-[WebDynamicScrollBarsView reflectScrolledClipView:]):
* WebView/WebFullScreenController.mm:
(-[WebFullScreenController _updateMenuAndDockForFullScreen]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
(-[WebHTMLView _frameOrBoundsChanged]):
(+[WebHTMLView _insertablePasteboardTypes]):
(-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
(-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
(writingDirectionKeyBindingsEnabled):
(-[WebHTMLView _lookUpInDictionaryFromMenu:]):
(-[WebHTMLView attachRootLayer:]):
* WebView/WebHTMLViewInternal.h:
* WebView/WebPDFDocumentExtras.mm:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebResourceInternal.h:
* WebView/WebScriptDebugDelegate.h:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _preferencesChanged:]):
(+[WebView initialize]):
(clientNeedsWebViewInitThreadWorkaround):
(-[WebView validateUserInterfaceItemWithoutDelegate:]):
(-[WebView setGrammarCheckingEnabled:]):
(-[WebView isAutomaticQuoteSubstitutionEnabled]):
(-[WebView isAutomaticLinkDetectionEnabled]):
(-[WebView isAutomaticDashSubstitutionEnabled]):
(-[WebView isAutomaticTextReplacementEnabled]):
(-[WebView isAutomaticSpellingCorrectionEnabled]):
(-[WebView _searchWithSpotlightFromMenu:]):
(WebInstallMemoryPressureHandler):
* WebView/WebViewPrivate.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r147402.
http://trac.webkit.org/changeset/147402
https://bugs.webkit.org/show_bug.cgi?id=112903

Source/WebCore: 

* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):

LayoutTests: 

* http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html:
* http/tests/security/XFrameOptions/x-frame-options-deny.html:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny.html:
* http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* platform/chromium/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [CodeMirror] do not show cursor in read-only mode
https://bugs.webkit.org/show_bug.cgi?id=113793

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-04-02
Reviewed by Alexander Pavlov.

No new tests.

Pass "nocursor" option to CodeMirror's "readonly" setting.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor.prototype.setReadOnly):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
When computing the percentage of the logical height, use the logical top and bottom
https://bugs.webkit.org/show_bug.cgi?id=113761

Reviewed by Ojan Vafai.

Source/WebCore:

Test: fast/writing-mode/percentage-height-orthogonal-writing-modes.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePercentageLogicalHeight):

LayoutTests:

* fast/writing-mode/percentage-height-orthogonal-writing-modes-expected.txt:
* fast/writing-mode/percentage-height-orthogonal-writing-modes.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Check whether popups are allowed before creating a new window
https://bugs.webkit.org/show_bug.cgi?id=113782

Reviewed by Adam Barth.

Source/WebCore:

Otherwise, firing a generated mouse event at an anchor is enough to
work around the popup blocker.

Test: fast/loader/url-selected-user-gesture.html

* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNewWindowPolicy):

LayoutTests:

* fast/loader/url-selected-user-gesture-expected.txt: Added.
* fast/loader/url-selected-user-gesture.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Dashboard refactor: Move dashboard specific history related features to History.
https://bugs.webkit.org/show_bug.cgi?id=113717

Reviewed by Ojan Vafai.

Each dashboard now creates its own History object, with a custom
configuration. This changes from just overriding global functions
to passing in callbacks for generatePage, handleValidHashParameter,
and handleQueryParameterChange. Same with passing in defaultStateValues
and DB_SPECIFIC_INVALIDATING_PARAMS, rather than overriding the global
variables.

All functions related to these features are now (mostly) private
function on History.

Loader no longer needs a loadingComplete callback, since it can just
initialize the history object itself.

* TestResultServer/static-dashboards/aggregate_results.js:
(handleValidHashParameter):
* TestResultServer/static-dashboards/dashboard_base.js:
* TestResultServer/static-dashboards/flakiness_dashboard.js:
(generatePage):
(.switch.return):
(handleQueryParameterChange):
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
(resetGlobals):
* TestResultServer/static-dashboards/history.js:
(.):
* TestResultServer/static-dashboards/loader.js:
(.):
* TestResultServer/static-dashboards/loader_unittests.js:
* TestResultServer/static-dashboards/timeline_explorer.js:
(generatePage):
(initCurrentBuilderTestResults):
* TestResultServer/static-dashboards/treemap.js:
(generatePage):
(.switch.return):
(handleQueryParameterChange):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [CodeMirror] Editor doesn't have yellow background in DivergedFromVM state
https://bugs.webkit.org/show_bug.cgi?id=113783

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

No new tests.

Force CodeMirrorTextEditor to have transparent background to inherit
background color from source frame.

* inspector/front-end/cm/cmdevtools.css:
(.CodeMirror):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: resource preview of html/js/css types should be on a grey background
https://bugs.webkit.org/show_bug.cgi?id=113791

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

No new tests.

- Add a css rule to set grey background for SourceFrame in resource view.
- Add "fill" style to SourceFrame element to setup its height.

* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame):
* inspector/front-end/resourceView.css:
(.resource-view .script-view):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[css exclusions] overflow:hidden undoes shape-outside offsets
https://bugs.webkit.org/show_bug.cgi?id=110349

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-04-02
Reviewed by Julien Chaffraix.

Source/WebCore:

When overflow: hidden was set on a float with shape-outside, the
offset from the shape-outside was being ignored. This was because the
float was being placed in the normal flow, causing the offsets to be
calculated differently. Since floats with shape outside behave like
positioned objects in many places, I have caused them to take the same
behavior as positioned objects in this case as well: the floats with
shape-outside do not get placed in the normal flow when overflow:
hidden is set.

Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overflow-hidden.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly): Floats that have
    shape-outside should not be in the normal flow.

LayoutTests:

Add a test to make sure the float is properly positioned with
overflow: hidden.

* fast/exclusions/shape-outside-floats/shape-outside-floats-overflow-hidden-expected.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-overflow-hidden.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[JSC] Don't create a JSValue if it's not going to be used for nullable attributes
https://bugs.webkit.org/show_bug.cgi?id=112711

Reviewed by Sam Weinig.

When nullable attributes are used, it's possible that we disregard the JSValue
when null should be returned instead. This is a waste, and we should cast the
native type to a JSValue as late as possible.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(NativeValueToLocal):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjAttrWithGetterException):
(WebCore::jsTestObjStringAttrWithGetterException):
(WebCore::jsTestObjWithScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjNullableDoubleAttribute):
(WebCore::jsTestObjNullableLongAttribute):
(WebCore::jsTestObjNullableBooleanAttribute):
(WebCore::jsTestObjNullableStringAttribute):
(WebCore::jsTestObjNullableLongSettableAttribute):
(WebCore::jsTestObjNullableStringValue):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsAttrWithGetterException):
(WebCore::jsTestTypedefsStringAttrWithGetterException):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: memory instrumentation for external arrays is broken
https://bugs.webkit.org/show_bug.cgi?id=113790

Source/WebCore:

Report pointers to external arrays as retaining ones to make sure their
size is counted correctly.

Reviewed by Pavel Feldman.

Test: inspector/profiler/memory-instrumentation-external-array.html

* inspector/InspectorMemoryAgent.cpp:

Source/WTF:

Reviewed by Pavel Feldman.

* wtf/MemoryInstrumentationArrayBufferView.h: report buffer pointer as retaining one as
we know that the pointer is not broken.
(WTF::reportMemoryUsage):

LayoutTests:

Test that JS external resources size includes size of JS external arrays
created in the inspected page.

Reviewed by Pavel Feldman.

* inspector/profiler/memory-instrumentation-external-array-expected.txt: Added.
* inspector/profiler/memory-instrumentation-external-array.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: memory instrumentation for external strings is broken
https://bugs.webkit.org/show_bug.cgi?id=113788

Source/WebCore:

Reviewed by Pavel Feldman.

Native memory snapshot now provides information about JS external strings.

Test: inspector/profiler/memory-instrumentation-external-string.html

* inspector/InspectorMemoryAgent.cpp:

LayoutTests:

Test that native memory snapshot contains information about extenral strings.

Reviewed by Pavel Feldman.

* inspector/profiler/memory-instrumentation-external-string-expected.txt: Added.
* inspector/profiler/memory-instrumentation-external-string.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Create a selection from two points irregardless of the caret position.
https://bugs.webkit.org/show_bug.cgi?id=113795

Patch by Nima Ghanavatian <nghanavatian@blackberry.com> on 2013-04-02
Reviewed by Rob Buis.

Internally reviewed by Mike Fenton.

PR276577
If we are to set both the base and extent of a selection, we should maintain the base upon setting the extent.
This prevents us from overwriting the previous calculation when setting extent.
Further, instead of setting and manipulating the selection, simply set up start and end VisiblePositions and
create a new directional selection so as to set the base and extent simultaneously.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::setSelection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Timeline] warning markers are not propagated to coalesced records
https://bugs.webkit.org/show_bug.cgi?id=113789

Reviewed by Pavel Feldman.

Source/WebCore:

Test: inspector/timeline/timeline-coalescing.html

* inspector/front-end/TimelinePresentationModel.js: set childHasWarning on coalescing record if the record it replaces had warnings.
(WebInspector.TimelinePresentationModel.prototype._replaceWithCoalescedRecord):

LayoutTests:

* inspector/timeline/timeline-coalescing-expected.txt: Added.
* inspector/timeline/timeline-coalescing.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Avoid using style.display="inline-block"
https://bugs.webkit.org/show_bug.cgi?id=113802

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

No new tests.

- Create class "inline-block" which will set "display: inline-block"
style.
- Use this class with DIV elements to get "inline-block" element.

* inspector/front-end/ObjectPopoverHelper.js:
(WebInspector.ObjectPopoverHelper.prototype.):
(WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
* inspector/front-end/inspector.css:
(.inline-block):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Skia] Enable GPU-accelerated Skia path for FEComposite filter.
https://bugs.webkit.org/show_bug.cgi?id=113797

Reviewed by Adrienne Walker.

Source/WebCore:

Tests: css3/filters/effect-reference-composite-hw.html
       css3/filters/effect-reference-composite.html

* WebCore.gypi:
* platform/graphics/filters/FEComposite.h:
Enable Skia DAG hook for FEComposite.
* platform/graphics/filters/skia/FECompositeSkia.cpp: Added.
(WebCore::FEComposite::createImageFilter):
Implement skia DAG builder for FEComposite, and implement generic
skia version of composite filter.

LayoutTests:

* css3/filters/effect-reference-composite-hw.html: Added.
* css3/filters/effect-reference-composite.html: Added.
* platform/chromium-linux/css3/filters/effect-reference-composite-expected.png: Added.
* platform/chromium-linux/css3/filters/effect-reference-composite-expected.txt: Added.
* platform/chromium-linux/css3/filters/effect-reference-composite-hw-expected.png: Added.
* platform/chromium-linux/css3/filters/effect-reference-composite-hw-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Viewport constrained elements should work properly with headers and footers
https://bugs.webkit.org/show_bug.cgi?id=113743

Reviewed by Simon Fraser.

Source/WebCore: 

ScrollableArea::constrainScrollPositionForOverhang() needs to take headerHeight 
and footerHeight into account. It also needs to use totalContentsSize() instead of 
contentsSize().

Send totalContentsSize() instead of contentsSize() and also send headerHeight() 
and footerHeight().
* page/FrameView.cpp:
(WebCore::FrameView::scrollOffsetForFixedPosition):
* page/FrameView.h:
(FrameView):

The scrolling tree will also need to know about header and footer heights since it 
will need these values to call 
ScrollableArea::constrainScrollPositionForOverhang().
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setHeaderHeight):
(WebCore::ScrollingStateScrollingNode::setFooterHeight):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::headerHeight):
(ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::footerHeight):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::headerHeight):
(WebCore::ScrollingTreeScrollingNode::footerHeight):
(ScrollingTreeScrollingNode):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollParameters):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):

Use footerHeight when calculating the maxValue and use headerHeight in determining 
what the minimum value is. 
* platform/ScrollableArea.cpp:
(WebCore::constrainedScrollPosition):
(WebCore::ScrollableArea::constrainScrollPositionForOverhang):
* platform/ScrollableArea.h:
(ScrollableArea):

LayoutTests: 

* platform/mac-wk2/tiled-drawing/fixed/four-bars-with-header-and-footer-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/fixed/four-bars-with-header-and-footer.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix Windows build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, chromium expectations update.

* platform/chromium/TestExpectations:


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