Web Inspector: remove invisibleLineRow code from paintLines DTE method
https://bugs.webkit.org/show_bug.cgi?id=107649

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

Remove invisibleLineRow logic from TextEditorMainPanel._paintLines method.

No new tests: no change in behaviour.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: only allow evaluateForTestInFrontend for front-ends under test.
https://bugs.webkit.org/show_bug.cgi?id=107523

Reviewed by Yury Semikhatsky.

Source/WebCore:

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::isUnderTest):
(WebCore):
(WebCore::InspectorController::evaluateForTestInFrontend):
* inspector/InspectorController.h:
(InspectorController):
* inspector/InspectorFrontendClient.h:
(InspectorFrontendClient):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::canAttachWindow):
(WebCore::InspectorFrontendClientLocal::isUnderTest):
(WebCore):
* inspector/InspectorFrontendClientLocal.h:
(InspectorFrontendClientLocal):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::isUnderTest):
(WebCore):
* inspector/InspectorFrontendHost.h:
(InspectorFrontendHost):
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/DOMExtension.js:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.canInspectWorkers):
(.WebInspector.InspectorFrontendHostStub.prototype.isUnderTest):
* inspector/front-end/TestController.js:
(.invokeMethod):
(WebInspector.evaluateForTestInFrontend):
* inspector/front-end/externs.js:

Source/WebKit/chromium:

* public/WebDevToolsFrontendClient.h:
(WebKit::WebDevToolsFrontendClient::isUnderTest):
(WebDevToolsFrontendClient):
* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::isUnderTest):
* src/InspectorFrontendClientImpl.h:
(InspectorFrontendClientImpl):

Tools:

* DumpRenderTree/chromium/DRTDevToolsClient.cpp:
(DRTDevToolsClient::isUnderTest):
(DRTDevToolsClient::call):
* DumpRenderTree/chromium/DRTDevToolsClient.h:
(DRTDevToolsClient):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Create Regions watchlist
https://bugs.webkit.org/show_bug.cgi?id=107281

Patch by Andrei Bucur <abucur@adobe.com> on 2013-01-23
Reviewed by Adam Barth.

This patch adds 4 new definitions:
- RegionsDevelopment - used to track the development progress for regions
- RegionsExpectationsMore and RegionsExpectationsLess - used to track expectations changes for the regions tests
- RegionsUsage - used to track changes that make use of regions in all the code base

For now, the Adobe internal tracker is the only email address listening for these patterns.

* Scripts/webkitpy/common/config/watchlist:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()
https://bugs.webkit.org/show_bug.cgi?id=107624

Reviewed by Dimitri Glazkov.

Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.

Source/WebCore:

No new tests, simple refactoring.

* WebCore.order:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
* dom/Document.cpp:
(WebCore::Document::handleZeroPadding):
* dom/Node.cpp:
(WebCore::Node::deprecatedShadowAncestorNode):
* dom/Node.h:
(Node):
* editing/Editor.cpp:
(WebCore::Editor::rangeOfString):
(WebCore::Editor::countMatchesForText):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
* page/DragController.cpp:
(WebCore::elementUnderMouse):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setToNonShadowAncestor):
(WebCore::HitTestResult::addNodeToRectBasedTestResult):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):
* WebKitSupport/FatFingers.h:
(BlackBerry::WebKit::FatFingersResult::node):
* WebKitSupport/InPageSearchManager.cpp:
(BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):

Source/WebKit/chromium:

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::scopeStringMatches):
(WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):

Source/WebKit/qt:

* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::inputMethodEvent):
(QWebPageAdapter::inputMethodQuery):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Use C API inside ewk_cookie_manager
https://bugs.webkit.org/show_bug.cgi?id=107661

Reviewed by Alexey Proskuryakov.

Use C API inside ewk_cookie_manager instead of
accessing C++ classes directly and violating
layering.

* PlatformEfl.cmake:
* UIProcess/API/C/soup/WKCookieManagerSoup.cpp: Added.
(toSoupCookiePersistentStorageType):
(WKCookieManagerSetCookiePersistentStorage): Add C API for setting
the persistent storage path and type when using libsoup.
* UIProcess/API/C/soup/WKCookieManagerSoup.h: Added.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::cookieManager):
* UIProcess/API/efl/ewk_cookie_manager.cpp:
(EwkCookieManager::EwkCookieManager):
(EwkCookieManager::~EwkCookieManager):
(EwkCookieManager::setPersistentStorage):
(EwkCookieManager::setHTTPAcceptPolicy):
(EwkCookieManager::clearHostnameCookies):
(EwkCookieManager::clearAllCookies):
(EwkCookieManager::watchChanges):
(EwkCookieManager::getHostNamesWithCookies):
(EwkCookieManager::getHTTPAcceptPolicy):
(ewk_cookie_manager_persistent_storage_set):
(ewk_cookie_manager_hostname_cookies_clear):
* UIProcess/API/efl/ewk_cookie_manager_private.h:
(EwkCookieManager::create):
(EwkCookieManager):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Web Inspector: allow user to resize inspector window by dragging the toolbar
https://bugs.webkit.org/show_bug.cgi?id=107648

Patch by Dmitry Gozman <dgozman@chromium.org> on 2013-01-23
Reviewed by Pavel Feldman.

This did not work before you click dock button once.
Also, last drag position was not respected.

No new tests, because of pure inspector UI change.

* inspector/front-end/DockController.js:
(WebInspector.DockController.prototype.isDockedToBottom):
* inspector/front-end/Toolbar.js:
(WebInspector.Toolbar.prototype._isDockedToBottom):
(WebInspector.Toolbar.prototype._toolbarDragStart):
(WebInspector.Toolbar.prototype._toolbarDragEnd):
(WebInspector.Toolbar.prototype._toolbarDrag):

Source/WebKit/chromium: Added changeAttachedWindowHeight method to inspector frontend API, which
allows to change inspector window height from inside.
https://bugs.webkit.org/show_bug.cgi?id=107648

Patch by Dmitry Gozman <dgozman@chromium.org> on 2013-01-23
Reviewed by Pavel Feldman.

* public/WebDevToolsFrontendClient.h:
(WebKit::WebDevToolsFrontendClient::changeAttachedWindowHeight):
* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::changeAttachedWindowHeight):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r140307, r140411, and r140512.
http://trac.webkit.org/changeset/140307
http://trac.webkit.org/changeset/140411
http://trac.webkit.org/changeset/140512
https://bugs.webkit.org/show_bug.cgi?id=107689

Perf regression on DOMDivWalk (bug 106726) (Requested by
falken on #webkit).

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

Source/WebCore:

* dom/Element.cpp:
(WebCore::Element::removedFrom):
(WebCore):
(WebCore::Element::isInTopLayer):
(WebCore::Element::setIsInTopLayer):
* dom/Element.h:
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::isInTopLayer):
(WebCore::ElementRareData::setIsInTopLayer):
(WebCore::ElementRareData::ElementRareData):
* dom/Node.cpp:
* dom/Node.h:
(Node):
* dom/NodeRenderingContext.cpp:
(WebCore::isRendererReparented):
(WebCore::NodeRenderingContext::previousRenderer):
(WebCore::NodeRenderingContext::parentRenderer):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::isInTopLayer):
(WebCore::RenderLayer::rebuildZOrderLists):

LayoutTests:

* fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer-expected.html: Removed.
* fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html: Removed.
* fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd-expected.html: Removed.
* fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r140518): Broke Chromium Win build (gyp file not updated) (Requested by arv on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=107691

Unreviewed build fix. Removed TextureMapperShaderManager.* from WebCore.gypi.

Patch by Noam Rosenthal <noam@webkit.org> on 2013-01-23

* WebCore.gypi:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Unflag tests related to layoutTestController.setViewModeMediaFeature
https://bugs.webkit.org/show_bug.cgi?id=107660

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-01-23
Reviewed by Philippe Normand.

* platform/gtk-wk2/TestExpectations: Remove tests related to
layoutTestController.setViewModeMediaFeature as they are passing now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Follow up to 140539, adding exports for Win build.

Not reviewed.

* WebKit.vcproj/WebKitExports.def.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assert that computePreferredLogicalWidths never calls setNeedsLayout
https://bugs.webkit.org/show_bug.cgi?id=107613

Reviewed by Eric Seidel.

computePreferredLogicalWidths should only set m_minPreferredLogicalWidth
and m_maxPreferredLogicalWidth. It shouldn't have other side-effects.
The mathml bits can be removed once https://bugs.webkit.org/show_bug.cgi?id=107353
is resolved.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::minPreferredLogicalWidth):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::computePreferredLogicalWidths):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: speedup highlight regex API in DefaultTextEditor
https://bugs.webkit.org/show_bug.cgi?id=107238

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

Source/WebCore:

Move overlay highlight measurement (highlight regex API) from DefaultTextEditor._paintLine
method to the DefaultTextEditor._paintLines method which allows to relayout dom only
once. This is a significant improvement to the current state of the
art which does relayout on each regex occurence.
In addition, use "left" css attribute instead of "margin-left": this
way it will be possible to avoid an unnecessary relayouting during
appending overlay highlight.

No new tests: no change in behaviour.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
(WebInspector.TextEditorMainPanel.prototype._paintLines):
(WebInspector.TextEditorMainPanel.prototype._measureRegexHighlight):
(WebInspector.TextEditorMainPanel.prototype._measureSpans):
(WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
(WebInspector.TextEditorMainPanel.prototype._paintLine):
(WebInspector.TextEditorMainPanel.ElementMetrics):
(WebInspector.TextEditorMainPanel.LineOverlayHighlight):
(WebInspector.TextEditorMainChunk.prototype.expand):

LayoutTests:

Corrected layout test expectations to correspond to refactoring.

* inspector/editor/text-editor-highlight-regexp-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Avoid reset title for navigation within the page
https://bugs.webkit.org/show_bug.cgi?id=106908

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-01-23
Reviewed by Martin Robinson.

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidNavigateWithinPage): Call
dispatchDidCommitLoad with true as param.
(WebKit::FrameLoaderClient::dispatchDidCommitLoad): The method has been
overloaded. The default implementation (without params) simply calls
dispatchDidCommitLoad with false. The new private method with
isNavigatingWithinPage as param will avoid to reset the title for
navigation within the page.
* WebCoreSupport/FrameLoaderClientGtk.h:
(FrameLoaderClient): Add new private method dispatchDidCommitLoad with a
boolean parameter to know if it is navigating withing the same page or
not.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Remove dependence on Microsoft Embedded OpenType Font Engine (T2EMBED.DLL)  from FontCustomPlatformData.cpp.
https://bugs.webkit.org/show_bug.cgi?id=107153

Reviewed by Dan Bernstein.

* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore):
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::createFontCustomPlatformData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clarify some usage of shouldUseThreading vs m_haveBackgroundParser, fixing about:blank parsing
https://bugs.webkit.org/show_bug.cgi?id=107664

Reviewed by Adam Barth.

The HTMLDocumentParser can be "supposed" to use a background parser
but not end up ever doing so for blank documents.  It's important
that we spin the forground parser at least once, so we end up
actually creating the about:blank document.

shouldUseThreading() means that threading is enabled and we should use it if we can.
m_haveBackgroundParser means that we actually are already using threading.
When we add full document.write support this will get a bit trickier still as
we'll need to be using both the foreground and background parsers.

This fixes about 20 tests in fast/frames and many others outside of fast/frames. :)

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::prepareToStopParsing):
(WebCore::HTMLDocumentParser::resumeParsingAfterYield):
(WebCore::HTMLDocumentParser::finish):
(WebCore::HTMLDocumentParser::lineNumber):
(WebCore::HTMLDocumentParser::textPosition):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
transition-property accepts incorrect "all, none" as value
https://bugs.webkit.org/show_bug.cgi?id=105428

Reviewed by Dean Jackson.

Source/WebCore:

http://www.w3.org/TR/css3-transitions/#transition-property-property
disallows any value like none, all or all, none as it doesn't make
sense. This patch fixes the problem by rejecting the value if set by
the user.

Test: transitions/transitions-parsing.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseAnimationProperty):
* css/CSSParser.h:

LayoutTests:

Extend the existing tests to cover the bug.

* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Use after free in plugins/geturlnotify-during-document-teardown.html
https://bugs.webkit.org/show_bug.cgi?id=107556

Reviewed by Tony Chang.

WebViewHost initiates a navigation to about:blank in its destructor.
However, since WebTestProxy inherits from WebViewHost, at this point
the WebViewClient and WebFrameClient interfaces are already partially
destructed resulting in the use after free.

This does not affect the chromium implementation since it doesn't
invoke WebKit API methods in its destructor.

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::~TestShell):
(TestShell::closeWindow):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::WebViewHost):
(WebViewHost::~WebViewHost):
(WebViewHost::shutdown):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Optimize spellchecking by coalescing messages
https://bugs.webkit.org/show_bug.cgi?id=107707

Reviewed by Rob Buis.

PR233604
Instead of taking chunks one line at a time, coalesce them together
to fire off messages as close to our character limit as possible.
This should dramatically reduce the total number of messages in email
giving us a little performance bump.

Internally reviewed by Mike Fenton and Gen Mak.

* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange):
(DOMSupport):
* WebKitSupport/DOMSupport.h:
* WebKitSupport/InputHandler.cpp:
* WebKitSupport/InputHandler.h:
(InputHandler):
* WebKitSupport/SpellingHandler.cpp:
(BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
(BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
(BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
(BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
* WebKitSupport/SpellingHandler.h:


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

Speculative build fix for the GTK port after 140539.

* Source/autotools/symbols.filter:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Take a better guess as to what text the user wants learned
https://bugs.webkit.org/show_bug.cgi?id=107706

Reviewed by Rob Buis.

If we still have a valid caret position, use it to give priority to a region
of text.  We now take the text before the caret, instead of the text at the end
of the field.  If the caret is not present, we start from the beginning of the field.
This helps learning in email where the region of interest is generally at the start,
not end of the field.

Internally reviewed by Mike Fenton

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::learnText):


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