Note more flaky crashes for bug 82505.

Unreviewed, expectations change.

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Spec renamed Viewport-relative lengths to Viewport-percentage lengths
https://bugs.webkit.org/show_bug.cgi?id=82773

Patch by Joe Thomas <joethomas@motorola.com> on 2012-03-30
Reviewed by Antti Koivisto.

As per the latest version of CSS Values and Units Module Level 3 specification released on 29 March 2012
(http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths) Viewport-relative lengths is renamed to Viewport-percentage lengths.

Source/WebCore:

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getPositionOffsetValue):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::unitCategory):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
(WebCore::CSSPrimitiveValue::viewportPercentageLength):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isViewportPercentageLength):
(CSSPrimitiveValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertToLength):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):
* css/LengthFunctions.cpp:
(WebCore::minimumValueForLength):
(WebCore::valueForLength):
(WebCore::floatValueForLength):
* platform/Length.h:
(WebCore::Length::isViewportPercentage):
(WebCore::Length::viewportPercentageLength):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::textIndentOffset):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeContentLogicalHeightUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paddingTop):
(WebCore::RenderBoxModelObject::paddingBottom):
(WebCore::RenderBoxModelObject::paddingLeft):
(WebCore::RenderBoxModelObject::paddingRight):
(WebCore::RenderBoxModelObject::paddingBefore):
(WebCore::RenderBoxModelObject::paddingAfter):
(WebCore::RenderBoxModelObject::paddingStart):
(WebCore::RenderBoxModelObject::paddingEnd):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
* rendering/RenderInline.cpp:
(WebCore::computeMargin):
* rendering/style/RenderStyle.h:

LayoutTests:

* css3/viewport-percentage-lengths: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle-expected.txt: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-absolute-expected.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-absolute.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-expected.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-absolute-expected.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-absolute.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-expected.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-absolute-expected.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-absolute.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-expected.html: Added.
* css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw.html: Added.
* css3/viewport-relative-lengths: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle-expected.txt: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute-expected.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-expected.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute-expected.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-expected.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute-expected.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-expected.html: Removed.
* css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix usage of LayoutUnits in table code.
https://bugs.webkit.org/show_bug.cgi?id=82765

Reviewed by Eric Seidel.

Clean up usage of ints and LayoutUnits in table code in preparation for
turning on subpixel layout.

No new tests, no change in functionality.

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::computePreferredLogicalWidths):
Cast maxWidth to int as all table layout is done on int bounds.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
Change borders to LayoutUnit as paddings can have subpixel precision.

* rendering/RenderTable.h:
(WebCore::RenderTable::getColumnPos):
(WebCore::RenderTable::columnPositions):
Change getColumnPos and columnPositions to ints as the values are always
on pixel bounds.

(WebCore::RenderTable::bordersPaddingAndSpacingInRowDirection):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::styleOrColLogicalWidth):
Remove unnecessary cast.

(WebCore::RenderTableCell::clippedOverflowRectForRepaint):
Use LayoutPoint instead of left/top.

* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layoutRows):
* rendering/RenderTableSection.h:
Change baseline and baselineDescent to int to avoid unnecessary type
conversion.


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

* platform/chromium-mac/svg/batik/masking/maskRegions-expected.png:
* platform/chromium-win-xp/svg/batik/masking/maskRegions-expected.png: Removed.
* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=82582
Move CPP files related to ResourceHandle to WebCore/platform

Reviewed by James Robinson.

Source/WebCore: 

This patch moves a number of files that implement parts of the platform
portion of the Chromium WebKit API from the WebKit layer to
WebCore/platform. These files are in the dependency cone of
ResourceHandle and have no dependencies on anything outside
WebCore/platform.

* WebCore.gypi:
* platform/chromium/support/WebHTTPBody.cpp: Copied from Source/WebKit/chromium/src/WebHTTPBody.cpp.
* platform/chromium/support/WebHTTPLoadInfo.cpp: Copied from Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp.
* platform/chromium/support/WebURL.cpp: Copied from Source/WebKit/chromium/src/WebURL.cpp.
* platform/chromium/support/WebURLError.cpp: Copied from Source/WebKit/chromium/src/WebURLError.cpp.
* platform/chromium/support/WebURLRequest.cpp: Copied from Source/WebKit/chromium/src/WebURLRequest.cpp.
* platform/chromium/support/WebURLRequestPrivate.h: Copied from Source/WebKit/chromium/src/WebURLRequestPrivate.h.
* platform/chromium/support/WebURLResponse.cpp: Copied from Source/WebKit/chromium/src/WebURLResponse.cpp.
* platform/chromium/support/WebURLResponsePrivate.h: Copied from Source/WebKit/chromium/src/WebURLResponsePrivate.h.

Source/WebKit/chromium: 

* WebKit.gyp:
* src/WebHTTPBody.cpp: Removed.
* src/WebHTTPLoadInfo.cpp: Removed.
* src/WebURL.cpp: Removed.
* src/WebURLError.cpp: Removed.
* src/WebURLRequest.cpp: Removed.
* src/WebURLRequestPrivate.h: Removed.
* src/WebURLResponse.cpp: Removed.
* src/WebURLResponsePrivate.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
shape-inside and shape-outside are not in the list of computed style properties
https://bugs.webkit.org/show_bug.cgi?id=82667

Patch by Bear Travis <betravis@adobe.com> on 2012-03-30
Reviewed by Ryosuke Niwa.

Source/WebCore:

Adding prefixed shape-inside and shape-outside to the list of computed style properties.
Added properties to existing tests for computed style results

* css/CSSComputedStyleDeclaration.cpp:
(WebCore): added -webkit-shape-inside and -webkit-shape-outside to computedProperties

LayoutTests:

Adding prefixed shape-inside and shape-outside to the list of computed style properties.
Updating tests that look at all properties on a computed style declaration.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-mac-snowleopard/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
* platform/efl/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/gtk/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/qt/svg/css/getComputedStyle-basic-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix return type for virtual borderBoundingBox method
https://bugs.webkit.org/show_bug.cgi?id=82561

Reviewed by Eric Seidel.

No new tests, no change in functionality.

* editing/DeleteButtonController.cpp:
(WebCore::isDeletableElement):
* rendering/RenderBox.h:
(WebCore::RenderBox::borderBoxRect):
Rename pixelSnappedBorderBoxRect to borderBoxRect and remove LayoutRect
version of same as we always want to use the pixel snapped version to
ensure proper rounding and alignment to device pixels.
(The way this rect is pixel snapped, using the m_frameRect location,
makes it hard for calling code to take the subpixel rect and correctly
snap it).

(WebCore::RenderBox::borderBoundingBox):
* rendering/RenderBoxModelObject.h:
Change pure virtual definition of borderBoundingBox to return an IntRect
to match implementation in RenderBox.

(RenderBoxModelObject):
* rendering/RenderInline.h:
(WebCore::RenderInline::borderBoundingBox):
Change overloaded method to IntRect to match RenderBox implementation.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=82761

Try to narrow down the cause of this assertion by adding
an assertion about m_frame.

* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change WebKit/WebKit2 platform code to use pixel snapped values
https://bugs.webkit.org/show_bug.cgi?id=82549

Source/WebCore:

Reviewed by Eric Seidel.

Change WebKit and WebKit2 platform code to use rounded locations and
pixel snapped rects and sizes. This largely avoids having to expose the
fractional layout types to the platform code.

No new tests. No change in functionality.

* dom/Node.h:
(WebCore::Node::pixelSnappedRenderRect):
Add pixel snapped version of renderRect

* rendering/RenderBox.h:
(WebCore::RenderBox::pixelSnappedFrameRect):
Add pixel snapped version of frameRect

Source/WebKit/chromium:

Reviewed by Eric Seidel.

* src/WebAccessibilityObject.cpp:
(WebKit::WebAccessibilityObject::boundingBoxRect):
Use pixelSnappedBoundingBoxRect instead of boundingBoxRect which returns
a LayoutRect.

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::characterIndexForPoint):
Use roundedPoint instead of point for hit testing as ranges use screen
cordinates which are represented with pixel accuracy.

Source/WebKit/mac:

Change WebKit and WebKit2 platform code to use rounded locations and
pixel snapped rects and sizes. This largely avoids having to expose the
fractional layout types to the platform code.

Reviewed by Eric Seidel.

* DOM/WebDOMOperations.mm:
(-[DOMNode _renderRect:]):

Source/WebKit/qt:

Reviewed by Eric Seidel.

* Api/qwebelement.cpp:
(QWebElement::geometry):
Replace getRect with getPixelSnappedRect to avoid having to expose
subpixel types to the platform layer.

* Api/qwebpage.cpp:
(QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):
Use pixel snapped element rect when comparing with the touch rect as the
touch rect use screen cordinates which are represented with pixel
accuracy.

* WebCoreSupport/ChromeClientQt.h:
(WebCore::ChromeClientQt::scrollRectIntoView):
Change scrollRectIntoView to take a LayoutRect to match base class
interface.

Source/WebKit2:

Change WebKit and WebKit2 platform code to use rounded locations and
pixel snapped rects and sizes. This largely avoids having to expose the
fractional layout types to the platform code.

Reviewed by Eric Seidel.

* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::WebRenderObject):
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::calculatePositionAndSize):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::renderRect):
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::invalidateScrollbarRect):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::characterIndexForPoint):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, fix Leopard/SL expectations for remaining SVG tests.
Also, mark zoom-img-preserveAspectRatio-support-1 as still failing.

* platform/chromium-mac-snowleopard/fast/overflow/overflow-x-y-expected.txt:
* platform/chromium-mac-snowleopard/svg/as-object/svg-embedded-in-html-in-iframe-expected.txt:
* platform/chromium-mac-snowleopard/svg/custom/mask-colorspace-expected.txt:
* platform/chromium-mac-snowleopard/svg/custom/use-on-g-containing-use-expected.txt:
* platform/chromium-mac-snowleopard/svg/custom/use-setAttribute-crash-expected.txt:
* platform/chromium-mac-snowleopard/svg/filters/feImage-late-indirect-update-expected.txt:
* platform/chromium-mac-snowleopard/svg/stroke/zero-length-path-linecap-rendering-expected.txt:
* platform/chromium-mac-snowleopard/svg/stroke/zero-length-subpaths-linecap-rendering-expected.txt:
* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add tests for iframe seamless and support for parsing webkitseamless attribute
https://bugs.webkit.org/show_bug.cgi?id=82795

Reviewed by Adam Barth.

Source/WebCore:

This just adds support for parsing/reflecting the "webkitseamess" attribute.
I'll add the actual CSS, navigation, security, and layout changes in
separate follow-up patches.

Tests: fast/frames/seamless/seamless-basic.html
       fast/frames/seamless/seamless-css-cascade.html
       fast/frames/seamless/seamless-nested.html
       fast/frames/seamless/seamless-sandbox-flag.html

* html/HTMLAttributeNames.in:
* html/HTMLIFrameElement.idl:

LayoutTests:

* fast/frames/seamless/resources/css-cascade-child.html: Added.
* fast/frames/seamless/resources/nested-seamless.html: Added.
* fast/frames/seamless/resources/square.html: Added.
* fast/frames/seamless/seamless-basic-expected.txt: Added.
* fast/frames/seamless/seamless-basic.html: Added.
* fast/frames/seamless/seamless-css-cascade-expected.txt: Added.
* fast/frames/seamless/seamless-css-cascade.html: Added.
* fast/frames/seamless/seamless-nested-expected.txt: Added.
* fast/frames/seamless/seamless-nested.html: Added.
* fast/frames/seamless/seamless-sandbox-flag-expected.txt: Added.
* fast/frames/seamless/seamless-sandbox-flag.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip two SVG tests that asserted. Tracked by
https://bugs.webkit.org/show_bug.cgi?id=82815

* platform/mac/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG should optimize a==b for a being an object and b being either an object or
null/undefined, and vice versa
https://bugs.webkit.org/show_bug.cgi?id=82656

Reviewed by Oliver Hunt.
        
Implements additional object equality optimizations for the case that one
operand is predicted to be an easily speculated object (like FinalObject or
Array) and the other is either an easily speculated object or Other, i.e.
Null or Undefined.
        
2-5% speed-up on V8/raytrace, leading to a sub-1% progression on V8.
        
I also took the opportunity to clean up the control flow for the speculation
decisions in the various Compare opcodes. And to fix a build bug in SamplingTool.
And to remove debug cruft I stupidly committed in my last patch.
        
* bytecode/SamplingTool.h:
(SamplingRegion):
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGOperations.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
(JSC::DFG::SpeculativeJIT::compare):
* dfg/DFGSpeculativeJIT.h:
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(DFG):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(DFG):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip more tests. Tracking bugs are listed in the Skipped file.

* platform/mac/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Headers with no content shouldn't be dropped by platform's request.
https://bugs.webkit.org/show_bug.cgi?id=82691

Patch by Jason Liu <jason.liu@torchmobile.com.cn> on 2012-03-30
Reviewed by Rob Buis.

Test : http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html

* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
styleForElement() should use enums instead of bools so we can all understand what it's doing
https://bugs.webkit.org/show_bug.cgi?id=82807

Reviewed by Adam Barth.

No change in behavior, thus no tests.

Mostly this is just replacing true/false with the correct new enum value
or removing true/false from the callsites when they would have been default anyway.
I think this makes the code *way* more clear.

The old code was extra confusing because the defaults were "true, false". :)
The new defaults are AllowStyleSharing, MatchAllRules.
It's very uncommon for callers to want to override either of these behaviors.
I think most callers which specify DisallowStyleSharing likely don't actually need to
(our style-sharing code should be smart enough to only share when safe anyway).

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::CSSStyleSelector):
 - Use enums and remove bogus comment (m_rootDefaultStyle is a RefPtr!)
(WebCore::CSSStyleSelector::collectMatchingRulesForList):
* css/CSSStyleSelector.h:
(CSSStyleSelector):
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::prepareEvaluator):
* css/StyleMedia.cpp:
(WebCore::StyleMedia::matchMedium):
* dom/Element.cpp:
(WebCore::Element::styleForRenderer):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::getUncachedPseudoStyle):
 - Updated to use enums
 - Also fixed this to use toElement and modern early-return styles.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::computeStyleInRegion):
* svg/SVGElement.cpp:
(WebCore::SVGElement::customStyleForRenderer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Use KURL::protocolIsInHTTPFamily() instead KURL::protocolInHTTPFamily()
https://bugs.webkit.org/show_bug.cgi?id=82707

Reviewed by Rob Buis.

No new tests, just BlackBerry build fix.

* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
composite fonts from existing physical fonts.
<rdar://problem/10717370>
https://bugs.webkit.org/show_bug.cgi?id=82810
        
CoreText have already the features enabled, here we added this to WebKit text layout and rendering.
A member function getCompositeFontReferenceFontData is added to the SimpleFontData class for the component font
correspond to the platformData, in this case, a NSFont. This is used when CoreText layout had resulted
a component of the Composite Font Reference and its corresponding SimpleFontData object is then cached
in the SimpleFontData object of the posting font (Composite Font Reference).
        
When glyphs are encoded to form the GlyphPage for rendering, the Composite Font Reference is handled throught
the CoreText layout path (using CTLine), here the resulting glyph is associated with a font which could
be not the original font request. In this case, these are the component fonts of the Composite Font
Reference. This is then identified and then added to the GlyphPage appropriately.
        
To support this feature, a member function isCompositeFontReference is added to FontPlatformData to
indicate a font is a Composite Font Reference. Also in order to pass the component font correctly a boolean
isPrinterFont is added to one the FontPlatformData constructors to describe the NSFont.

Patch by Tony Tseung <tseung@apple.com> on 2012-03-30
Reviewed by Dan Bernstein.

Added test LayoutTests/fast/text/international/text-spliced-font.html

* WebCore.exp.in:
Replaced obsolete FontPlatformData constructor entry.

* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData):
Copy of the additional m_isCompositeFontReference and m_isPrinterFont data members.
        
(WebCore::FontPlatformData::operator=):
Assignment of the additional m_isCompositeFontReference and m_isPrinterFont data members.
        
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::FontPlatformData):
(FontPlatformData):
Default value of m_isCompositeFontReference and m_isPrinterFont data members are set to false in various constructors.
        
(WebCore::FontPlatformData::isCompositeFontReference):
Newly added for Composite Font Reference type font.

(WebCore::FontPlatformData::isPrinterFont):
Newly added for describing the NSFont parameter if is applicable.

(WebCore::FontPlatformData::operator==):
Comparison of the additional m_isCompositeFontReference and m_isPrinterFont data members.

* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
Clean up the cache for component fonts of the Composite Font References.

* platform/graphics/SimpleFontData.h:
(SimpleFontData):
Added member function const SimpleFontData* getCompositeFontReferenceFontData(NSFont *key) const.
        
(DerivedFontData):
Added CFDictionary for caching the component font of Composite Font Reference.

* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):
Data members m_isCompositeFontReference and m_isPrinterFont are initialised and their values are determined in the body of the contructor.

(WebCore::FontPlatformData::setFont):
Data members m_isCompositeFontReference and m_isPrinterFont are determined and set.
        
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::createFontPlatformData):
Boolean value isUsingPrinterFont is passed in the new FontPlatformData constructor.
        
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::shouldUseCoreText):
Added the condition for Composite Font Reference type font.
        
(WebCore::GlyphPage::fill):
In the case of Composite Font Reference, when iterate the runs, component font of Composite Font
Reference is used to fill the glyph index in the GlyphPage.
        
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::getCompositeFontReferenceFontData):
Newly added method for the component fonts correspond to the platformData, in this case, a NSFont. 
This SimpleFontData is created and cached in this object and will only be deleted when the destructor
if this is called.

Tools: Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
composite fonts from existing physical fonts.
<rdar://problem/10717370>
https://bugs.webkit.org/show_bug.cgi?id=82810
            
A new test font of this kind as been added to the test tools for running the webkit-tests

Patch by Tony Tseung <tseung@apple.com> on 2012-03-30
Reviewed by Dan Bernstein.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Added new dependency SampleFont.sfont
        
* DumpRenderTree/fonts/SampleFont.sfont: Added.
        
* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
* DumpRenderTree/mac/DumpRenderTree.mm:
(allowedFontFamilySet):
Added the Composite Font Referene sample font "Hiragino Maru Gothic Monospaced" entry to the fonts white-list
        
(activateTestingFonts):
Added the registration of the Composite Font Referene sample font
        
* WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
(WTR::allowedFontFamilySet):
Added the Composite Font Referene sample font "Hiragino Maru Gothic Monospaced" entry to the fonts white-list

(WTR::activateFonts):
Added the registration of the Composite Font Referene sample font

* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
Added new dependency SampleFont.sfont

* WebKitTestRunner/fonts/SampleFont.sfont: Added.

LayoutTests: Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
composite fonts from existing physical fonts.
<rdar://problem/10717370>
https://bugs.webkit.org/show_bug.cgi?id=82810
            
Added new LayoutTests/fast/text/international/text-spliced-font.html

Patch by Tony Tseung <tseung@apple.com> on 2012-03-30
Reviewed by Dan Bernstein.

* fast/text/international/text-spliced-font.html: Added.
* platform/mac/fast/text/international/text-spliced-font-expected.png: Added.
* platform/mac/fast/text/international/text-spliced-font-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the Windows component build.  The way we link the unit
tests in the component build is kind of nutty.  Hopefully this approach
will eliminate the duplicate symbols we've been seeing.

* WebKitUnitTests.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Colors seem to be parsed using HTML quirks in SVG attributes
https://bugs.webkit.org/show_bug.cgi?id=46112

Source/WebCore:

Reviewed by Eric Seidel.

Finally move to SVGAttributeMode on parsing SVG presentation attributes. SVG attributes are
mainly parsed in the strict mode, which affects strict parsing of colors and no spaces between
values and units. Unit less values are still allowed.

Tests: svg/css/svg-attribute-length-parsing.html
       svg/css/svg-attribute-parser-mode.html

* css/CSSGrammar.y: No quirks mode for SVG.
* css/CSSParser.h:
(WebCore::CSSParser::inStrictMode): SVGAttributeMode also implies strict parsing.
(WebCore::CSSParser::inQuirksMode): Remove SVGAttributeMode from quirks mode.
* css/CSSParserMode.h:
(isStrictParserMode): Ditto.
* dom/StyledElement.cpp:
(WebCore::StyledElement::updateAttributeStyle):
* svg/SVGElementRareData.h:
(WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
* svg/SVGStyledElement.cpp: Switch to SVGAttributeMode if we parse a SVG presentation attribute.
(WebCore::SVGStyledElement::getPresentationAttribute):

LayoutTests:

Test that values of SVG presentation attributes are parsed in strict mode. At the moment
this affects strict color parsing and no spaces between values and units.

Reviewed by Eric Seidel.

* svg/animations/script-tests/animate-color-fill-from-by.js:
* svg/css/script-tests/svg-attribute-length-parsing.js: Added.
* svg/css/script-tests/svg-attribute-parser-mode.js: Added.
* svg/css/svg-attribute-length-parsing-expected.txt: Added.
* svg/css/svg-attribute-length-parsing.html: Added.
* svg/css/svg-attribute-parser-mode-expected.txt: Added.
* svg/css/svg-attribute-parser-mode.html: Added.

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