[Coordinated Graphics] Fix the build on MacOS 10.9
https://bugs.webkit.org/show_bug.cgi?id=121225

Reviewed by Darin Adler.

* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS Unit vw in border-width maps to 0px.
https://bugs.webkit.org/show_bug.cgi?id=109229

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2013-09-12
Reviewed by Darin Adler.

Source/WebCore:

Border and outline properties were not applied incase
its values were given in vh/vw units.

Tests: fast/css/viewport-height-border.html
       fast/css/viewport-height-outline.html
       fast/css/viewport-width-border.html
       fast/css/viewport-width-outline.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble):
Added case CSS_VH and CSS_VW.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isViewportPercentageWidth):
(WebCore::CSSPrimitiveValue::isViewportPercentageHeight):
Added APIs to check the unit type(CSS_VW and CSS_VH).
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyComputeLength::applyValue):
Calculating the border values which has been specified
in vh/vw units.The vh/vw units are calcultated as percent
of viewport height and viewport width respectively.

LayoutTests:

* fast/css/viewport-height-border-expected.txt: Added.
* fast/css/viewport-height-border.html: Added.
* fast/css/viewport-height-outline-expected.txt: Added.
* fast/css/viewport-height-outline.html: Added.
* fast/css/viewport-width-border-expected.txt: Added.
* fast/css/viewport-width-border.html: Added.
* fast/css/viewport-width-outline-expected.txt: Added.
* fast/css/viewport-width-outline.html: Added.
Added new tests for verifying that border and outline properties are
applied when its values are given in vh/vw units.
* resources/js-test-pre.js:
(shouldNotBeEqualToString):
Added this API so that can compare two strings.Similiar to
shouldBeEqualToString.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move layering-violating code from Pasteboard::plainText into Editor (Mac only at first)
https://bugs.webkit.org/show_bug.cgi?id=121075

Reviewed by Anders Carlsson.

* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainTextBypassingDHTML): Pass pasteboard as a reference.
(WebCore::Editor::pasteAsPlainTextWithPasteboard): Use readPlainTextFromPasteboard
for Mac. Also update to take a reference.
(WebCore::Editor::paste): Pass pasteboard as a reference.
(WebCore::Editor::pasteAsPlainText): Ditto.
* editing/Editor.h: Ditto.

* editing/mac/EditorMac.mm:
(WebCore::Editor::readSelectionFromPasteboard): Pass pasteboard as a reference.
(WebCore::Editor::readPlainTextFromPasteboard): Added. The declaration of this
was added (by mistake) in an earlier patch. This has code that used to be inside
Pasteboard::plainText.

* platform/Pasteboard.h: Added PasteboardPlainText. Reorganized functions in the
Pasteboard class and added some FIXMEs. Sorted platforms alphabetically and grouped
functions together and data members separate from them.

* platform/mac/DragDataMac.mm:
(WebCore::DragData::asPlainText): Updated to call readPlainTextFromPasteboard.
(WebCore::DragData::asURL): Tweaked style of unused parameter.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::read): Renamed this from plainText, and refactored so that
the data goes out in the PasteboardPlainText structure.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Turn shape's logicalwidth/height into a LayoutSize
https://bugs.webkit.org/show_bug.cgi?id=121187

Reviewed by David Hyatt.

No new tests, no behavior change.

* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape):
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::setShapeSize):
(WebCore::ShapeInfo::shapeContainingBlockHeight):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Remove unnecessarily complex template from ShapeInfo classes
https://bugs.webkit.org/show_bug.cgi?id=121213

Reviewed by Darin Adler.

These classes were trying to be way too clever, and as a result were
hard to read and hard to debug. Replace the complex templated method
calls with virtual methods to make these classes much easier to
understand and maintain.

No new tests, no behavior change.

* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape):
(WebCore::::computeSegmentsForLine):
* rendering/shapes/ShapeInfo.h:
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::getShapeValue):
* rendering/shapes/ShapeInsideInfo.h:
(WebCore::ShapeInsideInfo::computeSegmentsForLine):
(WebCore::ShapeInsideInfo::ShapeInsideInfo):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForLine):
(WebCore::ShapeOutsideInfo::getShapeValue):
* rendering/shapes/ShapeOutsideInfo.h:
(WebCore::ShapeOutsideInfo::ShapeOutsideInfo):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move LineInfo class into LineInfo.h
https://bugs.webkit.org/show_bug.cgi?id=121191

Reviewed by David Hyatt.

No new tests, no behavior change.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/LineInfo.h: Added.
(WebCore::LineInfo::LineInfo):
(WebCore::LineInfo::isFirstLine):
(WebCore::LineInfo::isLastLine):
(WebCore::LineInfo::isEmpty):
(WebCore::LineInfo::previousLineBrokeCleanly):
(WebCore::LineInfo::floatPaginationStrut):
(WebCore::LineInfo::runsFromLeadingWhitespace):
(WebCore::LineInfo::resetRunsFromLeadingWhitespace):
(WebCore::LineInfo::incrementRunsFromLeadingWhitespace):
(WebCore::LineInfo::setFirstLine):
(WebCore::LineInfo::setLastLine):
(WebCore::LineInfo::setEmpty):
(WebCore::LineInfo::setPreviousLineBrokeCleanly):
(WebCore::LineInfo::setFloatPaginationStrut):
* rendering/RenderBlockLineLayout.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SharedBuffer::createCFData should return RetainPtr<CFDataRef>
https://bugs.webkit.org/show_bug.cgi?id=121230

Reviewed by Darin Adler.

Source/WebCore:

* loader/ResourceBuffer.cpp:
(WebCore::ResourceBuffer::createCFData):
* loader/ResourceBuffer.h:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::create):
* platform/SharedBuffer.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::createCFData):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::setData):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::createPDFDocument):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::createCFData):

Source/WebKit2:

* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
* Shared/WebArchiveResource.cpp:
(WebKit::WebArchiveResource::data):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Build fix after r155621

Rubber-stamped by Anders Carlsson.

See also https://bugs.webkit.org/show_bug.cgi?id=121235 for
why this was necessary.

* css/MediaQueryEvaluator.cpp: Work around VS compiler bug.
* dom/make_names.pl: Ditto.
* loader/archive/ArchiveFactory.cpp: Ditto.
* rendering/svg/SVGPathData.cpp: Ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove RenderApplet.
<https://webkit.org/b/121231>

Reviewed by Darin Adler.

Add a RenderEmbeddedObject::createForApplet(HTMLAppletElement&) and nuke
the RenderApplet class from orbit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MarkedBlocks shouldn't be put in Allocated state if they didn't produce a FreeList
https://bugs.webkit.org/show_bug.cgi?id=121236

Reviewed by Geoffrey Garen.

Right now, after a collection all MarkedBlocks are in the Marked block state. When lazy sweeping 
happens, if a block returns an empty free list after being swept, we call didConsumeFreeList(), 
which moves the block into the Allocated block state. This happens to both the block that was 
just being allocated out of (i.e. m_currentBlock) as well as any blocks who are completely full. 
We should distinguish between these two cases: m_currentBlock should transition to 
Allocated (because we were just allocating out of it) and any subsequent block that returns an 
empty free list should transition back to the Marked state. This will make the block state more 
consistent with the actual state the block is in, and it will also allow us to speed up moving 
all blocks to the Marked state during generational collection.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::didConsumeEmptyFreeList):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[curl] Improve multipart response handling
https://bugs.webkit.org/show_bug.cgi?id=117735

Reviewed by Brent Fulgham.

The multipart/x-mixed-replace mime type in responses are ignored
with the curl network backend. To handle such responses the
MultipartHandle is introduced which will split the content using
the boundary specified by the mime type.

There are already existing tests (http/tests/multipart).

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/network/HTTPParsers.cpp:
(WebCore::parseHTTPHeader):
* platform/network/HTTPParsers.h:
* platform/network/ResourceHandleInternal.h:
* platform/network/curl/MultipartHandle.cpp: Added.
(WebCore::MultipartHandle::extractBoundary):
(WebCore::MultipartHandle::matchForBoundary):
(WebCore::MultipartHandle::checkForBoundary):
(WebCore::MultipartHandle::parseHeadersIfPossible):
(WebCore::MultipartHandle::contentReceived):
(WebCore::MultipartHandle::processContent):
(WebCore::MultipartHandle::contentEnded):
(WebCore::MultipartHandle::didReceiveData):
(WebCore::MultipartHandle::didReceiveResponse):
* platform/network/curl/MultipartHandle.h: Added.
(WebCore::MultipartHandle::MultipartHandle):
(WebCore::MultipartHandle::~MultipartHandle):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::writeCallback):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[curl] Use utf8 for headers in CurlDownload.
https://bugs.webkit.org/show_bug.cgi?id=120413

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-09-12
Reviewed by Brent Fulgham.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::headerCallback):

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