[Chromium] Chromium DEPS has a stray directory, turning our Win bots red
https://bugs.webkit.org/show_bug.cgi?id=98817

Reviewed by Dirk Pranke.

* DEPS: Removed the stray directory which solved the redness on several of our bots.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for Qt Windows.

* html/HTMLPlugInElement.h: Include Image.h.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium][Android] Add WebSecurityOrigin::grantLoadLocalResources()
https://bugs.webkit.org/show_bug.cgi?id=97689

Reviewed by Adam Barth.

Source/WebCore:

In addition to the WebKit/chromium side of the change, remove the
ASSERT in SecurityOrigin::grantLoadLocalResources(). Android WebView
is a legitimate user of this API in cases where neither of the
ASSERT'd conditions hold.

* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::grantLoadLocalResources): Remove ASSERT.

Source/WebKit/chromium:

This change exposes the WebCore::SecurityOrigin::grantLoadLocalResources()
function to the Chromium WebKit API layer. This is needed in Chromium
to implement the Android WebView.loadDataWithBaseUrl function in a
compatible manner.

Please see crbug.com/152223 for further information and the chromium
side patch.

* public/WebSecurityOrigin.h:
(WebSecurityOrigin): Add grantLoadLocalResources() API.
* src/WebSecurityOrigin.cpp:
(WebKit::WebSecurityOrigin::grantLoadLocalResources):
    Implement the API by calling through to the WebCore function
    of the same name.
(WebKit):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS Style is not recalculated when media attribute of style element is changed
https://bugs.webkit.org/show_bug.cgi?id=96752

Patch by Alexander Shalamov <alexander.shalamov@intel.com> on 2012-10-09
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

When "media" attribute of style element is changed, style should be recalculated.
This patch modifies HTMLStyleElement::parseAttribute, so that when the media attribute
is updated, new MediaQuerySet is created and applied to the style element then, document
style is recalculated. Since media query set is updated for CSSStyleSheet, CSSOM wrapper
for media query should be updated as well in order to sync with new media query set value.

Test: fast/media/mq-js-update-media.html

* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::setMediaQueries):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute):

LayoutTests:

Added test to verify that when "media" attribute for style element is updated,
style is recalculated.

* fast/media/mq-js-update-media.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make CachedResourceLoader RefCounted and have both Document
and DocumentLoader hold RefPtrs. This is in preparation for
caching main resources.
https://bugs.webkit.org/show_bug.cgi?id=86787

Reviewed by Adam Barth.

No new tests, no functionality changes at this time.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::Document): Only create our own CachedResourceLoader
    if we were given a null frame.
(WebCore::Document::~Document):
(WebCore::Document::cachedResourceLoader):
(WebCore):
* dom/Document.h:
(Document):
* loader/DocumentLoader.cpp: Throughout, use our m_cachedResourceLoader instead
    of the Document's pointer.
(WebCore::DocumentLoader::DocumentLoader): Create a CachedResourceLoader.
(WebCore::DocumentLoader::~DocumentLoader):
(WebCore::DocumentLoader::isLoadingInAPISense):
(WebCore::DocumentLoader::subresource):
(WebCore::DocumentLoader::getSubresources):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::cachedResourceLoader):
(DocumentLoader):
* loader/SubresourceLoader.cpp: Remove m_document, since it only existed to keep alive and access the CachedResourceLoader.
    It can now be accessed from m_documentLoader.
(WebCore::SubresourceLoader::SubresourceLoader):
(WebCore::SubresourceLoader::~SubresourceLoader):
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::releaseResources):
* loader/SubresourceLoader.h:
(SubresourceLoader):
* loader/cache/CachedResourceLoader.cpp: Handle the possibility of a null Document in several places.
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::CachedResourceLoader::~CachedResourceLoader):
(WebCore::CachedResourceLoader::frame):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore::CachedResourceLoader::printAccessDeniedMessage):
(WebCore::CachedResourceLoader::loadDone):
* loader/cache/CachedResourceLoader.h:
(WebCore):
(WebCore::CachedResourceLoader::create): Add create(), make constructor private.
(CachedResourceLoader):
(WebCore::CachedResourceLoader::document):
(WebCore::CachedResourceLoader::setDocument):
(WebCore::CachedResourceLoader::clearDocumentLoader):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DOM/textarea-edit.html spends 35% of time in numGraphemeClusters
https://bugs.webkit.org/show_bug.cgi?id=98711

Reviewed by Kent Tamura.

Since the number of characters is always greater than the number of grapheme clusters,
we can avoid calling computeLengthForSubmission when the number of characters is less
than maxlength. We still have to count the number of LFs since they all need to be
converted into CRLFs. This improves WebKit's score on DOM/textarea-edit.html by 45%.

* html/HTMLTextAreaElement.cpp:
(WebCore::computeLengthForSubmission):
(WebCore::numberOfLineBreaks):
(WebCore::upperBoundForLengthForSubmission): Added.
(WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
(WebCore::HTMLTextAreaElement::tooLong):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkit-patch rebaseline-expectations doesn't work w/o failures specified
https://bugs.webkit.org/show_bug.cgi?id=98810

Reviewed by Ojan Vafai.

If you try to mark a test as foo.html [ Rebaseline ] it wasn't
getting picked up for rebaselining; we needed to think the test
was failing.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations.get_rebaselining_failures):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(RebaseliningTest.test_get_rebaselining_failures):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r130812.
http://trac.webkit.org/changeset/130812
https://bugs.webkit.org/show_bug.cgi?id=98826

Caused fast/text/shaping/shaping-selection-rect to fail
(Requested by abarth|gardening on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-09

* platform/graphics/Font.cpp:
(WebCore::Font::width):
* platform/graphics/Font.h:
(Font):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::width):
(WebCore::Font::width):
(WebCore::ComplexTextController::advance):
* platform/graphics/mac/ComplexTextController.h:
(ComplexTextController):
* rendering/RenderBlock.h:
(WebCore):
(LineBreaker):
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlock::createLineBoxesFromBidiRuns):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::textWidth):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Updating test expectations after r130811.

* compositing/iframes/iframe-copy-on-scroll.html:
* platform/chromium-mac-snowleopard/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png: Added.
* platform/chromium-mac/fast/repaint/repaint-across-writing-mode-boundary-expected.png:
* platform/chromium-mac/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png: Added.
* platform/chromium-mac/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.txt: Added.
* platform/chromium/TestExpectations:


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