Don't rely on the fact that StaticPosition happens to be defined as 0
https://bugs.webkit.org/show_bug.cgi?id=110123

Also made the expression slightly less convoluted.

Patch by Morten Stenshorne <mstensho@opera.com> on 2013-03-11
Reviewed by Alexey Proskuryakov.

No new tests. This is just code cleanup.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
De-flake fast/dom/title-directionality.html
https://bugs.webkit.org/show_bug.cgi?id=112075

Reviewed by Adam Barth.

This moves the test logic from an inline script to an onload handler. Otherwise, the whitespace collapsing logic
creates a race between the style recalc timer and the HTML parser which sometimes produces an extra newline at
the end of the text output.

* fast/dom/title-directionality-expected.txt:
* fast/dom/title-directionality.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove the use of the quotaMap cache in DatabaseTracker.
https://bugs.webkit.org/show_bug.cgi?id=111805.

Reviewed by Geoffrey Garen.

This change is needed because using the quotaMap cache can result in
an inaccurate read (in a multi-process system) on what database files
are actually present on the filesystem. Instead of using the quotaMap
cache, we rely on the tracker database and query it every time we need
the origin/quota information.

No new tests.

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
(WebCore::DatabaseTracker::hasEntryForOriginNoLock):
(WebCore::DatabaseTracker::origins):
(WebCore::DatabaseTracker::quotaForOriginNoLock):
(WebCore::DatabaseTracker::setQuota):
(WebCore::DatabaseTracker::addDatabase):
(WebCore::DatabaseTracker::deleteOrigin):
* Modules/webdatabase/DatabaseTracker.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PDFPlugin: Make scrolling between pages in non-continuous modes work
https://bugs.webkit.org/show_bug.cgi?id=111415
<rdar://problem/12555320>

Reviewed by Alexey Proskuryakov.

* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
Add some more PDFLayerController SPI.

* WebProcess/Plugins/PDF/PDFPlugin.h:
(PDFPlugin): Override handleWheelEvent.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::handleWheelEvent):
If PDFLayerController is in non-continuous mode, allow scrolling between
pages by intercepting scroll events, and checking whether we're at the
top or bottom of a page. If we are, and a single event exceeds the threshold
of 20px (0px for legacy scroll wheels), we jump to the next or previous
page and scroll to the right place. Do not allow momentum scrolling to
switch pages.

* WebCore.exp.in: Export ScrollableArea::scrollToOffsetWithoutAnimation.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace static_cast<SVGStyledElement> with toSVGStyledElement()
https://bugs.webkit.org/show_bug.cgi?id=111651

Reviewed by Abhishek Arya.

toSVGStyledElement is preferred over static_cast<SVGStyledElement*> because bad casts
can be caught on our testing infrastructure. This patch replaces all
static_cast<SVGStyledElement> instances with toSVGStyledElement.

Additionally, this patch renames SVGElement::isStyled to SVGElement::isSVGStyledElement to
remove a confusing overlap with html styled elements. This name differs slighly from the
other is*() functions in SVGElement but this will be resolved up with webkit.org/b/107386.

No new tests as this is covered with existing tests.

* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::getElementCTM):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
* rendering/svg/SVGResources.cpp:
(WebCore::registerPendingResource):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
(WebCore::SVGAnimationElement::computeCSSPropertyValue):
(WebCore::SVGAnimationElement::adjustForInheritance):
(WebCore::inheritsFromProperty):
* svg/SVGElement.cpp:
(WebCore::collectInstancesForSVGElement):
(WebCore::SVGElement::isAnimatableAttribute):
* svg/SVGElement.h:
(WebCore::SVGElement::isSVGStyledElement):
* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
(WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::computeCTM):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::updateRelativeLengthsInformation):
* svg/SVGStyledElement.h:
(WebCore::SVGStyledElement::isSVGStyledElement):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::selfHasRelativeLengths):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):


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