WebKit-https.git
7 years agoAdd a way to update GraphicsLayerCA visibleRects without having to do a flush
simon.fraser@apple.com [Thu, 28 Mar 2013 05:18:42 +0000 (05:18 +0000)]
Add a way to update GraphicsLayerCA visibleRects without having to do a flush
https://bugs.webkit.org/show_bug.cgi?id=113459

Reviewed by Tim Horton.

Some platforms need to update TiledBacking visible rects from
outside of WebKit, for example if they use delegated scrolling.
They want to avoid forcing layout to be up-to-date when doing this.

Currently, updating the visibleRect happens when the GraphicsLayerCA
layer are being flushed, but that makes some assumptions about
layout being up-to-date.

To fix this, add a light-weight pass over the layer tree that
uses TransformState to compute the visibleRect for each
layer, and only if the visibleRect would cause a change in the
tiles in a TiledBacking trigger a layer flush.

* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::recomputeVisibleRects):
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveComputeVisibleRect):
(WebCore::GraphicsLayerCA::recomputeVisibleRects):
(WebCore::GraphicsLayerCA::computeVisibleRect):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::tilesWouldChangeForVisibleRect):
(WebCore::TileController::computeTileCoverageRect):
(WebCore::TileController::revalidateTiles):

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

7 years agoRename toScriptElement -> toScriptElementIfPossible
pdr@google.com [Thu, 28 Mar 2013 05:04:38 +0000 (05:04 +0000)]
Rename toScriptElement -> toScriptElementIfPossible
https://bugs.webkit.org/show_bug.cgi?id=113473

Reviewed by Ryosuke Niwa.

Rename ScriptElement::toScriptElement to ScriptElement::toScriptElementIfPossible to
differentiate this function from other to*Element functions, and to better describe the
function's behavior. Other to*Element functions do not return null if the cast fails,
whereas toScriptElementIfPossible does.

No new tests as this is just a refactoring.

* dom/ScriptElement.cpp:
(WebCore::toScriptElementIfPossible):
* dom/ScriptElement.h:
(WebCore):
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::timerFired):

    This is the only unchecked return value but there isn't a security issue here.

* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::collectOptionInnerText):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::attachLater):
(WebCore::HTMLConstructionSite::insertForeignElement):
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::requestPendingScript):
(WebCore::HTMLScriptRunner::runScript):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::notifyFinished):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):
(WebCore::XMLDocumentParser::endElementNs):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseStartElement):
(WebCore::XMLDocumentParser::parseEndElement):

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

7 years ago[Chromium] Unreviewed gardening. Test Expectations update.
shinyak@chromium.org [Thu, 28 Mar 2013 04:06:45 +0000 (04:06 +0000)]
[Chromium] Unreviewed gardening. Test Expectations update.

http/tests/cache/subresource-failover-to-network.html is failing.

* platform/chromium/TestExpectations:

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

7 years ago2013-03-27 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 28 Mar 2013 03:58:44 +0000 (03:58 +0000)]
2013-03-27  Geoffrey Garen  <ggaren@apple.com>

        Unreviewed build fix: Removed a dead field.

        Pointed out by Mark Lam.

        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::ByteCodeParser):
        (ByteCodeParser):

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

7 years ago2013-03-27 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 28 Mar 2013 03:54:58 +0000 (03:54 +0000)]
2013-03-27  Geoffrey Garen  <ggaren@apple.com>

        Unreviewed build fix: Removed a dead field.

        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::ByteCodeParser):
        (ByteCodeParser):

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

7 years agoRemoved some dead code in the DFG bytecode parser
ggaren@apple.com [Thu, 28 Mar 2013 03:41:11 +0000 (03:41 +0000)]
Removed some dead code in the DFG bytecode parser
https://bugs.webkit.org/show_bug.cgi?id=113472

Reviewed by Sam Weinig.

Now that Phi creation and liveness analysis are separate passes, we can
remove the vestiges of code that used to do that in the bytecode
parser.

* dfg/DFGByteCodeParser.cpp:
(ByteCodeParser):
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::parse):

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

7 years ago[WebKit2] Need SPI to determine whether a plug-in is blocked
weinig@apple.com [Thu, 28 Mar 2013 03:38:12 +0000 (03:38 +0000)]
[WebKit2] Need SPI to determine whether a plug-in is blocked
https://bugs.webkit.org/show_bug.cgi?id=113463

Reviewed by Anders Carlsson.

Add new SPI, WKContextCopyPlugInInfoForBundleIdetifier, to get data about a plug-in,
including whether it is blocked by x-protect.

* UIProcess/WebLoaderClient.cpp:
* UIProcess/API/C/WKAPICast.h:
(WebKit::toWKPluginLoadPolicy):
(WebKit::toPluginModuleLoadPolicy):
Move to a shared location.

* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextIsPlugInUpdateAvailable):
(WKPlugInInfoPathKey):
(WKPlugInInfoBundleIdentifierKey):
(WKPlugInInfoVersionKey):
(WKPlugInInfoLoadPolicyKey):
(WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
(WKContextCopyPlugInInfoForBundleIdetifier):
Add new SPI and dictionary keys.

* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
* UIProcess/Plugins/PluginInfoStore.h:
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
Add function to lookup plug-ins by bundle identifier.

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

7 years ago[Chromium] Unreviewed gardening. Test Expectations update.
shinyak@chromium.org [Thu, 28 Mar 2013 03:32:21 +0000 (03:32 +0000)]
[Chromium] Unreviewed gardening. Test Expectations update.

* platform/chromium/TestExpectations:

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

7 years agoDebug test fix after r147018.
rniwa@webkit.org [Thu, 28 Mar 2013 03:24:04 +0000 (03:24 +0000)]
Debug test fix after r147018.

toElement() asserts. What we want here is isElementNode().

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::attachLater):

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

7 years agoWKBundlePagePrivateMac.h is not being exported
bdakin@apple.com [Thu, 28 Mar 2013 03:24:00 +0000 (03:24 +0000)]
WKBundlePagePrivateMac.h is not being exported
https://bugs.webkit.org/show_bug.cgi?id=113470
-and corresponding-
<rdar://problem/13522909>

Reviewed by Sam Weinig.

Mark it as private instead of project.
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoAdd webp image color profile support
noel.gordon@gmail.com [Thu, 28 Mar 2013 03:04:45 +0000 (03:04 +0000)]
Add webp image color profile support
https://bugs.webkit.org/show_bug.cgi?id=113184

Reviewed by Eric Seidel.

Source/WebCore:

Requires libwebp version 0.3.0 (decoder ABI version 0x201). For images
with an ICC color profile chunk, poll the incremental decoder for the
current decoded height with the WebPIDecGetRGB() API and color correct
any newly decoded rows in-situ in the frame buffer.

Note: the ICC chunk appears before the encoded image frame in the webp
encoding (RIFF container) format. When the incremental decoder outputs
decoded pixels, enough encoded data has arrived to read the entire ICC
color profile data chunk.

Tests: fast/images/webp-color-profile-lossless.html
       fast/images/webp-color-profile-lossy-alpha.html
       fast/images/webp-color-profile-lossy.html

* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::WEBPImageDecoder):
(WebCore::WEBPImageDecoder::~WEBPImageDecoder): Call clear().
(WebCore):
(WebCore::WEBPImageDecoder::clear):
Added. Helper to clean up the webp decoder and color transform members.
(WebCore::WEBPImageDecoder::createColorTransform):
Create m_transform using the supplied profile memory data. Note that
the |deviceProfile| is not owned, but the |inputProfile| temporary is
so release it here with qcms_release_profile().
(WebCore::WEBPImageDecoder::readColorProfile):
Called once only when the decoder begins to output decoded rows of an
image containing an ICC chunk, to read the ICC color profile data from
the encoded data stream, verify it, and use it to create m_transform.
(WebCore::WEBPImageDecoder::applyColorProfile):
Since there is no row callback in libwebp, poll for the decoded height
of the image so far. If new rows are decoded, color correct the pixels
of those new rows and re-write them back into the frame buffer using
buffer.setRGBA() to 1) alpha pre-multiply the pixels if needed, and 2)
shuffle the pixel bytes into the platform's RGBA pixel endian-ness.
(WebCore::WEBPImageDecoder::decode):
If the container format indicates the image has an ICC color profile,
decode the image to RGBA format for subsequent input to the QCMS color
correction library in applyColorProfile().
* platform/image-decoders/webp/WEBPImageDecoder.h:
(WEBPImageDecoder):
(WebCore::WEBPImageDecoder::colorTransform): m_transform getter.

LayoutTests:

* fast/images/resources/webp-color-profile-lossless.webp: Added.
* fast/images/resources/webp-color-profile-lossy-alpha.webp: Added.
* fast/images/resources/webp-color-profile-lossy.webp: Added.
* fast/images/webp-color-profile-lossless-expected.txt: Added.
* fast/images/webp-color-profile-lossless.html: Added.
* fast/images/webp-color-profile-lossy-alpha-expected.txt: Added.
* fast/images/webp-color-profile-lossy-alpha.html: Added.
* fast/images/webp-color-profile-lossy-expected.txt: Added.
* fast/images/webp-color-profile-lossy.html: Added.
* platform/chromium-mac/fast/images/webp-color-profile-lossless-expected.png: Added.
* platform/chromium-mac/fast/images/webp-color-profile-lossy-alpha-expected.png: Added.
* platform/chromium-mac/fast/images/webp-color-profile-lossy-expected.png: Added.
* platform/chromium-win/fast/images/webp-color-profile-lossless-expected.png: Added.
* platform/chromium-win/fast/images/webp-color-profile-lossy-alpha-expected.png: Added.
* platform/chromium-win/fast/images/webp-color-profile-lossy-expected.png: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

7 years agoJIT and DFG should NaN-check loads from Float32 arrays
fpizlo@apple.com [Thu, 28 Mar 2013 02:47:00 +0000 (02:47 +0000)]
JIT and DFG should NaN-check loads from Float32 arrays
https://bugs.webkit.org/show_bug.cgi?id=113462
<rdar://problem/13490804>

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitFloatTypedArrayGetByVal):

LayoutTests:

* fast/js/dfg-float32-array-nan-expected.txt: Added.
* fast/js/dfg-float32-array-nan.html: Added.
* fast/js/jit-float32-array-nan-expected.txt: Added.
* fast/js/jit-float32-array-nan.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-float32-array-nan.js: Added.
(foo):
* fast/js/script-tests/jit-float32-array-nan.js: Added.

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

7 years agoRolling out r147044.
mark.lam@apple.com [Thu, 28 Mar 2013 02:19:52 +0000 (02:19 +0000)]
Rolling out r147044.
https://bugs.webkit.org/show_bug.cgi?id=113352.

Not Reviewed.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win:

* WebKit.vcproj/WebKitExports.def.in:

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

7 years ago[Chromium] Enable touch events in PagePopup
keishi@webkit.org [Thu, 28 Mar 2013 02:17:37 +0000 (02:17 +0000)]
[Chromium] Enable touch events in PagePopup
https://bugs.webkit.org/show_bug.cgi?id=113380

We want to use touch events inside the calendar picker. This patch adds
PagePopupChromeClient::needTouchEvents() and moved hasTouchEventHandlers()
from WebViewClient to WebWidgetClient.

Reviewed by Kent Tamura.

* public/WebViewClient.h:
* public/WebWidgetClient.h:
(WebWidgetClient):
(WebKit::WebWidgetClient::hasTouchEventHandlers): Moved from WebViewClient.
* src/WebPagePopupImpl.cpp:
(WebKit):

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

7 years agoGreening the Apple Win bot (debug build).
mark.lam@apple.com [Thu, 28 Mar 2013 01:55:12 +0000 (01:55 +0000)]
Greening the Apple Win bot (debug build).
https://bugs.webkit.org/show_bug.cgi?id=113352.

Not Reviewed.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win:

* WebKit.vcproj/WebKitExports.def.in:

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

7 years agoGreening the Apple Win bot.
mark.lam@apple.com [Thu, 28 Mar 2013 01:40:57 +0000 (01:40 +0000)]
Greening the Apple Win bot.
https://bugs.webkit.org/show_bug.cgi?id=113352.

Not Reviewed.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win:

* WebKit.vcproj/WebKitExports.def.in:

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

7 years agoRefactor validation checks for texture uploads
commit-queue@webkit.org [Thu, 28 Mar 2013 01:35:02 +0000 (01:35 +0000)]
Refactor validation checks for texture uploads
https://bugs.webkit.org/show_bug.cgi?id=111012

Patch by Jun Jiang <jun.a.jiang@intel.com> on 2013-03-27
Reviewed by Kenneth Russell.

Move the validation checks to the entry level of tex{Sub}Image2D, return early for invalid parameters and avoid duplicated checks.
Moreover, turn all the validation checks at the bottom level - tex{Sub}Image2DBase into assertions.

Already covered by current tests.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::copyTexSubImage2D):
(WebCore::WebGLRenderingContext::texImage2DBase):
(WebCore::WebGLRenderingContext::texImage2DImpl):
(WebCore::WebGLRenderingContext::validateTexFunc): A helper function for tex{Sub}Image2D to check input parameters.
(WebCore::WebGLRenderingContext::texImage2D):
(WebCore::WebGLRenderingContext::texSubImage2DBase):
(WebCore::WebGLRenderingContext::texSubImage2DImpl):
(WebCore::WebGLRenderingContext::texSubImage2D):
(WebCore::WebGLRenderingContext::validateHTMLImageElement):
(WebCore::WebGLRenderingContext::validateHTMLCanvasElement):
(WebCore::WebGLRenderingContext::validateHTMLVideoElement):
* html/canvas/WebGLRenderingContext.h:

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

7 years agoremove parentsOnly variable in codeGenerator.pm
commit-queue@webkit.org [Thu, 28 Mar 2013 01:11:26 +0000 (01:11 +0000)]
remove parentsOnly variable in codeGenerator.pm
https://bugs.webkit.org/show_bug.cgi?id=113457

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2013-03-27
Reviewed by Kentaro Hara.

Remove unused variable parentsOnly.

No new tests: no change in behaviour.

* bindings/scripts/CodeGenerator.pm:
(ForAllParents):
(AddMethodsConstantsAndAttributesFromParentInterfaces):
(ParseInterface):
(InheritsInterface):
(InheritsExtendedAttribute):
* bindings/scripts/CodeGeneratorV8.pm:
(BaseInterfaceName):

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

7 years agoSet WTF_ARM_ARCH_VERSION to correct value when used with MSVC
paroga@webkit.org [Thu, 28 Mar 2013 00:47:54 +0000 (00:47 +0000)]
Set WTF_ARM_ARCH_VERSION to correct value when used with MSVC
https://bugs.webkit.org/show_bug.cgi?id=113436

Reviewed by Benjamin Poulain.

.:

* Source/cmake/OptionsWinCE.cmake: CPU(ARM_TRADITIONAL) is now set correctly by Platform.h.

Source/WTF:

The Microsoft compiler defines _M_ARM with used ARM version.

* wtf/Platform.h:

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

7 years agoNeed WK2 API to give a WebView a header and footer
bdakin@apple.com [Thu, 28 Mar 2013 00:42:35 +0000 (00:42 +0000)]
Need WK2 API to give a WebView a header and footer
https://bugs.webkit.org/show_bug.cgi?id=113352
-and corresponding-
<rdar://problem/13383835>

Reviewed by Simon Fraser.

Source/WebCore:

This API will require RenderLayerCompositor to keep layers for the header and
footer when the exist. It also requires the scrolling machinery to know that the
size of the scrollable area will differ from the contentsSize when there is a
header or footer.

setWantsLayerForHeader() and setWantsLayerForFooter() return GraphicsLayers to
WK2. setHeaderHeight() and setFooterHeight() set the header and footer heights
respectively.
* WebCore.exp.in:
* page/FrameView.h:
(FrameView):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::setWantsLayerForHeader):
(WebCore::FrameView::setWantsLayerForFooter):
(WebCore::FrameView::setHeaderHeight):
(WebCore::FrameView::setFooterHeight):

Should use totalContentsSize() instead of contentsSize().
(WebCore::FrameView::windowClipRect):
(WebCore::FrameView::isScrollable):
* page/SpatialNavigation.cpp:
(WebCore::canScrollInDirection):

This should also use totalContentsSize() instead of contentsSize(), and while
we're at it, re-name the variable and function names in the scrolling tree code
from contentsSize to totalContentsSize.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setTotalContentsSize):
(WebCore::ScrollingStateScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::totalContentsSize):
(ScrollingStateScrollingNode):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::totalContentsSize):
(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::updateAfterChildren):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
(WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):

Use totalContentsSize() instead of contentsSize().
* platform/ScrollView.cpp:
(WebCore::ScrollView::maximumScrollPosition):
(WebCore::ScrollView::setScrollOffset):
(WebCore::ScrollView::overhangAmount):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::calculateOverhangAreasForPainting):

scrollOffset() represents the offset within the totalContentsSize, but that is
not what we need here. So subtract out the headerHeight() for the appropriate
value.
(WebCore::ScrollView::windowToContents):
(WebCore::ScrollView::contentsToWindow):

Use totalContentsSize() instead of contentsSize().
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::maximumScrollPosition):
(WebCore):
(WebCore::ScrollableArea::totalContentsSize):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::headerHeight):
(WebCore::ScrollableArea::footerHeight):
(ScrollableArea):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
(WebCore::ScrollAnimatorMac::pinnedInDirection):
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::ensuredView):

The rootContentLayer needs to be offset by the headerHeight().
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition):

New member variables m_layerForHeader and m_layerForFooter. This code properly
creates and manages them.
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
(WebCore::RenderLayerCompositor::reportMemoryUsage):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):

Test infrastructure.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setHeaderHeight):
(WebCore):
(WebCore::Internals::setFooterHeight):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

New API allows setting and getting layers for a header and footer.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/mac: Added.
* WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Added.
* WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Added.
(WKBundlePageGetHeaderLayer):
(WKBundlePageSetHeaderLayer):
(WKBundlePageGetFooterLayer):
(WKBundlePageSetFooterLayer):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setTopOverhangImage):
(WebKit::WebPage::setBottomOverhangImage):
(WebKit):
(WebKit::WebPage::getHeaderLayer):
(WebKit::WebPage::setHeaderLayerWithHeight):
(WebKit::WebPage::getFooterLayer):
(WebKit::WebPage::setFooterLayerWithHeight):

LayoutTests:

* platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing-with-page-scale-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing-with-page-scale.html: Added.
* platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing.html: Added.

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

7 years agojavascriptcore bindings do not check exception after calling valueToStringWithNullCheck
commit-queue@webkit.org [Thu, 28 Mar 2013 00:41:19 +0000 (00:41 +0000)]
javascriptcore bindings do not check exception after calling valueToStringWithNullCheck
https://bugs.webkit.org/show_bug.cgi?id=113219

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2013-03-27
Reviewed by Kentaro Hara.

Source/WebCore:

When converting JSValue to native value in attribute setter, store the
native value in a temporary variable. After this variable assignment,
always check if an exception has been raised.

Update binding tests.

Test: fast/dom/exception-in-binding.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GetNativeType):
(JSValueToNative):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
(WebCore::setJSTestInterfaceSupplementalStr2):
(WebCore::setJSTestInterfaceSupplementalNode):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjConstructorStaticStringAttr):
(WebCore::setJSTestObjEnumAttr):
(WebCore::setJSTestObjShortAttr):
(WebCore::setJSTestObjUnsignedShortAttr):
(WebCore::setJSTestObjLongAttr):
(WebCore::setJSTestObjLongLongAttr):
(WebCore::setJSTestObjUnsignedLongLongAttr):
(WebCore::setJSTestObjStringAttr):
(WebCore::setJSTestObjTestObjAttr):
(WebCore::setJSTestObjXMLObjAttr):
(WebCore::setJSTestObjCreate):
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedIntegralAttr):
(WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
(WebCore::setJSTestObjReflectedBooleanAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomIntegralAttr):
(WebCore::setJSTestObjReflectedCustomBooleanAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
(WebCore::setJSTestObjTypedArrayAttr):
(WebCore::setJSTestObjAttrWithGetterException):
(WebCore::setJSTestObjAttrWithSetterException):
(WebCore::setJSTestObjStringAttrWithGetterException):
(WebCore::setJSTestObjStringAttrWithSetterException):
(WebCore::setJSTestObjWithScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAttribute):
(WebCore::setJSTestObjWithScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::setJSTestObjConditionalAttr1):
(WebCore::setJSTestObjConditionalAttr2):
(WebCore::setJSTestObjConditionalAttr3):
(WebCore::setJSTestObjAnyAttribute):
(WebCore::setJSTestObjMutablePoint):
(WebCore::setJSTestObjImmutablePoint):
(WebCore::setJSTestObjStrawberry):
(WebCore::setJSTestObjStrictFloat):
(WebCore::setJSTestObjId):
(WebCore::setJSTestObjNullableLongSettableAttribute):
(WebCore::setJSTestObjNullableStringValue):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::setJSTestSerializedScriptValueInterfaceValue):
(WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::setJSTestTypedefsUnsignedLongLongAttr):
(WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
(WebCore::setJSTestTypedefsAttrWithGetterException):
(WebCore::setJSTestTypedefsAttrWithSetterException):
(WebCore::setJSTestTypedefsStringAttrWithGetterException):
(WebCore::setJSTestTypedefsStringAttrWithSetterException):

LayoutTests:

* fast/dom/exception-in-binding-expected.txt: Added.
* fast/dom/exception-in-binding.html: Added.
* platform/chromium/TestExpectations: new test fails for now

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

7 years agocache parsed interfaces in CodeGenerator.pm
commit-queue@webkit.org [Thu, 28 Mar 2013 00:39:23 +0000 (00:39 +0000)]
cache parsed interfaces in CodeGenerator.pm
https://bugs.webkit.org/show_bug.cgi?id=113446

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2013-03-27
Reviewed by Kentaro Hara.

When generating binding for an interface, informations about parent
interfaces are sometimes needed several times. This patch caches
those the parsed interface. When generating all WebCore bindings, this
results in a speedup of about 40% for JavaScriptCore and about 80% for
V8.

No new tests: no change in behaviour.

* bindings/scripts/CodeGenerator.pm:
(ParseInterface):

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

7 years agoExplicitly set editingBehavior in some tests.
csaavedra@igalia.com [Thu, 28 Mar 2013 00:33:25 +0000 (00:33 +0000)]
Explicitly set editingBehavior in some tests.
https://bugs.webkit.org/show_bug.cgi?id=113383

Reviewed by Ryosuke Niwa.

These tests make assumptions on how word selection works.
Actually, word selection will work differently depending on the
editingBehavior in place, see bug 110487, so the only way to
ensure the following tests will do word selection as expected is
to use Mac editing behavior.

* editing/deleting/delete-by-word-001.html: Call setEditingBehavior("mac").
* editing/deleting/list-item-1.html: ditto.
* editing/deleting/non-smart-delete.html: ditto.
* editing/deleting/smart-delete-002.html: ditto.
* editing/deleting/smart-delete-across-editable-boundaries.html: ditto.
* editing/execCommand/hilitecolor.html: ditto.
* editing/execCommand/remove-formatting-2.html: ditto.
* editing/inserting/4960120-2.html: ditto.
* editing/inserting/insert-paragraph-02.html: ditto. ditto.
* editing/inserting/insert-paragraph-03.html: ditto.
* editing/inserting/insert-paragraph-04.html: ditto.
* editing/inserting/paragraph-outside-nested-divs.html: ditto.
* editing/inserting/paragraph-separator-01.html: ditto.
* editing/inserting/paragraph-separator-02.html: ditto.
* editing/inserting/paragraph-separator-03.html: ditto.
* editing/pasteboard/4242293-1.html: ditto.
* editing/pasteboard/4806874.html: ditto.
* editing/pasteboard/5006779.html: ditto.
* editing/pasteboard/8145-2.html: ditto.
* editing/pasteboard/bad-placeholder.html: ditto.
* editing/pasteboard/copy-text-with-backgroundcolor.html: ditto.
* editing/pasteboard/drag-drop-modifies-page.html: ditto.
* editing/pasteboard/get-data-text-plain-drop.html: ditto.
* editing/pasteboard/insert-div-text-into-text.html: ditto.
* editing/pasteboard/merge-end-3.html: ditto.
* editing/pasteboard/merge-end-5.html: ditto.
* editing/pasteboard/merge-end-borders.html: ditto.
* editing/pasteboard/paste-blockquote-3.html: ditto.
* editing/pasteboard/paste-list-004.html: ditto.
* editing/pasteboard/pasting-object.html: ditto.
* editing/selection/4932260-2.html: ditto.
* editing/selection/extend-by-word-002.html: ditto.
* editing/selection/extend-forward-by-word-over-non-editable.html: ditto.
* editing/selection/transformed-selection-rects.html: ditto.
* editing/style/5046875-1.html: ditto.
* editing/style/5046875-2.html: ditto.
* editing/style/fore-color-by-name.html: ditto.
* editing/style/relative-font-size-change-002.html: ditto.
* editing/style/relative-font-size-change-003.html: ditto.
* editing/style/relative-font-size-change-004.html: ditto.
* editing/style/style-boundary-005.html: ditto.
* editing/text-iterator/first-letter-word-boundary.html: ditto.
* editing/undo/undo-combined-delete-boundary.html: ditto.
* editing/undo/undo-combined-delete.html: ditto.
* editing/undo/undo-delete-boundary.html: ditto.
* editing/undo/undo-delete.html: ditto.
* editing/undo/undo-forward-delete-boundary.html: ditto.
* editing/undo/undo-forward-delete.html: ditto.
* fast/dom/34176.html: ditto.
* platform/chromium-win/editing/deleting/non-smart-delete-expected.txt: Updated.
* platform/efl/editing/deleting/non-smart-delete-expected.txt: Updated.
* platform/gtk/editing/deleting/non-smart-delete-expected.txt: Updated.
* platform/qt/editing/deleting/non-smart-delete-expected.txt: Updated.

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

7 years agoRename Editing tests whose expectations are Mac specific
csaavedra@igalia.com [Thu, 28 Mar 2013 00:29:39 +0000 (00:29 +0000)]
Rename Editing tests whose expectations are Mac specific
https://bugs.webkit.org/show_bug.cgi?id=113414

Reviewed by Ryosuke Niwa.

These tests have expectations that assume that word selection
works always as in Mac and therefore will break when ran with
editingBehavior set, for instance, to Windows (see bug
110487). Rename them to have the suffix -mac and explicitly set
editingBehavior to Mac.

When the fix for 110487 lands, counterparts to these tests with
suffix -win, editingBehavior set to win, and updated expectations
will be added.

* editing/deleting/smart-editing-disabled-mac-expected.txt:
Renamed from
LayoutTests/editing/deleting/smart-editing-disabled-expected.txt.
* editing/deleting/smart-editing-disabled-mac.html: Renamed from
LayoutTests/editing/deleting/smart-editing-disabled.html.
* editing/execCommand/remove-format-multiple-elements-mac-expected.txt:
Renamed from
LayoutTests/editing/execCommand/remove-format-multiple-elements-expected.txt.
* editing/execCommand/remove-format-multiple-elements-mac.html:
Renamed from
LayoutTests/editing/execCommand/remove-format-multiple-elements.html.
* editing/execCommand/script-tests/remove-format-multiple-elements-mac.js:
Renamed from
LayoutTests/editing/execCommand/script-tests/remove-format-multiple-elements.js.
* editing/execCommand/script-tests/toggle-link-mac.js: Renamed
from LayoutTests/editing/execCommand/script-tests/toggle-link.js.
* editing/execCommand/toggle-link-mac-expected.txt: Renamed from
LayoutTests/editing/execCommand/toggle-link-expected.txt.
* editing/execCommand/toggle-link-mac.html: Renamed from
LayoutTests/editing/execCommand/toggle-link.html.
* editing/style/make-text-writing-direction-inline-mac-expected.txt:
Renamed from
LayoutTests/editing/style/make-text-writing-direction-inline-expected.txt.
* editing/style/make-text-writing-direction-inline-mac.html:
Renamed from
LayoutTests/editing/style/make-text-writing-direction-inline.html.
* editing/style/push-down-font-styles-mac-expected.txt: Renamed
from LayoutTests/editing/style/push-down-font-styles-expected.txt.
* editing/style/push-down-font-styles-mac.html: Renamed from
LayoutTests/editing/style/push-down-implicit-styles.html.
* editing/style/push-down-implicit-styles-around-list-mac-expected.txt:
Renamed from
LayoutTests/editing/style/push-down-implicit-styles-around-list-expected.txt.
* editing/style/push-down-implicit-styles-around-list-mac.html:
Renamed from
LayoutTests/editing/style/push-down-implicit-styles-around-list.html.
* editing/style/push-down-implicit-styles-mac-expected.txt:
Renamed from
LayoutTests/editing/style/push-down-implicit-styles-expected.txt.
* editing/style/push-down-implicit-styles-mac.html: Renamed from
LayoutTests/editing/style/push-down-font-styles.html.
* editing/style/script-tests/make-text-writing-direction-inline-mac.js:
Renamed from
LayoutTests/editing/style/script-tests/make-text-writing-direction-inline.js.
* editing/style/script-tests/push-down-font-styles-mac.js: Renamed
from
LayoutTests/editing/style/script-tests/push-down-font-styles.js.
* editing/style/script-tests/push-down-implicit-styles-around-list-mac.js:
Renamed from
LayoutTests/editing/style/script-tests/push-down-implicit-styles-around-list.js.
* editing/style/script-tests/push-down-implicit-styles-mac.js:
Renamed from
LayoutTests/editing/style/script-tests/push-down-implicit-styles.js.

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

7 years agoAdd a settings to disallow initializing background-size if background shorthand doesn...
commit-queue@webkit.org [Thu, 28 Mar 2013 00:25:18 +0000 (00:25 +0000)]
Add a settings to disallow initializing background-size if background shorthand doesn't include it.
https://bugs.webkit.org/show_bug.cgi?id=113363

Source/WebCore:

Patch by KyungTae Kim <ktf.kim@samsung.com> and Yongjun Zhang <yongjun_zhang@apple.com> on 2013-03-27
Reviewed by David Kilzer.

This is based on KyungTae Kim's patch in https://bugs.webkit.org/show_bug.cgi?id=97761.  Many legacy sites set
background-size first and then set background for setting background-image.  For backward-compatibility
in some WebKit based clients, if 'background' shorthand have no 'background-size' attribute, we could add
a settings to let the css parser not initialize 'background-size'.

Test: fast/backgrounds/background-shorthand-after-set-backgroundSize.html

* css/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext): initialize useLegacyBackgroundSizeShorthandBehavior.
(WebCore::operator==):
(WebCore::CSSParser::useLegacyBackgroundSizeShorthandBehavior): add a method to return if we want background-size
    to be initialized by background shorthand.
(WebCore):
(WebCore::CSSParser::parseFillShorthand): don't initialize background-size in background shorthand if we have
    useLegacyBackgroundSizeShorthandBehavior set to true.
* css/CSSParser.h:
(CSSParser):
* css/CSSParserMode.h: add member useLegacyBackgroundSizeShorthandBehavior to CSSParserContext.
(CSSParserContext):
* page/Settings.in: initialize useLegacyBackgroundSizeShorthandBehavior to false.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup): add the new settings useLegacyBackgroundSizeShorthandBehavior to Backup.
(WebCore::InternalSettings::Backup::restoreTo): restore useLegacyBackgroundSizeShorthandBehavior from Backup.
(WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior):
(WebCore):
* testing/InternalSettings.h:
(Backup):
(InternalSettings):
* testing/InternalSettings.idl: add a JS testing API setUseLegacyBackgroundSizeShorthandBehavior to turn on/off
    the new settings.

LayoutTests:

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2013-03-27
Reviewed by David Kilzer.

Add test for the new settings useLegacyBackgroundSizeShorthandBehavior.

* fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt: Added.
* fast/backgrounds/background-shorthand-after-set-backgroundSize.html: Added.

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

7 years agoRemove unused RenderLayer::renderBox{X,Y} methods
fmalita@chromium.org [Thu, 28 Mar 2013 00:18:09 +0000 (00:18 +0000)]
Remove unused RenderLayer::renderBox{X,Y} methods
https://bugs.webkit.org/show_bug.cgi?id=113408

Reviewed by Simon Fraser.

Minor cleanup - renderBoxX() and renderBox() are no longer used.

No new tests: no functional changes.

* rendering/RenderLayer.h:

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

7 years ago[BlackBerry] Show compositing on the Inspector timeline properly
commit-queue@webkit.org [Thu, 28 Mar 2013 00:18:06 +0000 (00:18 +0000)]
[BlackBerry] Show compositing on the Inspector timeline properly
https://bugs.webkit.org/show_bug.cgi?id=113416

Patch by Eli Fidler <efidler@blackberry.com> on 2013-03-27
Reviewed by Rob Buis.

The call to willComposite was too early and encompased the paint calls
as well.  Moving it lower will no longer encompass the paints.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):

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

7 years agoWeb Inspector: Plumb and expose cookie clearing options throughout the Resources...
commit-queue@webkit.org [Thu, 28 Mar 2013 00:16:07 +0000 (00:16 +0000)]
Web Inspector: Plumb and expose cookie clearing options throughout the Resources Cookies tree and views
https://bugs.webkit.org/show_bug.cgi?id=87140

Patch by PhistucK <phistuck@chromium.org> on 2013-03-27
Reviewed by Vsevolod Vlasov.

Added cookie clearing buttons and context menu options
throughout the tree and views.
Drive by -
- Made sure the delete button is only visible
when a cookie is selected.
- Fixed a wrong JSDoc comment.

* inspector/front-end/CookieItemsView.js:
(WebInspector.CookieItemsView):
(WebInspector.CookieItemsView.prototype.statusBarItems):
(WebInspector.CookieItemsView.prototype._updateWithCookies):
(WebInspector.CookieItemsView.prototype.clear):
Added. Clears the entire cookie view.
(WebInspector.CookieItemsView.prototype._clearButtonClicked):
Added. Ditto (when clicking on the button).
(WebInspector.CookieItemsView.prototype._showDeleteButton):
Added. Shows the delete button when selecting a cookie row.
* inspector/CookiesTable.js:
(WebInspector.CookiesTable):
(WebInspector.CookiesTable.prototype._clearAndRefresh):
Added. Clears the cookies of the current table and updates it.
(WebInspector.CookiesTable.prototype._handleContextMenuEvent):
Added. Manages the context menu within the table.
(WebInspector.CookiesTable.prototype.clear):
Added. Clears the cookies of the current table.
(WebInspector.CookiesTable.prototype.setCookies):
 Fixed a wrong JSDoc comment structure.
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.clearCookies):
Added. Clears the cookies of the given domain view.
(WebInspector.CookieTreeElement.prototype.onattach):
Added. Adds a contextmenu handler.
(WebInspector.CookieTreeElement.prototype._handleContextMenuEvent):
Added. Manages the context menu within cookie tree.
(WebInspector.CookieTreeElement.prototype._clearCookies):
Added. Clears the cookies of the view of the tree item.
* inspector/front-end/treeoutline.js:
(TreeOutline): Fixed a wrong JSDoc comment.

* English.lproj/localizedStrings.js:
Added strings for the context menu options.

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

7 years agoWeb Inspector: [DTE] implement "tokenAtTextPosition" method
commit-queue@webkit.org [Thu, 28 Mar 2013 00:14:34 +0000 (00:14 +0000)]
Web Inspector: [DTE] implement "tokenAtTextPosition" method
https://bugs.webkit.org/show_bug.cgi?id=113390

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

Source/WebCore:

Test: inspector/editor/text-editor-token-at-position.html

- Add TextEditor.tokenAtTextPosition method
- Implement tokenAtTextPosition method in DefaultTextEditor

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype.tokenAtTextPosition):
(WebInspector.TextEditorMainPanel.prototype.compare):
(WebInspector.TextEditorMainPanel.prototype.tokenAtTextPosition):
(WebInspector.TextEditorMainPanel.prototype._tokenAtUnhighlightedLine):
(WebInspector.TextEditorMainPanel.prototype.set mimeType):
(WebInspector.TextEditorMainPanel.prototype.get mimeType):
* inspector/front-end/TextEditor.js:
(WebInspector.TextEditor.prototype.tokenAtTextPosition):
* inspector/front-end/TextEditorHighlighter.js:
(WebInspector.TextEditorHighlighter):
(WebInspector.TextEditorHighlighter.prototype.get mimeType):
(WebInspector.TextEditorHighlighter.prototype.set mimeType):

LayoutTests:

Add a test to verify TextEditor.tokenAtTextPosition method.

* inspector/editor/text-editor-token-at-position-expected.txt: Added.
* inspector/editor/text-editor-token-at-position.html: Added.

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

7 years agoRemove build warning for unused function parameters in indexeddb.
charles.wei@torchmobile.com.cn [Thu, 28 Mar 2013 00:13:12 +0000 (00:13 +0000)]
Remove build warning for unused function parameters in indexeddb.
https://bugs.webkit.org/show_bug.cgi?id=113043

Reviewed by Tony Chang.

No new tests, just remove build warning.

* Modules/indexeddb/IDBCallbacks.h:
(WebCore::IDBCallbacks::onBlocked):
(WebCore::IDBCallbacks::onUpgradeNeeded):
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::stringToDirection):
* Modules/indexeddb/IDBCursor.h:
(IDBCursor):
* Modules/indexeddb/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::prefetchReset):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::transaction):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::setIndexesReady):
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::openKeyCursor):
* Modules/indexeddb/IDBLevelDBCoding.cpp:
(IDBLevelDBCoding):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore):
(WebCore::IDBObjectStore::openCursor):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::stringToMode):
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):

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

7 years agoREGRESSION (r146588): Cannot correctly display Chinese SNS Renren
commit-queue@webkit.org [Thu, 28 Mar 2013 00:11:41 +0000 (00:11 +0000)]
REGRESSION (r146588): Cannot correctly display Chinese SNS Renren
https://bugs.webkit.org/show_bug.cgi?id=113142

Patch by Sergey Ryazanov <serya@chromium.org> on 2013-03-27
Reviewed by Pavel Feldman.

Source/WebCore:

Changed CSS grammar to be equivalent to pre-r146588.
CSS error reporting disabled to prevent message overflow.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::isLoggingErrors):

LayoutTests:

* TestExpectations:
* fast/css/parsing-error-recovery.html:

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

7 years agoWeb Inspector: enhance Popover.js to rely on hover element coordinates
commit-queue@webkit.org [Thu, 28 Mar 2013 00:10:07 +0000 (00:10 +0000)]
Web Inspector: enhance Popover.js to rely on hover element coordinates
https://bugs.webkit.org/show_bug.cgi?id=113340

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

No new tests: no change in behaviour.

Introduce a coordinates-based method that checks if mouse is inside hover
element and use it in PopoverHelper instead of DOM hierarchy.

* inspector/front-end/Popover.js:
(WebInspector.PopoverHelper.prototype._eventInHoverElement): Added.
(WebInspector.PopoverHelper.prototype._mouseDown):
(WebInspector.PopoverHelper.prototype._mouseMove):
(WebInspector.PopoverHelper.prototype._mouseOut):

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

7 years agoWeb Inspector: [CodeMirror] fix webinspector-css theme for CodeMirror
commit-queue@webkit.org [Thu, 28 Mar 2013 00:08:12 +0000 (00:08 +0000)]
Web Inspector: [CodeMirror] fix webinspector-css theme for CodeMirror
https://bugs.webkit.org/show_bug.cgi?id=113399

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

Add style rule to highlight css properties for CodeMirror
webinspector-css theme.

No new tests: no change in behaviour.

* inspector/front-end/cm/cmdevtools.css:
(.cm-s-web-inspector-css span.cm-property):

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

7 years agoWeb Inspector: [DTE] paint overlay highlight for unhighlighted lines
commit-queue@webkit.org [Thu, 28 Mar 2013 00:05:17 +0000 (00:05 +0000)]
Web Inspector: [DTE] paint overlay highlight for unhighlighted lines
https://bugs.webkit.org/show_bug.cgi?id=113344

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

No new tests.

Remove fast-return condition from paintLine method that checked for
highlight existence.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype._paintLine):

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

7 years ago[BlackBerry] Populate the mime type of the WebContext for images
anilsson@rim.com [Thu, 28 Mar 2013 00:02:59 +0000 (00:02 +0000)]
[BlackBerry] Populate the mime type of the WebContext for images
https://bugs.webkit.org/show_bug.cgi?id=113272

Reviewed by George Staikos.

PR 278967

Populate the mime type using the file extension reported by the image
decoder. This way we benefit from file type sniffing, instead of
relying on the mime type reported by the resource response.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):

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

7 years agoRevision for the internal jhbuild is too old
commit-queue@webkit.org [Thu, 28 Mar 2013 00:01:44 +0000 (00:01 +0000)]
Revision for the internal jhbuild is too old
https://bugs.webkit.org/show_bug.cgi?id=113324

Patch by Mario Sanchez Prada <mario.prada@samsung.com> on 2013-03-27
Reviewed by Martin Robinson.

Update the minimum required version to a point where jhbuild won't
fail installing packages when trying to remove a symlink to a directory.

* jhbuild/jhbuild-wrapper: Updated revision.

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

7 years agoShift clicking on an element with -webkit-user-select: all doesn't extend selection
rniwa@webkit.org [Thu, 28 Mar 2013 00:01:41 +0000 (00:01 +0000)]
Shift clicking on an element with -webkit-user-select: all doesn't extend selection
https://bugs.webkit.org/show_bug.cgi?id=113270

Reviewed by Enrica Casucci.

Source/WebCore:

The bug was caused by updateSelectionForMouseDownDispatchingSelectStart always replacing selection whenever
the target node was inside an element with -webkit-suer-select even when we were attemping to extend selection
in handleMousePressEventSingleClick.

Fixed the bug by extracting this logic as a separate function (expandSelectionToRespectUserSelectAll) and deploying
it in handleMousePressEventSingleClick to extend selection as needed.

Test: editing/selection/user-select-all-with-shift.html

* page/EventHandler.cpp:
(WebCore::expandSelectionToRespectUserSelectAll): Extracted from updateSelectionForMouseDownDispatchingSelectStart.
(WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
(WebCore::EventHandler::selectClosestWordFromHitTestResult):
(WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
(WebCore::EventHandler::handleMousePressEventTripleClick):
(WebCore::EventHandler::handleMousePressEventSingleClick): Adjust "pos" as needed when extending selection.
Also use shouldConsiderSelectionAsDirectional() instead of manually peeking editingBehaviorType while we're at it.

LayoutTests:

Added a regression test for shift clicking on an element with -webkit-user-select: all.
Skip it on non-Mac platforms as -webkit-user-select: all hasn't been enabled on them.

* editing/selection/user-select-all-with-shift-expected.txt: Added.
* editing/selection/user-select-all-with-shift.html: Added.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

7 years agoREGRESSION(r143102): iframe with percentage height within table with anonymous cell...
commit-queue@webkit.org [Wed, 27 Mar 2013 23:59:52 +0000 (23:59 +0000)]
REGRESSION(r143102): iframe with percentage height within table with anonymous cell fails.
https://bugs.webkit.org/show_bug.cgi?id=113077

Source/WebCore:

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

http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level
"Anonymous block boxes are ignored when resolving percentage values that would refer to it:
the closest non-anonymous ancestor box is used instead."
When figuring out whether auto height needs to be applied on the current box, ignore anonymous
ancestors until the first non-anonymous containing block is found. This matches both
Firefox and Opera behaviour.

Test: fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight): Switch from
isAnonymousBlock() to isAnonymous() to make sure all anonymous boxes are ignored.
Remove isTableCell() check which is a noop as table cell isn't an anonymous block.

LayoutTests:

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

* fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell-expected.txt: Added.
* fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell.html: Added.

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

7 years ago[Qt] Add WOFF support when using zlib
pierre.rossi@gmail.com [Wed, 27 Mar 2013 23:57:50 +0000 (23:57 +0000)]
[Qt] Add WOFF support when using zlib
https://bugs.webkit.org/show_bug.cgi?id=112805

Reviewed by Allan Sandfeld Jensen.

Source/WebCore:

Covered by existing test:
fast/css/font-face-woff.html

* Target.pri: Conditional inclusion of WOFFFileFormat
* platform/graphics/qt/FontCustomPlatformDataQt.cpp:
(WebCore::createFontCustomPlatformData): Try to unpack WOFF data, otherwise spit out a warning and bail.
(WebCore::FontCustomPlatformData::supportsFormat): accept WOFF webfonts if USE(ZLIB).

LayoutTests:

* platform/qt-5.0-wk2/TestExpectations: keep skipped for WK2 due to a WTR bug.
* platform/qt/TestExpectations: unskip font-face-woff.html

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

7 years agoGrowing a position:absolute element in a position:relative one in a table does not...
robert@webkit.org [Wed, 27 Mar 2013 23:49:48 +0000 (23:49 +0000)]
Growing a position:absolute element in a position:relative one in a table does not update scrollHeight
https://bugs.webkit.org/show_bug.cgi?id=111977

Reviewed by David Hyatt.

Source/WebCore:

During simplified layout tables still need to know about overflow from positioned objects in any of
their cells.

Test: fast/table/cell-overflow-simplified-layout.html

* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::simplifiedNormalFlowLayout):
(WebCore):
* rendering/RenderTable.h:
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
(WebCore):
(WebCore::RenderTableSection::computeOverflowFromCells):
* rendering/RenderTableSection.h:
(RenderTableSection):

LayoutTests:

* fast/table/cell-overflow-simplified-layout-expected.html: Added.
* fast/table/cell-overflow-simplified-layout.html: Added.

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

7 years agoHonor the setting for whether JavaScript markup is enabled
ggaren@apple.com [Wed, 27 Mar 2013 23:45:11 +0000 (23:45 +0000)]
Honor the setting for whether JavaScript markup is enabled
https://bugs.webkit.org/show_bug.cgi?id=113122

Reviewed by Ryosuke Niwa.

Source/WebCore:

* dom/ScriptableDocumentParser.cpp:
(WebCore::ScriptableDocumentParser::ScriptableDocumentParser): Applied the
setting here, so all document parsing would be covered. This is similar
to what we do for plug-in stripping.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertForeignElement): Fixed a bug where
we would insert an SVG script element into the document even in script
markup disabled mode.

(This bug has existed for copy/paste for a long time, but other bugs and
quirks in SVG copy/paste papered over it. It's a serious issue now
that non-paste clients will rely on this mode.)

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): Fixed the same
bug -- this time in the part of the parser that executes scripts as they
parse.

I adopted the toScriptElement() convention for testing for a script
element to match the XML parser.

LayoutTests:

* editing/unsupported-content/script-markup-enabled-setting-expected.txt: Added.
* editing/unsupported-content/script-markup-enabled-setting.html: Added.

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

7 years agoCodeCache::m_capacity can becoming negative, producing undefined results in pruneSlowCase
mhahnenberg@apple.com [Wed, 27 Mar 2013 23:37:33 +0000 (23:37 +0000)]
CodeCache::m_capacity can becoming negative, producing undefined results in pruneSlowCase
https://bugs.webkit.org/show_bug.cgi?id=113453

Reviewed by Geoffrey Garen.

* runtime/CodeCache.cpp:
(JSC::CodeCacheMap::pruneSlowCase): We make sure that m_minCapacity doesn't drop below zero now.
This prevents m_capacity from doing the same.

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

7 years ago[GTK][jhbuild] gst-plugins-good mixes system libsoup-gnome with custom libsoup
kov@webkit.org [Wed, 27 Mar 2013 23:12:39 +0000 (23:12 +0000)]
[GTK][jhbuild] gst-plugins-good mixes system libsoup-gnome with custom libsoup
https://bugs.webkit.org/show_bug.cgi?id=113203

Reviewed by Philippe Normand.

We build our libsoup without GNOME support. gst-plugins-good does separate
pkg-config checks for libsoup-gnome and libsoup, causing the build to use
libsoup-gnome from the system and soup from the jhbuild prefix. This may lead to
build failures as the headers of those diverge. We do not use souphttpsrc, so
disable it when building gst-plugins-good.

* gtk/jhbuild.modules: disable soup support in gst-plugins-good.

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

7 years agoTamil translation for Gnome 3.6
kov@webkit.org [Wed, 27 Mar 2013 23:09:00 +0000 (23:09 +0000)]
Tamil translation for Gnome 3.6
https://bugs.webkit.org/show_bug.cgi?id=96995

Patch by Shantha kumar <shkumar@redhat.com> on 2013-03-27
Reviewed by Gustavo Noronha Silva (kov).

* ta.po: Added.

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

7 years agoGoing full screen and cancelling gets system into a weird state
jer.noble@apple.com [Wed, 27 Mar 2013 22:43:28 +0000 (22:43 +0000)]
Going full screen and cancelling gets system into a weird state
https://bugs.webkit.org/show_bug.cgi?id=113445

Reviewed by Eric Carlson.

Replace an array of BOOL member variables to track full screen state with a single enum, and
add state tracking for the "waiting to enter" and "waiting to exit" states. Use this new,
more specific enum to be more stringent about the state when responding to WebProcess
messages. Also only set the placeholder view's target once in full screen mode.

* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController isFullScreen]): Yes when in full screen, entering full screen,
    or waiting to enter full screen.
(-[WKFullScreenWindowController cancelOperation:]): Only requestExitFullScreen() if a watchdog
    has not already been made active.
(-[WKFullScreenWindowController enterFullScreen:]): Use the new state variable.
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto. Set the placeholder target.
(-[WKFullScreenWindowController exitFullScreen]): Ditto. Clear the placeholder target.
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
(-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
(-[WKFullScreenWindowController performClose:]): Ditto.
(-[WKFullScreenWindowController close]): Ditto.
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.

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

7 years agoChromium Mac fails to build after r146995 because the new NSFont category
dino@apple.com [Wed, 27 Mar 2013 22:07:23 +0000 (22:07 +0000)]
Chromium Mac fails to build after r146995 because the new NSFont category
may conflict with the system. Add the WebCoreTheme category to the whitelist.

Unreviewed.

* WebCore.gyp/WebCore.gyp:

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

7 years agoBuild fix after r146852. Please another reference to the Lion leaks builder.
rniwa@webkit.org [Wed, 27 Mar 2013 21:56:49 +0000 (21:56 +0000)]
Build fix after r146852. Please another reference to the Lion leaks builder.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

7 years agoBlind attempt at fixing the release build.
beidson@apple.com [Wed, 27 Mar 2013 21:31:39 +0000 (21:31 +0000)]
Blind attempt at fixing the release build.

* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):

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

7 years agoAnother Windows build fix attempt after r147004.
rniwa@webkit.org [Wed, 27 Mar 2013 21:04:07 +0000 (21:04 +0000)]
Another Windows build fix attempt after r147004.

* WebKit.vcproj/WebKitExports.def.in:

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

7 years agoSelection code spends a lot of time in InlineTextBox::localSelectionRect
rniwa@webkit.org [Wed, 27 Mar 2013 20:51:11 +0000 (20:51 +0000)]
Selection code spends a lot of time in InlineTextBox::localSelectionRect
https://bugs.webkit.org/show_bug.cgi?id=113364

Reviewed by Enrica Casucci.

Avoid computing the font width when we're selecting the entire line box.

This appears to be 25-26% improvement on Interactive/SelectAll:Time.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::localSelectionRect):

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

7 years agoWindows build fix attempt.
timothy@apple.com [Wed, 27 Mar 2013 20:47:51 +0000 (20:47 +0000)]
Windows build fix attempt.

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

7 years agoMem mapped resource data improvements.
beidson@apple.com [Wed, 27 Mar 2013 20:38:24 +0000 (20:38 +0000)]
Mem mapped resource data improvements.
<rdar://problem/13196481> and https://bugs.webkit.org/show_bug.cgi?id=113422

Reviewed by Alexey Proskuryakov (and looked over by Geoff Garen).

Remove timer-based approach support code:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::abortInProgressLoad):
(WebKit::NetworkResourceLoader::didFinishLoading):
* NetworkProcess/NetworkResourceLoader.h:

Add an object to encapsulate monitoring a resource going in to the disk cache.
It listens for a callback on the cached response indicating it is disk backed
and also sets a timeout so we don't keep the monitor alive and waiting forever.
* NetworkProcess/mac/DiskCacheMonitor.h: Added.
(WebKit::DiskCacheMonitor::destinationID):
(WebKit::DiskCacheMonitor::connectionToWebProcess):
(WebKit::DiskCacheMonitor::resourceRequest):
* NetworkProcess/mac/DiskCacheMonitor.mm: Added.
(CFCachedURLResponseSetBecameFileBackedCallBackBlock):
(WebKit::monitorFileBackingStoreCreation):
(WebKit::DiskCacheMonitor::DiskCachingMonitor):
(WebKit::DiskCacheMonitor::connection):

Refactoring and monitor certain cached responses:
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(CFCachedURLResponseGetMemMappedData):
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse): Use CFCachedURLResponseGetMemMappedData
  to explicitly get an mem-mapped data object.
(WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):
(WebKit::NetworkResourceLoader::willCacheResponseAsync): If the resource is over the minimum
  size then set up a disk caching monitor.

* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoAdd missing images from my previous commit.
timothy@apple.com [Wed, 27 Mar 2013 20:35:23 +0000 (20:35 +0000)]
Add missing images from my previous commit.

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

7 years agoAdd support for dock-to-right of the Web Inspector in the Mac port.
timothy@apple.com [Wed, 27 Mar 2013 20:34:39 +0000 (20:34 +0000)]
Add support for dock-to-right of the Web Inspector in the Mac port.

Unfortunately this requires Safari changes, so it is disabled in the nightly builds.

https://webkit.org/b/113341
rdar://problem/10368152

Reviewed by Joseph Pecoraro.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

* WebCore.exp.in:
* inspector/InspectorFrontendClient.h:
(InspectorFrontendClient):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore):
(WebCore::InspectorFrontendClientLocal::frontendLoaded):
(WebCore::InspectorFrontendClientLocal::requestSetDockSide):
(WebCore::InspectorFrontendClientLocal::canAttachWindow):
(WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
(WebCore::InspectorFrontendClientLocal::setAttachedWindow):
(WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowWidth):
* inspector/InspectorFrontendClientLocal.h:
(InspectorFrontendClientLocal):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setAttachedWindowWidth):
(WebCore):
* inspector/InspectorFrontendHost.h:
(InspectorFrontendHost):
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowWidth):
* inspector/front-end/externs.js:
(InspectorFrontendHostAPI.prototype.setAttachedWindowWidth):
* testing/Internals.cpp:

Source/WebKit/chromium:

* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::changeAttachedWindowWidth):
* src/InspectorFrontendClientImpl.h:
(InspectorFrontendClientImpl):

Source/WebKit/efl:

* WebCoreSupport/InspectorClientEfl.cpp:
(WebCore::InspectorFrontendClientEfl::attachWindow):
(WebCore::InspectorFrontendClientEfl::setAttachedWindowWidth):
* WebCoreSupport/InspectorClientEfl.h:
(InspectorFrontendClientEfl):

Source/WebKit/gtk:

* WebCoreSupport/InspectorClientGtk.cpp:
(WebKit::InspectorFrontendClient::attachWindow):
(WebKit::InspectorFrontendClient::setAttachedWindowWidth):
* WebCoreSupport/InspectorClientGtk.h:
(InspectorFrontendClient):

Source/WebKit/mac:

* Resources/Dock.pdf: Updated.
* WebCoreSupport/WebInspectorClient.h:
(WebInspectorFrontendClient):
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::frontendLoaded):
(WebInspectorFrontendClient::attachWindow):
(WebInspectorFrontendClient::setAttachedWindowWidth):
(-[WebInspectorWindowController attachWindow:]):
(-[WebInspectorWindowController attach]):
(-[WebInspectorWindowController detach]):
* WebInspector/WebInspectorFrontend.mm:
(-[WebInspectorFrontend attach]):

Source/WebKit/qt:

* WebCoreSupport/InspectorClientQt.cpp:
(WebCore::InspectorFrontendClientQt::frontendLoaded):
(WebCore::InspectorFrontendClientQt::attachWindow):
(WebCore::InspectorFrontendClientQt::setAttachedWindowWidth):
* WebCoreSupport/InspectorClientQt.h:
(InspectorFrontendClientQt):

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::frontendLoaded):
(WebInspectorFrontendClient::attachWindow):
(WebInspectorFrontendClient::setAttachedWindowWidth):
* WebCoreSupport/WebInspectorClient.h:
(WebInspectorFrontendClient):

Source/WebKit2:

* Resources/Dock.pdf: Removed.
* Resources/DockBottom.pdf: Added.
* Resources/DockRight.pdf: Added.
* Shared/WebPreferencesStore.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy):
(WebKit::WebInspectorProxy::attachBottom):
(WebKit::WebInspectorProxy::attachRight):
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::detach):
(WebKit::WebInspectorProxy::setAttachedWindowWidth):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::canAttach):
* UIProcess/WebInspectorProxy.h:
(WebInspectorProxy):
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter attachRight:]):
(-[WKWebInspectorProxyObjCAdapter attachBottom:]):
(-[WKWebInspectorWindow _cursorForResizeDirection:]):
(-[WKWebInspectorWindow _customTitleFrame]):
(WebKit::createDockButton):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
(WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::attachWindow):
(WebKit::WebInspectorFrontendClient::setAttachedWindowWidth):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
(WebInspectorFrontendClient):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::attachBottom):
(WebKit::WebInspector::attachRight):
(WebKit::WebInspector::setAttachedWindowWidth):
(WebKit::WebInspector::attachedBottom):
(WebKit::WebInspector::attachedRight):
(WebKit::WebInspector::detached):
* WebProcess/WebPage/WebInspector.h:
(WebInspector):
* WebProcess/WebPage/WebInspector.messages.in:

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

7 years agoUpdated Slovenian translation
kov@webkit.org [Wed, 27 Mar 2013 19:55:22 +0000 (19:55 +0000)]
Updated Slovenian translation
https://bugs.webkit.org/show_bug.cgi?id=113151

Patch by Matej Urbančič <mateju@svn.gnome.org> on 2013-03-27
Reviewed by Gustavo Noronha Silva (kov).

* sl.po: translation update.

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

7 years agoUnreviewed GTK gardening. Rebaselining after r146992.
zandobersek@gmail.com [Wed, 27 Mar 2013 18:54:05 +0000 (18:54 +0000)]
Unreviewed GTK gardening. Rebaselining after r146992.

* platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt:
* platform/gtk/fast/layers/video-layer-expected.txt:
* platform/gtk/media/audio-controls-rendering-expected.txt:
* platform/gtk/media/audio-repaint-expected.txt:
* platform/gtk/media/controls-after-reload-expected.txt:
* platform/gtk/media/controls-strict-expected.txt:
* platform/gtk/media/controls-styling-strict-expected.txt:
* platform/gtk/media/controls-without-preload-expected.txt:
* platform/gtk/media/video-controls-rendering-expected.txt:
* platform/gtk/media/video-display-toggle-expected.txt:
* platform/gtk/media/video-empty-source-expected.txt:
* platform/gtk/media/video-no-audio-expected.txt:
* platform/gtk/media/video-playing-and-pause-expected.txt:
* platform/gtk/media/video-volume-slider-expected.txt:
* platform/gtk/media/video-zoom-controls-expected.txt:

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

7 years ago[Mac] webkitClosedCaptionsVisible doesn't work
eric.carlson@apple.com [Wed, 27 Mar 2013 18:45:29 +0000 (18:45 +0000)]
[Mac] webkitClosedCaptionsVisible doesn't work
https://bugs.webkit.org/show_bug.cgi?id=113417

Reviewed by Jer Noble.

Source/WebCore:

Test: media/track/track-in-band-legacy-api.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Delete m_disableCaptions, it is no longer used.
(WebCore::HTMLMediaElement::configureTextTrackGroup): Pass this to textTrackSelectionScore.
(WebCore::HTMLMediaElement::setClosedCaptionsVisible):  Delete m_disableCaptions, it is no longer used.
* html/HTMLMediaElement.h: Ditto.

* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::textTrackSelectionScore): Add an HTMLMediaElement parameter.
* page/CaptionUserPreferences.h:

* page/CaptionUserPreferencesMac.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Return a score if the media element
    is showing captions, even if the preference says captions are disabled.

LayoutTests:

* media/track/track-in-band-legacy-api-expected.txt: Added.
* media/track/track-in-band-legacy-api.html: Added.

* platform/chromium/TestExpectations: Skip new test.
* platform/efl/TestExpectations: Ditto.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.
* platform/qt/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.

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

7 years ago[Mac] Text track menu items sometimes labeled incorrectly
eric.carlson@apple.com [Wed, 27 Mar 2013 18:33:16 +0000 (18:33 +0000)]
[Mac] Text track menu items sometimes labeled incorrectly
https://bugs.webkit.org/show_bug.cgi?id=113406

Reviewed by Jer Noble.

Source/WebCore:

media/video-controls-captions-trackmenu-localized.html was updated to test this.

* page/CaptionUserPreferencesMac.mm:
(WebCore::trackDisplayName): Use the 'label' attribute for the menu text when necessary.

LayoutTests:

* media/video-controls-captions-trackmenu-localized.html:
* platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt:

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

7 years agoInserting a blank (" ") at the end of a line does not insert anything in Overtype...
sergio@webkit.org [Wed, 27 Mar 2013 18:26:15 +0000 (18:26 +0000)]
Inserting a blank (" ") at the end of a line does not insert anything in Overtype mode
https://bugs.webkit.org/show_bug.cgi?id=113413

Reviewed by Ryosuke Niwa.

Source/WebCore:

Perform a "normal" insert instead of a replace when there is
nothing to replace (like at the end of a line) as this case is not
supported by the replacing code path. This will allow us to
properly rebalance whitespaces in those cases.

Updated the editing/execCommand/overtype.html test to check also
this use case.

* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::setEndingSelectionWithoutValidation):
(WebCore::InsertTextCommand::performTrivialReplace):
(WebCore::InsertTextCommand::performOverwrite):
(WebCore::InsertTextCommand::doApply): use the recently added
setEndingSelectionWithoutValidation() to avoid code duplication.
* editing/InsertTextCommand.h:
(InsertTextCommand):

LayoutTests:

Updated the test to include the case of inserting a whitespace
both in the middle or at the end of a line.

* editing/execCommand/overtype-expected.txt:
* editing/execCommand/overtype.html:

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

7 years ago[GTK][webkitpy] A huge list of warnings about missing bugs in expectations when runni...
zandobersek@gmail.com [Wed, 27 Mar 2013 18:17:18 +0000 (18:17 +0000)]
[GTK][webkitpy] A huge list of warnings about missing bugs in expectations when running NRWT with WKTR
https://bugs.webkit.org/show_bug.cgi?id=113421

Reviewed by Dirk Pranke.

When running the layout tests with WKTR through NRWT, the GTK port also uses the generic WK2 TestExpectations file.
This file contains a large amount of expectations that are not listing a specific bug modifier, so this produces an
equally large amount of warnings due to the GTK port preferring for every expectation to have the bug modifier present
in the GTK-specific TestExpectations files.

To avoid this only enable the warnings only when not using WKTR.

* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort.warn_if_bug_missing_in_test_expectations):

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

7 years agoAdd a performance tests for selecting all content in a document
rniwa@webkit.org [Wed, 27 Mar 2013 17:54:52 +0000 (17:54 +0000)]
Add a performance tests for selecting all content in a document
https://bugs.webkit.org/show_bug.cgi?id=113358

Reviewed by Levi Weintraub.

Add a performance test for selecting all. We wait for paint to happen by setTimeout(~, 0).

Example outputs:
    RESULT Interactive: SelectAll: Time= 652.6 ms
    median= 644.5 ms, stdev= 54.6177144967 ms, min= 599.0 ms, max= 773.0 ms

    RESULT Interactive: SelectAll: Time= 654.4 ms
    median= 633.5 ms, stdev= 55.9223145368 ms, min= 600.0 ms, max= 769.0 ms

    RESULT Interactive: SelectAll: Time= 657.9 ms
    median= 640.0 ms, stdev= 54.1420159833 ms, min= 604.0 ms, max= 774.0 ms

* Interactive/SelectAll.html: Added.
* Skipped:

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

7 years agoDFG should use CheckStructure for typed array checks whenever possible
fpizlo@apple.com [Wed, 27 Mar 2013 17:54:22 +0000 (17:54 +0000)]
DFG should use CheckStructure for typed array checks whenever possible
https://bugs.webkit.org/show_bug.cgi?id=113374

Reviewed by Geoffrey Garen.

We used to do the right thing, but it appears that this regressed at some point. Since the
FixupPhase now has the ability to outright remove spurious CheckStructures on array
operations, it is profitable for the ByteCodeParser to insert CheckStructures whenver there
is a chance that it might be profitable, and when the profiling tells us what structure to
check.

Also added some code for doing ArrayProfile debugging.

This is a slightly speed-up. Maybe 3% on Mandreel.

* bytecode/ArrayProfile.cpp:
(JSC::ArrayProfile::computeUpdatedPrediction):
* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::benefitsFromStructureCheck):

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

7 years ago[Mac] Use fontName rather than familyName for internal fonts
dino@apple.com [Wed, 27 Mar 2013 17:53:31 +0000 (17:53 +0000)]
[Mac] Use fontName rather than familyName for internal fonts
https://bugs.webkit.org/show_bug.cgi?id=113392
<rdar://problem/13474743>

Reviewed by Enrica Casucci.

Some internal fonts on OS X have a family name that
isn't listed in availableFontFamilies. In this case
we should use the font name rather than the family
name when looking for a match.

* platform/mac/ThemeMac.h: NSFont category to provide a web-friendly family name.
* platform/mac/ThemeMac.mm:
(-[NSFont webCoreFamilyName]): Returns the font name for internal fonts, otherwise the family name.
(WebCore::ThemeMac::controlFont):
* rendering/RenderThemeMacShared.mm: Use the webCoreFamilyName.
(WebCore::RenderThemeMacShared::systemFont): Ditto.
(WebCore::RenderThemeMacShared::setFontFromControlSize): Ditto.

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

7 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 27 Mar 2013 17:45:01 +0000 (17:45 +0000)]
Unreviewed GTK gardening.

Addressing layout test failures that are specific to GTK-WK1 by moving the related expectations into the specific
TestExpectations file or adjusting and moving the baselines into the GTK-WK1 baseline search path.

* platform/gtk-wk1/TestExpectations:
* platform/gtk-wk1/fast: Added.
* platform/gtk-wk1/fast/media: Added.
* platform/gtk-wk1/fast/media/mq-transform-02-expected.html: Copied from LayoutTests/platform/gtk/fast/media/mq-transform-02-expected.html.
* platform/gtk-wk1/fast/media/mq-transform-03-expected.html: Copied from LayoutTests/platform/gtk/fast/media/mq-transform-03-expected.html.
* platform/gtk-wk2/TestExpectations:
* platform/gtk/TestExpectations:
* platform/gtk/fast/dom/HTMLLinkElement/prefetch-expected.txt: Added.
* platform/gtk/fast/dom/HTMLLinkElement/subresource-expected.txt: Added.
* platform/gtk/fast/hidpi/clip-text-in-hidpi-expected.txt:
* platform/gtk/fast/hidpi/image-set-background-dynamic-expected.txt:
* platform/gtk/fast/hidpi/image-set-border-image-dynamic-expected.txt:
* platform/gtk/fast/media/mq-transform-02-expected.html: Removed.
* platform/gtk/fast/media/mq-transform-03-expected.html: Removed.
* platform/gtk/fast/preloader: Added.
* platform/gtk/fast/preloader/document-write-2-expected.txt: Added.
* platform/gtk/fast/preloader/document-write-expected.txt: Added.
* platform/gtk/fast/preloader/script-expected.txt: Added.
* platform/gtk/http/tests/security/XFrameOptions: Removed.
* platform/gtk/http/tests/security/XFrameOptions/x-frame-options-allowall-expected.txt: Removed.
* platform/gtk/http/tests/security/XFrameOptions/x-frame-options-invalid-expected.txt: Removed.

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

7 years agoSupport C++11 static_assert
allan.jensen@digia.com [Wed, 27 Mar 2013 17:32:51 +0000 (17:32 +0000)]
Support C++11 static_assert
https://bugs.webkit.org/show_bug.cgi?id=113308

Reviewed by Alexey Proskuryakov.

Use the C++11 static_assert for COMPILE_ASSERT when it is available. Note that
even when compiling with C++11 support, static_assert will not always be available
since Assertions.h may also be used outside of C++.

C11 _Static_assert is enabled for GCC when it has C11 support (gcc>=4.7 -std=c11).

* wtf/Assertions.h:
* wtf/Compiler.h:

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

7 years agoSource/WebCore: Source/WebCore: Mac: Media Controls always hide time display elements
jer.noble@apple.com [Wed, 27 Mar 2013 16:43:02 +0000 (16:43 +0000)]
Source/WebCore: Source/WebCore: Mac: Media Controls always hide time display elements
https://bugs.webkit.org/show_bug.cgi?id=113355

Reviewed by Eric Carlson.

No new tests; rebaselined existing tests against correct behavior.

A prior commit set the "min-width:0" property on the time display elements, which, combined
with the "-webkit-flex-box:0 0" setting, caused the flex-box container to collapse the width
of the elements to zero. To achieve the desired effect of hiding the time display elements,
first set the elements' min-width to the desired width, as the new flex-box spec treats the
default value of "min-width:auto" as the intrinsic width, and will collapse the text display
elements to the intrinsic width of its contained text node.

The above allows the timeline container to collapse beyond the sum of its childrens'
intrinsic width. Create a custom renderer that detects when this happens, and hide the time
display controls.

* css/mediaControls.css:
* css/mediaControlsQuickTime.css:
(audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
    Set the "min-width:" property to equal the "width:" property.
(audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
    Ditto.
* css/mediaControlsChromium.css:
(audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
    Chromium assumes the time display controls are flex-boxes, so make that explicit.
* html/shadow/MediaControlElementTypes.cpp: Removed MediaControlTimeDisplayElement::createRenderer().
* html/shadow/MediaControlElementTypes.h:
(MediaControlTimeDisplayElement): Ditto.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineContainerElement::setTimeDisplaysHidden): Added, walks through the
    container's children and shows or hides time display elements.
(WebCore::MediaControlTimelineContainerElement::createRenderer): Added, creates a RenderMediaControlTimelineContainer.
(WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId): Added, allow setTimeDisplaysHidden to
    query against children's shadowPseudoId().
(WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Moved contents to getMediaControlTimeRemainingDisplayElementShadowPseudoId.
(WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId): Added, allow setTimeDisplaysHidden to
    query against children's shadowPseudoId().
(WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Moved contents to getMediaControlCurrentTimeDisplayElementShadowPseudoId.
* html/shadow/MediaControlElements.h:
(MediaControlTimelineContainerElement):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaControlTimelineContainer::RenderMediaControlTimelineContainer): Added, simple constructor.
(WebCore::RenderMediaControlTimelineContainer::layout): Detect when the controller's width is greater than
    a certain value, and show or hide the time display elements in response.
* rendering/RenderMediaControlElements.h:
(RenderMediaControlTimelineContainer):

LayoutTests: Mac: Media Controls always hide time display elements
https://bugs.webkit.org/show_bug.cgi?id=113355

Reviewed by Eric Carlson.

Rebaseline mac results.

* platform/mac/media/audio-controls-rendering-expected.png:
* platform/mac/media/audio-controls-rendering-expected.txt:
* platform/mac/media/controls-after-reload-expected.png:
* platform/mac/media/controls-after-reload-expected.txt:
* platform/mac/media/controls-strict-expected.png:
* platform/mac/media/controls-strict-expected.txt:
* platform/mac/media/controls-styling-strict-expected.png: Added.
* platform/mac/media/controls-styling-strict-expected.txt:
* platform/mac/media/controls-without-preload-expected.png:
* platform/mac/media/controls-without-preload-expected.txt:
* platform/mac/media/video-controls-rendering-expected.png:
* platform/mac/media/video-controls-rendering-expected.txt:
* platform/mac/media/video-display-toggle-expected.png:
* platform/mac/media/video-display-toggle-expected.txt:
* platform/mac/media/video-no-audio-expected.png:
* platform/mac/media/video-no-audio-expected.txt:
* platform/mac/media/video-playing-and-pause-expected.png:
* platform/mac/media/video-playing-and-pause-expected.txt:

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

7 years agoFix Zalan's email.
antti@apple.com [Wed, 27 Mar 2013 16:09:05 +0000 (16:09 +0000)]
Fix Zalan's email.

* Scripts/webkitpy/common/config/committers.py:

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

7 years agomaster.cfg cleanup
ossy@webkit.org [Wed, 27 Mar 2013 15:50:11 +0000 (15:50 +0000)]
master.cfg cleanup
https://bugs.webkit.org/show_bug.cgi?id=113195

Reviewed by Ryosuke Niwa.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:

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

7 years agomaster.cfg fine-tuning for Qt Mountain Lion Release bot
ossy@webkit.org [Wed, 27 Mar 2013 15:44:29 +0000 (15:44 +0000)]
cfg fine-tuning for Qt Mountain Lion Release bot
https://bugs.webkit.org/show_bug.cgi?id=113191

Reviewed by Ryosuke Niwa.

* BuildSlaveSupport/build.webkit.org-config/config.json:
  - Rename the slave due to its location change.
  - Update the platform of the slave.
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunQtAPITests): Enable running WK2 API tests on Qt.
(RunQtAPITests.start):
(RunWebKit2Tests.start): Force pixel tests on the Qt Mountain Lion Release builder.
(BuildAndTestWebKit2Factory): Added. (Build WK1 and WK2 too, but run only WK2 tests.)

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

7 years ago[EFL][jhbuild] Evas fails to build when Wayland is present on the system
rakuco@webkit.org [Wed, 27 Mar 2013 15:36:55 +0000 (15:36 +0000)]
[EFL][jhbuild] Evas fails to build when Wayland is present on the system
https://bugs.webkit.org/show_bug.cgi?id=113403

Reviewed by Kenneth Rohde Christiansen.

As of Evas 1.7.5, when Wayland is detected on the system, support for
both Wayland SHM and Wayland EGL is automatically enabled in autoconf.
The code, however, seems to depend on a few other flags which must be
explicitly enabled.

If those additional GL-related options are passed, we end up
having issues on the WebKit side, so disable Wayland support for
now.

* efl/jhbuild.modules:

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

7 years agoWeb Inspector: CPU profiler. Swap FlameChart with Data Grid.
loislo@chromium.org [Wed, 27 Mar 2013 15:35:45 +0000 (15:35 +0000)]
Web Inspector: CPU profiler. Swap FlameChart with Data Grid.
https://bugs.webkit.org/show_bug.cgi?id=113395

Reviewed by Pavel Feldman.

Looks like FlameChart is more powerful and flexible instrument
than plain old ProfileTree in DataGrid. The same action like
'look for the most expensive function in a frame' could be easily
done with FlameChart and need number of clicks in DataGrid.
So in an offline discussion we decided to place FlameChart on top of DataGrid.

* inspector/front-end/CPUProfileView.js:

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

7 years agoRegression in tests due to https://bugs.webkit.org/show_bug.cgi?id=113339
cfleizach@apple.com [Wed, 27 Mar 2013 14:53:41 +0000 (14:53 +0000)]
Regression in tests due to https://bugs.webkit.org/show_bug.cgi?id=113339
https://bugs.webkit.org/show_bug.cgi?id=113361

Source/WebCore:

Fix the red bots. No review.

Ensure only pop-up buttons get the AXRequired attribute instead of all buttons.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):

LayoutTests:

Remove skipped tests.

* platform/mac/TestExpectations:

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

7 years ago[Qt] Unreviewed gardening. Cleanup after r146756 and r146786.
zarvai@inf.u-szeged.hu [Wed, 27 Mar 2013 14:48:57 +0000 (14:48 +0000)]
[Qt] Unreviewed gardening. Cleanup after r146756 and r146786.

* platform/qt/fast/frames/frame-set-scaling-rotate-expected.txt: Removed.
* platform/qt/fast/frames/frame-set-scaling-skew-expected.txt: Removed.
* platform/qt/fast/gradients/border-image-gradient-sides-and-corners-expected.txt: Removed.
* platform/qt/fast/line-grid/line-align-left-edges-expected.txt: Removed.
* platform/qt/fast/reflections/reflection-masks-expected.txt: Removed.
* platform/qt/fast/reflections/reflection-masks-opacity-expected.txt: Removed.
* platform/qt/fast/reflections/reflection-masks-outset-expected.txt: Removed.
* platform/qt/fast/repaint/background-misaligned-expected.txt: Removed.
* platform/qt/fast/repaint/overhanging-float-detach-repaint-expected.txt: Removed.
* platform/qt/fast/repaint/transform-absolute-child-expected.txt: Removed.
* platform/qt/fast/replaced/border-radius-clip-content-edge-expected.txt: Removed.
* platform/qt/fast/table/border-collapsing/equal-precedence-resolution-expected.txt: Removed.
* platform/qt/fast/text/bidi-embedding-pop-and-push-same-2-expected.txt: Removed.
* platform/qt/fast/writing-mode/block-level-images-expected.txt: Removed.

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

7 years agoWeb Inspector: Breakpoint manager should restore breakpoints when uiSourceCode is...
vsevik@chromium.org [Wed, 27 Mar 2013 14:37:43 +0000 (14:37 +0000)]
Web Inspector: Breakpoint manager should restore breakpoints when uiSourceCode is added.
https://bugs.webkit.org/show_bug.cgi?id=113381

Reviewed by Pavel Feldman.

Source/WebCore:

Breakpoint manager now restores breakpoints on UISourceCodeAdded event.
Breakpoint manager now only resets breakpoints in debugger when source mapping is changed to/from non identity one.

* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype._uiSourceCodeAdded):
(WebInspector.BreakpointManager.prototype._resetBreakpoints):
(WebInspector.BreakpointManager.prototype._uiSourceCodeMappingChanged):
* inspector/front-end/CompilerScriptMapping.js:
(WebInspector.CompilerScriptMapping.prototype.get isIdentity):
* inspector/front-end/DefaultScriptMapping.js:
(WebInspector.DefaultScriptMapping.prototype.isIdentity):
* inspector/front-end/ResourceScriptMapping.js:
(WebInspector.ResourceScriptMapping.prototype.isIdentity):
* inspector/front-end/SASSSourceMapping.js:
(WebInspector.SASSSourceMapping.prototype.isIdentity):
* inspector/front-end/ScriptSnippetModel.js:
(WebInspector.SnippetScriptMapping.prototype.isIdentity):
* inspector/front-end/SourceMapping.js:
(WebInspector.SourceMapping.prototype.isIdentity):
* inspector/front-end/StylesSourceMapping.js:
(WebInspector.StylesSourceMapping.prototype.isIdentity):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype.setSourceMapping):

LayoutTests:

* inspector/debugger/breakpoint-manager-expected.txt:
* inspector/debugger/breakpoint-manager.html:

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

7 years agoWeb Inspector: update Timeline.TimelineEvent definition to include DOM counters and...
yurys@chromium.org [Wed, 27 Mar 2013 14:27:21 +0000 (14:27 +0000)]
Web Inspector: update Timeline.TimelineEvent definition to include DOM counters and native memory stats
https://bugs.webkit.org/show_bug.cgi?id=113376

Reviewed by Vsevolod Vlasov.

Fixed assertion failure in debug mode after r146975.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):

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

7 years agoWeb Inspector: FlameChart. Provide 15px padding left for the chart so developers...
loislo@chromium.org [Wed, 27 Mar 2013 14:22:19 +0000 (14:22 +0000)]
Web Inspector: FlameChart. Provide 15px padding left for the chart so developers will see the first divider with '0' title.
https://bugs.webkit.org/show_bug.cgi?id=113404

Reviewed by Pavel Feldman.

15px paddingLeft was added to the code for the chart.

* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart):
(WebInspector.FlameChart.Calculator.prototype._updateBoundaries):
(WebInspector.FlameChart.Calculator.prototype.computePosition):
(WebInspector.FlameChart.prototype.draw):

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

7 years agoUnreviewed, rolling out r146864.
dominik.rottsches@intel.com [Wed, 27 Mar 2013 14:18:33 +0000 (14:18 +0000)]
Unreviewed, rolling out r146864.
http://trac.webkit.org/changeset/146864
https://bugs.webkit.org/show_bug.cgi?id=113391

causes crashes on Wk2 EFL release bot (Requested by drott on
#webkit).

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

.:

* Source/cmake/OptionsEfl.cmake:

Tools:

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

* platform/efl/TestExpectations:

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

7 years ago[jhbuild] Correctly specify an alternate number of make jobs.
rakuco@webkit.org [Wed, 27 Mar 2013 14:14:37 +0000 (14:14 +0000)]
[jhbuild] Correctly specify an alternate number of make jobs.
https://bugs.webkit.org/show_bug.cgi?id=113396

Reviewed by Philippe Normand.

So far, we were using the `MAKEFLAGS' environment variable to pass the
number of compilation jobs we wanted to jhbuild. jhbuild itself, on the
other hand, prefers to use the `jobs' variable from jhbuildrc for that.

We now behave more closely to the rest of the WebKit tools by first
checking the `NUMBER_OF_PROCESSORS' environment variable and, if it is
not set, just letting jhbuild itself figure out how many jobs to use.

* efl/jhbuildrc:
* gtk/jhbuildrc:

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

7 years ago[EFL] Remove a duplicated test from TestExpectations
commit-queue@webkit.org [Wed, 27 Mar 2013 11:10:04 +0000 (11:10 +0000)]
[EFL] Remove a duplicated test from TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=113385

Unreviewed, EFL gardening.

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-03-27

* platform/efl/TestExpectations:

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

7 years agoRename HTMLFormControlElement::readOnly to isReadOnly
tkent@chromium.org [Wed, 27 Mar 2013 11:06:48 +0000 (11:06 +0000)]
Rename HTMLFormControlElement::readOnly to isReadOnly
https://bugs.webkit.org/show_bug.cgi?id=113297

Reviewed by Alexey Proskuryakov.

Source/WebCore:

HTMLFormControlElement::readOnly is not an implementation of
'readOnly' IDL attribute. It's confusing and we don't need to
violate our naming convention.

No new tests. Just a refactoring.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isReadOnly):
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
(WebCore::HTMLFormControlElement::parseAttribute):
* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::isReadOnly):
(WebCore::HTMLFormControlElement::isDisabledOrReadOnly):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::matchesReadOnlyPseudoClass):
(WebCore::HTMLInputElement::matchesReadWritePseudoClass):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass):
(WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::defaultEventHandler):
(WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
(WebCore::SliderThumbElement::willRespondToMouseClickEvents):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
* html/shadow/TextFieldDecorationElement.cpp:
(WebCore::TextFieldDecorationElement::updateImage):
* rendering/RenderTextControl.cpp:
(WebCore::updateUserModifyProperty):
* rendering/RenderThemeMacShared.mm:
(WebCore::RenderThemeMacShared::paintSearchFieldCancelButton):

Source/WebKit/chromium:

* src/WebFormControlElement.cpp:
(WebKit::WebFormControlElement::isReadOnly):

Source/WebKit/win:

* DOMHTMLClasses.cpp:
(DOMHTMLInputElement::readOnly):

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

7 years ago[Qt] Remove Qt specific WorkQueueItem definitions.
zeno.albisser@digia.com [Wed, 27 Mar 2013 11:04:04 +0000 (11:04 +0000)]
[Qt] Remove Qt specific WorkQueueItem definitions.
https://bugs.webkit.org/show_bug.cgi?id=112891

This patch is preparation work for removing
WorkQueue related code from TestRunnerQt and
replacing it with generic TestRunner code.

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

* API/JSStringRefQt.cpp:
(JSStringCreateWithQString):
    Adding a convenience function to create a
    JSStringRef from a QString.
* API/JSStringRefQt.h:

Tools:

* DumpRenderTree/qt/TestRunnerQt.cpp:
(TestRunnerQt::queueBackNavigation):
(TestRunnerQt::queueForwardNavigation):
(TestRunnerQt::queueLoadHTMLString):
(TestRunnerQt::queueReload):
(TestRunnerQt::queueLoadingScript):
(TestRunnerQt::queueNonLoadingScript):
(TestRunner::queueLoad):
* DumpRenderTree/qt/TestRunnerQt.h:
(TestRunnerQt):
* DumpRenderTree/qt/WorkQueueItemQt.cpp:
(LoadItem::invoke):
(LoadHTMLStringItem::invoke):
(LoadAlternateHTMLStringItem::invoke):
(ReloadItem::invoke):
(ScriptItem::invoke):
(BackForwardItem::invoke):
* DumpRenderTree/qt/WorkQueueItemQt.h:
(LoadAlternateHTMLStringItem::LoadAlternateHTMLStringItem):
(LoadAlternateHTMLStringItem):

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

7 years agoWeb Inspector: update Timeline.TimelineEvent definition to include DOM counters and...
yurys@chromium.org [Wed, 27 Mar 2013 09:29:05 +0000 (09:29 +0000)]
Web Inspector: update Timeline.TimelineEvent definition to include DOM counters and native memory stats
https://bugs.webkit.org/show_bug.cgi?id=113376

Reviewed by Vsevolod Vlasov.

Added missing fields to Timeline.TimelineEvent type definition in Inspector.json

* inspector/Inspector.json:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
(WebCore::InspectorTimelineAgent::setDOMCounters):
Switched InspectorTimelineAgent to the new typed event builders.
(WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
* inspector/InspectorTimelineAgent.h:
(InspectorTimelineAgent):

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

7 years agoWeb Inspector: Follow-up to r146898: test that uiSourceCodes are not leaking in break...
vsevik@chromium.org [Wed, 27 Mar 2013 08:33:46 +0000 (08:33 +0000)]
Web Inspector: Follow-up to r146898: test that uiSourceCodes are not leaking in breakpoint manager.
https://bugs.webkit.org/show_bug.cgi?id=113368

Reviewed by Pavel Feldman.

Source/WebCore:

Added a missed line and a test.

* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype._projectWillReset):

LayoutTests:

* inspector/debugger/breakpoint-manager.html:

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

7 years agoWeb Inspector: [CodeMirror] CodeMirrorTextEditor.highlightRange has bugs
commit-queue@webkit.org [Wed, 27 Mar 2013 08:12:31 +0000 (08:12 +0000)]
Web Inspector: [CodeMirror] CodeMirrorTextEditor.highlightRange has bugs
https://bugs.webkit.org/show_bug.cgi?id=113348

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-27
Reviewed by Vsevolod Vlasov.

No new tests.

- Append additional "<class>-start" class to the first highlighted span
and "<class>-end" class to the last highlighted span to provide a way
to set up a css classes with borders.
- Increment end column of the markup range to simulate inclusive range.

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

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

7 years agoWeb Inspector: Add isClean/markClean method pair to textEditor.js
commit-queue@webkit.org [Wed, 27 Mar 2013 08:04:24 +0000 (08:04 +0000)]
Web Inspector: Add isClean/markClean method pair to textEditor.js
https://bugs.webkit.org/show_bug.cgi?id=112815

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-27
Reviewed by Vsevolod Vlasov.

No new tests: no change in behaviour.

- Add TextEditor.isClean and TextEditor.markClean methods
- Implement these methods in DefaultTextEditor
- Implement these methods in CodeMirrorTextEditor

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor.prototype.isClean):
(WebInspector.CodeMirrorTextEditor.prototype.markClean):
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype.isClean):
(WebInspector.DefaultTextEditor.prototype.markClean):
* inspector/front-end/TextEditor.js:
(WebInspector.TextEditor.prototype.isClean):
(WebInspector.TextEditor.prototype.markClean):
* inspector/front-end/TextEditorModel.js:
(WebInspector.TextEditorModel.endsWithBracketRegex.):

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

7 years agoUnreviewed. Web Inspector. rename method Timeline.Calculator.grandMinimumBoundary...
loislo@chromium.org [Wed, 27 Mar 2013 08:01:06 +0000 (08:01 +0000)]
Unreviewed. Web Inspector. rename method Timeline.Calculator.grandMinimumBoundary to Timeline.Calculator.zeroTime

No changes in behaviour.

* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart.Calculator.prototype.zeroTime):
(WebInspector.FlameChart.OverviewCalculator.prototype.zeroTime):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkBaseCalculator.prototype.zeroTime):
* inspector/front-end/TimelineGrid.js:
(WebInspector.TimelineGrid.prototype.updateDividers):
(WebInspector.TimelineGrid.Calculator.prototype.zeroTime):
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewCalculator.prototype.zeroTime):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelineCalculator.prototype.zeroTime):

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

7 years agoWeb Inspector: Timeline. Scroll dividers with the underlying events.
loislo@chromium.org [Wed, 27 Mar 2013 07:31:20 +0000 (07:31 +0000)]
Web Inspector: Timeline. Scroll dividers with the underlying events.
https://bugs.webkit.org/show_bug.cgi?id=113315

Reviewed by Pavel Feldman.

Now when TimelineGrid is able to draw dividers with any offset
we could cut away paddingLeft member of Timeline.Calculator
and clear the code of TimelineGrid.

* inspector/front-end/TimelineGrid.js:
(WebInspector.TimelineGrid.prototype.updateDividers):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._refresh):
(WebInspector.TimelineCalculator.prototype.computePosition):
(WebInspector.TimelineCalculator.prototype.setDisplayWindow):
(WebInspector.TimelineCalculator.prototype.grandMinimumBoundary):
* inspector/front-end/inspectorCommon.css:
(.resources-dividers-label-bar):

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

7 years ago[CoordGfx] Support to share GraphicsSurface flags with client.
commit-queue@webkit.org [Wed, 27 Mar 2013 07:08:30 +0000 (07:08 +0000)]
[CoordGfx] Support to share GraphicsSurface flags with client.
https://bugs.webkit.org/show_bug.cgi?id=112982

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2013-03-27
Reviewed by Noam Rosenthal.

Covered by existing WebGL tests.

Source/WebCore:

This patch adds support to pass GraphicsSurface flags during it's client creation.
This would be helpful to determine cases when blending can be disabled on client
side i.e When AlphaSupport is disabled during Graphics Surface creation.
With GLX, we rely on Window to provide us with necessary information on client side.
This might not be the case on other platforms or when not using Window on X.
This patch doesn't change original behaviour of creating GraphicsSurface client
with default flags GraphicsSurface::SupportsTextureTarget and GraphicsSurface::SupportsSharing.

* platform/graphics/texmap/TextureMapperPlatformLayer.h:
(WebCore::TextureMapperPlatformLayer::graphicsSurfaceFlags):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(CoordinatedGraphicsLayerState):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore):
(WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
* platform/graphics/efl/GraphicsContext3DPrivate.h:
(GraphicsContext3DPrivate):
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::initializeClient):

Source/WebKit2:

This patch adds support to pass GraphicsSurface flags
during it's client creation.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):

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

7 years ago[shadow] styleForText should consider the case where parent node has no style
tasak@google.com [Wed, 27 Mar 2013 06:39:36 +0000 (06:39 +0000)]
[shadow] styleForText should consider the case where parent node has no style
https://bugs.webkit.org/show_bug.cgi?id=113275

Source/WebCore:

If a text node is distributed, its parent node for rendering and
styling might have no style. In the case, styleForText should return
default style.

Reviewed by Hajime Morrita.

Test: fast/dom/shadow/text-node-distributed-crash.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForText):
Check whether a parent node has any style or not. If not, return
default style. This is the same behavior as styleForElement.

LayoutTests:

Reviewed by Hajime Morrita.

* fast/dom/shadow/text-node-distributed-crash-expected.txt: Added.
* fast/dom/shadow/text-node-distributed-crash.html: Added.

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

7 years agoUnreviewed. Rebaseline fast/replaced/border-radius-clip-content-edge.html
yurys@chromium.org [Wed, 27 Mar 2013 06:02:01 +0000 (06:02 +0000)]
Unreviewed. Rebaseline fast/replaced/border-radius-clip-content-edge.html

* platform/chromium-win/fast/replaced/border-radius-clip-content-edge-expected.png:

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

7 years agoMake SocketStreamHandle (Chromium port) fully use IPC window in send()
commit-queue@webkit.org [Wed, 27 Mar 2013 05:03:11 +0000 (05:03 +0000)]
Make SocketStreamHandle (Chromium port) fully use IPC window in send()
https://bugs.webkit.org/show_bug.cgi?id=113304

Patch by Takeshi Yoshino <tyoshino@chromium.org> on 2013-03-26
Reviewed by Kent Tamura.

socket_stream of Chromium buffers send data up to 32KiB (exact) bytes.

However, SocketStreamHandleInternal::send() method now keeps in-flight
send data not greater than m_maxPendingSendAllowed - 1 that is
32KiB - 1. This means that SocketStreamHandleInternal consumes the
buffered data in SocketStreamHandleBase by 32KiB - 1. It makes memory
copy operations unaligned unnecessarily. It should just use the
allowed size fully.

* platform/network/chromium/SocketStreamHandle.cpp:
(WebCore::SocketStreamHandleInternal::send):
(WebCore):

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

7 years agoRefCountedArray needs a size based constructor
oliver@apple.com [Wed, 27 Mar 2013 03:49:36 +0000 (03:49 +0000)]
RefCountedArray needs a size based constructor
https://bugs.webkit.org/show_bug.cgi?id=113277

Reviewed by Benjamin Poulain.

Simple patch to add a size based constructor for RefCountedArray
so that we can create an sharable array without a copy.

* wtf/RefCountedArray.h:
(RefCountedArray):
(WTF::RefCountedArray::RefCountedArray):

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

7 years agoRebaseline expectations for fast/replaced/border-radius-clip-content-edge.html
pdr@google.com [Wed, 27 Mar 2013 03:02:04 +0000 (03:02 +0000)]
Rebaseline expectations for fast/replaced/border-radius-clip-content-edge.html

Unreviewed rebaseline of test expectations after r146955

* platform/chromium-linux/fast/replaced/border-radius-clip-content-edge-expected.png:
* platform/chromium-mac/fast/replaced/border-radius-clip-content-edge-expected.png:

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

7 years agoUnreviewed attempted cr-mac build fix.
timothy_horton@apple.com [Wed, 27 Mar 2013 02:49:45 +0000 (02:49 +0000)]
Unreviewed attempted cr-mac build fix.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

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

7 years agoAllow ShadowContents in HitTests by default.
hayato@chromium.org [Wed, 27 Mar 2013 02:40:01 +0000 (02:40 +0000)]
Allow ShadowContents in HitTests by default.
https://bugs.webkit.org/show_bug.cgi?id=113171

Reviewed by Dimitri Glazkov.

Source/WebCore:

HitTestRequest is widely used in WebCore, but AllowShadowContents
flag is not turned on by default.  In most places, we can set the
flag on.

This change makes HitTests allow shadow contents by default.

To track all existing HitTests which do not allow shadow contents,
and discourage such a HitTest in the future, I've introduced
disallowShadowContenet flag so that callers must turn on this flag
explicitly if they want to disallow shadow contents in their HitTests.

This change should be refactoring and should not include any
behavior changes.  After this change, we'll investigate each place
where disallowShadowContents is used step by step and get rid of
the flag if it is okay to remove.

No new tests, no behavior change.

* dom/Document.h:
(Document):
* dom/TreeScope.cpp:
(WebCore::nodeFromPoint):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::contains):
* page/DragController.cpp:
(WebCore::elementUnderMouse):
(WebCore::DragController::canProcessDrag):
(WebCore::DragController::startDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseDraggedEvent):
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::updateSelectionForMouseDrag):
(WebCore::EventHandler::hitTestResultAtPoint):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::updateDragAndDrop):
(WebCore::EventHandler::isInsideScrollbar):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::handleGestureEvent):
(WebCore::EventHandler::handleGestureLongPress):
(WebCore::EventHandler::handleGestureScrollBegin):
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
(WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::hoverTimerFired):
(WebCore::EventHandler::dragSourceEndedAt):
(WebCore::EventHandler::handleDrag):
(WebCore::EventHandler::handleTouchEvent):
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
* page/EventHandler.h:
(EventHandler):
* page/FocusController.cpp:
(WebCore::updateFocusCandidateIfNeeded):
* page/Frame.cpp:
(WebCore::Frame::visiblePositionForPoint):
* page/TouchDisambiguation.cpp:
(WebCore::findGoodTouchTargets):
* rendering/HitTestRequest.h:
(WebCore::HitTestRequest::disallowsShadowContent):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::addNodeToRectBasedTestResult):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::hitTestResult):
* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::getNodesFromRect):
* WebKitSupport/ProximityDetector.cpp:
(BlackBerry::WebKit::ProximityDetector::findBestPoint):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):

Source/WebKit/chromium:

* src/ContextMenuClientImpl.cpp:
(WebKit::selectMisspelledWord):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::visiblePositionForWindowPoint):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::isRectTopmost):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::computeBlockBounds):
(WebKit::WebViewImpl::bestTapNode):

Source/WebKit/efl:

* ewk/ewk_frame.cpp:
(ewk_frame_hit_test_new):

Source/WebKit/gtk:

* webkit/webkitwebinspector.cpp:
(webkit_web_inspector_inspect_coordinates):
* webkit/webkitwebview.cpp:
(prepareMouseEventForFrame):
(webkit_web_view_get_hit_test_result):

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame elementAtPoint:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView elementAtPoint:allowShadowContent:]):

Source/WebKit/qt:

* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameAdapter::hitTestContent):

Source/WebKit/win:

* WebView.cpp:
(WebView::gestureNotify):

Source/WebKit2:

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::hitTest):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::highlightPotentialActivation):
(WebKit::WebPage::findZoomableAreaForPoint):
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::shouldDelayWindowOrderingEvent):
(WebKit::WebPage::acceptsFirstMouse):

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

7 years ago[BlackBerry] Memory leak in WebPagePrivate.cpp - NavigatorContentUtilsClientBlackBerry
commit-queue@webkit.org [Wed, 27 Mar 2013 02:20:32 +0000 (02:20 +0000)]
[BlackBerry] Memory leak in WebPagePrivate.cpp - NavigatorContentUtilsClientBlackBerry
https://bugs.webkit.org/show_bug.cgi?id=112996

Patch by Xiaobo Wang <xbwang@torchmobile.com.cn> on 2013-03-26
Reviewed by Rob Buis.

PR 312552
Internally Reviewed by Anthony Scian.

NavigatorContentUtilsClientBlackBerry is new'ed in WebPagePrivate::init(),
but not deleted anywhere. Fixed by creating an OwnPtr for it.
Also fixed some webkit-style errors.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):
* Api/WebPage_p.h:
(WebCore):
(WebPagePrivate):

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

7 years agoGreening the mac bots.
mark.lam@apple.com [Wed, 27 Mar 2013 01:22:56 +0000 (01:22 +0000)]
Greening the mac bots.
https://bugs.webkit.org/show_bug.cgi?id=113361.

Not Reviewed.

* platform/mac/TestExpectations:

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

7 years ago[chromium] Remove the WebVideoFrame, WebVideoFrameProvider, WebStreamTextureClient...
danakj@chromium.org [Wed, 27 Mar 2013 01:21:00 +0000 (01:21 +0000)]
[chromium] Remove the WebVideoFrame, WebVideoFrameProvider, WebStreamTextureClient, and WebVideoLayer classes.
https://bugs.webkit.org/show_bug.cgi?id=112483

Reviewed by James Robinson.

Source/Platform:

These classes are no longer used, so remove them. And remove APIs
to provide them.

* Platform.gypi:
* chromium/public/WebCompositorSupport.h:
(WebKit):
* chromium/public/WebVideoFrame.h: Removed.
* chromium/public/WebVideoFrameProvider.h: Removed.
* chromium/public/WebVideoLayer.h: Removed.

Source/WebKit/chromium:

These classes are no longer used, so remove them.

* WebKit.gyp:
* public/WebMediaPlayer.h:
(WebKit):
(WebMediaPlayer):
* public/WebStreamTextureClient.h: Removed.
* public/WebVideoFrame.h: Removed.

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

7 years ago[ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing
timothy_horton@apple.com [Wed, 27 Mar 2013 01:20:42 +0000 (01:20 +0000)]
[ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing
https://bugs.webkit.org/show_bug.cgi?id=107539
<rdar://problem/13032692>

Reviewed by Simon Fraser.

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Update WebCoreSystemInterface.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initially move the Page out of the window if necessary;
Page defaults to in-window, which is wrong in many cases - we depend on
Page::isInWindow being accurate to decide whether WebPage::setIsInWindow is actually
a state change or not.
(WebKit::WebPage::setIsInWindow):
* WebProcess/WebProcess.cpp: Inform WebProcess when we go on/off screen.
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::pageDidMoveOnscreen): Keep track of the number of on-screen pages in this process.
(WebKit::WebProcess::pageWillMoveOffscreen): If the number of on-screen pages drops to zero,  clean up unused rendering resources.
* WebProcess/WebProcess.h:

Update WebSystemInterface.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

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

7 years agoTest if non-immediate descendants obscure background
antti@apple.com [Wed, 27 Mar 2013 01:00:57 +0000 (01:00 +0000)]
Test if non-immediate descendants obscure background
https://bugs.webkit.org/show_bug.cgi?id=113137

Reviewed by Simon Fraser.

Source/WebCore:

The current obscuration test only covers immediate children. We can find more cases by looking deeper into descendants.

The patch makes the test sufficiently smart to stop a heavy fully obscured gif animation on micrsoft.com.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::animationAdvanced):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):

    Invalidate parents to max test depth.

(WebCore::RenderBox::backgroundPaintedExtent):

    Background painting is pixel snapped.

(WebCore::isCandidateForOpaquenessTest):
(WebCore::RenderBox::foregroundIsKnownToBeOpaqueInRect):

    Separate foreground testing and make it recursive.
    Add fast bailout for common static positioned case.
    Remove maximum child count, the fast bailouts should prevent long tests.
    Add maximum depth so we know how deep we need to invalidate in styleDidChange.

(WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
(WebCore):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
(WebCore):
(WebCore::RenderImage::computeBackgroundIsKnownToBeObscured):

* rendering/RenderImage.h:
(RenderImage):

LayoutTests:

* fast/backgrounds/obscured-background-child-style-change-expected.html:
* fast/backgrounds/obscured-background-child-style-change.html:
* fast/repaint/obscured-background-no-repaint-expected.txt:
* fast/repaint/obscured-background-no-repaint.html:

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