blob: ac36841e59b2f0d0d11b9dd5f12a898472544125 [file] [log] [blame]
2013-11-22 Brent Fulgham <bfulgham@apple.com>
[Win] Clean up ColorSpace handling in Windows code
https://bugs.webkit.org/show_bug.cgi?id=124795
Reviewed by Tim Horton.
Functionality covered by existing fast/css/color test suite.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::safeRGBColorSpaceRef): Handle case of Windows CG implementation not
handling sRGB correctly.
(WebCore::sRGBColorSpaceRef): Use new helper function.
* platform/graphics/win/FontCGWin.cpp:
(WebCore::Font::drawGlyphs): Pass correct color space to fill functions.
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::platformInit): Initialize color space to value passed
via the style to the constructor.
2013-11-22 Alexey Proskuryakov <ap@apple.com>
WebCrypto algorithms should check that key algorithm matches
https://bugs.webkit.org/show_bug.cgi?id=123628
Reviewed by Anders Carlsson.
No change in behavior yet, because we have one algorithm per key class.
Will be tested once more algorithms are added.
* WebCore.xcodeproj/project.pbxproj: Updated for file renames.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createRsaKeyParamsWithHash):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::createRSAKeyParametersWithHash):
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
* crypto/CryptoAlgorithmParameters.h:
(WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
* crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h: Copied from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h.
* crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed.
Renamed RsaSsaKeyParams to RsaKeyParamsWithHash, because other algorithms (like RSA-OAEP)
are in the same boat. Depending on where the spec goes, we might need to introduce
algorithm specific RSA parameter classes later, but let's reduce copy/pasted code at
least for now.
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Moved to the correct directory.
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Copied from Source/WebCore/crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp.
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign): Factored out Mac specific
code, leaving type casting to cross-platform files.
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): Ditto.
* crypto/CryptoAlgorithmRegistry.h:
(WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
Reduce copy/pasting in registration code.
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::keyAlgorithmMatches): Check key type and algorithm.
(WebCore::CryptoAlgorithmAES_CBC::encrypt): Cross platform type casting code.
Maybe we'll find a way to autogenerate or eliminate it one day.
(WebCore::CryptoAlgorithmAES_CBC::decrypt): Ditto.
* crypto/algorithms/CryptoAlgorithmAES_CBC.h:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches):
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/algorithms/CryptoAlgorithmHMAC.h:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::keyAlgorithmMatches):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):
Same changes for all algorithms that have keys.
2013-11-22 Brendan Long <b.long@cablelabs.com>
Fire "change" event on TextTrackList when a TextTrack's mode changes
https://bugs.webkit.org/show_bug.cgi?id=124789
Reviewed by Eric Carlson.
Since AudioTrackList and VideoTrackList already have this event, the
interesting bits are in TrackListBase::scheduleChangeEvent(), and we
just need to call it for TextTrackList changes.
Test: media/track/track-change-event.html
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::textTrackModeChanged): Call TrackListBase::scheduleChangeEvent().
* html/track/TextTrackList.idl: Add onchange event listener.
2013-11-22 Brendan Long <b.long@cablelabs.com>
Add TextTrackList::getTrackById().
https://bugs.webkit.org/show_bug.cgi?id=124785
Reviewed by Eric Carlson.
Test: media/track/track-id.html
* html/track/TextTrackList.cpp: Add getTrackById()
(TextTrackList::getTrackById):
* html/track/TextTrackList.h: Same.
* html/track/TextTrackList.idl: Same.
2013-11-22 Hans Muller <hmuller@adobe.com>
[CSS Shapes] When the <box> value is set, derive radii from border-radius
https://bugs.webkit.org/show_bug.cgi?id=124228
Reviewed by Dean Jackson.
Add support for BoxShape elliptical corners.
Tests: fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-001.html
fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-002.html
* platform/graphics/FloatRoundedRect.h:
(WebCore::FloatRoundedRect::bottomLeftCorner): Corrected a copy-and-pasteO.
* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::getExcludedIntervals): Returned interval now depends on the top and bottom of the line.
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape): Rounded rect parameters are now specified with a RoundedRect parameter.
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape): Pass style's rounded border to createShape().
2013-11-22 Andres Gomez <agomez@igalia.com>
Several missing/incorrect guards for LOG_DISABLED=0 against Release build (Mac)
https://bugs.webkit.org/show_bug.cgi?id=78735
Reviewed by Mario Sanchez Prada.
In a "Debug" build the CString.h header comes from another
indirect dependency. Now, we explicitly add this missing include.
* page/CaptionUserPreferencesMediaAF.cpp: Explicitly adding
missing include.
2013-11-22 Robert Sipka <sipka@inf.u-szeged.hu>
[curl] Fix of SSL certificate chain storage
https://bugs.webkit.org/show_bug.cgi?id=124768
Reviewed by Brent Fulgham.
Change the certificates storage type into ListHashSet
from HashSet to keep the chain order in each case.
This ensures that there is no difference between the stored
and the recieved certificate chain.
* platform/network/curl/SSLHandle.cpp:
(WebCore::allowsAnyHTTPSCertificateHosts):
(WebCore::sslIgnoreHTTPSCertificate):
(WebCore::pemData):
(WebCore::certVerifyCallback):
2013-11-22 Brent Fulgham <bfulgham@apple.com>
[Win] Avoid deadlock when interacting with some AVFoundationCF content
<rdar://problem/15482977> and https://bugs.webkit.org/show_bug.cgi?id=124752
Prevent deadlock caused by conflict over the "mapLock" mutex. Notification handling in the file,
which modify assets and make other changes, are required to happen on the main thread. This
patch enforces this requirement.
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::NotificationCallbackData::NotificationCallbackData): Added
(WebCore::AVFWrapper::processNotification): Moved logic from 'notificationCallback', which was
sometimes happening on a background thread.
(WebCore::AVFWrapper::notificationCallback): Dispatch calls to main thread.
2013-11-22 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error when ACCELERATED_COMPOSITING is not used.
https://bugs.webkit.org/show_bug.cgi?id=124773
Reviewed by Brent Fulgham.
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations): Added USE(ACCELERATED_COMPOSITING) guard.
2013-11-18 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Improve content-sized track layout
https://bugs.webkit.org/show_bug.cgi?id=124408
Reviewed by Dean Jackson.
Test: fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic.html
From Blink r156122 & r157633 by <jchaffraix@chromium.org>
Added a couple of optimizations to speed up the layout of content
based tracks. The idea is to narrow down the conditions for
relayouting when the height of a grid area changes. We basically
just need to layout tracks with percentage heights as they're the
only ones that change.
A new performance test is attached to demonstrate the effect of
these optimizations. We get a ~1000% improvement on a i7 M620
going from 14.5 runs/s to 165 runs/s.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalContentHeightForChild):
(WebCore::RenderGrid::layoutGridItems):
2013-11-08 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Run the content-sized tracks sizing algorithm only when required
https://bugs.webkit.org/show_bug.cgi?id=124039
Reviewed by Dean Jackson.
The current code runs the content sized track sizing algorithm all
the time, which forces a layout even when the track is not
content-sized. This change improves the situation by applying two
optimizations. In the first one, we bail out the algorithm if we
detect that we don't need to run it. And by the second one we
reduce the amount of recomputations by only iterating over the
content sized tracks instead of all of them. Both changes follow
the ideas introduced in Blink r156028 and r156168 by
<jchaffraix@chromium.org>.
As we changed the way we iterate over children (we use the
GridIterator now) the way they're stored in the RenderGrid changes
too. If a item spans through several "cells" inside the grid, we
will have a reference to it on each of them.
These two changes account for a ~3200% improvement on a i7 M620 in
the test that accompanies this change (15.5 vs 520 run/s).
New perf test: PerformanceTests/Layout/fixed-grid-lots-of-data.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Keep track
of content sized tracks and only iterate over them.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
Early return if there are no tracks to pass to the algorithm.
* rendering/RenderGrid.h:
* rendering/style/GridLength.h:
(WebCore::GridLength::isContentSized):
* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::isContentSized):
2013-11-22 Manuel Rego Casasnovas <rego@igalia.com>
[CSS Regions] Move code after early break in RenderRegion::repaintFlowThreadContentRectangle
https://bugs.webkit.org/show_bug.cgi?id=124743
Reviewed by Mihnea Ovidenie.
No new tests, covered by existing tests.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::repaintFlowThreadContentRectangle): Variable
flippedFlowThreadPortionRect is not used before the early break, so we
can move it after and save some unneeded operations.
2013-11-22 Manuel Rego Casasnovas <rego@igalia.com>
[CSS Regions] Use hasOverflowClip() in RenderRegion
https://bugs.webkit.org/show_bug.cgi?id=124746
Reviewed by Mihnea Ovidenie.
Implement the suggested FIXME in RenderRegion using hasOverflowClip().
No new tests, covered by existing tests.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion): Use
hasOverflowClip().
(WebCore::RenderRegion::rectFlowPortionForBox): Ditto.
2013-11-21 Frédéric Wang <fred.wang@free.fr>
Map the dir attribute to the CSS direction property.
https://bugs.webkit.org/show_bug.cgi?id=124572.
Reviewed by Darin Adler.
Test: mathml/presentation/mstyle-css-attributes.html
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::isPresentationAttribute): reorder attributes
(WebCore::MathMLElement::collectStyleForPresentationAttribute): reorder tags that accept dir
(WebCore::MathMLElement::isMathMLToken): add an inline function to test that a tag corresponds to a MathML Token Element.
* mathml/MathMLElement.h:
Follow-up work to address Darin's comments.
2013-11-21 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Remove ENABLE_WORKERS
https://bugs.webkit.org/show_bug.cgi?id=105784
Reviewed by Darin Adler.
2013-11-21 Alex Christensen <achristensen@webkit.org>
[Win] Unreviewed build fix after r159632.
* platform/network/curl/SSLHandle.cpp:
(WebCore::certVerifyCallback):
Fixed template syntax.
2013-11-21 Bear Travis <betravis@adobe.com>
Web Inspector: [CSS Shapes] Refactor highlighting code to decrease Shapes API surface
https://bugs.webkit.org/show_bug.cgi?id=124737
Reviewed by Timothy Hatcher.
Add a virtual method to Shapes, buildPath, that can be used to build the
path (in the Shape coordinate system) for display in the Inspector. This allows us
to remove methods such as type(), polygon(), and logicalRx/Ry() which exposed the
inner workings of the Shapes classes. Also covers the addition of the BoxShape type.
Refactoring, existing test is inspector-protocol/model/highlight-shape-outside.html.
* inspector/InspectorOverlay.cpp:
(WebCore::appendPathCommandAndPoints): Points need to be translated from shape space
to renderer space using ShapeInfo.
(WebCore::buildObjectForShapeOutside): Add the ShapeOutsideInfo to the path info struct.
* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::buildPath): Build the path for a BoxShape.
* rendering/shapes/BoxShape.h:
* rendering/shapes/PolygonShape.cpp:
(WebCore::PolygonShape::buildPath): Build the path for a PolygonShape.
* rendering/shapes/PolygonShape.h:
* rendering/shapes/RasterShape.h:
* rendering/shapes/RectangleShape.cpp:
(WebCore::RectangleShape::buildPath): Build the path for a RectangleShape.
* rendering/shapes/RectangleShape.h:
* rendering/shapes/Shape.h:
2013-11-21 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/124702> Stop overriding VALID_ARCHS.
All modern versions of Xcode set it appropriately for our needs.
Reviewed by Alexey Proskuryakov.
* Configurations/Base.xcconfig:
2013-11-21 Gwang Yoon Hwang <ryumiel@company100.net>
[GTK] Unreviewed buildfix after r159614 and r159656.
* bindings/gobject/WebKitDOMCustom.cpp: Add missing header
2013-11-21 Laszlo Vidacs <lac@inf.u-szeged.hu>
Fix WinCairo unreachable code warnings in SimpleLineLayout.cpp
https://bugs.webkit.org/show_bug.cgi?id=124704
Reviewed by Antti Koivisto.
Fix unreachable code warnings using conditional directives.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2013-11-21 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/124701> Fix an error in a few Xcode configuration setting files.
Reviewed by Alexey Proskuryakov.
* Configurations/Base.xcconfig:
2013-11-21 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/124700> Fix some deprecation warnings.
Reviewed by Anders Carlsson.
* platform/mac/HTMLConverter.mm:
(fileWrapperForURL): Move off a deprecated NSFileWrapper method.
2013-11-21 Daniel Bates <dabates@apple.com>
[iOS] Build fix; export symbol for WebCore::provideDeviceOrientationTo()
Add the symbol __ZN7WebCore26provideDeviceOrientationToEPNS_4PageEPNS_23DeviceOrientationClientE.
* WebCore.exp.in:
2013-11-21 Daniel Bates <dabates@apple.com>
Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard
https://bugs.webkit.org/show_bug.cgi?id=124741
Reviewed by Alexey Proskuryakov.
Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard around code that is unused
when building with feature NETWORK_CFDATA_ARRAY_CALLBACK.
Additionally, add a declaration for allocateSegment() with attribute WARN_UNUSED_RETURN
to have the compiler warn when the return value of this function is unused. Together with
warnings treated as errors this change will prevent a memory leak.
* platform/SharedBuffer.cpp:
2013-11-21 Daniel Bates <dabates@apple.com>
Remove unused functions from WebCore and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=124739
Reviewed by Alexey Proskuryakov.
* editing/markup.cpp: Remove unused functions isHTMLBlockElement and
ancestorToRetainStructureAndAppearanceWithNoRenderer.
* rendering/InlineElementBox.cpp: Append newline to the end of the file.
2013-11-21 Daniel Bates <dabates@apple.com>
Only generate isObservable() when IDL specifies GenerateIsReachable
https://bugs.webkit.org/show_bug.cgi?id=124729
Reviewed by Geoffrey Garen.
We should only generate the static inline function isObservable() when the IDL
specifies GenerateIsReachable. Otherwise, this function is unused.
Added a new test IDL TestGenerateIsReachable.idl and expected results to test that
we generate isObservable() when an IDL specifies GenerateIsReachable. Additionally,
rebased existing test results.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.cpp: Added.
* bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachablePrivate.h: Added.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Removed unused function isObservable().
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
* bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
* bindings/scripts/test/JS/JSTestException.cpp: Ditto.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added.
* bindings/scripts/test/JS/JSTestInterface.cpp: Removed unused function isObservable().
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
* bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
* bindings/scripts/test/JS/JSattribute.cpp: Ditto.
* bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Added.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Added.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Added.
* bindings/scripts/test/TestGenerateIsReachable.idl: Added.
2013-11-21 Beth Dakin <bdakin@apple.com>
Add a new mode to extend the tile cache beyond the page
https://bugs.webkit.org/show_bug.cgi?id=124216
Reviewed by Simon Fraser.
This patch makes it possible to give the tile cache a margin of tiles. If there is
a margin of tiles, this patch paints those tiles with the background color. Note
that this patch does not actually give the tile cache a margin at this time.
You opt into a margined tiled cache by called setTileMargins() with number of
pixels that the margin on that side should be.
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::tilesWouldChangeForVisibleRect):
TileController::bounds() now computes the bounds INCLUDING the margin.
(WebCore::TileController::bounds):
adjustRectAtTileIndexForMargin() is a new function that is required to get the
rect size for tiles in the margin right. rectForTileIndex() assumes all tiles
strive to be the size of m_tileSize, but now margin tiles will be whatever the
margin sizes were set to.
(WebCore::TileController::adjustRectAtTileIndexForMargin):
(WebCore::TileController::rectForTileIndex):
This is another instance where m_tileSize is not always the right size to use.
(WebCore::TileController::getTileIndexRangeForRect):
The tile coverage rect now might include the margin tiles. Only include them in
slow-scrolling mode if the current position is within one tile of the edge.
(WebCore::TileController::computeTileCoverageRect):
tileSizeForCoverageRect() does not make sense in a world where the coverage rect
will include margin. Instead, this patch implements the current strategy more
explicitly by returning the visibleRect in the slow scrolling case, and in the
process this patch also re-names tileSizeForCoverageRect() to computeTileSize()
since it no longer takes a coverageRect.
(WebCore::TileController::computeTileSize):
(WebCore::TileController::revalidateTiles):
New setters and getters for the tile margins on each side.
(WebCore::TileController::setTileMargins):
(WebCore::TileController::hasMargins):
(WebCore::TileController::topMarginHeight):
(WebCore::TileController::bottomMarginHeight):
(WebCore::TileController::leftMarginWidth):
(WebCore::TileController::rightMarginWidth):
New function to add margin onto the composited bounds if there is one.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::tiledBackingHasMargin):
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::compositedBoundsIncludingMargin):
* rendering/RenderLayerBacking.h:
Do not set masks to bounds if there is a margin on the root layer.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::mainFrameBackingIsTiledWithMargin):
* rendering/RenderLayerCompositor.h:
Allow background color to paint into the margin tiles.
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
2013-11-21 Alexey Proskuryakov <ap@apple.com>
Implement WebCrypto wrapKey
https://bugs.webkit.org/show_bug.cgi?id=124738
Reviewed by Anders Carlsson.
Tests: crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html
crypto/subtle/aes-cbc-wrap-rsa.html
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::exportKey): Factored out the actual operation that can be chained with
encryption for wrapKey.
(WebCore::JSSubtleCrypto::exportKey):
(WebCore::JSSubtleCrypto::wrapKey):
(WebCore::JSSubtleCrypto::unwrapKey): Fixed a memory leak in failure code path.
* crypto/SubtleCrypto.idl: Added wrapKey.
2013-11-21 Alexey Proskuryakov <ap@apple.com>
Implement WebCrypto unwrapKey
https://bugs.webkit.org/show_bug.cgi?id=124725
Reviewed by Anders Carlsson.
Tests: crypto/subtle/aes-cbc-unwrap-failure.html
crypto/subtle/aes-cbc-unwrap-rsa.html
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
* bindings/js/JSCryptoAlgorithmDictionary.h:
Removed calls for wrap/unwrap parameter parsing, these are just the same as encrypt/decrypt.
* bindings/js/JSCryptoOperationData.cpp:
(WebCore::cryptoOperationDataFromJSValue):
* bindings/js/JSCryptoOperationData.h:
* crypto/CryptoKeySerialization.h:
More Vector<char> elimination.
* bindings/js/JSDOMPromise.cpp:
* bindings/js/JSDOMPromise.h:
Removed unneccessary copy constructor and assignment operator, they are no diffdrent
than compiler generated ones.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::cryptoKeyUsagesFromJSValue): Minor style fixes.
(WebCore::JSSubtleCrypto::encrypt): Ditto.
(WebCore::JSSubtleCrypto::decrypt): Ditto.
(WebCore::JSSubtleCrypto::sign): Ditto.
(WebCore::JSSubtleCrypto::verify): Ditto.
(WebCore::JSSubtleCrypto::generateKey): Ditto.
(WebCore::importKey): Separated actual import operation and the parts that read
arguments from ExecState, and call the promise. Logically, this should be outside
of bindings code even, but JWK makes that quite challenging.
(WebCore::JSSubtleCrypto::importKey): This only does the more mundane arguments
and return parts now.
(WebCore::JSSubtleCrypto::exportKey): Minor style fixes.
(WebCore::JSSubtleCrypto::unwrapKey): Chain decrypt and import.
* crypto/CryptoAlgorithm.cpp:
(WebCore::CryptoAlgorithm::encryptForWrapKey):
(WebCore::CryptoAlgorithm::decryptForUnwrapKey):
* crypto/CryptoAlgorithm.h:
There are algorithms that expose wrap/unwrap, but not encrypt/decrypt. These will
override these new functions, and leave encrypt/decrypt to raise NOT_SUPPORTED_ERR.
* crypto/SubtleCrypto.idl: Added unwrapKey.
2013-11-21 Robert Sipka <sipka@inf.u-szeged.hu>
[curl]Improve ssl certificate storage and check
https://bugs.webkit.org/show_bug.cgi?id=124569
Reviewed by Brent Fulgham.
Storage and check the whole certificate chain, not just the root certificate.
* platform/network/curl/SSLHandle.cpp:
(WebCore::allowsAnyHTTPSCertificateHosts):
(WebCore::sslIgnoreHTTPSCertificate):
(WebCore::pemData):
(WebCore::certVerifyCallback):
2013-11-21 Mihai Maerean <mmaerean@adobe.com>
Fix hover area for divs with css transforms
https://bugs.webkit.org/show_bug.cgi?id=124647
Reviewed by Allan Sandfeld Jensen.
Non transformed layers are now being hit last, not through or in-between transformed layers.
The paint order says that the divs creating stacking contexts (including transforms) are painted after the
other siblings so they should be hit tested in the reverse order. Also, a rotated div in a non-rotated parent
should be hit in its entire area, not hit its parent's background, even if the z-coordinate is negative where
the mouse is located.
Test: transforms/3d/hit-testing/hover-rotated-negative-z.html
* rendering/RenderLayer.cpp:
(WebCore::computeZOffset):
2013-11-21 Andres Gomez <agomez@igalia.com>
[GTK] Release compilation fails when defining "LOG_DISABLED=0"
https://bugs.webkit.org/show_bug.cgi?id=124661
Reviewed by Mario Sanchez Prada.
In a "Debug" build the CString.h header comes from another
indirect dependency. Now, we explicitly add this missing include.
* html/HTMLTrackElement.cpp: Explicitly adding missing include.
2013-11-21 Ryosuke Niwa <rniwa@webkit.org>
Fix Range.insertNode when the inserted node is in the same container as the Range
https://bugs.webkit.org/show_bug.cgi?id=123957
Reviewed by Antti Koivisto.
Inspired by https://chromium.googlesource.com/chromium/blink/+/fb6ca1f488703e8d4f20ce6449cc8ea210be6edb
When a node from the same container is inserted, we can't simply adjust m_end with the offset.
Compute m_start and m_end from the inserted nodes instead.
Also, don't adjust m_start and m_end to nodes outside of the document if the inserted nodes had been
removed by mutation events.
Test: fast/dom/Range/range-insertNode-same-container.html
* dom/Range.cpp:
(WebCore::Range::insertNode):
2013-11-21 Ryosuke Niwa <rniwa@webkit.org>
nextBoundary and previousBoundary are very slow when there is a password field
https://bugs.webkit.org/show_bug.cgi?id=123973
Reviewed by Antti Koivisto.
Merge https://chromium.googlesource.com/chromium/blink/+/57366eec5e3edea54062d4e74c0e047f8681dbad
When iterating through DOM nodes nextBoundary and previousBoundary convert the contents of nodes using
text security to a sequence of 'x' characters. The SimplifiedBackwardsTextIterator and TextIterator
may iterate past node boundaries. Before this patch, the transformation was done looking at the starting
node rather than the current node. In some situations, this replaced all boundaries with 'x' and caused
the text iterator to continue iterating and transforming until the extent of the document.
Test: editing/deleting/password-delete-performance.html
* editing/TextIterator.h:
(WebCore::SimplifiedBackwardsTextIterator::node):
* editing/VisibleUnits.cpp:
(WebCore::previousBoundary):
(WebCore::nextBoundary):
2013-11-21 Ryosuke Niwa <rniwa@webkit.org>
HTML parser should not associate elements inside templates with forms
https://bugs.webkit.org/show_bug.cgi?id=117779
Reviewed by Antti Koivisto.
Merge https://chromium.googlesource.com/chromium/blink/+/45aadf7ee7ee010327eb692066cf013315ef3ed7
When parsing <form><template><input>, the previous behavior was to associate the <input> with the <form>,
even though they're not in the same tree (or even the same document).
This patch changes that by checking, prior to creating a form control element, whether the element to be
created lives in a document with a browsing context.
We don't update m_form as needed to faithfully match the HTML5 specification's form element pointer
http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#form-element-pointer
and its algorithm for creating and inserting nodes:
http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#creating-and-inserting-nodes
While this leaves isindex's reference to form element pointer stale:
http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#isindex
The HTML5 specification matches the behaviors of Chrome and Firefox so we leave it as is.
Test: fast/dom/HTMLTemplateElement/no-form-association.html
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElement):
2013-11-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Cannot scroll in option menu when it larger than the screen
https://bugs.webkit.org/show_bug.cgi?id=124671
Reviewed by Martin Robinson.
The problem is that the popup menu is not resized to fit in the
screen, so it doesn't scroll and some of the items are offscreen
so they can't be selected either. GTK+ automatically resizes the
popup menus to fit in the work area, but only when the menu is
already positioned.
* platform/gtk/GtkPopupMenu.cpp:
(WebCore::GtkPopupMenu::popUp): Schedule a resize of the popup
menu right after showing it once it has a position.
2013-11-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Mark all deprecated symbols in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=124406
Reviewed by Gustavo Noronha Silva.
Move deprecated API from WebKitDOMCustom to a new file
WebKitDOMDeprecated leaving in WebKitDOMCustom only the
non-deprecated API that is not autogenerated. Also added the
deprecation decorations and tags in the documentation.
* bindings/gobject/GNUmakefile.am:
* bindings/gobject/WebKitDOMCustom.cpp:
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols:
* bindings/gobject/WebKitDOMDeprecated.cpp: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp.
(webkit_dom_blob_webkit_slice):
(webkit_dom_html_element_get_id):
(webkit_dom_html_element_set_id):
(webkit_dom_html_element_get_class_name):
(webkit_dom_html_element_set_class_name):
(webkit_dom_html_element_get_class_list):
(webkit_dom_html_form_element_dispatch_form_change):
(webkit_dom_html_form_element_dispatch_form_input):
(webkit_dom_webkit_named_flow_get_overflow):
(webkit_dom_element_get_webkit_region_overflow):
(webkit_dom_webkit_named_flow_get_content_nodes):
(webkit_dom_webkit_named_flow_get_regions_by_content_node):
(webkit_dom_bar_info_get_property):
(webkit_dom_bar_info_class_init):
(webkit_dom_bar_info_init):
(webkit_dom_bar_info_get_visible):
(webkit_dom_console_get_memory):
(webkit_dom_css_style_declaration_get_property_css_value):
(webkit_dom_document_get_webkit_hidden):
(webkit_dom_document_get_webkit_visibility_state):
(webkit_dom_html_document_open):
(webkit_dom_html_element_set_item_id):
(webkit_dom_html_element_get_item_id):
(webkit_dom_html_element_get_item_ref):
(webkit_dom_html_element_get_item_prop):
(webkit_dom_html_element_set_item_scope):
(webkit_dom_html_element_get_item_scope):
(webkit_dom_html_element_get_item_type):
(webkit_dom_html_style_element_set_scoped):
(webkit_dom_html_style_element_get_scoped):
(webkit_dom_html_properties_collection_get_property):
(webkit_dom_html_properties_collection_class_init):
(webkit_dom_html_properties_collection_init):
(webkit_dom_html_properties_collection_item):
(webkit_dom_html_properties_collection_named_item):
(webkit_dom_html_properties_collection_get_length):
(webkit_dom_html_properties_collection_get_names):
(webkit_dom_node_get_attributes):
(webkit_dom_node_has_attributes):
(webkit_dom_memory_info_get_property):
(webkit_dom_memory_info_class_init):
(webkit_dom_memory_info_init):
(webkit_dom_memory_info_get_total_js_heap_size):
(webkit_dom_memory_info_get_used_js_heap_size):
(webkit_dom_memory_info_get_js_heap_size_limit):
(webkit_dom_micro_data_item_value_class_init):
(webkit_dom_micro_data_item_value_init):
(webkit_dom_performance_get_memory):
(webkit_dom_property_node_list_get_property):
(webkit_dom_property_node_list_class_init):
(webkit_dom_property_node_list_init):
(webkit_dom_property_node_list_item):
(webkit_dom_property_node_list_get_length):
(webkit_dom_html_media_element_get_start_time):
(webkit_dom_html_media_element_get_initial_time):
(webkit_dom_html_head_element_get_profile):
(webkit_dom_html_head_element_set_profile):
(webkit_dom_processing_instruction_get_data):
(webkit_dom_processing_instruction_set_data):
* bindings/gobject/WebKitDOMDeprecated.h: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.h.
* bindings/gobject/WebKitDOMDeprecated.symbols: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.symbols.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction): Do not include deprecation guards in the cpp file.
* bindings/scripts/gobject-generate-headers.pl: Do not create
fordward declarations for non-existent classes like Custom and
Deprecated.
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
(webkit_dom_test_event_target_dispatch_event):
2013-11-20 Jae Hyun Park <jae.park@company100.net>
[CoordinatedGraphics] Use std::unique_ptrs rather than OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=124692
Reviewed by Noam Rosenthal.
No new tests, covered by existing ones.
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::TiledBackingStore):
* platform/graphics/TiledBackingStore.h:
* platform/graphics/TiledBackingStoreBackend.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::createBackingStore):
* platform/graphics/texmap/coordinated/CoordinatedTile.h:
2013-11-20 Brady Eidson <beidson@apple.com>
Add more infrastructure for ServerConnection communication between Web and Database processes
https://bugs.webkit.org/show_bug.cgi?id=124693
Reviewed by Anders Carlsson.
* WebCore.exp.in:
2013-11-20 Ryosuke Niwa <rniwa@webkit.org>
Hoist <template> to head when found between </head> and <body> for consistency with <script>
https://bugs.webkit.org/show_bug.cgi?id=123949
Reviewed by Antti Koivisto.
Merge https://chromium.googlesource.com/chromium/blink/+/835fb468fd211054a920fb7612a6dc5043662495
Move template elements between head and body elements into the head to be consistent with script elements.
The HTML5 specification was changed in http://html5.org/tools/web-apps-tracker?from=8217&to=8218.
Inline comments below are cited from https://www.w3.org/Bugs/Public/show_bug.cgi?id=23002
and https://codereview.chromium.org/25900003 for clarity.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTag): Add the template element to the list of elements to be hoisted into
the head element.
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
Replace the assertion that isParsingFragment is true when item->node() == m_tree.openElements()->rootNode() since,
with this change, we can now invoke resetInsertionMode when parsing a normal document (not fragment) and there is
only the html element on the stack of open elements.
For the second change, consider: <head></head><template>
This example breaks in the old HTML parser because the template element is handled by "after head" state which
pushes the head element back on, processes the template element for "in head", then pops the head element off.
EOF is reached, which processes a fake close tag for the template element, which pops the template element off
and resets the insertion mode appropriately
The problem here is that "reset the insertion mode" is going to inspect the bottom-most element on the stack which
is now the html element and it will set the mode to "before head". Nothing good happens after this.
We fix this problem by having the reset algorithm check if the head element pointer is set, and if so, go to after
head instead of before head.
2013-11-20 Radu Stavila <stavila@adobe.com>
[CSS Regions] Implement visual overflow for first & last regions
https://bugs.webkit.org/show_bug.cgi?id=118665
In order to properly propagate the visual overflow of elements flowed inside regions,
the responsiblity of painting and hit-testing content inside flow threads has been
moved to the flow thread layer's level.
Each region keeps the associated overflow with each box in the RenderBoxRegionInfo
structure, including one for the flow thread itself. This data is used during
painting and hit-testing.
Reviewed by David Hyatt.
Tests: fast/regions/overflow-first-and-last-regions-in-container-hidden.html
fast/regions/overflow-first-and-last-regions.html
fast/regions/overflow-nested-regions.html
fast/regions/overflow-region-float.html
fast/regions/overflow-region-inline.html
fast/regions/overflow-region-transform.html
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::setLayoutOverflow):
(WebCore::InlineFlowBox::setVisualOverflow):
* rendering/InlineFlowBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverflowFromChildren):
(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::estimateRegionRangeForBoxChild):
(WebCore::RenderBlock::updateRegionRangeForBoxChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::hasNextPage):
(WebCore::RenderBlockFlow::relayoutForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::borderBoxRectInRegion):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::addLayoutOverflow):
(WebCore::RenderBox::addVisualOverflow):
(WebCore::RenderBox::isUnsplittableForPagination):
(WebCore::RenderBox::overflowRectForPaintRejection):
* rendering/RenderBox.h:
(WebCore::RenderBox::canHaveOutsideRegionRange):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
* rendering/RenderBoxRegionInfo.h:
(WebCore::RenderBoxRegionInfo::createOverflow):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
(WebCore::RenderFlowThread::mapFromLocalToFlowThread):
(WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
(WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
(WebCore::RenderFlowThread::flipForWritingModeLocalCoordinates):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::RenderFlowThread::addRegionsVisualOverflow):
(WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::expandClipRectForRegionAndReflection):
(WebCore::expandClipRectForDescendantsAndReflection):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::parentClipRects):
(WebCore::RenderLayer::calculateRects):
(WebCore::RenderLayer::intersectsDamageRect):
(WebCore::RenderLayer::updateDescendantsLayerListsIfNeeded):
(WebCore::RenderLayer::repaintIncludingDescendants):
(WebCore::RenderLayer::paintNamedFlowThreadInsideRegion):
(WebCore::RenderLayer::paintFlowThreadIfRegion):
(WebCore::RenderLayer::hitTestFlowThreadIfRegion):
* rendering/RenderLayer.h:
(WebCore::ClipRect::inflateX):
(WebCore::ClipRect::inflateY):
(WebCore::ClipRect::inflate):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::addOverflowFromChildren):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
(WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::createStyle):
(WebCore::RenderNamedFlowFragment::namedFlowThread):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderOverflow.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::flowThreadPortionOverflowRect):
(WebCore::RenderRegion::flowThreadPortionLocation):
(WebCore::RenderRegion::regionContainerLayer):
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
(WebCore::RenderRegion::computeOverflowFromFlowThread):
(WebCore::RenderRegion::repaintFlowThreadContent):
(WebCore::RenderRegion::repaintFlowThreadContentRectangle):
(WebCore::RenderRegion::insertedIntoTree):
(WebCore::RenderRegion::ensureOverflowForBox):
(WebCore::RenderRegion::rectFlowPortionForBox):
(WebCore::RenderRegion::addLayoutOverflowForBox):
(WebCore::RenderRegion::addVisualOverflowForBox):
(WebCore::RenderRegion::layoutOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paint):
2013-11-20 Ryosuke Niwa <rniwa@webkit.org>
[HTML parser] reset insertion mode appropriate must check for "in select in table" mode
https://bugs.webkit.org/show_bug.cgi?id=123850
Reviewed by Antti Koivisto.
Merge https://chromium.googlesource.com/chromium/blink/+/2cb7523df57dfb48111f6aa16b7138cd54024ba7
The HTML specification has been updated to detect encountering a template element inside of a select element,
which in turn is inside of a table element. In this case, the select element will cause the parser to be in
"InSelectInTable" mode. Thus when the template element closes, it should return to that mode.
The fix here is that resetInsertionModeAppropriately must continue looking up the stack if the first node is
select element to see whether the select element is inside of a table element.
See also: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#reset-the-insertion-mode-appropriately
Test: html5lib/resources/template.dat
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
2013-11-20 Mark Lam <mark.lam@apple.com>
Build fix for last commit.
https://bugs.webkit.org/show_bug.cgi?id=124634.
Not reviewed.
No new tests.
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
2013-11-20 Mark Lam <mark.lam@apple.com>
Introducing VMEntryScope to update the VM stack limit.
https://bugs.webkit.org/show_bug.cgi?id=124634.
Reviewed by Geoffrey Garen.
No new tests.
Renamed dynamicGlobalObject() to vmEntryGlobalObject().
Replaced uses of DynamicGlobalObjectScope with VMEntryScope.
* ForwardingHeaders/runtime/VMEntryScope.h: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
(WebCore::JSCryptoAlgorithmBuilder::add):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::create):
* bindings/js/JSDOMBinding.cpp:
(WebCore::firstDOMWindow):
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::vmEntryGlobalObject):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::evaluateBreakpointAction):
(WebCore::ScriptDebugServer::handlePause):
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
* bindings/objc/WebScriptObject.mm:
(WebCore::addExceptionToConsole):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertValueToNPVariant):
* bridge/objc/objc_instance.mm:
(ObjcInstance::moveGlobalExceptionToExecState):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::convertValueToObjcObject):
* bridge/objc/objc_utility.mm:
(JSC::Bindings::convertValueToObjcValue):
2013-11-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toHTMLFooElement() to clean up static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=124571
Reviewed by Ryosuke Niwa.
Though there are a lot of clean up commits before, there are still
use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
toHTMLDetails|Meta|Summary|TableCaptionElement().
Additionally, other static_cast<> are removed as well.
No new tests, no behavior changes.
* html/HTMLDetailsElement.h:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::selectNextSourceChild):
* html/HTMLMetaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::isDisabledFormControl):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateWidgetCallback):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::detailsElement):
* html/HTMLSummaryElement.h:
* html/HTMLTableCaptionElement.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::caption):
* html/HTMLTagNames.in:
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::summaryElement):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::handleFallbackContent):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
* page/DragController.cpp:
(WebCore::DragController::canProcessDrag):
* page/Frame.cpp:
(WebCore::Frame::searchForLabelsBeforeElement):
* page/SpatialNavigation.cpp:
(WebCore::frameOwnerElement):
2013-11-20 Ryosuke Niwa <rniwa@webkit.org>
Clear TemplateContentDocumentFragment::m_host when HTMLTemplateElement is destroyed
https://bugs.webkit.org/show_bug.cgi?id=122806
Reviewed by Antti Koivisto.
Merge https://chromium.googlesource.com/chromium/blink/+/858ed5f6341de9d900768c1f4668fcfce870c52e
The document fragment of a template element outlives the element itself.
Clear the host property on the document fragment when that happens.
Test: fast/dom/HTMLTemplateElement/content-outlives-template-crash.html
* dom/TemplateContentDocumentFragment.h:
* html/HTMLTemplateElement.cpp:
(WebCore::HTMLTemplateElement::~HTMLTemplateElement):
* html/HTMLTemplateElement.h:
2013-11-20 Chris Fleizach <cfleizach@apple.com>
AX: Implement CSS -webkit-alt property (text alternative for generated content pseudo-elements ::before and ::after)
https://bugs.webkit.org/show_bug.cgi?id=120188
Reviewed by Dean Jackson.
Add a -webkit-alt CSS property that can be used to label Image content or Text content for accessibility clients.
To accomplish this, it sets the string in the RenderStyle. Then when the ContentData creates an anonymous renderer,
it sets that string on the TextFragment or RenderImage, which can be queried by accessibility code.
Test: platform/mac/accessibility/webkit-alt-for-css-content.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
(WebCore::objectInclusionFromAltText):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::altTextToCSSValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAlt):
* css/CSSParser.h:
* css/CSSPropertyNames.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/RenderImage.h:
(WebCore::RenderImage::altText):
(WebCore::RenderImage::setAltText):
* rendering/RenderTextFragment.h:
* rendering/style/ContentData.cpp:
(WebCore::ImageContentData::createRenderer):
(WebCore::TextContentData::createRenderer):
* rendering/style/ContentData.h:
(WebCore::ContentData::setAltText):
(WebCore::ContentData::altText):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setContent):
(WebCore::RenderStyle::setContentAltText):
(WebCore::RenderStyle::contentAltText):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.h:
2013-11-20 Roger Fong <roger_fong@apple.com>
Use compile flag SH_UNFOLD_SHORT_CIRCUIT when compiling shaders.
https://bugs.webkit.org/show_bug.cgi?id=124684.
Reviewed by Brent Fulgham.
Existing test webgl/1.0.2/conformance/glsl/misc/shader-with-short-circuiting-operators.html
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2013-11-20 Robert Sipka <sipka@inf.u-szeged.hu>
[curl] Improve detecting and handling of SSL related errors
https://bugs.webkit.org/show_bug.cgi?id=119436
Reviewed by Brent Fulgham.
Set the exact SSL verification error on CURL
and store the enabled domain with certificate.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/curl/ResourceError.h:
(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::sslErrors):
(WebCore::ResourceError::setSSLErrors):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::downloadTimerCallback):
(WebCore::ResourceHandleManager::initializeHandle):
* platform/network/curl/SSLHandle.cpp: Added.
(WebCore::allowsAnyHTTPSCertificateHosts):
(WebCore::sslIgnoreHTTPSCertificate):
(WebCore::sslCertificateFlag):
(WebCore::pemData):
(WebCore::certVerifyCallback):
(WebCore::sslctxfun):
(WebCore::setSSLVerifyOptions):
* platform/network/curl/SSLHandle.h: Added.
2013-11-20 Bem Jones-Bey <bjonesbe@adobe.com>
[css shapes] Parse new circle shape syntax
https://bugs.webkit.org/show_bug.cgi?id=124618
Reviewed by Antti Koivisto.
Implement parsing of the new cicle shape syntax. The implementation of
the old syntax has been move aside as deprecated, and will be removed
once the new syntax is stable.
Updated existing parsing tests to cover this.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForCenterCoordinate): Create a CSSPrimitiveValue from a
BasicShapeCenterCoordinate.
(WebCore::valueForBasicShape): Convert new basic shape and rename old
one.
(WebCore::convertToCenterCoordinate): Create a
BasicShapeCenterCoordinate from a CSSPrimitiveValue.
(WebCore::basicShapeForValue): Convert new shape value and rename old
one.
* css/CSSBasicShapes.cpp:
(WebCore::buildCircleString): Build a new circle string.
(WebCore::CSSBasicShapeCircle::cssText): Serialize the new circle
shape.
(WebCore::CSSBasicShapeCircle::equals): Compare new circle shapes.
(WebCore::CSSBasicShapeCircle::serializeResolvingVariables):
* css/CSSBasicShapes.h:
(WebCore::CSSBasicShapeCircle::CSSBasicShapeCircle): Add class for new
circle shape.
(WebCore::CSSDeprecatedBasicShapeCircle::create): Renamed to move out
of the way of the new circle implementation.
(WebCore::CSSDeprecatedBasicShapeCircle::centerX): Ditto.
(WebCore::CSSDeprecatedBasicShapeCircle::centerY): Ditto.
(WebCore::CSSDeprecatedBasicShapeCircle::radius): Ditto.
(WebCore::CSSDeprecatedBasicShapeCircle::setCenterX): Ditto.
(WebCore::CSSDeprecatedBasicShapeCircle::setCenterY): Ditto.
(WebCore::CSSDeprecatedBasicShapeCircle::setRadius): Ditto.
(WebCore::CSSDeprecatedBasicShapeCircle::CSSDeprecatedBasicShapeCircle): Ditto.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseShapeRadius): Parse the radius for the new
circle syntax. Will also be used by the new ellipse syntax.
(WebCore::CSSParser::parseBasicShapeCircle): Parse the new circle
syntax.
(WebCore::CSSParser::parseDeprecatedBasicShapeCircle): Rename to make
way for the new implementation.
(WebCore::isDeprecatedBasicShape): Check if we have a new circle or an
old circle.
(WebCore::CSSParser::parseBasicShape): Update to parse the new circle
syntax.
* css/CSSParser.h:
* css/CSSValueKeywords.in: Add support for the new circle keywords.
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
* rendering/style/BasicShapes.cpp: Deprecate old circle and add stub
for layout code.
(WebCore::DeprecatedBasicShapeCircle::path): Rename to make way for
the new implementation.
(WebCore::DeprecatedBasicShapeCircle::blend): Rename to make way for
the new implementation.
(WebCore::BasicShapeCircle::path): Create path for new circle shape.
(WebCore::BasicShapeCircle::blend): Interpolate the new circle shape.
* rendering/style/BasicShapes.h:
(WebCore::BasicShapeCenterCoordinate::BasicShapeCenterCoordinate):
Represent an x or y coordinate for the center of a new circle,
since it can be either a keyword along with an offset that cannot
be resolved until layout time or an ordinary Length. This will
also be used by the new ellipse implementation.
(WebCore::BasicShapeCenterCoordinate::keyword):
(WebCore::BasicShapeCenterCoordinate::length):
(WebCore::BasicShapeCenterCoordinate::blend): Interpolate.
(WebCore::BasicShapeRadius::BasicShapeRadius): Represent the radius of
a new circle shape since it can either be a straightforward Length or
a keyword that cannot be resolved until layout time.
(WebCore::BasicShapeRadius::value):
(WebCore::BasicShapeRadius::type):
(WebCore::BasicShapeRadius::blend): Interpolate.
(WebCore::BasicShapeCircle::centerX):
(WebCore::BasicShapeCircle::centerY):
(WebCore::BasicShapeCircle::radius):
(WebCore::BasicShapeCircle::setCenterX):
(WebCore::BasicShapeCircle::setCenterY):
(WebCore::BasicShapeCircle::setRadius):
(WebCore::BasicShapeCircle::BasicShapeCircle): New circle class.
(WebCore::DeprecatedBasicShapeCircle::create): Rename to make room for
new circle implementation.
(WebCore::DeprecatedBasicShapeCircle::DeprecatedBasicShapeCircle): Ditto.
2013-11-20 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Add BoxShape and FloatRoundingRect classes
https://bugs.webkit.org/show_bug.cgi?id=124368
Reviewed by Dean Jackson.
Added the BoxShape class. It's now used to represent shape-outside box
values: [margin/border/padding/content]-box. BoxShape depends on a new
FloatRoundedRect class, which is a float analog of the existing (int)
RoundedRect class. The FloatRoundedRect class contains the same basic
methods and accessors as BorderRect and adds a set of four methods,
for example topLeftCorner(), that return a FloatRect that represents the
bounds of one elliptical corner. I also added a method, xInterceptsAtY()
that returns two X coordinates of the intersection between a horizontal
line and the rounded rectangle.
No new tests, this is just an internal refactoring.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FloatRoundedRect.cpp: Added.
(WebCore::FloatRoundedRect::FloatRoundedRect):
(WebCore::FloatRoundedRect::Radii::isZero):
(WebCore::FloatRoundedRect::Radii::scale):
(WebCore::FloatRoundedRect::Radii::expand):
(WebCore::cornerRectIntercept):
(WebCore::FloatRoundedRect::xInterceptsAtY):
* platform/graphics/FloatRoundedRect.h: Added.
(WebCore::FloatRoundedRect::Radii::Radii):
(WebCore::FloatRoundedRect::Radii::setTopLeft):
(WebCore::FloatRoundedRect::Radii::setTopRight):
(WebCore::FloatRoundedRect::Radii::setBottomLeft):
(WebCore::FloatRoundedRect::Radii::setBottomRight):
(WebCore::FloatRoundedRect::Radii::topLeft):
(WebCore::FloatRoundedRect::Radii::topRight):
(WebCore::FloatRoundedRect::Radii::bottomLeft):
(WebCore::FloatRoundedRect::Radii::bottomRight):
(WebCore::FloatRoundedRect::Radii::expand):
(WebCore::FloatRoundedRect::Radii::shrink):
(WebCore::FloatRoundedRect::rect):
(WebCore::FloatRoundedRect::radii):
(WebCore::FloatRoundedRect::isRounded):
(WebCore::FloatRoundedRect::isEmpty):
(WebCore::FloatRoundedRect::setRect):
(WebCore::FloatRoundedRect::setRadii):
(WebCore::FloatRoundedRect::move):
(WebCore::FloatRoundedRect::inflate):
(WebCore::FloatRoundedRect::expandRadii):
(WebCore::FloatRoundedRect::shrinkRadii):
(WebCore::FloatRoundedRect::topLeftCorner):
(WebCore::FloatRoundedRect::topRightCorner):
(WebCore::FloatRoundedRect::bottomLeftCorner):
(WebCore::FloatRoundedRect::bottomRightCorner):
(WebCore::operator==):
* rendering/shapes/BoxShape.cpp: Added.
(WebCore::BoxShape::BoxShape):
(WebCore::BoxShape::getExcludedIntervals):
(WebCore::BoxShape::getIncludedIntervals):
(WebCore::BoxShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/BoxShape.h: Added.
* rendering/shapes/Shape.cpp:
(WebCore::createBoxShape):
(WebCore::Shape::createShape):
2013-11-20 Antti Koivisto <antti@apple.com>
Simple line layout should support floats
https://bugs.webkit.org/show_bug.cgi?id=124666
Reviewed by Dave Hyatt.
Tests: fast/text/simple-lines-float-compare.html
fast/text/simple-lines-float.html
* rendering/line/LineWidth.h:
(WebCore::LineWidth::logicalLeftOffset):
Expose the left offset so we don't need to recompute it.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::computeLineLeft):
Include the left offset from floats.
(WebCore::SimpleLineLayout::createTextRuns):
Keep the flow height updated during the loop as LineWidth reads the current position from there.
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
We now bake the border and the padding to the line left offset. No need to add it during resolve.
2013-11-20 Alexey Proskuryakov <ap@apple.com>
Use std::function callbacks in CryptoAlgorithm instead of JS promises
https://bugs.webkit.org/show_bug.cgi?id=124673
Reviewed by Anders Carlsson.
To implement key wrapping/unwrapping, we'll need to chain existing operations.
It's much easier to do with C++ callbacks than with functions fulfilling JS
promises directly.
Also, this will decouple CryptoAlgorithm from JS, which is nice.
SubtleCrypto IDL says that all functions return Promise<any>, but in reality,
there is very little polymorphism, the only function whose return type depends
on algorithm is generateKey (it can create a Key or a KeyPair).
* bindings/js/JSDOMPromise.cpp:
(WebCore::PromiseWrapper::PromiseWrapper):
(WebCore::PromiseWrapper::operator=):
* bindings/js/JSDOMPromise.h:
Made it copyable, as each crypto function wraps the promise in success and failure
functional objects now.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::encrypt):
(WebCore::JSSubtleCrypto::decrypt):
(WebCore::JSSubtleCrypto::sign):
(WebCore::JSSubtleCrypto::verify):
(WebCore::JSSubtleCrypto::digest):
(WebCore::JSSubtleCrypto::generateKey):
(WebCore::JSSubtleCrypto::importKey):
(WebCore::JSSubtleCrypto::exportKey):
* crypto/CryptoAlgorithm.cpp:
(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::decrypt):
(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):
(WebCore::CryptoAlgorithm::digest):
(WebCore::CryptoAlgorithm::generateKey):
(WebCore::CryptoAlgorithm::deriveKey):
(WebCore::CryptoAlgorithm::deriveBits):
(WebCore::CryptoAlgorithm::importKey):
* crypto/CryptoAlgorithm.h:
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmAES_CBC.h:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.h:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmSHA1.cpp:
(WebCore::CryptoAlgorithmSHA1::digest):
* crypto/algorithms/CryptoAlgorithmSHA1.h:
* crypto/algorithms/CryptoAlgorithmSHA224.cpp:
(WebCore::CryptoAlgorithmSHA224::digest):
* crypto/algorithms/CryptoAlgorithmSHA224.h:
* crypto/algorithms/CryptoAlgorithmSHA256.cpp:
(WebCore::CryptoAlgorithmSHA256::digest):
* crypto/algorithms/CryptoAlgorithmSHA256.h:
* crypto/algorithms/CryptoAlgorithmSHA384.cpp:
(WebCore::CryptoAlgorithmSHA384::digest):
* crypto/algorithms/CryptoAlgorithmSHA384.h:
* crypto/algorithms/CryptoAlgorithmSHA512.cpp:
(WebCore::CryptoAlgorithmSHA512::digest):
* crypto/algorithms/CryptoAlgorithmSHA512.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::generatePair):
2013-11-20 Robert Hogan <robert@webkit.org>
REGRESSION(r127163): Respect clearance set on ancestors when placing floats
https://bugs.webkit.org/show_bug.cgi?id=119979
Reviewed by David Hyatt.
Refactor the way self-collapsing blocks with clearance are positioned so that they
get the correct logical-top position during margin-collapsing.
Test: fast/block/margin-collapse/self-collapsing-block-with-float-descendants.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
(WebCore::RenderBlockFlow::collapseMargins):
(WebCore::RenderBlockFlow::clearFloatsIfNeeded):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
* rendering/RenderBlockFlow.h:
2013-11-20 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GTK] Remove Chromium as user agent and claim to be Safari in OS X
https://bugs.webkit.org/show_bug.cgi?id=124229
Reviewed by Martin Robinson.
http://www.duolingo.com/ doesn't get render correctly because it uses
Chrome/Chromium specific variables, added after it was forked. Because
of this, it is necessary to remove the Chrome/Chromium identification
in the user agent. Also, from now on, by default, The GTK+ port will
claim to be Safari in OS X to avoid loading wrong resources.
* platform/gtk/UserAgentGtk.cpp:
(WebCore::standardUserAgent):
2013-11-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r159551.
http://trac.webkit.org/changeset/159551
https://bugs.webkit.org/show_bug.cgi?id=124669
made many tests asserts (Requested by anttik on #webkit).
* html/HTMLDetailsElement.h:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::selectNextSourceChild):
* html/HTMLMetaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::isDisabledFormControl):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateWidgetCallback):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::detailsElement):
* html/HTMLSummaryElement.h:
* html/HTMLTableCaptionElement.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::caption):
(WebCore::HTMLTableElement::tHead):
(WebCore::HTMLTableElement::tFoot):
(WebCore::HTMLTableElement::lastBody):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::rowIndex):
* html/HTMLTableSectionElement.h:
* html/HTMLTagNames.in:
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::summaryElement):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::handleFallbackContent):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
* page/DragController.cpp:
(WebCore::DragController::canProcessDrag):
* page/Frame.cpp:
(WebCore::Frame::searchForLabelsBeforeElement):
* page/SpatialNavigation.cpp:
(WebCore::frameOwnerElement):
2013-11-20 Zoltan Horvath <zoltan@webkit.org>
Move LineWidth.{h,cpp} into rendering/line
<https://webkit.org/b/124448>
Reviewed by David Hyatt.
In r159354 I introduced line directory. Now it's time to move the helper classes of RenderBlockLineLayout into 'line' subdirectory.
No new tests, no behavior change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/line/LineWidth.cpp: Renamed from Source/WebCore/rendering/LineWidth.cpp.
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::fitsOnLine):
(WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
(WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::LineWidth::commit):
(WebCore::LineWidth::applyOverhang):
(WebCore::LineWidth::fitBelowFloats):
(WebCore::LineWidth::setTrailingWhitespaceWidth):
(WebCore::LineWidth::updateCurrentShapeSegment):
(WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
(WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
* rendering/line/LineWidth.h: Renamed from Source/WebCore/rendering/LineWidth.h.
(WebCore::LineWidth::currentWidth):
(WebCore::LineWidth::uncommittedWidth):
(WebCore::LineWidth::committedWidth):
(WebCore::LineWidth::availableWidth):
(WebCore::LineWidth::addUncommittedWidth):
(WebCore::LineWidth::shouldIndentText):
2013-11-20 Brady Eidson <beidson@apple.com>
Alphabetization followup to r159567
Reviewed by style-bot :(
* Modules/indexeddb/IDBDatabaseBackend.h:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* inspector/InspectorIndexedDBAgent.cpp:
2013-11-20 Brady Eidson <beidson@apple.com>
Rename IDBMetadata.h to IDBDatabaseMetadata.h
https://bugs.webkit.org/show_bug.cgi?id=124668
Reviewed by Dean Jackson.
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBDatabaseBackend.h:
* Modules/indexeddb/IDBDatabaseMetadata.h: Renamed from Source/WebCore/Modules/indexeddb/IDBMetadata.h.
(WebCore::IDBIndexMetadata::IDBIndexMetadata):
(WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
(WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
* inspector/InspectorIndexedDBAgent.cpp:
2013-11-20 Ryosuke Niwa <rniwa@webkit.org>
Remove bogus assertions in updateNameForTreeScope and updateNameForDocument
https://bugs.webkit.org/show_bug.cgi?id=124639
Reviewed by Darin Adler.
Removed assertions. We can't assert that the element in a tree scope or a document
since these two functions are called from removedFrom.
* dom/Element.cpp:
(WebCore::Element::updateNameForTreeScope):
(WebCore::Element::updateNameForDocument):
2013-11-20 Brady Eidson <beidson@apple.com>
Cleanup getOrEstablishIDBDatabaseMetadata and stub it out in WK2
https://bugs.webkit.org/show_bug.cgi?id=124635
Reviewed by Tim Horton.
getOrEstablishIDBDatabaseMetadata() should not have to take a database name parameter because the
server connection should already know what database name it represents.
* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::openInternalAsync):
* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
(WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
(WebCore::IDBFactoryBackendLevelDB::open):
2013-11-20 Andrzej Badowski <a.badowski@samsung.com>
[EFL] <video> and <audio> should be accessible.
https://bugs.webkit.org/show_bug.cgi?id=124494
Reviewed by Gyuyoung Kim.
Adding descriptions of media-element controls.
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::localizedMediaControlElementString):
2013-11-20 Antti Koivisto <antti@apple.com>
Don't paint simple text runs outside the paint rect
https://bugs.webkit.org/show_bug.cgi?id=124651
Reviewed by Anders Carlsson.
This speeds up partial paints for long text paragraphs.
Also add the same optimization for hit testing.
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
Iterate over the run range that needs painting.
(WebCore::SimpleLineLayout::hitTestFlow):
Iterate over the line range that needs painting.
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::Range::Range):
(WebCore::SimpleLineLayout::Range::begin):
(WebCore::SimpleLineLayout::Range::end):
Add Range type.
(WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
(WebCore::SimpleLineLayout::RunResolver::Iterator::operator++):
(WebCore::SimpleLineLayout::RunResolver::Iterator::advance):
(WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
Optimize case where runCount==lineCount. In this case we can just directly jump
to the right run/line.
(WebCore::SimpleLineLayout::RunResolver::begin):
(WebCore::SimpleLineLayout::RunResolver::end):
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
(WebCore::SimpleLineLayout::RunResolver::rangeForRect):
Get the range corresponding to a rect. This currently cares about y coordinates only.
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator++):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
(WebCore::SimpleLineLayout::LineResolver::rangeForRect):
2013-11-20 Antoine Quint <graouts@apple.com>
Cannot animate "points" attribute for <svg:polygon>
https://bugs.webkit.org/show_bug.cgi?id=21371
Reviewed by Antti Koivisto.
Ensure we use animated list of points for SVG <polygon> and <polyline> elements
when we build the path used to draw them, otherwise the animated changes won't
be rendered and the base value will be used.
Tests: svg/animations/polygon-set.svg
svg/animations/polyline-set.svg
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromPolygonElement):
(WebCore::updatePathFromPolylineElement):
2013-11-20 Andrei Bucur <abucur@adobe.com>
[CSSRegions] Move region styling code into RenderNamedFlowFragment
https://bugs.webkit.org/show_bug.cgi?id=122957
Reviewed by Mihnea Ovidenie.
The patch moves all the region styling functionality outside of RenderRegion
to RenderNamedFlowFragment and outside of RenderFlowThread to RenderNamedFlowThread.
This generates a couple of undesired casts that will be removed in later patches
when everything CSS Regions specific will be located inside RenderNamedFlowThread
and RenderNamedFlowFragment (e.g. the move of the isValid flag, the auto-height
code etc.).
The painting function was also moved from RenderRegion to RenderNamedFlowFragment. It
was only used by the CSS Regions code. The new multi-column implementation has its own
painting mechanism.
Tests: No changed functionality, just refactorings.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::removeFlowChildInfo):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
* rendering/RenderFlowThread.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::RenderNamedFlowFragment):
(WebCore::RenderNamedFlowFragment::styleDidChange):
(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::computeStyleInRegion):
(WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
(WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
(WebCore::RenderNamedFlowFragment::clearObjectStyleInRegion):
(WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
(WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
(WebCore::shouldPaintRegionContentsInPhase):
(WebCore::RenderNamedFlowFragment::paintObject):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
(WebCore::RenderNamedFlowThread::removeFlowChildInfo):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::styleDidChange):
(WebCore::RenderRegion::attachRegion):
* rendering/RenderRegion.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
2013-11-19 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toHTMLFooElement() to clean up static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=124571
Reviewed by Darin Adler.
Though there are a lot of clean up commits before, there are still
use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
toHTMLDetails|Meta|Summary|TableSection|TableCaptionElement().
Additionally, other static_cast<> are removed as well.
No new tests, no behavior changes.
* html/HTMLDetailsElement.h:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::selectNextSourceChild):
* html/HTMLMetaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::isDisabledFormControl):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateWidgetCallback):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::detailsElement):
* html/HTMLSummaryElement.h:
* html/HTMLTableCaptionElement.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::caption):
(WebCore::HTMLTableElement::tHead):
(WebCore::HTMLTableElement::tFoot):
(WebCore::HTMLTableElement::lastBody):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::rowIndex):
* html/HTMLTableSectionElement.h:
* html/HTMLTagNames.in:
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::summaryElement):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::handleFallbackContent):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
* page/DragController.cpp:
(WebCore::DragController::canProcessDrag):
* page/Frame.cpp:
(WebCore::Frame::searchForLabelsBeforeElement):
* page/SpatialNavigation.cpp:
(WebCore::frameOwnerElement):
2013-11-19 Ryosuke Niwa <rniwa@webkit.org>
Enable HTMLTemplateElement on Mac port
https://bugs.webkit.org/show_bug.cgi?id=124637
Reviewed by Tim Horton.
Enabled the feature.
* Configurations/FeatureDefines.xcconfig:
2013-11-19 Jinwoo Song <jinwoo7.song@samsung.com>
Remove unused member function declaration in DocumentOrderedMap.h
https://bugs.webkit.org/show_bug.cgi?id=124629
Reviewed by Ryosuke Niwa.
checkConsistency() is not used anywhere.
* dom/DocumentOrderedMap.h:
2013-11-19 Seokju Kwon <seokju@webkit.org>
Removal of redundant function call in Editor::insertTextWithoutSendingTextEvent
https://bugs.webkit.org/show_bug.cgi?id=124563
Reviewed by Brent Fulgham.
No new tests needed, no behavior change.
* editing/Editor.cpp:
(WebCore::Editor::insertTextWithoutSendingTextEvent):
2013-11-19 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix build break after r159533.
* CMakeLists.txt: Update ANGLE files.
2013-11-19 Zhuang Zhigang <zhuangzg@cn.fujitsu.com>
Implement spin control on WinCE port.
https://bugs.webkit.org/show_bug.cgi?id=123254
Reviewed by Brent Fulgham.
* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeWinCE::paintInnerSpinButton):
* rendering/RenderThemeWinCE.h:
2013-11-19 Roger Fong <roger_fong@apple.com>
Update ANGLE sources.
https://bugs.webkit.org/show_bug.cgi?id=124615.
Reviewed by Dean Jackson.
Tests covered by Khronos WebGL conformance tests.
* platform/graphics/ANGLEWebKitBridge.cpp: Resolve a build error that resulted from updating ANGLE.
(WebCore::getSymbolInfo):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
2013-11-19 Filip Pizlo <fpizlo@apple.com>
Rename WatchpointSet::notifyWrite() should be renamed to WatchpointSet::fireAll()
https://bugs.webkit.org/show_bug.cgi?id=124609
Rubber stamped by Mark Lam.
No new tests because no new behavior.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::create):
2013-11-19 Bear Travis <betravis@adobe.com>
[CSS Shapes] Parse [<box> || <shape>] values
https://bugs.webkit.org/show_bug.cgi?id=124426
Reviewed by Dirk Schulze.
Shape values can now have an optional box specifying the coordinate sytem to use
for sizing and positioning the shape. This patch adds the functionality to support
parsing these new values.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBox): Added function to convert between BasicShape::ReferenceBox
and CSSPrimitiveValue (which wraps a CSSValueID).
(WebCore::boxForValue): Ditto.
(WebCore::valueForBasicShape): Translations between CSSBasicShape and BasicShape
must now include the reference box.
(WebCore::basicShapeForValue): Ditto.
* css/BasicShapeFunctions.h:
* css/CSSBasicShapes.cpp:
(WebCore::buildRectangleString): Include the box in the built CSS string.
(WebCore::CSSBasicShapeRectangle::cssText): Ditto.
(WebCore::CSSBasicShapeRectangle::equals): Include the box in comparisions.
(WebCore::buildCircleString):
(WebCore::CSSBasicShapeCircle::cssText):
(WebCore::CSSBasicShapeCircle::equals):
(WebCore::buildEllipseString):
(WebCore::CSSBasicShapeEllipse::cssText):
(WebCore::CSSBasicShapeEllipse::equals):
(WebCore::buildPolygonString):
(WebCore::CSSBasicShapePolygon::cssText):
(WebCore::CSSBasicShapePolygon::equals):
(WebCore::buildInsetRectangleString):
(WebCore::CSSBasicShapeInsetRectangle::cssText):
(WebCore::CSSBasicShapeInsetRectangle::equals):
* css/CSSBasicShapes.h:
(WebCore::CSSBasicShape::box): BasicShapes now have an reference box.
(WebCore::CSSBasicShape::setBox): Ditto.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Shape-inside can also
parse the box values.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): The shape properties use parseShapeProperty,
while minor adjustments were made to parseBasicShape's return type.
(WebCore::isBoxValue): Is the CSSValueID one of the box values.
(WebCore::CSSParser::parseShapeProperty): Parse one of the shape properties
and return an appropriate CSSValue.
(WebCore::CSSParser::parseBasicShape): Return a CSSBasicShape rather than
adding a ShapeValue to the style.
* css/CSSParser.h:
* rendering/style/BasicShapes.h:
(WebCore::BasicShape::box): Add a box to BasicShape and getters/setters.
(WebCore::BasicShape::setBox): Ditto.
(WebCore::BasicShape::BasicShape): Ditto.
2013-11-19 Jer Noble <jer.noble@apple.com>
[Mac] 9 WebGL conformance failures after r159518.
https://bugs.webkit.org/show_bug.cgi?id=124608
Reviewed by Dean Jackson.
Once we removed the CIImage drawing path, there was no longer any reason to flip the
CGImageRef before drawing to the provided GraphicsContext.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2013-11-19 Chris Fleizach <cfleizach@apple.com>
Web Speech API crashes onboundary event handling with reload
https://bugs.webkit.org/show_bug.cgi?id=124607
Reviewed by Tim Horton.
If the page goes away, we need to cleanup the Mac platform synthesizer object, because
NSSpeechSynthesizer is retained elsewhere to handle the callbacks (so it doesn't automatically
get torn down).
The layout tests for speech rely on a Mock synthesizer, so there is no good way to test this
Mac platform specific behavior.
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(-[WebSpeechSynthesisWrapper invalidate]):
(WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2013-11-19 Mark Lam <mark.lam@apple.com>
Add tracking of endColumn for Executables.
https://bugs.webkit.org/show_bug.cgi?id=124245.
Reviewed by Geoffrey Garen.
Test: js/dom/script-start-end-locations.html
* ForwardingHeaders/bytecode: Added.
* ForwardingHeaders/bytecode/CodeBlock.h: Added.
* WebCore.exp.in:
* testing/Internals.cpp:
(WebCore::GetCallerCodeBlockFunctor::GetCallerCodeBlockFunctor):
(WebCore::GetCallerCodeBlockFunctor::operator()):
(WebCore::GetCallerCodeBlockFunctor::codeBlock):
(WebCore::Internals::parserMetaData):
* testing/Internals.h:
* testing/Internals.idl:
2013-11-15 Jer Noble <jer.noble@apple.com>
[MSE] Support fastSeek() in MediaSource.
https://bugs.webkit.org/show_bug.cgi?id=124422
Reviewed by Eric Carlson.
Test: media/media-source/media-source-fastseek.html
* Modules/mediasource/MediaSource.cpp:
* Modules/mediasource/MediaSource.h:
Add support for "seek to the next fastest time" in MediaSource by
returning the time of the nearest Sync sample.
Move the data structure logic out of SourceBuffer and into it's own
class:
* Modules/mediasource/SampleMap.cpp: Added.
(WebCore::SampleIsLessThanMediaTimeComparator::operator()):
(WebCore::SampleIsGreaterThanMediaTimeComparator::operator()):
(WebCore::SampleIsRandomAccess::operator()):
(WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
(WebCore::SampleMap::addSample):
(WebCore::SampleMap::removeSample):
(WebCore::SampleMap::findSampleContainingPresentationTime):
(WebCore::SampleMap::findSampleAfterPresentationTime):
(WebCore::SampleMap::findSampleWithDecodeTime):
(WebCore::SampleMap::reverseFindSampleContainingPresentationTime):
(WebCore::SampleMap::reverseFindSampleBeforePresentationTime):
(WebCore::SampleMap::reverseFindSampleWithDecodeTime):
(WebCore::SampleMap::findSyncSamplePriorToPresentationTime):
(WebCore::SampleMap::findSyncSamplePriorToDecodeIterator):
(WebCore::SampleMap::findSyncSampleAfterPresentationTime):
(WebCore::SampleMap::findSyncSampleAfterDecodeIterator):
(WebCore::SampleMap::findSamplesBetweenPresentationTimes):
(WebCore::SampleMap::findDependentSamples):
* Modules/mediasource/SampleMap.h: Added.
(WebCore::SampleMap::presentationBegin):
(WebCore::SampleMap::presentationEnd):
(WebCore::SampleMap::decodeBegin):
(WebCore::SampleMap::decodeEnd):
(WebCore::SampleMap::reversePresentationBegin):
(WebCore::SampleMap::reversePresentationEnd):
(WebCore::SampleMap::reverseDecodeBegin):
(WebCore::SampleMap::reverseDecodeEnd):
Add logic to find and return the time of the next & previous sync
sample, within the threshold provided:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
(WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
(WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
(WebCore::SourceBuffer::appendBufferTimerFired):
(WebCore::SourceBuffer::setActive):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
(WebCore::SourceBuffer::provideMediaData):
* Modules/mediasource/SourceBuffer.h:
* platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::setActive):
* platform/graphics/SourceBufferPrivateClient.h:
(WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime):
(WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime):
Add new files to the project:
* WebCore.xcodeproj/project.pbxproj:
Drive-by fixes in HTMLMediaElement:
* html/HTMLMediaSource.h:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::finishSeek): Cause the MediaSource to check the ready state of all its buffers.
(HTMLMediaElement::selectNextSourceChild): Pass in whether the source element has a MediaSource URL.
Implement the seekWithTolerance behavior in MockMediaPlayerMediaSource:
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble):
(WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
(WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
(WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockMediaSourcePrivate::seekToTime):
* platform/mock/mediasource/MockMediaSourcePrivate.h:
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
(WebCore::MockMediaSample::flags):
(WebCore::MockSourceBufferPrivate::setActive):
(WebCore::MockSourceBufferPrivate::fastSeekTimeForMediaTime):
(WebCore::MockSourceBufferPrivate::seekToTime):
* platform/mock/mediasource/MockSourceBufferPrivate.h:
2013-11-19 Jer Noble <jer.noble@apple.com>
[Mac] 10X slower than Chrome when drawing a video into a canvas
https://bugs.webkit.org/show_bug.cgi?id=124599
Reviewed by Dean Jackson.
Improve performance by creating a CGImageRef which directly references the CVPixelBuffer provided
by AVPlayerItemVideoOutput:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::CVPixelBufferGetBytePointerCallback):
(WebCore::CVPixelBufferReleaseBytePointerCallback):
(WebCore::CVPixelBufferReleaseInfoCallback):
(WebCore::createImageFromPixelBuffer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
Additionally, when asked to paint with an AVPlayerItemVideoOutput, block until the output notifies
its delegate that a pixel buffer is available:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::globalPullDelegateQueue):
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
(-[WebCoreAVFPullDelegate initWithCallback:]):
(-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
(-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
To further optimize video -> canvas drawing, add a method which can return a PassNativeImage to be
drawn directly onto the canvas, rather than rendering into an intermediary context:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::nativeImageForCurrentTime):
* html/HTMLVideoElement.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::nativeImageForCurrentTime):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime):
2013-11-19 Brady Eidson <beidson@apple.com>
Consolidate IDBBackingStore*Interface and IDBBackingStore*LevelDB
https://bugs.webkit.org/show_bug.cgi?id=124597
Reviewed by Alexey Proskuryakov.
The Interface abstraction doesn’t make sense anymore, as LevelDB will be the only implementor.
* Modules/indexeddb/IDBBackingStoreCursorInterface.h: Removed.
* Modules/indexeddb/IDBBackingStoreInterface.h: Removed.
* Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Removed.
* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
(WebCore::IDBBackingStoreCursorLevelDB::key):
(WebCore::IDBBackingStoreCursorLevelDB::primaryKey):
(WebCore::IDBBackingStoreCursorLevelDB::recordIdentifier):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata):
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
(WebCore::IDBBackingStoreLevelDB::deleteDatabase):
(WebCore::IDBBackingStoreLevelDB::createObjectStore):
(WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
(WebCore::IDBBackingStoreLevelDB::getRecord):
(WebCore::IDBBackingStoreLevelDB::putRecord):
(WebCore::IDBBackingStoreLevelDB::clearObjectStore):
(WebCore::IDBBackingStoreLevelDB::deleteRecord):
(WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
(WebCore::IDBBackingStoreLevelDB::createIndex):
(WebCore::IDBBackingStoreLevelDB::deleteIndex):
(WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
(WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
(WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
(WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
(WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexCursor):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
(WebCore::IDBBackingStoreTransactionLevelDB::levelDBTransactionFrom):
* Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp:
(WebCore::IDBIndexWriterLevelDB::writeIndexKeys):
(WebCore::IDBIndexWriterLevelDB::verifyIndexKeys):
(WebCore::IDBIndexWriterLevelDB::addingKeyAllowed):
* Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::get):
(WebCore::IDBServerConnectionLevelDB::openCursor):
(WebCore::IDBServerConnectionLevelDB::count):
(WebCore::IDBServerConnectionLevelDB::deleteRange):
* WebCore.xcodeproj/project.pbxproj:
2013-11-19 Sergio Correia <sergio.correia@openbossa.org>
Get rid of bare new in SVGAnimatedColorAnimator::constructFromString()
https://bugs.webkit.org/show_bug.cgi?id=124595
Reviewed by Darin Adler.
Use std::unique_ptr instead, to manage the arguments passed to the create
methods of SVGAnimatedType.
No new tests, covered by existing tests.
* svg/SVGAnimatedAngle.cpp:
(WebCore::SVGAnimatedAngleAnimator::constructFromString): Replace bare
pointer with std::unique_ptr.
* svg/SVGAnimatedBoolean.cpp:
(WebCore::SVGAnimatedBooleanAnimator::constructFromString): Ditto.
* svg/SVGAnimatedColor.cpp:
(WebCore::SVGAnimatedColorAnimator::constructFromString): Ditto.
* svg/SVGAnimatedEnumeration.cpp:
(WebCore::SVGAnimatedEnumerationAnimator::constructFromString): Ditto.
* svg/SVGAnimatedInteger.cpp:
(WebCore::SVGAnimatedIntegerAnimator::constructFromString): Ditto.
* svg/SVGAnimatedIntegerOptionalInteger.cpp:
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
Ditto.
* svg/SVGAnimatedLength.cpp:
(WebCore::SVGAnimatedLengthAnimator::constructFromString): Ditto.
* svg/SVGAnimatedLengthList.cpp:
(WebCore::SVGAnimatedLengthListAnimator::constructFromString): Ditto.
* svg/SVGAnimatedNumber.cpp:
(WebCore::SVGAnimatedNumberAnimator::constructFromString): Ditto.
* svg/SVGAnimatedNumberList.cpp:
(WebCore::SVGAnimatedNumberListAnimator::constructFromString): Ditto.
* svg/SVGAnimatedNumberOptionalNumber.cpp:
(WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
Ditto.
* svg/SVGAnimatedPointList.cpp:
(WebCore::SVGAnimatedPointListAnimator::constructFromString): Ditto.
* svg/SVGAnimatedPreserveAspectRatio.cpp:
(WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
Ditto.
* svg/SVGAnimatedRect.cpp:
(WebCore::SVGAnimatedRectAnimator::constructFromString): Ditto.
* svg/SVGAnimatedString.cpp:
(WebCore::SVGAnimatedStringAnimator::constructFromString): Ditto.
* svg/SVGAnimatedTransformList.cpp:
(WebCore::SVGAnimatedTransformListAnimator::constructFromString):
Ditto.
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::createAngleAndEnumeration): Use
std::unique_ptr instead of bare pointer as parameter.
(WebCore::SVGAnimatedType::createBoolean): Ditto.
(WebCore::SVGAnimatedType::createColor): Ditto.
(WebCore::SVGAnimatedType::createEnumeration): Ditto.
(WebCore::SVGAnimatedType::createInteger): Ditto.
(WebCore::SVGAnimatedType::createIntegerOptionalInteger): Ditto.
(WebCore::SVGAnimatedType::createLength): Ditto.
(WebCore::SVGAnimatedType::createLengthList): Ditto.
(WebCore::SVGAnimatedType::createNumber): Ditto.
(WebCore::SVGAnimatedType::createNumberList): Ditto.
(WebCore::SVGAnimatedType::createNumberOptionalNumber): Ditto.
(WebCore::SVGAnimatedType::createPointList): Ditto.
(WebCore::SVGAnimatedType::createPreserveAspectRatio): Ditto.
(WebCore::SVGAnimatedType::createRect): Ditto.
(WebCore::SVGAnimatedType::createString): Ditto.
(WebCore::SVGAnimatedType::createTransformList): Ditto.
* svg/SVGAnimatedType.h: Use std::unique_ptr as parameter in the
create methods.
* svg/SVGAnimatedTypeAnimator.h:
(WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue): Make
helper return std::unique_ptr instead of bare pointer.
(WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues): Ditto.
2013-11-19 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Refactor RectangleShape
https://bugs.webkit.org/show_bug.cgi?id=124416
Privatize and rename the FloatRoundedRect class defined in RectangleShape.h.
The new class is called RectangleShape::ShapeBounds. This change enables
creating a proper FloatRoundedRect analog of the existing RoundedRect class;
part of adding support for box shapes, per the latest CSS spec.
Reviewed by Dean Jackson.
No new tests, just refactoring.
* rendering/shapes/RectangleShape.cpp:
(WebCore::RectangleShape::ShapeBounds::paddingBounds):
(WebCore::RectangleShape::ShapeBounds::marginBounds):
(WebCore::RectangleShape::ShapeBounds::cornerInterceptForWidth):
(WebCore::RectangleShape::shapePaddingBounds):
(WebCore::RectangleShape::shapeMarginBounds):
(WebCore::RectangleShape::getExcludedIntervals):
(WebCore::RectangleShape::getIncludedIntervals):
(WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/RectangleShape.h:
(WebCore::RectangleShape::ShapeBounds::ShapeBounds):
(WebCore::RectangleShape::ShapeBounds::rx):
(WebCore::RectangleShape::ShapeBounds::ry):
2013-11-19 Sergio Correia <sergio.correia@openbossa.org>
Mark classes deriving from SVGAnimatedTypeAnimator as FINAL
https://bugs.webkit.org/show_bug.cgi?id=124456
Reviewed by Darin Adler.
Also add OVERRIDE to their virtual methods appropriately and remove
existing empty virtual destructors.
No new tests, covered by existing ones.
* svg/SVGAnimatedAngle.h:
* svg/SVGAnimatedBoolean.h:
* svg/SVGAnimatedColor.h:
* svg/SVGAnimatedEnumeration.h:
* svg/SVGAnimatedInteger.h:
* svg/SVGAnimatedIntegerOptionalInteger.h:
* svg/SVGAnimatedLength.h:
* svg/SVGAnimatedLengthList.h:
* svg/SVGAnimatedNumber.h:
* svg/SVGAnimatedNumberList.h:
* svg/SVGAnimatedNumberOptionalNumber.h:
* svg/SVGAnimatedPath.h:
* svg/SVGAnimatedPointList.h:
* svg/SVGAnimatedPreserveAspectRatio.h:
* svg/SVGAnimatedRect.h:
* svg/SVGAnimatedString.h:
* svg/SVGAnimatedTransformList.h:
2013-11-19 Brady Eidson <beidson@apple.com>
Add WebIDBServerConnection and DatabaseProcessIDBConnection stubs
https://bugs.webkit.org/show_bug.cgi?id=124562
Reviewed by Alexey Proskuryakov.
Export some more symbols and headers for WK2 to use.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
2013-11-19 Frédéric Wang <fred.wang@free.fr>
Map the dir attribute to the CSS direction property.
https://bugs.webkit.org/show_bug.cgi?id=124572.
Reviewed by Darin Adler.
Tests: mathml/presentation/direction-overall.html
mathml/presentation/direction-token.html
mathml/presentation/direction.html
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::isPresentationAttribute): add dir
(WebCore::MathMLElement::collectStyleForPresentationAttribute): map dir
* mathml/mathattrs.in: add the dir attribute
* mathml/mathtags.in: add the mstyle tag (needed to use mstyleTag)
2013-11-19 Sergio Correia <sergio.correia@openbossa.org>
[SVG] Convert OwnPtr/PassOwnPtr to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=124382
Reviewed by Darin Adler.
The files modified are mostly under WebCore/svg/; in a few cases, some
"external" files needed changes as well.
No new tests, covered by existing ones.
* css/CSSFontFaceSource.cpp:
* loader/cache/CachedImage.cpp:
* loader/cache/CachedImage.h:
* platform/graphics/SimpleFontData.cpp:
* platform/graphics/SimpleFontData.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
* svg/SVGAnimateElement.cpp:
* svg/SVGAnimateElement.h:
* svg/SVGAnimatedAngle.cpp:
* svg/SVGAnimatedAngle.h:
* svg/SVGAnimatedBoolean.cpp:
* svg/SVGAnimatedBoolean.h:
* svg/SVGAnimatedColor.cpp:
* svg/SVGAnimatedColor.h:
* svg/SVGAnimatedEnumeration.cpp:
* svg/SVGAnimatedEnumeration.h:
* svg/SVGAnimatedInteger.cpp:
* svg/SVGAnimatedInteger.h:
* svg/SVGAnimatedIntegerOptionalInteger.cpp:
* svg/SVGAnimatedIntegerOptionalInteger.h:
* svg/SVGAnimatedLength.cpp:
* svg/SVGAnimatedLength.h:
* svg/SVGAnimatedLengthList.cpp:
* svg/SVGAnimatedLengthList.h:
* svg/SVGAnimatedNumber.cpp:
* svg/SVGAnimatedNumber.h:
* svg/SVGAnimatedNumberList.cpp:
* svg/SVGAnimatedNumberList.h:
* svg/SVGAnimatedNumberOptionalNumber.cpp:
* svg/SVGAnimatedNumberOptionalNumber.h:
* svg/SVGAnimatedPath.cpp:
* svg/SVGAnimatedPath.h:
* svg/SVGAnimatedPointList.cpp:
* svg/SVGAnimatedPointList.h:
* svg/SVGAnimatedPreserveAspectRatio.cpp:
* svg/SVGAnimatedPreserveAspectRatio.h:
* svg/SVGAnimatedRect.cpp:
* svg/SVGAnimatedRect.h:
* svg/SVGAnimatedString.cpp:
* svg/SVGAnimatedString.h:
* svg/SVGAnimatedTransformList.cpp:
* svg/SVGAnimatedTransformList.h:
* svg/SVGAnimatedType.cpp:
* svg/SVGAnimatedType.h:
* svg/SVGAnimatedTypeAnimator.cpp:
* svg/SVGAnimatedTypeAnimator.h:
* svg/SVGAnimatorFactory.h:
* svg/SVGDocumentExtensions.cpp:
* svg/SVGDocumentExtensions.h:
* svg/SVGFontData.h:
* svg/SVGFontElement.cpp:
* svg/SVGFontElement.h:
* svg/SVGGraphicsElement.cpp:
* svg/SVGGraphicsElement.h:
* svg/SVGPathByteStreamSource.h:
* svg/SVGPathParser.h:
* svg/SVGPathSegListSource.h:
* svg/SVGPathStringSource.h:
* svg/SVGPathUtilities.cpp:
* svg/SVGPathUtilities.h:
* svg/animation/SMILTimeContainer.cpp:
* svg/animation/SMILTimeContainer.h:
* svg/graphics/SVGImage.cpp:
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageCache.h:
* svg/properties/SVGAttributeToPropertyMap.cpp:
* svg/properties/SVGAttributeToPropertyMap.h:
2013-11-19 Zoltan Horvath <zoltan@webkit.org>
Add LineInlineHeaders.h to WebCore.xcodeproj
<https://webkit.org/b/124460>
Reviewed by Csaba Osztrogonác.
LineInlineHeaders.h (r159354) hasn't been added to WebCore.xcodeproj. This patch adds to it.
No new tests, no behavior change.
* WebCore.xcodeproj/project.pbxproj:
2013-11-19 Krzysztof Czech <k.czech@samsung.com>
[AX] Use std::unique_ptr to manage AXComputedObjectAttributeCache
https://bugs.webkit.org/show_bug.cgi?id=124404
Reviewed by Mario Sanchez Prada.
Convert OwnPtr/PassOwnPtr to std::unique_ptr.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates):
(WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
* accessibility/AXObjectCache.h:
(WebCore::AXComputedObjectAttributeCache::AXComputedObjectAttributeCache):
2013-11-19 Ryosuke Niwa <rniwa@webkit.org>
Add more assertions with security implications in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=124559
Reviewed by Antti Koivisto.
Assert that newly added elements and existing elements in the document ordered map are in the same tree scope
as the document ordered map. Also exit early if we're about to add an element in a wrong document to the map.
We don't exit early in get() because the damage has already been done at that point (the element may have been
deleted already).
* dom/Document.cpp:
(WebCore::Document::addImageElementByLowercasedUsemap):
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::add): Assert that the newly added element is in the current tree scope.
Also exit early if either the element is not in the tree scope or not in the right document.
While this doesn't make the function completely fault safe, it'll catch when we try to add a detached node.
(WebCore::DocumentOrderedMap::remove): Convert existing assertions to ones with security implication.
(WebCore::DocumentOrderedMap::get): Assert with security implication that the element we're about to return
is in the current tree scope. The element may have already been deleted if we ever hit these assertions.
(WebCore::DocumentOrderedMap::getAllElementsById): Convert an existing assertion to an assertion with security
implication.
* dom/DocumentOrderedMap.h:
* dom/TreeScope.cpp:
(WebCore::TreeScope::addElementById):
(WebCore::TreeScope::addElementByName):
(WebCore::TreeScope::addImageMap):
(WebCore::TreeScope::addLabel):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::addDocumentNamedItem):
(WebCore::HTMLDocument::addWindowNamedItem):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto): Set InTreeScope flag before calling addImageElementByLowercasedUsemap.
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::insertedInto): Ditto for addImageMap.
2013-11-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r159455.
http://trac.webkit.org/changeset/159455
https://bugs.webkit.org/show_bug.cgi?id=124568
broke two api tests (see bug 124564) (Requested by thorton on
#webkit).
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOM.mm:
(-[DOMNode renderedImage]):
(-[DOMRange renderedImageForcingBlackText:]):
* dom/Clipboard.cpp:
(WebCore::Clipboard::createDragImage):
* dom/ClipboardMac.mm:
(WebCore::Clipboard::createDragImage):
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* page/Frame.cpp:
(WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
(WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
(WebCore::Frame::nodeImage):
(WebCore::Frame::dragImageForSelection):
* page/Frame.h:
* page/FrameSnapshotting.cpp: Removed.
* page/FrameSnapshotting.h: Removed.
* page/mac/FrameMac.mm: Copied from Source/WebCore/page/win/FrameWin.h.
(WebCore::Frame::nodeImage):
(WebCore::Frame::dragImageForSelection):
* page/mac/FrameSnapshottingMac.h: Copied from Source/WebCore/page/win/FrameWin.h.
* page/mac/FrameSnapshottingMac.mm: Added.
(WebCore::imageFromRect):
(WebCore::selectionImage):
(WebCore::rangeImage):
(WebCore::snapshotDragImage):
* page/win/FrameWin.cpp:
(WebCore::Frame::dragImageForSelection):
(WebCore::Frame::nodeImage):
* page/win/FrameWin.h:
* platform/DragImage.cpp:
(WebCore::fitDragImageToMaxSize):
(WebCore::createDragImageForLink):
* platform/DragImage.h:
2013-11-18 Mark Rowe <mrowe@apple.com>
Use hw.activecpu for determining how many processes to spawn.
It's documented as the preferred way to determine the number of threads
or processes to create in a SMP aware application.
Rubber-stamped by Tim Horton.
* WebCore.xcodeproj/project.pbxproj:
2013-11-18 Samuel White <samuel_white@apple.com>
AX: aria-labelledby should be used in preference to aria-labeledby
https://bugs.webkit.org/show_bug.cgi?id=62351
Reviewed by Chris Fleizach.
Making sure aria-labelled by overrides the incorrectly spelled aria-labeledby attribute.
Test: accessibility/aria-labelledby-overrides-aria-labeledby.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::ariaLabeledByElements):
2013-11-18 Zalan Bujtas <zalan@apple.com>
use after free in WebCore::DocumentOrderedMap::remove / WebCore::TreeScope::removeElementById
https://bugs.webkit.org/show_bug.cgi?id=121324
Reviewed by Ryosuke Niwa.
Update the document ordered map for an image element before dispatching load or error events
when it's inserted into a document.
Test: fast/dom/modify-node-and-while-in-the-callback-too-crash.html
* dom/DocumentOrderedMap.cpp: defensive fix to avoid use after free issues.
(WebCore::DocumentOrderedMap::remove):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement): setting m_failedLoadURL makes
repeated updateFromElement calls return early.
2013-11-18 Benjamin Poulain <bpoulain@apple.com>
Upstream iOS's ResourceHandle implementation
https://bugs.webkit.org/show_bug.cgi?id=124554
Reviewed by Sam Weinig.
* platform/network/ResourceHandle.h:
(WebCore::ResourceHandle::quickLookHandle):
(WebCore::ResourceHandle::setQuickLookHandle):
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::connectionProperties):
(WebCore::ResourceHandleClient::shouldCacheResponse):
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::synthesizeRedirectResponseIfNecessary):
(WebCore::willSendRequest):
(WebCore::didReceiveResponse):
(WebCore::didReceiveDataArray):
(WebCore::didReceiveData):
(WebCore::didFinishLoading):
(WebCore::didFail):
(WebCore::willCacheResponse):
(WebCore::canRespondToProtectionSpace):
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::currentRequest):
(WebCore::ResourceHandle::connectionClientCallbacks):
2013-11-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r159430.
http://trac.webkit.org/changeset/159430
https://bugs.webkit.org/show_bug.cgi?id=124548
WebCore can know nothing about nor use files from WebKit/
(Requested by thorton on #webkit).
* DerivedSources.make:
2013-11-18 Brady Eidson <beidson@apple.com>
Remove IDBServerConnection's deprecatedBackingStore()
https://bugs.webkit.org/show_bug.cgi?id=124547
Reviewed by Tim Horton.
It is no longer needed, as the front end no longer knows about the backing store.
* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2013-11-18 Samuel White <samuel_white@apple.com>
AX: Add ability to fetch only visible table rows.
https://bugs.webkit.org/show_bug.cgi?id=124430
Reviewed by Chris Fleizach.
Adding AccessibilityTable::visibleRows method to support AXVisibleRows attribute mac platform.
Test: platform/mac/accessibility/table-visible-rows.html
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::columnHeaders):
(WebCore::AccessibilityTable::rowHeaders):
(WebCore::AccessibilityTable::visibleRows):
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableRow.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-11-18 Simon Fraser <simon.fraser@apple.com>
At some scales, opaque compositing layers have garbage pixels around the edges
https://bugs.webkit.org/show_bug.cgi?id=124541
Reviewed by Dean Jackson.
Layers get marked as having opaque contents when their background is
known to paint the entire layer. However, this failed to take into
account two reasons why every pixel may not get painted.
First, subpixel layout can result in non-integral RenderLayer
bounds, which will get rounded up to an integral GraphicsLayer
size. When this happens we may not paint edge pixels.
Second, at non-integral scale factors, graphics context scaling
may cause us to not paint edge pixels.
Fix by only marking PlatformCALayers as having opaque contents
when the contentsScale of the layer is integral.
Not testable, because we can't guarantee to get garbage pixels
in a ref test, and layer dumps show GraphicsLayer's notion of
content opaqueness, not the one we set on the PlatformCALayer.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::isIntegral):
(WebCore::clampedContentsScaleForScale):
(WebCore::GraphicsLayerCA::updateRootRelativeScale):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateContentsOpaque):
(WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
Drive-by typo fix.
(WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties):
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2013-11-18 David Hyatt <hyatt@apple.com>
Add a quirk to not respect center text-align when positioning
<rdar://problem/15427571>
https://bugs.webkit.org/show_bug.cgi?id=124522
Reviewed by Simon Fraser.
Added fast/block/legacy-text-align-position-quirk.html
* page/Settings.in:
Add the quirk setting.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::startAlignedOffsetForLine):
Don't pay attention to center text-align when the quirk is set.
2013-11-18 Brian J. Burg <burg@cs.washington.edu>
Consolidate various frame snapshot capabilities.
https://bugs.webkit.org/show_bug.cgi?id=124325
Reviewed by Timothy Hatcher.
Various snapshot creation methods had duplicated code and were split
between Frame, DragImage, and platform-specific implementationss.
This patch puts WebCore snapshot methods into FrameSnapshotting
and removes platform implementations where possible.
DragImage methods reuse snapshot methods where possible. Inspector
will be able to take snapshots without using drag images.
No new tests, this is a refactoring.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOM.mm:
(-[DOMNode renderedImage]):
(-[DOMRange renderedImageForcingBlackText:]):
* dom/Clipboard.cpp:
(WebCore::Clipboard::createDragImage):
* dom/ClipboardMac.mm:
(WebCore::Clipboard::createDragImage):
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* page/Frame.cpp:
* page/Frame.h:
* page/FrameSnapshotting.cpp: Added.
(WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
(WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
(WebCore::snapshotFrameRect): Move most buffer logic to here.
(WebCore::snapshotSelection): Moved from Frame.
(WebCore::snapshotNode): Moved from Frame.
* page/FrameSnapshotting.h: Added.
* page/mac/FrameMac.mm: Removed.
* page/mac/FrameSnapshottingMac.h: Removed.
* page/mac/FrameSnapshottingMac.mm: Removed.
* page/win/FrameWin.cpp: remove duplicate implementation.
* page/win/FrameWin.h: Fix an incorrect parameter name.
* platform/DragImage.cpp:
(WebCore::ScopedNodeDragState::ScopedNodeDragState):
(WebCore::ScopedNodeDragState::~ScopedNodeDragState):
(WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion.
(WebCore::createDragImageForNode):
(WebCore::createDragImageForSelection):
(WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
(WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
(WebCore::createDragImageForRange): Moved from Frame.
(WebCore::createDragImageForImage): Moved from FrameSnapshottingMac.
(WebCore::createDragImageForLink): use nullptr.
2013-11-18 Brendan Long <b.long@cablelabs.com>
[GStreamer] Crash when using media source
https://bugs.webkit.org/show_bug.cgi?id=124525
Reviewed by Philippe Normand.
No new tests because this is already covered by tests in media/media-source (which aren't enabled because the feature isn't done).
* platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
(WebCore::MediaSourceGStreamer::MediaSourceGStreamer): Add missing adoptRef()
2013-11-18 Brady Eidson <beidson@apple.com>
Remove unneeded BackingStore-related #include from IDBFactoryBackendInterface
Rubberstamped by Beth Dakin.
* Modules/indexeddb/IDBFactoryBackendInterface.h:
2013-11-18 Nick Diego Yamane <nick.yamane@openbossa.org>
Change mediasource and mediastream modules to use nullptr
https://bugs.webkit.org/show_bug.cgi?id=124530
Reviewed by Tim Horton.
No new tests needed, no behavior change.
* Modules/mediasource/MediaSource.cpp:
* Modules/mediasource/SourceBuffer.cpp:
* Modules/mediastream/MediaStream.cpp:
* Modules/mediastream/RTCDTMFSender.cpp:
* Modules/mediastream/RTCDataChannel.cpp:
* Modules/mediastream/RTCIceCandidate.cpp:
* Modules/mediastream/RTCPeerConnection.cpp:
* Modules/mediastream/RTCSessionDescription.cpp:
* Modules/mediastream/RTCStatsResponse.cpp:
* Modules/mediastream/UserMediaRequest.cpp:
2013-11-18 Brady Eidson <beidson@apple.com>
Move execution of IDBCursorBackendOperations to the IDBServerConnection
https://bugs.webkit.org/show_bug.cgi?id=124463
Reviewed by Tim Horton.
This almost entirely removes knowledge of the backing store from the front end.
The primary change here is to give cursors a unique ID.
This way the IDBCursorBackend can reference itself by ID, while the
IDBServerConnection can handle mapping that ID to a backing store.
* Modules/indexeddb/IDBBackingStoreCursorInterface.h:
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBCursorBackend.cpp:
(WebCore::IDBCursorBackend::IDBCursorBackend):
(WebCore::IDBCursorBackend::deleteFunction):
(WebCore::IDBCursorBackend::prefetchReset):
(WebCore::IDBCursorBackend::close):
(WebCore::IDBCursorBackend::updateCursorData):
(WebCore::IDBCursorBackend::clearCursorData):
* Modules/indexeddb/IDBCursorBackend.h:
(WebCore::IDBCursorBackend::create):
(WebCore::IDBCursorBackend::key):
(WebCore::IDBCursorBackend::primaryKey):
(WebCore::IDBCursorBackend::value):
(WebCore::IDBCursorBackend::id):
(WebCore::IDBCursorBackend::transaction):
(WebCore::IDBCursorBackend::setSavedCursorID):
* Modules/indexeddb/IDBCursorBackendOperations.cpp:
(WebCore::CursorAdvanceOperation::perform):
(WebCore::CursorIterationOperation::perform):
(WebCore::CursorPrefetchIterationOperation::perform):
* Modules/indexeddb/IDBCursorBackendOperations.h:
(WebCore::CursorIterationOperation::key):
(WebCore::CursorIterationOperation::callbacks):
(WebCore::CursorAdvanceOperation::count):
(WebCore::CursorAdvanceOperation::callbacks):
(WebCore::CursorPrefetchIterationOperation::numberToFetch):
(WebCore::CursorPrefetchIterationOperation::callbacks):
* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
(WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::ObjectStoreKeyCursorImpl::create):
(WebCore::ObjectStoreKeyCursorImpl::clone):
(WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
(WebCore::ObjectStoreCursorImpl::create):
(WebCore::ObjectStoreCursorImpl::clone):
(WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexCursor):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
(WebCore::IDBServerConnectionLevelDB::setIndexKeys):
(WebCore::IDBServerConnectionLevelDB::createObjectStore):
(WebCore::IDBServerConnectionLevelDB::createIndex):
(WebCore::IDBServerConnectionLevelDB::deleteIndex):
(WebCore::IDBServerConnectionLevelDB::get):
(WebCore::IDBServerConnectionLevelDB::put):
(WebCore::IDBServerConnectionLevelDB::openCursor):
(WebCore::IDBServerConnectionLevelDB::count):
(WebCore::IDBServerConnectionLevelDB::deleteRange):
(WebCore::IDBServerConnectionLevelDB::clearObjectStore):
(WebCore::IDBServerConnectionLevelDB::deleteObjectStore):
(WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion):
(WebCore::IDBServerConnectionLevelDB::cursorAdvance):
(WebCore::IDBServerConnectionLevelDB::cursorIterate):
(WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration):
(WebCore::IDBServerConnectionLevelDB::cursorPrefetchReset):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2013-11-17 Jer Noble <jer.noble@apple.com>
[WTF] Media time should not have a constructor which accepts a single int or float.
https://bugs.webkit.org/show_bug.cgi?id=124470
Reviewed by Eric Carlson.
Fix the compile error exposed by removing the default parameter in the MediaTime constructor.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::setTimestampOffset):
2013-11-18 Nick Diego Yamane <nick.yamane@openbossa.org>
Change webaudio to use nullptr for null pointers
https://bugs.webkit.org/show_bug.cgi?id=124526
Reviewed by Anders Carlsson.
No new tests needed, no behavior change.
* Modules/webaudio/AudioBuffer.cpp:
* Modules/webaudio/AudioContext.cpp:
* Modules/webaudio/AudioNode.cpp:
* Modules/webaudio/ChannelMergerNode.cpp:
* Modules/webaudio/ChannelSplitterNode.cpp:
* Modules/webaudio/MediaStreamAudioSource.cpp:
* Modules/webaudio/OfflineAudioContext.cpp:
* Modules/webaudio/PeriodicWave.cpp:
* Modules/webaudio/ScriptProcessorNode.cpp:
2013-11-18 peavo@outlook.com <peavo@outlook.com>
[Curl] Basic authentication is not reused.
https://bugs.webkit.org/show_bug.cgi?id=124452
Reviewed by Brent Fulgham.
After a successful basic authentication, the credentials are not reused for later requests.
In the CFNetwork port, this is solved by trying basic authentication first, if credentials exists.
Also, when a 401 response is received, the first thing the CFNetwork port does, is to use
m_user/m_pass as credentials in the following request if they are set.
This can be done the same way for the Curl version.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Try using m_user/m_pass as credentials first, if they are set.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::applyAuthenticationToRequest): Try basic authentication first, if credentials exists.
2013-11-18 Mátyás Mustoha <mmatyas@inf.u-szeged.hu>
[curl] Add file cache
https://bugs.webkit.org/show_bug.cgi?id=123333
Reviewed by Brent Fulgham.
Implementation of on disc file cache
for the curl network backend.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/network/curl/CurlCacheEntry.cpp: Added.
(WebCore::CurlCacheEntry::CurlCacheEntry):
(WebCore::CurlCacheEntry::~CurlCacheEntry):
(WebCore::CurlCacheEntry::isCached):
(WebCore::CurlCacheEntry::requestHeaders):
(WebCore::CurlCacheEntry::saveCachedData):
(WebCore::CurlCacheEntry::loadCachedData):
(WebCore::CurlCacheEntry::saveResponseHeaders):
(WebCore::CurlCacheEntry::loadResponseHeaders):
(WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
(WebCore::CurlCacheEntry::didFail):
(WebCore::CurlCacheEntry::didFinishLoading):
(WebCore::CurlCacheEntry::generateBaseFilename):
(WebCore::CurlCacheEntry::loadFileToBuffer):
(WebCore::CurlCacheEntry::invalidate):
(WebCore::CurlCacheEntry::parseResponseHeaders):
* platform/network/curl/CurlCacheEntry.h: Added.
(WebCore::CurlCacheEntry::isInMemory):
* platform/network/curl/CurlCacheManager.cpp: Added.
(WebCore::CurlCacheManager::getInstance):
(WebCore::CurlCacheManager::CurlCacheManager):
(WebCore::CurlCacheManager::~CurlCacheManager):
(WebCore::CurlCacheManager::setCacheDirectory):
(WebCore::CurlCacheManager::loadIndex):
(WebCore::CurlCacheManager::saveIndex):
(WebCore::CurlCacheManager::didReceiveResponse):
(WebCore::CurlCacheManager::didFinishLoading):
(WebCore::CurlCacheManager::isCached):
(WebCore::CurlCacheManager::requestHeaders):
(WebCore::CurlCacheManager::didReceiveData):
(WebCore::CurlCacheManager::saveResponseHeaders):
(WebCore::CurlCacheManager::invalidateCacheEntry):
(WebCore::CurlCacheManager::didFail):
(WebCore::CurlCacheManager::loadCachedData):
* platform/network/curl/CurlCacheManager.h: Added.
(WebCore::CurlCacheManager::getCacheDirectory):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::writeCallback):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):
(WebCore::ResourceHandleManager::initializeHandle):
2013-11-18 peavo@outlook.com <peavo@outlook.com>
[Win] WebKit version in user agent string is incorrect.
https://bugs.webkit.org/show_bug.cgi?id=124454
Reviewed by Brent Fulgham.
* DerivedSources.make: Generate WebKitVersion.h
2013-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.am: Add inspector json files to EXTRA_DIST and
remove maketokenizer from EXTRA_DIST.
* GNUmakefile.list.am: Add missing header files.
2013-11-18 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toHTMLDataList|Html|EmbedElement
https://bugs.webkit.org/show_bug.cgi?id=124482
Reviewed by Tim Horton.
To clean up static_cast<HTMLFoo*>, toHTMLEmbedElement, toHTMLHtmlElement, toHTMLDataListElement
are generated.
No new tests, no behavior changes.
* html/HTMLDataListElement.h:
* html/HTMLEmbedElement.h:
* html/HTMLHtmlElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::dataList):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::ownerDataListElement):
* html/HTMLTagNames.in:
* html/ImageDocument.cpp:
(WebCore::ImageDocument::createDocumentStructure):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintSliderTicks):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):
2013-11-18 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Clean up static_cast<HTMLFoo*> usage
https://bugs.webkit.org/show_bug.cgi?id=124480
Reviewed by Tim Horton.
Though there are toHTMLFoo(), some places are still using static_cast<>.
Additionally, toHTMLBodyElement() is supported from now.
No new tests, no behavior changes.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isRequired):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* bindings/js/JSHTMLFrameSetElementCustom.cpp:
(WebCore::JSHTMLFrameSetElement::nameGetter):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginInstance):
* dom/Document.cpp:
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::iconURLs):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
* html/HTMLBodyElement.h:
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::bgColor):
(WebCore::HTMLDocument::setBgColor):
(WebCore::HTMLDocument::fgColor):
(WebCore::HTMLDocument::setFgColor):
(WebCore::HTMLDocument::alinkColor):
(WebCore::HTMLDocument::setAlinkColor):
(WebCore::HTMLDocument::linkColor):
(WebCore::HTMLDocument::setLinkColor):
(WebCore::HTMLDocument::vlinkColor):
(WebCore::HTMLDocument::setVlinkColor):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::updateAncestorDisabledState):
(WebCore::HTMLFormControlElement::enclosingFormControlElement):
* html/HTMLFormElement.cpp:
(WebCore::submitElementFromEvent):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::notifyFinished):
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::virtualForm):
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
2013-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update GObject DOM symbols file after r158760.
* bindings/gobject/webkitdom.symbols: Add
webkit_dom_text_track_get_id prototype.
2013-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r158821): [GTK] API break due to removed properties in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=124489
Reviewed by Philippe Normand.
In r158821, several properties were changed from readonly to
CustomSetter. The GObject DOM bindings currently skips any
attribute having a custom getter or setter, and those properties
are not generated anymore. We should add support for generating
attributes having a custom getter or setter in GObject DOM
bindings generator, but to fix the ABI break now we bring the old
implementatiom back as custom implementation. This fixes the ABI
compatibility, but not the API since the GObject properties are
not generated.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_audio_track_get_kind):
(webkit_dom_audio_track_get_language):
(webkit_dom_text_track_get_kind):
(webkit_dom_text_track_get_language):
(webkit_dom_video_track_get_kind):
(webkit_dom_video_track_get_language):
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols:
2013-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update GObject DOM symbols file after r158662.
* bindings/gobject/webkitdom.symbols: Add missing prototypes.
2013-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update GObject DOM symbols file after r159208 and r159363.
* bindings/gobject/webkitdom.symbols: Add
webkit_dom_html_media_element_fast_seek prototype.
2013-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r159363): [GTK] API break in webkit_dom_html_media_element_set_current_time
https://bugs.webkit.org/show_bug.cgi?id=124485
Reviewed by Philippe Normand.
In r159363 currentTime attribute was changed to not raise
exceptions. This breaks the API of GObject DOM bindings because we
use a GError parameter for exceptions that has been removed.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_media_element_set_current_time): Custom
implementation that receives a GError for backwards
compatibility.
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols: Add
webkit_dom_html_media_element_set_current_time prototype.
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Skip
webkit_dom_html_media_element_set_current_time since we are adding
a custom implementation.
2013-11-17 Alexey Proskuryakov <ap@apple.com>
Support exporting public RSASSA-PKCS1-v1_5 keys
https://bugs.webkit.org/show_bug.cgi?id=124475
Reviewed by Sam Weinig.
Test: crypto/subtle/rsa-export-key.html
* bindings/js/JSCryptoKeySerializationJWK.h:
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::buildJSONForRSAComponents):
(WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
(WebCore::JSCryptoKeySerializationJWK::serialize):
Added said support (this part works with private keys too).
* crypto/keys/CryptoKeyRSA.h:
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::getPublicKeyComponents): Moved the logic for getting a
public key from private one here for reuse in keySizeInBits().
(WebCore::CryptoKeyRSA::isRestrictedToHash):
(WebCore::CryptoKeyRSA::keySizeInBits):
(WebCore::CryptoKeyRSA::exportData):
Exposed information necessary for JWK serialization.
2013-11-17 Alexey Proskuryakov <ap@apple.com>
RSASSA-PKCS1-v1_5 JWK import doesn't check key size
https://bugs.webkit.org/show_bug.cgi?id=124472
Reviewed by Sam Weinig.
Test: crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Added the checks.
(WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Check key size when
importing.
(WebCore::JSCryptoKeySerializationJWK::serialize): Updated a comment.
* crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize):
Updated a comment.
2013-11-17 Alexey Proskuryakov <ap@apple.com>
JWK crypto key export result is a DOM string instead of an array buffer
https://bugs.webkit.org/show_bug.cgi?id=124473
Reviewed by Sam Weinig.
* bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::exportKey):
Fix it.
2013-11-17 Sam Weinig <sam@webkit.org>
LayoutStateMaintainer should use references where possible
https://bugs.webkit.org/show_bug.cgi?id=124471
Reviewed by Dan Bernstein.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedLayout):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::layout):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::pushFlowThreadLayoutState):
* rendering/RenderFlowThread.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::layout):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layout):
(WebCore::RenderTableSection::layoutRows):
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::layout):
* rendering/RenderView.cpp:
(WebCore::RenderView::pushLayoutState):
(WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
* rendering/RenderView.h:
(WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
(WebCore::LayoutStateMaintainer::push):
(WebCore::LayoutStateMaintainer::pop):
2013-11-16 Alexey Proskuryakov <ap@apple.com>
Use uint8_t vectors for WebCrypto data
https://bugs.webkit.org/show_bug.cgi?id=124466
Reviewed by Sam Weinig.
Using Vector<char> for crypto key data is somewhat non-idiomatic, and it gets simply
dangerous for bignums, because signed arithmetic is not appropriate for bignum digits.
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::generateSecWebSocketKey):
(WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
No longer need to cast data to char* here.
* bindings/js/JSCryptoKeySerializationJWK.cpp:
* bindings/js/JSCryptoKeySerializationJWK.h:
* crypto/CryptoDigest.h:
* crypto/CryptoKey.h:
* crypto/keys/CryptoKeyAES.cpp:
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyDataOctetSequence.h:
* crypto/keys/CryptoKeyDataRSAComponents.cpp:
* crypto/keys/CryptoKeyDataRSAComponents.h:
* crypto/keys/CryptoKeyHMAC.cpp:
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/keys/CryptoKeySerializationRaw.cpp:
* crypto/keys/CryptoKeySerializationRaw.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
* crypto/mac/CryptoDigestMac.cpp:
* crypto/mac/CryptoKeyMac.cpp:
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
Switched to Vector<uint8_t>.
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::getPublicKeyComponents): Extracted from buildAlgorithmDescription() and simplified.
(WebCore::CryptoKeyRSA::create): Switched to Vector<uint8_t>.
(WebCore::CryptoKeyRSA::buildAlgorithmDescription): No longer need to copy data just
to change type from Vector<char> to Vector<unsigned char>.
(WebCore::bigIntegerToUInt32): Ditto. No longer need to cast types when dealing with the bignum.
(WebCore::CryptoKeyRSA::generatePair): Improved an error message a little.
* fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::convertToDataURL):
* inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest):
* inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::archive):
* platform/graphics/cg/ImageBufferCG.cpp: (WebCore::CGImageToDataURL):
No longer need to cast data to char* here.
2013-11-17 Antti Koivisto <antti@apple.com>
REGRESSION (r158774): Iteration over element children is broken
https://bugs.webkit.org/show_bug.cgi?id=124145
Reviewed by Anders Carlsson.
Mutation during traversal invalidates the position cache. After the mid-point we start
traversing backwards as it the shortest path. However backward traversal of children-only
HTMLCollection was wrong and would end up going to descendants.
Reduction by yannick.poirier@inverto.tv.
Test: fast/dom/htmlcollection-children-mutation.html
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::collectionTraverseBackward):
Traverse direct children only when m_shouldOnlyIncludeDirectChildren bit is set.
2013-11-17 Zoltan Horvath <zoltan@webkit.org>
Move LineLayoutState.h into rendering/line
<https://webkit.org/b/124458>
Reviewed by Mihnea Ovidenie.
LineLayoutState is a helper class of RenderBlockLineLayout, so I'm moving it into line subdirectory.
No new tests, no behavior change.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/line/LineLayoutState.h: Renamed from Source/WebCore/rendering/LineLayoutState.h.
(WebCore::FloatWithRect::FloatWithRect):
(WebCore::LineLayoutState::LineLayoutState):
(WebCore::LineLayoutState::lineInfo):
(WebCore::LineLayoutState::endLineLogicalTop):
(WebCore::LineLayoutState::setEndLineLogicalTop):
(WebCore::LineLayoutState::endLine):
(WebCore::LineLayoutState::setEndLine):
(WebCore::LineLayoutState::lastFloat):
(WebCore::LineLayoutState::setLastFloat):
(WebCore::LineLayoutState::floats):
(WebCore::LineLayoutState::floatIndex):
(WebCore::LineLayoutState::setFloatIndex):
(WebCore::LineLayoutState::adjustedLogicalLineTop):
(WebCore::LineLayoutState::setAdjustedLogicalLineTop):
(WebCore::LineLayoutState::flowThread):
(WebCore::LineLayoutState::setFlowThread):
(WebCore::LineLayoutState::endLineMatched):
(WebCore::LineLayoutState::setEndLineMatched):
(WebCore::LineLayoutState::checkForFloatsFromLastLine):
(WebCore::LineLayoutState::setCheckForFloatsFromLastLine):
(WebCore::LineLayoutState::markForFullLayout):
(WebCore::LineLayoutState::isFullLayout):
(WebCore::LineLayoutState::usesRepaintBounds):
(WebCore::LineLayoutState::setRepaintRange):
(WebCore::LineLayoutState::updateRepaintRangeFromBox):
2013-11-17 Antti Koivisto <antti@apple.com>
Simple line path does not respect visibility:hidden
https://bugs.webkit.org/show_bug.cgi?id=124467
Reviewed by Anders Carlsson.
Test: fast/text/text-visibility.html
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
2013-11-16 Alexey Proskuryakov <ap@apple.com>
WebCrypto no longer uses sequences of ArrayBuffers
https://bugs.webkit.org/show_bug.cgi?id=124451
Build fix.
* crypto/mac/CryptoAlgorithmHMACMac.cpp: (WebCore::calculateSignature):
Now that the function became shorter, clang realized that a variable was used
uninitialized in an impossible code path.
2013-11-16 Alexey Proskuryakov <ap@apple.com>
WebCrypto no longer uses sequences of ArrayBuffers
https://bugs.webkit.org/show_bug.cgi?id=124451
Reviewed by Sam Weinig.
Covered by existing tests.
Changed all operations to take single CryptoOperationData objects.
* bindings/js/JSCryptoOperationData.cpp:
* bindings/js/JSCryptoOperationData.h:
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::encrypt):
(WebCore::JSSubtleCrypto::decrypt):
(WebCore::JSSubtleCrypto::sign):
(WebCore::JSSubtleCrypto::verify):
(WebCore::JSSubtleCrypto::digest):
* crypto/CryptoAlgorithm.cpp:
(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::decrypt):
(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):
(WebCore::CryptoAlgorithm::digest):
* crypto/CryptoAlgorithm.h:
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
* crypto/algorithms/CryptoAlgorithmAES_CBC.h:
* crypto/algorithms/CryptoAlgorithmHMAC.h:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmSHA1.cpp:
(WebCore::CryptoAlgorithmSHA1::digest):
* crypto/algorithms/CryptoAlgorithmSHA1.h:
* crypto/algorithms/CryptoAlgorithmSHA224.cpp:
(WebCore::CryptoAlgorithmSHA224::digest):
* crypto/algorithms/CryptoAlgorithmSHA224.h:
* crypto/algorithms/CryptoAlgorithmSHA256.cpp:
(WebCore::CryptoAlgorithmSHA256::digest):
* crypto/algorithms/CryptoAlgorithmSHA256.h:
* crypto/algorithms/CryptoAlgorithmSHA384.cpp:
(WebCore::CryptoAlgorithmSHA384::digest):
* crypto/algorithms/CryptoAlgorithmSHA384.h:
* crypto/algorithms/CryptoAlgorithmSHA512.cpp:
(WebCore::CryptoAlgorithmSHA512::digest):
* crypto/algorithms/CryptoAlgorithmSHA512.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::calculateSignature):
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
2013-11-16 Zoltan Horvath <zoltan@webkit.org>
Remove the include of LineWidth.h from SimpleLineLayoutFunctions.cpp
<https://webkit.org/b/124449>
Reviewed by Antti Koivisto.
I removed the include of LineWidth, since SimpleLineLayoutFunctions.cpp doesn't use it.
No new tests, no behavior change.
* rendering/SimpleLineLayoutFunctions.cpp:
2013-11-15 Alexey Proskuryakov <ap@apple.com>
Support exporting symmetric keys as JWK
https://bugs.webkit.org/show_bug.cgi?id=124442
Reviewed by Sam Weinig.
Error handling is not consistent yet - some errors cause exceptions, and others
result in rejected promises. This part of spec is incomplete, so I basically did
what was most straightforward in each case.
* bindings/js/JSCryptoKeySerializationJWK.h:
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Updated a comment with a better link.
(WebCore::JSCryptoKeySerializationJWK::buildJSONForOctetSequence): A helper to building JWK.
(WebCore::JSCryptoKeySerializationJWK::addToJSON): Ditto.
(WebCore::JSCryptoKeySerializationJWK::addBoolToJSON): Ditto.
(WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON): Ditto. The code for
mapping is my best guess, this all needs to be specified.
(WebCore::JSCryptoKeySerializationJWK::addJWKUseToJSON): A helper to building JWK.
(WebCore::JSCryptoKeySerializationJWK::serialize): Build a JSON string for the key.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::importKey): Updated a comment.
(WebCore::JSSubtleCrypto::exportKey): Use CryptoKeySerialization (also for raw keys,
for consistency).
* crypto/CryptoKey.h:
(WebCore::CryptoKey::algorithmIdentifier):
(WebCore::CryptoKey::usagesBitmap):
Exposed data needed for building JWK (it used to be only exposed in a form suitable
for DOM accessors).
* crypto/keys/CryptoKeyHMAC.h: Ditto, added an accessor for JWK.
* crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize):
* crypto/keys/CryptoKeySerializationRaw.h:
Moved from JSSubtleCryptoCustom.cpp for consistency.
2013-11-15 Brady Eidson <beidson@apple.com>
Move IDBCursorBackend operations into their own files
https://bugs.webkit.org/show_bug.cgi?id=124444
Reviewed by Tim Horton.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBCursorBackend.cpp:
* Modules/indexeddb/IDBCursorBackend.h:
(WebCore::IDBCursorBackend::cursorType):
(WebCore::IDBCursorBackend::deprecatedBackingStoreCursor):
(WebCore::IDBCursorBackend::deprecatedSetBackingStoreCursor):
(WebCore::IDBCursorBackend::deprecatedSetSavedBackingStoreCursor):
* Modules/indexeddb/IDBCursorBackendOperations.cpp: Added.
(WebCore::CallOnDestruct::CallOnDestruct):
(WebCore::CallOnDestruct::~CallOnDestruct):
(WebCore::CursorAdvanceOperation::perform):
(WebCore::CursorIterationOperation::perform):
(WebCore::CursorPrefetchIterationOperation::perform):
* Modules/indexeddb/IDBCursorBackendOperations.h: Added.
(WebCore::CursorIterationOperation::create):
(WebCore::CursorIterationOperation::CursorIterationOperation):
(WebCore::CursorAdvanceOperation::create):
(WebCore::CursorAdvanceOperation::CursorAdvanceOperation):
(WebCore::CursorPrefetchIterationOperation::create):
(WebCore::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
2013-11-14 David Farler <dfarler@apple.com>
Copy ASAN flag settings to WebCore and JavaScriptCore intermediate build tools
https://bugs.webkit.org/show_bug.cgi?id=124362
Reviewed by David Kilzer.
No new tests needed.
* WebCore.xcodeproj/project.pbxproj:
Use ASAN_C*FLAGS for WebCoreExportFileGenerator.
2013-11-15 Jer Noble <jer.noble@apple.com>
[Mac][AVF] Allow video and audio tracks to be initialized with an AVAssetTrack.
https://bugs.webkit.org/show_bug.cgi?id=124421
Reviewed by Eric Carlson.
Currently, VideoTrackPrivateAVFObjC and AudioTrackPrivateAVFObjC are initialized with an
AVPlayerItemTrack, but most of its methods use the AVAssetTrack wrapped by the
AVPlayerItemTrack. Allow these objects to be alternatively initialized with an AVAssetTrack.
Add factory methods taking an AVAssetTrack:
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
(WebCore::AudioTrackPrivateAVFObjC::create):
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
(WebCore::AudioTrackPrivateAVFObjC::setAssetTrack):
(WebCore::AudioTrackPrivateAVFObjC::assetTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
(WebCore::VideoTrackPrivateAVFObjC::setAssetTrack):
(WebCore::VideoTrackPrivateAVFObjC::assetTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
Use m_assetTrack instead of [m_playerItemTrack assetTrack]:
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
(WebCore::AVTrackPrivateAVFObjCImpl::assetTrack):
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
(WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):
(WebCore::AVTrackPrivateAVFObjCImpl::enabled):
(WebCore::AVTrackPrivateAVFObjCImpl::setEnabled):
(WebCore::AVTrackPrivateAVFObjCImpl::audioKind):
(WebCore::AVTrackPrivateAVFObjCImpl::videoKind):
(WebCore::AVTrackPrivateAVFObjCImpl::id):
(WebCore::AVTrackPrivateAVFObjCImpl::label):
(WebCore::AVTrackPrivateAVFObjCImpl::language):
(WebCore::AVTrackPrivateAVFObjCImpl::trackID):
2013-11-15 Brady Eidson <beidson@apple.com>
Let IDBDatabaseBackend create IDBTransactionBackend's directly
https://bugs.webkit.org/show_bug.cgi?id=124438
Reviewed by Beth Dakin.
Create IDBTransactionBackends directly:
* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::createTransaction):
* Modules/indexeddb/IDBDatabaseBackend.h:
Remove maybeCreateTransactionBackend():
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2013-11-15 Jer Noble <jer.noble@apple.com>
HTMLMediaElement should not throw an exception from setCurrentTime or fastSeek.
https://bugs.webkit.org/show_bug.cgi?id=124294
Reviewed by Eric Carlson.
Update the seek logic to match the current specification. This means removing exception
throwing from both the .idl and the implementation.
Remove the ExceptionCode parameter from setCurrentTime and fastSeek:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::fastSeek):
(HTMLMediaElement::seek):
(HTMLMediaElement::seekWithTolerance):
(HTMLMediaElement::setCurrentTime):
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
* html/MediaController.cpp:
(MediaController::setCurrentTime):
* html/MediaController.h:
* html/MediaController.idl:
* html/MediaControllerInterface.h:
Do not pass in an ExceptionCode placeholder when calling seek:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::rewind):
(HTMLMediaElement::returnToRealtime):
(HTMLMediaElement::finishSeek):
(HTMLMediaElement::playInternal):
(HTMLMediaElement::mediaPlayerTimeChanged):
(HTMLMediaElement::mediaPlayerDurationChanged):
(HTMLMediaElement::applyMediaFragmentURI):
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
* html/MediaController.cpp:
(MediaController::bringElementUpToSpeed):
* html/MediaController.h:
* html/MediaController.idl:
* html/MediaControllerInterface.h:
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::MediaControlSeekButtonElement::seekTimerFired):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlRewindButtonElement::defaultEventHandler):
(WebCore::MediaControlTimelineElement::defaultEventHandler):
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
2013-11-15 Brady Eidson <beidson@apple.com>
Remove last vestiges of IDBBackingStore* from IDBTransactionBackend.
https://bugs.webkit.org/show_bug.cgi?id=124436
Reviewed by Tim Horton.
* Modules/indexeddb/IDBFactoryBackendInterface.h: Removed createCursorBackend.
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed createCursorBackend.
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed createCursorBackend.
* Modules/indexeddb/IDBCursorBackend.h:
* Modules/indexeddb/IDBTransactionBackend.cpp:
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::openCursor):
2013-11-15 Brady Eidson <beidson@apple.com>
Make IDBIndexWriter a LevelDB specific concept
https://bugs.webkit.org/show_bug.cgi?id=124434
Reviewed by Tim Horton.
This includes renaming the class and moving it into the leveldb subdirectory.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBIndexWriter.cpp.
(WebCore::IDBIndexWriterLevelDB::IDBIndexWriterLevelDB):
(WebCore::IDBIndexWriterLevelDB::writeIndexKeys):
(WebCore::IDBIndexWriterLevelDB::verifyIndexKeys):
(WebCore::IDBIndexWriterLevelDB::addingKeyAllowed):
* Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBIndexWriter.h.
(WebCore::IDBIndexWriterLevelDB::create):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::setIndexKeys):
(WebCore::IDBServerConnectionLevelDB::put):
2013-11-15 Alexandru Chiculita <achicu@adobe.com>
Web Inspector: DOM.performSearch should accept a list of context nodes
https://bugs.webkit.org/show_bug.cgi?id=124390
Reviewed by Timothy Hatcher.
Extracted the code in InspectorDOMAgent::performSearch into its own helper class
called InspectorNodeFinder. Also added a new array parameter called "nodeIds"
that can be used to limit the search results to just partial subtrees.
Tests: inspector-protocol/dom/dom-search-crash.html
inspector-protocol/dom/dom-search-with-context.html
inspector-protocol/dom/dom-search.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/protocol/DOM.json:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::performSearch):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorNodeFinder.cpp: Added.
(WebCore::stripCharacters):
(WebCore::InspectorNodeFinder::InspectorNodeFinder):
(WebCore::InspectorNodeFinder::performSearch):
(WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
(WebCore::InspectorNodeFinder::matchesAttribute):
(WebCore::InspectorNodeFinder::matchesElement):
(WebCore::InspectorNodeFinder::searchUsingXPath):
(WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
* inspector/InspectorNodeFinder.h: Added.
(WebCore::InspectorNodeFinder::results):
2013-11-15 Brady Eidson <beidson@apple.com>
Remove IDBBackingStoreInterface.h includes that are no longer needed
https://bugs.webkit.org/show_bug.cgi?id=124433
Reviewed by Tim Horton.
* Modules/indexeddb/IDBCursorBackend.cpp:
* Modules/indexeddb/IDBCursorBackend.h:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackend.h:
2013-11-15 Zoltan Horvath <zoltan@webkit.org>
Move BreakingContext and LineBreaker into their own files
<https://webkit.org/b/124336>
Reviewed by David Hyatt.
In this change I introduced 'line' subdirectory inside 'rendering', this directory will contain all the classes
which have been refactored from RenderBlockLineLayout.cpp. This change contains the separation of BreakingContext,
and the separation of LineBreaker classes. Since I wanted to keep the helper functions organized, I also added a
new file called LineInlineHeaders.h, which contains the functions which used in LineBreaker.h and BreakingContext.h.
I moved LineInfo class into line directory. It was necessary this time, since I added a cpp for it. I'll move the
rest of the line layout related helper classes later. (I wanted to minimize merge conflicts.)
No new tests, no behavior change.
* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreCommon.props:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::createRun):
* rendering/line/BreakingContextInlineHeaders.h: Added.
(WebCore::WordMeasurement::WordMeasurement):
(WebCore::TrailingObjects::TrailingObjects):
(WebCore::TrailingObjects::setTrailingWhitespace):
(WebCore::TrailingObjects::clear):
(WebCore::TrailingObjects::appendBoxIfNeeded):
(WebCore::deprecatedAddMidpoint):
(WebCore::startIgnoringSpaces):
(WebCore::stopIgnoringSpaces):
(WebCore::ensureLineBoxInsideIgnoredSpaces):
(WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::currentObject):
(WebCore::BreakingContext::lineBreak):
(WebCore::BreakingContext::lineBreakRef):
(WebCore::BreakingContext::lineWidth):
(WebCore::BreakingContext::atEnd):
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
(WebCore::BreakingContext::initializeForCurrentObject):
(WebCore::BreakingContext::increment):
(WebCore::BreakingContext::handleBR):
(WebCore::borderPaddingMarginStart):
(WebCore::borderPaddingMarginEnd):
(WebCore::shouldAddBorderPaddingMargin):
(WebCore::previousInFlowSibling):
(WebCore::inlineLogicalWidth):
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleFloat):
(WebCore::shouldSkipWhitespaceAfterStartObject):
(WebCore::BreakingContext::handleEmptyInline):
(WebCore::BreakingContext::handleReplaced):
(WebCore::firstPositiveWidth):
(WebCore::updateSegmentsForShapes):
(WebCore::iteratorIsBeyondEndOfRenderCombineText):
(WebCore::nextCharacter):
(WebCore::updateCounterIfNeeded):
(WebCore::measureHyphenWidth):
(WebCore::textWidth):
(WebCore::ensureCharacterGetsLineBox):
(WebCore::tryHyphenating):
(WebCore::BreakingContext::handleText):
(WebCore::textBeginsWithBreakablePosition):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
(WebCore::checkMidpoints):
(WebCore::BreakingContext::handleEndOfLine):
* rendering/line/LineBreaker.cpp: Added.
(WebCore::LineBreaker::reset):
(WebCore::LineBreaker::skipTrailingWhitespace):
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/line/LineBreaker.h: Added.
(WebCore::LineBreaker::LineBreaker):
(WebCore::LineBreaker::lineWasHyphenated):
(WebCore::LineBreaker::positionedObjects):
(WebCore::LineBreaker::clear):
* rendering/line/LineInfo.cpp: Added.
(WebCore::LineInfo::setEmpty):
* rendering/line/LineInfo.h: Renamed from Source/WebCore/rendering/LineInfo.h.
(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::setPreviousLineBrokeCleanly):
(WebCore::LineInfo::setFloatPaginationStrut):
* rendering/line/LineInlineHeaders.h: Added.
(WebCore::hasInlineDirectionBordersPaddingOrMargin):
(WebCore::lineStyle):
(WebCore::requiresLineBoxForContent):
(WebCore::shouldCollapseWhiteSpace):
(WebCore::skipNonBreakingSpace):
(WebCore::alwaysRequiresLineBox):
(WebCore::requiresLineBox):
(WebCore::setStaticPositions):
2013-11-15 Brady Eidson <beidson@apple.com>
Move execution of IDBTransactionBackendOperations to the IDBServerConnection
https://bugs.webkit.org/show_bug.cgi?id=124385
Reviewed by Tim Horton.
Each IDBOperation has it’s ::perform() moved to a method on IDBServerConnection.
This almost removes all knowledge of the backing stores from the front end.
* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::clearObjectStore):
(WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
* Modules/indexeddb/IDBDatabaseBackend.h:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::clear):
Add methods to reflect each transaction backend operation:
* Modules/indexeddb/IDBServerConnection.h:
Schedule certain operations with callbacks:
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::scheduleVersionChangeOperation):
(WebCore::IDBTransactionBackend::schedulePutOperation):
(WebCore::IDBTransactionBackend::scheduleOpenCursorOperation):
(WebCore::IDBTransactionBackend::scheduleCountOperation):
(WebCore::IDBTransactionBackend::scheduleDeleteRangeOperation):
(WebCore::IDBTransactionBackend::scheduleClearObjectStoreOperation):
* Modules/indexeddb/IDBTransactionBackend.h:
Make each operation’s perform() method defer to the IDBServerConnection (with a callback):
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::CreateObjectStoreOperation::perform):
(WebCore::CreateIndexOperation::perform):
(WebCore::CreateIndexAbortOperation::perform):
(WebCore::DeleteIndexOperation::perform):
(WebCore::DeleteIndexAbortOperation::perform):
(WebCore::GetOperation::perform):
(WebCore::PutOperation::perform):
(WebCore::SetIndexesReadyOperation::perform):
(WebCore::OpenCursorOperation::perform):
(WebCore::CountOperation::perform):
(WebCore::DeleteRangeOperation::perform):
(WebCore::ClearObjectStoreOperation::perform):
(WebCore::DeleteObjectStoreOperation::perform):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
(WebCore::CreateObjectStoreAbortOperation::perform):
Add accessors to each operation’s data members so the IDBServerConnection has everything it needs:
* Modules/indexeddb/IDBTransactionBackendOperations.h:
(WebCore::CreateObjectStoreOperation::objectStoreMetadata):
(WebCore::DeleteObjectStoreOperation::objectStoreMetadata):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::version):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::callbacks):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::databaseCallbacks):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::VersionChangeOperation):
(WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
(WebCore::CreateIndexOperation::objectStoreID):
(WebCore::CreateIndexOperation::idbIndexMetadata):
(WebCore::CreateIndexOperation::CreateIndexOperation):
(WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
(WebCore::DeleteIndexOperation::objectStoreID):
(WebCore::DeleteIndexOperation::idbIndexMetadata):
(WebCore::DeleteIndexOperation::DeleteIndexOperation):
(WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
(WebCore::GetOperation::objectStoreID):
(WebCore::GetOperation::indexID):
(WebCore::GetOperation::cursorType):
(WebCore::GetOperation::keyRange):
(WebCore::GetOperation::callbacks):
(WebCore::GetOperation::autoIncrement):
(WebCore::GetOperation::keyPath):
(WebCore::GetOperation::GetOperation):
(WebCore::PutOperation::create):
(WebCore::PutOperation::putMode):
(WebCore::PutOperation::objectStore):
(WebCore::PutOperation::key):
(WebCore::PutOperation::indexIDs):
(WebCore::PutOperation::indexKeys):
(WebCore::PutOperation::callbacks):
(WebCore::PutOperation::value):
(WebCore::PutOperation::PutOperation):
(WebCore::OpenCursorOperation::create):
(WebCore::OpenCursorOperation::objectStoreID):
(WebCore::OpenCursorOperation::indexID):
(WebCore::OpenCursorOperation::direction):
(WebCore::OpenCursorOperation::cursorType):
(WebCore::OpenCursorOperation::taskType):
(WebCore::OpenCursorOperation::keyRange):
(WebCore::OpenCursorOperation::cursorDirection):
(WebCore::OpenCursorOperation::callbacks):
(WebCore::OpenCursorOperation::OpenCursorOperation):
(WebCore::CountOperation::create):
(WebCore::CountOperation::objectStoreID):
(WebCore::CountOperation::indexID):
(WebCore::CountOperation::keyRange):
(WebCore::CountOperation::callbacks):
(WebCore::CountOperation::CountOperation):
(WebCore::DeleteRangeOperation::create):
(WebCore::DeleteRangeOperation::objectStoreID):
(WebCore::DeleteRangeOperation::callbacks):
(WebCore::DeleteRangeOperation::keyRange):
(WebCore::DeleteRangeOperation::DeleteRangeOperation):
(WebCore::ClearObjectStoreOperation::create):
(WebCore::ClearObjectStoreOperation::objectStoreID):
(WebCore::ClearObjectStoreOperation::callbacks):
(WebCore::ClearObjectStoreOperation::ClearObjectStoreOperation):
Implement each operation in terms of the appropriate backing store, then perform the callback:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::createObjectStore):
(WebCore::IDBServerConnectionLevelDB::createIndex):
(WebCore::IDBServerConnectionLevelDB::deleteIndex):
(WebCore::IDBServerConnectionLevelDB::get):
(WebCore::IDBServerConnectionLevelDB::put):
(WebCore::IDBServerConnectionLevelDB::openCursor):
(WebCore::IDBServerConnectionLevelDB::count):
(WebCore::IDBServerConnectionLevelDB::deleteRange):
(WebCore::IDBServerConnectionLevelDB::clearObjectStore):
(WebCore::IDBServerConnectionLevelDB::deleteObjectStore):
(WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
* WebCore.xcodeproj/project.pbxproj:
2013-11-15 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Modifying RTCIceCandidate object construction to match the spec
https://bugs.webkit.org/show_bug.cgi?id=124369
Reviewed by Eric Carlson.
According to the spec the RTCIceCandidateInit parameter in RTCSessionDescription constructor is optional,
which must not be nullable, and, if passed, must be a valid Dictionary. If the keys are not present, the string
object that stores them in the RTCIceCandidate class, must be null in those cases. Also, if a key is present
and its value is not valid an exception must be raised.
Existing test was updated.
* GNUmakefile.list.am:
* Modules/mediastream/RTCIceCandidate.cpp:
(WebCore::RTCIceCandidate::create):
* Modules/mediastream/RTCIceCandidate.idl:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSRTCIceCandidateCustom.cpp: Added.
(WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
2013-11-15 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r159337.
http://trac.webkit.org/changeset/159337
https://bugs.webkit.org/show_bug.cgi?id=124423
broke a bunch of fast/regions tests on EFL/GTK (Requested by
philn on #webkit).
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::setLayoutOverflow):
(WebCore::InlineFlowBox::setVisualOverflow):
* rendering/InlineFlowBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverflowFromChildren):
(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::estimateRegionRangeForBoxChild):
(WebCore::RenderBlock::updateRegionRangeForBoxChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::hasNextPage):
(WebCore::RenderBlockFlow::relayoutForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::borderBoxRectInRegion):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::addLayoutOverflow):
(WebCore::RenderBox::addVisualOverflow):
(WebCore::RenderBox::isUnsplittableForPagination):
(WebCore::RenderBox::overflowRectForPaintRejection):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
* rendering/RenderBoxRegionInfo.h:
(WebCore::RenderBoxRegionInfo::createOverflow):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
(WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
(WebCore::RenderFlowThread::checkRegionsWithStyling):
(WebCore::RenderFlowThread::mapFromLocalToFlowThread):
(WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::expandClipRectForDescendantsAndReflection):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::parentClipRects):
(WebCore::RenderLayer::calculateRects):
(WebCore::RenderLayer::intersectsDamageRect):
(WebCore::RenderLayer::repaintIncludingDescendants):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::addOverflowFromChildren):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
(WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::createStyle):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderOverflow.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::flowThreadPortionOverflowRect):
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
(WebCore::shouldPaintRegionContentsInPhase):
(WebCore::RenderRegion::paintObject):
(WebCore::RenderRegion::hitTestContents):
(WebCore::RenderRegion::computeOverflowFromFlowThread):
(WebCore::RenderRegion::repaintFlowThreadContent):
(WebCore::RenderRegion::repaintFlowThreadContentRectangle):
(WebCore::RenderRegion::insertedIntoTree):
(WebCore::RenderRegion::ensureOverflowForBox):
(WebCore::RenderRegion::rectFlowPortionForBox):
(WebCore::RenderRegion::addLayoutOverflowForBox):
(WebCore::RenderRegion::addVisualOverflowForBox):
(WebCore::RenderRegion::layoutOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paint):
2013-11-15 Antti Koivisto <antti@apple.com>
Hovering over text using simple line path should not cause switch to line boxes
https://bugs.webkit.org/show_bug.cgi?id=124418
Reviewed by Anders Carlsson.
Test: fast/text/simple-lines-hover.html
* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteRects):
(WebCore::RenderText::absoluteQuadsClippedToEllipsis):
(WebCore::RenderText::absoluteQuads):
Collect quads and rects directly from simple lines without requiring the line box switch.
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::collectTextAbsoluteRects):
(WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
Add these.
* rendering/SimpleLineLayoutFunctions.h:
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::start):
(WebCore::SimpleLineLayout::RunResolver::Run::end):
For future use.
2013-11-15 Radu Stavila <stavila@adobe.com>
[CSS Regions] Implement visual overflow for first & last regions
https://bugs.webkit.org/show_bug.cgi?id=118665
In order to properly propagate the visual overflow of elements flowed inside regions,
the responsiblity of painting and hit-testing content inside flow threads has been
moved to the flow thread layer's level.
Each region keeps the associated overflow with each box in the RenderBoxRegionInfo
structure, including one for the flow thread itself. This data is used during
painting and hit-testing.
Reviewed by David Hyatt.
Tests: fast/regions/overflow-first-and-last-regions-in-container-hidden.html
fast/regions/overflow-first-and-last-regions.html
fast/regions/overflow-nested-regions.html
fast/regions/overflow-region-float.html
fast/regions/overflow-region-inline.html
fast/regions/overflow-region-transform.html
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::setLayoutOverflow):
(WebCore::InlineFlowBox::setVisualOverflow):
* rendering/InlineFlowBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverflowFromChildren):
(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::estimateRegionRangeForBoxChild):
(WebCore::RenderBlock::updateRegionRangeForBoxChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::hasNextPage):
(WebCore::RenderBlockFlow::relayoutForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::borderBoxRectInRegion):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::addLayoutOverflow):
(WebCore::RenderBox::addVisualOverflow):
(WebCore::RenderBox::isUnsplittableForPagination):
(WebCore::RenderBox::overflowRectForPaintRejection):
* rendering/RenderBox.h:
(WebCore::RenderBox::canHaveOutsideRegionRange):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
* rendering/RenderBoxRegionInfo.h:
(WebCore::RenderBoxRegionInfo::createOverflow):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
(WebCore::RenderFlowThread::mapFromLocalToFlowThread):
(WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
(WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
(WebCore::RenderFlowThread::flipForWritingModeLocalCoordinates):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::RenderFlowThread::addRegionsVisualOverflow):
(WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::expandClipRectForRegionAndReflection):
(WebCore::expandClipRectForDescendantsAndReflection):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::parentClipRects):
(WebCore::RenderLayer::calculateRects):
(WebCore::RenderLayer::intersectsDamageRect):
(WebCore::RenderLayer::updateDescendantsLayerListsIfNeeded):
(WebCore::RenderLayer::repaintIncludingDescendants):
(WebCore::RenderLayer::paintNamedFlowThreadInsideRegion):
(WebCore::RenderLayer::paintFlowThreadIfRegion):
(WebCore::RenderLayer::hitTestFlowThreadIfRegion):
* rendering/RenderLayer.h:
(WebCore::ClipRect::inflateX):
(WebCore::ClipRect::inflateY):
(WebCore::ClipRect::inflate):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::addOverflowFromChildren):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
(WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::createStyle):
(WebCore::RenderNamedFlowFragment::namedFlowThread):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderOverflow.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::flowThreadPortionOverflowRect):
(WebCore::RenderRegion::flowThreadPortionLocation):
(WebCore::RenderRegion::regionContainerLayer):
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
(WebCore::RenderRegion::computeOverflowFromFlowThread):
(WebCore::RenderRegion::repaintFlowThreadContent):
(WebCore::RenderRegion::repaintFlowThreadContentRectangle):
(WebCore::RenderRegion::insertedIntoTree):
(WebCore::RenderRegion::ensureOverflowForBox):
(WebCore::RenderRegion::rectFlowPortionForBox):
(WebCore::RenderRegion::addLayoutOverflowForBox):
(WebCore::RenderRegion::addVisualOverflowForBox):
(WebCore::RenderRegion::layoutOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paint):
2013-11-15 Stephane Jadaud <sjadaud@sii.fr>
[GStreamer] Add support for Media Source API
https://bugs.webkit.org/show_bug.cgi?id=99065
The patch integrate a Media Source player for the GStreamer backend. The implementented architecture is:
- MediaPlayerPrivateGStreamer engine is modified to support Media Source URIs (change blob:// to mediasourceblob://), in addition to the existing support for web (http/https/blob) URIs
- Similar to the existing WebKitWebSrc gstreamer element that handles web URIs, a new gstreamer element named WebKitMediaSrc is implemented to handle Media Source URIs
- WebKitMediaSrc registers its URI protocol handler, allowing uridecodebin to dynamically create the appropriate source element.
- The WebKitMediaSrc element creates a bin with 2 appsrc: One for Audio and One for Video. Pads are dynamically linked at the reception of first video and audio buffers.
Reviewed by Philippe Normand.
Tests: Activate http/tests/media/media-source and media/media-source tests
* GNUmakefile.am:
* GNUmakefile.list.am:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::initializeGStreamerAndRegisterWebKitElements):
(WebCore::MediaPlayerPrivateGStreamer::load):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/MediaSourceGStreamer.cpp: Added.
(WebCore::MediaSourceGStreamer::open):
(WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
(WebCore::MediaSourceGStreamer::~MediaSourceGStreamer):
(WebCore::MediaSourceGStreamer::addSourceBuffer):
(WebCore::MediaSourceGStreamer::setDuration):
(WebCore::MediaSourceGStreamer::markEndOfStream):
(WebCore::MediaSourceGStreamer::unmarkEndOfStream):
* platform/graphics/gstreamer/MediaSourceGStreamer.h: Added.
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp: Added.
(WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
(WebCore::SourceBufferPrivateGStreamer::append):
(WebCore::SourceBufferPrivateGStreamer::abort):
(WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource):
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h: Added.
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp: Added.
(webKitMediaSrcAddSrc):
(webkit_media_src_init):
(webKitMediaSrcFinalize):
(webKitMediaSrcSetProperty):
(webKitMediaSrcGetProperty):
(webKitMediaVideoSrcStop):
(webKitMediaAudioSrcStop):
(webKitMediaVideoSrcStart):
(webKitMediaAudioSrcStart):
(webKitMediaSrcChangeState):
(webKitMediaSrcQueryWithParent):
(webKitMediaSrcUriGetType):
(webKitMediaSrcGetProtocols):
(webKitMediaSrcGetUri):
(webKitMediaSrcSetUri):
(webKitMediaSrcUriHandlerInit):
(webKitMediaVideoSrcNeedDataMainCb):
(webKitMediaAudioSrcNeedDataMainCb):
(webKitMediaVideoSrcNeedDataCb):
(webKitMediaAudioSrcNeedDataCb):
(webKitMediaVideoSrcEnoughDataMainCb):
(webKitMediaAudioSrcEnoughDataMainCb):
(webKitMediaVideoSrcEnoughDataCb):
(webKitMediaAudioSrcEnoughDataCb):
(webKitMediaVideoSrcSeekMainCb):
(webKitMediaAudioSrcSeekMainCb):
(webKitMediaVideoSrcSeekDataCb):
(webKitMediaAudioSrcSeekDataCb):
(webKitMediaSrcSetMediaPlayer):
(webKitMediaSrcSetPlayBin):
(MediaSourceClientGstreamer::MediaSourceClientGstreamer):
(MediaSourceClientGstreamer::~MediaSourceClientGstreamer):
(MediaSourceClientGstreamer::didReceiveDuration):
(MediaSourceClientGstreamer::didReceiveData):
(MediaSourceClientGstreamer::didFinishLoading):
(MediaSourceClientGstreamer::didFail):
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h: Added.
2013-11-14 Victor Costan <costan@gmail.com>
XMLSerializer escapes < > & correctly inside <script> and <style> tags.
https://bugs.webkit.org/show_bug.cgi?id=123914
Reviewed by Darin Adler.
Test: fast/dom/XMLSerializer-entities.html
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces): vim removed some whitespace.
(WebCore::MarkupAccumulator::entityMaskForText): Fixed the returned value for <script> etc in XML.
2013-11-14 Bem Jones-Bey <bjonesbe@adobe.com>
ASSERTION FAILED: rangesIntersect(m_renderer.pixelSnappedLogicalTopForFloat(floatingObject), m_renderer.pixelSnappedLogicalBottomForFloat(floatingObject), m_lineTop, m_lineBottom) ../../Source/WebCore/rendering/FloatingObjects.cpp(463)
https://bugs.webkit.org/show_bug.cgi?id=124375
Reviewed by Alexandru Chiculita.
When moving the placed floats tree over to LayoutUnit, I forgot to
update these asserts, which causes issues on ports with subpixel
layout enabled.
No new tests, no behavior change.
* rendering/FloatingObjects.cpp:
(WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
(WebCore::::collectIfNeeded):
2013-11-14 Victor Costan <costan@gmail.com>
Clean up sequence handling in Blob constructor
https://bugs.webkit.org/show_bug.cgi?id=124343
Reviewed by Alexey Proskuryakov.
Added test case to LayoutTests/fast/files/blob-constructor.html
* bindings/js/JSBlobCustom.cpp:
(WebCore::JSBlobConstructor::constructJSBlob):
Handle exceptions in sequences, eliminate double type-checking for
ArrayBuffer, ArrayBufferView and Blob parts.
2013-11-14 Oliver Hunt <oliver@apple.com>
Make CLoop easier to build, and make it work
https://bugs.webkit.org/show_bug.cgi?id=124359
Reviewed by Geoffrey Garen.
Add cloop configuration info to WebCore FeatureDefines
so that it's consistent with JSC
* Configurations/FeatureDefines.xcconfig:
2013-11-14 Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
[Cairo] Avoid extra copy when drawing images
https://bugs.webkit.org/show_bug.cgi?id=124209
Reviewed by Martin Robinson.
To solve the bug #58309 a cairo subsurface is being used to limit the
source image boundaries.
In many cases, when a cairo subsurface is used for drawing an image,
it occurs an image copy, causing performance penalty. In the case of
the function PlatformContextCairo::drawSurfaceToContext, the image
copy always happens.
So, we should use the subsurface only when it's really necessary.
In cases where we're drawing the whole image, the subsurface is
unnecessary.
The proposed patch avoid the use of subsurfaces when sampling the whole
image.
No new tests. It's an enhancement. Already covered by existing tests.
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::drawSurfaceToContext):
2013-11-14 Alexey Proskuryakov <ap@apple.com>
Implement raw format for WebCrypto key export
https://bugs.webkit.org/show_bug.cgi?id=124376
Reviewed by Anders Carlsson.
Tests: crypto/subtle/aes-export-key.html
crypto/subtle/hmac-export-key.html
A CryptoKey just exports its native CryptoKeyData, which will also work nicely for
JWK format soon. For spki and pkcs8, we'll need to figure out the best way to
utilize platform library support for ASN.1, but we are not there yet.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::exportKey):
* crypto/CryptoKey.h:
* crypto/SubtleCrypto.idl:
* crypto/keys/CryptoKeyAES.cpp:
(WebCore::CryptoKeyAES::exportData):
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyHMAC.cpp:
(WebCore::CryptoKeyHMAC::exportData):
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::exportData):
Added a dummy implementation for RSA.
2013-11-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Simply generated domain dispatch methods for domains with few commands
https://bugs.webkit.org/show_bug.cgi?id=124374
Reviewed by Timothy Hatcher.
* inspector/CodeGeneratorInspector.py:
(Generator.go):
(Generator.process_command):
* inspector/CodeGeneratorInspectorStrings.py:
2013-11-14 Bear Travis <betravis@adobe.com>
[CSS Shapes] Accept the new <box> value for shape-outside
https://bugs.webkit.org/show_bug.cgi?id=124227
Reviewed by David Hyatt.
The shape-outside property can now be set to the box values [margin/border/padding/content]-box.
This patch adds the parsing code required to accept the new values, and the layout code
to create a rectangle shape that has the size and position of the appropriate box.
Tests: fast/shapes/shape-outside-floats/shape-outside-boxes-001.html
fast/shapes/shape-outside-floats/shape-outside-boxes-002.html
fast/shapes/shape-outside-floats/shape-outside-boxes-003.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Output the new box values.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Accept the new box values.
* css/CSSValueKeywords.in: Add margin-box value.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyShape::applyValue): Accept the new box values.
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::borderLogicalWidth): Added new utility methods to help
with box sizing.
(WebCore::RenderBoxModelObject::borderLogicalHeight): Ditto.
(WebCore::RenderBoxModelObject::paddingLogicalWidth): Ditto.
(WebCore::RenderBoxModelObject::paddingLogicalHeight): Ditto.
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape): You can create a shape from a box's dimensions, rather
than always using a BasicShape or RasterShape value.
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape): Create the appropriate shape based on the box values.
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::setShapeSize): Adjust for the box size when using a box value.
(WebCore::ShapeInfo::logicalTopOffset): Ditto.
(WebCore::ShapeInfo::logicalLeftOffset): Ditto.
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::isEnabledFor): Enable for the box values.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::isEnabledFor): Disable for shape-inside.
* rendering/style/ShapeValue.h:
(WebCore::ShapeValue::createBoxValue): Create the appropriate shape value for a box.
(WebCore::ShapeValue::box): Return the box value for this ShapeValue.
(WebCore::ShapeValue::ShapeValue): Create a ShapeValue from a box value.
2013-11-14 Beth Dakin <bdakin@apple.com>
Rubber-stamped by Tim Horton.
Post-checkin review comment! StickToViewportBounds sounds better and more accurate
than StickToWindowBounds.
* platform/ScrollTypes.h:
2013-11-13 Jer Noble <jer.noble@apple.com>
Unreviewed build failure; update MediaPlayerPrivateAVFFoundationCF::seekToTime after r159208.
After r159208, seekToTime takes tolerance parameters.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
(WebCore::AVFWrapper::seekToTime):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2013-11-14 Beth Dakin <bdakin@apple.com>
Add a new mode where fixed elements don't constrain their positions during a
rubber band
https://bugs.webkit.org/show_bug.cgi?id=124260
Reviewed by Tim Horton.
This patch adds a new enum called ScrollBehaviorForFixedElements, which has
two values, StickToDocumentBounds or StickToWindowBounds. StickToDocumentBounds
corresponds to our current behavior, where fixed elements constrain
their positions during a rubber-band so that they stay stuck to the document.
The new mode, StickToWindowBounds, will cause fixed elements to always stay
fixed relative to the window.
scrollOffsetForFixedPosition() now takes a new parameter for the fixed behavior
so that it knows whether or not to constrain the position.
* page/FrameView.cpp:
(WebCore::FrameView::scrollOffsetForFixedPosition):
Right now, just return StickToDocumentBounds and retain existing behavior.
(WebCore::FrameView::scrollBehaviorForFixedElements):
* page/FrameView.h:
The scrolling thread needs to know about the fixed element scroll behavior,
so this code makes ScrollingStateScrollingNodes keep track of that
information to pass over to the scrolling thread.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setScrollBehaviorForFixedElements):
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::scrollBehaviorForFixedElements):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinatorMac::setScrollBehaviorForFixedElementsForNode):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
Here is the new enum.
* platform/ScrollTypes.h:
Another place where we only want to constrain scroll position if that is the
mode we are in.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation):
2013-11-14 Alexey Proskuryakov <ap@apple.com>
[Mac] HMAC sign/verify crashes when key is empty
https://bugs.webkit.org/show_bug.cgi?id=124372
Reviewed by Sam Weinig.
Test: crypto/subtle/hmac-sign-verify-empty-key.html
* crypto/mac/CryptoAlgorithmHMACMac.cpp: (WebCore::calculateSignature): Give it
a non-null pointer then.
2013-11-14 Alexey Proskuryakov <ap@apple.com>
Implement RSASSA-PKCS1-v1_5 sign/verify
https://bugs.webkit.org/show_bug.cgi?id=124335
Build fix.
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
2013-11-14 Samuel White <samuel_white@apple.com>
AX: Calling NSAccessibilityColumnsAttribute and NSAccessibilityRowsAttribute simply to get column/row count can be very expensive.
https://bugs.webkit.org/show_bug.cgi?id=124293
Reviewed by Chris Fleizach.
Added ability to get accessibility table column or row count without fetching all columns or rows.
Test: platform/mac/accessibility/table-column-and-row-count.html
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-11-14 Alexey Proskuryakov <ap@apple.com>
Implement RSASSA-PKCS1-v1_5 sign/verify
https://bugs.webkit.org/show_bug.cgi?id=124335
Reviewed by Sam Weinig.
Test: crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html
* WebCore.xcodeproj/project.pbxproj: Added new files, removed Mac SHA algorithm files.
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::getCommonCryptoDigestAlgorithm):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
Implemented. These take two steps, first a digest is computed, and then it's signed.
* crypto/CryptoDigest.h: Added.
* crypto/mac/CryptoDigestMac.cpp: Added.
(WebCore::CryptoDigest::CryptoDigest):
(WebCore::CryptoDigest::~CryptoDigest):
(WebCore::CryptoDigest::create):
(WebCore::CryptoDigest::addBytes):
(WebCore::CryptoDigest::computeHash):
Added a cross-platform interface and Mac implementation to compute a digest. It
should be possible to use it outside WebCrypto if we need to (perhaps even merge
with WTF SHA-1 class).
The Mac implementation is kind of ugly, but at least it encapsulates the ugliness.
* crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::digest):
* crypto/algorithms/CryptoAlgorithmSHA224.cpp: (WebCore::CryptoAlgorithmSHA224::digest):
* crypto/algorithms/CryptoAlgorithmSHA256.cpp: (WebCore::CryptoAlgorithmSHA256::digest):
* crypto/algorithms/CryptoAlgorithmSHA384.cpp: (WebCore::CryptoAlgorithmSHA384::digest):
* crypto/algorithms/CryptoAlgorithmSHA512.cpp: (WebCore::CryptoAlgorithmSHA512::digest):
* crypto/mac/CryptoAlgorithmSHA1Mac.cpp: Removed.
* crypto/mac/CryptoAlgorithmSHA224Mac.cpp: Removed.
* crypto/mac/CryptoAlgorithmSHA256Mac.cpp: Removed.
* crypto/mac/CryptoAlgorithmSHA384Mac.cpp: Removed.
* crypto/mac/CryptoAlgorithmSHA512Mac.cpp: Removed.
These are all cross-platform now.
2013-11-14 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Empty polygons with non-zero shape-padding cause an ASSERT crash
https://bugs.webkit.org/show_bug.cgi?id=124324
Reviewed by Andreas Kling.
PolygonShape::shapePaddingBounds() and PolygonShape::shapeMarginBounds() no
longer attempt to compute a new FloatPolygon when the original is empty, i.e.
when it has less than three vertices.
Tests: fast/shapes/shape-inside/shape-inside-empty-polygon-crash.html
fast/shapes/shape-outside-floats/shape-outside-floats-empty-polygon-crash.html
* rendering/shapes/PolygonShape.cpp:
(WebCore::PolygonShape::shapePaddingBounds): Don't compute a padding FloatPolygon if the original polygon is empty.
(WebCore::PolygonShape::shapeMarginBounds): Don't compute a margin FloatPolygon if the original polygon is empty.
2013-11-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Cleaner Backend Method Calling Code Generation
https://bugs.webkit.org/show_bug.cgi?id=124333
Reviewed by Timothy Hatcher.
No change in functionality, just improved generated code.
* inspector/CodeGeneratorInspector.py:
(Generator.process_command):
* inspector/CodeGeneratorInspectorStrings.py:
* inspector/InspectorBackendDispatcher.cpp:
* inspector/InspectorBackendDispatcher.h:
2013-11-14 Seokju Kwon <seokju@webkit.org>
Use [ImplementedAs=defaultStatus] for Window.defaultstatus
https://bugs.webkit.org/show_bug.cgi?id=124334
Reviewed by Christophe Dumez.
No new tests, this is just refactoring.
Use [ImplementedAs=defaultStatus] for Window.defaultstatus
and remove unnecessary code from DOMWindow.
Because 'defaultstatus' is an alias of defaultStatus.
* page/DOMWindow.h:
* page/DOMWindow.idl:
2013-11-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toSVGPolyline|gonElement() to replace static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=124341
Reviewed by Andreas Kling.
toSVGFoo() supports more plenty helper functions. So, toSVGFoo() needs
to be used instead of static_cast<>.
Additionally, cleanup other static_cast<> as well.
No new tests, no behavior changes.
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromEllipseElement):
(WebCore::updatePathFromLineElement):
(WebCore::updatePathFromPolygonElement):
(WebCore::updatePathFromPolylineElement):
* svg/SVGPolygonElement.h:
* svg/SVGPolylineElement.h:
* svg/svgtags.in: Add *generateTypeHelpers* keyword to polygon, polyline
2013-11-14 Andreas Kling <akling@apple.com>
FontDescription copies should share families list, not duplicate it.
<https://webkit.org/b/124338>
Turn FontDescription::m_families into a RefCountedArray<AtomicString>
instead of a Vector<AtomicString, 1>. This allows FontDescription to
share the families list between copies, instead of each object having
its own Vector.
Also, FontDescription itself shrinks by 16 bytes.
Reviewed by Antti Koivisto.
2013-11-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce FILTER_TYPE_CASTS for child filter class
https://bugs.webkit.org/show_bug.cgi?id=124332
Reviewed by Andreas Kling.
To use TYPE_CASTS_BASE, define FILTER_TYPE_CASTS macro. Thanks to
it, static_cast<SVGFilter*> can be replaced by toSVGFilter().
No new tests, no behavior changes.
* platform/graphics/filters/Filter.h:
Add isSVGFilter() to check if casting object is SVGFilter object.
(WebCore::Filter::isSVGFilter):
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::determineAbsolutePaintRect):
(WebCore::FEImage::platformApplySoftware):
* svg/graphics/filters/SVGFilter.h:
2013-11-13 Victor Costan <costan@gmail.com>
Blob constructor accepts a sequence (array-like object) as first arg.
https://bugs.webkit.org/show_bug.cgi?id=124175
Reviewed by Christophe Dumez.
Added test cases to fast/files/script-tests/blob-constructor.js.
* bindings/js/JSBlobCustom.cpp: Make the constructor work with sequences.
(WebCore::JSBlobConstructor::constructJSBlob):
* bindings/js/JSDOMBinding.h:
(WebCore::toJSSequence): Slightly better error message when conversion fails.
(WebCore::toJS): Whitespace.
(WebCore::jsArray): Whitespace.
2013-11-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: InspectorBackendDispatcher improvements
https://bugs.webkit.org/show_bug.cgi?id=124330
Reviewed by Timothy Hatcher.
* inspector/InspectorBackendDispatcher.cpp:
(WebCore::InspectorBackendDispatcher::sendResponse):
(WebCore::InspectorBackendDispatcher::reportProtocolError):
* inspector/InspectorBackendDispatcher.h:
(WebCore::InspectorSupplementalBackendDispatcher::InspectorSupplementalBackendDispatcher):
2013-11-13 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed Windows Build Fix after r159268.
Missed adding InspectorBackendDispatcher.h and cpp to the Windows build.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-11-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Generate Individual InspectorBackendDispatchers, add base InspectorBackendDispatcher
https://bugs.webkit.org/show_bug.cgi?id=124296
Reviewed by Timothy Hatcher.
No new tests, this is just refactoring without changing functionality.
Set of changes made:
- Add inspector/InspectorBackendDispatcher.{h,cpp}. This used to be almost entirely
written in the code generator strings file, but make it actual source files
because there is nothing changing in the code. Also clean this up a bit.
- Give the base dispatcher a list of domain dispatchers and a way to register.
- Make InspectorBackendDispatcher::dispatch read the domain of incoming request
and pass the request on to the domain dispatcher.
- Create per-domain dispatcher classes named "InspectorFooBackendDispatcher"
- Convert "InspectorBackendDispatcher::FooCommandHandler" interfaces to
"InspectorFooBackendDispatcherHandler" interfaces.
- Convert all "InspectorBackendDispatcherImpl::FooDomain_fooMethod" methods to
"InspectorFooBackendDispatcher::fooMethod" methods. These can also remove their
"if (!agent)" checks because that can never be the case anymore.
- Remove InspectorBackendDispatcherImpl, now that there are base and domain dispatchers.
- Add ASCIILiteral in many places in generated code where possible.
- In all agents, create dispatchers in didCreateFrontendAndBackend and clear
them in willDestroyFrontendAndBackend, right alongside frontend dispatchers.
* inspector/CodeGeneratorInspector.py:
(DomainNameFixes.get_fixed_data.Res):
(TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
(Generator):
(Generator.go):
(Generator.process_command):
(Generator.generate_send_method):
* inspector/CodeGeneratorInspectorStrings.py:
(void):
(HashMap):
(InspectorBackendDispatchers_h):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::didCreateFrontendAndBackend):
(WebCore::InspectorAgent::willDestroyFrontendAndBackend):
* inspector/InspectorAgent.h:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
(WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorBackendDispatcher.cpp: Added.
(WebCore::InspectorBackendDispatcher::CallbackBase::CallbackBase):
(WebCore::InspectorBackendDispatcher::CallbackBase::isActive):
(WebCore::InspectorBackendDispatcher::CallbackBase::sendFailure):
(WebCore::InspectorBackendDispatcher::CallbackBase::sendIfActive):
(WebCore::InspectorBackendDispatcher::create):
(WebCore::InspectorBackendDispatcher::registerDispatcherForDomain):
(WebCore::InspectorBackendDispatcher::dispatch):
(WebCore::InspectorBackendDispatcher::sendResponse):
(WebCore::InspectorBackendDispatcher::reportProtocolError):
(WebCore::InspectorBackendDispatcher::getPropertyValue):
(WebCore::AsMethodBridges::asInt):
(WebCore::AsMethodBridges::asDouble):
(WebCore::AsMethodBridges::asString):
(WebCore::AsMethodBridges::asBoolean):
(WebCore::AsMethodBridges::asObject):
(WebCore::AsMethodBridges::asArray):
(WebCore::InspectorBackendDispatcher::getInt):
(WebCore::InspectorBackendDispatcher::getDouble):
(WebCore::InspectorBackendDispatcher::getString):
(WebCore::InspectorBackendDispatcher::getBoolean):
(WebCore::InspectorBackendDispatcher::getObject):
(WebCore::InspectorBackendDispatcher::getArray):
* inspector/InspectorBackendDispatcher.h: Added.
(WebCore::InspectorSupplementalBackendDispatcher::InspectorSupplementalBackendDispatcher):
(WebCore::InspectorSupplementalBackendDispatcher::~InspectorSupplementalBackendDispatcher):
(WebCore::InspectorBackendDispatcher::~InspectorBackendDispatcher):
(WebCore::InspectorBackendDispatcher::clearFrontend):
(WebCore::InspectorBackendDispatcher::isActive):
(WebCore::InspectorBackendDispatcher::InspectorBackendDispatcher):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
(WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
(WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend):
(WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
(WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInputAgent.cpp:
(WebCore::InspectorInputAgent::didCreateFrontendAndBackend):
(WebCore::InspectorInputAgent::willDestroyFrontendAndBackend):
* inspector/InspectorInputAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
(WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
(WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
(WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorPageAgent::getScriptExecutionStatus):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
(WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
(WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
* inspector/PageRuntimeAgent.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
(WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
* inspector/WorkerRuntimeAgent.h:
2013-11-13 Andy Estes <aestes@apple.com>
Use NSCalendarIdentifierGregorian instead of NSGregorianCalendar on OS X 10.9 and iOS
https://bugs.webkit.org/show_bug.cgi?id=124323
Reviewed by Mark Rowe.
NSGregorianCalendar was deprecated in OS X 10.9 and iOS 7.
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::LocaleMac):
2013-11-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Rename InspectorBackendDispatcher.h to InspectorBackendDispatchers.h
https://bugs.webkit.org/show_bug.cgi?id=124257
Reviewed by Timothy Hatcher.
Soon each domain will generate its own dispatcher, and the generic
InspectorBackendDispatcher will no longer be generated, it will just
live in WebCore/inspector.
* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/CodeGeneratorInspector.py:
* inspector/CodeGeneratorInspectorStrings.py:
(InspectorBackendDispatchers_h):
* inspector/InspectorBaseAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/WorkerInspectorController.cpp:
2013-11-13 Andreas Kling <akling@apple.com>
Remove Document::m_savedRenderView pointer.
<https://webkit.org/b/124310>
This pointer held a copy of m_renderView while the document was in
page cache, and null while it wasn't. It was not used for anything.
Reviewed by Anders Carlsson.
2013-11-13 Brady Eidson <beidson@apple.com>
Move setIndexKeys() to the IDBServerConnection
https://bugs.webkit.org/show_bug.cgi?id=124301
Reviewed by Anders Carlsson.
This is a big step towards moving knowledge of the backing store out of the frontend.
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::setIndexKeys):
* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::setIndexKeys):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::PutOperation::perform):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2013-11-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Extract InspectorFrontendDispatchers from InspectorFrontend
https://bugs.webkit.org/show_bug.cgi?id=124246
Reviewed by Timothy Hatcher.
No new tests, this is just refactoring without changing functionality.
Set of changes made:
- Remove "class InspectorFrontend" that currently does nothing but hold
sub-frontend dispatcher classes. Catches some stale code.
- Generate individual "class InspectorFooFrontendDispatcher" classes for
domains that have events. Catches some unnecessary classes.
- Simplify the Base Agent interface from optional set/clearFrontend/register
to required didCreateFrontendAndBackend/willDestroyFrontendAndBackend.
New agents must implement this and this will be their cue to setup
frontend and backend dispatchers.
- Base Agent no longer needs to be templated or have an Interface class.
- While we are changing subclass BaseAgent superclass calls, use ASCIILiteral
- In agents with events, convert "InspectorFrontend::Foo* m_frontend" to
"unique_ptr<InspectorFooFrontendDispatcher> m_frontendDispatcher" and
update uses as appropriate within the classes.
- In agents with events, create dispatchers in didCreateFrontendAndBackend
and clear them in willDestroyFrontendAndBackend.
* inspector/CodeGeneratorInspector.py:
(Generator):
(Generator.go):
(Generator.process_event):
* inspector/CodeGeneratorInspectorStrings.py:
(InspectorFrontendChannel):
* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::addToFrontend):
(WebCore::ConsoleMessage::updateRepeatCountInConsole):
* inspector/ConsoleMessage.h:
* inspector/InjectedScriptHost.h:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::didCreateFrontendAndBackend):
(WebCore::InspectorAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorAgent::enable):
(WebCore::InspectorAgent::evaluateForTestInFrontend):
(WebCore::InspectorAgent::inspect):
* inspector/InspectorAgent.h:
(WebCore::InspectorAgent::hasFrontend):
* inspector/InspectorAgentRegistry.cpp:
(WebCore::InspectorAgentRegistry::append):
(WebCore::InspectorAgentRegistry::didCreateFrontendAndBackend):
(WebCore::InspectorAgentRegistry::willDestroyFrontendAndBackend):
* inspector/InspectorAgentRegistry.h:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
(WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
(WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
(WebCore::InspectorApplicationCacheAgent::networkStateChanged):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgent::discardAgent):
(WebCore::InspectorBaseAgent::InspectorBaseAgent):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
(WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
(WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorCSSAgent::mediaQueryResultChanged):
(WebCore::InspectorCSSAgent::didCreateNamedFlow):
(WebCore::InspectorCSSAgent::willRemoveNamedFlow):
(WebCore::InspectorCSSAgent::regionLayoutUpdated):
(WebCore::InspectorCSSAgent::regionOversetChanged):
(WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement):
(WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
(WebCore::InspectorCSSAgent::styleSheetChanged):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
(WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
(WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
(WebCore::InspectorCanvasAgent::frameNavigated):
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::clearMessages):
(WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend):
(WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorConsoleAgent::addMessageToConsole):
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::addConsoleMessage):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::show):
(WebCore::InspectorController::close):
* inspector/InspectorController.h:
(WebCore::InspectorController::hasFrontend):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
(WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorDOMAgent::setDocument):
(WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
(WebCore::InspectorDOMAgent::pushNodePathToFrontend):
(WebCore::InspectorDOMAgent::focusNode):
(WebCore::InspectorDOMAgent::mainFrameDOMContentLoaded):
(WebCore::InspectorDOMAgent::didCommitLoad):
(WebCore::InspectorDOMAgent::didInsertDOMNode):
(WebCore::InspectorDOMAgent::didRemoveDOMNode):
(WebCore::InspectorDOMAgent::didModifyDOMAttr):
(WebCore::InspectorDOMAgent::didRemoveDOMAttr):
(WebCore::InspectorDOMAgent::styleAttributeInvalidated):
(WebCore::InspectorDOMAgent::characterDataModified):
(WebCore::InspectorDOMAgent::didPushShadowRoot):
(WebCore::InspectorDOMAgent::willPopShadowRoot):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
(WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::didOpenDatabase):
(WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
(WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorDatabaseAgent::enable):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseResource.cpp:
(WebCore::InspectorDatabaseResource::bind):
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::enable):
(WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorDebuggerAgent::addMessageToConsole):
(WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
(WebCore::InspectorDebuggerAgent::scriptExecutionBlockedByCSP):
(WebCore::InspectorDebuggerAgent::didParseSource):
(WebCore::InspectorDebuggerAgent::failedToParseSource):
(WebCore::InspectorDebuggerAgent::didPause):
(WebCore::InspectorDebuggerAgent::didContinue):
(WebCore::InspectorDebuggerAgent::breakProgram):
(WebCore::InspectorDebuggerAgent::clearBreakDetails):
(WebCore::InspectorDebuggerAgent::reset):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
(WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
(WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
(WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
(WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
(WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInputAgent.cpp:
(WebCore::InspectorInputAgent::InspectorInputAgent):
(WebCore::InspectorInputAgent::didCreateFrontendAndBackend):
(WebCore::InspectorInputAgent::willDestroyFrontendAndBackend):
* inspector/InspectorInputAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
(WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
(WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorLayerTreeAgent::layerTreeDidChange):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
(WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
(WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
(WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
(WebCore::InspectorPageAgent::domContentEventFired):
(WebCore::InspectorPageAgent::loadEventFired):
(WebCore::InspectorPageAgent::frameNavigated):
(WebCore::InspectorPageAgent::frameDetached):
(WebCore::InspectorPageAgent::frameStartedLoading):
(WebCore::InspectorPageAgent::frameStoppedLoading):
(WebCore::InspectorPageAgent::frameScheduledNavigation):
(WebCore::InspectorPageAgent::frameClearedScheduledNavigation):
(WebCore::InspectorPageAgent::willRunJavaScriptDialog):
(WebCore::InspectorPageAgent::didRunJavaScriptDialog):
(WebCore::InspectorPageAgent::scriptsEnabled):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
(WebCore::InspectorProfilerAgent::addProfile):
(WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
(WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
(WebCore::InspectorProfilerAgent::getHeapSnapshot):
(WebCore::InspectorProfilerAgent::resetFrontendProfiles):
(WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorProfilerAgent::takeHeapSnapshot):
(WebCore::InspectorProfilerAgent::toggleRecordButton):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
(WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::markResourceAsCached):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didReceiveData):
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::didCreateWebSocket):
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorResourceAgent::didCloseWebSocket):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
(WebCore::InspectorResourceAgent::didSendWebSocketFrame):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
(WebCore::InspectorResourceAgent::enable):
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::~InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::sendEvent):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::dispatchMessageFromWorker):
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
(WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorWorkerAgent::enable):
(WebCore::InspectorWorkerAgent::disable):
(WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::workerGlobalScopeTerminated):
(WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::PageRuntimeAgent):
(WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
(WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
(WebCore::PageRuntimeAgent::didCreateMainWorldContext):
(WebCore::PageRuntimeAgent::didCreateIsolatedContext):
(WebCore::PageRuntimeAgent::notifyContextCreated):
* inspector/PageRuntimeAgent.h:
* inspector/TimelineRecordFactory.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
* inspector/WorkerInspectorController.h:
(WebCore::WorkerInspectorController::hasFrontend):
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
(WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
* inspector/WorkerRuntimeAgent.h:
* inspector/protocol/Input.json:
2013-11-13 Simon Fraser <simon.fraser@apple.com>
Rename FrameView's repaintFixedElementsAfterScrolling and updateFixedElementsAfterScrolling
https://bugs.webkit.org/show_bug.cgi?id=124306
Reviewed by Tim Horton.
FrameView::repaintFixedElementsAfterScrolling() didn't do any repainting, and didn't
just apply to fixed elements. Rename it to updateLayerPositionsAfterScrolling().
updateFixedElementsAfterScrolling() was also confusingly named; rename it
to updateCompositingLayersAfterScrolling().
* page/FrameView.cpp:
(WebCore::FrameView::setFixedVisibleContentRect):
(WebCore::FrameView::scrollPositionChangedViaPlatformWidget):
(WebCore::FrameView::updateLayerPositionsAfterScrolling):
(WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollTo):
* platform/ScrollView.h:
(WebCore::ScrollView::updateLayerPositionsAfterScrolling):
(WebCore::ScrollView::updateCompositingLayersAfterScrolling):
2013-11-13 Andreas Kling <akling@apple.com>
Generate casting helpers for SVGPaint and SVGColor.
<https://webkit.org/b/124285>
Use CSS_VALUE_TYPE_CASTS to generate type casting helpers for the
SVGPaint and SVGColor classes.
Reviewed by Anders Carlsson.
2013-11-13 Benjamin Poulain <bpoulain@apple.com>
Update ResourceHandleCF to use the didReceiveBuffer() callback
https://bugs.webkit.org/show_bug.cgi?id=124256
Reviewed by Alexey Proskuryakov.
Use didReceiveBuffer() instead of didReceiveData() to pass data back to
the ResourceHandleClient. This unify the update code with the NSURLConnection loader.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::didReceiveData):
(WebCore::ResourceHandle::handleDataArray):
2013-11-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Split Inspector.json into individual domain json files
https://bugs.webkit.org/show_bug.cgi?id=124098
Reviewed by Timothy Hatcher.
Split the Inspector domains into their own json file. Generate a
combined Inspector.json from all of the json files at build time
so that the CodeGenerator is unchanged.
* .gitattributes:
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* WebCore.xcodeproj/project.pbxproj:
* inspector/CodeGeneratorInspector.py:
(TypeMap.__init__):
* inspector/Inspector.json: Removed.
* inspector/Scripts/generate-combined-inspector-json.py: Added.
* inspector/protocol/ApplicationCache.json: Added.
* inspector/protocol/CSS.json: Added.
* inspector/protocol/Canvas.json: Added.
* inspector/protocol/Console.json: Added.
* inspector/protocol/DOM.json: Added.
* inspector/protocol/DOMDebugger.json: Added.
* inspector/protocol/DOMStorage.json: Added.
* inspector/protocol/Database.json: Added.
* inspector/protocol/Debugger.json: Added.
* inspector/protocol/FileSystem.json: Added.
* inspector/protocol/HeapProfiler.json: Added.
* inspector/protocol/IndexedDB.json: Added.
* inspector/protocol/Input.json: Added.
* inspector/protocol/InspectorDomain.json: Added.
* inspector/protocol/LayerTree.json: Added.
* inspector/protocol/Memory.json: Added.
* inspector/protocol/Network.json: Added.
* inspector/protocol/Page.json: Added.
* inspector/protocol/Profiler.json: Added.
* inspector/protocol/Runtime.json: Added.
* inspector/protocol/Timeline.json: Added.
* inspector/protocol/Worker.json: Added.
2013-11-13 Zalan Bujtas <zalan@apple.com>
Code cleanup: change FrameView::doLayoutWithFrameFlattening() to make it more explicit.
https://bugs.webkit.org/show_bug.cgi?id=124238
Reviewed by Simon Fraser.
Rename doLayoutWithFrameFlattening() and change its signature so that it's inline with
what it does.
Covered by existing tests.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
* page/FrameView.h:
2013-11-13 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Modifying RTCSessionDescription object construction to match the spec
https://bugs.webkit.org/show_bug.cgi?id=124212
Reviewed by Eric Carlson.
According to the spec the RTCSessionDescriptionInit parameter in RTCSessionDescription constructor is optional,
which must not be nullable. If the 'type' and/or 'sdp' keys are not present, the string object that stores
them in the RTCSessionDescription class, must be null in those cases. Also, if an object that is not a
Dictionary is passed as argument to the constructor, an exception must be raised.
Existing test was updated.
* GNUmakefile.list.am:
* Modules/mediastream/RTCSessionDescription.cpp:
(WebCore::RTCSessionDescription::create):
* Modules/mediastream/RTCSessionDescription.idl:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSRTCSessionDescriptionCustom.cpp: Added.
(WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription):
2013-11-13 Tim Horton <timothy_horton@apple.com>
Fix release build after r159224.
* WebCore.exp.in:
2013-11-13 Anders Carlsson <andersca@apple.com>
Remove ChromeClient::paintCustomOverhangArea
https://bugs.webkit.org/show_bug.cgi?id=124304
Reviewed by Beth Dakin.
This function always returns false now; get rid of it.
* page/Chrome.cpp:
* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::paintOverhangAreas):
2013-11-09 Martin Robinson <mrobinson@igalia.com>
[MathML] The double bar vertical delimiter does not stretch properly
https://bugs.webkit.org/show_bug.cgi?id=123543
Reviewed by Chris Fleizach.
* rendering/mathml/RenderMathMLOperator.cpp: Add stretching support for U+2225, which
is another version of the vertical bar.
2013-11-13 Simon Fraser <simon.fraser@apple.com>
ASSERTION FAILED: m_repaintRect == renderer().clippedOverflowRectForRepaint(renderer().containerForRepaint()) after r135816
https://bugs.webkit.org/show_bug.cgi?id=103432
Reviewed by Dave Hyatt.
RenderLayer caches repaint rects in m_repaintRect, and on updating layer
positions after scrolling, asserts that the cached rect is correct. However,
this assertion would sometimes fail if we were scrolling as a result of
doing adjustViewSize() in the middle of layout, because we haven't updated
layer positions post-layout yet.
Fix by having the poorly named FrameView::repaintFixedElementsAfterScrolling()
skip the layer updating if this FrameView is inside of adjusetViewSize() in
layout.
In order to know if we're inside view size adjusting, add a LayoutPhase
member to FrameView, replacing two existing bools that track laying out state.
Investigative work showed that there are many, many ways to re-enter FrameView::layout(),
which makes it hard (but desirable) to more assertions about state changes, but
indicated that saving and restoring the state (via TemporaryChange<LayoutPhase>)
was a good idea.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::updateCompositingLayersAfterStyleChange):
(WebCore::FrameView::layout):
(WebCore::FrameView::repaintFixedElementsAfterScrolling):
* page/FrameView.h:
2013-11-13 Myles C. Maxfield <mmaxfield@apple.com>
Delete unused TextPainter function
https://bugs.webkit.org/show_bug.cgi?id=124292
Reviewed by Tim Horton.
New tests are unnecessary since there is no behavior change
* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintText):
* rendering/TextPainter.h:
2013-11-13 Alexey Proskuryakov <ap@apple.com>
Check WebCrypto parameter types when casting
https://bugs.webkit.org/show_bug.cgi?id=124297
Reviewed by Sam Weinig.
Also changed existing toCryptoXXX functions to use TYPE_CASTS_BASE mechanism.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
And sure enough, there was a bug caught by the added checks.
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
* crypto/CryptoAlgorithmParameters.h:
(WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
(WebCore::CryptoAlgorithmParameters::parametersClass):
* crypto/CryptoKey.h:
* crypto/CryptoKeyData.h:
* crypto/CryptoKeySerialization.h:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyDataOctetSequence.h:
(WebCore::isCryptoKeyDataOctetSequence):
* crypto/keys/CryptoKeyDataRSAComponents.h:
(WebCore::isCryptoKeyDataRSAComponents):
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/keys/CryptoKeySerializationRaw.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/parameters/CryptoAlgorithmAesCbcParams.h:
* crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
* crypto/parameters/CryptoAlgorithmHmacParams.h:
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
* crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h:
* crypto/parameters/CryptoAlgorithmRsaSsaParams.h:
2013-11-13 Alexey Proskuryakov <ap@apple.com>
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html is failing on Maverics release bot
https://bugs.webkit.org/show_bug.cgi?id=124280
Reviewed by Anders Carlsson.
* crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
Don't be a muppet, initialize your variables.
2013-11-12 Jer Noble <jer.noble@apple.com>
Add support for HTMLMediaElement.fastSeek()
https://bugs.webkit.org/show_bug.cgi?id=124262
Reviewed by Eric Carlson.
Test: media/video-fast-seek.html
Add the fastSeek() method to HTMLMediaElement, and use fastSeek() in
the JavaScript media controls.
Add the new fastSeek() method:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::fastSeek): Call seekWithTolerance.
(HTMLMediaElement::seek): Call seekWithTolerance with 0 tolerance.
(HTMLMediaElement::seekWithTolerance): Renamed from seek().
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
Add seekWithTolerance() to MediaPlayer:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::seekWithTolerance): Pass to MediaPlayerPrivate.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Default implementation which
calls seek().
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seek): Call seekWithTolerance with 0 tolerance.
(WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Renamed from seek().
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Take tolerance parameters.
Use the new fastSeek() method while actively scrubbing.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): Add mouse up and down handlers.
(Controller.prototype.handleTimeUpdate): Only update the timeline when not scrubbing.
(Controller.prototype.handleTimelineChange): Use fastSeek().
(Controller.prototype.handleTimelineMouseDown): Start scrubbing.
(Controller.prototype.handleTimelineMouseUp): Stop scrubbing.
2013-11-13 Andreas Kling <akling@apple.com>
Generate casting helpers for scrolling tree classes.
<https://webkit.org/b/124286>
Added SCROLLING_STATE_NODE_TYPE_CASTS and used it to replace the
hand-written toFoo() casts for ScrollingStateNode subclasses.
Reviewed by Anders Carlsson.
2013-11-13 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Determining if a line is inside of a shape should only happen in one place
https://bugs.webkit.org/show_bug.cgi?id=121708
Reviewed by Andreas Kling.
The ShapeInfo::lineOverlapsShapeBounds() methods now delegate to the Shape object. The
logic for the Shape overlap test is now the same for ShapeInsideInfo and ShapeOutsideInfo.
No new tests, this is just a refactoring of existing code.
* rendering/shapes/Shape.h:
(WebCore::Shape::lineOverlapsShapeMarginBounds): Apply lineOverlapsLayoutRect() to the shape-margin bounds LayoutRect.
(WebCore::Shape::lineOverlapsShapePaddingBounds): Apply lineOverlapsLayoutRect() to the shape-padding bounds LayoutRect.
(WebCore::Shape::lineOverlapsLayoutRect): The common code for checking if a line and a LayoutRect overlap.
* rendering/shapes/ShapeInsideInfo.h: Use lineOverlapsShapePaddingBounds() for lineOverlapShapeBounds().
* rendering/shapes/ShapeOutsideInfo.h: Use lineOverlapsShapeMarginBounds() for lineOverlapShapeBounds().
2013-11-13 Jochen Eisinger <jochen@chromium.org>
Restrict UserGestureIndicator to main thread
https://bugs.webkit.org/show_bug.cgi?id=124277
Reviewed by Andreas Kling.
Certain classes that interact with UserGestureIndicators, e.g.
the DOMTimer, can also live on worker threads. Since a
background thread cannot possible get a user gesture in the
first place, and to avoid races, we turn a UserGestureIndicator
on a background thread into a no-op.
* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator):
(WebCore::UserGestureIndicator::~UserGestureIndicator):
(WebCore::UserGestureIndicator::processingUserGesture):
* dom/UserGestureIndicator.h:
2013-11-13 Antti Koivisto <antti@apple.com>
Factor simple line creation loop to function
https://bugs.webkit.org/show_bug.cgi?id=124279
Reviewed by Andreas Kling.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::Style::Style):
Capture style that affects line layout to a struct.
(WebCore::SimpleLineLayout::textWidth):
(WebCore::SimpleLineLayout::measureWord):
(WebCore::SimpleLineLayout::createLineRuns):
Factor the line loop here.
(WebCore::SimpleLineLayout::createTextRuns):
2013-11-12 Antti Koivisto <antti@apple.com>
Support overflow-wrap:break-word on simple line path
https://bugs.webkit.org/show_bug.cgi?id=124206
Reviewed by Andreas Kling.
Pure text documents are rendered with break-word. It is also common in discussion board type sites.
This also makes many <textarea>'s rendered using the simple line path.
Tests: fast/forms/basic-textareas-quirks-simple-lines.html
fast/forms/linebox-overflow-in-textarea-padding-simple-lines.html
fast/forms/negativeLineHeight-simple-lines.html
fast/forms/textAreaLineHeight-simple-lines.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange):
(WebCore::RenderBlock::markShapeInsideDescendantsForLayout):
Invalidate the cached line layout mode on shape-inside style change.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::createTextRuns):
2013-11-13 Andreas Kling <akling@apple.com>
Turn some not-so-rare ElementRareData bits into Node flags.
<https://webkit.org/b/124275>
The following 4 bits seem to be the most commonly set:
- childrenAffectedByHover()
- childrenAffectedByFirstChildRules()
- childrenAffectedByLastChildRules()
- childrenAffectedByDirectAdjacentRules()
Turning them into Node flags means we don't have to allocate full
ElementRareData object in many cases. I also took this opportunity
to make Node's flag twiddling functions available to subclasses.
1.38 MB progression on HTML5-8266 locally.
Reviewed by Antti Koivisto.
2013-11-13 Tibor Meszaros <mtibor@inf.u-szeged.hu>
Cleanup the build from unused parameters in WebCore
https://bugs.webkit.org/show_bug.cgi?id=124199.
Reviewed by Csaba Osztrogonác.
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::cachedOrPendingImage):
* dom/Document.cpp:
(WebCore::Document::scriptedAnimationControllerSetThrottled):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerBlobURL):
* html/HTMLAnchorElement.cpp:
(WebCore::shouldProhibitLinks):
* html/parser/XSSAuditor.cpp:
(WebCore::isSemicolonSeparatedAttribute):
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveData):
(WebCore::DocumentThreadableLoader::didFail):
(WebCore::DocumentThreadableLoader::preflightFailure):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::animate):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate):
* platform/graphics/WidthIterator.cpp:
(WebCore::applyFontTransforms):
* rendering/RenderView.cpp:
(WebCore::RenderView::setIsInWindow):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresLayerRepaint):
(WebCore::RenderStyle::changeRequiresRecompositeLayer):
* testing/Internals.cpp:
(WebCore::Internals::setHeaderHeight):
(WebCore::Internals::setCaptionsStyleSheetOverride):
2013-11-13 Andreas Kling <akling@apple.com>
Refalize CSSCursorImageValue.
<https://webkit.org/b/124272>
Make CSSCursorImageValue constructor return a PassRef, and have it
take the image CSSValue as a PassRef (and store it internally in a
Ref<CSSValue>.)
Had to add a Ref version of compareCSSValuePtr() to make this work.
Reviewed by Antti Koivisto.
2013-11-13 Andreas Kling <akling@apple.com>
RenderTableSection: Cell structures don't need allocation padding.
<https://webkit.org/b/124263>
The row structure data gets shrunk-to-fit once we get to layout,
but per-row cell structures get no such luxury. Fortuntely we know
ahead of time how many cells a row needs to accomodate, so we can
just use Vector::resizeToFit() instead of Vector::grow().
1.25 MB progression on HTML5-8266 locally.
Reviewed by Antti Koivisto.
2013-11-13 Andreas Kling <akling@apple.com>
Avoid unnecessarily padding the FontDescription families vector.
<https://webkit.org/b/124267>
Use a bit of reserveInitialCapacity+uncheckedAppend grease to avoid
jumping all the way to capacity=16 when a style has more than just
a single font-family in it.
130 kB progression on HTML5-8266 locally.
Reviewed by Antti Koivisto.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontFamily::applyValue):
2013-11-13 Andreas Kling <akling@apple.com>
Make remaining CSSPrimitiveValue constructors return PassRef.
<https://webkit.org/b/124270>
..and same with the corresponding CSSValuePool functions.
Reviewed by Antti Koivisto.
2013-11-13 Alexey Proskuryakov <ap@apple.com>
Implement key generation and JWK import for RSASSA-PKCS1-v1_5
https://bugs.webkit.org/show_bug.cgi?id=124236
Reviewed by Sam Weinig.
Tests: crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html
* WebCore.xcodeproj/project.pbxproj: Added new files.
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
(WebCore::JSCryptoAlgorithmBuilder::add):
* bindings/js/JSCryptoAlgorithmBuilder.h:
* crypto/CryptoAlgorithmDescriptionBuilder.h:
Added a way to add an Uint8Array, as needed for RSA key.algorithm.publicExponent.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesCbcParams): Removed unneeded JSC prefixes.
(WebCore::createAesKeyGenParams): Ditto.
(WebCore::createHmacParams): Ditto.
(WebCore::createHmacKeyParams): Ditto.
(WebCore::createRsaKeyGenParams): Added.
(WebCore::createRsaSsaKeyParams): Added. WebCrypto currently doesn't specify any
parameters for importKey, so the structure remains blank (unlike with JWK).
(WebCore::createRsaSsaParams): Added (currently unused, will be sued for sign/verify soon).
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Removed unneeded JSC prefixes.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Added support for RSAES_PKCS1_v1_5.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Removed unneeded JSC prefixes.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Added support for RSAES_PKCS1_v1_5.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Removed unneeded JSC prefixes.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey): Ditto.
* bindings/js/JSCryptoKeySerializationJWK.h:
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::getJSArrayFromJSON): Added.
(WebCore::getBigIntegerVectorFromJSON): Added.
(WebCore::createRSASSAKeyParameters): Create parameters for key import. The key
will remember which algorithm it's allowed to be used with.
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): Added support for
RS256...RS512 (tha is, RSAES_PKCS1_v1_5 with SHA-256...SHA-512).
(WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence): Split out of keyData().
(WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Added code to read
RSA key components from JWK.
(WebCore::JSCryptoKeySerializationJWK::keyData): Call one of the above functions.
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Added.
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
Placeholders.
* crypto/CryptoKey.h: (WebCore::CryptoKeyClass): Added RSA key class for poor man's RTTI.
* crypto/CryptoKeyData.h: (WebCore::CryptoKeyData::FormatRSAComponents): Added RSAComponents
for poor man's RTTI.
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/keys/CryptoKeyAES.h:
(WebCore::isCryptoKeyAES):
(WebCore::toCryptoKeyAES):
* crypto/keys/CryptoKeyDataOctetSequence.h:
(WebCore::toCryptoKeyDataOctetSequence):
* crypto/keys/CryptoKeyHMAC.h:
(WebCore::isCryptoKeyHMAC):
(WebCore::toCryptoKeyHMAC):
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
Switched from "as" functions to "is" and "to" ones, as that's more idiomatic.
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Added.
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Added.
Glue code for importKey/generateKey for now.
* crypto/keys/CryptoKeyDataRSAComponents.cpp: Added.
(WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents):
(WebCore::CryptoKeyDataRSAComponents::~CryptoKeyDataRSAComponents):
* crypto/keys/CryptoKeyDataRSAComponents.h: Added.
(WebCore::toCryptoKeyDataRSAComponents):
Added a structure to hold RSA key components, extracted from JWK or another format.
* crypto/keys/CryptoKeyRSA.h: Added.
* crypto/mac/CryptoKeyRSAMac.cpp: Added.
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
Register RSASSA_PKCS1_v1_5.
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added a constructor to make
sure that hasLength is never left uninitialized, even when reading formats that
don't contain a length.
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Added.
* crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Added.
* crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Added.
Added parameter structures that are needed for RSASSA_PKCS1_v1_5.
2013-11-12 Alexey Proskuryakov <ap@apple.com>
Disable WebCrypto on Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=124261
Rubber-stamped by Sam Weinig.
* Configurations/FeatureDefines.xcconfig:
2013-11-12 Zan Dobersek <zdobersek@igalia.com>
Manage XMLHttpRequestUpload, XSLImportRule, XMLErrors, XML pending callback classes through std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=124224
Reviewed by Anders Carlsson.
Use std::unique_ptr to handle objects of various XML classes that were previously managed by OwnPtr.
This removes usage of OwnPtr and PassOwnPtr under Source/WebCore/xml/.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::upload):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequestUpload.h:
* xml/XSLImportRule.h:
* xml/XSLStyleSheet.h:
* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::loadChildSheet):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::handleError):
* xml/parser/XMLDocumentParser.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::PendingCallbacks::PendingCallbacks):
(WebCore::PendingCallbacks::appendStartElementNSCallback):
(WebCore::PendingCallbacks::appendEndElementNSCallback):
(WebCore::PendingCallbacks::appendCharactersCallback):
(WebCore::PendingCallbacks::appendProcessingInstructionCallback):
(WebCore::PendingCallbacks::appendCDATABlockCallback):
(WebCore::PendingCallbacks::appendCommentCallback):
(WebCore::PendingCallbacks::appendInternalSubsetCallback):
(WebCore::PendingCallbacks::appendErrorCallback):
(WebCore::PendingCallbacks::callAndRemoveFirstCallback):
(WebCore::XMLDocumentParser::XMLDocumentParser):
2013-11-12 Brady Eidson <beidson@apple.com>
Move basic IDBBackingStoreTransaction operations to IDBServerConnection
https://bugs.webkit.org/show_bug.cgi?id=124244
Reviewed by Tim Horton (and unofficially Anders Carlsson).
This patch:
- Makes IDBBackingStore the owner of an IDBBackingStoreTransaction.
- Adds the integer transaction ID to IDBBackingStoreTransaction for reference.
- Removes IDBTransactionBackend’s reliance on IDBBackingStoreTransaction by moving
necessary methods to IDBServerConnection.
- Renames the IDBTransactionBackend::backingStoreTransaction() accessor to
deprecatedBackingStoreTransaction to make it clear it’s on the way out.
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::setIndexKeys):
* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::IDBTransactionBackend):
(WebCore::IDBTransactionBackend::~IDBTransactionBackend):
(WebCore::IDBTransactionBackend::deprecatedBackingStoreTransaction):
(WebCore::IDBTransactionBackend::scheduleTask):
(WebCore::IDBTransactionBackend::abort):
(WebCore::IDBTransactionBackend::commit):
(WebCore::IDBTransactionBackend::taskTimerFired):
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::CreateObjectStoreOperation::perform):
(WebCore::CreateIndexOperation::perform):
(WebCore::DeleteIndexOperation::perform):
(WebCore::GetOperation::perform):
(WebCore::PutOperation::perform):
(WebCore::OpenCursorOperation::perform):
(WebCore::CountOperation::perform):
(WebCore::DeleteRangeOperation::perform):
(WebCore::ClearOperation::perform):
(WebCore::DeleteObjectStoreOperation::perform):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
(WebCore::IDBBackingStoreLevelDB::generateKey):
(WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
(WebCore::IDBBackingStoreLevelDB::establishBackingStoreTransaction):
(WebCore::IDBBackingStoreLevelDB::deprecatedBackingStoreTransaction):
(WebCore::IDBBackingStoreLevelDB::removeBackingStoreTransaction):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp:
(WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
(WebCore::IDBBackingStoreTransactionLevelDB::~IDBBackingStoreTransactionLevelDB):
(WebCore::IDBBackingStoreTransactionLevelDB::resetTransaction):
* Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
(WebCore::IDBServerConnectionLevelDB::deprecatedBackingStoreTransaction):
(WebCore::IDBServerConnectionLevelDB::openTransaction):
(WebCore::IDBServerConnectionLevelDB::beginTransaction):
(WebCore::IDBServerConnectionLevelDB::commitTransaction):
(WebCore::IDBServerConnectionLevelDB::resetTransaction):
(WebCore::IDBServerConnectionLevelDB::rollbackTransaction):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2013-11-12 Andy Estes <aestes@apple.com>
Fix the Mountain Lion build after r159171.
* platform/mac/HTMLConverter.mm:
(_dateForString): +[NSCalendar calendarWithIdentifier:] only exists on
10.9. Use -[NSCalendar initWithIdentifier:] instead.
2013-11-12 Andy Estes <aestes@apple.com>
[Mac] Fix some deprecation warnings
https://bugs.webkit.org/show_bug.cgi?id=124252
Reviewed by Mark Rowe.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Use CFPropertyListCreateWithData()
instead of CFPropertyListCreateFromXMLData().
(WebCore::LegacyWebArchive::rawDataRepresentation): Use
CFPropertyListWrite() instead of CFPropertyListWriteToStream().
* platform/mac/HTMLConverter.mm:
(_dateForString): Rewrite this method in terms of NSDateComponents and
NSCalendar instead of using CFGregorianDate.
2013-11-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r159160, r159161, and r159164.
http://trac.webkit.org/changeset/159160
http://trac.webkit.org/changeset/159161
http://trac.webkit.org/changeset/159164
https://bugs.webkit.org/show_bug.cgi?id=124253
Too many errors (make fewer) (Requested by ap on #webkit).
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
* bindings/js/JSCryptoAlgorithmBuilder.h:
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesCbcParams):
(WebCore::createAesKeyGenParams):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey):
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
(WebCore::JSCryptoKeySerializationJWK::keyData):
* bindings/js/JSCryptoKeySerializationJWK.h:
* crypto/CryptoAlgorithmDescriptionBuilder.h:
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Removed.
* crypto/CryptoKey.h:
(WebCore::ENUM_CLASS):
* crypto/CryptoKeyData.h:
(WebCore::CryptoKeyData::ENUM_CLASS):
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Removed.
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Removed.
* crypto/keys/CryptoKeyAES.h:
(WebCore::asCryptoKeyAES):
* crypto/keys/CryptoKeyDataOctetSequence.h:
(WebCore::asCryptoKeyDataOctetSequence):
* crypto/keys/CryptoKeyDataRSAComponents.cpp: Removed.
* crypto/keys/CryptoKeyDataRSAComponents.h: Removed.
* crypto/keys/CryptoKeyHMAC.h:
(WebCore::asCryptoKeyHMAC):
* crypto/keys/CryptoKeyRSA.h: Removed.
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
* crypto/mac/CryptoKeyRSAMac.cpp: Removed.
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Removed.
* crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed.
* crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Removed.
2013-11-12 Bem Jones-Bey <bjonesbe@adobe.com>
Make the placed floats tree use LayoutUnit instead of int
https://bugs.webkit.org/show_bug.cgi?id=124207
Reviewed by Alexandru Chiculita.
The dimensions of floats are in LayoutUnits, so it doesn't make sense
to be converting to ints for use in the placed floats tree.
Also add missed "explicit" to single argument FloatingObjects
constructor.
No new tests, no behavior change.
* rendering/FloatingObjects.cpp:
(WebCore::rangesIntersect):
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::ComputeFloatOffsetAdapter::lowValue):
(WebCore::ComputeFloatOffsetAdapter::highValue):
(WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
(WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
(WebCore::FindNextFloatLogicalBottomAdapter::highValue):
* rendering/FloatingObjects.h:
* rendering/RenderFlowThread.h:
2013-11-12 Alexey Proskuryakov <ap@apple.com>
Implement key generation and JWK import for RSASSA-PKCS1-v1_5
https://bugs.webkit.org/show_bug.cgi?id=124236
Build fix.
* crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
ifdef out some code on Mountain Lion. Bug 124249 track fixing this.
2013-11-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Extract InspectorAgentRegistry from InspectorBaseAgent
https://bugs.webkit.org/show_bug.cgi?id=124190
Reviewed by Timothy Hatcher.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAgentRegistry.cpp: Added.
(WebCore::InspectorAgentRegistry::append):
(WebCore::InspectorAgentRegistry::setFrontend):
(WebCore::InspectorAgentRegistry::clearFrontend):
(WebCore::InspectorAgentRegistry::registerInDispatcher):
(WebCore::InspectorAgentRegistry::discardAgents):
* inspector/InspectorAgentRegistry.h: Added.
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorBaseAgent.cpp: Removed.
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
(WebCore::InspectorBaseAgentInterface::~InspectorBaseAgentInterface):
* inspector/InspectorController.h:
* inspector/InspectorMemoryAgent.h:
* inspector/WorkerInspectorController.h:
2013-11-12 Alexey Proskuryakov <ap@apple.com>
Implement key generation and JWK import for RSASSA-PKCS1-v1_5
https://bugs.webkit.org/show_bug.cgi?id=124236
Release build fix.
* bindings/js/JSCryptoAlgorithmBuilder.cpp: Include TypedArrayInlines.h
2013-11-12 Alexey Proskuryakov <ap@apple.com>
Implement key generation and JWK import for RSASSA-PKCS1-v1_5
https://bugs.webkit.org/show_bug.cgi?id=124236
Reviewed by Sam Weinig.
Tests: crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html
* WebCore.xcodeproj/project.pbxproj: Added new files.
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
(WebCore::JSCryptoAlgorithmBuilder::add):
* bindings/js/JSCryptoAlgorithmBuilder.h:
* crypto/CryptoAlgorithmDescriptionBuilder.h:
Added a way to add an Uint8Array, as needed for RSA key.algorithm.publicExponent.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesCbcParams): Removed unneeded JSC prefixes.
(WebCore::createAesKeyGenParams): Ditto.
(WebCore::createHmacParams): Ditto.
(WebCore::createHmacKeyParams): Ditto.
(WebCore::createRsaKeyGenParams): Added.
(WebCore::createRsaSsaKeyParams): Added. WebCrypto currently doesn't specify any
parameters for importKey, so the structure remains blank (unlike with JWK).
(WebCore::createRsaSsaParams): Added (currently unused, will be sued for sign/verify soon).
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Removed unneeded JSC prefixes.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Added support for RSAES_PKCS1_v1_5.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Removed unneeded JSC prefixes.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Added support for RSAES_PKCS1_v1_5.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Removed unneeded JSC prefixes.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey): Ditto.
* bindings/js/JSCryptoKeySerializationJWK.h:
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::getJSArrayFromJSON): Added.
(WebCore::getBigIntegerVectorFromJSON): Added.
(WebCore::createRSASSAKeyParameters): Create parameters for key import. The key
will remember which algorithm it's allowed to be used with.
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): Added support for
RS256...RS512 (tha is, RSAES_PKCS1_v1_5 with SHA-256...SHA-512).
(WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence): Split out of keyData().
(WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Added code to read
RSA key components from JWK.
(WebCore::JSCryptoKeySerializationJWK::keyData): Call one of the above functions.
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Added.
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
Placeholders.
* crypto/CryptoKey.h: (WebCore::CryptoKeyClass): Added RSA key class for poor man's RTTI.
* crypto/CryptoKeyData.h: (WebCore::CryptoKeyData::FormatRSAComponents): Added RSAComponents
for poor man's RTTI.
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/keys/CryptoKeyAES.h:
(WebCore::isCryptoKeyAES):
(WebCore::toCryptoKeyAES):
* crypto/keys/CryptoKeyDataOctetSequence.h:
(WebCore::toCryptoKeyDataOctetSequence):
* crypto/keys/CryptoKeyHMAC.h:
(WebCore::isCryptoKeyHMAC):
(WebCore::toCryptoKeyHMAC):
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
Switched from "as" functions to "is" and "to" ones, as that's more idiomatic.
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Added.
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Added.
Glue code for importKey/generateKey for now.
* crypto/keys/CryptoKeyDataRSAComponents.cpp: Added.
(WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents):
(WebCore::CryptoKeyDataRSAComponents::~CryptoKeyDataRSAComponents):
* crypto/keys/CryptoKeyDataRSAComponents.h: Added.
(WebCore::toCryptoKeyDataRSAComponents):
Added a structure to hold RSA key components, extracted from JWK or another format.
* crypto/keys/CryptoKeyRSA.h: Added.
* crypto/mac/CryptoKeyRSAMac.cpp: Added.
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
Register RSASSA_PKCS1_v1_5.
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added a constructor to make
sure that hasLength is never left uninitialized, even when reading formats that
don't contain a length.
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Added.
* crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Added.
* crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Added.
Added parameter structures that are needed for RSASSA_PKCS1_v1_5.
2013-11-12 Bem Jones-Bey <bjonesbe@adobe.com>
Move ValueToString out to its own header file to remove duplication
https://bugs.webkit.org/show_bug.cgi?id=124237
Reviewed by Alexandru Chiculita.
The ValueToString struct is used in many places for debugging. Move it
out to its own header file to remove all the duplicated definitions
and make it possible for the specializations to be placed in the
header files with the implementation of the classes they print.
No new tests, no behavior change.
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.h:
* platform/LayoutUnit.h:
* platform/PODInterval.h:
* platform/PODIntervalTree.h:
* platform/PODRedBlackTree.h:
* platform/ValueToString.h: Added.
* platform/graphics/FloatPolygon.h:
* rendering/FloatingObjects.cpp:
* rendering/FloatingObjects.h:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.h:
* rendering/RenderFlowThread.h:
2013-11-11 David Hyatt <hyatt@apple.com>
Make RenderBlockRareData be in a hashtable instead of being a member variable.
https://bugs.webkit.org/show_bug.cgi?id=124056
Reviewed by Anders Carlsson.
Right now RenderBlock has 4 bytes taken up by a m_rareData member that is almost
never allocated. This is better off in a separate hash, so that RenderBlock can
get 4 bytes back.
Since RenderBlockFlow's rare data member was recently removed and folded into
RenderBlock, we need to undo that change and put the rare data member back in
RenderBlockFlow. RenderBlockFlowRareData inheriting from RenderBlockRareData
was not a good idea anyway, since RenderBlockFlows also very rarely need the
RenderBlockRareData members, and were thus paying a heavier cost when the rare
data was created than was necessary.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlockRareData::RenderBlockRareData):
(WebCore::RenderBlock::~RenderBlock):
(WebCore::RenderBlock::hasRareData):
(WebCore::getRareData):
(WebCore::ensureRareData):
(WebCore::RenderBlock::ensureShapeInsideInfo):
(WebCore::RenderBlock::shapeInsideInfo):
(WebCore::RenderBlock::setShapeInsideInfo):
(WebCore::RenderBlock::paginationStrut):
(WebCore::RenderBlock::pageLogicalOffset):
(WebCore::RenderBlock::setPaginationStrut):
(WebCore::RenderBlock::setPageLogicalOffset):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::setMaxMarginBeforeValues):
(WebCore::RenderBlockFlow::setMaxMarginAfterValues):
(WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
(WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
(WebCore::RenderBlockFlow::mustDiscardMarginBefore):
(WebCore::RenderBlockFlow::mustDiscardMarginAfter):
(WebCore::RenderBlockFlow::setBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::setDidBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::clearDidBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
(WebCore::RenderBlockFlow::ensureRareBlockFlowData):
(WebCore::RenderBlockFlow::materializeRareBlockFlowData):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::shouldBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::lineBreakToAvoidWidow):
(WebCore::RenderBlockFlow::didBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::lineGridBox):
(WebCore::RenderBlockFlow::setLineGridBox):
(WebCore::RenderBlockFlow::renderNamedFlowFragment):
(WebCore::RenderBlockFlow::maxPositiveMarginBefore):
(WebCore::RenderBlockFlow::maxNegativeMarginBefore):
(WebCore::RenderBlockFlow::maxPositiveMarginAfter):
(WebCore::RenderBlockFlow::maxNegativeMarginAfter):
(WebCore::RenderBlockFlow::initMaxMarginValues):
(WebCore::RenderBlockFlow::hasRareBlockFlowData):
(WebCore::RenderBlockFlow::rareBlockFlowData):
2013-11-12 Alex Christensen <achristensen@webkit.org>
Build GStreamer files on Windows.
https://bugs.webkit.org/show_bug.cgi?id=124180
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
Include gstreamer files in WinCairo build.
2013-11-12 Brady Eidson <beidson@apple.com>
Introduce IDBServerConnection (and start moving things to it).
https://bugs.webkit.org/show_bug.cgi?id=124193
Reviewed by Alexey Proskuryakov.
IDBServerConnection will be a purely asynchronous interface for database connections, transactions, and cursors.
Its interface will be 100% asynchronous and callback based - Perfect for an IPC divide.
Eventually none of the IDB<Foo>Backend classes will need IDBBackingStore<Foo> classes at all,
and they’ll all use IDBServerConnection directly.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBServerConnection.h: Added.
(WebCore::IDBServerConnection::~IDBServerConnection):
Concrete implementation that - for now - wraps an IDBBackingStoreLevelDB:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Added.
(WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
(WebCore::IDBServerConnectionLevelDB::deprecatedBackingStore):
(WebCore::IDBServerConnectionLevelDB::isClosed):
(WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
(WebCore::IDBServerConnectionLevelDB::deleteDatabase):
(WebCore::IDBServerConnectionLevelDB::close):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Added.
LevelDB created databases get LevelDB server connections:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
(WebCore::IDBFactoryBackendLevelDB::open):
Replace most uses of IDBBackingStore with server connection:
* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::create):
(WebCore::IDBDatabaseBackend::IDBDatabaseBackend):
(WebCore::IDBDatabaseBackend::openInternalAsync):
(WebCore::IDBDatabaseBackend::setIndexKeys):
(WebCore::IDBDatabaseBackend::openConnectionInternal):
(WebCore::IDBDatabaseBackend::deleteDatabaseAsync):
(WebCore::IDBDatabaseBackend::close):
* Modules/indexeddb/IDBDatabaseBackend.h:
(WebCore::IDBDatabaseBackend::serverConnection):
Change all the operations to access their DatabaseBackend’s server connection instead
if hanging on to a backing store directly:
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::IDBTransactionBackend):
(WebCore::IDBTransactionBackend::scheduleCreateObjectStoreOperation):
(WebCore::IDBTransactionBackend::scheduleDeleteObjectStoreOperation):
(WebCore::IDBTransactionBackend::scheduleCreateIndexOperation):
(WebCore::IDBTransactionBackend::scheduleDeleteIndexOperation):
(WebCore::IDBTransactionBackend::scheduleGetOperation):
(WebCore::IDBTransactionBackend::schedulePutOperation):
(WebCore::IDBTransactionBackend::scheduleOpenCursorOperation):
(WebCore::IDBTransactionBackend::scheduleCountOperation):
(WebCore::IDBTransactionBackend::scheduleDeleteRangeOperation):
(WebCore::IDBTransactionBackend::scheduleClearOperation):
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::CreateObjectStoreOperation::perform):
(WebCore::CreateIndexOperation::perform):
(WebCore::DeleteIndexOperation::perform):
(WebCore::GetOperation::perform):
(WebCore::PutOperation::perform):
(WebCore::OpenCursorOperation::perform):
(WebCore::CountOperation::perform):
(WebCore::DeleteRangeOperation::perform):
(WebCore::ClearOperation::perform):
(WebCore::DeleteObjectStoreOperation::perform):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
* Modules/indexeddb/IDBTransactionBackendOperations.h:
(WebCore::CreateObjectStoreOperation::create):
(WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
(WebCore::DeleteObjectStoreOperation::create):
(WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
(WebCore::CreateIndexOperation::create):
(WebCore::CreateIndexOperation::CreateIndexOperation):
(WebCore::DeleteIndexOperation::create):
(WebCore::DeleteIndexOperation::DeleteIndexOperation):
(WebCore::GetOperation::create):
(WebCore::GetOperation::GetOperation):
(WebCore::PutOperation::create):
(WebCore::PutOperation::PutOperation):
(WebCore::OpenCursorOperation::create):
(WebCore::OpenCursorOperation::OpenCursorOperation):
(WebCore::CountOperation::create):
(WebCore::CountOperation::CountOperation):
(WebCore::DeleteRangeOperation::create):
(WebCore::DeleteRangeOperation::DeleteRangeOperation):
(WebCore::ClearOperation::create):
(WebCore::ClearOperation::ClearOperation):
* Modules/indexeddb/IDBTransactionCoordinator.h:
2013-11-12 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed gardening.
* WebCore.vcxproj/WebCore.vcxproj.filters: Correct filter file so that source
files show up in their proper directories in Visual Studio.
2013-11-12 Alex Christensen <achristensen@webkit.org>
[WinCairo] Preparation for ENABLE(VIDEO).
https://bugs.webkit.org/show_bug.cgi?id=57420
Reviewed by Martin Robinson.
* platform/FileSystem.h:
* platform/graphics/MediaPlayer.cpp:
* rendering/RenderMediaControls.cpp:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustSliderThumbSize):
Separated CG code from GStreamer code.
2013-11-12 Tibor Meszaros <mtibor@inf.u-szeged.hu>
Fix reported build warnings for GTK
https://bugs.webkit.org/show_bug.cgi?id=123439
Reviewed by Carlos Garcia Campos.
There was a void method, that has return value in it's documentation, so I removed it.
* bindings/gobject/WebKitDOMCustom.h:
2013-11-12 Zan Dobersek <zdobersek@igalia.com>
Manage StorageThread through std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=124197
Reviewed by Anders Carlsson.
New StorageThread objects are crafted through std::make_unique. This removes the need for the static
StorageThread::create() method but requires that the StorageThread constructor is made public.
* storage/StorageSyncManager.cpp:
(WebCore::StorageSyncManager::StorageSyncManager):
* storage/StorageSyncManager.h:
* storage/StorageThread.cpp:
* storage/StorageThread.h:
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::StorageTracker):
* storage/StorageTracker.h:
2013-11-12 Zan Dobersek <zdobersek@igalia.com>
Remove unnecessary PassOwnPtr.h header includes under Source/WebCore/fileapi
https://bugs.webkit.org/show_bug.cgi?id=124196
Reviewed by Anders Carlsson.
PassOwnPtr is not used anywhere under Source/WebCore/fileapi/, so PassOwnPtr.h inclusions can be removed.
* fileapi/Blob.h:
* fileapi/FileThread.h:
* fileapi/FileThreadTask.h:
2013-11-12 Antti Koivisto <antti@apple.com>
Text on simple lines sometimes paints one pixel off
https://bugs.webkit.org/show_bug.cgi?id=124200
Reviewed by Andreas Kling.
Test: fast/text/line-runs-simple-lines.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::adjustRunOffsets):
Don't round on run construction time.
(WebCore::SimpleLineLayout::createTextRuns):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
Instead round when generating rects.
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
Provide the baseline (used by painting) as unrounded FloatPoint.
2013-11-11 Andreas Kling <akling@apple.com>
Elements with class names automatically get unique ElementData.
<https://webkit.org/b/124184>
We were calling Element::ensureUniqueElementData() for all Elements
with a non-empty list of class names. Doing that on parser-fresh
Elements caused us to upgrade them to UniqueElementData despite not
needing it (ElementData::setClass() is a const function for caching
the "cooked" class and can be called on ShareableElementData.)
1.09 MB progression on HTML5 spec at <http://whatwg.org/c>
Reviewed by Antti Koivisto.
2013-11-12 Zan Dobersek <zdobersek@igalia.com>
JSC bindings generator should generate deletable JSC functions
https://bugs.webkit.org/show_bug.cgi?id=122422
Reviewed by Geoffrey Garen.
The JSC functions that the JSC bindings generator generates should be deletable to conform to
the WebIDL specification, which instructs that the WebIDL operations must be configurable (which
translates to the JSC functions being deletable).
The generator will still produce a non-deletable JSC function for operations under almost all
Web-facing interfaces since they're annotated with the OperationsNotDeletable attribute. The
exception here is the Node interface that is having the attribute removed, with the provided
test case testing that all the functions on the Node prototype object are writable, enumerable
and configurable. This behavior conforms to the WebIDL specification and the behaviors of IE
and Firefox. Chrome at the moment still provides non-configurable functions.
Test: fast/dom/webidl-operations-on-node-prototype.html
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Enforce the non-deletable behavior of the JSC function if either the
operation's interface is annotated with the OperationsNotDeletable attribute or the operation itself
is annotated with the NotDeletable attribute.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Update the JSC generator test baselines.
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
* bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
* bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
* bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
* dom/Node.idl: Remove the OperationsNotDeletable attribute.
2013-11-11 Brady Eidson <beidson@apple.com>
Make IDBTransaction tasks asynchronous
https://bugs.webkit.org/show_bug.cgi?id=124183
Reviewed by Tim Horton.
This is an almost zero-change in behavior.
The one thing that is different is that previously, IDBTransactionBackends would synchronously
run through their entire set of IDBOperation’s without ever returning control to the runloop.
Now, they start one task and then wait for its completion to schedule the start of the next task.
Change IDBOperation’s perform() to take a completion handler so it can be asynchronous.
Add an IDBSynchronousOperation class to handle "Abort" tasks, which never need to perform i/o
and therefore can be entirely synchronous.
* Modules/indexeddb/IDBOperation.h:
(WebCore::IDBSynchronousOperation::~IDBSynchronousOperation):
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
(WebCore::IDBTransactionBackend::abort):
(WebCore::IDBTransactionBackend::taskTimerFired): Instead of running through the entire set of tasks,
perform a single task asynchronously. The completion handler for the task will reset the task timer
to asynchronously start the next task.
* Modules/indexeddb/IDBTransactionBackend.h:
(WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
Update all operations to take completion handlers.
For now, perform things synchronously like before, calling the completion handler when complete.
* Modules/indexeddb/IDBCursorBackend.cpp:
(WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called perform() exits.
(WebCore::CallOnDestruct::~CallOnDestruct):
(WebCore::IDBCursorBackend::CursorIterationOperation::create):
(WebCore::IDBCursorBackend::CursorAdvanceOperation::create):
(WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::create):
(WebCore::IDBCursorBackend::CursorAdvanceOperation::perform):
(WebCore::IDBCursorBackend::CursorIterationOperation::perform):
(WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::perform):
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called when perform() exits.
(WebCore::CallOnDestruct::~CallOnDestruct):
(WebCore::CreateObjectStoreOperation::perform):
(WebCore::CreateIndexOperation::perform):
(WebCore::DeleteIndexOperation::perform):
(WebCore::GetOperation::perform):
(WebCore::PutOperation::perform):
(WebCore::SetIndexesReadyOperation::perform):
(WebCore::OpenCursorOperation::perform):
(WebCore::CountOperation::perform):
(WebCore::DeleteRangeOperation::perform):
(WebCore::ClearOperation::perform):
(WebCore::DeleteObjectStoreOperation::perform):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
* Modules/indexeddb/IDBTransactionBackendOperations.h:
(WebCore::CreateObjectStoreOperation::create):
(WebCore::DeleteObjectStoreOperation::create):
(WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
(WebCore::CreateObjectStoreAbortOperation::create):
(WebCore::DeleteObjectStoreAbortOperation::create):
(WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
(WebCore::CreateIndexOperation::create):
(WebCore::CreateIndexAbortOperation::create):
(WebCore::DeleteIndexOperation::create):
(WebCore::DeleteIndexAbortOperation::create):
(WebCore::GetOperation::create):
(WebCore::PutOperation::create):
(WebCore::SetIndexesReadyOperation::create):
(WebCore::OpenCursorOperation::create):
(WebCore::CountOperation::create):
(WebCore::DeleteRangeOperation::create):
(WebCore::ClearOperation::create):
2013-11-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove some unused generated code
https://bugs.webkit.org/show_bug.cgi?id=124179
Reviewed by Timothy Hatcher.
* inspector/CodeGeneratorInspectorStrings.py:
2013-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Clean up static_cast<Element*> usage
https://bugs.webkit.org/show_bug.cgi?id=124133
Reviewed by Andreas Kling.
We need to use toFoo cast function instead of static_cast<>. Though there is toElement(),
static_cast<Element*> is still being used.
No new tests, no behavior changes.
* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap):
* dom/ElementTraversal.h:
(WebCore::::lastWithinTemplate):
(WebCore::::nextTemplate):
(WebCore::::previousTemplate):
2013-11-11 Anders Carlsson <andersca@apple.com>
FrameFilter can just be an std::function instead
https://bugs.webkit.org/show_bug.cgi?id=124176
Reviewed by Tim Horton.
* WebCore.exp.in:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/archive/cf/LegacyWebArchive.h:
2013-11-11 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r155660): box-shadow causes overlay scrollbars to be in the wrong position when element is composited (85647)
https://bugs.webkit.org/show_bug.cgi?id=124090
Reviewed by Beth Dakin.
After r155660 we did fewer layouts, so were left with overlay scrollbars in the
wrong locations because nothing would update them after RenderLayerBacking
computed a new offsetFromRenderer.
First part of the fix is to wean positionOverflowControlsLayers() off of
an absolute offset from the root. Do this by not using Widget::frameRect()
to position the layers, but instead RenderLayer::rectFor{Horizontal|Vertical}Scrollbar
which is what we used to position the scrollbars in the first place.
Second part of the fix is to call positionOverflowControlsLayers() from
RenderLayerBacking::updateGraphicsLayerGeometry() if the offsetFromRenderer
changed.
Test: compositing/overflow/overflow-scrollbar-layer-positions.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::positionOverflowControls):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
* rendering/RenderLayerBacking.h:
2013-11-11 Brent Fulgham <bfulgham@apple.com>
[Win] m_isCompositeFontReference is uninitialized.
https://bugs.webkit.org/show_bug.cgi?id=124170
Reviewed by Tim Horton.
Initialize value to false, as is done in the other constructors for this data type.
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
2013-11-11 Myles C. Maxfield <mmaxfield@apple.com>
[Mac] Characters too close together in complex Arabic text
https://bugs.webkit.org/show_bug.cgi?id=124057
Reviewed by Darin Adler.
We weren't updating our total width variable with run's initial
advance information, leading to widths that were too narrow.
In addition, while initial advances for runs that aren't the first
run are accounted for by baking in the initial advances into the
previous character's advance, the initial advance for the first run
has to be accounted for in ComplexTextController::offsetForPosition.
Test: fast/text/complex-grapheme-cluster-with-initial-advance.html
Test: fast/text/selection-in-initial-advance-region.html
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances): Update
total width variable
(WebCore::ComplexTextController::offsetOfPosition): Account for
the first run's initial advance.
2013-11-11 Brady Eidson <beidson@apple.com>
Make IDBBackingStoreTransaction be RefCounted
https://bugs.webkit.org/show_bug.cgi?id=124168
Reviewed by Tim Horton.
This is necessarily to safely add a fully asynchronous interface into the IDB mechanism.
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBBackingStoreTransactionInterface.h:
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
2013-11-11 Antti Koivisto <antti@apple.com>
End of line whitespace should collapse with white-space:pre-wrap; overflow-wrap:break-word in all cases
https://bugs.webkit.org/show_bug.cgi?id=124158
Reviewed by Dave Hyatt.
If a word just fits the line but the following space overflows we fail to collapse whitespaces
at the end of the line. This happens because with break-word we end up taking word breaking
code path that does not have pre-wrap whitespace handling.
This patch makes the behavior consistent and also matches Firefox.
Test: fast/text/break-word-pre-wrap.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::BreakingContext::handleText):
Don't take the word break code path if we are pre-wrap and the current character is space.
Instead proceed to break the line normally as this is a valid break position.
2013-11-11 Bear Travis <betravis@adobe.com>
Web Inspector: [CSS Shapes] Highlight shape-outside when its element is selected in the Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=124071
Reviewed by Timothy Hatcher.
Adding code to pass computed shape information (path and bounds) to the Inspector overlay
canvas, and the code to display it. The code creates a path based on ShapeInfo's computed
shape. The shape highlight draws whenever an element is highlighted, via selection in
the Inspector elements view.
Test: inspector-protocol/model/highlight-shape-outside.html
* inspector/InspectorOverlay.cpp:
(WebCore::localPointToRoot): Convert a local point to be relative to the root view.
(WebCore::appendPathCommandAndPoints): Helper for building a single segment's worth
of the overall path.
(WebCore::appendPathSegment): Build a single segment's worth of the overall path.
(WebCore::buildObjectForShapeOutside): Build an object to pass to the Inspector overlay
that represents the shape.
(WebCore::buildObjectForElementInfo): Call buildObjectForShapeOutside and pass the
resulting object along.
* inspector/InspectorOverlayPage.js:
(pathCommand): Draw a single path command.
(drawPath): Draw the overall path.
(_drawShapeHighlight): Draw the highlight for the given shapeInfo.
(drawNodeHighlight): Call _drawShapeHighlight.
* rendering/shapes/PolygonShape.h:
(WebCore::PolygonShape::polygon): Expose the underlying vertex information for a
PolygonShape.
* rendering/shapes/RasterShape.h:
* rendering/shapes/RectangleShape.h:
(WebCore::RectangleShape::logicalRx): Expose the logical radii for a shape.
(WebCore::RectangleShape::logicalRy): Ditto.
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::computedShapePhysicalBoundingBox): The physical bounds of a
shape in renderer coordinates.
(WebCore::ShapeInfo::shapeToRendererPoint): Convert shape coordinates to renderer
coordinates.
(WebCore::ShapeInfo::shapeToRendererSize): Ditto.
(WebCore::ShapeInfo::ShapeInfo):
2013-11-11 Alexey Proskuryakov <ap@apple.com>
Support WebCrypto KeyPair interface
https://bugs.webkit.org/show_bug.cgi?id=124161
Reviewed by Geoffrey Garen.
No new tests yet, will be tested once generateKey is implemented for any RSA algorithms.
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
Added new files.
* bindings/js/JSDOMPromise.h: Support returning a key pair via a promise.
* bindings/js/JSCryptoKeyPairCustom.cpp: Added.
(WebCore::JSCryptoKeyPair::visitChildren):
* crypto/CryptoKey.idl:
CryptoKey wrapper is reachable through KeyPair, but it doesn't have (or need)
a back pointer.
* crypto/CryptoKeyPair.cpp: Added.
(WebCore::CryptoKeyPair::CryptoKeyPair):
(WebCore::CryptoKeyPair::~CryptoKeyPair):
* crypto/CryptoKeyPair.h: Added.
(WebCore::CryptoKeyPair::create):
(WebCore::CryptoKeyPair::publicKey):
(WebCore::CryptoKeyPair::privateKey):
* crypto/CryptoKeyPair.idl: Added.
2013-11-11 Nick Diego Yamane <nick.yamane@openbossa.org>
Fix build after r158967
https://bugs.webkit.org/show_bug.cgi?id=124160
Reviewed by Anders Carlsson.
After r158967, gcc debug builds with "-Werror=type-limits" enabled
fail. This patch fixes it.
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::intervalsAt):
2013-11-11 Zan Dobersek <zdobersek@igalia.com>
Remove the OperationsNotDeletable attribute from most of the WebIDL interfaces
https://bugs.webkit.org/show_bug.cgi?id=124151
Reviewed by Geoffrey Garen.
The OperationsNotDeletable attribute currently doesn't have any effect, but will soon enforce
non-configurability of operations on the interface that uses the attribute. Non-configurability
of operations is the default behavior at the moment, but will be changed to follow the WebIDL
specification which requires that the operations are configurable (i.e. -- in JSC terms -- deletable).
IE and Firefox already exhibit this behavior in the majority of cases, while Chrome and Opera don't.
The attribute remains in use on the Location interface to mimic the Unforgeable attribute which
also makes operations of an interface non-configurable. Unforgeable attribute will be used instead
when support for it will be added to the JSC bindings generator.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/IDBVersionChangeEvent.idl:
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/proximity/DeviceProximityEvent.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* Modules/speech/SpeechSynthesis.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PannerNode.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* Modules/websockets/WebSocket.idl:
* crypto/CryptoKey.idl:
* crypto/SubtleCrypto.idl:
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/DOMWindowCSS.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheet.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSFilterValue.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* css/WebKitCSSTransformValue.idl:
* dom/CharacterData.idl:
* dom/ChildNode.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMCoreException.idl:
* dom/DOMImplementation.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringList.idl:
* dom/DOMStringMap.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventException.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/HashChangeEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/MutationObserver.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeIterator.idl:
* dom/NodeList.idl:
* dom/Range.idl:
* dom/RangeException.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/TouchList.idl:
* dom/TreeWalker.idl:
* dom/UIEvent.idl:
* dom/WebKitNamedFlow.idl:
* dom/WheelEvent.idl:
* fileapi/Blob.idl:
* fileapi/FileException.idl:
* fileapi/FileList.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMFormData.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* html/DOMURL.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLFormElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLMarqueeElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLOutputElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLVideoElement.idl:
* html/MediaController.idl:
* html/RadioNodeList.idl:
* html/TimeRanges.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLLoseContext.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackCueList.idl:
* html/track/TextTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrackList.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/Console.idl:
* page/Crypto.idl:
* page/DOMSecurityPolicy.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Navigator.idl:
* page/Performance.idl:
* page/PerformanceEntryList.idl:
* page/SpeechInputResultList.idl:
* page/WindowBase64.idl:
* page/WindowTimers.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/Storage.idl:
* storage/StorageEvent.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGColor.idl:
* svg/SVGCursorElement.idl:
* svg/SVGDocument.idl:
* svg/SVGElement.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGException.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGGraphicsElement.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathElement.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPatternElement.idl:
* svg/SVGPoint.idl:
* svg/SVGPointList.idl:
* svg/SVGSVGElement.idl:
* svg/SVGStringList.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransform.idl:
* svg/SVGTransformList.idl:
* workers/DedicatedWorkerGlobalScope.idl:
* workers/Worker.idl:
* workers/WorkerGlobalScope.idl:
* workers/WorkerLocation.idl:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestException.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathException.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:
2013-11-11 Javier Fernandez <jfernandez@igalia.com>
[CSS Regions] Selection focusNode set to the "region" block, instead of the "source" block
https://bugs.webkit.org/show_bug.cgi?id=120769
Reviewed by David Hyatt.
When a point hits a Region block, current positionForPoint algorithm determines its
position in the DOM and returns either the start or end offset for such block, since
Region blocks have no children in the DOM.
It's necessary to map the point into Flow Thread coordinates in order to determine
the DOM position of the specific element rendered by the Region.
Top margin, padding and border points should be mapped to the beginning of the Region
block, while bottom points are mapped to the block end. The Left coordinate its just
adjusted to fit in the Flow Thread boundaries, since its not affected by the Flow
direction.
Besides, when inspecting the Flow Thread blocks looking for the last candidate box,
the Region originally associated to the point might be taken into account. Only the
blocks/boxes rendered by the Region are potential candidates.
Tests: fast/regions/selection/position-for-point-1-vert-lr.html
fast/regions/selection/position-for-point-1-vert-rl.html
fast/regions/selection/position-for-point-1.html
fast/regions/selection/position-for-point-vert-lr.html
fast/regions/selection/position-for-point-vert-rl.html
fast/regions/selection/position-for-point.html
* rendering/RenderBlock.cpp:
(WebCore::isChildHitTestCandidate):
(WebCore::RenderBlock::positionForPoint):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::positionForPoint): Added.
It just redirects the call to the associated RenderNamedFlowFragment instance.
* rendering/RenderBlockFlow.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::mapRegionPointIntoFlowThreadCoordinates): Added.
It performs the coordinates mapping.
(WebCore::RenderRegion::positionForPoint): Added.
It determines the corresponding LayoutPoint in the FlowThread the Region
is associated to, forwarding the call to the RenderBlock class using the
FlowThread's first child block and such new point.
* rendering/RenderRegion.h:
2013-11-11 Gergo Balogh <geryxyz@inf.u-szeged.hu>
[curl] Remove unused includes.
https://bugs.webkit.org/show_bug.cgi?id=120415
Reviewed by Csaba Osztrogonác.
Original patch by 2013-08-28 Tamas Czene <tczene@inf.u-szeged.hu>
* platform/network/curl/ProxyServerCurl.cpp:
* platform/network/curl/ResourceHandleCurl.cpp:
* platform/network/curl/ResourceHandleManager.cpp:
2013-11-11 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r159027 to make Apple Windows build happy.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::sharedBufferGetBytesAtPosition):
2013-11-11 Andreas Kling <akling@apple.com>
Kill InlineFlowBox::rendererLineBoxes().
<https://webkit.org/b/124141>
We only ever used this to access the RenderLineBoxList for non-root
boxes, and those always have a RenderInline renderer.
Tighten things up by losing the virtual rendererLineBoxes() and
calling RenderInline::lineBoxes() directly.
Reviewed by Antti Koivisto.
2013-11-11 Andreas Kling <akling@apple.com>
Bring the LineFragmentationData back to RootInlineBox.
<https://webkit.org/b/124136>
Now that we have the simple line layout path, almost all the root
line boxes end up with some kind of fragmentation data, so we might
as well put the members back on RootInlineBox and avoid the extra
allocation (and indirection.)
1.74 MB progression on HTML5 spec at <http://whatwg.org/c>
Reviewed by Antti Koivisto.
2013-11-10 Andreas Kling <akling@apple.com>
Shrink RenderInline.
<https://webkit.org/b/124134>
Move the "always create line boxes" bit from RenderInline up to
RenderElement. I didn't do this earlier because there were no bits
free on RenderObject but thanks to RenderElement we now have tons!
540 kB progression on HTML5 spec at <http://whatwg.org/c>
Reviewed by Anders Carlsson.
2013-11-10 Sam Weinig <sam@webkit.org>
Make childShouldCreateRenderer() take a Node reference
https://bugs.webkit.org/show_bug.cgi?id=124132
Reviewed by Andreas Kling.
The Node passed to childShouldCreateRenderer() is never null.
2013-11-10 Frédéric Wang <fred.wang@free.fr>
CSS direction must be reset to ltr on <math> element.
<https://webkit.org/b/124121>
Reviewed by Darin Adler.
Test: mathml/presentation/direction.html
* css/mathml.css:
(math): set direction: ltr; on the <math> element.
2013-11-10 Sam Weinig <sam@webkit.org>
Reduce the size of RenderBlockFlow by making its rare data inherit from RenderBlockRareData
https://bugs.webkit.org/show_bug.cgi?id=124124
Reviewed by Anders Carlsson.
Reduce RenderBlockFlow by one word.
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
* rendering/RenderBlockFlow.h:
2013-11-10 Antti Koivisto <antti@apple.com>
Use start/end instead of textOffset/textLength for simple text runs
https://bugs.webkit.org/show_bug.cgi?id=124130
Reviewed by Oliver Hunt.
The code reads better this way.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::createTextRuns):
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):
* rendering/SimpleLineLayoutFunctions.h:
(WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
(WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
(WebCore::SimpleLineLayout::containsTextCaretOffset):
(WebCore::SimpleLineLayout::isTextRendered):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::text):
2013-11-10 Antti Koivisto <antti@apple.com>
Implement white-space property on simple line layout path
https://bugs.webkit.org/show_bug.cgi?id=124122
Reviewed by Andreas Kling.
Support all values of the white-space property and the tab-size property.
Tests: fast/forms/basic-textareas-simple-lines.html
fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html
fast/text/whitespace/pre-wrap-line-test-simple-lines.html
fast/text/whitespace/pre-wrap-long-word-simple-lines.html
fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::isWhitespace):
(WebCore::SimpleLineLayout::skipWhitespaces):
(WebCore::SimpleLineLayout::textWidth):
(WebCore::SimpleLineLayout::measureWord):
(WebCore::SimpleLineLayout::createTextRuns):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintDebugBorders):
(WebCore::SimpleLineLayout::paintFlow):
2013-11-10 Sergio Correia <sergio.correia@openbossa.org>
Fix EFL build after r159027
https://bugs.webkit.org/show_bug.cgi?id=124127
Reviewed by Anders Carlsson.
No new tests, build fix.
* page/Settings.in: Add std to numeric_limits, since we don't have
'using std' directives anymore.
2013-11-10 Anders Carlsson <andersca@apple.com>
Fix build.
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::computeColumnCountAndWidth):
(WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
2013-11-10 Anders Carlsson <andersca@apple.com>
Remove all 'std' using directives from WebCore
https://bugs.webkit.org/show_bug.cgi?id=124125
Reviewed by Sam Weinig.
As per the coding style guidelines.
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCache::appendEntry):
(WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
* loader/WorkerThreadableLoader.cpp:
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCache):
* loader/appcache/ManifestParser.cpp:
(WebCore::parseManifest):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::deadCapacity):
(WebCore::MemoryCache::lruListFor):
* page/CaptionUserPreferencesMediaAF.cpp:
* page/Chrome.cpp:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::intervalClampedToMinimum):
* page/FocusController.cpp:
* page/Frame.cpp:
(WebCore::Frame::resizePageRectsKeepingRatio):
* page/PageGroupLoadDeferrer.cpp:
* page/Settings.cpp:
* page/animation/AnimationBase.cpp:
(WebCore::solveStepsFunction):
(WebCore::AnimationBase::fireAnimationEventsIfNeeded):
(WebCore::AnimationBase::timeToNextService):
(WebCore::AnimationBase::fractionalTime):
(WebCore::AnimationBase::getTimeToNextEvent):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
* platform/DateComponents.cpp:
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::handleWheelEvent):
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSize):
(WebCore::ScrollView::setScrollOffset):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::scrollContents):
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::moveThumb):
* platform/ScrollbarThemeComposite.cpp:
(WebCore::usedTotalSize):
(WebCore::ScrollbarThemeComposite::thumbPosition):
(WebCore::ScrollbarThemeComposite::thumbLength):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::copyBufferAndClear):
(WebCore::SharedBuffer::getSomeData):
* platform/ThreadTimers.cpp:
(WebCore::ThreadTimers::updateSharedTimer):
* platform/Timer.cpp:
(WebCore::TimerHeapLessThanFunction::operator()):
(WebCore::TimerBase::heapPop):
(WebCore::TimerBase::nextUnalignedFireInterval):
* platform/URL.cpp:
(WebCore::findHostnamesInMailToURL):
(WebCore::portAllowed):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::setRate):
* platform/audio/AudioResamplerKernel.cpp:
(WebCore::AudioResamplerKernel::process):
* platform/audio/Distance.cpp:
(WebCore::DistanceEffect::gain):
* platform/audio/DynamicsCompressorKernel.cpp:
(WebCore::DynamicsCompressorKernel::process):
* platform/audio/EqualPowerPanner.cpp:
(WebCore::EqualPowerPanner::pan):
* platform/audio/HRTFDatabase.cpp:
(WebCore::HRTFDatabase::indexFromElevationAngle):
* platform/audio/HRTFElevation.cpp:
(WebCore::HRTFElevation::createForSubject):
* platform/audio/HRTFKernel.cpp:
(WebCore::HRTFKernel::HRTFKernel):
(WebCore::HRTFKernel::createInterpolatedKernel):
* platform/audio/HRTFPanner.cpp:
(WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
* platform/audio/Reverb.cpp:
* platform/audio/SincResampler.cpp:
(WebCore::SincResampler::process):
* platform/cf/URLCF.cpp:
* platform/graphics/Color.cpp:
(WebCore::makeRGB):
(WebCore::makeRGBA):
(WebCore::colorFloatToRGBAByte):
(WebCore::Color::light):
(WebCore::Color::dark):
* platform/graphics/CrossfadeGeneratedImage.cpp:
* platform/graphics/FloatQuad.cpp:
(WebCore::min4):
(WebCore::max4):
(WebCore::withinEpsilon):
* platform/graphics/FloatSize.cpp:
(WebCore::FloatSize::isZero):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::floatWidthForSimpleText):
* platform/graphics/FontPlatformData.cpp:
* platform/graphics/GraphicsContext.cpp:
* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::Radii::expand):
* platform/graphics/ShadowBlur.cpp:
(WebCore::calculateLobes):
(WebCore::computeSliceSizesFromRadii):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::initCharWidths):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCue):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setOpacity):
(WebCore::GraphicsLayerCA::setNeedsDisplay):
(WebCore::GraphicsLayerCA::setupAnimation):
(WebCore::clampedContentsScaleForScale):
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::getTileIndexRangeForRect):
(WebCore::TileController::computeTileCoverageRect):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformShadow):
(WebCore::computeLineBoundsAndAntialiasingModeForText):
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData):
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/filters/FEDropShadow.cpp:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::boxBlur):
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
(WebCore::FEGaussianBlur::calculateStdDeviation):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::updateSubRect):
* platform/graphics/gpu/TilingData.cpp:
(WebCore::computeNumTiles):
(WebCore::TilingData::tileXIndexFromSrcCoord):
(WebCore::TilingData::tileYIndexFromSrcCoord):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextController):
(WebCore::ComplexTextController::offsetForPosition):
(WebCore::ComplexTextController::advance):
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::floatWidthForComplexText):
* platform/graphics/mac/FontMac.mm:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::duration):
* platform/graphics/mac/SimpleFontDataMac.mm:
* platform/graphics/transforms/Matrix3DTransformOperation.cpp:
* platform/graphics/transforms/MatrixTransformOperation.cpp:
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
* platform/graphics/transforms/RotateTransformOperation.cpp:
* platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::blendByMatchingOperations):
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::clampEdgeValue):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformSetContentsSize):
(WebCore::ScrollView::platformSetScrollPosition):
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/ThemeMac.mm:
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController incrementVolume]):
(timeToString):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::copyData):
* platform/network/ResourceRequestBase.cpp:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::parseCacheControlDirectives):
* platform/network/cf/ResourceResponseCFNet.cpp:
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):
* platform/text/TextBreakIteratorICU.cpp:
(WebCore::textClone):
(WebCore::textLatin1MoveInPrimaryContext):
(WebCore::textLatin1MoveInPriorContext):
(WebCore::textInChunkOrOutOfRange):
(WebCore::textOpenLatin1):
(WebCore::textUTF16MoveInPrimaryContext):
(WebCore::textUTF16MoveInPriorContext):
(WebCore::textOpenUTF16):
* platform/text/TextCodecUTF16.cpp:
(WebCore::TextCodecUTF16::encode):
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::encode):
* platform/text/TextStream.cpp:
* platform/text/mac/LocaleMac.mm:
* platform/text/mac/TextCodecMac.cpp:
(WebCore::TextCodecMac::decode):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
(WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
(WebCore::AutoTableLayout::layout):
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
* rendering/FloatingObjects.cpp:
(WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalRightOffset):
* rendering/InlineBox.cpp:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::computeMaxLogicalTop):
(WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
(WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):
(WebCore::InlineFlowBox::nodeAtPoint):
(WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
(WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected):
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::placeEllipsisBox):
(WebCore::InlineTextBox::applyShadowToGraphicsContext):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::selectionStartEnd):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::computeUnderlineOffset):
(WebCore::InlineTextBox::paintDecoration):
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintCompositionUnderline):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
(WebCore::RenderBlock::paintChild):
(WebCore::RenderBlock::blockSelectionGap):
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):
(WebCore::RenderBlock::calcColumnWidth):
(WebCore::RenderBlock::adjustRectForColumns):
(WebCore::RenderBlock::computeIntrinsicLogicalWidths):
(WebCore::RenderBlock::computePreferredLogicalWidths):
(WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
(WebCore::updatePreferredWidth):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::collapseMargins):
(WebCore::RenderBlockFlow::clearFloatsIfNeeded):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::setCollapsedBottomMargin):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
(WebCore::RenderBlockFlow::addOverhangingFloats):
(WebCore::RenderBlockFlow::getClearDelta):
(WebCore::RenderBlockFlow::adjustForBorderFit):
(WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
(WebCore::RenderBlockFlow::updateLogicalHeight):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
(WebCore::RenderBlockFlow::relayoutForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::updateLogicalWidthForLeftAlignedBlock):
(WebCore::updateLogicalWidthForRightAlignedBlock):
(WebCore::updateLogicalWidthForCenterAlignedBlock):
(WebCore::setLogicalWidthForTextRun):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::layoutLineBoxes):
(WebCore::RenderBlockFlow::checkFloatsInCleanLine):
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
(WebCore::tryHyphenating):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scrollWidth):
(WebCore::RenderBox::scrollHeight):
(WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
(WebCore::RenderBox::constrainLogicalHeightByMinMax):
(WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
(WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::repaintLayerRectsForImage):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
(WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::applyVisualEffectOverflow):
(WebCore::RenderBox::addLayoutOverflow):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
(WebCore::RenderBoxModelObject::paintNinePieceImage):
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::calculateAdjustedInnerBorder):
(WebCore::RenderBoxModelObject::paintBoxShadow):
(WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::FlexBoxIterator::next):
(WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
(WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::maxFilenameWidth):
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::setImageSizeForAltText):
* rendering/RenderInline.cpp:
(WebCore::computeMargin):
(WebCore::RenderInline::linesVisualOverflowBoundingBox):
(WebCore::RenderInline::paintOutline):
(WebCore::RenderInline::paintOutlineForLine):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clampScrollOffset):
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::visibleContentRect):
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
(WebCore::RenderLayer::hitTestOverflowControls):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateLayerBounds):
* rendering/RenderLayerBacking.cpp:
* rendering/RenderLayerModelObject.cpp:
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::rangeIntersectsRect):
(WebCore::RenderLineBoxList::anyLineIntersectsRect):
(WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
(WebCore::RenderLineBoxList::paint):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::layout):
(WebCore::RenderListBox::computePreferredLogicalWidths):
(WebCore::RenderListBox::size):
(WebCore::RenderListBox::numVisibleItems):
(WebCore::RenderListBox::panScroll):
(WebCore::RenderListBox::scrollHeight):
* rendering/RenderListItem.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::marqueeSpeed):
(WebCore::RenderMarquee::computePosition):
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMediaControls.cpp:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::updateOptionsWidth):
(WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
(WebCore::RenderMenuList::computePreferredLogicalWidths):
* rendering/RenderMeter.cpp:
* rendering/RenderMultiColumnBlock.cpp:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
* rendering/RenderNamedFlowFragment.cpp:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
(WebCore::RenderObject::repaintAfterLayoutIfNeeded):
(WebCore::RenderObject::caretMaxOffset):
* rendering/RenderProgress.cpp:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::computePreferredLogicalWidths):
* rendering/RenderRubyBase.cpp:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::getOverhang):
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::computeScrollbarWidth):
(WebCore::RenderScrollbarPart::computeScrollbarHeight):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::computeControlLogicalHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::computePreferredLogicalWidths):
(WebCore::RenderTable::calcBorderStart):
(WebCore::RenderTable::calcBorderEnd):
(WebCore::RenderTable::outerBorderBefore):
(WebCore::RenderTable::outerBorderAfter):
(WebCore::RenderTable::outerBorderStart):
(WebCore::RenderTable::outerBorderEnd):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::parseColSpanFromDOM):
(WebCore::RenderTableCell::parseRowSpanFromDOM):
(WebCore::RenderTableCell::logicalWidthFromColumns):
(WebCore::RenderTableCell::computePreferredLogicalWidths):
(WebCore::RenderTableCell::layout):
(WebCore::RenderTableCell::setOverrideLogicalContentHeightFromRowHeight):
(WebCore::RenderTableCell::clippedOverflowRectForRepaint):
(WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
(WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::ensureRows):
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::firstLineBaseline):
(WebCore::RenderTableSection::removeCachedCollapsedBorders):
(WebCore::RenderTableSection::setCachedCollapsedBorder):
(WebCore::RenderTableSection::cachedCollapsedBorder):
* rendering/RenderText.cpp:
(WebCore::makeCapitalized):
(WebCore::RenderText::absoluteRectsForRange):
(WebCore::RenderText::absoluteQuadsForRange):
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computePreferredLogicalWidths):
* rendering/RenderTextControlSingleLine.cpp:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::RenderThemeMac::paintMenuListButton):
* rendering/RenderWidget.cpp:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::alignBoxesInBlockDirection):
(WebCore::RootInlineBox::beforeAnnotationsAdjustment):
(WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
(WebCore::RootInlineBox::blockDirectionPointInLine):
(WebCore::RootInlineBox::paddedLayoutOverflowRect):
(WebCore::setAscentAndDescent):
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::layout):
* rendering/style/RenderStyle.cpp:
(WebCore::calcConstraintScaleFor):
(WebCore::RenderStyle::setFontSize):
(WebCore::RenderStyle::getShadowExtent):
(WebCore::RenderStyle::getShadowInsetExtent):
(WebCore::RenderStyle::getShadowHorizontalExtent):
(WebCore::RenderStyle::getShadowVerticalExtent):
* rendering/style/SVGRenderStyle.cpp:
* rendering/style/ShadowData.cpp:
(WebCore::calculateShadowExtent):
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGRoot.cpp:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::localSelectionRect):
* svg/SVGAnimatedNumber.cpp:
* svg/SVGAnimatedNumberOptionalNumber.cpp:
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::startTimer):
(WebCore::SMILTimeContainer::updateAnimations):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::simpleDuration):
(WebCore::SVGSMILElement::repeatingDuration):
(WebCore::SVGSMILElement::resolveActiveEnd):
(WebCore::SVGSMILElement::resolveInterval):
(WebCore::SVGSMILElement::resolveFirstInterval):
(WebCore::SVGSMILElement::resolveNextInterval):
(WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
* xml/XMLTreeViewer.cpp:
* xml/parser/XMLDocumentParser.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::OffsetBuffer::readOutBytes):
2013-11-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[AX] Clean up static_cast<> to cast from AccessibilityObject
https://bugs.webkit.org/show_bug.cgi?id=124032
Reviewed by Mario Sanchez Prada.
ACCESSIBILITY_OBJECT_TYPE_CASTS can support more helpful casting functions.
So, we need to use them as much as possible. This patch cleans up all static_cast<> in accessibility.
This patch generates toAccessibilityFoo() in order to replace static_cast<> with it. Below toAccessibilityFoo()
are generated.
- toAccessibilityARIAGridRow()
- toAccessibilityImageMapLink()
- toAccessibilityListBox()
- toAccessibilityListBoxOption()
- toAccessibilityMenuListOption()
- toAccessibilityMenuListPopup()
- toAccessibilityScrollbar()
- toAccessibilitySlider()
No new tests, no behavior changes.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedImageMapUIElement):
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::setSelectedChildren):
(WebCore::AccessibilityListBox::selectedChildren):
(WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::addChildren):
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isListBoxOption):
(WebCore::AccessibilityObject::isSliderThumb):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::addChildScrollbar):
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::addChildren):
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.cpp:
(WebCore::AccessibilitySpinButton::addChildren):
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(webkitAccessibleSelectionClearSelection):
(webkitAccessibleSelectionSelectAllSelection):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::didUpdateActiveOption):
2013-11-10 Andreas Kling <akling@apple.com>
Rebaseline bindings tests after r158997.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2013-11-10 Brendan Long <b.long@cablelabs.com>
[GStreamer] Consolidate more code into TrackPrivateBaseGStreamer
https://bugs.webkit.org/show_bug.cgi?id=124020
Reviewed by Philippe Normand.
No new tests because this is just refactoring.
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
(WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer): Don't pass playbin to TrackPrivateBaseGStreamer, and do pass a pointer to "this".
(WebCore::AudioTrackPrivateGStreamer::disconnect): Clear m_playbin().
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Move labelChanged() and languageChanged() to TrackPrivateBaseGStreamer. Move m_playbin to this class (along with disconnect() to clear it).
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Move tag handling, pad and index to TrackPrivateBaseGStreamer.
(WebCore::textTrackPrivateEventCallback):
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
(WebCore::InbandTextTrackPrivateGStreamer::disconnect):
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Add WebKitTextCombinerPad with "tags" property, set in the same was as input-selector's pads.
(webkit_text_combiner_pad_init): Initialize tags to 0.
(webkitTextCombinerPadFinalize): Clear tags.
(webkitTextCombinerPadGetProperty): Handling "tags" property.
(webkitTextCombinerPadEvent): Changed to be a pad event function instead of a pad probe, and now intercepts tags and merges them (like input-selector pads do).
(webkitTextCombinerRequestNewPad): Using WebKitTextCombinerPad instead of just GhostPad.
(webkit_text_combiner_pad_class_init): Setup WebKitTextCombinerPad.
* platform/graphics/gstreamer/TextCombinerGStreamer.h: Remove superfluous code.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Use "notify::active" so we don't need a playbin, and immediately check for tags after the constructor.
(WebCore::TrackPrivateBaseGStreamer::disconnect): Remove m_playbin.
(WebCore::TrackPrivateBaseGStreamer::getTag): Refactored out from notifyTrackOfTagsChanged.
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Simplify using m_owner (so we can call labelChanged() and languageChanged() directly), and use getTag() above.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_owner to we can access the owning track, and change some functions to match our needs better.
(WebCore::TrackPrivateBaseGStreamer::setActive): Add empty default since InbandTextTrackPrivateGStreamer doesn't need this.
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Same as AudioTrackPrivateGStreamer.
(WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
(WebCore::VideoTrackPrivateGStreamer::disconnect):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same as AudioTrackPrivateGStreamer.
2013-11-10 Andreas Kling <akling@apple.com>
Generate type casting helpers for Widget classes.
<https://webkit.org/b/124120>
Add a WIDGET_TYPE_CASTS macro and replace all the hand-written
toFoo() helpers we had for Widget subclasses. Fixed up a handful
of places that were still using static_cast.
Reviewed by Antti Koivisto.
2013-11-10 Andreas Kling <akling@apple.com>
Remove unused FragmentationDisabler class.
<https://webkit.org/b/124118>
This RAII object was added in r144744 to avoid a crash when using
MathML inside CSS regions. Its only user was removed in r157070.
Reviewed by Antti Koivisto.
2013-11-10 Andreas Kling <akling@apple.com>
Simplify some is-this-a-MathML-element? checks.
<https://webkit.org/b/124119>
As of r158198, the MathML-ness of an Element is determined by
a Node flag, so there's no need to cast to Element before checking
on this. Simplify accordingly.
Reviewed by Antti Koivisto.
2013-11-10 Andreas Kling <akling@apple.com>
Remove RenderTheme::shouldOpenPickerWithF4Key().
Rubber-stamped by Anders Carlsson.
2013-11-09 Andreas Kling <akling@apple.com>
CSSValuePool::createFontFamilyValue() should return PassRef.
<https://webkit.org/b/124114>
Unlike createFontFaceValue(), createFontFamilyValue() can never
fail to return an object and thus should return PassRef.
Reviewed by Anders Carlsson.
2013-11-09 Andreas Kling <akling@apple.com>
RenderIFrame should display its name correctly in DRT output.
<https://webkit.org/b/124117>
Nuke an age-old FIXME about making RenderIFrame show its true name
in DRT output. No more "RenderPartObject {IFRAME}"!
Reviewed by Anders Carlsson.
2013-11-09 Andreas Kling <akling@apple.com>
SVGTextMetricsBuilder::walkTree() should take a RenderElement.
<https://webkit.org/b/124105>
Make walkTree() take a RenderElement so we can use the non-virtual
firstChild() internally. All call sites had pointers to compatible
objects already.
Reviewed by Anders Carlsson.
2013-11-09 Andreas Kling <akling@apple.com>
RenderMathMLFenced should pass around operators in tighter types.
<https://webkit.org/b/124115>
Store operator renderers in RenderMathMLOperator pointers instead
of passing them around as RenderObject.
Reviewed by Martin Robinson.
2013-11-09 Andreas Kling <akling@apple.com>
Use RENDER_OBJECT_TYPE_CASTS for more types.
<https://webkit.org/b/124112>
Generate toRenderFoo() type casting helpers for these classes:
- RenderCombineText
- RenderDetailsMarker
- RenderListMarker
- RenderVideo
- RenderView
Reviewed by Anders Carlsson.
2013-11-09 Andreas Kling <akling@apple.com>
Move MathML type checking virtuals to RenderObject.
<https://webkit.org/b/124111>
Previously, checking the type of a MathML renderer would require
that you first check if it's a RenderMathMLBlock, and then casting
to that type to access the check you really wanted.
This change moves all the isRenderMathMLFoo() virtual functions
to RenderObject. I also made sure all the overloads were private
and marked them OVERRIDE/FINAL as appropriate.
Finally I replaced all the hand-written casting functions with
autogenerated ones using RENDER_OBJECT_TYPE_CASTS.
Reviewed by Anders Carlsson.
2013-11-09 Martin Robinson <mrobinson@igalia.com>
[MathML] Poor spacing around delimiters in MathML Torture Test 14
https://bugs.webkit.org/show_bug.cgi?id=122837
Reviewed by Brent Fulgham.
Instead of stretching the vertical bar with the stretchable version, just repeat
the normal vertical bar. This follows what Gecko does when rendering tall vertical
bars and also works around an issue with STIX fonts leading to poor spacing in
formulas.
* rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
normal variant.
2013-11-09 Anders Carlsson <andersca@apple.com>
Encode form data using the KeyedEncoder
https://bugs.webkit.org/show_bug.cgi?id=124107
Reviewed by Sam Weinig.
* platform/KeyedCoding.h:
(WebCore::KeyedEncoder::encodeEnum):
* platform/network/FormData.cpp:
(WebCore::encodeElement):
(WebCore::FormData::encode):
* platform/network/FormData.h:
2013-11-09 Sam Weinig <sam@webkit.org>
Modernize CanvasObserverProxy
https://bugs.webkit.org/show_bug.cgi?id=124106
Reviewed by Anders Carlsson.
* css/CSSCanvasValue.h:
2013-11-09 Patrick Gansterer <paroga@webkit.org>
Move RunLoop from WebCore to WTF
https://bugs.webkit.org/show_bug.cgi?id=116606
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* GNUmakefile.list.am:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformWin.cmake:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2013-11-09 Andreas Kling <akling@apple.com>
Tighten typing in SVGResourcesCycleSolver a bit.
<https://webkit.org/b/124104>
Make the SVGResourcesCycleSolver constructor take a RenderElement&
and a SVGResources&.
While I was in the neighborhood, also converted one loop to use a
renderer iterator instead of walking siblings manually.
Finally used "auto" to clean up some overly wordy loops.
Reviewed by Anders Carlsson.
2013-11-09 Andreas Kling <akling@apple.com>
Beat SVGRenderSupport with the RenderElement stick.
<https://webkit.org/b/124102>
Tighten up all the SVGRenderSupport helper functions by making them
take const RenderElements references instead of raw RenderObject
pointers as much as possible.
This tunes up a bunch of branchy style() calls.
The patch looks big but it's mostly mechanical. I just changed the
signatures and then worked backwards until everything built again.
Reviewed by Antti Koivisto.
2013-11-09 Andreas Kling <akling@apple.com>
SVGTextLayoutAttributes always has a RenderSVGInlineText.
<https://webkit.org/b/124101>
No SVGTextLayoutAttributes object is without a RenderSVGInlineText
"context" so make context() return a reference.
Reviewed by Antti Koivisto.
2013-11-09 Andreas Kling <akling@apple.com>
Move BindingSecurity stuff under JSDOMBinding umbrella.
<https://webkit.org/b/124099>
We are hitting shouldAllowAccessToDOMWindow() pretty hard on the
demo here: <http://www.jasondavies.com/maps/rotate/>
Putting it together with the rest of the JSDOMBinding code takes
CPU time spent in there from 8.7% to 6.5%. The abstraction was
only used to support alternate JS engines in the past.
Reviewed by Antti Koivisto.
2013-11-08 Brady Eidson <beidson@apple.com>
Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
https://bugs.webkit.org/show_bug.cgi?id=124088
Reviewed by Tim Horton.
+
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBDatabaseBackendInterface.h: Removed.
* Modules/indexeddb/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
* Modules/indexeddb/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBCallbacks.h:
* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBCursorBackend.cpp:
* Modules/indexeddb/IDBCursorBackend.h:
* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBIndex.cpp:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBIndexWriter.h:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBOpenDBRequest.cpp:
* Modules/indexeddb/IDBOpenDBRequest.h:
* Modules/indexeddb/IDBPendingDeleteCall.h:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBTransactionBackend.cpp:
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
* Modules/indexeddb/IDBTransactionBackendOperations.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
* Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
2013-11-08 Andreas Kling <akling@apple.com>
Reindent JSDOMBinding.h (finally.)
Rubber-stamped by Sam Weinig.
2013-11-08 Sam Weinig <sam@webkit.org>
Change collectStyleForPresentationAttribute and related functions to take a MutableStylePropertySet by reference
https://bugs.webkit.org/show_bug.cgi?id=124096
Reviewed by Andreas Kling.
Pass MutableStylePropertySet by reference. It is never null.
2013-11-08 Anders Carlsson <andersca@apple.com>
Implement encoding of arrays of objects
https://bugs.webkit.org/show_bug.cgi?id=124091
Reviewed by Beth Dakin.
* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTreeNode):
Encode the rest of the members.
* platform/KeyedCoding.h:
(WebCore::KeyedEncoder::encodeObjects):
Call beginArray, then beginArrayElement/endArrayElement for every element and lastly endArray.
2013-11-08 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: RemoteLayerBackingStore partial repaint is broken for the tile cache
https://bugs.webkit.org/show_bug.cgi?id=123944
Reviewed by Simon Fraser.
Ensure that the tile cache retrieves repaint rects from the tile layer,
not from the tiled backing layer.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::enumerateRectsBeingDrawn):
Allow the PlatformCALayer to decide how to enumerate rects to paint.
* WebCore.exp.in:
* platform/graphics/mac/WebLayer.h:
Add RepaintRectList, remove some unnecessary WebCore::s.
* platform/graphics/mac/WebLayer.mm:
(WebCore::collectRectsToPaint):
Factor collectRectsToPaint out; it just grabs the rects from
the layer and makes the decision whether to repaint the bounds
of the dirty region or just the subregions.
Move calls to collectRectsToPaint() to callers of drawLayerContents(),
so that TileController can collect rects from the appropriate source
(the Tile layer) and other layers just continue grabbing them from
their relevant layers.
Make sure that the list that comes from collectRectsToPaint() always
has at least one rect in it (appending the clip bounds if we don't
want to repaint subregions) so we can simplify logic in drawLayerContents.
(WebCore::drawLayerContents):
Remove code to support CompositingCoordinatesBottomUp, as it's only
used on Windows, so this Mac-specific code doesn't need to support it.
Simplify logic given that dirtyRects will always be non-empty.
(-[WebLayer drawInContext:]):
(-[WebSimpleLayer setNeedsDisplayInRect:]):
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::platformCALayerPaintContents):
Adopt collectRectsToPaint.
2013-11-08 Anders Carlsson <andersca@apple.com>
Implement more KeyedEncoder functionality
https://bugs.webkit.org/show_bug.cgi?id=124089
Reviewed by Beth Dakin.
* bindings/js/SerializedScriptValue.h:
* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTreeNode):
* platform/KeyedCoding.h:
(WebCore::KeyedEncoder::encodeConditionalObject):
2013-11-08 Eric Carlson <eric.carlson@apple.com>
getCueAsHTML() on an empty cue should return a document fragment
https://bugs.webkit.org/show_bug.cgi?id=124084
Reviewed by Darin Adler.
Test: media/track/track-cue-empty-cue-text.html
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::createDocumentFragmentFromCueText): Don't return early when the
passed an empty string.
2013-11-08 Anders Carlsson <andersca@apple.com>
KeyedEncoder should be able to encoder objects
https://bugs.webkit.org/show_bug.cgi?id=124085
Reviewed by Sam Weinig.
* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTree):
Encode the root object.
(WebCore::HistoryItem::encodeBackForwardTreeNode):
Encode the target.
* history/HistoryItem.h:
Add new members.
* platform/KeyedCoding.h:
(WebCore::KeyedEncoder::encodeObject):
Call beginObject, call the functor and then call endObject().
2013-11-08 Sam Weinig <sam@webkit.org>
Teach CanvasObserver about references
https://bugs.webkit.org/show_bug.cgi?id=124082
Reviewed by Anders Carlsson.
* css/CSSCanvasValue.cpp:
* css/CSSCanvasValue.h:
* html/HTMLCanvasElement.cpp:
* html/HTMLCanvasElement.h:
2013-11-08 Anders Carlsson <andersca@apple.com>
Begin stubbing out a KeyedEncoder class in WebCore
https://bugs.webkit.org/show_bug.cgi?id=124079
Reviewed by Sam Weinig.
* WebCore.exp.in:
Add symbol needed by WebCore.
* WebCore.xcodeproj/project.pbxproj:
Add new header file.
* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTree):
* history/HistoryItem.h:
Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.
* platform/KeyedCoding.h:
Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.
2013-11-08 Brady Eidson <beidson@apple.com>
Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
https://bugs.webkit.org/show_bug.cgi?id=124077
Reviewed by Alexey Proskuryakov.
The abstraction is no longer needed.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.
* Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
* Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBCursorBackend.cpp:
* Modules/indexeddb/IDBCursorBackend.h:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackendOperations.h:
* Modules/indexeddb/IDBTransactionCoordinator.cpp:
* Modules/indexeddb/IDBTransactionCoordinator.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2013-11-08 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
https://bugs.webkit.org/show_bug.cgi?id=124075
Reviewed by Beth Dakin.
In r155660 I removed some scrollbar-related layouts when scrollbars
are in overlay mode.
However, ScrollView::updateScrollbars() has a case where we still need
to do multiple pases, related to its "Never ever try to both gain/lose a
scrollbar in the same pass" comment. When we avoid making a new scrollbar
because the other was removed, we need to do another pass to bring the
correct scrollbar back.
Can't test overlay scrollbars in tests.
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
2013-11-08 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
https://bugs.webkit.org/show_bug.cgi?id=123769
Reviewed by Dirk Schulze.
Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class
and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals()
method now generates intervals with Y coordinates that begin at the image shape's
bounds.y - shape-margin, which may be less than 0.
The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter
by the shape-margin. A non-const overload of the method was added to centralize all
access to m_intervalLists.
Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html
fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html
* rendering/shapes/RasterShape.cpp:
(WebCore::MarginIntervalGenerator::intervalAt): Don't clip X coordinates to 0 since they can extend into the margin-box.
(WebCore::RasterShapeIntervals::appendInterval): Use the non-const intervalsAt() method.
(WebCore::RasterShapeIntervals::uniteMarginInterval): Ditto.
(WebCore::RasterShapeIntervals::computeShapeMarginIntervals): See above.
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::RasterShapeIntervals): Added a field for the margin.
(WebCore::RasterShapeIntervals::intervalsAt): Offset y coordinates by the margin; added a non-const overload.
2013-11-08 Piotr Grad <p.grad@samsung.com>
Ended event should work also when playback rate is negative
https://bugs.webkit.org/show_bug.cgi?id=123879
Reviewed by Eric Carlson.
According to W3C specification playback is ended also when playback rate is
negative and position is the earliest possible position.
Test: media/video-ended-event-negative-playback.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2013-11-08 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Checking for TypeError in RTCPeerConnection object creation
https://bugs.webkit.org/show_bug.cgi?id=124049
Reviewed by Eric Carlson.
If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
Please notice that this patch does not make every tests run as expected,
RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
Existing tests were updated.
* GNUmakefile.list.am:
* Modules/mediastream/RTCPeerConnection.idl:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
(WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
2013-11-08 Bem Jones-Bey <bjonesbe@adobe.com>
Use references instead of pointers to RenderBlockFlow in FloatingObjects and ComputeFloatOffsetAdapter
https://bugs.webkit.org/show_bug.cgi?id=124074
Reviewed by Sam Weinig.
Just a straightforward conversion from const pointers to const references.
Also, remove unneeded argument from FloatingObjects constructor.
No new tests, no behavior change.
* rendering/FloatingObjects.cpp:
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::FloatingObjects::clearLineBoxTreePointers):
(WebCore::FloatingObjects::computePlacedFloatsTree):
(WebCore::shapeInfoForFloat):
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
(WebCore::::heightRemaining):
* rendering/FloatingObjects.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::createFloatingObjects):
2013-11-08 Sam Weinig <sam@webkit.org>
Teach SubframeLoader a bit about references
https://bugs.webkit.org/show_bug.cgi?id=124076
Reviewed by Anders Carlsson.
* html/HTMLAppletElement.cpp:
* html/HTMLFrameElementBase.cpp:
* html/HTMLMediaElement.cpp:
* loader/SubframeLoader.cpp:
* loader/SubframeLoader.h:
2013-11-08 Brady Eidson <beidson@apple.com>
Blind Windows build-fix attempt after r158959
* WebCore.vcxproj/WebCore.vcxproj:
2013-11-08 Brady Eidson <beidson@apple.com>
Merge IDBCursorBackendInterface and IDBCursorBackendImpl
https://bugs.webkit.org/show_bug.cgi?id=124068
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
* Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
* Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
* Modules/indexeddb/IDBCallbacks.h:
* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursorWithValue.cpp:
* Modules/indexeddb/IDBCursorWithValue.h:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
* Modules/indexeddb/IDBTransactionBackendImpl.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2013-11-08 Sam Weinig <sam@webkit.org>
Modernize FrameLoader a bit
https://bugs.webkit.org/show_bug.cgi?id=124073
Reviewed by Anders Carlsson.
* loader/FrameLoader.cpp:
* loader/FrameLoader.h:
Use std::unique_ptrs rather than OwnPtrs.
* loader/MixedContentChecker.cpp:
* loader/MixedContentChecker.h:
Switch to hold a Frame& rather than Frame*.
2013-11-08 Zan Dobersek <zdobersek@igalia.com>
Remove code guarded with ENABLE(STREAM)
https://bugs.webkit.org/show_bug.cgi?id=123667
Reviewed by Anders Carlsson.
Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
no port enables the feature and the work on this feature has wound down after the Chromium port forked,
leaving this code unmaintained.
* fileapi/FileReaderLoader.cpp:
* fileapi/FileReaderLoader.h:
2013-11-08 Bem Jones-Bey <bjonesbe@adobe.com>
RenderBlockFlow::nextFloatLogicalBottomBelow should not use ShapeOutsideFloatOffsetMode
https://bugs.webkit.org/show_bug.cgi?id=123931
Reviewed by Sam Weinig.
Rewrite nextFloatLogicalBottomBelow to use the placed floats tree for
the search and to not need ShapeOutsideFloatOffsetMode anymore. This
moves almost all of the logic into FloatingObjects, making a small
reduction in the amount that RenderBlockFlow needs to know about the
implementation of FloatingObjects.
In addition, change ComputeFloatOffsetAdapter to take in LayoutUnits
and roundToInt itself so that all of it's callers can be simplified.
No new tests, no new behavior.
* rendering/FloatingObjects.cpp:
(WebCore::rangesIntersect):
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
(WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
(WebCore::FindNextFloatLogicalBottomAdapter::highValue):
(WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
(WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
(WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
(WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset):
* rendering/FloatingObjects.h:
* rendering/LineWidth.cpp:
(WebCore::LineWidth::fitBelowFloats):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock):
(WebCore::RenderBlockFlow::getClearDelta):
* rendering/RenderBlockFlow.h:
2013-11-08 Alexey Proskuryakov <ap@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=124064
Some WebCrypto files are not in correct directories
Rubber-stamped by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj:
* crypto/CryptoAlgorithmAesCbcParams.h: Removed.
* crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
* crypto/CryptoKeyAES.cpp: Removed.
* crypto/CryptoKeyAES.h: Removed.
* crypto/CryptoKeyMac.cpp: Removed.
* crypto/keys/CryptoKeyAES.cpp: Copied from Source/WebCore/crypto/CryptoKeyAES.cpp.
* crypto/keys/CryptoKeyAES.h: Copied from Source/WebCore/crypto/CryptoKeyAES.h.
* crypto/mac/CryptoKeyMac.cpp: Copied from Source/WebCore/crypto/CryptoKeyMac.cpp.
* crypto/parameters/CryptoAlgorithmAesCbcParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesCbcParams.h.
* crypto/parameters/CryptoAlgorithmAesKeyGenParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h.
2013-11-08 Alexey Proskuryakov <ap@apple.com>
Implement JWK key import for HMAC and AES-CBC
https://bugs.webkit.org/show_bug.cgi?id=124059
Reviewed by Anders Carlsson.
Tests: crypto/subtle/aes-cbc-import-jwk.html
crypto/subtle/hmac-import-jwk.html
crypto/subtle/import-jwk.html
WebCrypto supports multiple key formats - raw, pkcs8, spki, jwk. The design is that
we'll transform these into parsed KeyData subclasses before passing to algorithms.
CryptoKeySerialization is a base class for handling all these formats.
* WebCore.xcodeproj/project.pbxproj: Added new files. Removed CryptoKeyFormat.h.
* bindings/js/JSCryptoKeySerializationJWK.h: Added.
* bindings/js/JSCryptoKeySerializationJWK.cpp: Added.
(WebCore::getStringFromJSON): A helper. Note that we can rely on the object being
a nice freshly parsed JSON, no getters or anything.
(WebCore::getBooleanFromJSON): Ditto.
(WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
(WebCore::JSCryptoKeySerializationJWK::~JSCryptoKeySerializationJWK):
(WebCore::createHMACParameters): A simple helper.
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): WebCrypto API is weird,
you can have algorithm parameters both inside a JWK key and passed as importKey()
arguments. They need to agree, whatever that means for specific serialization's
algorithm options (not all necessarily have a 1-1 matching to WebCrypto).
(WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Take an intersection of usages.
(WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Only extractable if
both JWK and the caller agree.
(WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Verify validity of JWK key.
(WebCore::JSCryptoKeySerializationJWK::keyData): Return an appropriate KeyData
subclass.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::ENUM_CLASS): Moved CryptoKeyFormat here.
(WebCore::cryptoKeyFormatFromJSValue): Added a human readable string to an exception.
(WebCore::JSSubtleCrypto::importKey): Support multiple key formats, not just raw.
* crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::importKey):
* crypto/CryptoAlgorithm.h:
Updated signature for importKey to one that makes more sense. Decoding formats all
the way from a binary blob is not something that CryptoAlgorithm subclasses should
do, we now pass a KeyData subclass instead.
Removed exportKey/wrapKey/unwrapKey altogether, because I don't yet know what the
signatures will be.
* crypto/CryptoKeyData.h: Added.
(WebCore::CryptoKeyData::ENUM_CLASS):
(WebCore::CryptoKeyData::CryptoKeyData):
(WebCore::CryptoKeyData::~CryptoKeyData):
(WebCore::CryptoKeyData::format):
A base class for passing key material to algorithms. Currently, only one type is
supported, that being OctetSequence for secret keys. Keys for RSA and EC are more
complicated, and secret/public ones are different too.
* crypto/CryptoKeyFormat.h: Removed. There are too many key format classes
confusingly floating around, and this was only needed in one file for parsing.
* crypto/CryptoKeySerialization.h: Added.
Base class for handling raw/pkcs8/spki/jwk keys.
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmAES_CBC.h:
Updated to use CryptoKeyData.
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.h:
Updated to use CryptoKeyData.
* crypto/keys/CryptoKeyDataOctetSequence.cpp: Added.
(WebCore::CryptoKeyDataOctetSequence::CryptoKeyDataOctetSequence):
(WebCore::CryptoKeyDataOctetSequence::~CryptoKeyDataOctetSequence):
* crypto/keys/CryptoKeyDataOctetSequence.h: Added.
(WebCore::asCryptoKeyDataOctetSequence):
* crypto/keys/CryptoKeySerializationRaw.cpp: Added.
(WebCore::CryptoKeySerializationRaw::CryptoKeySerializationRaw):
(WebCore::CryptoKeySerializationRaw::~CryptoKeySerializationRaw):
(WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
(WebCore::CryptoKeySerializationRaw::reconcileUsages):
(WebCore::CryptoKeySerializationRaw::reconcileExtractable):
(WebCore::CryptoKeySerializationRaw::keyData):
* crypto/keys/CryptoKeySerializationRaw.h: Added.
Much code to pass around a Vector<char>.
2013-11-08 Mark Lam <mark.lam@apple.com>
Move breakpoint (and exception break) functionality into JSC::Debugger.
https://bugs.webkit.org/show_bug.cgi?id=121796.
Reviewed by Geoffrey Garen.
No new tests.
- In ScriptDebugServer and JSC::Debugger, SourceID and BreakpointID are
now numeric tokens.
- JSC::Debugger now tracks user defined breakpoints in a JSC::Breakpoint
record. Previously, this info is tracked in the ScriptBreakpoint record
in ScriptDebugServer. The only element of ScriptBreakpoint that is not
being tracked by JSC::Breakpoint is the ScriptBreakpointAction.
The ScriptBreakpointAction is still tracked by the ScriptDebugServer
in a list keyed on the corresponding BreakpointID.
The ScriptBreakpoint record is now only used as a means of passing
breakpoint paramaters to the ScriptDebugServer.
- ScriptDebugServer now no longer accesses the JSC::CallFrame* directly.
It always goes through the DebuggerCallFrame.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/BreakpointID.h: Added.
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::ScriptDebugServer):
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::clearBreakpoints):
(WebCore::ScriptDebugServer::dispatchDidPause):
(WebCore::ScriptDebugServer::dispatchDidContinue):
(WebCore::ScriptDebugServer::dispatchDidParseSource):
(WebCore::ScriptDebugServer::notifyDoneProcessingDebuggerEvents):
(WebCore::ScriptDebugServer::needPauseHandling):
(WebCore::ScriptDebugServer::handleBreakpointHit):
(WebCore::ScriptDebugServer::handleExceptionInBreakpointCondition):
(WebCore::ScriptDebugServer::handlePause):
* bindings/js/ScriptDebugServer.h:
* bindings/js/SourceID.h: Added.
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
* bindings/js/WorkerScriptDebugServer.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::parseLocation):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::continueToLocation):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::getScriptSource):
(WebCore::InspectorDebuggerAgent::didParseSource):
(WebCore::InspectorDebuggerAgent::didPause):
(WebCore::InspectorDebuggerAgent::clear):
* inspector/InspectorDebuggerAgent.h:
* inspector/ScriptDebugListener.h:
2013-11-08 László Langó <lango@inf.u-szeged.hu>
InspectorConsoleAgent::didFinishXHRLoading ConsoleMessage should include a column number
https://bugs.webkit.org/show_bug.cgi?id=114316
Reviewed by Timothy Hatcher.
InspectorConsoleAgent::didFinishXHRLoading creates a ConsoleMessage with a line number,
but it should also include a column number. It looks like ultimately the line number comes from
JSXMLHttpRequest::send, it should also be possible to get the column number at the time.
The column number would be needed by the Web Inspector to jump to the proper place in source code
to show where the XHR originated from.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::SendFunctor::SendFunctor):
(WebCore::SendFunctor::column):
(WebCore::SendFunctor::operator()):
(WebCore::JSXMLHttpRequest::send):
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didFinishXHRLoading):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber):
(WebCore::XMLHttpRequest::didFinishLoading):
* xml/XMLHttpRequest.h:
2013-11-08 Simon Fraser <simon.fraser@apple.com>
Left sidebar on cubic-bezier.com flickers
https://bugs.webkit.org/show_bug.cgi?id=123128
Reviewed by Dean Jackson.
The logic that determined whether position:fixed elements outside the viewport
should be composited was incorrect if the fixed element also had a transform.
layer.calculateLayerBounds() only takes into account painted transforms (since they
affect layer bounds). So we need to compute the bounds relative to the layer
itself, then use localToContainerQuad() to map them to document coordinates,
but only to the RenderView so that we don't hit the page scale transform.
Tests: compositing/layer-creation/fixed-position-transformed-into-view.html
compositing/layer-creation/fixed-position-transformed-outside-view.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2013-11-08 Martin Robinson <mrobinson@igalia.com>
[MathML] Center of stretched curly bracket not always vertically centered
https://bugs.webkit.org/show_bug.cgi?id=123715
Reviewed by Brent Fulgham.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Update an assertion and
handle the case where two glyph pieces abut.
(WebCore::RenderMathMLOperator::paint): Do not offset the center glyph by y().
2013-10-30 Jer Noble <jer.noble@apple.com>
[MSE] Bring SourceBuffer.append up to the most recent spec.
https://bugs.webkit.org/show_bug.cgi?id=123377
Reviewed by Eric Carlson.
Test: media/media-source/media-source-append-failed.html
Bring the MediaSource append() implementation up to the current spec.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferInternal):
(WebCore::SourceBuffer::appendBufferTimerFired):
* platform/graphics/SourceBufferPrivate.h:
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
(WebCore::MockSourceBufferPrivate::append):
(WebCore::MockSourceBufferPrivate::evictCodedFrames):
(WebCore::MockSourceBufferPrivate::isFull):
* platform/mock/mediasource/MockSourceBufferPrivate.h:
2013-11-07 Jer Noble <jer.noble@apple.com>
[Mac] Crash at com.apple.WebCore: WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange + 26
https://bugs.webkit.org/show_bug.cgi?id=124031
Reviewed by Eric Carlson.
WTF::bind() causes errors when given a bare id pointer as a parameter,
when that parameter is casted to a specific NS type pointer (in this
case, a NSArray*) in order to pass it as a parameter to the bound
function.
Instead of passing around bare id pointers, wrap them in RetainPtr<>
objects before passing them to WTF::bind().
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2013-11-08 Antti Koivisto <antti@apple.com>
Templated LChar/UChar paths for simple line layout
https://bugs.webkit.org/show_bug.cgi?id=124035
Reviewed by Andreas Kling.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseFor):
Use a templated function to check for illegal characters.
(WebCore::SimpleLineLayout::skipWhitespaces):
Make a template function.
(WebCore::SimpleLineLayout::textWidth):
Make a template function plus some argument changes.
(WebCore::SimpleLineLayout::createTextRuns):
Template function for creating runs while operating with either LChars or UChar.
Also simplified line breaking and text width measuring logic.
(WebCore::SimpleLineLayout::create):
Pick the template.
* rendering/break_lines.cpp:
* rendering/break_lines.h:
Move the implementation to the header (except for the table) so we can use the template
versions directly.
(WebCore::isBreakableSpace):
(WebCore::shouldBreakAfter):
(WebCore::needsLineBreakIterator):
(WebCore::nextBreakablePosition):
(WebCore::nextBreakablePositionIgnoringNBSP):
2013-11-08 Mario Sanchez Prada <mario.prada@samsung.com>
AX: [ATK] <span> elements exposed through ATK when not needed
https://bugs.webkit.org/show_bug.cgi?id=123885
Reviewed by Chris Fleizach.
As per SVN r158195, the way it's decided whether <span> elements
should be ignored or not has slightly changed, causing that the
GTK/EFL ports expose them in cases that they should be ignored,
such as for text elements that neither are focusable (e.g. by
explicitly setting tabindex) nor have a meaningful accessible name
suggesting they should be exposed.
As a result, the flattening that ATK based ports normally do for
this kind of elements (by folding them into their parents) do not
work correctly anymore, making two tests to fail:
platform/gtk/accessibility/spans-paragraphs-and-divs.html
platform/gtk/accessibility/spans.html
This patch encapsulates the part of the logic that affects this in
the computeAccessibilityIsIgnored() method, placing it in a
new method of AccessibilityObject that we can call from ATK's
accessibilityPlatformIncludesObject() to ensure we hide those
<span> elements when they don't fulfill those requirements.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasAttributesRequiredForInclusion):
New virtual method encapsulating part of the logic from the function
that computes whether accessibility should be ignored or not.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion):
Override of the new method adding additional checks, as extracted from
the original bits in computeAccessibilityIsIgnored().
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
Use the newly added function where we had the original code before.
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Make sure <span> elements are ignored if they are not focusable
and they don't have a meaningful accessible name.
2013-11-08 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add missing symbols to WebKitDOMEventTarget.symbols
https://bugs.webkit.org/show_bug.cgi?id=123990
Reviewed by Philippe Normand.
Add webkit_dom_event_target_add_event_listener_with_closure and
webkit_dom_event_target_remove_event_listener_with_closure to the
symbols files.
* bindings/gobject/WebKitDOMEventTarget.symbols:
* bindings/gobject/webkitdom.symbols:
2013-11-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use deprecation guards around deprecated API in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=123899
Reviewed by Martin Robinson.
Do not include deprecated API when compiling with
WEBKIT_DISABLE_DEPRECATED option.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
2013-11-07 Brady Eidson <beidson@apple.com>
Enhance SQL journal_mode setting code to be less likely to log an error.
<rdar://problem/15418577> and https://bugs.webkit.org/show_bug.cgi?id=124018
Reviewed by Anders Carlsson.
Even though the docs says SQLITE_ROW will always be returned, apparently SQLITE_OK is sometimes returned.
Change the code to handle that.
* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::open): Save the statement result value, and accept SQLITE_OK as a non-error condition.
2013-11-07 Brady Eidson <beidson@apple.com>
Update an out-dated ASSERT in IconDatabase code.
<rdar://problem/15171118> and https://bugs.webkit.org/show_bug.cgi?id=124030.
Reviewed by Andreas Kling.
With the asynchronous interfaces that have been added and the support for WK2 that has been added,
this ASSERT can incorrectly fire if an icon is asked for before database cleanup is allowed.
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::synchronousIconForPageURL): Update an invalid ASSERT.
2013-11-07 Andreas Kling <akling@apple.com>
RenderSVGResource helpers should take RenderStyle by const reference.
<https://webkit.org/b/124029>
Take const RenderStyle& instead of RenderStyle* in a few more places
so we can get rid of some ampersands and assertions.
Reviewed by Anders Carlsson.
2013-11-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[AX] Generate toAccessibilityTableRow|Column|Cell to detect bad type casts
https://bugs.webkit.org/show_bug.cgi?id=123984
Reviewed by Mario Sanchez Prada.
As a step to let static_cast<> use TYPE_CASTS_BASE, AccessibilityTableRow|Column|Cell use
ACCESSIBILITY_OBJECT_TYPE_CASTS which can support more helper functions rather than manual
static_cast<>. This change will help to detect bad type casts further.
No new tests, no behavior changes.
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addTableCellChild):
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::rowHeaders):
(WebCore::AccessibilityTable::columnHeaders):
(WebCore::AccessibilityTable::cellForColumnAndRow):
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableColumn.h:
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::headerObject):
* accessibility/AccessibilityTableRow.h:
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(cellAtIndex):
(webkitAccessibleTableGetColumnHeader):
(webkitAccessibleTableGetRowHeader):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper tableCellParent]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-11-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
REGRESSION (r154375): Image is oriented incorrectly
https://bugs.webkit.org/show_bug.cgi?id=123831
Reviewed by Antonio Gomes.
r154375 made that shouldRespectImageOrientation() isn't used by drawImage().
It causes an image isn't oriented correctly. This patch sets shouldRespectImageOrientation()
value by default.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
2013-11-07 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Image shape-outside with vertical gaps is handled incorrectly
https://bugs.webkit.org/show_bug.cgi?id=123934
Reviewed by Andreas Kling.
RasterShapeIntervals::getExcludedIntervals() was returning an empty
list when the line overlapped any vertical gap in the image. This short-circuit
had been mistakenly copied from getIncludedIntervals(), where it makes sense.
Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-vgap.html
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::getExcludedIntervals):
2013-11-07 Simon Fraser <simon.fraser@apple.com>
Make contents layer borders more visible
https://bugs.webkit.org/show_bug.cgi?id=124025
Reviewed by Tim Horton.
Layer borders for contents layers are impossible to see when the
contentsLayer has the same bounds as its parent; make the contents
layer border 4px thick to make it more visible.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setupContentsLayer):
2013-11-07 Andreas Kling <akling@apple.com>
InlineFlowBox always has a RenderBoxModelObject, take advantage.
<https://webkit.org/b/124024>
Since InlineFlowBox already has the branch-less renderer() returning
a RenderBoxModelObject&, avoid using InlineBox::boxModelObject()
wherever we have a tightly-typed box. One branch disappears from
every call site.
Deleted boxModelObject() on InlineFlowBox to prevent new code from
calling the less efficient function.
Reviewed by Anders Carlsson.
2013-11-07 Andreas Kling <akling@apple.com>
CTTE: Scrolling tree nodes should always have a ScrollingTree&.
<https://webkit.org/b/124022>
Let ScrollingTreeNode and subclasses store the backpointer to the
tree as a ScrollingTree& reference.
Reviewed by Anders Carlsson.
2013-11-07 Simon Fraser <simon.fraser@apple.com>
Lots of layers get solid color but transparent contents layers now
https://bugs.webkit.org/show_bug.cgi?id=123537
Reviewed by Tim Horton.
We call rendererBackgroundColor() to determine the layer's background color,
but on most elements this returns the transparent color (a valid color).
This caused us to allocate a contentsLayer, and use the transparent color as its
backgroundColor, which was wasteful.
Fix by only making a background-color layer if the color is not transparent (zero alpha).
Also avoid making a new contents layer on every color change, and make sure that
we don't do implicit animations for backgroundColor, and some other properties
that were omitted by mistake.
Layer tree dumps don't dump content layers, so no way to test easily.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(nullActionsDictionary):
2013-11-07 Ryosuke Niwa <rniwa@webkit.org>
DOMTokenList::add can add duplicated values if arguments had duplicated values
https://bugs.webkit.org/show_bug.cgi?id=123962
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/bd3822ad4ae3fc5d8f89f433a7bf04f697334305
In case we do element.classList.add('a', 'a') we need to ensure that we do not add the same token twice.
See http://dom.spec.whatwg.org/#dom-domtokenlist-add
* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::add): Make sure filtered tokens are unique among themselves.
2013-11-07 Eric Carlson <eric.carlson@apple.com>
Remove npr.org specific hack in HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=123859
Reviewed by Jer Noble.
Remove the site specific hack added in r57820, it is no longer necessary.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_dispatchingCanPlayEvent.
(HTMLMediaElement::play): Don't special case npr.org.
* html/HTMLMediaElement.h:
2013-11-07 Simon Fraser <simon.fraser@apple.com>
Attempt to fix the 32-bit build. Virtual thunks seem to have different
symbol names between 32- and 64-bit.
* WebCore.exp.in:
2013-11-07 Ryosuke Niwa <rniwa@webkit.org>
Crash in HTMLMediaElement::contextDestroyed
https://bugs.webkit.org/show_bug.cgi?id=123963
Reviewed by Eric Carlson.
Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
2013-11-07 Jer Noble <jer.noble@apple.com>
[Mac] Crash at com.apple.WebCore: -[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:] + 2084
https://bugs.webkit.org/show_bug.cgi?id=124012
Reviewed by Eric Carlson.
The value of the 'duration' key is a NSConcreteValue wrapping a CMTime, not a NSNumber.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2013-11-07 Ryosuke Niwa <rniwa@webkit.org>
Crash when submitting form in a document with null encoding
https://bugs.webkit.org/show_bug.cgi?id=123975
Reviewed by Alexey Proskuryakov.
Merge https://chromium.googlesource.com/chromium/blink/+/bba01a7fff09e3053ada96ababac2a6e4261fe5f
The CString object which is passed to normalizeLineEndingsToCRLF() can be
a null string. It is created in FormDataList::appendString(), and it
produces a null CString if FormDataList::m_encoding is a null encoding.
Test: fast/forms/form-submit-in-image-document.html
* platform/text/LineEnding.cpp:
(internalNormalizeLineEndingsToCRLF):
2013-11-07 Anders Carlsson <andersca@apple.com>
Use std::function for all policy continuation functions
https://bugs.webkit.org/show_bug.cgi?id=124011
Reviewed by Sam Weinig.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::responseReceived):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::loadPostRequest):
* loader/PolicyCallback.cpp:
(WebCore::PolicyCallback::clear):
(WebCore::PolicyCallback::set):
(WebCore::PolicyCallback::call):
(WebCore::PolicyCallback::clearRequest):
(WebCore::PolicyCallback::cancel):
* loader/PolicyCallback.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):
* loader/PolicyChecker.h:
2013-11-07 Brady Eidson <beidson@apple.com>
Use SQLite journal mode WAL (WriteAheadLogging)
https://bugs.webkit.org/show_bug.cgi?id=124009
Reviewed by Anders Carlsson.
WriteAheadLogging journalling is better than the traditional rollback model.
* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::open): Use a PRAGMA to set journal_mode to WAL.
2013-11-07 Mark Lam <mark.lam@apple.com>
Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
https://bugs.webkit.org/show_bug.cgi?id=123945.
Reviewed by Geoffrey Garen.
No new tests.
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::functionDetails):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::sourceID):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::ScriptDebugServer):
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::clearBreakpoints):
(WebCore::ScriptDebugServer::updateCallFrame):
(WebCore::ScriptDebugServer::pauseIfNeeded):
* bindings/js/ScriptDebugServer.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::parseLocation):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDebuggerAgent::continueToLocation):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getScriptSource):
(WebCore::InspectorDebuggerAgent::compileScript):
(WebCore::InspectorDebuggerAgent::runScript):
(WebCore::InspectorDebuggerAgent::didParseSource):
(WebCore::InspectorDebuggerAgent::didPause):
(WebCore::InspectorDebuggerAgent::clear):
(WebCore::InspectorDebuggerAgent::reset):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
* inspector/InspectorInstrumentation.h:
* inspector/ScriptDebugListener.h:
2013-11-07 Cidorvan Leite <cidorvan.leite@openbossa.org>
Avoid invalid cairo matrix when drawing surfaces too small
https://bugs.webkit.org/show_bug.cgi?id=123810
Drawing surfaces too small makes inverse matrix with values too big,
when this happen, cairo context is not valid anymore and it stops to draw anything.
Reviewed by Martin Robinson.
Test: fast/canvas/drawImage-with-small-values.html
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::drawSurfaceToContext):
2013-11-07 Antti Koivisto <antti@apple.com>
Simple line layout crashes with SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=124002
Reviewed by Simon Fraser.
Don't use simple line layout for flows using SVG fonts. They crash if kerning is enabled.
Test: fast/text/svg-font-simple-line-crash.html
* platform/graphics/Font.h:
(WebCore::Font::isSVGFont):
Add isSVGFont() so callers don't need to go via primaryFont().
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::constructTextRun):
* rendering/RenderBlock.cpp:
(WebCore::constructTextRunInternal):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
Disallow SVG fonts.
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::constructTextRun):
(WebCore::SVGTextMetrics::SVGTextMetrics):
* rendering/svg/SVGTextRunRenderingContext.h:
Get rid of the abstract textRunNeedsRenderingContext in favor of just testing isSVGFont().
2013-11-07 Simon Fraser <simon.fraser@apple.com>
Allow customization of the contentsScale of TileController tiles
https://bugs.webkit.org/show_bug.cgi?id=124004
Reviewed by Tim Horton.
On some platorms, zooming out on pages with TiledBacking compositing
layers can cause very high memory use, because the TiledBacking retains
the original page scale while the zoom is in flight, but can be asked
to cover a large area.
Make it possible to reduce memory use in this case by allowing RenderLayerCompositor
to provide an additional scale factor for newly created tiles. Platforms can
then customize this to create low-res tiles when necessary.
* WebCore.exp.in:
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::contentsScaleMultiplierForNewTiles):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerContentsScaleMultiplierForNewTiles):
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::setScale):
(WebCore::TileController::createTileLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::contentsScaleMultiplierForNewTiles):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
* rendering/RenderLayerCompositor.h:
2013-11-07 Jer Noble <jer.noble@apple.com>
Unreviewed Win build fix after r158855; wrap shapeInfoForFloat() in an ENABLE(CSS_SHAPES) guard.
* rendering/FloatingObjects.cpp:
2013-11-07 Bem Jones-Bey <bjonesbe@adobe.com>
Refactor logical left/right offset for line methods
https://bugs.webkit.org/show_bug.cgi?id=123898
Reviewed by David Hyatt.
Simplify the logical left/right offset for line methods and their
implementation, including the ComputeFloatOffsetAdapter. This also
reduces the number of line offset methods in RenderBlock.
No new tests, no behavior change.
* rendering/FloatingObjects.cpp:
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::ComputeFloatOffsetAdapter::offset): Add a method to return
the offset instead of using a confusing out parameter.
(WebCore::::shapeOffset): Method to return the offset modified by the
shape delta. Moving the computation to this method allowed for
simplification of the users of ComputeFloatOffsetAdapter.
(WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat): Added this
method so that ShapeOutsideFloatOffsetMode isn't needed. Returns the
offset based on the float margin box.
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat): Ditto.
(WebCore::FloatingObjects::logicalLeftOffset): This now only returns
the offset based on the shape's contour.
(WebCore::FloatingObjects::logicalRightOffset): Ditto.
(WebCore::::heightRemaining): Rename to properly follow the getter
naming convention.
* rendering/FloatingObjects.h:
* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalRightOffsetForLine): Update to remove
use of ShapeOutsideFloatOffsetMode and heightRemaining.
(WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::logicalLeftOffsetForPositioningFloat):
Positioning a float is the only case where the float margin box
should be used, and also the only case where heightRemaining is
needed. This handles that case.
(WebCore::RenderBlockFlow::logicalRightOffsetForPositioningFloat):
Ditto.
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat): Update to
use logical(Left|Right)OffsetForPositioningFloatOnLine.
(WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine): Update to
remove use for ShapeOutsideFloatOffsetMode and heightRemaining.
(WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine): Ditto.
* rendering/RenderBlockFlow.h:
2013-11-07 Alexandru Chiculita <achicu@adobe.com>
Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
https://bugs.webkit.org/show_bug.cgi?id=123577
Reviewed by Timothy Hatcher.
Test: inspector-protocol/model/content-flow-content-removal.html
Do not send unregister events for the content nodes of a flow when the element is not part of the DOM
anymore. We already send an unbind event, so the inspector is already notified that the node was removed.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
2013-10-30 Jer Noble <jer.noble@apple.com>
[MSE] Add mock MediaSource classes for testing.
https://bugs.webkit.org/show_bug.cgi?id=123322
Reviewed by Eric Carlson.
Tests: media/media-source/media-source-addsourcebuffer.html
media/media-source/media-source-append-buffer.html
media/media-source/media-source-canplaythrough.html
media/media-source/media-source-closed.html
media/media-source/media-source-play.html
media/media-source/media-source-track-enabled.html
media/media-source/media-source-tracks.html
Add mock implementation of platform MediaSource classes, allowing ports to test the
MediaSource API without having a platform implementation.
The MockMediaSource will support a byteformat defined in MockBox.h: a simple box-style media
format with an initialization segment containing a number of tracks, followed by a list of
samples.
Add a means to insert a new media engine factory at runtime, so the internals object can add
a MockMediaSourceMediaPlayer:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine):
* platform/graphics/MediaPlayer.h:
* testing/Internals.cpp:
(WebCore::Internals::initializeMockMediaSource):
* testing/Internals.h:
* testing/Internals.idl:
For non-media-source supporting media engines, fail immediately when asked to load a media
source, so that the MockMediaSourceMediaPlayer will be instantiated as a fall-back:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::load):
(WebCore::MediaPlayerPrivateQTKit::supportsType):
Add new files to the project:
* WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/WebCore.exp.in:
Update the MediaSource implementation:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::monitorSourceBuffers): Add a link to the spec.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::buffered): Ditto.
(WebCore::SourceBuffer::setTimestampOffset): Ditto.
(WebCore::SourceBuffer::validateInitializationSegment): Ditto.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto. Also,
bring the implementation up to date with part of the spec.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Remove "Predicate" from
SampleIsRandomAccessPredicate.
Add utility classes to parse and represent the bytestream supported by the MockMediaSource:
* platform/mock/mediasource/MockBox.cpp: Added.
(WebCore::MockBox::MockBox):
(WebCore::MockBox::peekType):
(WebCore::MockBox::peekLength):
(WebCore::MockTrackBox::MockTrackBox):
(WebCore::MockTrackBox::type):
(WebCore::MockInitializationBox::MockInitializationBox):
(WebCore::MockInitializationBox::type):
(WebCore::MockSampleBox::MockSampleBox):
(WebCore::MockSampleBox::type):
* platform/mock/mediasource/MockBox.h: Added.
(WebCore::MockBox::length):
(WebCore::MockBox::type):
(WebCore::MockTrackBox::trackID):
(WebCore::MockTrackBox::codec):
(WebCore::MockTrackBox::kind):
(WebCore::MockInitializationBox::duration):
(WebCore::MockInitializationBox::tracks):
(WebCore::MockSampleBox::presentationTimestamp):
(WebCore::MockSampleBox::decodeTimestamp):
(WebCore::MockSampleBox::duration):
(WebCore::MockSampleBox::trackID):
(WebCore::MockSampleBox::flags):
(WebCore::MockSampleBox::isSync):
Add a MediaPlayerPrivate implementation which uses MockMediaSource:
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Added.
(WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
(WebCore::MockMediaPlayerMediaSource::create):
(WebCore::mimeTypeCache):
(WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
(WebCore::MockMediaPlayerMediaSource::supportsType):
(WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
(WebCore::MockMediaPlayerMediaSource::~MockMediaPlayerMediaSource):
(WebCore::MockMediaPlayerMediaSource::load):
(WebCore::MockMediaPlayerMediaSource::cancelLoad):
(WebCore::MockMediaPlayerMediaSource::play):
(WebCore::MockMediaPlayerMediaSource::pause):
(WebCore::MockMediaPlayerMediaSource::naturalSize):
(WebCore::MockMediaPlayerMediaSource::hasVideo):
(WebCore::MockMediaPlayerMediaSource::hasAudio):
(WebCore::MockMediaPlayerMediaSource::setVisible):
(WebCore::MockMediaPlayerMediaSource::seeking):
(WebCore::MockMediaPlayerMediaSource::paused):
(WebCore::MockMediaPlayerMediaSource::networkState):
(WebCore::MockMediaPlayerMediaSource::readyState):
(WebCore::MockMediaPlayerMediaSource::buffered):
(WebCore::MockMediaPlayerMediaSource::didLoadingProgress):
(WebCore::MockMediaPlayerMediaSource::setSize):
(WebCore::MockMediaPlayerMediaSource::paint):
(WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
(WebCore::MockMediaPlayerMediaSource::durationDouble):
(WebCore::MockMediaPlayerMediaSource::seekDouble):
(WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
(WebCore::MockMediaPlayerMediaSource::updateDuration):
(WebCore::MockMediaPlayerMediaSource::setReadyState):
* platform/mock/mediasource/MockMediaPlayerMediaSource.h: Added.
Add a mock implementation of MediaSourcePrivate, which uses MockSourceBuffer:
* platform/mock/mediasource/MockMediaSourcePrivate.cpp: Added.
(WebCore::MockMediaSourcePrivate::create):
(WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
(WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate):
(WebCore::MockMediaSourcePrivate::addSourceBuffer):
(WebCore::MockMediaSourcePrivate::removeSourceBuffer):
(WebCore::MockMediaSourcePrivate::duration):
(WebCore::MockMediaSourcePrivate::setDuration):
(WebCore::MockMediaSourcePrivate::markEndOfStream):
(WebCore::MockMediaSourcePrivate::unmarkEndOfStream):
(WebCore::MockMediaSourcePrivate::readyState):
(WebCore::MockMediaSourcePrivate::setReadyState):
(WebCore::MockMediaSourcePrivate::sourceBufferPrivateDidChangeActiveState):
(WebCore::MockSourceBufferPrivateHasAudio):
(WebCore::MockMediaSourcePrivate::hasAudio):
(WebCore::MockSourceBufferPrivateHasVideo):
(WebCore::MockMediaSourcePrivate::hasVideo):
* platform/mock/mediasource/MockMediaSourcePrivate.h: Added.
(WebCore::MockMediaSourcePrivate::activeSourceBuffers):
(WebCore::MockMediaSourcePrivate::player):
Add a mock implementation of SourceBufferPrivate, which uses MockBoxes to parse the
bytestream provided by SourceBuffer:
* platform/mock/mediasource/MockSourceBufferPrivate.cpp: Added.
(WebCore::MockMediaSample::create):
(WebCore::MockMediaSample::~MockMediaSample):
(WebCore::MockMediaSample::MockMediaSample):
(WebCore::MockMediaSample::platformSample):
(WebCore::MockMediaDescription::create):
(WebCore::MockMediaDescription::~MockMediaDescription):
(WebCore::MockMediaDescription::MockMediaDescription):
(WebCore::MockSourceBufferPrivate::create):
(WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
(WebCore::MockSourceBufferPrivate::~MockSourceBufferPrivate):
(WebCore::MockSourceBufferPrivate::setClient):
(WebCore::MockSourceBufferPrivate::append):
(WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
(WebCore::MockSourceBufferPrivate::didReceiveSample):
(WebCore::MockSourceBufferPrivate::abort):
(WebCore::MockSourceBufferPrivate::removedFromMediaSource):
(WebCore::MockSourceBufferPrivate::readyState):
(WebCore::MockSourceBufferPrivate::setReadyState):
(WebCore::MockSourceBufferPrivate::hasVideo):
(WebCore::MockSourceBufferPrivate::hasAudio):
* platform/mock/mediasource/MockSourceBufferPrivate.h: Added.
Create mock implementations of AudioTrackPrivate, VideoTrackPrivate, and TextTrackPrivate
which wrap the MockTrackBox class:
* platform/mock/mediasource/MockTracks.cpp: Added.
* platform/mock/mediasource/MockTracks.h: Added.
(WebCore::MockAudioTrackPrivate::create):
(WebCore::MockAudioTrackPrivate::~MockAudioTrackPrivate):
(WebCore::MockAudioTrackPrivate::id):
(WebCore::MockAudioTrackPrivate::MockAudioTrackPrivate):
(WebCore::MockTextTrackPrivate::create):
(WebCore::MockTextTrackPrivate::~MockTextTrackPrivate):
(WebCore::MockTextTrackPrivate::id):
(WebCore::MockTextTrackPrivate::MockTextTrackPrivate):
(WebCore::MockVideoTrackPrivate::create):
(WebCore::MockVideoTrackPrivate::~MockVideoTrackPrivate):
(WebCore::MockVideoTrackPrivate::id):
(WebCore::MockVideoTrackPrivate::MockVideoTrackPrivate):
2013-11-07 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Changing MediaStreamDescriptor to MediaStreamPrivate
https://bugs.webkit.org/show_bug.cgi?id=123935
Reviewed by Eric Carlson.
No new tests needed.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create):
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::~MediaStream):
(WebCore::MediaStream::ended):
(WebCore::MediaStream::setEnded):
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::removeRemoteSource):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamRegistry.cpp:
(WebCore::MediaStreamRegistry::registerURL):
(WebCore::MediaStreamRegistry::unregisterURL):
(WebCore::MediaStreamRegistry::lookupMediaStreamPrivate):
* Modules/mediastream/MediaStreamRegistry.h:
* Modules/mediastream/MediaStreamTrack.cpp:
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addStream):
(WebCore::RTCPeerConnection::removeStream):
(WebCore::RTCPeerConnection::didAddRemoteStream):
(WebCore::RTCPeerConnection::didRemoveRemoteStream):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::didCreateStream):
(WebCore::UserMediaRequest::callSuccessHandler):
* Modules/mediastream/UserMediaRequest.h:
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::loadResource):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::toWebMediaStreamPrivate):
(WebCore::MediaPlayerPrivate::lookupMediaStream):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
* platform/mediastream/MediaStreamCenter.cpp:
* platform/mediastream/MediaStreamCreationClient.h:
* platform/mediastream/MediaStreamPrivate.cpp: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp.
(WebCore::MediaStreamPrivate::create):
(WebCore::MediaStreamPrivate::addSource):
(WebCore::MediaStreamPrivate::removeSource):
(WebCore::MediaStreamPrivate::addRemoteSource):
(WebCore::MediaStreamPrivate::removeRemoteSource):
(WebCore::MediaStreamPrivate::addRemoteTrack):
(WebCore::MediaStreamPrivate::removeRemoteTrack):
(WebCore::MediaStreamPrivate::MediaStreamPrivate):
(WebCore::MediaStreamPrivate::setEnded):
(WebCore::MediaStreamPrivate::addTrack):
(WebCore::MediaStreamPrivate::removeTrack):
* platform/mediastream/MediaStreamPrivate.h: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.h.
(WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
(WebCore::MediaStreamPrivate::~MediaStreamPrivate):
(WebCore::MediaStreamPrivate::client):
(WebCore::MediaStreamPrivate::setClient):
(WebCore::MediaStreamPrivate::id):
(WebCore::MediaStreamPrivate::numberOfAudioSources):
(WebCore::MediaStreamPrivate::audioSources):
(WebCore::MediaStreamPrivate::numberOfVideoSources):
(WebCore::MediaStreamPrivate::videoSources):
(WebCore::MediaStreamPrivate::numberOfAudioTracks):
(WebCore::MediaStreamPrivate::audioTracks):
(WebCore::MediaStreamPrivate::numberOfVideoTracks):
(WebCore::MediaStreamPrivate::videoTracks):
(WebCore::MediaStreamPrivate::ended):
* platform/mediastream/MediaStreamSource.cpp:
* platform/mediastream/MediaStreamSource.h:
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
* platform/mediastream/mac/MediaStreamCenterMac.cpp:
(WebCore::MediaStreamCenterMac::createMediaStream):
* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::MockMediaStreamCenter::createMediaStream):
* platform/mock/RTCPeerConnectionHandlerMock.cpp:
(WebCore::RTCPeerConnectionHandlerMock::addStream):
(WebCore::RTCPeerConnectionHandlerMock::removeStream):
* platform/mock/RTCPeerConnectionHandlerMock.h:
2013-11-07 Denis Nomiyama <d.nomiyama@samsung.com>
[GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
https://bugs.webkit.org/show_bug.cgi?id=50619
Reviewed by Martin Robinson.
Implemented the OPENTYPE_VERTICAL feature for the GTK+ port. It resolves
the 90 degrees rotation problem of CJK characters when displaying
vertical text.
New tests are not required as the existing tests for vertical text will
work properly now.
* GNUmakefile.list.am: Added OpenTypeVerticalData.cpp and
OpenTypeVerticalData.h to platformgtk_sources.
* PlatformEfl.cmake: Added OpenTypeVerticalData.cpp.
* PlatformGTK.cmake: Added OpenTypeVerticalData.cpp.
* platform/graphics/FontCache.cpp: Originally the HashMap for
OpenTypeVerticalData was designed with FontFileKey as integer in the
Chromium port, which was an unique number provided by Skia. Since other
ports use FontFileKey as string, new generic hash functions had to be
implemented instead of using the specific ones for integers.
(WebCore::FontVerticalDataCacheKeyHash::hash): New hash function for
HashMap of OpenTypeVerticalData.
(WebCore::FontVerticalDataCacheKeyHash::equal): New function for
comparing hash indexes in the HashMap of OpenTypeVerticalData.
(WebCore::FontVerticalDataCacheKeyTraits::emptyValue): New function for
giving an empty FontFileKey.
(WebCore::FontVerticalDataCacheKeyTraits::constructDeletedValue): New
function to create a FontFileKey for deleted values.
(WebCore::FontVerticalDataCacheKeyTraits::isDeletedValue): New function
to check if a HashMap entry is available.
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Added font
orientation as a parameter to the FontPlatformData constructor.
* platform/graphics/freetype/FontPlatformData.h: Added m_orientation to
store the font orientation and m_horizontalOrientationMatrix to store
the Cairo matrix for horizontal orientation, which can be restored in
setOrientation().
(WebCore::FontPlatformData::FontPlatformData): Added font orientation as
a parameter.
(WebCore::FontPlatformData::orientation): Implemented this function
based on m_orientation.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp: Added new
helper function rotateCairoMatrixForVerticalOrientation() to rotate the
Cairo matrix in case of vertical orientation.
(WebCore::FontPlatformData::FontPlatformData): Initialized
m_orientation.
(WebCore::FontPlatformData::operator=): Added m_orientation and
m_horizontalOrientationMatrix to the assignment operator.
(WebCore::FontPlatformData::operator==): Added m_orientation to the
equal operator.
(WebCore::FontPlatformData::initializeWithFontFace): Rotated and
translated fonts if orientation is vertical. Also stored the horizontal
Cairo matrix.
(WebCore::FontPlatformData::verticalData): Returned the vertical data
from the font cache.
(WebCore::FontPlatformData::openTypeTable): Loaded the font table into
a shared buffer.
(WebCore::FontPlatformData::setOrientation): Replaced the scaled font
data by rotating fonts according to the new orientation.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::platformInit): Set the glyph's height and
width according to the font orientation. It also sets EM.
(WebCore::SimpleFontData::platformCreateScaledFontData): Added
orientation to the FontPlatformData constructor.
(WebCore::SimpleFontData::platformWidthForGlyph): Returned the glyph's
width according the orientation.
* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
(WebCore::CairoGetGlyphWidthAndExtents): Obtained the character advance
and extents according to the font orientation.
2013-11-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[AX] Use toAccessibilityRenderObject() instead of using static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=123986
Reviewed by Mario Sanchez Prada.
Though there is toAccessibilityRenderObject(), static_cast<> are being used by many places.
To use toAccessibilityRenderObject() is more helpful to find bad type cast.
No new tests, no behavior changes.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetElement):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-11-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[AX] Use toAccessibilityTable() instead of using manual static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=123982
Reviewed by Mario Sanchez Prada.
Though there is toAccessibilityTable(), static_cast<> are being used by many places.
We need to use toAccessibilityTable().
No new tests, no behavior changes.
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(cell):
(cellAtIndex):
(webkitAccessibleTableGetIndexAt):
(webkitAccessibleTableGetNColumns):
(webkitAccessibleTableGetNRows):
(webkitAccessibleTableGetColumnHeader):
(webkitAccessibleTableGetRowHeader):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper tableParent]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2013-11-07 Andreas Kling <akling@apple.com>
Use tighter InlineBox subtypes in some places.
<https://webkit.org/b/123980>
RenderLineBreak and RenderBox line box wrappers are always going to
be InlineElementBox, so codify this with tighter types. Also made
the various positionLine() functions take tighter reference types.
All the casting to renderer-appropriate box types happens inside of
RenderBlockFlow::computeBlockDirectionPositionsForLine() and
propagates from there.
Reviewed by Antti Koivisto.
2013-11-07 Mario Sanchez Prada <mario.prada@samsung.com>
AX: [ATK] Video and audio elements are not properly exposed
https://bugs.webkit.org/show_bug.cgi?id=123894
Reviewed by Chris Fleizach.
Expose <audio> and <video> elements with ATK_ROLE_EMBEDDED, so we
can identify them properly from ATK/AT-SPI based ATs.
Tests: platform/gtk/accessibility/media-controls-panel-title.html
platform/efl/accessibility/media-emits-object-replacement.html
platform/gtk/accessibility/media-emits-object-replacement.html
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole): Add the new mapping.
2013-11-07 Laszlo Vidacs <lac@inf.u-szeged.hu>
Fix crash in BitmapImage::destroyDecodedData()
https://bugs.webkit.org/show_bug.cgi?id=116494
Reviewed by Csaba Osztrogonác.
Merge from https://chromium.googlesource.com/chromium/blink/+/6b6887bf53068f8537908e501fdc7317ad2c6d86
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedData):
2013-11-06 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] CSSParser should reject <track-list> without a <track-size>
https://bugs.webkit.org/show_bug.cgi?id=118025
Reviewed by Andreas Kling.
From Blink r152914 by <jchaffraix@chromium.org>
Make sure that we parse at least 1 <track-size> inside each
<track-list>. The old parser code allowed track-lists exclusively
made of <track-name>. The way it was implemented eases the future
addition of parsing for the repeat() function.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackList):
* css/StyleResolver.cpp:
(WebCore::createGridTrackList): ASSERT if we don't find any
<track-size> now that we detect their absence in the parser.
2013-11-06 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Fix handling of 'inherit' and 'initial' for grid lines
https://bugs.webkit.org/show_bug.cgi?id=115401
Reviewed by Andreas Kling.
From Blink r150585 by <jchaffraix@chromium.org>
Added support for 'inherit' and 'initial' special values to
grid-auto-{columns|rows} and grid-definition-{columns|rows}.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty): Resolve 'initial' and 'inherit'.
* rendering/style/RenderStyle.h: Added initialNamedGrid{Column|Row}Lines().
* rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::StyleGridData): Initialize m_namedGrid{Column|Row}Lines.
2013-11-07 Andreas Kling <akling@apple.com>
Clean up BidiRun a little bit.
<https://webkit.org/b/123964>
Make BidiRun's member variables private and add accessors for them.
In doing so, codify the following:
- BidiRun always has a corresponding RenderObject.
- The inline box is never cleared after being set.
Reviewed by Antti Koivisto.
2013-11-07 Andreas Kling <akling@apple.com>
More CSSPrimitiveValue constructors should return PassRef.
<https://webkit.org/b/123953>
Make some more CSSPrimitiveValue constructor helpers (that are
known to never return null) return PassRef instead of PassRefPtr.
Reviewed by Antti Koivisto.
2013-11-07 Andreas Kling <akling@apple.com>
Generate type casting helpers for line boxes and use them.
<https://webkit.org/b/123976>
Semi-automatically generate the full set of toFooInlineBox()
helpers with macros instead of having them (partially) hand-coded.
Replaced static_casts with the new helpers across the codebase.
Also made the isFooInlineBox() overrides private since they should
never be called when the type is already known.
Reviewed by Antti Koivisto.
2013-11-07 Ryosuke Niwa <rniwa@webkit.org>
Simplify Attr by removing m_specified member variable and setter
https://bugs.webkit.org/show_bug.cgi?id=123965
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/597f44ec928e08820574728889adabc6d8ecd746
m_specified is always true in WebKit so simply return true in Attr::specified().
* dom/Attr.cpp:
(WebCore::Attr::Attr):
* dom/Attr.h:
* dom/Document.cpp:
(WebCore::Document::adoptNode):
2013-10-25 Jer Noble <jer.noble@apple.com>
[MSE] Add MediaSource extensions to AudioTrack, VideoTrack, and TextTrack.
https://bugs.webkit.org/show_bug.cgi?id=123374
Reviewed by Eric Carlson.
No tests added; tests will be added when Mock implementations are added in a future patch.
Add new partial interfaces for added methods on AudioTrack, TextTrack, and VideoTrack:
* Modules/mediasource/AudioTrackMediaSource.idl: Add read-only sourceBuffer attribute.
* Modules/mediasource/TextTrackMediaSource.idl: Ditto.
* Modules/mediasource/VideoTrackMediaSource.idl: Ditto.
* Modules/mediasource/AudioTrackMediaSource.h:
(WebCore::AudioTrackMediaSource::sourceBuffer): Added static wrapper around non-static sourceBuffer().
* Modules/mediasource/TextTrackMediaSource.h:
(WebCore::TextTrackMediaSource::sourceBuffer): Ditto.
* Modules/mediasource/VideoTrackMediaSource.h:
(WebCore::VideoTrackMediaSource::sourceBuffer): Ditto.
Add support for writable kind & language attributes through a custom setter:
* bindings/js/JSAudioTrackCustom.cpp:
(WebCore::JSAudioTrack::setKind):
(WebCore::JSAudioTrack::setLanguage):
* bindings/js/JSTextTrackCustom.cpp:
(WebCore::JSTextTrack::setKind):
(WebCore::JSTextTrack::setLanguage):
* bindings/js/JSVideoTrackCustom.cpp:
(WebCore::JSVideoTrack::setKind):
(WebCore::JSVideoTrack::setLanguage):
* html/track/AudioTrack.idl:
* html/track/TextTrack.idl:
* html/track/VideoTrack.idl:
Add setter methods to the implementation classes:
* html/track/TextTrack.cpp:
(WebCore::TextTrack::TextTrack):
(WebCore::TextTrack::setKind):
(WebCore::TextTrack::setLanguage):
* html/track/TextTrack.h:
* html/track/TrackBase.cpp:
(WebCore::TrackBase::TrackBase):
(WebCore::TrackBase::setKind):
(WebCore::TrackBase::setKindInternal):
* html/track/TrackBase.h:
(WebCore::TrackBase::setLanguage):
(WebCore::TrackBase::sourceBuffer):
(WebCore::TrackBase::setSourceBuffer):
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::VideoTrack):
(WebCore::VideoTrack::setKind):
(WebCore::VideoTrack::setLanguage):
* html/track/VideoTrack.h:
Implement the unimplemented portions of MediaSource and SourceBuffer:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::removeSourceBuffer):
* Modules/mediasource/MediaSourceBase.cpp:
(WebCore::MediaSourceBase::MediaSourceBase):
(WebCore::MediaSourceBase::setPrivateAndOpen):
(WebCore::MediaSourceBase::setReadyState):
(WebCore::MediaSourceBase::attachToElement):
* Modules/mediasource/MediaSourceBase.h:
(WebCore::MediaSourceBase::mediaElement):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::videoTracks):
(WebCore::SourceBuffer::audioTracks):
(WebCore::SourceBuffer::textTracks):
(WebCore::SourceBuffer::sourceBufferPrivateDidAddAudioTrack):
(WebCore::SourceBuffer::sourceBufferPrivateDidAddVideoTrack):
(WebCore::SourceBuffer::sourceBufferPrivateDidAddTextTrack):
(WebCore::SourceBuffer::sourceBufferPrivateDidChangeActiveState):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediasource/SourceBuffer.idl:
Add new files to the project:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
And a smorgasbord of other utility changes:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource): Pass this when attaching.
(WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto.
* html/HTMLMediaSource.h:
* html/track/TextTrackList.cpp:
(TextTrackList::item): Make const.
* html/track/TextTrackList.h:
(WebCore::TextTrackList::lastItem): Added.
* platform/graphics/InbandTextTrackPrivate.h:
(WebCore::InbandTextTrackPrivate::create): Added.
(WebCore::MockSourceBufferPrivate::trackDidChangeEnabled):
2013-11-06 Vani Hegde <vani.hegde@samsung.com>
Applied background color is not retained after typing a characters
https://bugs.webkit.org/show_bug.cgi?id=117337
Reviewed by Ryosuke Niwa.
While deleting a selection, only the inheritable style properties
applied on the selection were saved.
Since background color is considered as noninheritable style property,
on deleting the selection, background color set on it was being lost.
Hence on typing in new text, it would not have the applied
background color set.
Fixed by saving editing preoperties that are already in effect
on a selection before deleting it.
Test: editing/style/background-color-retained.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::saveTypingStyleState):
Modified as to save EditingPropertiesInEffect on a selection before
deleting it.
2013-11-06 Andreas Kling <akling@apple.com>
InlineBox: Make paint() and nodeAtPoint() pure virtuals.
<https://webkit.org/b/123937>
...and move the current implementations to InlineElementBox.
All subclasses were already overriding these functions so the move
is completely natural.
Reviewed by Anders Carlsson.
2013-11-06 Andreas Kling <akling@apple.com>
Nothing should return std::unique_ptr<InlineBox>.
<https://webkit.org/b/123936>
Made RenderBox, RenderLineBreak and RenderListMarker return tightly
typed InlineElementBoxes instead.
Reviewed by Anders Carlsson.
2013-11-06 Daniel Bates <dabates@apple.com>
[iOS] Upstream Letterpress effect
https://bugs.webkit.org/show_bug.cgi?id=123932
Reviewed by Sam Weinig.
Test: platform/iphone-simulator/iphone/getComputedStyle-text-decoration-letterpress.html
* Configurations/FeatureDefines.xcconfig: Add feature define ENABLE_LETTERPRESS disabled
by default. We only enable letterpress on iOS.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationFlagsToCSSValue): Add support for CSS value -webkit-letterpress.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseTextDecoration): Ditto.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator TextDecoration): Ditto.
* css/CSSValueKeywords.in: Added CSS value -webkit-letterpress.
* platform/graphics/GraphicsContext.h:
* platform/graphics/mac/FontMac.mm:
(WebCore::fillVectorWithHorizontalGlyphPositions): Added.
(WebCore::shouldUseLetterpressEffect): Added.
(WebCore::showLetterpressedGlyphsWithAdvances): Added.
(WebCore::showGlyphsWithAdvances): Modified to call showLetterpressedGlyphsWithAdvances()
to show a letterpressed glyph. I also included additional iOS-specific changes.
(WebCore::Font::drawGlyphs):
* rendering/TextPaintStyle.cpp:
(WebCore::TextPaintStyle::TextPaintStyle):
(WebCore::computeTextPaintStyle): Modified to compute letterpress effect style.
(WebCore::updateGraphicsContext): Modified to apply/unapply letterpress effect drawing mode.
* rendering/TextPaintStyle.h:
* rendering/style/RenderStyleConstants.h:
2013-11-06 Ryosuke Niwa <rniwa@webkit.org>
Crash in SliderThumbElement::dragFrom
https://bugs.webkit.org/show_bug.cgi?id=123873
Reviewed by Sam Weinig.
Moved Ref.
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::dragFrom):
2013-11-06 Daniel Bates <dabates@apple.com>
Cleanup FontMac.mm
https://bugs.webkit.org/show_bug.cgi?id=123928
Reviewed by Andy Estes.
* platform/graphics/mac/FontMac.mm:
(WebCore::showGlyphsWithAdvances): Inline the value of variable isVertical as we
reference it exactly once and its value is sufficiently clear.
(WebCore::Font::drawGlyphs): Remove default case in switch block so that the compiler
checks that all cases are covered. Move definition of platformData to the top of the
function and use it whenever we want to access the platform font data
2013-11-06 Brent Fulgham <bfulgham@apple.com>
[WebGL] We should not allow generateMipMap on compressed textures
https://bugs.webkit.org/show_bug.cgi?id=123915
<rdar://problem/15201274>
Reviewed by Dean Jackson.
Found by existing conformance/extensions/webgl-compressed-texture-s3tc.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::compressedTexImage2D): Set compressed flag.
(WebCore::WebGLRenderingContext::compressedTexSubImage2D): Ditto.
(WebCore::WebGLRenderingContext::generateMipmap): For Apple builds, check state
of compressed flag and generate appropriate WebGL error if necessary.
* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::WebGLTexture): Set compressed flag to false by default
(WebCore::WebGLTexture::isCompressed): Added
(WebCore::WebGLTexture::setCompressed): Added
* html/canvas/WebGLTexture.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::generateMipmap): Switch implementation to use proper
glGenerateMipmaps, rather than the glGenerateMipmapsEXT method.
2013-11-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Changes to CodeGeneratorInspectorStrings.py should rebuild inspector generated files
https://bugs.webkit.org/show_bug.cgi?id=123925
Reviewed by Timothy Hatcher.
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
2013-11-06 Bem Jones-Bey <bjonesbe@adobe.com>
Rename region line offset methods
https://bugs.webkit.org/show_bug.cgi?id=123897
Reviewed by Sam Weinig.
Because of the large number of overloads on the line offset methods,
it is very hard to read code using them, which also makes it harder to
move them out of RenderBlock. This patch renames the methods that take
a region as an argument to make it clearer when looking at the code
how the differ from the ones that don't.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLineInRegion):
(WebCore::RenderBlock::logicalRightOffsetForLineInRegion):
(WebCore::RenderBlock::logicalLeftOffsetForLineInRegion):
(WebCore::RenderBlock::startOffsetForLineInRegion):
(WebCore::RenderBlock::endOffsetForLineInRegion):
(WebCore::RenderBlock::availableLogicalWidthForLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
2013-11-06 Antti Koivisto <antti@apple.com>
HTMLCollection should use CollectionIndexCache
https://bugs.webkit.org/show_bug.cgi?id=123906
Reviewed by Ryosuke Niwa.
More code sharing.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
* dom/ChildNodeList.h:
* dom/CollectionIndexCache.h:
(WebCore::::nodeBeforeCached):
(WebCore::::nodeAfterCached):
(WebCore::::nodeAt):
Add a mechanism for disabling use of backward traversal.
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::collectionCanTraverseBackward):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::isMatchingElement):
(WebCore::HTMLCollection::iterateForPreviousElement):
(WebCore::firstMatchingElement):
(WebCore::nextMatchingElement):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::nameShouldBeVisibleInDocumentAll):
(WebCore::firstMatchingChildElement):
(WebCore::nextMatchingSiblingElement):
(WebCore::HTMLCollection::firstElement):
(WebCore::HTMLCollection::traverseForward):
(WebCore::HTMLCollection::collectionFirst):
(WebCore::HTMLCollection::collectionLast):
(WebCore::HTMLCollection::collectionTraverseForward):
(WebCore::HTMLCollection::collectionTraverseBackward):
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::collectionCanTraverseBackward):
Disable use of backward traversal for collections that use custom traversal.
2013-11-06 Brendan Long <b.long@cablelabs.com>
Add "id" attribute to TextTrack
https://bugs.webkit.org/show_bug.cgi?id=123825
Reviewed by Eric Carlson.
Test: media/track/track-id.html
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::addTextTrack): Add emptyString() for track id.
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::AudioTrack): Pass trackPrivate->id() to TrackBase.
(WebCore::AudioTrack::idChanged): Added, set id.
* html/track/AudioTrack.h: Move m_id to TrackBase.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::InbandTextTrack): Pass trackPrivate->id() to TrackBase.
(WebCore::InbandTextTrack::idChanged): Added, set id.
* html/track/InbandTextTrack.h: Add idChanged().
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::LoadableTextTrack): Add emptyString() for track id.
(WebCore::LoadableTextTrack::id): Override to return the track element's id.
* html/track/TextTrack.cpp:
(WebCore::TextTrack::captionMenuOffItem): Add empty string for track id.
(WebCore::TextTrack::captionMenuAutomaticItem): Add empty string for track id.
(WebCore::TextTrack::TextTrack): Pass id to TrackBase.
* html/track/TextTrack.h:
(WebCore::TextTrack::create): Add id parameter.
* html/track/TextTrack.idl: Add id attribute.
* html/track/TrackBase.cpp:
(WebCore::TrackBase::TrackBase): Add m_id.
* html/track/TrackBase.h: Add id attribute / m_id.
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::VideoTrack): Pass trackPrivate->id() to TrackBase.
(WebCore::VideoTrack::idChanged): Added, set id.
* html/track/VideoTrack.h: Move m_id to TrackBase.
* platform/graphics/TrackPrivateBase.h: Add idChanged() callback.
2013-11-06 Antti Koivisto <antti@apple.com>
Move array position caching out from HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=123895
Reviewed by Darin Adler.
This caching complicates the logic but is used by a single subclass
(HTMLFormControlsCollection) only. The subclass can do the caching itself.
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::HTMLAllCollection):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::create):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
(WebCore::HTMLCollection::firstElement):
Renamed from traverseFirstElement.
(WebCore::HTMLCollection::traverseForwardToOffset):
(WebCore::HTMLCollection::invalidateCache):
Make cache invalidation virtual so we can clear HTMLTableRowsCollection index cache.
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
Use traverseForwardToOffset instead traverseNextElement. This allows removal of traverseNextElement.
* html/HTMLCollection.h:
(WebCore::HTMLCollection::usesCustomForwardOnlyTraversal):
Renamed the enum and the accessor to be more informative.
(WebCore::HTMLCollection::setCachedElement):
(WebCore::HTMLCollection::customElementAfter):
Renamed from virtualItemAfter.
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
(WebCore::findFormAssociatedElement):
(WebCore::HTMLFormControlsCollection::customElementAfter):
Move the array position caching logic here.
(WebCore::HTMLFormControlsCollection::invalidateCache):
* html/HTMLFormControlsCollection.h:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::HTMLNameCollection):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
(WebCore::HTMLTableRowsCollection::customElementAfter):
* html/HTMLTableRowsCollection.h:
2013-11-06 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[ATK] accessibility/title-ui-element-correctness.html fails
https://bugs.webkit.org/show_bug.cgi?id=99825
Reviewed by Mario Sanchez Prada.
When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
is added, adding proper label element as a relation. When the document structure
has been changed and a different label should be linked as a relation, current ATK
implementation adds it as a next target on relation's target list, while
WTR/DumpRenderTree implementation takes only first one into account.
This patch adds a new function removing current relations before adding new ones.
Covered by existing tests.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(removeAtkRelationFromRelationSetByType):
(setAtkRelationSetFromCoreObject):
2013-11-06 Daniel Bates <dabates@apple.com>
Add ENABLE(TEXT_SELECTION)
https://bugs.webkit.org/show_bug.cgi?id=123827
Reviewed by Ryosuke Niwa.
Add compile-time guard, ENABLE(TEXT_SELECTION), to enable or
disable selection painting in WebCore (enabled by default).
On iOS we disable WebCore selection painting and have UIKit
paint the selection.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSelection): Only paint selection when
TEXT_SELECTION is enabled.
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
For now, add a ENABLE(TEXT_SELECTION)-guard around an assertion. Added
a FIXME comment to investigate the callers and either move the assertion
to the appropriate callers or structure the code such that we can remove
the assertion.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintSelection): Only paint selection when
TEXT_SELECTION is enabled.
* rendering/TextPaintStyle.cpp:
(WebCore::computeTextSelectionPaintStyle): Only compute the selection
paint style when TEXT_SELECTION is enabled. Otherwise, return a paint
style identical to the text paint style. Also, substitute nullptr for 0.
2013-11-06 Jer Noble <jer.noble@apple.com>
Unrevewied Windows build fix after r158736; add InlineElementBox.cpp to the RenderingAllInOne.cpp file.
* rendering/RenderingAllInOne.cpp:
2013-11-06 Sergio Villar Senin <svillar@igalia.com>
Unreviewed build fix, style() return type is now a reference.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):
2013-11-06 Jer Noble <jer.noble@apple.com>
Unreviewed 32-bit Mac build fix; use an explicit FloatSize -> IntSize conversion function.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
2013-11-04 Jer Noble <jer.noble@apple.com>
Playing many sounds with HTML5 Audio makes WebKit unresponsive
https://bugs.webkit.org/show_bug.cgi?id=116145
Reviewed by Eric Carlson.
Cache as much information as possible from AVPlayerItem to eliminate unneccesary
calls into AVFoundation.
Add WillChange/DidChange functions to handle the results of KVO notifications
from AVPlayerItem and AVPlayer:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::presentationSizeDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::rateDidChange):
(WebCore::itemKVOProperties):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
Instruct the HTMLMediaElement to cache the currentTime value for 5 seconds:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
(WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime):
Add and initialize member variables to hold these cached values:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
Add a new Notification type which can take (and call) a Function object:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
(WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
Implement queries in terms of the cached values of AVPlayerItem and AVPlayer
properties:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
(WebCore::MediaPlayerPrivateAVFoundationObjC::rate):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
(WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
Invalidate the cached currentTime before calling scheduleTimeUpdate so that the
correct movieTime is saved in m_clockTimeAtLastUpdateEvent:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::setReadyState):
2013-10-24 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Add support for named grid areas
https://bugs.webkit.org/show_bug.cgi?id=120045
Reviewed by Andreas Kling.
From Blink r155555, r155850 and r155889 by <jchaffraix@chromium.org>
Added support for named grid areas. Basically a named grid area is
now a valid grid position. The shorthand parsing of grid-area was
split from the grid-{row|column} as the rules for expanding are
slightly different.
Unknown grid area names are treated as 'auto' as per the
specification. This means that for those cases we need to trigger
the auto-placement algorithm.
Tests: fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html
fast/css-grid-layout/grid-item-named-grid-area-resolution.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridPosition):
(WebCore::gridMissingGridPositionValue):
(WebCore::CSSParser::parseGridItemPositionShorthand):
(WebCore::CSSParser::parseGridAreaShorthand):
(WebCore::CSSParser::parseSingleGridAreaLonghand):
* css/CSSParser.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::adjustGridItemPosition):
(WebCore::createGridPosition):
* css/StyleResolver.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/style/GridPosition.h:
(WebCore::GridPosition::isNamedGridArea):
(WebCore::GridPosition::setNamedGridArea):
(WebCore::GridPosition::namedGridLine):
2013-11-06 Chris Fleizach <cfleizach@apple.com>
AX: Audio and Video attachments are not output to VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=123479
Reviewed by Mario Sanchez Prada.
Video and audio elements don't appear as distinct objects in the AX hierarchy,
nor are they treated as replaceable objects when emitting the text. We should
treat these characters like attachments, for one. On the Mac platform, we should
also identify them with special subroles.
Tests: platform/mac/accessibility/media-emits-object-replacement.html
platform/mac/accessibility/media-role-descriptions.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isGenericFocusableElement):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
2013-11-06 Ryosuke Niwa <rniwa@webkit.org>
Notify nodes removal to Range/Selection after dispatching blur and mutation event
https://bugs.webkit.org/show_bug.cgi?id=123880
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/b60576a0560d14f8757e58d55d37b7cefa48a6ac
In willRemoveChildren in ContainerNode.cpp, call Document::nodeChildrenWillBeRemoved after instead of
before dispatching mutation events because we need to update ranges created by those mutation event
listeners. willRemoveChild was fixed in r115686.
Tests: editing/selection/selection-change-in-blur-event-by-remove-children.html
editing/selection/selection-change-in-mutation-event-by-remove-children.html
fast/dom/Range/range-created-during-remove-children.html
* dom/ContainerNode.cpp:
(WebCore::willRemoveChildren):
2013-11-06 Ryosuke Niwa <rniwa@webkit.org>
Fix out-of-date offset in selection range code in range.surroundContents
https://bugs.webkit.org/show_bug.cgi?id=123871
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
The code in Range::insertNode assumeed that the start offset of the selection range within its container
doesn't change across a call to insertBefore on the container but this is wrong. This patch recomputes
the start offset when it is used after the insertBefore call.
Test: editing/selection/range-surroundContents-with-preceding-node.html
* dom/Range.cpp:
(WebCore::Range::insertNode):
2013-11-06 Andreas Kling <akling@apple.com>
Add InlineElementBox and stop instantiating InlineBox directly.
<https://webkit.org/b/123882>
Make the InlineBox constructors protected and add a new class
called InlineElementBox on top. This is somewhat analogous to the
split between RenderText and RenderElement, and allows us to make
renderer() return a far tighter RenderBoxModelObject& instead
of a RenderObject&.
Moved over attachLine(), deleteLine() and extractLine() to start
things off. More things will follow.
Reviewed by Antti Koivisto.
2013-11-06 Piotr Grad <p.grad@samsung.com>
Seek for video doesn't work when playback rate is negative
https://bugs.webkit.org/show_bug.cgi?id=123791
In MediaPlayerPrivateGStreamer::seek negative playback rate was not taken to account.
Reviewed by Philippe Normand.
Test: media/video-seek-with-negative-playback.html
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::seek):
2013-11-06 Andreas Kling <akling@apple.com>
Reinstate an annoying assertion that I accidentally commented out.
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::synchronousIconForPageURL):
2013-11-06 Brendan Long <b.long@cablelabs.com>
[GStreamer] Override label() and language() in Audio and VideoTrackPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=123836
The tests are currently flakey because we only get the label and language if we get
tags after the track client is set.
Reviewed by Philippe Normand.
No new tests because the tests already exist (this fixes flakeyness).
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Override label() and language() to use m_label and m_language.
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Make m_label and m_language protected so they can be used in the functions above.
2013-11-05 Andreas Kling <akling@apple.com>
RenderBlockFlow should only expose its line boxes as RootInlineBox.
<https://webkit.org/b/123878>
The line boxes attached directly to a RenderBlockFlow are always
RootInlineBox objects, so call sites should always use the tightly
typed firstRootBox() and lastRootBox().
This allows the compiler to devirtualize calls to member functions
of RootInlineBox that are marked FINAL.
Reviewed by Antti Koivisto.
2013-11-06 Ryosuke Niwa <rniwa@webkit.org>
Assertion failure end < m_runCount in WebCore::BidiRunList<WebCore::BidiRun>::reverseRuns
https://bugs.webkit.org/show_bug.cgi?id=123863
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/cbaa92c763a37d89eeabd01658e522219299290c
Test: fast/text/bidi-reverse-runs-crash.html
* platform/text/BidiResolver.h:
(WebCore::BidiResolver<Iterator, Run>::createBidiRunsForLine): Don't reverse the runs if there's
nothing to be reversed.
2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
Address the review comment after r158724.
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
2013-11-05 Zalan Bujtas <zalan@apple.com>
Widget's position change should not initiate layout, only when its size changes.
https://bugs.webkit.org/show_bug.cgi?id=123860
Reviewed by Andreas Kling.
RenderWidgets initiate unnecessary layouts while scrolling when they are embedded to
overflow:scroll containers. Scroll position change doesn't dirty the render tree
so it should not trigger layout either.
Manual test added. Unfortunately we can't test against the number of layouts yet.
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidgetGeometry):
(WebCore::RenderWidget::updateWidgetGeometry):
(WebCore::RenderWidget::updateWidgetPosition):
2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
Use-after-free in SliderThumbElement::dragFrom
https://bugs.webkit.org/show_bug.cgi?id=123873
Reviewed by Andreas Kling.
Ref the SliderThumbElement since it could go away inside dragFrom.
Test: fast/forms/range/range-type-change-onchange-2.html
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
Change the order of conditions to avoid computing rendererIsEditable()
https://bugs.webkit.org/show_bug.cgi?id=123868
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
When we need both Node::renderer() and Node::rendererIsEditable() conditions to be true to perform
some operation, it is more effective to check for renderer() first, so that if this condition fails
we can avoid unnecessary computation of rendererIsEditable().
* dom/Position.cpp:
(WebCore::nextRenderedEditable):
(WebCore::previousRenderedEditable):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):
2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
simpleUserAgentStyleSheet doesn't have focus ring on anchor element
https://bugs.webkit.org/show_bug.cgi?id=123867
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/08ecc23c4d80be9969918c4baf0ac83dc6cb6cbd
* css/CSSDefaultStyleSheets.cpp:
2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
valueForBorderRadiusShorthand returns wrong values in some case
https://bugs.webkit.org/show_bug.cgi?id=123866
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/0933728126f2db06ab8e945efc98bffa2d42af1c
Because valueForBorderRadiusShorthand misses the followings:
- showHorizontalBottomRight depends on showHorizontalBottomLeft.
- showHorizontalTopRight depends on showHorizontalBottomRight (including showHorizontalBottomLeft).
See also http://dev.w3.org/csswg/css-backgrounds/#the-border-radius
Test: fast/css/getComputedStyle/getComputedStyle-borderRadius-2.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getBorderRadiusShorthandValue):
2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
Protect DOM nodes in IndentOutdentCommand::tryIndentingAsListItem()
https://bugs.webkit.org/show_bug.cgi?id=123861
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/297442eb539a2b764fdad323de79099a70179186 partially.
* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::tryIndentingAsListItem): Make selectedListItem, previousList, and nextList
RefPtr since they're are used after calling insertNodeBefore.
2013-11-05 Andreas Kling <akling@apple.com>
Apply more unique_ptr to line box management.
<https://webkit.org/b/123857>
Make all of the functions that return newly-created line boxes
return them packed up in std::unique_ptrs.
There is one exception in RenderBlockLineLayout where the function
createInlineBoxForRenderer() is inconsistent about the ownership of
the returned object. This will be addressed by a subsequent patch.
We now "release" the line boxes into their various home structures,
so the pointer smartness doesn't go end-to-end just yet.
Reviewed by Anders Carlsson.
2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
getComputedStyle(x).lineHeight is affected by zooming
https://bugs.webkit.org/show_bug.cgi?id=123847
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/7957097afbab2899ababd0d9c8acbf6e3eddb870
Test: fast/css/line-height-zoom-get-computed-style.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::lineHeightFromStyle): Don't round line-height values.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyLineHeight::applyValue): Use the computed value instead of the used value.
2013-11-05 James Craig <jcraig@apple.com>
AX: media controls accessibility needs more work
https://bugs.webkit.org/show_bug.cgi?id=123749
Reviewed by Jer Noble.
Updated some of the control labels/roles to improve accessibility.
- Volume slider is now keyboard/screenreader accessible.
- muteButton was a checkbox toggling checked state, now a button that toggles label "mute/unmute"
- fullscreenButton was a checkbox toggling checked state, now a button that toggles label "display/exit full screen"
- captionButton was a checkbox, now a popup button that launches the newly accessible menu.
Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
Render dump expectations changed because volume slider is now hidden via...
...opacity/size (to make accessible without hover) instead of display:none.
Updated existing test coverage.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel .volume-box):
(audio::-webkit-media-controls-panel .volume-box:active):
(audio::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-closed-captions-container .list):
(audio::-webkit-media-controls-closed-captions-container li:focus):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handleFullscreenChange):
(Controller.prototype.handleMuteButtonClicked):
(Controller.prototype.handleMinButtonClicked):
(Controller.prototype.handleMaxButtonClicked):
(Controller.prototype.handleVolumeSliderChange):
(Controller.prototype.buildCaptionMenu):
(Controller.prototype.focusSiblingCaptionItem):
(Controller.prototype.handleCaptionItemKeyUp):
2013-11-05 Andreas Kling <akling@apple.com>
Move some plugin-specific code from RenderWidget to RenderEmbeddedObject.
<https://webkit.org/b/123845>
All RenderWidgets representing plugins will be RenderEmbeddedObjects.
Move some of the plugin-specific logic to RenderEmbeddedObject since it
doesn't make sense for all RenderWidgets (frames, embedded documents)
to care about this.
Reviewed by Anders Carlsson.
2013-11-05 Tim Horton <timothy_horton@apple.com>
Fix the 32-bit build.
* WebCore.exp.in:
2013-11-05 Alexandru Chiculita <achicu@adobe.com>
Web Inspector: Moving an element while in the DOMNodeRemoved handler will hide it in the inspector
https://bugs.webkit.org/show_bug.cgi?id=123516
Reviewed by Timothy Hatcher.
InspectorInstrumentation::willRemoveDOMNode was actually calling both willRemoveDOMNodeImpl and
didRemoveDOMNodeImpl, making the DOMAgent unbind the element even if it was still part of the DOM.
Because of that the DOMAgent was sending two events:
1. When the element was about to be removed, just before JS "DOMNodeRemoved" was triggered.
2. When the element was actually removed.
Note that inspector's event #2 will not know about the node, as it just removed it from the
internal hashmap, so it will just use a nodeID == 0 for it.
This patch adds a separate call to InspectorInstrumentation::didRemoveDOMNode, just before the
element is about to be removed. The InspectorInstrumentation::willRemoveDOMNode call is now only used
by the DOMDebugger to trigger the DOM breakpoints in the Web Inspector. That feature is not exposed
in the new Inspector UI, but can be used/tested using the protocol directly.
Tests: inspector-protocol/dom-debugger/node-removed.html
inspector-protocol/dom/dom-remove-events.html
inspector-protocol/dom/remove-multiple-nodes.html
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeBetween):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willRemoveDOMNode):
(WebCore::InspectorInstrumentation::didRemoveDOMNode):
2013-11-05 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix on CMake based ports with GLES.
* CMakeLists.txt:
Added OPENGLES2_LIBRARIES and OPENGLES2_INCLUDE_DIR into the includes and
libraries list.
2013-11-05 Tim Horton <timothy_horton@apple.com>
platformCALayerDeviceScaleFactor should be const
https://bugs.webkit.org/show_bug.cgi?id=123842
Reviewed by Simon Fraser.
* WebCore.exp.in:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::LayerClient::platformCALayerDeviceScaleFactor):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerDeviceScaleFactor):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayerClient.h:
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::platformCALayerDeviceScaleFactor):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDeviceScaleFactor):
Constify PlatformCALayerClient::platformCALayerDeviceScaleFactor.
2013-11-05 Gavin Barraclough <barraclough@apple.com>
Subresource loads should not prevent page throttling
https://bugs.webkit.org/show_bug.cgi?id=123757
Reviewed by Alexey Proskuryakov.
The page-is-loading test for inhibiting process supression is currently
too conservative, preventing supression of pages with infinitely loading
resources (commonly XHRs). Instead, just rely on the FrameLoader being
active (with hysteresis).
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::init):
(WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/SubresourceLoader.h:
- remove m_activityAssertion from SubresourceLoader.
2013-11-05 Tim Horton <timothy_horton@apple.com>
[mac] PDFDocumentImage is too big if PDF has a crop box smaller than the media box
https://bugs.webkit.org/show_bug.cgi?id=123840
<rdar://problem/15308765>
Reviewed by Alexey Proskuryakov.
Test: fast/images/pdf-as-image-crop-box.html
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::size):
Use the crop box when determining the size of the image.
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/mac/PDFDocumentImageMac.mm:
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
Get rid of m_mediaBox, since we don't need it anymore.
(WebCore::PDFDocumentImage::drawPDFPage):
PDFKit does the translation by the crop box origin for us;
if we do it additionally, we'll be painting the wrong part of the image.
So, don't do the translation here.
2013-11-05 Antti Koivisto <antti@apple.com>
Factor index cache for NodeLists and HTMLCollections to a class
https://bugs.webkit.org/show_bug.cgi?id=123823
Reviewed by Ryosuke Niwa.
Implement index cache class that can used by NodeLists and HTMLCollections that currently
each have implementations of their own.
This patch also implements ChildNodeList and LiveNodeList using CollectionIndexCache.
HTMLCollection is will be transitioned later.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList):
(WebCore::ChildNodeList::length):
(WebCore::ChildNodeList::item):
The client calls to cache to for indexed and size access.
(WebCore::ChildNodeList::collectionFirst):
(WebCore::ChildNodeList::collectionLast):
(WebCore::ChildNodeList::collectionTraverseForward):
(WebCore::ChildNodeList::collectionTraverseBackward):
Cache calls back to these as needed to do the actual traversal.
(WebCore::ChildNodeList::invalidateCache):
* dom/ChildNodeList.h:
* dom/CollectionIndexCache.h: Added.
Templated cache class itself.
(WebCore::::CollectionIndexCache):
(WebCore::::nodeCount):
(WebCore::::nodeBeforeCached):
(WebCore::::nodeAfterCached):
(WebCore::::nodeAt):
(WebCore::::invalidate):
* dom/LiveNodeList.cpp:
(WebCore::firstMatchingElement):
(WebCore::nextMatchingElement):
(WebCore::traverseMatchingElementsForward):
(WebCore::LiveNodeList::collectionFirst):
(WebCore::LiveNodeList::collectionLast):
(WebCore::LiveNodeList::collectionTraverseForward):
(WebCore::LiveNodeList::collectionTraverseBackward):
(WebCore::LiveNodeList::length):
(WebCore::LiveNodeList::item):
(WebCore::LiveNodeList::invalidateCache):
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):
2013-11-05 Enrica Casucci <enrica@apple.com>
Full width semicolon is wrong in vertical text.
https://bugs.webkit.org/show_bug.cgi?id=123814
<rdar://problem/15312541>
Reviewed by Benjamin Poulain.
The full width semicolon should always be upright.
Adding it to the list of characters that should
ignore rotation.
* platform/graphics/FontGlyphs.cpp:
(WebCore::shouldIgnoreRotation):
2013-11-05 Andreas Kling <akling@apple.com>
Remove unused RenderWidget::notifyWidget().
Rubber-stamped by Anders Carlsson.
2013-11-05 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r158678.
http://trac.webkit.org/changeset/158678
https://bugs.webkit.org/show_bug.cgi?id=123820
Causes a new debug assertion failure on the Mavericks test
system. (Requested by bfulgham on #webkit).
* rendering/mathml/RenderMathMLOperator.cpp:
2013-11-05 Renata Hodovan <reni@webkit.org>
ASSERTION FAILED: isHTMLTitleElement(m_titleElement.get()) in WebCore::Document::setTitle
https://bugs.webkit.org/show_bug.cgi?id=122092
Reviewed by Darin Adler.
Remove a bogus assert in Document::setTitle().
m_titleElement can be either of HTMLTitleElement or SVGTitleElement. The assertion was wrong.
Backported from Blink:
https://src.chromium.org/viewvc/blink?revision=158620&view=revision
Test: svg/custom/title-assertion.html
* dom/Document.cpp:
(WebCore::Document::setTitle):
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::insertedInto):
2013-11-05 Martin Robinson <mrobinson@igalia.com>
[MathML] Poor spacing around delimiters in MathML Torture Test 14
https://bugs.webkit.org/show_bug.cgi?id=122837
Reviewed by Brent Fulgham.
Instead of stretching the vertical bar with the stretchable version, just repeat
the normal vertical bar. This follows what Gecko does when rendering tall vertical
bars and also works around an issue with STIX fonts leading to poor spacing in
formulas.
* rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
normal variant.
2013-11-05 Daniel Bates <dabates@apple.com>
XSSAuditor should catch reflected srcdoc properties even without a <frame> tag injection
From Blink r160615 by <tsepez@chromium.org>
https://src.chromium.org/viewvc/blink?view=rev&revision=160615
Test: http/tests/security/xssAuditor/iframe-srcdoc-property-blocked.html
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterIframeToken):
2013-11-05 Éva Balázsfalvi <balazsfalvi.eva@stud.u-szeged.hu>
Delete maketokenizer.
https://bugs.webkit.org/show_bug.cgi?id=115155
Reviewed by Zoltan Herczeg.
This script was used to generate the old flex based CSS tokenizer. It
was replaced by a custom tokenizer in r106217 but the script wasn't
removed. Since there is no mention of it in the original bug nor any
reference to maketokenizer in our build files, it's probably an
oversight.
Merge from blink:
https://chromium.googlesource.com/chromium/blink/+/2a1c8aaf867f707ccdcd8893446e907e2aa2e1c2
* css/maketokenizer: Removed.
2013-11-05 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Unbreaking GCC builds.
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement): This inline function is not a template anymore.
2013-11-05 Antti Koivisto <antti@apple.com>
Make it compile.
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):
(WebCore::LiveNodeList::~LiveNodeList):
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptDocument):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection):
2013-11-05 Antti Koivisto <antti@apple.com>
HTMLCollection should not be NodeList
https://bugs.webkit.org/show_bug.cgi?id=123794
Reviewed by Andreas Kling.
HTMLCollection and NodeList are unrelated types in DOM yet our HTMLCollection inherits NodeList
for code sharing reasons. While some code does get shared the types are sufficiently different
that this results in lots of unnecessary branches, complexity and general awkwardness. Code sharing
can be better achieved by means other than inheritance.
This patch splits HTMLCollection from NodeList by copy-pasting and eliminating resulting redundancies.
Sharing comes later.
* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged):
* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::~ClassNodeList):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::childrenChanged):
(WebCore::ContainerNode::getElementsByTagName):
(WebCore::ContainerNode::getElementsByName):
(WebCore::ContainerNode::getElementsByClassName):
(WebCore::ContainerNode::radioNodeList):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::registerNodeList):
(WebCore::Document::unregisterNodeList):
(WebCore::Document::registerCollection):
(WebCore::Document::unregisterCollection):
(WebCore::Document::ensureCachedCollection):
Add separate functions and map for registering HTMLCollections.
(WebCore::Document::all):
(WebCore::Document::windowNamedItems):
(WebCore::Document::documentNamedItems):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::Element::ensureCachedHTMLCollection):
(WebCore::Element::cachedHTMLCollection):
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::rootNode):
(WebCore::isMatchingElement):
(WebCore::LiveNodeList::iterateForPreviousElement):
(WebCore::LiveNodeList::itemBefore):
(WebCore::firstMatchingElement):
(WebCore::nextMatchingElement):
(WebCore::traverseMatchingElementsForwardToOffset):
(WebCore::LiveNodeList::traverseLiveNodeListFirstElement):
(WebCore::LiveNodeList::traverseLiveNodeListForwardToOffset):
(WebCore::LiveNodeList::isLastItemCloserThanLastOrCachedItem):
(WebCore::LiveNodeList::isFirstItemCloserThanCachedItem):
(WebCore::LiveNodeList::length):
(WebCore::LiveNodeList::item):
(WebCore::LiveNodeList::elementBeforeOrAfterCachedElement):
This code used to live in HTMLCollection.cpp. Copy-paste here and remove all branches not needed for NodeLists.
(WebCore::LiveNodeList::invalidateCache):
NodeLists have no name caches.
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):
(WebCore::LiveNodeList::~LiveNodeList):
(WebCore::LiveNodeList::isRootedAtDocument):
(WebCore::LiveNodeList::type):
(WebCore::LiveNodeList::invalidateCache):
(WebCore::LiveNodeList::setCachedElement):
Merge LiveNodeListBase and LiveNodeList.
Remove fields and code supporting HTMLCollection.
(WebCore::shouldInvalidateTypeOnAttributeChange):
Move to global scope. This function is used both HTMLCollections and LiveNodeLists.
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::~NameNodeList):
* dom/NameNodeList.h:
(WebCore::NameNodeList::create):
* dom/Node.cpp:
(WebCore::shouldInvalidateNodeListCachesForAttr):
(WebCore::Document::shouldInvalidateNodeListAndCollectionCaches):
(WebCore::Document::invalidateNodeListAndCollectionCaches):
(WebCore::Node::invalidateNodeListAndCollectionCachesInAncestors):
(WebCore::NodeListsNodeData::invalidateCaches):
* dom/Node.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::addCacheWithAtomicName):
(WebCore::NodeListsNodeData::addCacheWithName):
(WebCore::NodeListsNodeData::addCacheWithQualifiedName):
(WebCore::NodeListsNodeData::addCachedCollection):
(WebCore::NodeListsNodeData::cachedCollection):
(WebCore::NodeListsNodeData::removeCacheWithAtomicName):
(WebCore::NodeListsNodeData::removeCacheWithName):
(WebCore::NodeListsNodeData::removeCachedCollection):
(WebCore::NodeListsNodeData::isEmpty):
(WebCore::NodeListsNodeData::adoptDocument):
(WebCore::NodeListsNodeData::namedCollectionKey):
(WebCore::NodeListsNodeData::namedNodeListKey):
(WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
Add separate cache for HTMLCollections.
* dom/TagNodeList.cpp:
(WebCore::TagNodeList::TagNodeList):
(WebCore::TagNodeList::~TagNodeList):
* dom/TagNodeList.h:
(WebCore::TagNodeList::create):
(WebCore::HTMLTagNodeList::create):
* html/CollectionType.h:
Remove NodeList types.
* html/HTMLCollection.cpp:
(WebCore::shouldOnlyIncludeDirectChildren):
(WebCore::rootTypeFromCollectionType):
(WebCore::invalidationTypeExcludingIdAndNameAttributes):
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection):
(WebCore::HTMLCollection::rootNode):
(WebCore::isMatchingElement):
(WebCore::HTMLCollection::iterateForPreviousElement):
(WebCore::HTMLCollection::itemBefore):
(WebCore::firstMatchingElement):
(WebCore::nextMatchingElement):
(WebCore::traverseMatchingElementsForwardToOffset):
(WebCore::HTMLCollection::isLastItemCloserThanLastOrCachedItem):
(WebCore::HTMLCollection::isFirstItemCloserThanCachedItem):
(WebCore::HTMLCollection::setCachedElement):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
(WebCore::HTMLCollection::traverseFirstElement):
(WebCore::HTMLCollection::traverseNextElement):
(WebCore::HTMLCollection::traverseForwardToOffset):
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::invalidateIdNameCacheMaps):
(WebCore::HTMLCollection::namedItem):
Remove NodeList specific branches and functions.
LiveNodeListBase functions are now HTMLCollection functions.
* html/HTMLCollection.h:
(WebCore::HTMLCollection::isRootedAtDocument):
(WebCore::HTMLCollection::invalidationType):
(WebCore::HTMLCollection::type):
(WebCore::HTMLCollection::ownerNode):
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::document):
(WebCore::HTMLCollection::overridesItemAfter):
(WebCore::HTMLCollection::isElementCacheValid):
(WebCore::HTMLCollection::cachedElement):
(WebCore::HTMLCollection::cachedElementOffset):
(WebCore::HTMLCollection::isLengthCacheValid):
(WebCore::HTMLCollection::cachedLength):
(WebCore::HTMLCollection::setLengthCache):
(WebCore::HTMLCollection::setCachedElement):
(WebCore::HTMLCollection::isItemRefElementsCacheValid):
(WebCore::HTMLCollection::setItemRefElementsCacheValid):
(WebCore::HTMLCollection::rootType):
(WebCore::HTMLCollection::hasNameCache):
(WebCore::HTMLCollection::setHasNameCache):
Copy-paste functions and fields from former LiveNodeListBase.
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::~HTMLNameCollection):
* html/LabelableElement.cpp:
(WebCore::LabelableElement::labels):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::~LabelsNodeList):
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::~RadioNodeList):
* html/RadioNodeList.h:
(WebCore::RadioNodeList::create):
2013-11-05 Emilio Pozuelo Monfort <pochu27@gmail.com>
[GTK] Add stubs for missing symbols in dom bindings
https://bugs.webkit.org/show_bug.cgi?id=123663
Reviewed by Carlos Garcia Campos.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_head_element_get_profile):
(webkit_dom_html_head_element_set_profile):
(webkit_dom_processing_instruction_get_data):
(webkit_dom_processing_instruction_set_data):
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols:
2013-11-05 Zan Dobersek <zdobersek@igalia.com>
Main thread tasks in ThreadableBlobRegistry should use std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=122946
Reviewed by Darin Adler.
The new BlobRegistryContext objects don't have to be adopted into OwnPtr and then have OwnPtr's leaked pointer
passed into the WTF::callOnMainThread call - the pointer to the new heap-allocated object is passed in directly,
with the object ending up being managed by std::unique_ptr in the designated main thread task.
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::registerBlobURLTask):
(WebCore::ThreadableBlobRegistry::registerBlobURL):
(WebCore::registerBlobURLFromTask):
(WebCore::unregisterBlobURLTask):
(WebCore::ThreadableBlobRegistry::unregisterBlobURL):
2013-11-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CSS] Enable css-image-orientation on EFL and GTK ports.
https://bugs.webkit.org/show_bug.cgi?id=123698
Reviewed by Beth Dakin.
r157909 added wrong early return for css-image-orientation. It causes about 20 regressions in layout test
when enabling css-image-orientation. This fixes those wrong implementation as well as enables it on EFL
and GTK ports by default.
Test: fast/css/image-orientation/image-orientation.html
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::updateSize):
2013-11-05 Andreas Kling <akling@apple.com>
RenderEmbeddedObject shouldn't know about fallback content.
<https://webkit.org/b/123781>
Stop caching the presence of fallback (DOM) content in a flag on
RenderEmbeddedObject and have SubframeLoader fetch it directly from
HTMLObjectElement instead.
Also made SubframeLoader::requestObject() take the owner element
by reference since we don't support owner-less embedded objects.
Reviewed by Antti Koivisto.
2013-11-05 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GStreamer] Remove NATIVE_FULLSCREEN_VIDEO support
https://bugs.webkit.org/show_bug.cgi?id=123437
Reviewed by Philippe Normand.
Removed some dead code as no GStreamer port is using the native
fullscreen video support.
* GNUmakefile.list.am:
* PlatformEfl.cmake:
* PlatformGTK.cmake: Removed compilation of deleted files.
* platform/graphics/MediaPlayer.h: Removed structures related to
GStreamer and NATIVE_FULLSCREEN_VIDEO.
* platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp: Removed.
* platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h: Removed.
* platform/graphics/gstreamer/GStreamerGWorld.cpp: Removed.
* platform/graphics/gstreamer/GStreamerGWorld.h: Removed.
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Removed
gst/video/video.h include.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::platformMedia):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
Removed code related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
* platform/graphics/gstreamer/PlatformVideoWindow.h: Removed.
* platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp: Removed.
* platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: Removed.
* platform/graphics/gstreamer/PlatformVideoWindowMac.mm: Removed.
* platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Removed.
* platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: Removed.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkRender):
(webkitVideoSinkNew):
* platform/graphics/gstreamer/VideoSinkGStreamer.h: Removed code
related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
* platform/graphics/gtk/FullscreenVideoControllerGtk.cpp: Removed.
* platform/graphics/gtk/FullscreenVideoControllerGtk.h: Removed.
2013-11-05 Andreas Kling <akling@apple.com>
Remove RenderWidget::viewCleared().
<https://webkit.org/b/123777>
This was some ancient hand-waving code from the KHTML era.
It was obviously confused (e.g RenderEmbeddedObject trying to handle
iframe owners, even though that setup is impossible.)
Reviewed by Anders Carlsson.
2013-11-04 Brady Eidson <beidson@apple.com>
IDB: Split backend Cursors and Transactions into their own files
https://bugs.webkit.org/show_bug.cgi?id=123789
Reviewed by Alexey Proskuryakov.
No new tests (Rename, no change in behavior).
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBBackingStoreCursorInterface.h:
(WebCore::IDBBackingStoreCursorInterface::~IDBBackingStoreCursorInterface):
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Added.
(WebCore::IDBBackingStoreTransactionInterface::~IDBBackingStoreTransactionInterface):
* Modules/indexeddb/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
* Modules/indexeddb/IDBCursorBackendImpl.h:
(WebCore::IDBCursorBackendImpl::create):
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBIndexWriter.cpp:
(WebCore::IDBIndexWriter::writeIndexKeys):
(WebCore::IDBIndexWriter::verifyIndexKeys):
(WebCore::IDBIndexWriter::addingKeyAllowed):
* Modules/indexeddb/IDBIndexWriter.h:
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::createCursorBackend):
* Modules/indexeddb/IDBTransactionBackendImpl.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::GetOperation::perform):
(WebCore::OpenCursorOperation::perform):
(WebCore::CountOperation::perform):
(WebCore::DeleteRangeOperation::perform):
* Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Added.
(WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
(WebCore::IDBBackingStoreCursorLevelDB::firstSeek):
(WebCore::IDBBackingStoreCursorLevelDB::advance):
(WebCore::IDBBackingStoreCursorLevelDB::continueFunction):
(WebCore::IDBBackingStoreCursorLevelDB::haveEnteredRange):
(WebCore::IDBBackingStoreCursorLevelDB::isPastBounds):
* Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Added.
(WebCore::IDBBackingStoreCursorLevelDB::~IDBBackingStoreCursorLevelDB):
(WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::compareIndexKeys):
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
(WebCore::IDBBackingStoreLevelDB::createObjectStore):
(WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
(WebCore::IDBBackingStoreLevelDB::getRecord):
(WebCore::IDBBackingStoreLevelDB::putRecord):
(WebCore::IDBBackingStoreLevelDB::clearObjectStore):
(WebCore::IDBBackingStoreLevelDB::deleteRecord):
(WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
(WebCore::IDBBackingStoreLevelDB::createIndex):
(WebCore::IDBBackingStoreLevelDB::deleteIndex):
(WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
(WebCore::findGreatestKeyLessThanOrEqual):
(WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
(WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
(WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
(WebCore::ObjectStoreKeyCursorImpl::create):
(WebCore::ObjectStoreKeyCursorImpl::clone):
(WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
(WebCore::ObjectStoreCursorImpl::create):
(WebCore::ObjectStoreCursorImpl::clone):
(WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
(WebCore::objectStoreCursorOptions):
(WebCore::indexCursorOptions):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexCursor):
(WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Added.
(WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
(WebCore::IDBBackingStoreTransactionLevelDB::begin):
(WebCore::IDBBackingStoreTransactionLevelDB::commit):
(WebCore::IDBBackingStoreTransactionLevelDB::rollback):
* Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2013-11-04 Zalan Bujtas <zalan@apple.com>
Do not call setFrameRect on Widget unless its boundaries changed.
https://bugs.webkit.org/show_bug.cgi?id=123781
Reviewed by Andreas Kling.
Call Widget:setFrameRect only when the frame's rect actually changes. It also
cleans up the related weak reference code a bit.
Covered by existing tests.
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidgetGeometry):
2013-11-04 Santosh Mahto <santosh.ma@samsung.com>
[webcore/html] remove extra header includes from cpp files.
https://bugs.webkit.org/show_bug.cgi?id=123740
Reviewed by Darin Adler.
Removing redundant headers.
* html/BaseDateAndTimeInputType.cpp:
* html/ColorInputType.cpp:
* html/DOMFormData.cpp:
* html/DOMURL.cpp:
* html/DateInputType.cpp:
* html/DateTimeInputType.cpp:
* html/DateTimeLocalInputType.cpp:
* html/FTPDirectoryDocument.cpp:
* html/FileInputType.cpp:
* html/FormController.cpp:
* html/HTMLAnchorElement.cpp:
* html/HTMLAreaElement.cpp:
* html/HTMLCanvasElement.cpp:
* html/HTMLCollection.cpp:
* html/HTMLDetailsElement.cpp:
* html/HTMLDocument.cpp:
* html/HTMLElement.cpp:
* html/HTMLFormControlsCollection.cpp:
* html/HTMLFormElement.cpp:
* html/HTMLImageElement.cpp:
* html/HTMLInputElement.cpp:
* html/HTMLLegendElement.cpp:
* html/HTMLMapElement.cpp:
* html/HTMLMediaElement.cpp:
* html/HTMLOptionElement.cpp:
* html/HTMLOptionsCollection.cpp:
* html/HTMLPlugInImageElement.cpp:
* html/HTMLProgressElement.cpp:
* html/HTMLSummaryElement.cpp:
* html/HTMLTemplateElement.cpp:
* html/HTMLVideoElement.cpp:
* html/HTMLViewSourceDocument.cpp:
* html/MediaController.cpp:
* html/MediaKeyEvent.cpp:
* html/MonthInputType.cpp:
* html/RangeInputType.cpp:
* html/StepRange.cpp:
* html/TextFieldInputType.cpp:
* html/TimeInputType.cpp:
* html/WeekInputType.cpp:
* html/canvas/CanvasRenderingContext.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/CanvasStyle.cpp:
* html/canvas/OESVertexArrayObject.cpp:
* html/parser/BackgroundHTMLParser.cpp:
* html/parser/CSSPreloadScanner.cpp:
* html/parser/CompactHTMLToken.cpp:
* html/parser/HTMLConstructionSite.cpp:
* html/parser/HTMLDocumentParser.cpp:
* html/parser/HTMLElementStack.cpp:
* html/parser/HTMLFormattingElementList.cpp:
* html/parser/HTMLMetaCharsetParser.cpp:
* html/parser/HTMLParserIdioms.cpp:
* html/parser/HTMLPreloadScanner.cpp:
* html/parser/HTMLTokenizer.cpp:
* html/parser/HTMLTreeBuilder.cpp:
* html/parser/HTMLTreeBuilderSimulator.cpp:
* html/parser/HTMLViewSourceParser.cpp:
* html/parser/TextDocumentParser.cpp:
* html/parser/XSSAuditor.cpp:
* html/shadow/ContentDistributor.cpp:
* html/shadow/InsertionPoint.cpp:
* html/shadow/MediaControlElements.cpp:
* html/shadow/MediaControlsApple.cpp:
* html/shadow/MediaControlsBlackBerry.cpp:
* html/shadow/MediaControlsGtk.cpp:
* html/shadow/SliderThumbElement.cpp:
* html/track/AudioTrack.cpp:
* html/track/InbandGenericTextTrack.cpp:
* html/track/InbandTextTrack.cpp:
* html/track/InbandWebVTTTextTrack.cpp:
* html/track/TextTrack.cpp:
* html/track/TextTrackCueGeneric.cpp:
* html/track/TextTrackList.cpp:
* html/track/TextTrackRegion.cpp:
* html/track/TrackListBase.cpp:
* html/track/VideoTrack.cpp:
* html/track/WebVTTParser.cpp:
2013-11-04 Brady Eidson <beidson@apple.com>
IDB: deleteDatabase() interface should be asynchronous
https://bugs.webkit.org/show_bug.cgi?id=123787
Reviewed by Tim Horton.
No new tests (No behavior change for a tested port).
deleteDatabase now has no return value, but calls back to a bool function:
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::deleteDatabase):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
Refactor to account for the new async deleteDatabase:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::deleteDatabase):
(WebCore::IDBDatabaseBackendImpl::deleteDatabaseAsync):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
2013-11-04 Brady Eidson <beidson@apple.com>
Add Modules/indexeddb/leveldb to the WebCore.xcodeproj
Rubberstamped by Andreas Kling.
This will make hacking on IDB much easier for Mac developers as they won’t have
to constantly add and then subtract the leveldb subdirectory.
The USE(LEVELDB) flag is still disabled so these files won’t actually build by default.
* WebCore.xcodeproj/project.pbxproj:
2013-11-04 Brady Eidson <beidson@apple.com>
Address review feedback I forgot to commit in r158641
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls):
2013-11-04 Brady Eidson <beidson@apple.com>
IDB: Make opening/establishing a database asynchronous.
https://bugs.webkit.org/show_bug.cgi?id=123775
Reviewed by Andreas Kling.
No new tests (No behavior change for a tested port).
* Modules/indexeddb/IDBBackingStoreInterface.h: Add getOrEstablishIDBDatabaseMetadata with a callback,
removing getIDBDatabaseMetaData, getObjectStores, and createIDBDatabaseMetaData in the process.
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata): Adapted from getIDBDatabaseMetaData,
implement the asynchronous interface in terms of other LevelDB methods, always calling back synchronously.
(WebCore::IDBBackingStoreLevelDB::createIDBDatabaseMetaData):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::create):
(WebCore::IDBDatabaseBackendImpl::openInternalAsync): Broken off from openInternal.
(WebCore::IDBDatabaseBackendImpl::didOpenInternalAsync): Broken off from openInternal.
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls): Broken off to allow didOpenInternalAsync
to perform open callbacks in the failure case.
(WebCore::IDBDatabaseBackendImpl::openConnection): Always queue open connection calls, then immediately processPendingCalls.
(WebCore::IDBDatabaseBackendImpl::openConnectionInternal): Actually perform open connection calls.
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
2013-11-04 Andreas Kling <akling@apple.com>
CTTE: RenderFrameBase's widget is always a FrameView.
<https://webkit.org/b/123771>
Delete widget() from RenderFrameBase and supplant a childView()
that returns FrameView*. Strip away unnecessary casts and asserts.
Reviewed by Antti Koivisto.
2013-11-04 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Shapes] Content in region doesn't respect shape-outside after initial layout pass
<https://webkit.org/b/114829>
Although we set the size of a shape for shape-outside in RenderBlockFlow::insertFloatingObject based on the
float's size, the actual height of the float is not always resolved at that point. (Look at cases when the shape
has percentage based height or percentage based radius.) ShapeInfo::setShapeSize triggers a layout for 0 height
value, which will be overriden later, when RenderBlockFlow::positionNewFloats sets the actual size of the float (shape).
Thus it doesn't make sense to set the shape's size in insertFloatingObject and run those extra unnecessary layout passes,
since it'll be overriden anyways. I moved the shape size setting logic into RenderBlockFlow::positionNewFloats.
The problem showed up when we had a shape-outside ellipse with percentage based radius, and we inserted the content
with JavaScript into a region flow. The content has been layed out based on the 0 border radius, and relayout hasn't been
triggered when it flew into the flow. This change sets the shape size only when we already have the height of the float,
so the radius(es) can be resolved correctly, thus no unnecessary layout passes will happen and the layout will be correct as well.
Reviewed by David Hyatt.
Test: fast/shapes/shape-outside-floats/shape-outside-floats-layout-after-initial-layout-pass.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::insertFloatingObject): Remove setting the size of the shape.
(WebCore::RenderBlockFlow::positionNewFloats): Set the size of the shape here.
2013-11-04 Samuel White <samuel_white@apple.com>
AX: AXShowMenu doesn't always work.
https://bugs.webkit.org/show_bug.cgi?id=123649
Reviewed by Chris Fleizach.
No new tests, the change occurs in a code path that forces the context menu to show which
locks up DRT if we try to test it (platform menu is shown). The change itself gives the mouse
event handler a chance to handle our platform mouse event BEFORE the event ends up in the show
context menu machinery. This is necessary because without it, the element will not become
focused. Without focus, accessibility shows different/less menu items than a mouse click. The
end result is that context menus shown via accessibility are consistent with menus shown via click.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::showContextMenuAt):
2013-11-04 Jeffrey Pfau <jpfau@apple.com>
SMIL timers can still fire after the containing document has been torn down
<https://webkit.org/b/123291>
Reviewed by Darin Adler.
Ensure that the timers get paused when the document is preparing to be torn down.
Test: svg/animations/smil-timers-not-disabled-crash.html
* dom/Document.cpp:
(WebCore::Document::dropChildren):
(WebCore::Document::commonTeardown):
(WebCore::Document::prepareForDestruction):
* dom/Document.h:
2013-11-04 Brendan Long <b.long@cablelabs.com>
Move duplicate code in TrackPrivate classes to a common base class
https://bugs.webkit.org/show_bug.cgi?id=123619
Reviewed by Darin Adler.
No new tests because this is just refactoring.
* GNUmakefile.list.am: Add TrackPrivateBase.
* WebCore.vcxproj/WebCore.vcxproj: Same.
* WebCore.vcxproj/WebCore.vcxproj.filters: Same.
* WebCore.xcodeproj/project.pbxproj: Same.
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::inbandTrackIndex): Renamed audioTrackIndex() to trackIndex().
(WebCore::AudioTrack::labelChanged): First argument is now a TrackPrivateBase*.
(WebCore::AudioTrack::languageChanged): Same.
(WebCore::AudioTrack::willRemove): Same.
* html/track/AudioTrack.h: Update TrackPrivateBaseClient function signatures.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::inbandTrackIndex): Renamed textTrackIndex() to trackIndex().
(WebCore::InbandTextTrack::labelChanged): First argument is now a TrackPrivateBase*.
(WebCore::InbandTextTrack::languageChanged): Same.
(WebCore::InbandTextTrack::willRemove): Same.
* html/track/InbandTextTrack.h: Update TrackPrivateBaseClient function signatures.
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::inbandTrackIndex): Renamed videoTrackIndex() to trackIndex().
(WebCore::VideoTrack::labelChanged): First argument is now a TrackPrivateBase*.
(WebCore::VideoTrack::languageChanged): Same.
(WebCore::VideoTrack::willRemove): Same.
* html/track/VideoTrack.h: Update TrackPrivateBaseClient function signatures.
* platform/graphics/AudioTrackPrivate.h: Remove code that was moved to TrackPrivateBase.
* platform/graphics/InbandTextTrackPrivate.h: Same.
* platform/graphics/InbandTextTrackPrivateClient.h: Same.
* platform/graphics/VideoTrackPrivate.h: Same.
* platform/graphics/TrackPrivateBase.h: Refactored out duplicate code in AudioTrackPrivate, InbandTextTrackPrivate and VideoTrackPrivate.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Renamed textTrackIndex() to trackIndex().
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Same.
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Renamed audioTrackIndex() to trackIndex().
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Renamed videoTrackIndex() to trackIndex90.
2013-11-04 Andreas Kling <akling@apple.com>
FrameView destructor is worried about being retained by a renderer.
<https://webkit.org/b/123763>
There's no way we can be in ~FrameView() while also being owned by
a RenderWidget. Remove some overly paranoid code that was making sure
the renderer didn't have a reference on us.
Reviewed by Anders Carlsson.
2013-11-04 Eric Carlson <eric.carlson@apple.com>
REGRESSION(r158311): media/media-fragments/TC0054.html and TC0061.html hit assertions
https://bugs.webkit.org/show_bug.cgi?id=123555
Reviewed by Darin Adler.
No new tests, covered by existing tests.
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments): Don't add a fragment with empty key or value as
they will not processed.
(WebCore::MediaFragmentURIParser::parseNPTFragment): Remove excess whitespace.
2013-11-04 Patrick Gansterer <paroga@webkit.org>
Remove code duplications in createFontCustomPlatformData()
https://bugs.webkit.org/show_bug.cgi?id=123706
Reviewed by Darin Adler.
Move OpenTypeSanitizer and WOFF handling from the port specific
implementations in createFontCustomPlatformData() into the only
caller of this function CachedFont::ensureCustomFontData().
Also change the parameter passing the SharedBuffer from a
pointer to a reference since it is never null.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
* platform/graphics/blackberry/FontCustomPlatformData.h:
* platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp:
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/cairo/FontCustomPlatformData.h:
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/FontCustomPlatformData.h:
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/win/FontCustomPlatformData.h:
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/wince/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/wince/FontCustomPlatformData.h:
2013-11-04 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Fixing MediaStreamDescriptor addSource and addTrack methods
https://bugs.webkit.org/show_bug.cgi?id=123755
Reviewed by Eric Carlson.
We must store the track and source that is passed as parameter in a RefPtr,
otherwise we will refer to a null pointer.
No new tests needed.
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::addSource):
(WebCore::MediaStreamDescriptor::addTrack):
2013-11-04 Tim Horton <timothy_horton@apple.com>
Remove PlatformCALayer::playerLayer
https://bugs.webkit.org/show_bug.cgi?id=123764
Reviewed by Sam Weinig.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::clone):
Remove playerLayer(), fold it into clone().
2013-11-04 Chris Fleizach <cfleizach@apple.com>
AX: Mail attachments at the start of an email are not output by VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=123697
Reviewed by Ryosuke Niwa.
VoiceOver is expecting that "replaced elements" (attachments in a Mail message in this case) to be
represented by the replacement character when asking for a stringForRange.
However, when that replaced element is at the beginning of the document, the logic does not work because
there is a few code places that will take that first Position and advance it forward, not accounting for replaced elements.
When using the TextIterator normally, it does account for these, so that's why it's only affecting as at the beginning of the document.
Also a "replaced element" can be more than just renderer->isReplaced(), hence the externing of the isRendererReplacedElement method
and using that it in pertinent places.
Tests: platform/mac/accessibility/object-replacement-with-no-rendered-children-at-node-start.html
platform/mac/accessibility/object-replacement-with-rendered-children-at-node-start.html
* accessibility/AccessibilityObject.cpp:
(WebCore::replacedNodeNeedsCharacter):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(nsStringForReplacedNode):
* dom/Position.cpp:
(WebCore::Position::isCandidate):
* dom/PositionIterator.cpp:
* dom/Range.cpp:
(WebCore::Range::firstNode):
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
* editing/TextIterator.h:
2013-11-04 Andreas Kling <akling@apple.com>
Use RenderAncestorIterator in a couple of places.
<https://webkit.org/b/123725>
Take the ancestorsOfType<RenderMoo>() thingy out for a spin.
Found a bunch of parent chain walking loops that were really just
looking for the first ancestor renderer of a certain type.
They were a perfect fit for this pattern:
if (auto svgRoot = ancestorsOfType<RenderSVGRoot>(renderer).first())
svgRoot->shakeMoneyMaker();
Quite a bit clearer than the previous:
for (auto ancestor = renderer.parent(); ancestor; ancestor = ancestor->parent()) {
if (ancestor->isSVGRoot())
toRenderSVGRoot(ancestor)->makeMoneyShaker();
}
Reviewed by Antti Koivisto.
2013-10-25 Jer Noble <jer.noble@apple.com>
[MSE] Add a SourceBufferPrivateClient interface for platform -> html communication.
https://bugs.webkit.org/show_bug.cgi?id=123373
Reviewed by Eric Carlson.
To enable communication between SourceBuffer and SourceBufferPrivate without introducing
layering violations, add a new interface class SourceBufferPrivateInterface from which
SourceBuffer will inherit.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::SourceBuffer): Set the private's client.
(WebCore::SourceBuffer::~SourceBuffer): Clear the private's client.
(WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Added stub.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Hinno.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
(WebCore::SourceBuffer::sourceBufferPrivateHasAudio): Ditto.
(WebCore::SourceBuffer::sourceBufferPrivateHasVideo): Ditto.
* Modules/mediasource/SourceBuffer.h:
* WebCore.xcodeproj/project.pbxproj: Add new files to project.
* platform/graphics/SourceBufferPrivate.h:
* platform/graphics/SourceBufferPrivateClient.h: Added.
(WebCore::SourceBufferPrivateClient::~SourceBufferPrivateClient): Empty destructor.
2013-11-01 Jer Noble <jer.noble@apple.com>
[PluginProxy] Add a setting to disable video plugin proxy support in HTMLMediaElement.
https://bugs.webkit.org/show_bug.cgi?id=123621
Reviewed by Eric Carlson.
Add a new Setting which will disable the video plugin proxy. Enable support for AVFoundation
in iOS (which requries fixing a few compile errors resulting from classes and methods which
are not available on iOS.
* WebCore.exp.in: Export wkAVAssetResolvedURL.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement): Make conditional upon
new isVideoPluginProxyEnabled() setting.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Ditto.
* html/HTMLMediaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::createRenderer): Ditto.
(WebCore::HTMLVideoElement::attach): Ditto.
(WebCore::HTMLVideoElement::parseAttribute): Ditto.
(HTMLVideoElement::setDisplayMode): Ditto.
* html/HTMLVideoElement.h:
* page/Settings.cpp:
(WebCore::Settings::setVideoPluginProxyEnabled): Simple setter.
* page/Settings.h:
(WebCore::Settings::isVideoPluginProxyEnabled): Simple getter.
* platform/graphics/MediaPlayer.cpp:
(WebCore::installedMediaEngines): Conditionally add MediaPlayerPrivateIOS and always add
MediaPlayerPriateAVFoundationObjC.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::deliverNotification): Add default implementation.
(WebCore::MediaPlayerPrivateInterface::setMediaPlayerProxy): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Use new
HAS_ and USE_ macros instead of __MAC_OS_MIN_VERNSION_REQUIRED.
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasContextRenderer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createContextVideoRenderer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyContextVideoRenderer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Use cachedCGColor instead
of CGColorGetConstantColor.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use CVPixelBuffer pixel
format constant instead of QuickDraw constant.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Draw to intermediary
CGImage on iOS.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
2013-11-04 Andreas Kling <akling@apple.com>
REGRESSION(r158561): fast/block/float/float-append-child-crash.html asserting.
The non-const ancestor iterator was walking siblings, not ancestors.
Rubber-stamped by Antti Koivisto.
2013-10-31 Jer Noble <jer.noble@apple.com>
[MSE] [Mac] Disclaim support for MSE in AVFoundation and QTKit engines
https://bugs.webkit.org/show_bug.cgi?id=123593
Reviewed by Eric Carlson.
Immediately fail if asked to load a Media Source in engines which do not support
them.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::load):
(WebCore::MediaPlayerPrivateQTKit::supportsType):
2013-11-04 Hans Muller <hmuller@adobe.com>
[CSS Shapes] image valued shape element margin can cause an ASSERT fail
https://bugs.webkit.org/show_bug.cgi?id=123743
Reviewed by Andreas Kling.
When margin-top is specified for a shape's element, the Y coordinates passed
to RasterShapeIntervals::getExcludedIntervals() may be negative. This is
because the incoming logical coordinates are relative to the content or
padding box, depending on the box-sizing property. The RasterShape::getExcludedIntervals()
method now clips the incoming Y coordinates to the shape's bounds before
accessing the shape's intervals.
Test: fast/shapes/shape-outside-floats/shape-outside-floats-margin-crash.html
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::getExcludedIntervals):
2013-11-04 Antti Koivisto <antti@apple.com>
Make LiveNodeListBase use Elements instead of Nodes
https://bugs.webkit.org/show_bug.cgi?id=123745
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* dom/Element.cpp:
(WebCore::Element::firstElementChild):
(WebCore::Element::lastElementChild):
Switch to correct calls. ElementTraversal::previous and previousChild are no longer equivalent.
* dom/ElementTraversal.h:
(WebCore::::lastWithinTemplate):
(WebCore::::previousTemplate):
Fix ElementTraversal::lastWithin and previous. They had no real clients and didn't work correctly.
With LiveNodeListBase starting to use these they get excellent test coverage.
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeListBase::invalidateCache):
* dom/LiveNodeList.h:
(WebCore::LiveNodeListBase::LiveNodeListBase):
(WebCore::LiveNodeListBase::isElementCacheValid):
(WebCore::LiveNodeListBase::cachedElement):
(WebCore::LiveNodeListBase::cachedElementOffset):
(WebCore::LiveNodeListBase::setCachedElement):
Make the cache Element based.
Switch to Elements in all helpers.
Rename item -> element for clarity.
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::NodePointer::moveToPrevious):
(WebCore::NodeIterator::updateForNodeRemoval):
This code expected the old inconsistent NodeTraversal::previous behavior where the traversal includes
the root as the last item. Drop the stayWithin parameter and handle the one case where it is needed here.
* dom/NodeTraversal.cpp:
(WebCore::NodeTraversal::last):
(WebCore::NodeTraversal::deepLastChild):
* dom/NodeTraversal.h:
Support ElementTraversal::previous/lastWithin.
(WebCore::NodeTraversal::previous):
This was slightly wrong too.
* html/HTMLCollection.cpp:
(WebCore::previousElement):
(WebCore::lastElement):
(WebCore::LiveNodeListBase::iterateForPreviousElement):
(WebCore::LiveNodeListBase::itemBefore):
(WebCore::LiveNodeListBase::isLastItemCloserThanLastOrCachedItem):
(WebCore::LiveNodeListBase::isFirstItemCloserThanCachedItem):
(WebCore::LiveNodeListBase::setCachedElement):
(WebCore::LiveNodeListBase::item):
(WebCore::LiveNodeListBase::elementBeforeOrAfterCachedElement):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::isEmpty):
(WebCore::HTMLCollection::hasExactlyOneItem):
2013-11-04 Michael Saboff <msaboff@apple.com>
Eliminate HostCall bit from JSC Stack CallerFrame
https://bugs.webkit.org/show_bug.cgi?id=123642
Reviewed by Geoffrey Garen.
Updated JavaScript stack walking as a result of the corresponding changes made in
JavaScriptCore.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::stepOutOfFunction):
(WebCore::ScriptDebugServer::returnEvent):
(WebCore::ScriptDebugServer::didExecuteProgram):
2013-11-04 Bem Jones-Bey <bjonesbe@adobe.com>
[css shapes] Fix support for shape-outside on a float with padding
https://bugs.webkit.org/show_bug.cgi?id=123590
Reviewed by Alexandru Chiculita.
The line top was being improperly converted to the coordinates of the
shape, causing the shape to be positioned incorrectly when the float
had padding. This fixes that problem.
No new tests, covered by updates to existing ones.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
2013-11-04 Alexey Proskuryakov <ap@apple.com>
Implement generateKey for HMAC and AES-CBC
https://bugs.webkit.org/show_bug.cgi?id=123669
Reviewed by Dan Bernstein.
Tests: crypto/subtle/aes-cbc-generate-key.html
crypto/subtle/hmac-generate-key.html
* WebCore.xcodeproj/project.pbxproj: Added new files.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesKeyGenParams): Added bindings for AesKeyGenParams.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Handle
algorithms that generate AES and HMAC keys.
* bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::generateKey): Added.
* crypto/CryptoAlgorithmAesKeyGenParams.h: Added.
* crypto/CryptoKey.cpp: (WebCore::CryptoKey::randomData):
* crypto/CryptoKey.h:
* crypto/CryptoKeyMac.cpp: Added
Expose a function that produces random data for symmetric crypto keys. Cross-platform
implementation uses ARC4 code from WTF, while Mac uses a system function that
provides a FIPS validated random number generator.
* crypto/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::generate):
* crypto/CryptoKeyAES.h:
Added a function that creates AES keys.
* crypto/SubtleCrypto.idl: Added generateKey.
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::generateKey): Added.
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey): Added.
* crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::generate):
* crypto/keys/CryptoKeyHMAC.h:
Added a function that creates HMAC keys.
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Removed generateKey stub, the implementation
ended up in cross-platform file.
* crypto/mac/CryptoAlgorithmHMACMac.cpp: Ditto.
2013-11-04 Daniel Bates <dabates@apple.com>
Revert SetCGFontRenderingMode() build fix for Chromium Mac
https://bugs.webkit.org/show_bug.cgi?id=123633
Reviewed by Darin Adler.
Reverts <http://trac.webkit.org/changeset/134380>, which
was a Chromium Mac build fix for <http://trac.webkit.org/changeset/134348>
(https://bugs.webkit.org/show_bug.cgi?id=101787). Chromium doesn't
build against top-of-tree WebKit.
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2013-11-04 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r158526.
http://trac.webkit.org/changeset/158526
https://bugs.webkit.org/show_bug.cgi?id=123744
it broke the build (Requested by jessieberlin on #webkit).
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesCbcParams):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
* bindings/js/JSSubtleCryptoCustom.cpp:
* crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
* crypto/CryptoKey.cpp:
* crypto/CryptoKey.h:
* crypto/CryptoKeyAES.cpp:
* crypto/CryptoKeyAES.h:
* crypto/CryptoKeyMac.cpp: Removed.
* crypto/SubtleCrypto.idl:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
* crypto/keys/CryptoKeyHMAC.cpp:
* crypto/keys/CryptoKeyHMAC.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey):
2013-11-04 Przemyslaw Szymanski <p.szymanski3@samsung.com>
[Texmap] Remove redundant calls in CoordinatedGraphicsScene
https://bugs.webkit.org/show_bug.cgi?id=123737
Reviewed by Noam Rosenthal.
Removing unused code left after few refactoring patches.
No new tests. Covered by existing ones.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
2013-11-04 Andreas Kling <akling@apple.com>
CSSPrimitiveValue color constructors should return PassRef.
<https://webkit.org/b/123728>
Make CSSPrimitiveValue::createColor() and the corresponding
CSSValuePool helper functions return PassRef<CSSPrimitiveValue>.
Also made CSSValuePool slightly less stupid when hitting the upper
size limit on the color value cache: instead of throwing out cache
and rebuilding it from scratch, just remove one value at random.
Reviewed by Antti Koivisto.
2013-11-04 Andreas Kling <akling@apple.com>
Some more RenderChildIterator deployment.
<https://webkit.org/b/123735>
Convert another handful of loops to use childrenOfType<RenderFoo>
iterators, mostly for skipping over uninteresting text renderers.
Reviewed by Antti Koivisto.
2013-11-04 Andreas Kling <akling@apple.com>
LabelsNodeList always is always rooted at a LabelableElement.
<https://webkit.org/b/123730>
Tighten up LabelsNodeList by enforcing that it's only rooted to
a LabelableElement. Also marked the class FINAL and made its
create() helper return PassRef.
Reviewed by Antti Koivisto.
2013-11-04 Andreas Kling <akling@apple.com>
REGRESSION: RenderStyle is leaked when not creating renderer for display:none
<https://webkit.org/b/123726>
Explicitly drop the RenderStyle reference in RenderElement::createFor
if we decide to not create any renderer.
Reviewed by Antti Koivisto.
Test: fast/css/renderstyle-leak-with-display-none.html
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
2013-11-04 Santosh Mahto <santosh.ma@samsung.com>
[webcore/dom] Remove extra header includes from cpp files.
https://bugs.webkit.org/show_bug.cgi?id=123720
Reviewed by Andreas Kling.
Removing redundant headers from dom related cpp files.
* dom/Attr.cpp:
* dom/CharacterData.cpp:
* dom/ChildListMutationScope.cpp:
* dom/ChildNodeList.cpp:
* dom/ContainerNode.cpp:
* dom/ContainerNodeAlgorithms.cpp:
* dom/DOMNamedFlowCollection.cpp:
* dom/DatasetDOMStringMap.cpp:
* dom/Document.cpp:
* dom/DocumentEventQueue.cpp:
* dom/DocumentMarkerController.cpp:
* dom/DocumentOrderedMap.cpp:
* dom/DocumentStyleSheetCollection.cpp:
* dom/Element.cpp:
* dom/ElementRareData.cpp:
* dom/Event.cpp:
* dom/EventContext.cpp:
* dom/EventDispatcher.cpp:
* dom/EventTarget.cpp:
* dom/ExceptionBase.cpp:
* dom/FocusEvent.cpp:
* dom/InlineStyleSheetOwner.cpp:
* dom/KeyboardEvent.cpp:
* dom/LiveNodeList.cpp:
* dom/MessageEvent.cpp:
* dom/MessagePort.cpp:
* dom/MouseRelatedEvent.cpp:
* dom/MutationEvent.cpp:
* dom/MutationObserver.cpp:
* dom/MutationObserverInterestGroup.cpp:
* dom/MutationObserverRegistration.cpp:
* dom/MutationRecord.cpp:
* dom/NameNodeList.cpp:
* dom/NamedFlowCollection.cpp:
* dom/NamedNodeMap.cpp:
* dom/Node.cpp:
* dom/NodeIterator.cpp:
* dom/NodeTraversal.cpp:
* dom/PositionIterator.cpp:
* dom/ProcessingInstruction.cpp:
* dom/Range.cpp:
* dom/RegisteredEventListener.cpp:
* dom/ScopedEventQueue.cpp:
* dom/ScriptElement.cpp:
* dom/ScriptRunner.cpp:
* dom/SelectorQuery.cpp:
* dom/ShadowRoot.cpp:
* dom/StyledElement.cpp:
* dom/TagNodeList.cpp:
* dom/Text.cpp:
* dom/TextEvent.cpp:
* dom/TouchEvent.cpp:
* dom/TreeScope.cpp:
* dom/TreeScopeAdopter.cpp:
* dom/TreeWalker.cpp:
* dom/UIEvent.cpp:
* dom/UserActionElementSet.cpp:
* dom/UserTypingGestureIndicator.cpp:
* dom/VisitedLinkState.cpp:
* dom/WebKitNamedFlow.cpp:
2013-11-04 Andreas Kling <akling@apple.com>
HTMLAllCollection is always rooted at a Document.
<https://webkit.org/b/123724>
Tighten up HTMLAllCollection by making the constructor take a
Document& instead of a ContainerNode&. Drive-by application of
FINAL and PassRef also happened.
Reviewed by Antti Koivisto.
2013-11-04 Andreas Kling <akling@apple.com>
Make more CSSValue subclass constructors return PassRef.
<https://webkit.org/b/123731>
Make the constructor helpers for the following classes return
PassRef instead of PassRefPtr:
- CSSFontValue
- CSSImageSetValue
- CSSUnicodeRangeValue
- WebKitCSSArrayFunctionValue
- WebKitCSSFilterValue
- WebKitCSSMatFunctionValue
- WebKitCSSMixFunctionValue
- WebKitCSSShaderValue
- WebKitCSSTransformValue
Reviewed by Antti Koivisto.
2013-11-04 Jozsef Berta <jberta@inf.u-szeged.hu>
Buildfix after r158182 for GCC 4.6
https://bugs.webkit.org/show_bug.cgi?id=123442
Reviewed by Csaba Osztrogonác.
Added explicit "friend class", because GCC 4.6 doesn't support extended friend declaration (c++11)
* dom/ScopedEventQueue.h:
2013-11-04 Andreas Kling <akling@apple.com>
HTMLTableRowsCollection is always rooted at a HTMLTableElement.
<https://webkit.org/b/123721>
Tighten up HTMLTableRowsCollection by making the create() helper
take a HTMLTableElement& and adding a HTMLSelectElement& getter.
Reviewed by Antti Koivisto.
2013-11-04 Andreas Kling <akling@apple.com>
HTMLNameCollection and friends are always rooted at a Document.
<https://webkit.org/b/123722>
Tighten WindowNameCollection and DocumentNameCollection by making
their constructors take a Document&, and add a slightly better
document() than the one we inherit from LiveNodeListBase.
Also marked the classes FINAL and made create() helpers return
PassRef instead of PassRefPtr.
Reviewed by Antti Koivisto.
2013-11-04 Andreas Kling <akling@apple.com>
Add an ancestor renderer iterator.
<https://webkit.org/b/123718>
Add ancestor iterators for renderers, analogous to element ancestor
iterators. They walk the chain of parent renderers, stopping at each
ancestor of a certain type.
Just like child renderer iterators, this requires isRendererOfType()
to be implemented for the targeted renderer class.
You use them like this:
auto frameSets = ancestorsOfType<RenderFrameSet>(*this);
for (auto frameSet = frameSets.begin(), end = frameSets.end(); frameSet != end; ++frameSet)
frameSet->thisOrThat();
To complete the patch, I put them to use in a couple of random places.
Reviewed by Antti Koivisto.
2013-11-04 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Use auto keyword to clean-up for loops
https://bugs.webkit.org/show_bug.cgi?id=123699
Reviewed by Anders Carlsson.
Start using auto keyword for loops.
Also, since region breaks (forced breaks) can be added only on boxes,
i changed RenderFlowThread::addForcedRegionBreak to use a RenderBox* instead of RenderObject*.
No change in functionality, no new tests.
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
(WebCore::FlowThreadController::styleDidChange):
(WebCore::FlowThreadController::layoutRenderNamedFlowThreads):
(WebCore::FlowThreadController::updateFlowThreadsChainIfNecessary):
(WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
(WebCore::FlowThreadController::updateFlowThreadsNeedingTwoStepLayout):
(WebCore::FlowThreadController::resetFlowThreadsWithAutoHeightRegions):
(WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
(WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
(WebCore::FlowThreadController::collectFixedPositionedLayers):
(WebCore::FlowThreadController::isAutoLogicalHeightRegionsCountConsistent):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::hasCompositingRegionDescendant):
(WebCore::RenderFlowThread::getLayerListForRegion):
(WebCore::RenderFlowThread::updateLayerToRegionMappings):
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::repaintRectangleInRegions):
(WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
(WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::setRegionRangeForBox):
(WebCore::RenderFlowThread::getRegionRangeForBox):
(WebCore::RenderFlowThread::regionInRange):
(WebCore::RenderFlowThread::checkRegionsWithStyling):
(WebCore::RenderFlowThread::objectInFlowRegion):
(WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent):
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
(WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
(WebCore::RenderFlowThread::collectLayerFragments):
(WebCore::RenderFlowThread::fragmentsBoundingBox):
(WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
(WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::RenderFlowThread::addRegionsLayoutOverflow):
(WebCore::RenderFlowThread::clearRegionsOverflow):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::nextRendererForNode):
(WebCore::RenderNamedFlowThread::previousRendererForNode):
(WebCore::RenderNamedFlowThread::dependsOn):
(WebCore::addRegionToList):
(WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::pushDependencies):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::setRegionObjectsRegionStyle):
(WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
(WebCore::RenderRegion::computeChildrenStyleInRegion):
2013-11-03 Zan Dobersek <zdobersek@igalia.com>
PingLoader objects unnecessarily pass through OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=122942
Reviewed by Darin Adler.
There's no need to store new PingLoader objects into an OwnPtr just to leak them out a few lines later
into an unused variable. New objects are created through a new helper method and then left unmanaged as
they're guaranteed to destroy themselves when they receive a response of any kind.
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage): Call the new createPingLoader method to spawn the PingLoader.
(WebCore::PingLoader::sendPing): Ditto.
(WebCore::PingLoader::sendViolationReport): Ditto.
(WebCore::PingLoader::createPingLoader): A helper method that creates a new PingLoader object
* loader/PingLoader.h: Declare the new PingLoader::createPingLoader method.
2013-11-03 Andreas Kling <akling@apple.com>
HTMLOptionsCollection is always rooted at a HTMLSelectElement.
<https://webkit.org/b/123719>
Tighten up HTMLOptionsCollection by making the constructor take
a HTMLSelectElement& and adding a HTMLSelectElement& getter instead
of casting all over the place. Removed now-pointless assertions.
Reviewed by Sam Weinig.
2013-11-03 Andreas Kling <akling@apple.com>
RenderTextFragment: Tighten first-letter logic.
<https://webkit.org/b/123714>
Reviewed by Antti Koivisto.
* editing/TextIterator.cpp:
(WebCore::firstRenderTextInFirstLetter):
Use iterator helper to find first RenderText child.
(WebCore::TextIterator::handleTextNodeFirstLetter):
Tightening through type inference.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
* rendering/RenderTextFragment.h:
The first letter renderer is always a RenderBoxModelObject,
so make the code deal in that instead of RenderObject.
* rendering/RenderChildIterator.h:
(WebCore::RenderChildIteratorAdapter::first):
(WebCore::RenderChildIteratorAdapter::last):
Remove excess ampersands that were keeping this from building.
2013-11-03 Andreas Kling <akling@apple.com>
CSSPrimitiveValue identifier constructors should return PassRef.
<https://webkit.org/b/123712>
Make CSSPrimitiveValue::createIdentifier() and the corresponding
CSSValuePool helper return PassRef<CSSPrimitiveValue>.
Reviewed by Antti Koivisto.
2013-11-03 Andreas Kling <akling@apple.com>
Use RenderChildIterator in two more loops.
<https://webkit.org/b/123713>
Switch two more renderer child traversal loops to childrenOfType.
Reviewed by Antti Koivisto.
2013-11-03 Andreas Kling <akling@apple.com>
CSSShadowValue constructor should return PassRef.
<https://webkit.org/b/123711>
Make CSSShadowValue::create() return a PassRef since it will never
return null.
Reviewed by Sam Weinig.
2013-11-03 Andreas Kling <akling@apple.com>
CSSLineBoxContainValue constructor should return PassRef.
<https://webkit.org/b/123710>
Make CSSLineBoxContainValue::create() return a PassRef since it
will never return null.
Reviewed by Sam Weinig.
2013-11-03 Antti Koivisto <antti@apple.com>
LiveNodeLists should have non-null ContainerNode as root
https://bugs.webkit.org/show_bug.cgi?id=123709
Reviewed by Andreas Kling.
After moving ChildNodeList off from LiveNodeList the root is now always at least a ContainerNode.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByTagName):
(WebCore::ContainerNode::getElementsByTagNameNS):
(WebCore::ContainerNode::getElementsByName):
(WebCore::ContainerNode::getElementsByClassName):
(WebCore::ContainerNode::radioNodeList):
Also these move from Node to ContainerNode to make tighter typing work.
2013-11-03 Antti Koivisto <antti@apple.com>
Switch createContextualFragment to element iterator
https://bugs.webkit.org/show_bug.cgi?id=123704
Reviewed by Andreas Kling.
* editing/FrameSelection.cpp:
(WebCore::scanForForm):
Use type helpers instead of hasTagName
* editing/markup.cpp:
(WebCore::collectElementsToRemoveFromFragment):
(WebCore::removeElementFromFragmentPreservingChildren):
(WebCore::createContextualFragment):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):
Use type helpers instead of hasTagName
* html/HTMLTagNames.in:
Generate type helpers for <html>.
2013-11-03 Antti Koivisto <antti@apple.com>
ChildNodeList should not be LiveNodeList
https://bugs.webkit.org/show_bug.cgi?id=123708
Reviewed by Sam Weinig.
ChildNodeList is a poor fit to be a LiveNodeList. It is heavily special-cased. It is also
the only subtype that returns non-Elements thus preventing tightening.
* bindings/js/JSNodeListCustom.cpp:
(WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
Support new types.
* dom/ChildNodeList.cpp:
(WebCore::EmptyNodeList::~EmptyNodeList):
(WebCore::ChildNodeList::ChildNodeList):
(WebCore::ChildNodeList::~ChildNodeList):
(WebCore::ChildNodeList::length):
(WebCore::childFromFirst):
(WebCore::childFromLast):
(WebCore::ChildNodeList::nodeBeforeCached):
(WebCore::ChildNodeList::nodeAfterCached):
(WebCore::ChildNodeList::item):
(WebCore::ChildNodeList::namedItem):
(WebCore::ChildNodeList::invalidateCache):
Implement the same caching optimizations as LiveNodeList with tighter, less generic code.
* dom/ChildNodeList.h:
Inherit ChildNodeList directly from NodeList.
Add new EmptyNodeList type. This is only ever used if NodeList is requested for a non-container node.
It allows tighter typing in ChildNodeList.
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::namedItem):
* dom/LiveNodeList.h:
(WebCore::LiveNodeListBase::LiveNodeListBase):
(WebCore::LiveNodeListBase::~LiveNodeListBase):
(WebCore::LiveNodeList::LiveNodeList):
Remove ChildNodeList specific code and branches.
* dom/Node.cpp:
(WebCore::Node::childNodes):
Return EmptyNodeList for non-containers.
* dom/NodeList.h:
(WebCore::NodeList::~NodeList):
(WebCore::NodeList::isLiveNodeList):
(WebCore::NodeList::isChildNodeList):
(WebCore::NodeList::isEmptyNodeList):
For isReachableFromOpaqueRoots.
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::ensureChildNodeList):
(WebCore::NodeListsNodeData::removeChildNodeList):
(WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
(WebCore::NodeListsNodeData::removeEmptyChildNodeList):
(WebCore::NodeListsNodeData::NodeListsNodeData):
(WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
EmptyNodeList support.
* html/CollectionType.h:
* html/HTMLCollection.cpp:
(WebCore::shouldOnlyIncludeDirectChildren):
(WebCore::rootTypeFromCollectionType):
(WebCore::invalidationTypeExcludingIdAndNameAttributes):
(WebCore::isMatchingElement):
(WebCore::LiveNodeListBase::itemBefore):
(WebCore::LiveNodeListBase::traverseLiveNodeListFirstElement):
(WebCore::LiveNodeListBase::traverseLiveNodeListForwardToOffset):
(WebCore::LiveNodeListBase::item):
(WebCore::LiveNodeListBase::itemBeforeOrAfterCachedItem):
Remove ChildNodeList specific code and branches.
2013-11-03 Patrick Gansterer <paroga@webkit.org>
[WINCE] Replace OwnPtr with GDIObject
https://bugs.webkit.org/show_bug.cgi?id=123670
Reviewed by Anders Carlsson.
* page/win/FrameGdiWin.cpp:
(WebCore::imageFromRect):
* platform/graphics/wince/FontPlatformData.cpp:
(WebCore::FixedSizeFontData::create):
(WebCore::FontPlatformData::hfont):
(WebCore::FontPlatformData::getScaledFontHandle):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::createPen):
(WebCore::createBrush):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::drawRoundCorner):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::drawText):
* platform/graphics/wince/ImageWinCE.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
* platform/graphics/wince/SharedBitmap.cpp:
(WebCore::SharedBitmap::createHandle):
(WebCore::SharedBitmap::draw):
(WebCore::SharedBitmap::clipBitmap):
(WebCore::drawPatternSimple):
(WebCore::SharedBitmap::drawPattern):
(WebCore::SharedBitmap::DCProvider::getDC):
* platform/graphics/wince/SharedBitmap.h:
2013-11-03 Antti Koivisto <antti@apple.com>
Add helpers for partial descendant traversal to element iterators
https://bugs.webkit.org/show_bug.cgi?id=123703
Reviewed by Andreas Kling.
* dom/ElementAncestorIterator.h:
(WebCore::lineageOfType):
lineageOfType definition didn't match the declaration.
* dom/ElementDescendantIterator.h:
(WebCore::::find):
(WebCore::::from):
Add find and from for getting begin iterator for partial traversals.
* editing/FrameSelection.cpp:
(WebCore::scanForForm):
(WebCore::FrameSelection::currentForm):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):
(WebCore::HTMLFormElement::findClosestFormAncestor):
Use them in a few places.
2013-11-03 Andreas Kling <akling@apple.com>
Inline RenderStyle functions for getting/setting pseudo style bits.
<https://webkit.org/b/123702>
hasPseudoStyle() actually shows up on html5-full-render.html,
and it's pretty crazy to eat the cost of a function call just
to do some basic bit twiddling.
Reviewed by Antti Koivisto.
2013-11-03 Xabier Rodriguez Calvar <calvaris@igalia.com>
Remove HTMLMediaElement.initialTime
https://bugs.webkit.org/show_bug.cgi?id=123572
Reviewed by Eric Carlson.
Patch based on one by: philipj@opera.com
Blink review URL: https://codereview.chromium.org/35033002
initialTime has been removed from the HTMLMediaElement.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_media_element_get_initial_time):
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols: Added phony function.
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl: Removed HTMLMediaElement::initialTime.
2013-11-02 Alexey Proskuryakov <ap@apple.com>
Implement generateKey for HMAC and AES-CBC
https://bugs.webkit.org/show_bug.cgi?id=123669
Reviewed by Dan Bernstein.
Tests: crypto/subtle/aes-cbc-generate-key.html
crypto/subtle/hmac-generate-key.html
* WebCore.xcodeproj/project.pbxproj: Added new files.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesKeyGenParams): Added bindings for AesKeyGenParams.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Handle
algorithms that generate AES and HMAC keys.
* bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::generateKey): Added.
* crypto/CryptoAlgorithmAesKeyGenParams.h: Added.
* crypto/CryptoKey.cpp: (WebCore::CryptoKey::randomData):
* crypto/CryptoKey.h:
* crypto/CryptoKeyMac.cpp: Added
Expose a function that produces random data for symmetric crypto keys. Cross-platform
implementation uses ARC4 code from WTF, while Mac uses a system function that
provides a FIPS validated random number generator.
* crypto/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::generate):
* crypto/CryptoKeyAES.h:
Added a function that creates AES keys.
* crypto/SubtleCrypto.idl: Added generateKey.
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::generateKey): Added.
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey): Added.
* crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::generate):
* crypto/keys/CryptoKeyHMAC.h:
Added a function that creates HMAC keys.
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Removed generateKey stub, the implementation
ended up in cross-platform file.
* crypto/mac/CryptoAlgorithmHMACMac.cpp: Ditto.
2013-11-02 Christophe Dumez <ch.dumez@samsung.com>
EnforceRange doesn't enforce range of a short
https://bugs.webkit.org/show_bug.cgi?id=123661
Reviewed by Alexey Proskuryakov.
Handle Web IDL short / unsigned short types as per the
specification:
- http://www.w3.org/TR/WebIDL/#es-short
- http://www.w3.org/TR/WebIDL/#es-unsigned-short
Specifically, we used to treat short / unsigned short as 32bit
integers, which was wrong. We now properly handle them as 16bit
integers.
No new tests, added test cases to js/dom/webidl-type-mapping.html.
* WebCore.exp.in:
* bindings/js/JSDOMBinding.cpp:
(WebCore::toSmallerInt):
(WebCore::toSmallerUInt):
(WebCore::toInt8):
(WebCore::toUInt8):
(WebCore::toInt16):
(WebCore::toUInt16):
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(JSValueToNative):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjShortAttr):
(WebCore::setJSTestObjUnsignedShortAttr):
* testing/TypeConversions.h:
(WebCore::TypeConversions::testShort):
(WebCore::TypeConversions::setTestShort):
(WebCore::TypeConversions::testEnforceRangeShort):
(WebCore::TypeConversions::setTestEnforceRangeShort):
(WebCore::TypeConversions::testUnsignedShort):
(WebCore::TypeConversions::setTestUnsignedShort):
(WebCore::TypeConversions::testEnforceRangeUnsignedShort):
(WebCore::TypeConversions::setTestEnforceRangeUnsignedShort):
* testing/TypeConversions.idl:
2013-11-02 Patrick Gansterer <paroga@webkit.org>
Cleanup OpenTypeUtilities
https://bugs.webkit.org/show_bug.cgi?id=123686
Reviewed by Darin Adler.
Merge the WinCE specific code into the general Windows code to
make the compilation of WinCE port on WinNT easier.
* platform/graphics/opentype/OpenTypeUtilities.cpp:
(WebCore::renameFont):
(WebCore::renameAndActivateFont):
* platform/graphics/opentype/OpenTypeUtilities.h:
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/wince/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
2013-11-02 Andreas Kling <akling@apple.com>
CSSFontFaceSrcValue constructors should return PassRef.
<https://webkit.org/b/123692>
Make functions that return non-null CSSFontFaceSrcValues return
PassRef instead of PassRefPtr. Tweak some call sites to be
slightly more efficient.
Reviewed by Anders Carlsson.
2013-11-02 Andreas Kling <akling@apple.com>
CSSStyleSheet::contents() should return a reference.
<https://webkit.org/b/123689>
Make CSSStyleSheet::contents() return a StyleSheetContents& instead
of a pointer. The object was already stored in a Ref.
Reviewed by Anders Carlsson.
2013-11-02 Andreas Kling <akling@apple.com>
CSSReflectValue constructor should return PassRef.
<https://webkit.org/b/123963>
Make CSSReflectValue::create() return a PassRef. Tweak one call
site to be slightly more efficient.
Reviewed by Anders Carlsson.
2013-11-02 Andreas Kling <akling@apple.com>
CSSFontFeatureValue constructor should return PassRef.
<https://webkit.org/b/123691>
Make CSSFontFeatureValue::create() return PassRef, since it never
returns null. Tweak one call site to be slightly more efficient.
Reviewed by Anders Carlsson.
2013-11-02 Andreas Kling <akling@apple.com>
Tighten typing in SVGResources::buildCachedResources().
<https://webkit.org/b/123690>
Make this function take a RenderElement&/SVGRenderStyle& pair instead
of a RenderObject*/SVGRenderStyle* pair. Also tweaked the code a bit,
removing ampersands and asserts as appropriate.
Reviewed by Anders Carlsson.
2013-11-02 Andreas Kling <akling@apple.com>
CSSImageValue constructors should return PassRef.
<https://webkit.org/b/123688>
Make the CSSImageValue::create() helpers return PassRef.
Tightened call sites to avoid null checks and destructor calls.
Reviewed by Anders Carlsson.
2013-11-02 Patrick Gansterer <paroga@webkit.org>
Fix compilation of SynchronousLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=123676
Reviewed by Darin Adler.
Assign a ResourceRequest varibale an empty ResourceRequest instead of 0.
The current solution only works for ports which can create a
ResourceRequest from a pointer, which might not be true for all ports.
* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::willSendRequest):
2013-11-02 Patrick Gansterer <paroga@webkit.org>
Port LoggingWin.cpp to WinCE
https://bugs.webkit.org/show_bug.cgi?id=123678
Reviewed by Darin Adler.
This makes it easier to use a common list of files
for the different Windows ports later.
* PlatformWin.cmake:
* platform/win/LoggingWin.cpp:
(WebCore::logLevelString):
2013-11-02 Patrick Gansterer <paroga@webkit.org>
Fix UnicodeWchar after r157330.
https://bugs.webkit.org/show_bug.cgi?id=123668
Reviewed by Darin Adler.
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append):
* platform/graphics/wince/FontWinCE.cpp:
(WebCore::generateComponents):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawText):
* platform/text/wchar/TextBreakIteratorWchar.cpp:
(WebCore::isCharStop):
(WebCore::isLineStop):
(WebCore::isSentenceStop):
(WebCore::WordBreakIterator::next):
(WebCore::WordBreakIterator::previous):
2013-11-02 Andreas Kling <akling@apple.com>
Use RenderChildIterator in a couple of places.
<https://webkit.org/b/123684>
Added isRendererOfType() for RenderBox and RenderBlock and switch
some loops over to using childrenOfType<>. Also sprinkled const
and references on touched code.
Reviewed by Antti Koivisto.
2013-11-02 Zan Dobersek <zdobersek@igalia.com>
Manage FileReaderLoader through std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=123666
Reviewed by Anders Carlsson.
Construct FileReaderLoader objects through std::make_unique and store them in std::unique_ptr.
* fileapi/FileReader.cpp:
(WebCore::FileReader::readInternal):
* fileapi/FileReader.h:
2013-11-02 Andreas Kling <akling@apple.com>
Add a child renderer iterator.
<https://webkit.org/b/123662>
Introduce an ElementIterator-style iterator for renderers and put
it to use in a childrenOfType() implementation.
It's used just like the Element iterators:
auto sections = childrenOfType<RenderTableSection>(*this);
for (auto section = sections.begin(), section = sections.end(); section != sections.end(); ++section)
section->thisOrThat();
Just like the DOM counterpart, it relies on a templatized helper:
bool isRendererOfType<T>(const RenderObject&)
This patch puts the iterator to use in a couple of random places.
Reviewed by Antti Koivisto.
2013-11-02 Alexey Proskuryakov <ap@apple.com>
Implement remaining SHA variations for WebCrypto
https://bugs.webkit.org/show_bug.cgi?id=123659
Reviewed by Anders Carlsson.
Tests: crypto/subtle/sha-224.html
crypto/subtle/sha-256.html
crypto/subtle/sha-384.html
crypto/subtle/sha-512.html
* WebCore.xcodeproj/project.pbxproj:
* crypto/algorithms/CryptoAlgorithmSHA224.cpp: Added.
(WebCore::CryptoAlgorithmSHA224::CryptoAlgorithmSHA224):
(WebCore::CryptoAlgorithmSHA224::~CryptoAlgorithmSHA224):
(WebCore::CryptoAlgorithmSHA224::create):
(WebCore::CryptoAlgorithmSHA224::identifier):
* crypto/algorithms/CryptoAlgorithmSHA224.h: Added.
* crypto/algorithms/CryptoAlgorithmSHA256.cpp: Added.
(WebCore::CryptoAlgorithmSHA256::CryptoAlgorithmSHA256):
(WebCore::CryptoAlgorithmSHA256::~CryptoAlgorithmSHA256):
(WebCore::CryptoAlgorithmSHA256::create):
(WebCore::CryptoAlgorithmSHA256::identifier):
* crypto/algorithms/CryptoAlgorithmSHA256.h: Added.
* crypto/algorithms/CryptoAlgorithmSHA384.cpp: Added.
(WebCore::CryptoAlgorithmSHA384::CryptoAlgorithmSHA384):
(WebCore::CryptoAlgorithmSHA384::~CryptoAlgorithmSHA384):
(WebCore::CryptoAlgorithmSHA384::create):
(WebCore::CryptoAlgorithmSHA384::identifier):
* crypto/algorithms/CryptoAlgorithmSHA384.h: Added.
* crypto/algorithms/CryptoAlgorithmSHA512.cpp: Added.
(WebCore::CryptoAlgorithmSHA512::CryptoAlgorithmSHA512):
(WebCore::CryptoAlgorithmSHA512::~CryptoAlgorithmSHA512):
(WebCore::CryptoAlgorithmSHA512::create):
(WebCore::CryptoAlgorithmSHA512::identifier):
* crypto/algorithms/CryptoAlgorithmSHA512.h: Added.
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
* crypto/mac/CryptoAlgorithmSHA224Mac.cpp: Added.
(WebCore::CryptoAlgorithmSHA224::digest):
* crypto/mac/CryptoAlgorithmSHA256Mac.cpp: Added.
(WebCore::CryptoAlgorithmSHA256::digest):
* crypto/mac/CryptoAlgorithmSHA384Mac.cpp: Added.
(WebCore::CryptoAlgorithmSHA384::digest):
* crypto/mac/CryptoAlgorithmSHA512Mac.cpp: Added.
(WebCore::CryptoAlgorithmSHA512::digest):
2013-11-02 Patrick Gansterer <paroga@webkit.org>
Various small WinCE build fixes
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append):
* platform/graphics/BitmapImage.h:
* platform/graphics/wince/ImageWinCE.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/wince/PlatformPathWinCE.h:
* platform/win/PopupMenuWin.h:
* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::adjustMenuListButtonStyle):
2013-11-01 Alexey Proskuryakov <ap@apple.com>
Add WebCrypto AES-CBC
https://bugs.webkit.org/show_bug.cgi?id=123647
Reviewed by Anders Carlsson.
Tests: crypto/subtle/aes-cbc-192-encrypt-decrypt.html
crypto/subtle/aes-cbc-256-encrypt-decrypt.html
crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html
crypto/subtle/aes-cbc-encrypt-decrypt.html
crypto/subtle/aes-cbc-invalid-length.html
crypto/subtle/aes-cbc-wrong-key-class.html
* WebCore.xcodeproj/project.pbxproj: Added new files.
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::getProperty): Factored out a function to get a property as JSValue.
(WebCore::getHashAlgorithm): Use it.
(WebCore::createAesCbcParams): Added converter for AesCbcParams.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Support AES_CBC.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Support all
algorithms, all the new ones just have trivial dictionaries.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Ditto.
* bindings/js/JSCryptoOperationData.cpp: Added.
(WebCore::sequenceOfCryptoOperationDataFromJSValue):
(WebCore::cryptoOperationDataFromJSValue):
* bindings/js/JSCryptoOperationData.h: Added.
Moved CryptoOperationData bindings out of JSSubtleCryptoCustom.cpp, so that we
could use them in JSCryptoAlgorithmDictionary.cpp.
* bindings/js/JSDOMPromise.h: (WebCore::PromiseWrapper::reject): Added a specialization
to reject with null result. The spec doesn't actually say how algorithms fail.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::encrypt): Added.
(WebCore::JSSubtleCrypto::decrypt): Ditto.
(WebCore::JSSubtleCrypto::sign): Style fix.
* crypto/CryptoAlgorithmAesCbcParams.h: Added.
* crypto/CryptoKey.h:
(WebCore::CryptoKeyClass):
* crypto/keys/CryptoKeyHMAC.h:
(WebCore::asCryptoKeyHMAC):
Added poor man's RTTI, so that we can safely upcast Keys passed fro JavaScript code.
* crypto/CryptoKeyAES.cpp: Added.
(WebCore::CryptoKeyAES::CryptoKeyAES):
(WebCore::CryptoKeyAES::~CryptoKeyAES):
(WebCore::CryptoKeyAES::buildAlgorithmDescription):
* crypto/CryptoKeyAES.h: Added.
(WebCore::asCryptoKeyAES):
AES keys are the same for all algorithms, but they still need to remember the algorithm.
* crypto/SubtleCrypto.idl: Added encrypt/decrypt.
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: Added.
(WebCore::CryptoAlgorithmAES_CBC::CryptoAlgorithmAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::~CryptoAlgorithmAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::create):
(WebCore::CryptoAlgorithmAES_CBC::identifier):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
(WebCore::CryptoAlgorithmAES_CBC::exportKey):
* crypto/algorithms/CryptoAlgorithmAES_CBC.h: Added.
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Added.
(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
Added.
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
Check key class before casting it to CryptoKeyHMAC.
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register AES-CBC
on Mac, so that it can be used.
2013-11-01 Andreas Kling <akling@apple.com>
SVGRenderStyle accessors should return references.
<https://webkit.org/b/123656>
RenderStyle::svgStyle() and accessSVGStyle() never return null,
so make them return references instead.
This flushed out a myriad of pointless null checks and assertions.
Reviewed by Anders Carlsson.
2013-11-01 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Removing MediaStreamTrackVector and MediaStreamSourceVector typedefs
https://bugs.webkit.org/show_bug.cgi?id=123648
Reviewed by Eric Carlson.
No new tests needed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create):
(WebCore::MediaStream::clone):
(WebCore::MediaStream::cloneMediaStreamTrackVector):
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::haveTrackWithSource):
(WebCore::MediaStream::getTrackById):
(WebCore::MediaStream::trackVectorForType):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::callSuccessHandler):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::create):
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
* platform/mediastream/MediaStreamDescriptor.h:
* platform/mediastream/MediaStreamSource.h:
2013-11-01 Andreas Kling <akling@apple.com>
createFontFaceValue() should be smarter about overgrown cache.
<https://webkit.org/b/123643>
Instead of clearing the whole font-face value cache when it passes
128 entries, just delete one entry at random.
Reviewed by Geoffrey Garen.
2013-11-01 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Fixing mac code to use new MediaStreamDescriptor create method
https://bugs.webkit.org/show_bug.cgi?id=123653
Reviewed by Eric Carlson.
No new tests needed.
* platform/mediastream/mac/MediaStreamCenterMac.cpp:
(WebCore::MediaStreamCenterMac::createMediaStream):
2013-11-01 Andreas Kling <akling@apple.com>
Re-use existing RenderStyle local in textWidth().
<https://webkit.org/b/123392>
We already have the RenderStyle cached in a local here, so avoid
getting it from RenderText since that has to go via the parent.
Reviewed by Antti Koivisto.
2013-11-01 Andreas Kling <akling@apple.com>
Neuter WTF_MAKE_FAST_ALLOCATED in GLOBAL_FASTMALLOC_NEW builds.
<https://webkit.org/b/123639>
WebCore::TimerBase really needed to have the new/delete operators
overridden, in order for WebCore::SuspendableTimer to be able to
choose that "operator new" out of the two it inherits.
Reviewed by Anders Carlsson.
2013-11-01 Andreas Kling <akling@apple.com>
CSSCanvasValue construction helper should return PassRef.
<https://webkit.org/b/123650>
Return PassRef instead of PassRefPtr from functions that return
ownership-passing pointers that are known to be non-null.
Reviewed by Anders Carlsson.
2013-11-01 Joseph Pecoraro <pecoraro@apple.com>
Move CF/Mac WTF String implementations down into WTF
https://bugs.webkit.org/show_bug.cgi?id=123635
Reviewed by Sam Weinig.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2013-11-01 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Removing unnecessary early returns in addTrack, removeTrack and removeRemoteSource methods
https://bugs.webkit.org/show_bug.cgi?id=123644
Reviewed by Eric Carlson.
No new tests needed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::removeRemoteSource):
(WebCore::MediaStream::trackVectorForType):
* Modules/mediastream/MediaStream.h:
2013-11-01 Andreas Kling <akling@apple.com>
CSSAspectRatioValue construction helper should return PassRef.
<https://webkit.org/b/123645>
Return PassRef instead of PassRefPtr from functions that return
ownership-passing pointers that are known to be non-null.
Reviewed by Darin Adler.
2013-11-01 Myles C. Maxfield <mmaxfield@apple.com>
Initial implementation of text-decoration-skip ink
https://bugs.webkit.org/show_bug.cgi?id=121806
Reviewed by Darin Adler.
text-decoration-skip: ink is implemented by the following steps:
1. Before drawing any decorations, figure out the bounding box for the decorations that will be drawn
2. Create an ImageBuffer with these dimensions
3. Draw text into this ImageBuffer with a thicker stroke
4. Apply the ImageBuffer as a mask to the context
5. Draw decorations like normal
6. Clean up
Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink.html
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::computeLineBoundsAndAntialiasingModeForText): Don't call GraphicsContext::roundToDevicePixels
when painting is disabled
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Pass the TextPainter to paintDecoration
(WebCore::computeUnderlineOffset): Small cleanup
(WebCore::getWavyStrokeControlPointDistance): Pulling out of strokeWavyTextDecoration()
(WebCore::getWavyStrokeStep): Ditto
(WebCore::strokeWavyTextDecoration): Use the previous 2 functions
(WebCore::getSingleDecorationBoundingBox): Pulling out repeated code into a function
(WebCore::getDecorationBoundingBox): Compute the bounding box for an underline which
hasn't been drawn yet
(WebCore::InlineTextBox::paintDecoration): Construct a mask and apply it to the GraphicsContext
* rendering/InlineTextBox.h: paintDecoration needs the TextPainter
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Redraw the underline when
text-decoration-skip changes
2013-11-01 Andreas Kling <akling@apple.com>
CSS 'initial' and 'inherit' value constructors should return PassRef.
<https://webkit.org/b/123641>
Make the helpers involved in constructing CSS{Initial,Inherited}Value
all return PassRef instead of PassRefPtr. This avoids generating
pointless null checks at the call sites.
Reviewed by Darin Adler.
2013-11-01 Andreas Kling <akling@apple.com>
Kill RenderArena.
<https://webkit.org/b/123634>
There are no remaining users of the RenderArena allocator.
Reviewed by Geoffrey Garen.
2013-11-01 James Craig <jcraig@apple.com>
AX: Regression: media controls are no longer accessible
https://bugs.webkit.org/show_bug.cgi?id=121990
Reviewed by Jer Noble.
Updated existing test coverage.
Added ARIA roles, attrs, and labels to the new media controls shadow DOM.
Localization will be handled in http://webkit.org/b/120956
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.UIString):
(Controller.prototype.createControls):
(Controller.prototype.handleLoadStart):
(Controller.prototype.handleError):
(Controller.prototype.handleAbort):
(Controller.prototype.handleSuspend):
(Controller.prototype.handleStalled):
(Controller.prototype.handleWaiting):
(Controller.prototype.handleFullscreenChange):
(Controller.prototype.handleMuteButtonClicked):
(Controller.prototype.handleMinButtonClicked):
(Controller.prototype.handleMaxButtonClicked):
(Controller.prototype.handleVolumeSliderChange):
(Controller.prototype.updatePlaying):
2013-11-01 Andreas Kling <akling@apple.com>
Take BidiRuns out of the arena.
<https://webkit.org/b/123630>
Stop arena-allocating BidiRun objects and use regular new/delete.
With this, there are no remaining clients of RenderArena.
It will be removed in a subsequent patch.
Reviewed by Anders Carlsson.
2013-11-01 Afonso R. Costa Jr. <afonso.costa@samsung.com>
Expose setApplicationCacheOriginQuota via window.internals
https://bugs.webkit.org/show_bug.cgi?id=87838
Reviewed by Joseph Pecoraro.
Also reset the default origin quota in resetToConsistentState().
* testing/Internals.cpp: Add setApplicationCacheOriginQuota.
(WebCore::Internals::resetToConsistentState): Reset the default origin
quota.
(WebCore::Internals::setApplicationCacheOriginQuota): Added.
* testing/Internals.h: Add setApplicationCacheOriginQuota.
* testing/Internals.idl: Ditto.
2013-11-01 Nick Diego Yamane <nick.yamane@openbossa.org>
Explicitly initialize RefCounted base class in MediaStreamTrack's constructors
https://bugs.webkit.org/show_bug.cgi?id=123620
Reviewed by Andreas Kling.
No new tests needed.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
2013-11-01 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Adding addRemoteTrack and removeRemoteTrack functions to MediaStreamDescriptor and MediaStream
https://bugs.webkit.org/show_bug.cgi?id=123477
Reviewed by Eric Carlson.
When the backend report that a remote track has been added or removed by a remote peer, we must be able to add
it to its MediaStream
No new tests needed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack): Splitted in two parts that can be used by old addTrack and new addRemoteTrack.
(WebCore::MediaStream::removeTrack): Splitted in two parts that can be used by old removeTrack and new
removeRemoteTrack.
(WebCore::MediaStream::addRemoteSource): Reusing code in new addTrack method.
(WebCore::MediaStream::removeRemoteSource): Refactored.
(WebCore::MediaStream::addRemoteTrack): Added.
(WebCore::MediaStream::removeRemoteTrack): Added.
(WebCore::MediaStream::getTrackVectorForType): Helper method that returns a vector of tracks according to
track's type (Audio or Video).
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::addRemoteTrack): Added.
(WebCore::MediaStreamDescriptor::removeRemoteTrack): Added.
* platform/mediastream/MediaStreamDescriptor.h:
2013-11-01 Brendan Long <b.long@cablelabs.com>
[GStreamer] Support audio and video tracks
https://bugs.webkit.org/show_bug.cgi?id=117039
Reviewed by Philippe Normand.
Tests: media/track/audio/audio-track-mkv-vorbis-addtrack.html
media/track/audio/audio-track-mkv-vorbis-enabled.html
media/track/audio/audio-track-mkv-vorbis-language.html
media/track/in-band/track-in-band-kate-ogg-addtrack.html
media/track/in-band/track-in-band-srt-mkv-addtrack.html
media/track/video/video-track-mkv-theora-addtrack.html
media/track/video/video-track-mkv-theora-language.html
media/track/video/video-track-mkv-theora-selected.html
* GNUmakefile.list.am: Add audio and video track files.
* PlatformEfl.cmake: Same.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::audioTrackEnabledChanged): Schedule "change" event.
(WebCore::HTMLMediaElement::videoTrackSelectedChanged): Same.
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::setEnabled): Call m_private->setEnabled
(WebCore::AudioTrack::enabledChanged): Added callback.
(WebCore::AudioTrack::labelChanged): Same.
(WebCore::AudioTrack::languageChanged): Same.
(WebCore::AudioTrack::willRemoveAudioTrackPrivate): Use ASSERT_UNUSED for consistence.
* html/track/AudioTrack.h: Add new enabled, label and language callbacks.
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::setSelected): Call m_private->setEnabled
(WebCore::VideoTrack::selectedChanged): Added callback.
(WebCore::VideoTrack::labelChanged): Same.
(WebCore::VideoTrack::languageChanged): Same.
(WebCore::VideoTrack::willRemoveVideoTrackPrivate): Use ASSERT_UNUSED for consistence.
* html/track/VideoTrack.h: Add new selected, label and language callbacks.
* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::setEnabled): Call m_client->enabledChanged
* platform/graphics/VideoTrackPrivate.h:
(WebCore::VideoTrackPrivate::setSelected): Call m_client->selectedChanged
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Add ASSERT(m_pad)
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Look at all tag events instead of just the first one.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateVideoSinkCapsChangedCallback): Separated callback when caps change from callback when number of videos change.
(WebCore::mediaPlayerPrivateVideoCapsChangeTimeoutCallback): Same.
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_videoCapsTimerHandler.
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect audio and video tracks and remove callbacks.
(WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged): Separated callback when caps change from callback when number of videos change.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Create video tracks for each stream.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps): Separated callback when caps change from callback when number of videos change.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Create audio tracks for each stream.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add audio and video tracks, and a pointer to keep track of the default audio stream.
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: Added.
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Added.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr<GstTagList>
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: Added, handles tags and "active" property of audio and video tracks.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Added.
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Added.
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Added.
2013-11-01 Patrick Gansterer <paroga@webkit.org>
Buildfix for !ENABLE(INSPECTOR) after 157288.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willDispatchEvent):
2013-11-01 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Avoid explicit traversal of text controls and the render tree in AtkText implementation
https://bugs.webkit.org/show_bug.cgi?id=123153
Reviewed by Chris Fleizach.
Remove functions from the AtkText implementation that manually
walk the render tree to compose the text for a exposed objects in
certain cases (e.g. anonymous blocks, text controls).
The reason for this change is that the current implementation
follows an error-prone approach, since by doing things like
manually walking the render tree from here we are not properly
considering all the possible scenarios that might happen when
traversing text. This, however, is a task that is better suited
for the TextIterator, which is already written to consider all
those cases and to emit the proper character in every single
situation: text nodes, replaced objects and so on.
So, by removing all that too specific code (textForObject() and
textForRenderer() mainly) from WebKitAccessibleInterfaceText.cpp
and relying in AccessibilityObject::textUnderElement(), which it
ends up using the TextIterator for certain cases, we have a much
better and robust method of retrieving the text associated with an
instance of AtkObject implementing the AtkText interface.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText): Removed call to textForObject(), now that
we have just removed that function, together with textForRenderer().
Make AccessibilityRenderObject::textUnderElement() able to deal with
anonymous blocks directly, by creating a range based in the boundaries
defined by the first and last child renderers for that block. This will
make possible to treat an anonymous block as a whole instead of having
to rely in the concatenation of each of its children, as it does now.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Added a new code
path to deal with anonymous blocks for text renderers, or when including
all the children is explicitly requested.
Modified TextIterator so text for children of replaced objects are
ignored if we are emmiting the special character for those objects.
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement): Make sure no children are
handled a replaced object if m_emitsObjectReplacementCharacters is set.
* editing/TextIterator.h: Updated m_emitsObjectReplacementCharacters
description to reflect the new behavior.
2013-11-01 Alexey Proskuryakov <ap@apple.com>
Add a Mac WebCrypto implementation of HMAC importKey/sign/verify
https://bugs.webkit.org/show_bug.cgi?id=123598
Reviewed by Anders Carlsson.
Test: crypto/subtle/hmac-sign-verify.html
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSSubtleCryptoCustom.cpp: Added property svn:eol-style.
(WebCore::createAlgorithmFromJSValue):
(WebCore::cryptoOperationDataFromJSValue):
(WebCore::cryptoKeyFormatFromJSValue):
(WebCore::cryptoKeyUsagesFromJSValue):
(WebCore::JSSubtleCrypto::sign):
(WebCore::JSSubtleCrypto::verify):
(WebCore::JSSubtleCrypto::digest):
(WebCore::JSSubtleCrypto::importKey):
* crypto/SubtleCrypto.idl:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp: Added.
(WebCore::CryptoAlgorithmHMAC::CryptoAlgorithmHMAC):
(WebCore::CryptoAlgorithmHMAC::~CryptoAlgorithmHMAC):
(WebCore::CryptoAlgorithmHMAC::create):
(WebCore::CryptoAlgorithmHMAC::identifier):
(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):
* crypto/algorithms/CryptoAlgorithmHMAC.h: Added.
* crypto/keys: Added.
* crypto/keys/CryptoKeyHMAC.cpp: Added.
(WebCore::CryptoKeyHMAC::CryptoKeyHMAC):
(WebCore::CryptoKeyHMAC::~CryptoKeyHMAC):
(WebCore::CryptoKeyHMAC::buildAlgorithmDescription):
* crypto/keys/CryptoKeyHMAC.h: Added.
* crypto/mac/CryptoAlgorithmHMACMac.cpp: Added.
(WebCore::getCommonCryptoAlgorithm):
(WebCore::calculateSignature):
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
(WebCore::CryptoAlgorithmHMAC::generateKey):
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
2013-10-31 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Clean up a few Inspector interfaces
https://bugs.webkit.org/show_bug.cgi?id=123594
Reviewed by Timothy Hatcher.
* WebCore.exp.in:
* inspector/InjectedScriptHost.cpp:
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgentInterface::name):
* inspector/InspectorConsoleAgent.cpp:
* inspector/InspectorConsoleAgent.h:
(WebCore::InspectorConsoleAgent::enabled):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::profilerEnabled):
* inspector/InspectorController.h:
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
(WebCore::InspectorDebuggerAgent::enabled):
* inspector/InspectorRuntimeAgent.h:
(WebCore::InspectorRuntimeAgent::enabled):
2013-10-31 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: Vend layer contents via IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=123600
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Export sRGBColorSpaceRef.
* WebCore.xcodeproj/project.pbxproj:
Expose GraphicsContextCG.h.
2013-10-31 Joseph Pecoraro <pecoraro@apple.com>
Remove unused Page::setDebuggerForAllPages
https://bugs.webkit.org/show_bug.cgi?id=123602
Reviewed by Timothy Hatcher.
* page/Page.cpp:
* page/Page.h:
2013-10-31 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove InspectorState
https://bugs.webkit.org/show_bug.cgi?id=123547
Reviewed by Timothy Hatcher.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
* inspector/InspectorAgent.h:
(WebCore::InspectorAgent::create):
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
* inspector/InspectorApplicationCacheAgent.h:
(WebCore::InspectorApplicationCacheAgent::create):
* inspector/InspectorBaseAgent.cpp:
(WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgent::InspectorBaseAgent):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
* inspector/InspectorCSSAgent.h:
(WebCore::InspectorCSSAgent::create):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
* inspector/InspectorCanvasAgent.h:
(WebCore::InspectorCanvasAgent::create):
* inspector/InspectorClient.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
* inspector/InspectorDOMAgent.h:
(WebCore::InspectorDOMAgent::create):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::create):
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
* inspector/InspectorDOMStorageAgent.h:
(WebCore::InspectorDOMStorageAgent::create):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
* inspector/InspectorDatabaseAgent.h:
(WebCore::InspectorDatabaseAgent::create):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::create):
(WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
* inspector/InspectorIndexedDBAgent.h:
(WebCore::InspectorIndexedDBAgent::create):
* inspector/InspectorInputAgent.cpp:
(WebCore::InspectorInputAgent::InspectorInputAgent):
* inspector/InspectorInputAgent.h:
(WebCore::InspectorInputAgent::create):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
* inspector/InspectorLayerTreeAgent.h:
(WebCore::InspectorLayerTreeAgent::create):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
(WebCore::InspectorMemoryAgent::create):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::create):
(WebCore::InspectorPageAgent::InspectorPageAgent):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::PageProfilerAgent::PageProfilerAgent):
(WebCore::InspectorProfilerAgent::create):
(WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
* inspector/InspectorResourceAgent.h:
(WebCore::InspectorResourceAgent::create):
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorState.cpp: Removed.
* inspector/InspectorState.h: Removed.
* inspector/InspectorStateClient.h: Removed.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
(WebCore::InspectorTimelineAgent::create):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::create):
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
* inspector/InspectorWorkerAgent.h:
* inspector/PageConsoleAgent.cpp:
(WebCore::PageConsoleAgent::PageConsoleAgent):
* inspector/PageConsoleAgent.h:
(WebCore::PageConsoleAgent::create):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::create):
(WebCore::PageDebuggerAgent::PageDebuggerAgent):
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::PageRuntimeAgent):
* inspector/PageRuntimeAgent.h:
(WebCore::PageRuntimeAgent::create):
* inspector/WorkerConsoleAgent.cpp:
(WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
* inspector/WorkerConsoleAgent.h:
(WebCore::WorkerConsoleAgent::create):
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::create):
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
* inspector/WorkerInspectorController.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
* inspector/WorkerRuntimeAgent.h:
(WebCore::WorkerRuntimeAgent::create):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postMessageToPageInspector):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
* workers/WorkerMessagingProxy.h:
* workers/WorkerReportingProxy.h:
2013-10-31 Brady Eidson <beidson@apple.com>
Split PendingDeleteCall into its own header
https://bugs.webkit.org/show_bug.cgi?id=123597
Reviewed by Beth “Okay I guess so, bro” Dakin.
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::deleteDatabase):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
* Modules/indexeddb/IDBPendingDeleteCall.h: Added.
(WebCore::IDBPendingDeleteCall::create):
(WebCore::IDBPendingDeleteCall::callbacks):
(WebCore::IDBPendingDeleteCall::IDBPendingDeleteCall):
2013-10-31 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Convert some InspectorObject member variables to HashSet/HashMap
https://bugs.webkit.org/show_bug.cgi?id=123579
Reviewed by Timothy Hatcher.
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
Make m_eventListenerBreakpoints and m_xhrBreakpoints HashSet.
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDebuggerAgent::didParseSource):
Make m_javaScriptBreakpoints a HashMap.
2013-10-31 Youenn Fablet <youennf@gmail.com>
Correct the elapsedTime calculation in SVG animations
https://bugs.webkit.org/show_bug.cgi?id=119289
Reviewed by Brent Fulgham.
Merged from Blink: https://chromium.googlesource.com/chromium/blink/+/338f9badca7fb7880abdb0cecd5f02493c1f7d2e
Test: svg/animations/getCurrentTime-pause-unpause.html
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::SMILTimeContainer):
(WebCore::SMILTimeContainer::elapsed):
(WebCore::SMILTimeContainer::begin):
(WebCore::SMILTimeContainer::pause):
(WebCore::SMILTimeContainer::resume):
(WebCore::SMILTimeContainer::setElapsed):
* svg/animation/SMILTimeContainer.h:
2013-10-31 Andreas Kling <akling@apple.com>
Manage line-grid RootInlineBox with unique_ptr.
<https://webkit.org/b/123583>
Use smart pointers for the RenderBlockFlow's optional line-grid box
instead of manual new/delete.
Reviewed by Antti Koivisto.
2013-10-31 Alexey Proskuryakov <ap@apple.com>
Enable WebCrypto on Mac
https://bugs.webkit.org/show_bug.cgi?id=123587
Reviewed by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig: Enable it.
* bindings/js/JSCryptoAlgorithmDictionary.cpp: Build fix.
* crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
Special case empty keys to avoid upsetting HashMap.
* crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::create):
Build fix. Can't use make_unique, because constructor is private.
2013-10-31 Myles C. Maxfield <mmaxfield@apple.com>
Underline bounds cannot be queried before underline itself is drawn
https://bugs.webkit.org/show_bug.cgi?id=123310
Reviewed by Dean Jackson.
GraphicsContext's drawLineForText function is used to draw underlines,
strikethroughs, and overlines. Before drawing the line, this function
modifies the bounds given to it in order to make underlines crisp. However,
this means that it is impossible to know where an underline will be drawn
before drawing it. This patch pulls out this adjustment computation into
GraphicsContext::computeLineBoundsForText, then passes the result to
drawLineForText
Because there should be no observable difference, no tests need to be updated.
* platform/graphics/GraphicsContext.h: Signature of new computeLineBoundsForText
function
* platform/graphics/blackberry/PathBlackBerry.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText): Implement new function
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText): Ditto
(WebCore::GraphicsContext::drawLineForText): Use computeLineBoundsForText
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::computeLineBoundsAndAntialiasingModeForText): Static function that
performs the actual bounds computation
(WebCore::GraphicsContext::computeLineBoundsForText): Calls
computeLineBoundsAndAntialiasingModeForText
(WebCore::GraphicsContext::drawLineForText): Use new function
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText): Implement new function
2013-10-31 Beth Dakin <bdakin@apple.com>
Repro scrolling crash with scrollbars that use setPresentationValue on the
scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=123549
-and corresponding-
<rdar://problem/15246606>
Reviewed by Brady Eidson.
Here's another speculative fix. If a scrollbar was removed, we would not properly
inform the scrolling thread. Instead of checking supportsUpdateOnSecondaryThread()
before calling setScrollbarPaintersFromScrollbars(), check it from within
setScrollbarPaintersFromScrollbars(), and this will allow the ScrollbarPainter to
be properly updated.
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
(WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars):
2013-10-31 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed typo fix after 158386. (buildfix after r158365)
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::callSuccessHandler):
2013-10-31 Myles C. Maxfield <mmaxfield@apple.com>
Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION)
https://bugs.webkit.org/show_bug.cgi?id=123541
Reviewed by Tim Horton.
Enabled CSS3 text decoration tests
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationStyleFlagsToCSSValue): Mapping internal
representation to a CSSValue
(WebCore::ComputedStyleExtractor::propertyValue): Ditto
* css/CSSParser.cpp: Moving parsing functions behind new flag
(WebCore::isColorPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::addTextDecorationProperty):
(WebCore::CSSParser::parseTextDecorationSkip):
(WebCore::CSSParser::parseTextUnderlinePosition):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
* css/CSSPropertyNames.in: Marking the new properties behind new flag
* css/CSSValueKeywords.in: Marking new values behind new flag
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty): Move text decoration shorthand
(WebCore::matchingShorthandsForLonghand):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty):
(WebCore::StyleResolver::applyProperty):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformStrokeStyle):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLine):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::createPen):
* rendering/InlineFlowBox.cpp:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::textDecorationStyleToStrokeStyle):
(WebCore::computeUnderlineOffset):
(WebCore::InlineTextBox::paintDecoration):
* rendering/RenderObject.cpp:
(WebCore::decorationColor):
* rendering/RootInlineBox.cpp:
* rendering/RootInlineBox.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::colorIncludingFallback):
(WebCore::RenderStyle::visitedDependentColor):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2013-10-31 Alexey Proskuryakov <ap@apple.com>
[WebCrypto] Add SHA-1
https://bugs.webkit.org/show_bug.cgi?id=123582
Reviewed by Anders Carlsson.
Tests: security/crypto-subtle-arguments.html
security/crypto-subtle-sha1.html
* WebCore.xcodeproj/project.pbxproj: Added new files.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::createAlgorithmFromJSValue):
(WebCore::sequenceOfCryptoOperationDataFromJSValue):
(WebCore::JSSubtleCrypto::digest):
* crypto/SubtleCrypto.idl:
Added bindings for crypto.digest.
* crypto/algorithms: Added.
* crypto/algorithms/CryptoAlgorithmSHA1.cpp: Added.
* crypto/algorithms/CryptoAlgorithmSHA1.h: Added.
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register SHA-1.
* crypto/mac/CryptoAlgorithmSHA1Mac.cpp: Added.
(WebCore::CryptoAlgorithmSHA1::digest): Performs the work synchronously, because
otherwise we'd have to copy the data first, which is crazy for something as simple
as hashing. We can change to a dispatch queue later if we find that it's actually
better to copy and do the work asynchronously.
2013-10-31 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
REGRESSION(r158348): Breaks Debug build
https://bugs.webkit.org/show_bug.cgi?id=123562
Reviewed by Brady Eidson.
Remove an unnecessary check that cause compilation failure.
No new tests since this just fixes the build failure.
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
2013-10-31 Csaba Osztrogonác <ossy@webkit.org>
One more speculative buildfix after r158365.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::callSuccessHandler):
2013-10-31 Csaba Osztrogonác <ossy@webkit.org>
One more speculative buildfix after r158365.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::didAddRemoteStream):
2013-10-31 Csaba Osztrogonác <ossy@webkit.org>
Speculative buildfix after r158365.
* Modules/mediastream/VideoStreamTrack.cpp:
(WebCore::VideoStreamTrack::create):
(WebCore::VideoStreamTrack::VideoStreamTrack):
* Modules/mediastream/VideoStreamTrack.h:
2013-10-31 Myles C. Maxfield <mmaxfield@apple.com>
Decorated text sometimes does not draw its decorations
https://bugs.webkit.org/show_bug.cgi?id=123539
Reviewed by Antti Koivisto.
Decorated text should opt-out of the simple line layout, because
SimpleLineLayout::paintFlow doesn't draw decorations
Fixes fast/css3-text/css3-text-decoration/text-decoration-color.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2013-10-31 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove last member variable uses of InspectorState from Agents
https://bugs.webkit.org/show_bug.cgi?id=123540
Reviewed by Timothy Hatcher.
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
DOMDebuggerAgentState::eventListenerBreakpoints -> m_eventListenerBreakpoints.
DOMDebuggerAgentState::xhrBreakpoints -> m_xhrBreakpoints.
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDebuggerAgent::didParseSource):
DebuggerAgentState::javaScriptBreakpoints -> m_javaScriptBreakpoints.
* inspector/InspectorPageAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
(WebCore::InspectorPageAgent::removeScriptToEvaluateOnLoad):
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
PageAgentState::pageAgentScriptsToEvaluateOnLoad -> m_scriptsToEvaluateOnLoad.
This is a lazily created InspectorObject member variable.
* inspector/InspectorResourceAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::disable):
(WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
ResourceAgentState::extraRequestHeaders -> m_extraRequestHeaders.
This is a lazily created InspectorObject member variable.
2013-10-31 Philippe Normand <pnormand@igalia.com>
Unreviewed, one more build fix after r158365.
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
2013-10-31 Beth Dakin <bdakin@apple.com>
Repro scrolling crash with scrollbars that use setPresentationValue on the
scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=123549
-and corresponding-
<rdar://problem/15246606>
Reviewed by Darin Adler.
Speculative fix. I think if we retain the ScrollbarPainters, we should avoid this
crash.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2013-10-31 Philippe Normand <pnormand@igalia.com>
Unreviewed, MediaStream build fix after r158365.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::clone):
2013-10-31 Sam Weinig <sam@webkit.org>
Pass an Element by reference to the PseudoElement constructor
https://bugs.webkit.org/show_bug.cgi?id=123576
Reviewed by Andreas Kling.
* dom/Element.cpp:
(WebCore::Element::createPseudoElementIfNeeded):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):
* dom/PseudoElement.h:
2013-10-31 Alexey Proskuryakov <ap@apple.com>
Fix a mis-merge.
* WebCore.xcodeproj/project.pbxproj: Remove duplicate CryptoAlgorithmRegistryMac.cpp.
2013-10-31 Alexey Proskuryakov <ap@apple.com>
Add bindings code for crypto algorithm dictionaries
https://bugs.webkit.org/show_bug.cgi?id=123476
Reviewed by Sam Weinig.
JSCryptoAlgorithmDictionary reads the Algorithm, much like JSDictionary does in
simpler cases. We should see about bringing them closer together (perhaps replacing
with autogenerated code).
* crypto/parameters: Added.
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added.
* crypto/parameters/CryptoAlgorithmHmacParams.h: Added.
Added a couple specific dictionaries as an example.
* WebCore.xcodeproj/project.pbxproj: Added JSCryptoAlgorithmDictionary.
* bindings/js/JSCryptoAlgorithmDictionary.cpp: Added.
(WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
(WebCore::getHashAlgorithm):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
* bindings/js/JSCryptoAlgorithmDictionary.h: Added.
2013-10-31 Sam Weinig <sam@webkit.org>
Pass ScriptExecutionContext by reference to from the bindings constructors
https://bugs.webkit.org/show_bug.cgi?id=123575
Reviewed by Andreas Kling.
Since we null check the ScriptExecutionContext before creating the c++ class,
we should be passing by reference.
2013-10-31 Zhuang Zhigang <zhuangzg@cn.fujitsu.com>
Paint the input tag of range type on WinCE port.
https://bugs.webkit.org/show_bug.cgi?id=123199
Reviewed by Brent Fulgham.
* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::paintSliderTrack):
(WebCore::RenderThemeWinCE::paintSliderThumb):
2013-10-31 Alexey Proskuryakov <ap@apple.com>
Add a crypto algorithm abstraction
https://bugs.webkit.org/show_bug.cgi?id=123474
Reviewed by Sam Weinig.
This works slightly differently than WebCrypto implies. We have separate classes
for algorithm and its parameters, while WebCrypto puts them in the same dictionary.
* WebCore.xcodeproj/project.pbxproj: Added new files.
* crypto/CryptoAlgorithm.cpp: Added. As most algorithms don't implement most
operations, default implementations just raise an exception.
* crypto/CryptoAlgorithm.h: Added.
* crypto/CryptoAlgorithmParameters.h: Added. Base class for numerous future parameter
dictionaries, such as HmacParams or HmacKeyParams.
* crypto/CryptoAlgorithmRegistry.cpp: Added.
* crypto/CryptoAlgorithmRegistry.h: Added.
The registry decouples universal bindings code from algorithms that may or may not
be implemented on each platform.
* crypto/mac: Added.
* crypto/mac/CryptoAlgorithmRegistryMac.cpp: Added.
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Algorithms implemented
on Mac will be registered by this function.
2013-10-31 Alexey Proskuryakov <ap@apple.com>
REGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and xmlhttprequest-overridemimetype-content-type-header.html are failing
https://bugs.webkit.org/show_bug.cgi?id=123548
Reviewed by Brady Eidson.
We had code that made sure that cached 200 responses weren't used for conditional
requests. But it didn't work the other way - cached 304 responses got reused for
subsequent unconditional requests!
Adding the test uncovered this bug.
* loader/cache/CachedRawResource.cpp: (WebCore::shouldIgnoreHeaderForCacheReuse):
Should never ignore conditional headers. Code in determineRevalidationPolicy
was already undoing this for conditional requests, but we also shouldn't use
WebCore cache if it holds a 304 response to conditional request.
* loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy):
Even though the changed code is only for raw resources, I think that we can never
get a conditional request here any more.
2013-10-30 Alexey Proskuryakov <ap@apple.com>
CryptoAlgorithmDescriptionBuilder should support producing nested algorithms
https://bugs.webkit.org/show_bug.cgi?id=123461
Reviewed by Darin Adler.
To add a nested algorithm, clone a builder with createEmptyClone(), fill it,
and add it using add().
* bindings/js/JSCryptoAlgorithmBuilder.h:
* crypto/CryptoAlgorithmDescriptionBuilder.h:
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
(WebCore::JSCryptoAlgorithmBuilder::createEmptyClone):
(WebCore::JSCryptoAlgorithmBuilder::add): Keep VM in a local variable for marginally
better performance.
2013-10-31 Philippe Normand <pnormand@igalia.com>
[WK2][GTK] enable-media-stream Setting
https://bugs.webkit.org/show_bug.cgi?id=123145
Reviewed by Anders Carlsson.
* page/Settings.in: new mediaStreamEnabled setting.
2013-10-31 Zan Dobersek <zdobersek@igalia.com>
Manage SVGPathByteStream through std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=123467
Reviewed by Anders Carlsson.
Manage SVGPathByteStream objects through std::unique_ptr. Constructors for the class are made public
so std::make_unique can be used with the class.
* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::constructFromString):
(WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
(WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::createPath):
* svg/SVGAnimatedType.h:
* svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::SVGPathByteStream): Takes a const Data object that's then copied.
(WebCore::SVGPathByteStream::copy): Made const.
* svg/SVGPathByteStreamBuilder.cpp: Remove an unnecessary include.
* svg/SVGPathByteStreamBuilder.h: Ditto.
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
* svg/SVGPathElement.h:
* svg/SVGPathUtilities.cpp:
(WebCore::appendSVGPathByteStreamFromSVGPathSeg):
(WebCore::addToSVGPathByteStream):
2013-10-31 Marcin Bychawski <m.bychawski@samsung.com>
Removing m_maxDeadCapacity condition in fast path in MemoryCache::prune().
https://bugs.webkit.org/show_bug.cgi?id=115631
Reviewed by Brent Fulgham.
If the m_maxDeadSize and m_deadSize are both 0, the method unnecessairly tries to prune resources.
No new tests, covered by existing ones.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::prune):
2013-10-31 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove stale optional native memory instrumentation protocol params
https://bugs.webkit.org/show_bug.cgi?id=123552
Reviewed by Timothy Hatcher.
* inspector/Inspector.json:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
* inspector/InspectorTimelineAgent.h:
2013-10-31 Zan Dobersek <zdobersek@igalia.com>
[GTK] Undefined references to RenderObject::style() when disabling video support
https://bugs.webkit.org/show_bug.cgi?id=123492
Reviewed by Carlos Garcia Campos.
* platform/gtk/RenderThemeGtk2.cpp: Disabling video support removes indirect inclusion of the RenderElement.h
header, causing undefined references to RenderObject::style(). The RenderElement.h header should be included
instead of RenderObject.h as the former defines the RenderObject::style() inline and also includes the latter.
* platform/gtk/RenderThemeGtk3.cpp: Ditto.
2013-10-31 Robert Plociennik <r.plociennik@samsung.com>
[EFL] accessibility/textbox-role-reports-selection.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112017
Reviewed by Mario Sanchez Prada.
getSelectionOffsetsForObject() now returns proper start/end offsets for
selections "touching" the object's front border.
No new tests, covered by existing ones.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getSelectionOffsetsForObject):
2013-10-31 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][GLES] OpenGL should be optional
https://bugs.webkit.org/show_bug.cgi?id=123399
Reviewed by Noam Rosenthal.
* CMakeLists.txt: Make OpenGL dependencies as optional.
* PlatformEfl.cmake:
Move OpenGL macro to OptionsEfl.cmake and make Xcomposite and XRender as optional.
* platform/graphics/OpenGLESShims.h:
Removed GL_COLOR_ATTACHMENT0_EXT because it was added to gl2ext.h since r153064
* platform/graphics/surfaces/GraphicsSurfaceToken.h:
Removed wrong GLX guard.
(WebCore::GraphicsSurfaceToken::GraphicsSurfaceToken):
(WebCore::GraphicsSurfaceToken::operator!=):
(WebCore::GraphicsSurfaceToken::isValid):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
Removed unnecessary OpenGLShims.h
2013-10-30 Santosh Mahto <santosh.ma@samsung.com>
[webcore/editing] remove extra header includes from cpp files.
https://bugs.webkit.org/show_bug.cgi?id=123524
Reviewed by Ryosuke Niwa.
Removing redundant header files.
* editing/AlternativeTextController.cpp:
* editing/ApplyBlockElementCommand.cpp:
* editing/ApplyStyleCommand.cpp:
* editing/BreakBlockquoteCommand.cpp:
* editing/DeleteButton.cpp:
* editing/DeleteButtonController.cpp:
* editing/DeleteSelectionCommand.cpp:
* editing/DictationCommand.cpp:
* editing/EditCommand.cpp:
* editing/EditingStyle.cpp:
* editing/EditorCommand.cpp:
* editing/FrameSelection.cpp:
* editing/IndentOutdentCommand.cpp:
* editing/InsertLineBreakCommand.cpp:
* editing/InsertParagraphSeparatorCommand.cpp:
* editing/MarkupAccumulator.h:
* editing/RemoveFormatCommand.cpp:
* editing/RenderedPosition.cpp:
* editing/ReplaceSelectionCommand.cpp:
* editing/SpellChecker.cpp:
* editing/SpellingCorrectionCommand.cpp:
* editing/SurroundingText.cpp:
* editing/TextCheckingHelper.cpp:
* editing/TextIterator.cpp:
* editing/TypingCommand.cpp:
* editing/VisibleSelection.cpp:
* editing/VisibleUnits.cpp:
* editing/WrapContentsInDummySpanCommand.cpp:
* editing/htmlediting.cpp:
2013-10-30 Brady Eidson <beidson@apple.com>
IDB Database versions are uint64_t, not int64_t
https://bugs.webkit.org/show_bug.cgi?id=123556
Reviewed by Alexey Proskuryakov.
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::openConnection):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBPendingOpenCall.h:
(WebCore::IDBPendingOpenCall::create):
(WebCore::IDBPendingOpenCall::version):
(WebCore::IDBPendingOpenCall::IDBPendingOpenCall):
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::open):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2013-10-30 Brendan Long <b.long@cablelabs.com>
[Gtk] Build is failing after r158317
https://bugs.webkit.org/show_bug.cgi?id=123544
Reviewed by Alexey Proskuryakov.
No new tests since this just fixes the build.
* GNUmakefile.list.am: Add JSCryptoKey.cpp and JSCryptoKey.h
2013-10-30 Andreas Kling <akling@apple.com>
Manage EllipsisBox objects with unique_ptr.
<https://webkit.org/b/123554>
Use smart pointers to store ellipsis boxes instead of new/delete.
Reviewed by Anders Carlsson.
2013-10-30 Alexey Proskuryakov <ap@apple.com>
[Gtk] Build is failing after r158317
https://bugs.webkit.org/show_bug.cgi?id=123544
Use a correct style for JSC includes.
* ForwardingHeaders/runtime/JSPromise.h: Added.
* ForwardingHeaders/runtime/JSPromiseResolver.h: Added.
* bindings/js/JSDOMPromise.h:
2013-10-30 Andreas Kling <akling@apple.com>
Replace InlineBox::destroy() with regular virtual destruction.
<https://webkit.org/b/123550>
Move logic out of destroy() and its overloads into good ol' virtual
destructors instead.
Reviewed by Anders Carlsson.
2013-10-30 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Simplifying MediaStream and MediStreamDescriptor creation
https://bugs.webkit.org/show_bug.cgi?id=123443
Reviewed by Eric Carlson.
The internal process of creating a MediaStream and MediaStreamDescriptor was quite confusing and spread.
We can take advantage of the platform implementation of MediaStreamTrack (aka MediaStreamTrackPrivate)
and simplify the whole process.
A new constructor that receives vectors of MediaStreamTrackPrivate objects were added, then the check
if a source already exists or if the tracks are all ended are now made in MediaStreamDescriptor.
No new tests needed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create): Removed unnecessary variables in one create method and using new
MediaStreamDescriptor::create method that receives vector of MediaStreamTrackPrivate objects as parameter.
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): Removed passing flag to
MediaStreamDescriptor create.
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::create): Removed EndedAtCreationFlag parameter, because this is being
handled inside constructor by analyzing the tracks or sources passed.
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Adding new constructor that receives vector of
MediaStreamTrackPrivate as parameter.
(WebCore::MediaStreamDescriptor::addTrack): Changed to store the track's source in the object.
(WebCore::MediaStreamDescriptor::removeTrack):
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::numberOfAudioTracks):
(WebCore::MediaStreamDescriptor::audioTracks):
(WebCore::MediaStreamDescriptor::numberOfVideoTracks):
(WebCore::MediaStreamDescriptor::videoTracks):
* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::MockMediaStreamCenter::createMediaStream): Removing flag that is being passed to
MediaStreamDescriptor's create method.
2013-10-30 Brent Fulgham <bfulgham@apple.com>
[Win] Legible Output callbacks should happen on notification queue
https://bugs.webkit.org/show_bug.cgi?id=123545
Reviewed by Eric Carlson.
Modify the callback creation for Legible Output items so that they
are made on our notification queue. The use of the main queue was a
holdover from some temporary code used during earlier development.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::AVFWrapper): Assert this happens on the main thread.
(WebCore::AVFWrapper::~AVFWrapper): Ditto.
(WebCore::destroyAVFWrapper): Ditto.
(WebCore::AVFWrapper::createPlayer): Ditto.
(WebCore::AVFWrapper::createPlayerItem): Ditto.
Also, instruct LegibleOutput callbacks to happen on our notification
queue, rather than the main thread.
(WebCore::AVFWrapper::createAVCFVideoLayer): Assert this happens on the main thread.
(WebCore::AVFWrapper::destroyVideoLayer): Ditto.
(WebCore::AVFWrapper::createImageGenerator): Ditto.
(WebCore::AVFWrapper::destroyImageGenerator): Ditto.
2013-10-30 Alexey Proskuryakov <ap@apple.com>
XHR.response is null when requesting empty file as arraybuffer
https://bugs.webkit.org/show_bug.cgi?id=123457
Reviewed by Sam Weinig.
Test: http/tests/xmlhttprequest/response-empty-arraybuffer.html
* xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseArrayBuffer): Don't do this.
2013-10-30 Samuel White <samuel_white@apple.com>
AX: AXFocused not exposed on ARIA menuitems
https://bugs.webkit.org/show_bug.cgi?id=123494
Reviewed by Chris Fleizach.
ARIA menuitems should expose AXFocused accessibility attribute.
Test: platform/mac/accessibility/aria-menuitem-focus.html
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2013-10-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove basic uses of InspectorState from agents
https://bugs.webkit.org/show_bug.cgi?id=123534
Reviewed by Timothy Hatcher.
* inspector/InspectorAgent.h:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::enable):
(WebCore::InspectorAgent::disable):
(WebCore::InspectorAgent::evaluateForTestInFrontend):
(WebCore::InspectorAgent::inspect):
InspectorAgentState::inspectorAgentEnabled -> m_enabled.
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::enable):
Remove unused state.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::enable):
(WebCore::InspectorCSSAgent::disable):
(WebCore::InspectorCSSAgent::startSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
Remove unused states. Make CSSAgentState::isSelectorProfiling check profile object exists or not.
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::enable):
(WebCore::InspectorCanvasAgent::disable):
Remove unused state, member variable already existed.
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::disable):
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
ConsoleAgentState::consoleMessagesEnabled already had m_enabled.
ConsoleAgentState::monitoringXHR -> m_monitoringXHREnabled.
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
(WebCore::InspectorDOMAgent::clearFrontend):
(WebCore::InspectorDOMAgent::setDocument):
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::mainFrameDOMContentLoaded):
DOMAgentState::documentRequested -> m_documentRequested.
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
DOMDebuggerAgentState::pauseOnAllXHRs -> m_pauseOnAllXHRsEnabled.
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
(WebCore::InspectorDOMStorageAgent::enable):
(WebCore::InspectorDOMStorageAgent::disable):
(WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
DOMStorageAgentState::domStorageAgentEnabled -> m_enabled.
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::enable):
(WebCore::InspectorDatabaseAgent::disable):
Remove unused state, m_enabled already existed.
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::enable):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::enabled):
(WebCore::InspectorDebuggerAgent::clearFrontend):
(WebCore::InspectorDebuggerAgent::setPauseOnExceptionsImpl):
DebuggerAgentState::pauseOnExceptionsState removed, never read.
DebuggerAgentState::debuggerEnabled -> m_enabled.
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
(WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
(WebCore::InspectorHeapProfilerAgent::clearFrontend):
(WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
HeapProfilerAgentState::profileHeadersRequested -> m_profileHeadersRequested.
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::enable):
(WebCore::InspectorIndexedDBAgent::disable):
Remove unused state, never read.
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::enable):
(WebCore::InspectorLayerTreeAgent::disable):
Remove unused state, did not need to be read.
* inspector/InspectorPageAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
(WebCore::InspectorPageAgent::webViewResized):
(WebCore::InspectorPageAgent::enable):
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::setDeviceMetricsOverride):
(WebCore::InspectorPageAgent::deviceMetricsChanged):
(WebCore::InspectorPageAgent::setShowPaintRects):
(WebCore::InspectorPageAgent::setShowDebugBorders):
(WebCore::InspectorPageAgent::setShowFPSCounter):
(WebCore::InspectorPageAgent::setContinuousPaintingEnabled):
(WebCore::InspectorPageAgent::setScriptExecutionDisabled):
(WebCore::InspectorPageAgent::applyScreenWidthOverride):
(WebCore::InspectorPageAgent::applyScreenHeightOverride):
(WebCore::InspectorPageAgent::didPaint):
(WebCore::InspectorPageAgent::didLayout):
(WebCore::InspectorPageAgent::updateTouchEventEmulationInPage):
(WebCore::InspectorPageAgent::setTouchEmulationEnabled):
(WebCore::InspectorPageAgent::setEmulatedMedia):
(WebCore::InspectorPageAgent::applyEmulatedMedia):
PageAgentState::pageAgentScreenWidthOverride -> m_screenWidthOverride.
PageAgentState::pageAgentScreenHeightOverride -> m_screenHeightOverride.
PageAgentState::pageAgentFontScaleFactorOverride -> m_fontScaleFactorOverride.
PageAgentState::pageAgentFitWindow -> m_fitWindowOverride.
PageAgentState::pageAgentShowPaintRects -> m_showPaintRects.
PageAgentState::pageAgentEmulatedMedia -> m_emulatedMedia.
Remove other unused states.
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
(WebCore::InspectorProfilerAgent::addProfile):
(WebCore::InspectorProfilerAgent::enable):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::resetFrontendProfiles):
(WebCore::InspectorProfilerAgent::start):
(WebCore::InspectorProfilerAgent::stop):
(WebCore::InspectorProfilerAgent::enabled):
ProfilerAgentState::profileHeadersRequested -> m_profileHeadersRequested.
Remove other unused states.
* inspector/InspectorResourceAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::~InspectorResourceAgent):
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::applyUserAgentOverride):
(WebCore::InspectorResourceAgent::enable):
(WebCore::InspectorResourceAgent::disable):
(WebCore::InspectorResourceAgent::setUserAgentOverride):
(WebCore::InspectorResourceAgent::setCacheDisabled):
(WebCore::InspectorResourceAgent::mainFrameNavigated):
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
ResourceAgentState::resourceAgentEnabled -> m_enabled.
ResourceAgentState::cacheDisabled -> m_cacheDisabled.
ResourceAgentState::userAgentOverride -> m_userAgentOverride (this already existed and was unused).
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::stop):
(WebCore::InspectorTimelineAgent::setDOMCounters):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
TimelineAgentState::timelineAgentEnabled -> m_enabled.
TimelineAgentState::includeDomCounters -> m_includeDOMCounters.
Remove other unused states.
* inspector/InspectorWorkerAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
(WebCore::InspectorWorkerAgent::clearFrontend):
(WebCore::InspectorWorkerAgent::enable):
(WebCore::InspectorWorkerAgent::disable):
(WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
(WebCore::InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart):
(WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
WorkerAgentState::workerInspectionEnabled -> m_enabled.
WorkerAgentState::autoconnectToWorkers -> m_shouldPauseDedicatedWorkerOnStart.
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::enable):
(WebCore::PageRuntimeAgent::disable):
Remove unused state, not read.
2013-10-30 Ryosuke Niwa <rniwa@webkit.org>
Remove code for Mac Lion
https://bugs.webkit.org/show_bug.cgi?id=123542
Reviewed by Anders Carlsson.
Removed the code for Mac OS X 10.7.
* platform/graphics/ImageBuffer.h:
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::context):
(WebCore::ImageBuffer::flushContext):
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::imageSourceOptions):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::scrollAnimationEnabledForSystem):
* platform/mac/ScrollElasticityController.mm:
(WebCore::reboundDeltaForElasticDelta):
* platform/mac/ThemeMac.mm:
(WebCore::updateStates):
(WebCore::paintCheckbox):
(WebCore::paintRadio):
(WebCore::paintButton):
* platform/mac/WebCoreNSCellExtras.h:
* platform/mac/WebCoreNSCellExtras.m:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::setPopupButtonCellState):
(WebCore::RenderThemeMac::textField):
2013-10-30 Alexey Proskuryakov <ap@apple.com>
85 inspector tests asserting in DrawingAreaProxyImpl::updateAcceleratedCompositingMode()
when there is a stale WebKitTestRunner preference
https://bugs.webkit.org/show_bug.cgi?id=115115
Reviewed by Darin Adler.
* page/Settings.cpp:
(WebCore::Settings::setMockScrollbarsEnabled):
(WebCore::Settings::setUsesOverlayScrollbars):
Added FIXMEs.
2013-10-30 Andreas Kling <akling@apple.com>
Take line boxes out of the arena.
<https://webkit.org/b/123533>
Stop arena-allocating line boxes so we can move forward on improving
render tree memory management. This will also allow more rendering
code to take advantage of malloc optimizations.
This will likely regress performance on some micro-benchmarks, but
it's something we want to do sooner rather than later so we have time
to restabilize it. All improvements to the simple line layout's
coverage will help with recouping whatever is regressed.
BiDi runs are the only remaining user of the arena now.
Reviewed by Antti Koivisto
2013-10-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove InspectorAgent::restore functionality
https://bugs.webkit.org/show_bug.cgi?id=123525
Reviewed by Timothy Hatcher.
Remove unused InspectorAgent restore functionality.
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorBaseAgent.cpp:
* inspector/InspectorBaseAgent.h:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp:
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.cpp:
* inspector/PageRuntimeAgent.h:
* inspector/WorkerInspectorController.cpp:
* inspector/WorkerInspectorController.h:
2013-10-30 Jer Noble <jer.noble@apple.com>
REGRESSION(r158288): media/media-can-play-mpeg4-video.html fails
https://bugs.webkit.org/show_bug.cgi?id=123530
Reviewed by Eric Carlson.
Lower case the mime type before passing it along to MediaPlayer.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::selectNextSourceChild):
2013-10-30 Alexey Proskuryakov <ap@apple.com>
Add a way to fulfill promises from DOM code
https://bugs.webkit.org/show_bug.cgi?id=123466
Reviewed by Sam Weinig.
This is not perfect, as it strongly ties DOM code to JavaScript. In the future, we
can make it better e.g. by subclassing, so that only a base interface would be exposed.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* bindings/js/JSBindingsAllInOne.cpp:
* WebCore.xcodeproj/project.pbxproj:
Added JSDOMPromise.
* bindings/js/JSDOMPromise.cpp: Added.
* bindings/js/JSDOMPromise.h: Added.
(WebCore::PromiseWrapper::create):
(WebCore::PromiseWrapper::fulfill): A random set of specializations that I needed
in WebCrypto code so far.
(WebCore::PromiseWrapper::reject): Ditto.
2013-10-30 Santosh Mahto <santosh.ma@samsung.com>
contentEditable deleting lists when list items are block level
https://bugs.webkit.org/show_bug.cgi?id=122602
Reviewed by Ryosuke Niwa.
When listitems are styled with display:block/float then inserting paragraph
twice at end of listitem delete entire list. Generally when listitem is empty
then we delete the listitem on inserting paragraph. In this issue, on inserting
first paragraph one empty listitem is created, and on inserting second paragraph
we try to delete that empty listitem. but it misbehave becasue of incomplete
definition of htmlediting::isLisItem() and entire list is deleted.
htmlediting::isListItem() check only render object to decide whether it is
list or not, so if any LI element is block level then isListItem return false.
Now after this patch if parent of current node is list element then node is
treated as listItem.
Test: editing/execCommand/hit-enter-twice-atendof-block-styled-listitem.html
* editing/htmlediting.cpp:
(WebCore::isListItem): Modified condition to check if parent node is list;
2013-10-30 Jer Noble <jer.noble@apple.com>
Unreviewed EFL build fix; give MediaEngineSupportParameters struct a default constructor.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::isTypeSupported):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::selectNextSourceChild):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaEngineSupportParameters::MediaEngineSupportParameters):
2013-10-30 Andreas Kling <akling@apple.com>
Let Page::renderTreeSize() be the number of renderers.
<https://webkit.org/b/123518>
<rdar://problem/15348679>
The old metric was "number of bytes allocated in RenderArena" and
that was heading towards obsolescence, fast.
Instead, keep a count of RenderObjects instantiated on RenderView.
While a bit ugly, this lets us move forward with rendering memory
model improvements without breaking features.
Reviewed by Beth Dakin.
2013-10-30 Myles C. Maxfield <mmaxfield@apple.com>
WebKit/win/WebKitGraphics.h:void WebDrawText(WebTextRenderInfo*); is never called
https://bugs.webkit.org/show_bug.cgi?id=123485
Reviewed by Brent Fulgham.
WebDrawText is the only caller of WebCoreDrawTextAtPoint, so we can
delete that as well.
Because there is no behavior difference, no new tests are necessary.
* platform/win/WebCoreTextRenderer.cpp:
* platform/win/WebCoreTextRenderer.h:
2013-10-30 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r158289.
* CMakeLists.txt:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
2013-10-30 Dong-Gwan Kim <donggwan.kim@samsung.com>
Build fails with EGLConfigSelector.cpp when OpenGL ES is not used
https://bugs.webkit.org/show_bug.cgi?id=119037
Reviewed by Brent Fulgham.
Build fix for EGLConfigSelector.cpp
No new tests, no behavior change.
* platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
(WebCore::EGLConfigSelector::createConfig):
2013-10-30 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Explicitly initialize base class in MediStreamTrackPrivate copy constructor
https://bugs.webkit.org/show_bug.cgi?id=123473
Reviewed by Eric Carlson.
No new tests needed.
Ports that enable -Werror=extra must do that to compile.
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
2013-10-30 Ryosuke Niwa <rniwa@webkit.org>
Mac build fix after r158291.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canPlayType):
2013-10-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r158243.
http://trac.webkit.org/changeset/158243
https://bugs.webkit.org/show_bug.cgi?id=123520
Change was wrong (Requested by smfr on #webkit).
* platform/graphics/GraphicsContext.h:
* platform/graphics/blackberry/PathBlackBerry.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
(WebCore::InlineTextBox::paintCompositionUnderline):
2013-10-30 peavo@outlook.com <peavo@outlook.com>
Favicons are flipped in vertical direction in WinCairo builds.
https://bugs.webkit.org/show_bug.cgi?id=102077
Reviewed by Brent Fulgham.
* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
2013-10-30 Jer Noble <jer.noble@apple.com>
[MSE] Add MediaSource compatable loading functions to MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=123353
Reviewed by Eric Carlson.
Add methods to MediaPlayer to allow it to select the correct MediaPlayerFactory
when attempting to load a MediaSource URL.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::isTypeSupported):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::selectNextSourceChild):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::load):
(WebCore::MediaPlayer::supportsType):
* platform/graphics/MediaPlayer.h:
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
Remove the isSupportedMediaSourceMIMEType() method:
* platform/MIMETypeRegistry.h:
* platform/efl/MIMETypeRegistryEfl.cpp:
* platform/mac/MIMETypeRegistryMac.mm:
2013-10-30 Brady Eidson <beidson@apple.com>
IDBCursorBackendLevelDB should be made cross-platform
https://bugs.webkit.org/show_bug.cgi?id=123513
Rubberstamped by Andreas Kling.
Because of all the already-done refactoring, this is basically a file-move and global rename.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcxproj/WebCore.vcxproj:
* Modules/indexeddb/IDBCursorBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp.
* Modules/indexeddb/IDBCursorBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h.
* Modules/indexeddb/IDBCursorBackendInterface.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2013-10-29 Jer Noble <jer.noble@apple.com>
[MSE] Remove legacy Media Source APIs (WebKitMediaSource, WebKitSourceBuffer, WebKitSourceBufferList)
https://bugs.webkit.org/show_bug.cgi?id=123463
Reviewed by Eric Carlson.
No new tests; updated test results.
Remove all reference to WebKitMediaSource, WebKitSourceBuffer, and WebKitSourceBufferList.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* Modules/mediasource/DOMURLMediaSource.idl:
* Modules/mediasource/WebKitMediaSource.cpp: Removed.
* Modules/mediasource/WebKitMediaSource.h: Removed.
* Modules/mediasource/WebKitMediaSource.idl: Removed.
* Modules/mediasource/WebKitSourceBuffer.cpp: Removed.
* Modules/mediasource/WebKitSourceBuffer.h: Removed.
* Modules/mediasource/WebKitSourceBuffer.idl: Removed.
* Modules/mediasource/WebKitSourceBufferList.cpp: Removed.
* Modules/mediasource/WebKitSourceBufferList.h: Removed.
* Modules/mediasource/WebKitSourceBufferList.idl: Removed.
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTargetFactory.in:
2013-10-30 Antti Koivisto <antti@apple.com>
Unbreak the release build.
* rendering/SimpleLineLayoutFunctions.cpp:
2013-10-30 Liangjun Zeng <lizeng@blackberry.com>
Fix memory leaks in platform/image-encoders/JPEGImageEncoder.cpp
https://bugs.webkit.org/show_bug.cgi?id=118781
Reviewed by Brent Fulgham.
We can find the function "jpeg_finish_compress" call the function "jpeg_abort" at the end.
And the comments of "jpeg_abort" is "Abort processing of a JPEG compression operation,
but don't destroy the object itself". (We can find these in the "jcapimin.c" of jpeg)
So the compression object destroy need be called.
No new tests because this doesn't change functionality.
* platform/image-encoders/JPEGImageEncoder.cpp:
(WebCore::compressRGBABigEndianToJPEG):
2013-10-30 Antti Koivisto <antti@apple.com>
Add debug settings for simple line layout
https://bugs.webkit.org/show_bug.cgi?id=123514
Reviewed by Andreas Kling.
* WebCore.exp.in:
* page/Settings.in:
Add simpleLineLayoutEnabled and simpleLineLayoutDebugBordersEnabled.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintDebugBorders):
(WebCore::SimpleLineLayout::paintFlow):
2013-10-30 peavo@outlook.com <peavo@outlook.com>
[Curl] Cookies are sometimes not set in download request.
https://bugs.webkit.org/show_bug.cgi?id=123445
Reviewed by Brent Fulgham.
Sometimes cookies are not set in the download request because the cookie file cannot be opened,
it's already been opened by the ResourceHandleManager for writing.
This can be fixed by getting the cookie list from the share handle in ResourceHandleManager instead.
This will also improve performance, as there is no need to read and parse the cookie file for each download.
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::init): Use share handle to get cookie list.
2013-10-30 ChangSeok Oh <changseok.oh@collabora.com>
Unguard Element::childShouldCreateRenderer
https://bugs.webkit.org/show_bug.cgi?id=123496
Reviewed by Andreas Kling.
Make Element::childShouldCreateRenderer normally accessible. Guarding it with flags
just leaves potential build issues.
No new tests since no functionality changed.
* dom/Element.cpp:
(WebCore::Element::childShouldCreateRenderer):
* dom/Element.h:
2013-10-30 Jer Noble <jer.noble@apple.com>
[MSE] Make MediaSourcePrivate, SourceBufferPrivate classes RefCounted.
https://bugs.webkit.org/show_bug.cgi?id=123350
Reviewed by Darin Adler.
Make the MediaSourcePrivate and SourceBufferPrivate classes RefCounted so that
they can be referenced both by MediaSource/SourceBuffer, and by the MediaPlayerPrivate
which creates them.
Change OwnPtr -> RefPtr everywhere:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::addSourceBuffer):
* Modules/mediasource/MediaSourceBase.cpp:
(WebCore::MediaSourceBase::setPrivateAndOpen):
(WebCore::MediaSourceBase::createSourceBufferPrivate):
* Modules/mediasource/MediaSourceBase.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::create):
(WebCore::SourceBuffer::SourceBuffer):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediasource/WebKitMediaSource.cpp:
(WebCore::WebKitMediaSource::addSourceBuffer):
* Modules/mediasource/WebKitSourceBuffer.cpp:
(WebCore::WebKitSourceBuffer::create):
(WebCore::WebKitSourceBuffer::WebKitSourceBuffer):
* Modules/mediasource/WebKitSourceBuffer.h:
* html/HTMLMediaSource.h:
* platform/graphics/MediaSourcePrivate.h:
* platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::SourceBufferPrivate):
2013-10-30 Allan Sandfeld Jensen <allan.jensen@digia.com>
Remove unused runtime enabled
https://bugs.webkit.org/show_bug.cgi?id=123509
Reviewed by Anders Carlsson.
Some of the runtime enabled features were only ever used by the V8 bindings
and can be removed as no WebKit code sets or reads them.
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* bindings/generic/RuntimeEnabledFeatures.h:
2013-10-30 Antti Koivisto <antti@apple.com>
Make SimpleLineLayout::Layout a class
https://bugs.webkit.org/show_bug.cgi?id=123508
Reviewed by Mario Sanchez Prada.
Improve encapsulation.
2013-10-30 Antti Koivisto <antti@apple.com>
REGRESSION(r158214): It made zillion tests crash on GTK and EFL
https://bugs.webkit.org/show_bug.cgi?id=123505
* rendering/SimpleLineLayout.h: Add WTF_MAKE_FAST_ALLOCATED
2013-10-29 Philippe Normand <pnormand@igalia.com>
[GStreamer] Store video-sink in a bin
https://bugs.webkit.org/show_bug.cgi?id=122831
Reviewed by Gustavo Noronha Silva.
For the upcoming mediastream playback support the player will
handle a non-playbin-based pipeline that will require a slightly
different video rendering chain. This patch generalizes the
encapsulation of the video sink in a bin, just like the audio sink
case.
No new tests, no change in functionality.
2013-10-29 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r154614): Opening and closing a picture on Facebook resets scroll position
https://bugs.webkit.org/show_bug.cgi?id=122882
Reviewed by Anders Carlsson.
scrollLeft and scrollTop have to continue to function in the strict mode for the Web compatiblity.
In particular, www.facebook.com and build.webkit.org depend on this behavior as of October 29th, 2013.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
(WebCore::HTMLBodyElement::setScrollTop):
2013-10-29 Brady Eidson <beidson@apple.com>
IDBTransactionBackend should be cross platform
https://bugs.webkit.org/show_bug.cgi?id=123449
Reviewed by Beth Dakin.
- Rename IDBTransactionBackendLevelDB to IDBTransactionBackendImpl
- Rename IDBTransactionBackendLevelDBOperations to IDBTransactionBackendOperations
- Move their files from the leveldb subdirectory to the indexeddb directory
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBTransactionBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp.
* Modules/indexeddb/IDBTransactionBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h.
* Modules/indexeddb/IDBTransactionBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp.
* Modules/indexeddb/IDBTransactionBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h.
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend):
2013-10-29 Sam Weinig <sam@webkit.org>
Modernize DatasetDOMStringMap and ClassList a bit
https://bugs.webkit.org/show_bug.cgi?id=123491
Reviewed by Andreas Kling.
* dom/DatasetDOMStringMap.cpp:
* dom/DatasetDOMStringMap.h:
* dom/Element.cpp:
* dom/ElementRareData.h:
* html/ClassList.cpp:
* html/ClassList.h:
Pass the owner Element by reference and store in a std::unique_ptr.
2013-10-29 Brady Eidson <beidson@apple.com>
Attempted build-fix after http://trac.webkit.org/changeset/158234
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction): Implement this!
2013-10-29 Andreas Kling <akling@apple.com>
ElementData construction helpers should return PassRef.
<https://webkit.org/b/123487>
Make functions that create new ElementData objects return appropriate
PassRef pointers instead of PassRefPtr.
Reviewed by Anders Carlsson.
2013-10-29 Ryosuke Niwa <rniwa@webkit.org>
GTK+ build fix attempt after r158220.
* GNUmakefile.list.am:
2013-10-29 Brady Eidson <beidson@apple.com>
Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface
https://bugs.webkit.org/show_bug.cgi?id=123483
Reviewed by Andreas Kling.
* Modules/indexeddb/IDBCursorBackendInterface.h:
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
(WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
(WebCore::IDBCursorBackendLevelDB::create):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
(WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
(WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
(WebCore::IDBTransactionBackendLevelDB::createCursorBackend):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
* WebCore.xcodeproj/project.pbxproj: Export a required header.
2013-10-29 Seokju Kwon <seokju@webkit.org>
Remove mutable keyword from member variables of XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=123481
Reviewed by Andreas Kling.
No new tests, no change in functionality.
* xml/XMLHttpRequest.h: Remove mutable keyword as these are no longer used in const functions.
2013-10-29 Myles C. Maxfield <mmaxfield@apple.com>
Underline bounds cannot be queried before underline itself is drawn
https://bugs.webkit.org/show_bug.cgi?id=123310
Reviewed by Simon Fraser
GraphicsContext's drawLineForText function is used to draw underlines,
strikethroughs, and overlines. Before drawing the line, this function
modifies the bounds given to it in order to make underlines crisp. However,
this means that it is impossible to know where an underline will be drawn
before drawing it. This patch pulls out this adjustment computation into
InlineTextBox, then passes the result to drawLineForText.
Because there should be no observable difference, no tests need to be updated.
* platform/graphics/GraphicsContext.h: Changing the signature of drawLineForText
so it can accept bounds from our helper function
* platform/graphics/blackberry/PathBlackBerry.cpp:
(WebCore::GraphicsContext::drawLineForText): Update to work with new
signature of drawLineForText
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLineForText): Ditto
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLineForText): Ditto
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawLineForText): Ditto
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint): Update the last call site of drawLineForText
* rendering/InlineTextBox.cpp:
(WebCore::computeBoundsForUnderline): Pure function that computes the adjusted
bounds of the underline about to be drawn
(WebCore::drawLineForText): calls computeBoundsForUnderline and then
GraphicsContext::drawLineForText
(WebCore::InlineTextBox::paintDecoration): Use new drawLineForText function
(WebCore::InlineTextBox::paintCompositionUnderline): Ditto
2013-10-29 Alexey Proskuryakov <ap@apple.com>
Beef up CryptoKey
https://bugs.webkit.org/show_bug.cgi?id=123462
Fix a mismerge, remove duplicate CryptoKeyType declaration.
* crypto/CryptoKey.h:
2013-10-29 Alexey Proskuryakov <ap@apple.com>
Beef up CryptoKey
https://bugs.webkit.org/show_bug.cgi?id=123462
Reviewed by Sam Weinig.
* WebCore.xcodeproj/project.pbxproj: Added new files.
* crypto/CryptoAlgorithmIdentifier.h: Added an enum with all registered algorithms
(they don't have to be all implemented in any port).
* crypto/CryptoKey.cpp:
(WebCore::CryptoKey::CryptoKey): Initialize base class variables.
(WebCore::CryptoKey::type): Convert internal representation for bindings use.
(WebCore::CryptoKey::buildAlgorithmDescription): Ditto. This function is supposed
to be called by derived classes before adding other keyes.
(WebCore::CryptoKey::usages): Convert internal representation for bindings use.
* crypto/CryptoKey.h:
(WebCore::CryptoKey::extractable): Expose for bindings.
(WebCore::CryptoKey::allows): A faster way to check allowed key usage from C++ code.
* crypto/CryptoKey.idl: Added SkipVTableValidation, because validation doesn't work
with derived classes. Corrected "usages" attribute name.
* crypto/CryptoKeyFormat.h: Added.
* crypto/CryptoKeyType.h: Added.
* crypto/CryptoKeyUsage.h: Added.
Added enums used by CryptoKey.
2013-10-29 Hugo Parente Lima <hugo.lima@openbossa.org>
Adding Nix files in Source/Platform to trunk
https://bugs.webkit.org/show_bug.cgi?id=118331
Reviewed by Benjamin Poulain.
Add Nix WebAudio implementation that just forward some calls to our API.
This patch is part of the upstream process, tests will be landed by other patches.
* platform/audio/nix/AudioBusNix.cpp: Added.
* platform/audio/nix/AudioDestinationNix.cpp: Added.
* platform/audio/nix/AudioDestinationNix.h: Added.
* platform/audio/nix/FFTFrameNix.cpp: Added.
* platform/nix/support/MultiChannelPCMData.cpp: Added.
2013-10-29 Brady Eidson <beidson@apple.com>
Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface::Transaction.
https://bugs.webkit.org/show_bug.cgi?id=123475
Reviewed by Tim Horton.
Currently it's using IDBBackingStoreLevelDB::Transaction, which hinders the goal of:
https://bugs.webkit.org/show_bug.cgi?id=123449 - IDBTransactionBackend should be cross platform
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBIndexWriter.cpp:
(WebCore::IDBIndexWriter::writeIndexKeys):
(WebCore::IDBIndexWriter::verifyIndexKeys):
(WebCore::IDBIndexWriter::addingKeyAllowed):
* Modules/indexeddb/IDBIndexWriter.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseIntVersion):
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseMetaData):
(WebCore::IDBBackingStoreLevelDB::createObjectStore):
(WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
(WebCore::IDBBackingStoreLevelDB::getRecord):
(WebCore::IDBBackingStoreLevelDB::putRecord):
(WebCore::IDBBackingStoreLevelDB::clearObjectStore):
(WebCore::IDBBackingStoreLevelDB::deleteRecord):
(WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
(WebCore::IDBBackingStoreLevelDB::createIndex):
(WebCore::IDBBackingStoreLevelDB::deleteIndex):
(WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
(WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
(WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
(WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexCursor):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
(WebCore::IDBTransactionBackendLevelDB::abort):
(WebCore::IDBTransactionBackendLevelDB::commit):
(WebCore::IDBTransactionBackendLevelDB::taskTimerFired):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2013-10-29 Dean Jackson <dino@apple.com>
Move InlineTextBox's text painting to it's own class
https://bugs.webkit.org/show_bug.cgi?id=123355
Reinstate the LGPL license. I incorrectly told Myles to
use another license on these new files.
* rendering/TextPainter.cpp:
* rendering/TextPainter.h:
2013-10-29 Myles C. Maxfield <mmaxfield@apple.com>
Move InlineTextBox's text painting to it's own class
https://bugs.webkit.org/show_bug.cgi?id=123355
Reviewed by Dean Jackson.
Implementing text-decoration-skip: ink requires drawing text
twice (once regularly, and once with a thick outline into a mask).
This patch pulls out the relevant text drawing code from
InlineTextBox into a new class, called TextPainter, which can be re-used
to draw text multiple times.
Because there should be no observable difference, no tests need to be updated.
* CMakeLists.txt: Adding new TextPainter class
* GNUmakefile.list.am: Adding new TextPainter class
* WebCore.vcxproj/WebCore.vcxproj: Adding new TextPainter class
* WebCore.vcxproj/WebCore.vcxproj.filters: Adding new TextPainter
class
* WebCore.xcodeproj/project.pbxproj: Adding new TextPainter class
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Moving text drawing code from
this function
* rendering/RenderingAllInOne.cpp: Adding new TextPainter class
* rendering/TextPainter.cpp: Added.
(WebCore::TextPainter::TextPainter):
(WebCore::drawTextOrEmphasisMarks):
(WebCore::paintTextWithShadows):
(WebCore::rotation):
(WebCore::TextPainter::paintText): New location for text drawing
code
(WebCore::TextPainter::paintTextInContext):
* rendering/TextPainter.h: Added.
(WebCore::SavedDrawingStateForMask::SavedDrawingStateForMask):
(WebCore::TextPainter::boxRect):
2013-10-29 Jer Noble <jer.noble@apple.com>
[MSE] [Mac] Enable MediaSource on the Mac
https://bugs.webkit.org/show_bug.cgi?id=122484
Reviewed by Darin Adler.
Enable ENABLE_MEDIA_SOURCE.
* Configurations/FeatureDefines.xcconfig:
2013-10-29 Tim Horton <timothy_horton@apple.com>
Build fix after 158223; make TileController use float for scales.
This matches what we do in other places, and fixes the constant
issue with exporting symbols that include CGFloat.
* WebCore.exp.in:
* platform/graphics/ca/mac/TileController.h:
(WebCore::TileController::scale):
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::setScale):
2013-10-29 Antti Koivisto <antti@apple.com>
Try to keep MSVC happy.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):
2013-10-29 Tim Horton <timothy_horton@apple.com>
More correct build fix after 158223.
Only fails in release because it's inline.
* WebCore.exp.in:
2013-10-29 Antti Koivisto <antti@apple.com>
Use left/right instead of left/width for simple text runs
https://bugs.webkit.org/show_bug.cgi?id=123465
Reviewed by Andreas Kling.
This simplifies the code a bit.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::adjustRunOffsets):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
2013-10-29 Tim Horton <timothy_horton@apple.com>
Try fixing the Mac build (though I have no idea why
this wouldn't fail locally)...
* WebCore.exp.in:
2013-10-29 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: Support tiled drawing and use it for the main frame
https://bugs.webkit.org/show_bug.cgi?id=123422
Reviewed by Simon Fraser.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
2013-10-29 Eric Carlson <eric.carlson@apple.com>
[Mac MediaStream] implement AVFoundation backed MediaStreamSource
https://bugs.webkit.org/show_bug.cgi?id=123316
Reviewed by Jer Noble
No new tests, existing tests updated.
* CMakeLists.txt: Add MediaStreamSourceStates.cpp.
* Modules/mediastream/MediaSourceStates.cpp:
(WebCore::MediaSourceStates::MediaSourceStates): m_SourceStates -> m_sourceStates.
(WebCore::MediaSourceStates::sourceType): Ditto.
(WebCore::MediaSourceStates::facingMode): Ditto.
* Modules/mediastream/MediaSourceStates.h: Ditto.
* Modules/mediastream/MediaSourceStates.idl: Mark some attributes as optional.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::addRemoteSource):
(WebCore::MediaStream::removeRemoteSource):
* Modules/mediastream/MediaStreamCapabilities.cpp:
(WebCore::MediaStreamCapabilities::sourceType): MediaSourceStates -> MediaStreamSourceStates
(WebCore::MediaStreamCapabilities::facingMode): Ditto.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack): Don't observe source changes directly, let the
private track do that. Change private track parameter to ref because it can't be NULL.
(WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.
(WebCore::MediaStreamTrack::setSource): Pass through to private track.
(WebCore::MediaStreamTrack::stopped): Ditto.
(WebCore::MediaStreamTrack::states): Ditto.
(WebCore::MediaStreamTrack::capabilities): Ditto.
(WebCore::MediaStreamTrack::applyConstraints): Ditto.
(WebCore::MediaStreamTrack::stopProducingData): Ditto.
(WebCore::MediaStreamTrack::trackReadyStateChanged): Renamed from sourceStateChanged. Don't
schedule an 'ended' event if called as a side effect of the stop() method having been
called as per spec.
(WebCore::MediaStreamTrack::trackMutedChanged): Renamed from sourceMutedChanged.
(WebCore::MediaStreamTrack::trackEnabledChanged): Renamed from sourceEnabledChanged.
(WebCore::MediaStreamTrack::stop): Pass through to private track.
* Modules/mediastream/MediaStreamTrack.h:
(WebCore::MediaStreamTrack::Observer::~Observer): Add virtual destructor.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::callSuccessHandler): Set track, not source, constraints.
* WebCore.xcodeproj/project.pbxproj: Add new files.
* bindings/js/JSMediaSourceStatesCustom.cpp:
(WebCore::JSMediaSourceStates::facingMode): Return jsUndefined when the facing mode
is Unknown.
* platform/mediastream/MediaStreamCenter.h: Remove unused class forward defines and
undefined method prototype.
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::addSource): ASSERT if source is kind None.
(WebCore::MediaStreamDescriptor::removeSource): Ditto.
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
* platform/mediastream/MediaStreamSource.cpp:
(WebCore::MediaStreamSource::setReadyState): Call startProducingData when readyState changes
to Live, stopProducingData when it changes to Ended.
(WebCore::MediaStreamSource::removeObserver): Call stop() when there are no more observers.
(WebCore::MediaStreamSource::setEnabled): If passed false, do nothing unless all observers
are disabled. Call startProducingData/stopProducingData when becoming enabled/disabled.
(WebCore::MediaStreamSource::stop): Don't bother checking to see if other observers have
stopped, the spec says that track.stop() should permanently stop the track's source.
* platform/mediastream/MediaStreamSource.h:
(WebCore::MediaStreamSource::name): Make virtual so derived classes can override.
(WebCore::MediaStreamSource::setName): Ditto.
(WebCore::MediaStreamSource::readyState): Ditto.
(WebCore::MediaStreamSource::enabled): Ditto.
(WebCore::MediaStreamSource::muted): Ditto.
(WebCore::MediaStreamSource::setReadonly): Ditto.
(WebCore::MediaStreamSource::remote): Ditto.
(WebCore::MediaStreamSource::setRemote): Ditto.
(WebCore::MediaStreamSource::startProducingData): Added.
(WebCore::MediaStreamSource::stopProducingData): Added.
* platform/mediastream/MediaStreamSourceCapabilities.h: Move MediaStreamSourceStates to
its own file.
* platform/mediastream/MediaStreamSourceStates.cpp: Added.
(WebCore::MediaStreamSourceStates::facingMode): Moved here from MediaSourceStates so the
strings are available to platform code.
(WebCore::MediaStreamSourceStates::sourceType): Ditto.
* platform/mediastream/MediaStreamSourceStates.h: Added, moved from MediaStreamSourceCapabilities.h.
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::create): Pass private track to constructor as PassRefPtr.
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): Initialize member variables.
(WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate): Unregister as source observer.
(WebCore::MediaStreamTrackPrivate::setSource): Unregister/register as source observer.
(WebCore::MediaStreamTrackPrivate::setEnabled): Enable/disable source, call client.
(WebCore::MediaStreamTrackPrivate::stop): New. Set readyState to Ended, optionally stop source.
(WebCore::MediaStreamTrackPrivate::setReadyState): Inline the logic from shouldFireTrackReadyStateChanged.
(WebCore::MediaStreamTrackPrivate::constraints): New, passthrough to the source.
(WebCore::MediaStreamTrackPrivate::states): Ditto.
(WebCore::MediaStreamTrackPrivate::type): Ditto.
(WebCore::MediaStreamTrackPrivate::capabilities): Ditto.
(WebCore::MediaStreamTrackPrivate::applyConstraints): Ditto.
(WebCore::MediaStreamTrackPrivate::sourceReadyStateChanged): React to source changes.
(WebCore::MediaStreamTrackPrivate::sourceMutedChanged): Ditto.
(WebCore::MediaStreamTrackPrivate::sourceEnabledChanged): Ditto.
(WebCore::MediaStreamTrackPrivate::observerIsEnabled): Respond to source query.
(WebCore::MediaStreamTrackPrivate::observerIsStopped): Ditto.
* platform/mediastream/MediaStreamTrackPrivate.h:
* platform/mediastream/mac/AVAudioCaptureSource.h: Added.
* platform/mediastream/mac/AVAudioCaptureSource.mm: Added.
* platform/mediastream/mac/AVCaptureDeviceManager.h: Added.
* platform/mediastream/mac/AVCaptureDeviceManager.mm: Added.
* platform/mediastream/mac/AVMediaCaptureSource.h: Added.
* platform/mediastream/mac/AVMediaCaptureSource.mm: Added.
* platform/mediastream/mac/AVVideoCaptureSource.h: Added.
* platform/mediastream/mac/AVVideoCaptureSource.mm: Added.
* platform/mediastream/mac/MediaStreamCenterMac.cpp:
(WebCore::MediaStreamCenterMac::validateRequestConstraints): Implement.
(WebCore::MediaStreamCenterMac::createMediaStream): Ditto.
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Ditto.
* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::initializeMockSources): Update for MediaStreamSourceStates changes.
(WebCore::MockMediaStreamCenter::createMediaStream):
2013-10-29 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Shapes] Layout error when the shape has negative top coordinate and it's applied on the second region
<https://webkit.org/b/123346>
Reviewed by David Hyatt.
We have a layout error when there is a shape applied on the second region, and it has a negative 'top' coordinate.
Since shapeInsideInfo::shapeLogicalTop() can return negative numbers, we need to check for it, when we're positioning
the first line in the region.
Test: fast/regions/shape-inside/shape-inside-on-multiple-regions-with-negative-shape-top.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
2013-10-29 Brady Eidson <beidson@apple.com>
Get IDBTransactionBackendLevelDBOperations *almost* ready to go cross platform.
https://bugs.webkit.org/show_bug.cgi?id=123451
Reviewed by NOBODY (My bad, non-reviewed, non-building code got in there)
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingCalls): Remove the auto line I was trying from review feedback.
2013-10-29 Brady Eidson <beidson@apple.com>
Get IDBTransactionBackendLevelDBOperations *almost* ready to go cross platform.
https://bugs.webkit.org/show_bug.cgi?id=123451
Reviewed by Andreas Kling.
This involves:
- Splitting out IDBTransactionBackendLevelDB::Operation into its own header
- Splitting out IDBDatabaseBackendImpl::PendingOpenCall into its own header
- Reworking the LevelDB Operations to handle the base class IDBTransactionBackendInterface
- Adding virtual methods in a few of the *Interface classes to support the above
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBCallbacks.h:
* Modules/indexeddb/IDBCursorBackendInterface.h:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::setIndexKeys):
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::openConnection):
(WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
* Modules/indexeddb/IDBOperation.h: Added.
(WebCore::IDBOperation::~IDBOperation):
* Modules/indexeddb/IDBPendingOpenCall.h: Added.
(WebCore::IDBPendingOpenCall::create):
(WebCore::IDBPendingOpenCall::callbacks):
(WebCore::IDBPendingOpenCall::databaseCallbacks):
(WebCore::IDBPendingOpenCall::version):
(WebCore::IDBPendingOpenCall::transactionId):
(WebCore::IDBPendingOpenCall::IDBPendingOpenCall):
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
(WebCore::IDBCursorBackendLevelDB::CursorIterationOperation::create):
(WebCore::IDBCursorBackendLevelDB::CursorAdvanceOperation::create):
(WebCore::IDBCursorBackendLevelDB::CursorPrefetchIterationOperation::create):
(WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::scheduleTask):
(WebCore::IDBTransactionBackendLevelDB::abort):
(WebCore::IDBTransactionBackendLevelDB::taskTimerFired):
(WebCore::IDBTransactionBackendLevelDB::schedulePutOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleOpenCursorOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleCountOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleDeleteRangeOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleClearOperation):
(WebCore::IDBTransactionBackendLevelDB::createCursorBackend):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
(WebCore::CreateObjectStoreOperation::perform):
(WebCore::CreateIndexOperation::perform):
(WebCore::CreateIndexAbortOperation::perform):
(WebCore::DeleteIndexOperation::perform):
(WebCore::DeleteIndexAbortOperation::perform):
(WebCore::OpenCursorOperation::perform):
(WebCore::DeleteObjectStoreOperation::perform):
(WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
(WebCore::CreateObjectStoreAbortOperation::perform):
(WebCore::DeleteObjectStoreAbortOperation::perform):
(WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
(WebCore::CreateObjectStoreOperation::create):
(WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
(WebCore::DeleteObjectStoreOperation::create):
(WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
(WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
(WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
(WebCore::CreateObjectStoreAbortOperation::create):
(WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
(WebCore::DeleteObjectStoreAbortOperation::create):
(WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
(WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
(WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::VersionChangeAbortOperation):
(WebCore::CreateIndexOperation::create):
(WebCore::CreateIndexOperation::CreateIndexOperation):
(WebCore::CreateIndexAbortOperation::create):
(WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
(WebCore::DeleteIndexOperation::create):
(WebCore::DeleteIndexOperation::DeleteIndexOperation):
(WebCore::DeleteIndexAbortOperation::create):
(WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
(WebCore::GetOperation::create):
(WebCore::GetOperation::GetOperation):
(WebCore::PutOperation::create):
(WebCore::PutOperation::PutOperation):
(WebCore::SetIndexesReadyOperation::create):
(WebCore::SetIndexesReadyOperation::SetIndexesReadyOperation):
(WebCore::OpenCursorOperation::create):
(WebCore::OpenCursorOperation::OpenCursorOperation):
(WebCore::CountOperation::create):
(WebCore::CountOperation::CountOperation):
(WebCore::DeleteRangeOperation::create):
(WebCore::DeleteRangeOperation::DeleteRangeOperation):
(WebCore::ClearOperation::create):
(WebCore::ClearOperation::ClearOperation):
2013-10-29 Antti Koivisto <antti@apple.com>
Make SimpleLineLayout::Layout a variable size object
https://bugs.webkit.org/show_bug.cgi?id=123459
Reviewed by Andreas Kling.
Less memory, less indirection.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::create):
(WebCore::SimpleLineLayout::Layout::create):
(WebCore::SimpleLineLayout::Layout::Layout):
* rendering/SimpleLineLayout.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::hitTestFlow):
* rendering/SimpleLineLayoutFunctions.h:
(WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
(WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
(WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
(WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
(WebCore::SimpleLineLayout::containsTextCaretOffset):
(WebCore::SimpleLineLayout::isTextRendered):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::end):
2013-10-29 Andreas Kling <akling@apple.com>
RenderObject::outlineStyleForRepaint() should return a reference.
<https://webkit.org/b/123453>
Kill a FIXME and make outlineStyleForRepaint() return a RenderStyle&.
Reviewed by Antti Koivisto.
2013-10-29 Andreas Kling <akling@apple.com>
Move more of SVG resources cache to using RenderElement.
<https://webkit.org/b/123452>
Make some more RenderSVGResourcesCache methods take RenderElement&
instead of RenderObject*.
Also removed a double hash lookup in removeResourcesFromRenderer().
Reviewed by Antti Koivisto.
2013-10-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove old Inspector.json version files and generators
https://bugs.webkit.org/show_bug.cgi?id=123426
Reviewed by Timothy Hatcher.
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* inspector/Inspector-0.1.json: Removed.
* inspector/Inspector-1.0.json: Removed.
* inspector/generate-inspector-protocol-version: Removed.
2013-10-29 Philippe Normand <pnormand@igalia.com>
[GTK] DOM bindings documentation errors
https://bugs.webkit.org/show_bug.cgi?id=123448
Reviewed by Carlos Garcia Campos.
* bindings/gobject/WebKitDOMCustom.h: Basic documentation for
return types.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction): Generate Returns documentation tag for
non-void return types and provide basic documentation.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
Reset tests results.
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
* bindings/scripts/test/GObject/WebKitDOMTestException.h:
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/GObject/WebKitDOMattribute.h:
2013-10-24 Brent Fulgham <bfulgham@apple.com>
Invalid cast in WebCore::toRenderMathMLBlock
https://bugs.webkit.org/show_bug.cgi?id=121728
rdar://problem/15046151
Reviewed by Dean Jackson.
Tested by: mathml/arbitrary-markup.html
* dom/Element.h: Expose childShouldCreateRenderer for
MathML as well as SVG builds.
* dom/Node.h:
(WebCore::Node::isMathMLElement): Added.
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::create): Create as MathML Element.
(WebCore::MathMLElement::childShouldCreateRenderer):
Only allow the child to emit a renderer if it is a
MathML element.
* mathml/MathMLElement.h:
2013-10-29 Andreas Kling <akling@apple.com>
SVG: applyStrokeStyleToContext should take a RenderElement&.
<https://webkit.org/b/123447>
..and a RenderStyle& too, for that matter.
Reviewed by Anders Carlsson.
* rendering/svg/SVGRenderSupport.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
Have this take a RenderElement& and RenderStyle& instead of
raw pointers. Tweaked a silly-looking loop.
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGShape.cpp:
Moved BoundingRectStrokeStyleApplier helper class into the
cpp file since it wasn't being used anywhere else.
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::applyResource):
* rendering/svg/RenderSVGResourceSolidColor.cpp:
(WebCore::RenderSVGResourceSolidColor::applyResource):
Remove ampersands.
2013-10-29 Antti Koivisto <antti@apple.com>
Multiple runs per line on simple line path
https://bugs.webkit.org/show_bug.cgi?id=123446
Reviewed by Andreas Kling.
By allowing multiple runs per line we can support text flows with consecutive whitespaces in the middle.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
Remove space test.
The improved test coverage found a few more cases that we need to disallow.
(WebCore::SimpleLineLayout::adjustRunOffsets):
Round the run positions and widths so they match line boxes.
Adjust for text-align.
(WebCore::SimpleLineLayout::create):
Split lines with consecutive spaces into runs.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::hitTestFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):
(WebCore::SimpleLineLayout::computeTextBoundingBox):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Iterator::resolver):
(WebCore::SimpleLineLayout::RunResolver::Iterator::lineIndex):
(WebCore::SimpleLineLayout::RunResolver::Run::Run):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::Run::lineIndex):
(WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
(WebCore::SimpleLineLayout::RunResolver::Iterator::operator++):
Removed unnecessary operators.
(WebCore::SimpleLineLayout::RunResolver::Iterator::operator==):
(WebCore::SimpleLineLayout::RunResolver::Iterator::operator!=):
(WebCore::SimpleLineLayout::RunResolver::Iterator::operator*):
(WebCore::SimpleLineLayout::RunResolver::Iterator::simpleRun):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
(WebCore::SimpleLineLayout::RunResolver::begin):
(WebCore::SimpleLineLayout::RunResolver::end):
Resolver -> RunResolver
(WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator++):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator==):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator!=):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
(WebCore::SimpleLineLayout::LineResolver::LineResolver):
(WebCore::SimpleLineLayout::LineResolver::begin):
(WebCore::SimpleLineLayout::LineResolver::end):
Add LineResolver around RunResolver. It resolves the line rectangles.
(WebCore::SimpleLineLayout::runResolver):
(WebCore::SimpleLineLayout::lineResolver):
2013-10-29 Chris Fleizach <cfleizach@apple.com>
AX: elements with explicit tabindex should expose AXFocused as writable, since mouse clicks can focus it
https://bugs.webkit.org/show_bug.cgi?id=121335
Reviewed by Mario Sanchez Prada.
Re-order logic that determines if a <span> should appear as an accessible element.
The change is that if an element canSetFocus() it should always be in the AX tree.
Test: accessibility/tabindex-elements-are-accessible.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2013-10-29 Philippe Normand <pnormand@igalia.com>
[GTK] enable media-stream in build-webkit
https://bugs.webkit.org/show_bug.cgi?id=123144
Reviewed by Martin Robinson.
* GNUmakefile.list.am: Add new MediaStream files to the GTK port build.
2013-10-28 Chris Fleizach <cfleizach@apple.com>
AX: Webkit does not expose AXRequired on input type=file
https://bugs.webkit.org/show_bug.cgi?id=123376
Reviewed by Mario Sanchez Prada.
File upload buttons should expose AXRequired, since they take an input state.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
(WebCore::AccessibilityNodeObject::alternativeText):
2013-10-29 Jinwoo Song <jinwoo7.song@samsung.com>
Re-enable simple line layout for EFL
https://bugs.webkit.org/show_bug.cgi?id=123402
Reviewed by Antti Koivisto.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): 8-bit TextRun support is now enabled for EFL port, so the port
can use the simple line layout.
2013-10-29 Zan Dobersek <zdobersek@igalia.com>
Unreviewed, follow-up to r158185. Export the required symbol.
This should fix the Mac debug build.
* WebCore.exp.in:
2013-10-29 Santosh Mahto <santosh.ma@samsung.com>
Text selected with double-click gets unselected after DOM modification
https://bugs.webkit.org/show_bug.cgi?id=114227
Reviewed by Ryosuke Niwa.
Before this patch when selection is done by double-click (start and base remain
same) and DOM is modified then selection gets vanished. This does not
happen when selection is done by dragging mouse. This happens because
on double-click base and extent remain the same and on DOM
modification we update the selection with base and extent, so we loose
the selection. Since in double-click case start/end contain the
correct selection, same should be used after dom modification to
update selection.
Test: editing/selection/double-click-selection-with-dom-mutation.html
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::textWasReplaced): use start/end to update
selection in case double click selection. Added a check for base !=
extent, if base != extent use base/extent to update the selection
otherwise use start/end with directionality check.
2013-10-29 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Display anonymous regions in DRT
https://bugs.webkit.org/show_bug.cgi?id=122963
Reviewed by Alexandru Chiculita.
After https://bugs.webkit.org/show_bug.cgi?id=119135, css regions are modelled using an anonymous
RenderNamedFlowFragment object inside the block having a valid -webkit-flow-from.
This patch changes the way elements | pseudo-elements with -webkit-flow-from are displayed
in test dumps.
Before:
RenderRegion {DIV} at (200,200) size 52x52 [border: (1px solid #000000)]
After:
RenderBlock (positioned) {DIV} at (200,200) size 52x52 [border: (1px solid #000000)]
RenderNamedFlowFragment at (1,1) size 50x50
Before:
Flow Threads
Thread with flow-name 'article'
Regions for flow 'article'
RenderRegion {DIV} #region_1
RenderRegion {DIV} #region_2
After:
Named flows
Named flow 'article'
Regions for named flow 'article'
RenderNamedFlowFragment (anonymous child of {DIV::before} #region_1)
RenderNamedFlowFragment (anonymous child of {DIV} #region_2)
Changed existing tests based on the new dumps.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::renderName):
* rendering/RenderNamedFlowFragment.h: Add a comment explaining the purpose of the class.
* rendering/RenderRegion.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
(WebCore::writeRenderRegionList): Adjust function to display info for anonymous regions too.
(WebCore::writeRenderNamedFlowThreads): Separate dump of valid and invalid regions for a named flow.
2013-10-29 Zan Dobersek <zdobersek@igalia.com>
Move writeIndent, overloaded << operators from RenderTreeAsText to TextStream
https://bugs.webkit.org/show_bug.cgi?id=116012
Reviewed by Simon Fraser.
The writeIndent method and overloaded << operators for writing out vectors and points and rectangles
of various types are not specific to the render tree nor do they depend on any rendering-specific interface.
* page/scrolling/ScrollingStateNode.cpp:
* page/scrolling/ScrollingStateNode.h:
(ScrollingStateNode): Remove the writeIndent declaration, it's functionally the same as the TextStream method.
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayer.h:
(GraphicsLayer): Ditto.
* platform/graphics/filters/DistantLightSource.cpp: Remove the RenderTreeAsText.h inclusion or replace it with
the inclusion of the TextStream.h header where required. The writeIndent method is now declared there.
* platform/graphics/filters/FEBlend.cpp: Ditto.
* platform/graphics/filters/FEColorMatrix.cpp: Ditto.
* platform/graphics/filters/FEComponentTransfer.cpp: Ditto.
* platform/graphics/filters/FEComposite.cpp: Ditto.
* platform/graphics/filters/FEConvolveMatrix.cpp: Ditto.
* platform/graphics/filters/FECustomFilter.cpp: Ditto.
* platform/graphics/filters/FEDiffuseLighting.cpp: Ditto.
* platform/graphics/filters/FEDisplacementMap.cpp: Ditto.
* platform/graphics/filters/FEDropShadow.cpp: Ditto.
* platform/graphics/filters/FEFlood.cpp: Ditto.
* platform/graphics/filters/FEGaussianBlur.cpp: Ditto.
* platform/graphics/filters/FEMerge.cpp: Ditto.
* platform/graphics/filters/FEMorphology.cpp: Ditto.
* platform/graphics/filters/FEOffset.cpp: Ditto.
* platform/graphics/filters/FESpecularLighting.cpp: Ditto.
* platform/graphics/filters/FETurbulence.cpp: Ditto.
* platform/graphics/filters/SourceAlpha.cpp: Ditto.
* platform/graphics/filters/SourceGraphic.cpp: Ditto.
* platform/text/TextStream.cpp: Move the writeIndent and operators' definitions here.
(WebCore::operator<<):
(WebCore):
(WebCore::writeIndent):
* platform/text/TextStream.h: Move the writeIndent and operators' declarations here.
(WebCore):
(TextStream):
(WebCore::TextStream::operator<<):
* rendering/RenderTreeAsText.cpp: Move the writeIndent and operators' definitions into TextStream.
(WebCore):
* rendering/RenderTreeAsText.h: Move the writeIndent and operators' declarations into TextStream.
(WebCore):
2013-10-28 Zan Dobersek <zdobersek@igalia.com>
Clean up ScopedEventQueue
https://bugs.webkit.org/show_bug.cgi?id=123408
Reviewed by Darin Adler.
Clean up the ScopedEventQueue implementation. ScopedEventQueue::instance() should return a reference to a
NeverDestroyed<ScopedEventQueue> object. The static ScopedEventQueue::s_instance pointer is removed.
The ScopedEventQueue destructor, the dispatchAllEvents method and the scope level incrementation/decrementation
methods are made private. NeverDestroyed<ScopedEventQueue> and EventQueueScope are made friends of the
ScopedEventQueue class so they can access the constructor and the incrementation/decrementation methods, respectively.
ScopedEventQueue method definitions are reordered to follow the order of their declarations in the header file.
ScopedEventQueue::dispatchAllEvents() now uses std::move to efficiently dispatch and clear all currently queued events.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchScopedEvent):
* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::instance):
(WebCore::ScopedEventQueue::dispatchAllEvents):
* dom/ScopedEventQueue.h:
(WebCore::EventQueueScope::EventQueueScope):
(WebCore::EventQueueScope::~EventQueueScope):
2013-10-28 Andreas Kling <akling@apple.com>
applyTextTransform() should take a const RenderStyle&.
<https://webkit.org/b/123434>
This function is always called with an existing RenderStyle object.
Reviewed by Anders Carlsson.
2013-10-28 Andreas Kling <akling@apple.com>
RenderSVGResource::applyResource() should take a const RenderStyle&.
<https://webkit.org/b/123433>
These functions are always called with an existing RenderStyle object
so let them take a const reference instead of a raw pointer.
Also sprinkled some missing OVERRIDEs.
Reviewed by Anders Carlsson.
2013-10-28 Andreas Kling <akling@apple.com>
Remove unused RenderTextControl::textBaseStyle().
<https://webkit.org/b/123432>
Reviewed by Anders Carlsson.
2013-10-28 Zan Dobersek <zdobersek@igalia.com>
HTML input type objects should be managed through std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=123160
Reviewed by Darin Adler.
Make the constructors of the InputType subclasses public. This makes it possible to use std::make_unique on these classes
and makes the T::create() helpers redundant. New instances of these classes are now managed through std::unique_ptr.
InputType::create() now uses a NeverDestroyed InputTypeFactoryMap that maps type names to InputTypeFactoryFunctions and
gets populated when the method is first called and the map is still empty. Certain types are not added to the factory map
if they're disabled at runtime.
The factory is used to create the new InputType object if the requested type was found in the map, and TextInputType is used otherwise.
* html/ButtonInputType.cpp:
* html/ButtonInputType.h:
(WebCore::ButtonInputType::ButtonInputType):
* html/CheckboxInputType.cpp:
* html/CheckboxInputType.h:
(WebCore::CheckboxInputType::CheckboxInputType):
* html/ColorInputType.cpp:
* html/ColorInputType.h:
(WebCore::ColorInputType::ColorInputType):
* html/DateInputType.cpp:
* html/DateInputType.h:
* html/DateTimeInputType.cpp:
* html/DateTimeInputType.h:
(WebCore::DateTimeInputType::DateTimeInputType):
* html/DateTimeLocalInputType.cpp:
* html/DateTimeLocalInputType.h:
(WebCore::DateTimeLocalInputType::DateTimeLocalInputType):
* html/EmailInputType.cpp:
* html/EmailInputType.h:
(WebCore::EmailInputType::EmailInputType):
* html/FileInputType.cpp:
* html/FileInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
* html/HTMLInputElement.h:
* html/HiddenInputType.cpp:
* html/HiddenInputType.h:
(WebCore::HiddenInputType::HiddenInputType):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::ImageInputType):
* html/ImageInputType.h:
* html/InputType.cpp:
(WebCore::createInputType): A templated helper that constructs a new InputType subclass object through std::make_unique.
(WebCore::populateInputTypeFactoryMap): Populates the passed-in map with type-createInputType<T> pairs.
(WebCore::InputType::create): Get the InputTypeFactoryFunction for the specified type, or fall back to TextInputType.
(WebCore::InputType::createText):
* html/InputType.h:
* html/MonthInputType.cpp:
* html/MonthInputType.h:
(WebCore::MonthInputType::MonthInputType):
* html/NumberInputType.cpp:
* html/NumberInputType.h:
(WebCore::NumberInputType::NumberInputType):
* html/PasswordInputType.cpp:
* html/PasswordInputType.h:
(WebCore::PasswordInputType::PasswordInputType):
* html/RadioInputType.cpp:
* html/RadioInputType.h:
(WebCore::RadioInputType::RadioInputType):
* html/RangeInputType.cpp:
* html/RangeInputType.h:
* html/ResetInputType.cpp:
* html/ResetInputType.h:
(WebCore::ResetInputType::ResetInputType):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::SearchInputType):
* html/SearchInputType.h:
* html/SubmitInputType.cpp:
* html/SubmitInputType.h:
(WebCore::SubmitInputType::SubmitInputType):
* html/TelephoneInputType.cpp:
* html/TelephoneInputType.h:
(WebCore::TelephoneInputType::TelephoneInputType):
* html/TextInputType.cpp:
* html/TextInputType.h:
(WebCore::TextInputType::TextInputType):
* html/TimeInputType.cpp:
* html/TimeInputType.h:
* html/URLInputType.cpp:
* html/URLInputType.h:
(WebCore::URLInputType::URLInputType):
* html/WeekInputType.cpp:
* html/WeekInputType.h:
(WebCore::WeekInputType::WeekInputType):
2013-10-28 Brady Eidson <beidson@apple.com>
Refactor IDB factory creation.
https://bugs.webkit.org/show_bug.cgi?id=123347
Reviewed by Andreas Kling.
- Rework how database directory location is passed around.
- Make (some) SecurityOrigin arguments be references instead of pointers.
- Add two SecurityOrigin arguments to opening databases for future use.
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::openInternal):
* Modules/indexeddb/IDBFactoryBackendInterface.cpp:
(WebCore::IDBFactoryBackendInterface::create):
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/PageGroupIndexedDatabase.cpp:
(WebCore::PageGroupIndexedDatabase::PageGroupIndexedDatabase):
(WebCore::PageGroupIndexedDatabase::from):
(WebCore::PageGroupIndexedDatabase::factoryBackend):
* Modules/indexeddb/PageGroupIndexedDatabase.h:
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
(WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
(WebCore::WorkerGlobalScopeIndexedDatabase::from):
(WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::open):
(WebCore::IDBBackingStoreLevelDB::openInMemory):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::computeFileIdentifier):
(WebCore::computeUniqueIdentifier):
(WebCore::IDBFactoryBackendLevelDB::IDBFactoryBackendLevelDB):
(WebCore::IDBFactoryBackendLevelDB::getDatabaseNames):
(WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
(WebCore::IDBFactoryBackendLevelDB::openBackingStore):
(WebCore::IDBFactoryBackendLevelDB::open):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
(WebCore::IDBFactoryBackendLevelDB::create):
* WebCore.exp.in:
* platform/DatabaseStrategy.cpp:
(WebCore::DatabaseStrategy::createIDBFactoryBackend):
* platform/DatabaseStrategy.h:
2013-10-28 Andreas Kling <akling@apple.com>
RenderElement::style() should return a reference.
<https://webkit.org/b/123414>
Now that renderers always have style, go ahead and make style()
return a RenderStyle&.
There are countless opportunities for further cleanup enabled by
this change. I'm simply passing &style() in many cases where we
can really do something nicer instead.
Reviewed by Anders Carlsson.
2013-10-28 Tim Horton <timothy_horton@apple.com>
Make TileController create the appropriate PlatformCALayer subclasses
https://bugs.webkit.org/show_bug.cgi?id=123418
Reviewed by Simon Fraser.
Add PlatformCALayer::createCompatibleLayer, which is overridden in
each of the subclasses to create a PlatformCALayer instance of the same
subclass. This is used in TileController to make bare PlatformCALayers
of the correct type (Mac, Win, or Remote).
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::createCompatibleLayer):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::createCompatibleLayer):
* platform/graphics/ca/win/PlatformCALayerWin.h:
Add createCompatibleLayer and implement it in the subclasses.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::tiledScrollingIndicatorLayer):
(WebCore::TileController::createTileLayer):
Make use of createCompatibleLayer when creating PlatformCALayers.
2013-10-28 Alexandru Chiculita <achicu@adobe.com>
Web Inspector: CSS Regions: Add protocol API to expose content nodes addition/removal
https://bugs.webkit.org/show_bug.cgi?id=123424
Reviewed by Timothy Hatcher.
Test: inspector-protocol/model/content-flow-content-nodes.html
Adding two new inspector-protocol APIs to handle the cases when new elements are
added or removed from a named flow. These APIs will trigger even though there
is no region associated with the named flow.
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement):
(WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
2013-10-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused inspector/inline-javascript-imports.py
https://bugs.webkit.org/show_bug.cgi?id=123425
Reviewed by Timothy Hatcher.
* inspector/inline-javascript-imports.py: Removed.
2013-10-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused "externs" files and generators
https://bugs.webkit.org/show_bug.cgi?id=123427
Reviewed by Timothy Hatcher.
* inspector/InjectedScriptExterns.js: Removed.
* inspector/generate_protocol_externs.py: Removed.
2013-10-28 Joseph Pecoraro <pecoraro@apple.com>
Upstream remaining PLATFORM(IOS) and ENABLE(REMOTE_INSPECTOR) pieces
https://bugs.webkit.org/show_bug.cgi?id=123411
Reviewed by Timothy Hatcher.
Include an InspectorClient hook for when node searching is enabled / disabled.
* inspector/InspectorClient.h:
(WebCore::InspectorClient::didSetSearchingForNode):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setSearchingForNode):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::didSetSearchingForNode):
* inspector/InspectorOverlay.h:
2013-10-28 Benjamin Poulain <benjamin@webkit.org>
Rename applyPageScaleFactorInCompositor to delegatesPageScaling
https://bugs.webkit.org/show_bug.cgi?id=123417
Reviewed by Simon Fraser.
* page/Frame.cpp:
(WebCore::Frame::frameScaleFactor):
* page/FrameView.cpp:
(WebCore::FrameView::visibleContentScaleFactor):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* page/Settings.in:
* platform/ScrollView.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::addToOverlapMap):
2013-10-28 Myles C. Maxfield <mmaxfield@apple.com>
Parsing support for -webkit-text-decoration-skip: ink
https://bugs.webkit.org/show_bug.cgi?id=123358
Reviewed by Dean Jackson.
Adds initial parsing support for parsing -webkit-text-decoration-skip with
values of "none" and "ink". This work is behind the new
ENABLE(CSS3_TEXT_DECORATION) compile-time flag.
Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html
* Configurations/FeatureDefines.xcconfig: Adding ENABLE(CSS3_TEXT_DECORATION)
* css/CSSComputedStyleDeclaration.cpp: Mapping internal representation of text-decoration-skip
to a CSSValue
(WebCore::renderTextDecorationSkipFlagsToCSSValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp: Actually parsing tokens
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseTextDecorationSkip):
* css/CSSParser.h:
* css/CSSPropertyNames.in: adding -webkit-text-decoration-skip
* css/CSSValueKeywords.in: adding ink
* css/DeprecatedStyleBuilder.cpp: Mapping from CSSValue to internal representation
(WebCore::ApplyPropertyTextDecorationSkip::valueToDecorationSkip):
(WebCore::ApplyPropertyTextDecorationSkip::applyValue):
(WebCore::ApplyPropertyTextDecorationSkip::createHandler):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp: decoration-skip uses DeprecatedStyleBuilder
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h: Adding functions for modifying and accessing decoration-skip properties
* rendering/style/RenderStyleConstants.h: Definition of internal representation
* rendering/style/StyleRareInheritedData.cpp: Setting up constructors and comparators
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h: Holds actual value of internal representation
2013-10-28 Anders Carlsson <andersca@apple.com>
RunLoop::dispatch should take an std::function
https://bugs.webkit.org/show_bug.cgi?id=123407
Reviewed by Andreas Kling.
* WebCore.exp.in:
* platform/RunLoop.cpp:
(WebCore::RunLoop::performWork):
(WebCore::RunLoop::dispatch):
* platform/RunLoop.h:
2013-10-28 Tim Horton <timothy_horton@apple.com>
Make TileController manipulate PlatformCALayers instead of CALayers
https://bugs.webkit.org/show_bug.cgi?id=123279
Reviewed by Simon Fraser.
In the interest of making TileController more platform-independent
(so that it can be used with the remote layer tree, and maybe Windows),
move TileController onto our PlatformCALayer abstraction instead of
direct manipulation of CALayers.
Some fallout from this includes getting rid of special Mac-specific
TileController-specific CALayer subclasses, and reworking tile
painting to work in a more generic way.
This is a first step, and doesn't get us all the way to a platform independent
TileController, but more patches are forthcoming.
No new tests, just a (largeish) refactor.
* WebCore.exp.in:
The signature of some methods has changed.
* WebCore.xcodeproj/project.pbxproj:
Remove WebTileLayer.*
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
Use the "isTile" key on the CALayer dictionary instead of the layer's
class to determine if it's a tile. TileController will set this on a tile
when it is created, for now.
* platform/graphics/TiledBacking.h:
tiledScrollingIndicatorLayer() should return a PlatformCALayer.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerPaintContents):
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::platformCALayerIncrementRepaintCount):
* platform/graphics/ca/PlatformCALayerClient.h:
The PlatformCALayerClient paintContents and incrementRepaintCount callbacks
should include the platformCALayer that caused the callback.
* platform/graphics/ca/PlatformCALayer.h:
Add LayerTypeSimpleLayer, which is similar to LayerTypeWebLayer
except it just calls back its client to paint, instead of doing
complicated things with repaint rects. This is so that TileController
doesn't re-enter drawLayerContents when asking its GraphicsLayer
to paint for each PlatformCALayer (it will be entering drawLayerContents
for the first time for each layer). It also happens to be useful
for things like the tile controller overlay, which don't need
all that complication.
Add LayerTypeTiledBackingTileLayer, which is used simply to distinguish
TileController Tile layers from other LayerTypeSimpleLayers.
* platform/graphics/ca/mac/LayerPool.h:
* platform/graphics/ca/mac/LayerPool.mm:
(WebCore::LayerPool::addLayer):
(WebCore::LayerPool::takeLayerWithSize):
LayerPool should operate on PlatformCALayers now.
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::PlatformCALayerMac):
Set the "isTile" key on the CALayer to true for TiledBackingTileLayers,
so that the scrolling performance logging can tell a tile apart from
any other layer, on the scrolling thread, without touching PlatformCALayers
or the TileController or any other main-thread data structures.
(PlatformCALayerMac::setEdgeAntialiasingMask): Added.
* platform/graphics/ca/mac/TileController.h:
Remove references to Objective-C classes; instead use PlatformCALayer everywhere.
TileController is now a PlatformCALayerClient, and the layers it owns are
all PlatformCALayers (and it is constructed with a PlatformCALayer, etc.).
Hand in the tile debug border color as a WebCore color, instead of a CGColorRef.
blankPixelCountForTiles() now operates on a list of PlatformLayers instead of
WebTileLayers specifically, since WebTileLayer is gone.
Make drawTileMapContents private because WebTileCacheMapLayer no longer exists.
(WebCore::TileController::platformCALayerDrawsContent):
All of the layers who have TileController as their client paint their contents.
(WebCore::TileController::platformCALayerContentsOpaque):
This will only be called for layers which paint via drawLayerContents,
so it's OK that we don't special-case the debugging overlay here.
(WebCore::TileController::owningGraphicsLayer):
Return the GraphicsLayer that owns the TileController's main
layer, via its conformance to PlatformCALayerClient. This is
a bit strange (because it's not strictly a GraphicsLayer, despite
always being so at the moment), but is done for clarity inside
TileController itself.
* platform/graphics/ca/mac/TileController.mm:
Remove CALayer (WebCALayerDetails), WebTiledScrollingIndicatorLayer,
and a bunch of includes that we don't need anymore.
(WebCore::TileController::create):
(WebCore::TileController::TileController):
TileController is passed a PlatformCALayer for the tile cache root layer,
instead of a WebTiledBackingLayer. It also creates a PlatformCALayer with
LayerTypeLayer instead of a bare CALayer for the container layer.
It's OK to remove the transaction because it was only used to stop
the implicit animation, which PlatformCALayer will do for us.
(WebCore::TileController::~TileController):
Clear the owner of the PlatformCALayers which the TileController previously owned,
so they don't try to call back a destroyed TileController.
(WebCore::TileController::tileCacheLayerBoundsChanged):
(WebCore::TileController::setNeedsDisplay):
Straightforward adjustments towards use of PlatformCALayer.
(WebCore::TileController::setTileNeedsDisplayInRect):
Adjustments towards use of PlatformCALayer; we need FloatRects so we can
pass pointers to PlatformCALayer::setNeedsDisplay.
(WebCore::TileController::platformCALayerPaintContents):
Replace drawLayer with platformCALayerPaintContents, which will be called
back from our various WebSimpleLayers. If the PlatformCALayer is our
tiled scrolling debug indicator, paint that. Otherwise, it's a tile.
Make use of drawLayerContents() to paint the tile contents.
Make use of drawRepaintIndicator() to paint the repaint indicator if needed.
Move scrolling performance logging code that used to be in WebTileLayer here.
(WebCore::TileController::platformCALayerDeviceScaleFactor):
(WebCore::TileController::platformCALayerShowDebugBorders):
(WebCore::TileController::platformCALayerShowRepaintCounter):
Forward these to the owning GraphicsLayerCA, because it will have the right answers.
(WebCore::TileController::setScale):
Adjustments towards use of PlatformCALayer; remove some code that Simon
caused to be unused in 156291 but did not remove.
(WebCore::TileController::setAcceleratesDrawing):
(WebCore::TileController::setTilesOpaque):
(WebCore::TileController::setVisibleRect):
(WebCore::TileController::revalidateTiles):
(WebCore::TileController::setTileDebugBorderWidth):
(WebCore::TileController::setTileDebugBorderColor):
(WebCore::TileController::bounds):
(WebCore::TileController::blankPixelCount):
(WebCore::TileController::blankPixelCountForTiles):
(WebCore::queueTileForRemoval):
(WebCore::TileController::setNeedsRevalidateTiles):
(WebCore::TileController::ensureTilesForRect):
(WebCore::TileController::retainedTileBackingStoreMemory):
Straightforward adjustments towards use of PlatformCALayer.
(WebCore::TileController::updateTileCoverageMap):
Adjustments towards use of PlatformCALayer; rename backgroundColor
to visibleRectIndicatorColor, since it's actually a border, not a background.
(WebCore::TileController::tiledScrollingIndicatorLayer):
Create a LayerTypeSimpleLayer PlatformCALayer for the tiled scrolling indicator.
It will be asked to paint straightforwardly, like a CALayer would.
Create a LayerTypeLayer PlatformCALayer for the visible rect indicator.
It doesn't need to paint anything, so it doesn't get an owner.
(WebCore::TileController::createTileLayer):
When creating a new tile layer, adopt it by setting its owner.
Otherwise, straightforward adjustments towards use of PlatformCALayer.
(WebCore::TileController::platformCALayerIncrementRepaintCount):
Manage repaint counts for tiles in TileController now.
(WebCore::TileController::drawTileMapContents):
Adjustments towards use of PlatformCALayer.
* platform/graphics/ca/mac/WebTileLayer.h: Removed.
* platform/graphics/ca/mac/WebTileLayer.mm: Removed.
We don't need WebTileLayer anymore, tiles are now just WebSimpleLayers
owned by TileController. Its behavior has been moved into TileController.
* platform/graphics/ca/mac/WebTiledBackingLayer.h:
* platform/graphics/ca/mac/WebTiledBackingLayer.mm:
(-[WebTiledBackingLayer createTileController:]):
Add createTileController: so that the WebTiledBackingLayer's owner can
hand the TileController the PlatformCALayer for the WebTiledBackingLayer
without propagating additional usage of PlatformCALayer::platformCALayer(),
which we need to remove in light of the remote layer tree work.
(-[WebTiledBackingLayer setBorderColor:]):
* platform/graphics/ca/win/PlatformCALayerWin.h:
Add an empty implementation of setEdgeAntialiasingMask.
We'll probably want to implement it before adopting TileController on Windows.
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerPaintContents):
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerIncrementRepaintCount):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::LayerClient::platformCALayerPaintContents):
(WebCore::LayerClient::platformCALayerIncrementRepaintCount):
Adjust for new parameters on PlatformCALayerClient callbacks.
* platform/graphics/mac/WebLayer.h:
Add WebSimpleLayer, which inherits directly from CALayer, and make
our standard WebLayer (which is used for compositing layers in web content)
inherit from that.
* platform/graphics/mac/WebLayer.mm:
Move most of the behavior of WebLayer onto WebSimpleLayer, except for its
complex painting code. That stays as an override on WebLayer.
(WebCore::drawLayerContents):
Use the PlatformCALayer's PlatformLayer - if it exists - to extract
fine-grained repaint rects. If it doesn't, we'll just use the CGContext's
clip rect as our single repaint rect.
Rename platformLayer to platformCALayer for accuracy.
Remove special code for CATiledLayer since we ought not use it on Mac anymore.
(WebCore::drawRepaintIndicator):
Factor repaint indicator code out into its own function so that TileController
can use it. It can't be called from drawLayerContents for TileController, since
the PlatformCALayer that TileController passes in to drawLayerContents is actually
that of the tile cache's root layer, not the tile itself.
Also, add a custom background color parameter so TileController can override
the default green color with its own standard purple.
(-[WebLayer drawInContext:]):
(-[WebSimpleLayer drawInContext:]):
* platform/graphics/mac/WebTiledLayer.mm:
(-[WebTiledLayer drawInContext:]):
Removed a param from drawLayerContents because it's trivially acquirable
from the PlatformCALayer.
2013-10-24 Sam Weinig <sam@webkit.org>
Move RenderBlock functions only used by RenderBlockFlow to RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=123318
Reviewed by David Hyatt.
* rendering/LineLayoutState.h:
Move FloatWithRect from RenderBlock.
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
Move pagination and float functions.
2013-10-28 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Add support for order inside grid items
https://bugs.webkit.org/show_bug.cgi?id=123208
Reviewed by Antti Koivisto.
Based on Blink r153457 and r153536 by <jchaffraix@chromium.org>
Added support for sorting grid items by using -webkit-order
property. Used OrderIterator to implement it so it had to be moved
out of RenderFlexibleBox to be shared with RenderGrid.
Tests: fast/css-grid-layout/grid-item-order-auto-flow-resolution.html
fast/css-grid-layout/grid-item-order-paint-order.html
* CMakeLists.txt: Added new file.
* GNUmakefile.list.am: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* rendering/OrderIterator.cpp: Added. Ripped out of RenderFlexibleBox.
(WebCore::OrderIterator::OrderIterator):
(WebCore::OrderIterator::setOrderValues): Use std::move semantics.
(WebCore::OrderIterator::first): Use an integer as iterator.
(WebCore::OrderIterator::next): Ditto.
(WebCore::OrderIterator::reset): Ditto.
* rendering/OrderIterator.h: Added.
(WebCore::OrderIterator::currentChild):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::RenderFlexibleBox):
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlexibleBox.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::RenderGrid):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::paintChildren):
* rendering/RenderGrid.h:
2013-10-28 Afonso R. Costa Jr. <afonso.costa@samsung.com>
Methods on window.internals shouldn't pass a document.
https://bugs.webkit.org/show_bug.cgi?id=107301
Reviewed by Alexey Proskuryakov.
Each 'Internals' instance is associated with a 'Document'. So, it
is not necessary to pass a document as argument. Only nodesFromRect and
layerTreeAsText methods were kept because, in some Layout Tests, the
'Document' object is not the same used by Internals::contextDocument.
* testing/Internals.cpp: Removed 'document' parameter.
(WebCore::Internals::animationsAreSuspended):
(WebCore::Internals::suspendAnimations):
(WebCore::Internals::resumeAnimations):
(WebCore::Internals::inspectorHighlightRects):
(WebCore::Internals::inspectorHighlightObject):
(WebCore::Internals::setScrollViewPosition):
(WebCore::Internals::setPagination):
(WebCore::Internals::configurationForViewport):
(WebCore::Internals::paintControlTints):
(WebCore::Internals::setDelegatesScrolling):
(WebCore::Internals::touchPositionAdjustedToBestClickableNode):
(WebCore::Internals::touchNodeAdjustedToBestClickableNode):
(WebCore::Internals::touchPositionAdjustedToBestContextMenuNode):
(WebCore::Internals::touchNodeAdjustedToBestContextMenuNode):
(WebCore::Internals::bestZoomableAreaForTouchPoint):
(WebCore::Internals::lastSpellCheckRequestSequence):
(WebCore::Internals::lastSpellCheckProcessedSequence):
(WebCore::Internals::wheelEventHandlerCount):
(WebCore::Internals::touchEventHandlerCount):
(WebCore::Internals::setBatteryStatus):
(WebCore::Internals::setNetworkInformation):
(WebCore::Internals::setDeviceProximity):
(WebCore::Internals::hasSpellingMarker):
(WebCore::Internals::hasAutocorrectedMarker):
(WebCore::Internals::isOverwriteModeEnabled):
(WebCore::Internals::toggleOverwriteModeEnabled):
(WebCore::Internals::consoleMessageArgumentCounts):
(WebCore::Internals::hasGrammarMarker):
(WebCore::Internals::numberOfScrollableAreas):
(WebCore::Internals::isPageBoxVisible):
(WebCore::Internals::repaintRectsAsText):
(WebCore::Internals::scrollingStateTreeAsText):
(WebCore::Internals::mainThreadScrollingReasons):
(WebCore::Internals::nonFastScrollableRects):
(WebCore::Internals::garbageCollectDocumentResources):
(WebCore::Internals::insertAuthorCSS):
(WebCore::Internals::insertUserCSS):
(WebCore::Internals::shortcutIconURLs):
(WebCore::Internals::allIconURLs):
(WebCore::Internals::setHeaderHeight):
(WebCore::Internals::setFooterHeight):
(WebCore::Internals::webkitWillEnterFullScreenForElement):
(WebCore::Internals::webkitDidEnterFullScreenForElement):
(WebCore::Internals::webkitWillExitFullScreenForElement):
(WebCore::Internals::webkitDidExitFullScreenForElement):
(WebCore::Internals::startTrackingRepaints):
(WebCore::Internals::stopTrackingRepaints):
(WebCore::Internals::getCurrentCursorInfo):
* testing/Internals.h:
(WebCore::Internals::setPagination):
* testing/Internals.idl:
2013-10-28 Xabier Rodriguez Calvar <calvaris@igalia.com>
Remove HTMLMediaElement.startTime
https://bugs.webkit.org/show_bug.cgi?id=123264
Reviewed by Eric Carlson.
Patch based on one by: philipj@opera.com
Blink review URL: https://codereview.chromium.org/32583003
startTime has been removed from the HTMLMediaElement and its use
in the rest of components.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleRewindButtonClicked):
(Controller.prototype.handleTimelineMouseMove):
(Controller.prototype.updateDuration):
(Controller.prototype.updateTime): Removed used of startTime().
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_media_element_get_start_time):
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols: Added phony function.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::isBlockedOnMediaController): Removed
use of startTime()
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl: Removed startTime()
* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::paintSliderThumb): Removed use of
startTime()
2013-10-28 Andreas Kling <akling@apple.com>
RenderElement::m_style should be a Ref.
<https://webkit.org/b/123401>
Made RenderElement::m_style a Ref. This codifies the fact that it
can never be null after construction.
Removed a couple of unnecessary null checks that were exposed as
compilation failures.
Reviewed by Antti Koivisto.
2013-10-28 Bastien Nocera <hadess@hadess.net>
Name all the GLib timeout sources
https://bugs.webkit.org/show_bug.cgi?id=123229
Reviewed by Anders Carlsson.
Give a name to GLib timeout sources, this is helpful when
profiling WebKitGTK applications.
No new tests, no change in functionality.
2013-10-28 Philippe Normand <pnormand@igalia.com>
MediaStreamTrackPrivate's m_client uninitialized
https://bugs.webkit.org/show_bug.cgi?id=123403
Reviewed by Eric Carlson.
No new tests, no change in functionality.
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
Initialize the m_client member variable.
2013-10-28 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.am: Add crypto idl files to EXTRA_DIST and remove
css/fullscreenQuickTime.css that was removed.
2013-10-28 Antti Koivisto <antti@apple.com>
Prepare simple line layout to support multiple runs per line
https://bugs.webkit.org/show_bug.cgi?id=123400
Reviewed by Andreas Kling.
Bunch of renaming and some refactoring for future support for text runs.
SimpleLineLayout::Lines -> SimpleLineLayout::Layout and becomes a class instead of a typedef.
SimpleLineLayout::Resolver::Line -> SimpleLineLayout::Resolver::Run
SimpleLineLayout::createLines() -> SimpleLineLayout::create()
RenderBlockFlow::simpleLines() -> RenderBlockFlow::simpleLineLayout()
RenderText::simpleLines() -> RenderText::simpleLineLayout()
Added resolver construction functions:
SimpleLineLayout::runResolver()
SimpleLineLayout::lineResolver()
2013-10-28 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Expose title and alternative text for links in image maps
https://bugs.webkit.org/show_bug.cgi?id=84045
Reviewed by Chris Fleizach.
Change the way we decide when the title attribute should be
used for the accessible description, by not relying in the
titleTagShouldBeUsedInDescriptionField() helper function but
in whether we have found a visible text for it or not.
This actually mimics what the Mac port does and so makes possible
to share both the layout test and its expected results.
* accessibility/atk/WebKitAccessibleUtil.cpp:
(accessibilityDescription): Update the method to determine
whether the title attribute should be used for the description.
2013-10-28 Bastien Nocera <hadess@hadess.net>
Replace 0 timeouts g_timeout_add() by g_idle_add()
https://bugs.webkit.org/show_bug.cgi?id=123260
Reviewed by Carlos Garcia Campos.
A zero timeout should be equivalent to using g_idle_add_full(G_PRIORITY_DEFAULT, ...)
without the nagging feeling that the wrong API was used.
No new tests, no change in functionality.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Use g_idle_add() instead
of 0-timer.
(WebCore::MediaPlayerPrivateGStreamer::videoChanged):
(WebCore::MediaPlayerPrivateGStreamer::audioChanged):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Ditto.
(WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
(WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
* platform/gtk/GtkDragAndDropHelper.cpp: Ditto.
(WebCore::GtkDragAndDropHelper::handleDragLeave):
2013-10-28 Zan Dobersek <zdobersek@igalia.com>
Re-enable simple line layout for GTK
https://bugs.webkit.org/show_bug.cgi?id=123388
Reviewed by Andreas Kling.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): 8-bit TextRun support is now enabled for the GTK port, so the port
can use the simple line layout.
2013-10-27 Andreas Kling <akling@apple.com>
Fix 4 asserting SVG tests after r158097.
RenderElement::setStyle() is, quite surprisingly, a virtual function
with a single override in RenderSVGBlock.
To match the old behavior, we have to rewrite the display type from
any inline type to block instead.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::initializeStyle):
2013-10-27 Andreas Kling <akling@apple.com>
Tone down overzealous assertion from r158097.
RenderElement::initializeStyle() really only cares that there are no
text renderers that we should be calling styleDidChange() on.
Tweak the code to only check that there are no text children.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::initializeStyle):
2013-10-27 Antti Koivisto <antti@apple.com>
Enable center and right text alignment for simple lines
https://bugs.webkit.org/show_bug.cgi?id=123398
Reviewed by Andreas Kling.
Support text-align:center and text-align:right on simple line layout path.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
text-align:justify is still not supported.
(WebCore::SimpleLineLayout::computeLineLeft):
(WebCore::SimpleLineLayout::createLines):
Do a rounding dance that matches the line boxes.
* rendering/SimpleLineLayout.h:
Add left position to lines.
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::Resolver::Line::rect):
We now do rounding during layout.
(WebCore::SimpleLineLayout::Resolver::Line::baseline):
2013-10-27 Andreas Kling <akling@apple.com>
Renderers should receive their style at construction.
<https://webkit.org/b/123396>
Pass the RenderStyle to all non-text renderer constructors.
After construction, initializeStyle() must be called (as a stopgap
measure) until we are able to do style-derived initialization
without virtual function calls.
With this change, RenderElement::m_style is never null. Subsequent
patches will add enforcement for this and also make style() return
a RenderStyle&.
I'm adding three FIXME's in this patch:
- createRendererIfNeeded() calls AnimationController to set up
the initial style manually instead of asking RenderElement's
setAnimatedStyle() to do it. This can probably be done in a
nicer way, but it's not clear yet how.
- ImageContentData::createRenderer() does a bit of unnecessary
work. This should be easy to clean up but got too distracting
to be part of this patch.
- Document::createRenderTree() creates the RenderView with an
initial dummy RenderStyle. I've done this because resolving
the document style assumes we already have a RenderView.
For styleWillChange() implementations to detect that they are
reacting to the initial style, I've added a hasInitializedStyle()
function on RenderElement. This will return false until you've
called initializeStyle() on the renderer. This should go away
along with initializeStyle() eventually.
Reviewed by Antti Koivisto.
2013-10-26 Tim Horton <timothy_horton@apple.com>
[mac] Remove WebTiledLayer
https://bugs.webkit.org/show_bug.cgi?id=123395
Reviewed by Anders Carlsson.
Mac doesn't use CATiledLayer at all anymore. We have to keep
LayerTypeTiledLayer around for Windows, for now, but we can
get rid of WebTiledLayer and some related Mac-specific code.
No new tests, just removing dead code.
* WebCore.xcodeproj/project.pbxproj:
Remove WebTiledLayer.*
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::PlatformCALayerMac):
Remove synchronouslyDisplayTilesInRect, which was only used for WebTiledLayer on Mac.
Remove WebTiledLayer instantiation and setup code.
* platform/graphics/mac/WebTiledLayer.h: Removed.
* platform/graphics/mac/WebTiledLayer.mm: Removed.
2013-10-26 Andreas Kling <akling@apple.com>
CTTE: RenderImageResourceStyleImage always has a StyleImage.
<https://webkit.org/b/123390>
Codify the fact that RenderImageResourceStyleImage always wraps an
existing StyleImage object.
Reviewed by Antti Koivisto.
2013-10-26 Antti Koivisto <antti@apple.com>
Revert some accidental changes.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* css/CSSFontSelector.cpp:
* css/CSSFontSelector.h:
2013-10-26 Mark Lam <mark.lam@apple.com>
Gardening: fixed broken build.
https://bugs.webkit.org/show_bug.cgi?id=123354.
* css/CSSFontSelector.h:
2013-10-26 Antti Koivisto <antti@apple.com>
fast/frames/seamless/seamless-nested-crash.html asserts on wk2 only
https://bugs.webkit.org/show_bug.cgi?id=123354
Reviewed by Andreas Kling.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
Don't enable simple line layout if the primary font is loading. The code expects
to use the primary font metrics for all lines but those won't match the fallbacks
when font is not loaded.
2013-10-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Deprecate public dispatch_event method in objects implementing EventTarget interface
https://bugs.webkit.org/show_bug.cgi?id=123261
Reviewed by Gustavo Noronha Silva.
The interface function should be used instead.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetFunctionDeprecationInformation): Helper function to return the
version when the function was deprecated and the function
replacing the deprecated one.
(GenerateFunction): Check if the function is deprecated to mark it
as such in the header and API docs.
* bindings/scripts/gobject-generate-headers.pl: Replace the unused
WEBKIT_OBSOLETE_API macro with new macros to mark function as
deprecated, using the glib macros so that we don't need checks for
the platform.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
* bindings/scripts/test/GObject/WebKitDOMTestException.h:
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/GObject/WebKitDOMattribute.h:
2013-10-25 Mark Lam <mark.lam@apple.com>
DatabaseManager's ProposedDatabases need to be thread-safe.
https://bugs.webkit.org/show_bug.cgi?id=123313.
Reviewed by Geoffrey Garen.
No new tests.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::DatabaseManager):
(WebCore::DatabaseManager::existingDatabaseContextFor):
(WebCore::DatabaseManager::registerDatabaseContext):
(WebCore::DatabaseManager::unregisterDatabaseContext):
(WebCore::DatabaseManager::didConstructDatabaseContext):
(WebCore::DatabaseManager::didDestructDatabaseContext):
(WebCore::DatabaseManager::openDatabaseBackend):
(WebCore::DatabaseManager::addProposedDatabase):
(WebCore::DatabaseManager::removeProposedDatabase):
(WebCore::DatabaseManager::fullPathForDatabase):
(WebCore::DatabaseManager::detailsForNameAndOrigin):
* Modules/webdatabase/DatabaseManager.h:
2013-10-25 Joseph Pecoraro <pecoraro@apple.com>
Upstream ENABLE(REMOTE_INSPECTOR) and enable on iOS and Mac
https://bugs.webkit.org/show_bug.cgi?id=123111
Reviewed by Timothy Hatcher.
* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
2013-10-25 Hans Muller <hmuller@adobe.com>
[CSS Shapes] CORS-enabled fetch for shape image values
https://bugs.webkit.org/show_bug.cgi?id=123114
Reviewed by Andreas Kling.
Access to shape images is now controlled by CORS CSS shape per
http://dev.w3.org/csswg/css-shapes/#shape-outside-property.
Previously shape images had to be same-origin.
Shape image URL access is defined by the same logic that defines
canvas tainting: same-origin and data URLs are allowed and images
with a "Access-Control-Allow-Origin:" header that's either "*" or
that matches the document's origin.
A PotentiallyCrossOriginEnabled RequestOriginPolicy was added to
ResourceLoaderOptions, to indicate that a "potentially CORS-enabled fetch"
was to be undertaken. The CSSImageValue::cachedImage() method handles this
option by effectively setting the "Origin:" request header (see
updateRequestForAccessControl() in CrossOriginAccessControl.cpp).
StyleResolver::loadPendingShapeImage() uses the new ResourceLoaderOption.
The static ShapeInsideInfo and ShapeOutsideInfo isEnabledFor() method
now performs the CORS check for image valued shapes. The private
isOriginClean() method from CanvasRenderingContext2D has been moved to
the CachedImage class so that it can be shared by the Canvas and Shape
implementations. It checks the response headers per the CORS spec.
Test: http/tests/security/shape-image-cors.html
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage): Handle the new ResourceLoaderOption.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShapeImage): Set the new ResourceLoaderOption.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createPattern): Use the CachedImage::isOriginClean().
* loader/ResourceLoaderOptions.h: Added PotentiallyCrossOriginEnabled to RequestOriginPolicy.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::isOriginClean): Migrated from CanvasRenderingContext2D.
* loader/cache/CachedImage.h:
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::checkImageOrigin): Do the CORS check and log an error message if neccessary.
* rendering/shapes/ShapeInfo.h:
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::isEnabledFor): Call checkImageOrigin() for images.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::isEnabledFor): Ditto.
2013-10-25 Jer Noble <jer.noble@apple.com>
[MSE] Fix runtime errors caused by mediasource IDL attributes.
https://bugs.webkit.org/show_bug.cgi?id=123352
Reviewed by Eric Carlson.
Due to http://webkit.org/b/123178, MediaSource classes must add a GenerateIsReachable
(and also a JSGenerateToJSObject) attribute to avoid runtime asserts and crashes.
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediasource/WebKitMediaSource.idl:
* Modules/mediasource/WebKitSourceBufferList.idl:
2013-10-25 Jacky Jiang <zhajiang@blackberry.com>
[BlackBerry] Browser crashed at PlatformGraphicsContext::addDrawLineForText() when trying to upload a video to youtube
https://bugs.webkit.org/show_bug.cgi?id=123349
Reviewed by George Staikos.
Internally reviewed by George Staikos, Konrad Piascik, Eli Fidler and Arvid Nilsson.
Browser crashed when dereferencing null PlatformGraphicsContext*.
In FrameView::paintControlTints(), we intentionally constructed GraphicsContext
with null PlatformGraphicsContext* and disabled painting by doing
context.setUpdatingControlTints(true). So we should not go further in
GraphicsContext::drawLineForText() if painting is disabled.
Check paintingDisabled() for the other functions in PathBlackBerry.cpp
as well; otherwise, it is likely we will crash at those places.
* platform/graphics/blackberry/PathBlackBerry.cpp:
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawLineForDocumentMarker):
(WebCore::GraphicsContext::drawLineForText):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::canvasClip):
(WebCore::GraphicsContext::clipOut):
2013-10-25 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Adding platform implementation of MediaStreamTrack
https://bugs.webkit.org/show_bug.cgi?id=123301
Reviewed by Eric Carlson.
No new tests needed.
* CMakeLists.txt:
* Modules/mediastream/AudioStreamTrack.cpp:
(WebCore::AudioStreamTrack::create): Create method now receives a MediaStreamTrackPrivate as parameter.
(WebCore::AudioStreamTrack::AudioStreamTrack):
* Modules/mediastream/AudioStreamTrack.h:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream): Constructor now iterates through a set of MediaStreamTrackPrivate
instances to create each MediaStreamTrack of MediaStream.
(WebCore::MediaStream::addRemoteSource): Calling AudioStreamTrack and VideoStreamTrack with
MediaStreamTrackPrivate as parameter.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack): Constructor now receives a MediaStreamTrackPrivate, instead of a
MediaStreamSource.
(WebCore::MediaStreamTrack::~MediaStreamTrack):
(WebCore::MediaStreamTrack::kind): Calling method from MediaStreamTrackPrivate.
(WebCore::MediaStreamTrack::setSource): Ditto.
(WebCore::MediaStreamTrack::id): Ditto.
(WebCore::MediaStreamTrack::label): Ditto.
(WebCore::MediaStreamTrack::enabled): Ditto.
(WebCore::MediaStreamTrack::setEnabled): Ditto.
(WebCore::MediaStreamTrack::muted): Ditto.
(WebCore::MediaStreamTrack::readonly): Ditto.
(WebCore::MediaStreamTrack::remote): Ditto.
(WebCore::MediaStreamTrack::readyState): Ditto.
(WebCore::MediaStreamTrack::states):
(WebCore::MediaStreamTrack::capabilities):
(WebCore::MediaStreamTrack::clone):
(WebCore::MediaStreamTrack::stopProducingData):
(WebCore::MediaStreamTrack::ended): Ditto.
(WebCore::MediaStreamTrack::sourceStateChanged): Ditto.
(WebCore::MediaStreamTrack::sourceMutedChanged): Ditto.
(WebCore::MediaStreamTrack::sourceEnabledChanged): Ditto.
(WebCore::MediaStreamTrack::configureTrackRendering):
(WebCore::MediaStreamTrack::stopped): Ditto.
(WebCore::MediaStreamTrack::trackDidEnd): Setting Ended ready state in MediaStreamTrackPrivate.
(WebCore::MediaStreamTrack::trackReadyStateChanged): Dispatches Live or Ended event.
(WebCore::MediaStreamTrack::trackMutedChanged): Dispatches Muted event.
* Modules/mediastream/MediaStreamTrack.h: Now inheriting from MediaStreamTrackPrivateClient.
(WebCore::MediaStreamTrack::source): Calling method from MediaStreamTrackPrivate.
(WebCore::MediaStreamTrack::privateTrack):
* Modules/mediastream/VideoStreamTrack.cpp:
(WebCore::VideoStreamTrack::create):
(WebCore::VideoStreamTrack::VideoStreamTrack): Create method now receives a MediaStreamTrackPrivate as parameter.
* Modules/mediastream/VideoStreamTrack.h:
* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Stores the private tracks in a Vector (property of
MediaStreamDescriptor class).
(WebCore::MediaStreamDescriptor::addTrack): Adds a private track to the tracks' Vector
(WebCore::MediaStreamDescriptor::removeTrack): Removes a private track from the tracks' Vector
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::numberOfAudioSources): Renamed from numberOfAudioStreams.
(WebCore::MediaStreamDescriptor::audioSources): Renamed from audioStreams.
(WebCore::MediaStreamDescriptor::numberOfVideoSources): Renamed from numberOfVideoStreams.
(WebCore::MediaStreamDescriptor::videoSources): Renamed from videoStreams.
(WebCore::MediaStreamDescriptor::numberOfAudioTracks): Returns the number of audio tracks this MediaStreamDescriptor
has.
(WebCore::MediaStreamDescriptor::audioTracks): Returns a audio track, given an index
(WebCore::MediaStreamDescriptor::numberOfVideoTracks): Returns the number of video tracks this MediaStreamDescriptor
has.
(WebCore::MediaStreamDescriptor::videoTracks): Returns a video track, given an index
* platform/mediastream/MediaStreamTrackPrivate.cpp: Added.
* platform/mediastream/MediaStreamTrackPrivate.h: Added.
2013-10-25 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with multiple regions
<https://webkit.org/b/123210>
Reviewed by David Hyatt.
I simplified the determination of the next region part of updateShapeAndSegmentsForCurrentLineInFlowThread's implementation
in order to make the code more straightforward. I also tried to avoid using regionAtBlockOffset(...) function where it's possible,
since it's not always that reliable, what I'll will report in a separate bug.
No new tests, covered by existing tests.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
2013-10-25 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with the first lines
<https://bugs.webkit.org/show_bug.cgi?id=123275>
Reviewed by David Hyatt.
We have a complex condition in updateShapeAndSegmentsForCurrentLineInFlowThread, which is
adjusting the first line to the shape's top. This patch adds two boolean to make that clear.
No new tests, no behavior change.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
2013-10-25 Antti Koivisto <antti@apple.com>
Faster way for simple line layout to check if text has fallback fonts
https://bugs.webkit.org/show_bug.cgi?id=123342
Reviewed by Andreas Kling.
Don't use RenderText::knownToHaveNoOverflowAndNoFallbackFonts as it is slow.
Simple text code path test already guarantees there is no overflow. Test for fallback
fonts explicitly.
* platform/graphics/SimpleFontData.h:
Make FINAL.
* rendering/RenderText.cpp:
* rendering/RenderText.h:
Remove knownToHaveNoOverflowAndNoFallbackFonts() as it has no clients.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
Check if all characters can be found from the primary font.
2013-10-25 Andreas Kling <akling@apple.com>
SVGResourcesCache::clientDestroyed() should take a RenderElement&.
<https://webkit.org/b/123339>
This function is always called with an object, and that object
is guaranteed to never be a text renderer.
Reviewed by Antti Koivisto.
2013-10-25 Andreas Kling <akling@apple.com>
SVGResourcesCache::clientLayoutChanged() should take a RenderElement&.
<https://webkit.org/b/123336>
This function is always called with an object, and that object
is guaranteed to never be a text renderer.
Reviewed by Antti Koivisto.
2013-10-25 Andreas Kling <akling@apple.com>
SVGResourcesCache::clientStyleChanged() should take a RenderElement&.
<https://webkit.org/b/123335>
This function is always called with an object, and that object
is guaranteed to never be a text renderer.
Reviewed by Antti Koivisto.
2013-10-25 Andreas Kling <akling@apple.com>
SVG: postApplyResource() should take a RenderElement&.
<https://webkit.org/b/123334>
This function is always called with an object, and that object
is guaranteed to never be a text renderer.
Reviewed by Antti Koivisto.
2013-10-25 Antti Koivisto <antti@apple.com>
REGRESSION(r157950): It made many tests assert on Windows, EFL, GTK
https://bugs.webkit.org/show_bug.cgi?id=123309
Reviewed by Andreas Kling.
Disable simple line layout on non-Mac plaforms for now.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2013-10-24 Andreas Kling <akling@apple.com>
SVG: applyResource() should take a RenderElement&.
<https://webkit.org/b/123286>
This function is always called with an object, and that object
is guaranteed to never be a text renderer.
Reviewed by Antti Koivisto.
2013-10-25 Andreas Kling <akling@apple.com>
RenderElement::styleWillChange() should pass newStyle as reference.
<https://webkit.org/b/123332>
When styleWillChange() is called, there is always a new style getting
set so there's no need to handle the null style case.
This flushed out a couple of unnecessary checks.
Reviewed by Antti Koivisto.
2013-10-25 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile fixes.
https://bugs.webkit.org/show_bug.cgi?id=123269
Reviewed by Csaba Osztrogonác.
* platform/graphics/win/ImageCairoWin.cpp: Added new parameter to BitmapImage::draw() calls.
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
2013-10-25 Sergio Villar Senin <svillar@igalia.com>
Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox
https://bugs.webkit.org/show_bug.cgi?id=118620
Reviewed by Antti Koivisto.
Turns out that order is extremelly uncommon so using a Vector is
much less expensive. This also special-cases the much common case
of only having order of value 0 by using Vectors with just one
preallocated member.
Also added the performance test that shows a ~1% win when using a
vector instead of the HashSet.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
* rendering/RenderFlexibleBox.h:
2013-10-25 Sergio Villar Senin <svillar@igalia.com>
Non-SVG build broken after r157950
https://bugs.webkit.org/show_bug.cgi?id=123328
Reviewed by Xan Lopez.
The isSVGInlineTest() check should be done only if SVG is enabled.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2013-10-24 Jer Noble <jer.noble@apple.com>
[Mac] Add helper methods to convert CMTime <--> MediaTime
https://bugs.webkit.org/show_bug.cgi?id=123285
Reviewed by Eric Carlson.
Add utility methods to convert between CMTime (a rational time class) and MediaTime.
Once there, PlatformClockCM can now vend and accept MediaTimes for currentTime.
* platform/mac/MediaTimeMac.h:
* platform/mac/MediaTimeMac.cpp:
(WebCore::toMediaTime): Added conversion utility method.
(WebCore::toCMTime): Ditto.
* platform/mac/PlatformClockCM.h:
* platform/mac/PlatformClockCM.mm:
(PlatformClockCM::setCurrentMediaTime): Added.
(PlatformClockCM::currentMediaTime): Added.
* WebCore.xcodeproj/project.pbxproj: Add new files to project.
2013-10-24 Mark Rowe <mrowe@apple.com>
Remove references to OS X 10.7 from Xcode configuration settings.
Now that we're not building for OS X 10.7 they're no longer needed.
Reviewed by Anders Carlsson.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
2013-10-24 Antti Koivisto <antti@apple.com>
Cache line layout path
https://bugs.webkit.org/show_bug.cgi?id=123298
Reviewed by Sam Weinig.
Determining the path can be non-trivial. Avoid computing it repeatedly on relayouts.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
(WebCore::RenderBlock::invalidateLineLayoutPath):
(WebCore::RenderBlock::removeChild):
Invalidate the path when children change.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::styleDidChange):
Invalidate the path when style changes.
(WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
(WebCore::RenderBlockFlow::ensureLineBoxes):
* rendering/RenderText.cpp:
(WebCore::RenderText::setText):
Invalidate the path when text changes.
2013-10-24 Mark Rowe <mrowe@apple.com>
<rdar://problem/15312643> Prepare for the mysterious future.
Reviewed by David Kilzer.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
2013-10-24 Andreas Kling <akling@apple.com>
DocumentLoader::cachedResourceLoader() should return a reference.
<https://webkit.org/b/123303>
..and while we're at it, make DocumentLoader::m_cachedResourceLoader
a Ref, and have CachedResourceLoader::create return a PassRef.
Reviewed by Sam Weinig.
2013-10-24 Anders Carlsson <andersca@apple.com>
Stop bringing in the std namespace
https://bugs.webkit.org/show_bug.cgi?id=123273
Reviewed by Andreas Kling.
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::renderFromBuffer):
(WebCore::AudioBufferSourceNode::startGrain):
(WebCore::AudioBufferSourceNode::totalPitchRate):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::numberOfChannels):
* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
(WebCore::AudioScheduledSourceNode::stop):
* Modules/webaudio/AudioSummingJunction.cpp:
* Modules/webaudio/DelayDSPKernel.cpp:
(WebCore::DelayDSPKernel::process):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::offlineRender):
* Modules/webaudio/OscillatorNode.cpp:
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::dopplerRate):
* Modules/webaudio/WaveShaperDSPKernel.cpp:
(WebCore::WaveShaperDSPKernel::processCurve):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
* Modules/websockets/WebSocket.cpp:
(WebCore::saturateAdd):
* Modules/websockets/WebSocketChannel.cpp:
* Modules/websockets/WebSocketFrame.cpp:
(WebCore::WebSocketFrame::parseFrame):
* accessibility/AccessibilityARIAGrid.cpp:
* accessibility/AccessibilityARIAGridCell.cpp:
* accessibility/AccessibilityARIAGridRow.cpp:
* accessibility/AccessibilityList.cpp:
* accessibility/AccessibilityListBox.cpp:
* accessibility/AccessibilityListBoxOption.cpp:
* accessibility/AccessibilityNodeObject.cpp:
* accessibility/AccessibilityObject.cpp:
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
* accessibility/AccessibilityTableCell.cpp:
* accessibility/AccessibilityTableColumn.cpp:
* accessibility/AccessibilityTableHeaderContainer.cpp:
* accessibility/AccessibilityTableRow.cpp:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
* bindings/js/JSGeolocationCustom.cpp:
(WebCore::setTimeout):
(WebCore::setMaximumAge):
* bindings/js/ScriptController.cpp:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::writeLittleEndian):
(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::readString):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::getFontFace):
* css/CSSGradientValue.cpp:
(WebCore::CSSRadialGradientValue::createGradient):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseColorParameters):
(WebCore::CSSParser::parseHSLParameters):
* css/CSSReflectValue.cpp:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontSize::applyValue):
* css/PropertySetCSSStyleDeclaration.cpp:
* css/SVGCSSParser.cpp:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::viewportPercentageValue):
* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
* dom/ContainerNode.cpp:
* dom/Document.cpp:
(WebCore::Document::minimumLayoutDelay):
* dom/Node.cpp:
(WebCore::Node::compareDocumentPosition):
* dom/Range.cpp:
(WebCore::Range::toString):
(WebCore::Range::textRects):
(WebCore::Range::textQuads):
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::scheduleAnimation):
* dom/StyledElement.cpp:
(WebCore::StyledElement::makePresentationAttributeCacheKey):
* dom/Text.cpp:
* dom/ViewportArguments.cpp:
(WebCore::clampLengthValue):
(WebCore::clampScaleValue):
(WebCore::ViewportArguments::resolve):
(WebCore::computeMinimumScaleFactorForContentContained):
(WebCore::restrictMinimumScaleFactorToViewportSize):
* editing/AlternativeTextController.cpp:
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::deleteInsignificantText):
* editing/Editor.cpp:
(WebCore::Editor::setComposition):
(WebCore::Editor::compositionRange):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):
(WebCore::TextIterator::handleTextBox):
(WebCore::CharacterIterator::string):
(WebCore::SearchBuffer::SearchBuffer):
(WebCore::SearchBuffer::append):
(WebCore::SearchBuffer::prependContext):
(WebCore::SearchBuffer::search):
* editing/VisibleUnits.cpp:
(WebCore::startOfParagraph):
* editing/htmlediting.cpp:
* editing/markup.cpp:
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::didReceiveResponse):
(WebCore::FileReaderLoader::didReceiveData):
* history/BackForwardList.cpp:
(WebCore::BackForwardList::backListWithLimit):
(WebCore::BackForwardList::forwardListWithLimit):
* history/PageCache.cpp:
(WebCore::PageCache::setCapacity):
* html/BaseDateAndTimeInputType.cpp:
* html/FTPDirectoryDocument.cpp:
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::getRegion):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):
(WebCore::parseColorStringWithCrazyLegacyRules):
* html/HTMLFormControlElement.cpp:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getTextFieldValues):
* html/HTMLImageElement.cpp:
* html/HTMLInputElement.cpp:
* html/HTMLMapElement.cpp:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::textTrackAddCue):
(WebCore::HTMLMediaElement::textTrackRemoveCue):
(WebCore::HTMLMediaElement::rewind):
(WebCore::HTMLMediaElement::seek):
(WebCore::HTMLMediaElement::duration):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::updateListBoxSelection):
* html/HTMLSourceElement.cpp:
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::colSpan):
(WebCore::HTMLTableCellElement::rowSpan):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::parseAttribute):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionStart):
(WebCore::HTMLTextFormControlElement::setSelectionEnd):
(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
* html/HTMLTrackElement.cpp:
* html/ImageDocument.cpp:
(WebCore::ImageDocument::scale):
* html/InputType.cpp:
(WebCore::InputType::valueAsDouble):
* html/MediaController.cpp:
(MediaController::duration):
(MediaController::currentTime):
(MediaController::setCurrentTime):
(MediaController::updateReadyState):
* html/NumberInputType.cpp:
(WebCore::NumberInputType::setValueAsDouble):
(WebCore::NumberInputType::setValueAsDecimal):
(WebCore::NumberInputType::createStepRange):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleKeydownEvent):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::startSearchEventTimer):
* html/StepRange.cpp:
(WebCore::StepRange::clampValue):
(WebCore::StepRange::parseStep):
* html/TimeRanges.cpp:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessageDOMAndStartTimer):
(WebCore::adjustBubblePosition):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::normalizeRect):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateIndexArrayConservative):
(WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlRewindButtonElement::defaultEventHandler):
* html/shadow/MediaControlsApple.cpp:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* inspector/ContentSearchUtils.cpp:
* inspector/DOMEditor.cpp:
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::diff):
* inspector/InjectedScriptHost.cpp:
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::incrementProgress):
* loader/cache/CachedImage.cpp:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::adjustWindowRect):
* page/EventHandler.cpp:
(WebCore::MaximumDurationTracker::~MaximumDurationTracker):
* page/FrameTree.cpp:
* page/FrameView.cpp:
(WebCore::FrameView::adjustedDeferredRepaintDelay):
(WebCore::FrameView::autoSizeIfEnabled):
* page/PrintContext.cpp:
(WebCore::PrintContext::computeAutomaticScaleFactor):
* page/SpatialNavigation.cpp:
(WebCore::entryAndExitPointsForDirection):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFilterOperations):
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
* platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::FloatRect):
(WebCore::FloatRect::intersect):
(WebCore::FloatRect::uniteEvenIfEmpty):
(WebCore::FloatRect::extend):
(WebCore::FloatRect::fitToPoints):
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::initializePage):
(WebCore::GlyphPageTreeNode::getChild):
* platform/graphics/IntRect.cpp:
(WebCore::IntRect::intersect):
(WebCore::IntRect::unite):
(WebCore::IntRect::uniteIfNonZero):
* platform/graphics/LayoutRect.cpp:
(WebCore::LayoutRect::intersect):
(WebCore::LayoutRect::unite):
(WebCore::LayoutRect::uniteIfNonZero):
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplyGeneric):
(WebCore::FEMorphology::platformApplySoftware):
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
* platform/text/TextCodecICU.cpp:
* rendering/LineWidth.cpp:
(WebCore::LineWidth::fitBelowFloats):
(WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLine):
(WebCore::RenderBlock::availableLogicalWidthForContent):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::computePreferredLogicalWidths):
(WebCore::RenderFieldset::layoutSpecialExcludedChild):
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layOutAxis):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTableCell.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::selectionHeight):
(WebCore::RootInlineBox::selectionHeightAdjustedForPrecedingBlock):
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layout):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::layout):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::imageSize):
* style/StyleFontSizeFunctions.cpp:
(WebCore::Style::fontSizeForKeyword):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::setCurrentTime):
2013-10-24 Andreas Kling <akling@apple.com>
Uncomplicate some of SVGTextRunRenderingContext.
<https://webkit.org/b/123294>
This class was weird about a few things, so I've taken these steps
to clear things up:
- FINAL and OVERRIDE all the things.
- Constructor now takes a RenderObject&.
- renderer() now returns a RenderObject&.
- drawSVGGlyphs() no longer takes a TextRun.
- glyphDataForCharacter() no longer takes a TextRun.
To expand on the last two, there was also some awkward hoop-jumping
where we'd go through the TextRun passed by argument to find its
rendering context, which was really just |this| all along.
Reviewed by Antti Koivisto.
2013-10-24 Roger Fong <roger_fong@apple.com>
Add texture level dependent size checks to textureImage2D calls.
https://bugs.webkit.org/show_bug.cgi?id=123290
<rdar://problem/15201382>
Reviewed by Dean Jackson
Test covered by WebGL Conformance suite 1.0.2 test, textures/texture-size-limit.html.
There are different size limits when calling textureImage2D on different texture levels.
We should be throwing an error if our texture size exceeds these limits.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateTexFuncParameters):
2013-10-24 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[MediaStream API] allow a stream source to be shared
https://bugs.webkit.org/show_bug.cgi?id=121954
Reviewed by Eric Carlson.
Now, the MediaStreamSource don't know about the MediaStream that owns it,
since there can be more than one MediaStream that has it as source for some track.
MediaStreamTrack classes now have observers registered, in case there are more than
one MediaStream owning that track
No new tests, no change in functionality.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream): Adding the MediaStream as an observer for each track it owns.
(WebCore::MediaStream::addTrack): Now adding the MediaStream as an observer the new added track
and adding the source to the MediaStreamDescriptor.
(WebCore::MediaStream::removeTrack): Instead of removing the source right away, we first check if
there isn't any other track using that source, if not we remove the source.
(WebCore::MediaStream::haveTrackWithSource):
(WebCore::MediaStream::addRemoteSource): MediaStreamSource has no information about the MediaStream
that uses it, so now we don't set the stream in the source anymore.
(WebCore::MediaStream::removeRemoteSource): There can be more than on track using the source. So we
get each track that is using the source and then remove it and fire the ended event.
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::addObserver):
(WebCore::MediaStreamTrack::removeObserver):
(WebCore::MediaStreamTrack::trackDidEnd): Does not get the client from the MediaStreamDescriptor, it now
notify each of its observers that the track ended.
* Modules/mediastream/MediaStreamTrack.h: Adding Observer class.
* platform/mediastream/MediaStreamDescriptor.cpp: Destructor now does nothing. Previously it was setting
each MediaStreamSource's descriptor to null.
(WebCore::MediaStreamDescriptor::removeSource): Not setting the stream in source anymore.
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto.
(WebCore::MediaStreamDescriptor::setEnded): Not setting the state of the source to Ended
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::~MediaStreamDescriptor):
* platform/mediastream/MediaStreamSource.cpp: Removing references to MediaStream object
(WebCore::MediaStreamSource::MediaStreamSource):
(WebCore::MediaStreamSource::reset):
* platform/mediastream/MediaStreamSource.h:
2013-10-24 Daniel Bates <dabates@apple.com>
Crash in WebCore::NavigationScheduler::startTimer()
https://bugs.webkit.org/show_bug.cgi?id=123288
<rdar://problem/14055644>
Reviewed by Alexey Proskuryakov.
Currently NavigationScheduler::startTimer() synchronously notifies the client
before the Web Inspector of a scheduled redirect. If a client cancels this
redirect then NavigationScheduler::m_redirect will become null and we'll
subsequently crash when informing the Web Inspector of this formerly scheduled
redirect. Instead, NavigationScheduler::startTimer() should notify the Web
Inspector before it notifies the client of a scheduled redirect.
As a side benefit of this change, the Web Inspector is notified of a scheduled
redirect before being notified of it being canceled when a client chooses to cancel
a scheduled redirect.
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::startTimer):
2013-10-24 Antti Koivisto <antti@apple.com>
Try to fix build without CSS_SHAPES.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2013-10-24 Antti Koivisto <antti@apple.com>
Simple line layout
https://bugs.webkit.org/show_bug.cgi?id=122458
Reviewed by Darin Adler.
Line box based inline layout is powerful but also rather slow and memory intensive. Simple line layout
is a compact alternative data structure and fast code path to cover common cases without requiring line
boxes.
This patch handles a case single left-aligned text renderer inside flow with no floats. Even this very basic
case is sufficiently common to handle up to 25% of all text lines on some popular new sites. The decision
which path to use is made per block flow (paragraph).
Simple line layout aims to produce pixel-exact rendering result when compared to the line box layout.
The goal is to handle everything that requires line level access in cases that allow use of simple lines.
This is not quite the case yet. For example selections and outline painting are not supported. In these
cases we seamlessly switch to the line boxes.
The simple line data structure currently uses 12 bytes per line. Lineboxes take ~160 bytes minimum per line.
Laying out the lines is also several times faster as is iterating over them.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Position.cpp:
(WebCore::Position::upstream):
(WebCore::Position::downstream):
(WebCore::Position::getInlineBoxAndOffset):
Creating positions within a simple line flow causes switch to line boxes.
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):
TextIterator traverses line boxes if available. In case simple line case we need to replicate the
same results (for compatibility but especially to avoid changing test results). This is done here
by just traversing the string without actually using the layout.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::layoutShapeInsideInfo):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
Select the layout path to use.
(WebCore::RenderBlockFlow::deleteLines):
(WebCore::RenderBlockFlow::hitTestInlineChildren):
(WebCore::RenderBlockFlow::adjustForBorderFit):
(WebCore::RenderBlockFlow::firstLineBaseline):
(WebCore::RenderBlockFlow::inlineBlockBaseline):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::clearTruncation):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
(WebCore::RenderBlockFlow::paintInlineChildren):
(WebCore::RenderBlockFlow::hasLines):
(WebCore::RenderBlockFlow::layoutSimpleLines):
Do simple layout.
(WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
(WebCore::RenderBlockFlow::ensureLineBoxes):
This function switches from simple lines to line boxes. The switching can be done outside normal layout.
This is used to cover some cases that are not yet supported by simple lines (like selections).
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::simpleLines):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutLineBoxes):
Rename the line box layout function.
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
* rendering/RenderText.cpp:
(WebCore::RenderText::deleteLineBoxesBeforeSimpleLineLayout):
(WebCore::RenderText::absoluteRects):
(WebCore::RenderText::absoluteRectsForRange):
(WebCore::RenderText::absoluteQuadsClippedToEllipsis):
(WebCore::RenderText::absoluteQuads):
(WebCore::RenderText::absoluteQuadsForRange):
(WebCore::RenderText::positionForPoint):
(WebCore::RenderText::knownToHaveNoOverflowAndNoFallbackFonts):
(WebCore::RenderText::setSelectionState):
(WebCore::RenderText::setTextWithOffset):
(WebCore::RenderText::ensureLineBoxes):
(WebCore::RenderText::simpleLines):
(WebCore::RenderText::linesBoundingBox):
(WebCore::RenderText::linesVisualOverflowBoundingBox):
(WebCore::RenderText::selectionRectForRepaint):
(WebCore::RenderText::caretMinOffset):
(WebCore::RenderText::caretMaxOffset):
(WebCore::RenderText::countRenderedCharacterOffsetsUntil):
(WebCore::RenderText::containsRenderedCharacterOffset):
(WebCore::RenderText::containsCaretOffset):
(WebCore::RenderText::hasRenderedText):
* rendering/RenderText.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::writeSimpleLine):
(WebCore::write):
* rendering/SimpleLineLayout.cpp: Added.
(WebCore::SimpleLineLayout::canUseFor):
This check for the cases supported by the simple line layout path.
(WebCore::SimpleLineLayout::isWhitespace):
(WebCore::SimpleLineLayout::skipWhitespaces):
(WebCore::SimpleLineLayout::textWidth):
(WebCore::SimpleLineLayout::createLines):
The main layout functions that breaks text to lines. It only handles the cases allowed by
SimpleLineLayout::canUseFor. What it handles it aims to break exactly as line box layout does.
* rendering/SimpleLineLayout.h: Added.
* rendering/SimpleLineLayoutFunctions.cpp: Added.
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::hitTestFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):
(WebCore::SimpleLineLayout::computeTextBoundingBox):
* rendering/SimpleLineLayoutFunctions.h: Added.
(WebCore::SimpleLineLayout::computeFlowHeight):
(WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
(WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
(WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
(WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
(WebCore::SimpleLineLayout::containsTextCaretOffset):
(WebCore::SimpleLineLayout::isTextRendered):
(WebCore::SimpleLineLayout::lineHeightFromFlow):
Support functions called from RenderBlockFlow and RenderText. They are equivalent to
similar line box functions.
(WebCore::SimpleLineLayout::baselineFromFlow):
* rendering/SimpleLineLayoutResolver.h: Added.
(WebCore::SimpleLineLayout::Resolver::Line::Line):
(WebCore::SimpleLineLayout::Resolver::Line::rect):
(WebCore::SimpleLineLayout::Resolver::Line::baseline):
(WebCore::SimpleLineLayout::Resolver::Line::text):
(WebCore::SimpleLineLayout::Resolver::Iterator::Iterator):
(WebCore::SimpleLineLayout::Resolver::Iterator::operator++):
(WebCore::SimpleLineLayout::Resolver::Iterator::operator--):
(WebCore::SimpleLineLayout::Resolver::Iterator::operator==):
(WebCore::SimpleLineLayout::Resolver::Iterator::operator!=):
(WebCore::SimpleLineLayout::Resolver::Iterator::operator*):
Lazy iterator for deriving line metrics. This keeps the line data structure small as
we don't need to keep easily derived values around.
(WebCore::SimpleLineLayout::Resolver::Resolver):
(WebCore::SimpleLineLayout::Resolver::size):
(WebCore::SimpleLineLayout::Resolver::begin):
(WebCore::SimpleLineLayout::Resolver::end):
(WebCore::SimpleLineLayout::Resolver::last):
(WebCore::SimpleLineLayout::Resolver::operator[]):
2013-10-24 Myles C. Maxfield <mmaxfield@apple.com>
Gaps between underlines in adjacent underlined text runs
https://bugs.webkit.org/show_bug.cgi?id=123236
Reviewed by Simon Fraser and Darin Adler.
There are two pieces to this change. The first piece is in
InlineTextBox::paint(). We were putting floating-point
extents into a LayoutSize, which simply uses ints (for now),
and then immediately converting this back to a FloatSize.
Instead, we should be using floats throughout all of
this code.
In addition, inside GraphicsContext::drawLineForText(), we are
rounding the underline to pixel boundaries so that it appears
very crisp on the screen. However, we should round once after
performing computations, rather than rounding twice and then
performing computations on the rounded numbers.
Test: fast/css3-text/css3-text-decoration/no-gap-between-two-rounded-textboxes.html
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLineForText): Change rounding mode
to perform computations before rounding
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Don't convert to a LayoutSize
just to convert to a FloatSize
2013-10-24 Andreas Kling <akling@apple.com>
SVGRenderingContext should wrap a RenderElement.
<https://webkit.org/b/123283>
The SVG rendering context class is never used with text renderers
so we can have it wrap a RenderElement for tighter code.
Also renamed SVGRenderingContext::m_object to m_renderer.
Reviewed by Antti Koivisto.
2013-10-24 Santosh Mahto <santosh.ma@samsung.com>
[contenteditable] Content after non-editable element disappears when merging lines using backspace
https://bugs.webkit.org/show_bug.cgi?id=122748
Reviewed by Ryosuke Niwa.
In case of paragraph merging after deletion if second paragraph
contains non-editable element, then content after the non-editable
element(including non-editable element) will be removed while the
content before the element will be merged with the first paragraph.
This happens becasue endOfParagraphToMove calculation in merging function
stop at editing boundary so endOfParagraphToMove becomes position just
before non-editable content.
With this patch now endOfParagraphToMove is calculated by skipping
over the non-editable element.
Test: editing/deleting/merge-paragraph-contatining-noneditable.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::mergeParagraphs): use CanSkipOverEditingBoundary
condition while calculating endOfParagraphToMove.
2013-10-24 Antoine Quint <graouts@apple.com>
Web Inspector: Inspector doesn't show webkitTransitionEnd events in the timeline
https://bugs.webkit.org/show_bug.cgi?id=123263
Reviewed by Timothy Hatcher.
A legacy event type is only set on an event in EventTarget::fireEventListeners(Event*)
which is called after we used to call InspectorInstrumentation::willDispatchEvent(), the method
that would ultimately yield the creation of a TimelineRecord for the event in the Web Inspector
frontend, and as a result we would try to dispatch an event with an unprefixed event type to
the frontend, which wouldn't even happen because most likely it wouldn't have listeners for this
unprefixed type.
We now move the call to InspectorInstrumentation::willDispatchEvent() in
EventTarget::fireEventListeners(Event*, EventTargetData*, EventListenerVector&) such that the
correct event type and list of listeners is used to determine what event to dispatch to the frontend.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
Remove calls to InspectorInstrumentation::willDispatchEvent() and InspectorInstrumentation::didDispatchEvent().
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
Add call to InspectorInstrumentation::willDispatchEvent() before we go through each listener and
call InspectorInstrumentation::willHandleEvent(). Additionally, we refactor some code since we're
getting references to the ScriptExecutionContext and Document upfront now.
2013-10-24 Andreas Kling <akling@apple.com>
SVG: RenderElement-ize intersectRepaintRectWithResources().
<https://webkit.org/b/123278>
SVGRenderSupport::intersectRepaintRectWithResources() is only ever
called with non-text renderers so make it take RenderElement&.
Had to tweak RenderSVGResource::resourceBoundingBox() to take the
renderer by reference.
Reviewed by Antti Koivisto.
2013-10-24 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Breakpoints in sourceURL named scripts do not work
https://bugs.webkit.org/show_bug.cgi?id=123231
Reviewed by Timothy Hatcher.
Remember a Script's sourceURL and sourceMappingURL. When setting a
breakpoint by URL, check it against the sourceURL or original URL.
If a script had a sourceURL that would have been the only URL sent
to the frontend, so that receives priority.
Test: inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/ScriptDebugListener.h:
2013-10-23 Alexey Proskuryakov <ap@apple.com>
Add CryptoKey base class and bindings
https://bugs.webkit.org/show_bug.cgi?id=123216
Reviewed by Sam Weinig.
* crypto/CryptoKey.idl: Added.
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
Process the IDL.
* WebCore.xcodeproj/project.pbxproj: Added files.
* bindings/js/JSCryptoKeyCustom.cpp: Added.
(WebCore::JSCryptoKey::algorithm): Use a visitor to build algorithm dictionary
for the key.
* crypto/CryptoAlgorithmDescriptionBuilder.cpp: Added.
* crypto/CryptoAlgorithmDescriptionBuilder.h: Added.
An interface for a visitor we'll use to expose CrytoKey.algorithm in bindings,
and possibly also for storage serialization. Not complete yet, we'll need support
for a few more simple types, and less trivially, for nested algorithms.
* bindings/js/JSCryptoAlgorithmBuilder.cpp: Added.
* bindings/js/JSCryptoAlgorithmBuilder.h: Added.
An implementation that builds an algorithm description dictionary for JS bindings.
* crypto/CryptoKey.cpp: Added.
(WebCore::CryptoKey::~CryptoKey):
(WebCore::CryptoKey::buildAlgorithmDescription):
* crypto/CryptoKey.h: Added.
Added an almost empty implementation. Some of the functions that are currently
marked as pure virtual will likely be implemented in this base class.
2013-10-24 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r157916.
http://trac.webkit.org/changeset/157916
https://bugs.webkit.org/show_bug.cgi?id=123274
Broke Layout/flexbox-lots-of-data.html on perfbot (Requested
by ap on #webkit).
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::OrderHashTraits::emptyValue):
(WebCore::RenderFlexibleBox::OrderHashTraits::constructDeletedValue):
(WebCore::RenderFlexibleBox::OrderHashTraits::isDeletedValue):
(WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
* rendering/RenderFlexibleBox.h:
2013-10-24 Zan Dobersek <zdobersek@igalia.com>
Comment in ScopedEventQueue::dispatchEvent is unnecessarily verbose
https://bugs.webkit.org/show_bug.cgi?id=123252
Reviewed by Darin Adler.
Shorten the comment about the crash avoidance in ScopedEventQueue::dispatchEvent due to
the calling convention in C++ is left unspecified. The problem was already fixed in r157219
and later adjusted in r157401, but the comment could have been shorter and simpler in both cases.
* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::dispatchEvent):
2013-10-24 Alex Christensen <achristensen@webkit.org>
Removed unused ThreadSafeCoordinatedSurface and CertificateInfoCurl files.
https://bugs.webkit.org/show_bug.cgi?id=123246
Reviewed by Noam Rosenthal.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Removed references to ThreadSafeCoordinatedSurface and CertificateInfoCurl.
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp: Removed.
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h: Removed.
* platform/network/curl/CertificateInfoCurl.cpp: Removed.
2013-10-24 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Removed Qt workaround.
https://bugs.webkit.org/show_bug.cgi?id=123258
Reviewed by Csaba Osztrogonác.
No change of functionality, no new tests needed.
!$defines case can be removed, because Qt and Android aren't in WebKit trunk,
all ports (Mac,EFL,GTK,Windows) call this script with --defines option now
* css/make-css-file-arrays.pl:
2013-10-24 Antti Koivisto <antti@apple.com>
Remove a stray space.
Not reviewed.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addImageMapChildren):
2013-10-24 Antti Koivisto <antti@apple.com>
Element iterator functions should take reference
https://bugs.webkit.org/show_bug.cgi?id=123267
Reviewed by Andreas Kling.
The argument has to be non-null.
2013-10-24 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Build break with latest EFL 1.8 libraries.
https://bugs.webkit.org/show_bug.cgi?id=123245
Reviewed by Gyuyoung Kim.
After fixed build break on EFL 1.8 at r138326, EFL libraries are changed
Eo typedef and splitted header files which contain version macro.
* platform/Widget.h: Changed Eo typedef.
* platform/efl/EflScreenUtilities.h: Ditto.
* platform/graphics/Image.h: Ditto.
2013-10-24 Andreas Kling <akling@apple.com>
RenderSVGResource: Pass RenderElement to fill/strokePaintingResource.
<https://webkit.org/b/123242>
We never pass text renderers to these functions, so make them take
RenderElement instead.
Reviewed by Anders Carlsson.
2013-10-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GObject bindings] Make EventTarget interface introspectable
https://bugs.webkit.org/show_bug.cgi?id=77835
Reviewed by Gustavo Noronha Silva.
Add webkit_dom_event_target_add_event_listener_with_closure and
webkit_dom_event_target_remove_event_listener_with_closure to be
used by GObject instrospection bindings. Instead of receving a
GCallback, which makes the function not introspectable, they
receive a GClosure.
* bindings/gobject/GObjectEventListener.cpp:
(WebCore::GObjectEventListener::GObjectEventListener):
(WebCore::GObjectEventListener::~GObjectEventListener):
(WebCore::GObjectEventListener::gobjectDestroyed):
(WebCore::GObjectEventListener::handleEvent):
(WebCore::GObjectEventListener::operator==):
* bindings/gobject/GObjectEventListener.h:
(WebCore::GObjectEventListener::addEventListener):
(WebCore::GObjectEventListener::removeEventListener):
* bindings/gobject/WebKitDOMEventTarget.cpp:
(webkit_dom_event_target_dispatch_event):
(webkit_dom_event_target_add_event_listener):
(webkit_dom_event_target_remove_event_listener):
(webkit_dom_event_target_add_event_listener_with_closure):
(webkit_dom_event_target_remove_event_listener_with_closure):
* bindings/gobject/WebKitDOMEventTarget.h:
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateEventTargetIface):
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
(webkit_dom_test_event_target_dispatch_event):
(webkit_dom_test_event_target_add_event_listener):
(webkit_dom_test_event_target_remove_event_listener):
* bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
(webkit_dom_test_node_dispatch_event):
(webkit_dom_test_node_add_event_listener):
(webkit_dom_test_node_remove_event_listener):
2013-10-14 Sergio Villar Senin <svillar@igalia.com>
Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox
https://bugs.webkit.org/show_bug.cgi?id=118620
Reviewed by Antti Koivisto.
Turns out that order is extremelly uncommon so using a Vector is
much less expensive. This also special-cases the much common case
of only having order of value 0 by using Vectors with just one
preallocated member.
Also added the performance test that shows a ~1% win when using a
vector instead of the HashSet.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
* rendering/RenderFlexibleBox.h:
2013-10-23 ChangSeok Oh <changseok.oh@collabora.com>
Unreviewed build fix since r157823.
FilterOperation::getOperationType() is renamed FilterOperation::type().
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawUsingCustomFilter):
(WebCore::TextureMapperGL::drawFiltered):
(WebCore::BitmapTextureGL::applyFilters):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::injectCachedCustomFilterPrograms):
2013-10-23 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix on CMake based ports when CMAKE_BUILD_TYPE is not given.
When CMAKE_BUILD_TYPE is empty, FIND command will be failed.
* CMakeLists.txt:
2013-10-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Integrate css3-images image-orientation with existing EXIF support
https://bugs.webkit.org/show_bug.cgi?id=91566
Reviewed by Beth Dakin.
Original patch by David Barr(davidbarr@chromium.org).
This patch passes an information of image orientation into existing EXIF support functions
(draw() functions of image classes mainly). We need to let the functions to know the information
in order to meet the image-orientation requirement.
Spec: http://dev.w3.org/csswg/css-images-3/#the-image-orientation
The css3-images module specification is at last call.
Test: fast/css/image-orientation/image-orientation.html
Image orientation test is to check if incorrect rotation value can be fixed with correct orientation.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* page/DragController.cpp:
(WebCore::DragController::doImageDrag):
* page/Frame.cpp:
(WebCore::Frame::nodeImage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::updateSize):
(WebCore::BitmapImage::sizeRespectingOrientation):
(WebCore::BitmapImage::drawPattern):
* platform/graphics/BitmapImage.h:
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::draw):
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::draw):
* platform/graphics/GradientImage.h:
* platform/graphics/Image.cpp:
(WebCore::Image::draw):
(WebCore::Image::drawTiled):
* platform/graphics/Image.h:
* platform/graphics/blackberry/ImageBlackBerry.cpp:
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cg/BitmapImageCG.cpp:
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::draw):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/wince/ImageBufferWinCE.cpp:
(WebCore::BufferedImage::draw):
* platform/graphics/wince/ImageWinCE.cpp:
(WebCore::BitmapImage::draw):
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintSnapshotImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::styleDidChange):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawForContainer):
(WebCore::SVGImage::nativeImageForCurrentFrame):
(WebCore::SVGImage::draw):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::draw):
* svg/graphics/SVGImageForContainer.h:
2013-10-23 Andreas Kling <akling@apple.com>
Tighten typing in SVGInlineTextBox a bit.
<https://webkit.org/b/123238>
Use RenderBoxModelObject& instead of generic RenderObject* in some
places where it happens as a natural consequence of keeping the
original return type from InlineBox::parent()->renderer().
Reviewed by Anders Carlsson.
2013-10-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce RENDER_OBJECT_TYPE_CASTS to replace manual toFoo() in child render object
https://bugs.webkit.org/show_bug.cgi?id=123150
Reviewed by Andreas Kling.
As a step to let toFoo use TYPE_CASTS_BASE, toRenderFoo() can use it for child render object.
So, this patch introduces RENDER_OBJECT_TYPE_CASTS based on the TYPE_CASTS_BASE. This will
generate plenty more helper functions for render object type cast.
Some unnecessary type casts are fixed by this change.
No new tests, no behavior changes.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.h:
* rendering/RenderButton.h:
* rendering/RenderCounter.h:
* rendering/RenderElement.h:
(WebCore::RenderElement::generatingElement):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.h:
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.h:
* rendering/RenderImage.h:
* rendering/RenderInline.h:
* rendering/RenderLayerModelObject.h:
* rendering/RenderLineBreak.h:
* rendering/RenderListBox.h:
* rendering/RenderListItem.h:
* rendering/RenderMedia.h:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderObject.h:
* rendering/RenderProgress.h:
* rendering/RenderQuote.h:
* rendering/RenderRegion.h:
* rendering/RenderReplaced.h:
* rendering/RenderRubyRun.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.h:
* rendering/RenderSlider.h:
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderTable.h:
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.h:
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderWidget.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paint):
2013-10-23 Myles C. Maxfield <mmaxfield@apple.com>
Include misspelling dot gap width when centering misspelling dots
https://bugs.webkit.org/show_bug.cgi?id=122365
Reviewed by Simon Fraser.
When calculating where to place the misspelling dots, we find the
maximum number of full dots that can fit under the misspelled word,
and then center a run of that many dots. However, when we're
centering the run, we are only considering the size of the extra
fractional dot that we cut off. However, the dot image has a "gap"
of transparent pixels (which visually provide tracking for the dots)
which visually appears to be empty space. We should take this gap
space into consideration when centering the run of dots. We also
should make sure that our dots start on integral pixel boundaries
because otherwise we can't set the phase of the dot run properly.
Test: editing/spelling/centering-misspelling-dots.html
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawLineForDocumentMarker):
2013-10-23 Andreas Kling <akling@apple.com>
SVGFilterBuilder should not be ref-counted.
<https://webkit.org/b/123222>
These objects are singly-owned and do not need ref counting.
Reviewed by Anders Carlsson.
2013-10-23 Brady Eidson <beidson@apple.com>
Remove unused IDBBackingStoreLevelDB default constructor.
Rubberstamped by Anders Carlsson.
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2013-10-23 Alex Christensen <achristensen@webkit.org>
Added Texture Mapper and Coordinated Graphics to Windows build for WinCairo.
https://bugs.webkit.org/show_bug.cgi?id=123215
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Added source files for Texture Mapper to Windows build.
* WebCore.vcxproj/WebCoreCairo.props:
Added Texture Mapper include directories for WinCairo.
2013-10-23 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Adding mock class to test RTCDataChannelHandler
https://bugs.webkit.org/show_bug.cgi?id=123205
Reviewed by Eric Carlson.
Now RTCPeerConnectionHandler-datachannel LayouTest can run properly.
Also updated the expected file, removing the reliable property check (which was removed in the spec)
Existing tests updated.
* CMakeLists.txt:
* platform/mediastream/RTCDataChannelHandlerClient.h:
* platform/mock/RTCDataChannelHandlerMock.cpp: Added.
* platform/mock/RTCDataChannelHandlerMock.h: Added.
* platform/mock/RTCNotifiersMock.cpp:
(WebCore::RemoteDataChannelNotifier::RemoteDataChannelNotifier):
(WebCore::RemoteDataChannelNotifier::fire):
(WebCore::DataChannelStateNotifier::DataChannelStateNotifier):
(WebCore::DataChannelStateNotifier::fire):
* platform/mock/RTCNotifiersMock.h:
* platform/mock/RTCPeerConnectionHandlerMock.cpp:
(WebCore::RTCPeerConnectionHandlerMock::createDataChannel):
2013-10-23 Andreas Kling <akling@apple.com>
Clock should not be ref-counted.
<https://webkit.org/b/123217>
The Clock object is only ever owned by the MediaController,
so remove the ref counting and store it in a std::unique_ptr.
Also slapped the Clock subclasses with FINAL and OVERRIDE.
Reviewed by Anders Carlsson.
2013-10-23 Mark Lam <mark.lam@apple.com>
Fix assertion in DatabaseManager::detailsForNameAndOrigin() to be iOS friendly.
https://bugs.webkit.org/show_bug.cgi?id=123218.
Reviewed by Joseph Pecoraro.
No new tests.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::detailsForNameAndOrigin):
2013-10-23 Alex Christensen <achristensen@webkit.org>
Separated USE(CA) from USE(ACCELERATED_COMPOSITING) to prepare WinCairo for accelerated compositing.
https://bugs.webkit.org/show_bug.cgi?id=123214
Reviewed by Brent Fulgham.
* platform/graphics/PlatformLayer.h:
Added TextureMapperPlatformLayer PlatformLayer declaration for WinCairo.
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::createWindow):
(WebCore::MediaPlayerPrivateFullscreenWindow::wndProc):
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
Added USE(CA) where necessary to compile WinCairo with accelerated compositing.
2013-10-23 Myles C. Maxfield <mmaxfield@apple.com>
Antialias underlines if they're not axis-aligned
https://bugs.webkit.org/show_bug.cgi?id=123004
Reviewed by Simon Fraser.
In order to make underlines crisp, GraphicsContext:drawLineForText
modifies the bounds of the underline rect in order to make the rect
device-pixel-aligned, and then turns off antialiasing when drawing
the line. This makes sense when the underline is axis-aligned, but
doesn't when the rect is rotated or skewed. Therefore, we should
only opt-in to this behavior if the underline we're about to draw
is axis-aligned. This requires figuring out whether or not the
current transformation is axis-aligned every time
GraphicsContext::drawLineForText is called, which will incur a small
performance hit. However, this is justified by underlines looking
much better (antialiased) when the context is rotated or skewed.
Tests: svg/custom/foreign-object-skew.html
svg/zoom/page/zoom-foreignObject.html
svg/zoom/text/zoom-foreignObject.html:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLineForText):
2013-10-23 Mark Lam <mark.lam@apple.com>
Re-instate ProposedDatabases needed by detailsForNameAndOrigin().
https://bugs.webkit.org/show_bug.cgi?id=123131.
Reviewed by Geoffrey Garen.
Test: storage/websql/open-database-expand-quota.html
If a webpage tries to create a database that exceeds the database size
quota for that security origin, the WebKit1 quota request mechanism
uses detailsForNameAndOrigin() to get the requested size of the database
(that the webpage is attempting to open) in order to determine whether
to increase the quota or not.
Previously, detailsForNameAndOrigin() relies on the ProposedDatabase
mechanism to provide this size information. This change re-instates the
ProposedDatabase mechanism so that WebKit1 client code that relies on
this behavior will continue to work.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase):
(WebCore::DatabaseManager::ProposedDatabase::~ProposedDatabase):
(WebCore::DatabaseManager::DatabaseManager):
(WebCore::DatabaseManager::openDatabaseBackend):
(WebCore::DatabaseManager::fullPathForDatabase):
(WebCore::DatabaseManager::detailsForNameAndOrigin):
* Modules/webdatabase/DatabaseManager.h:
(WebCore::DatabaseManager::ProposedDatabase::origin):
(WebCore::DatabaseManager::ProposedDatabase::details):
2013-10-23 Tim Horton <timothy_horton@apple.com>
[cg] Fix the capitalization of kCGImageSourceSkipMetaData (-> Metadata)
https://bugs.webkit.org/show_bug.cgi?id=122918
Reviewed by Anders Carlsson.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::imageSourceOptions):
The capitalization of kCGImageSourceSkipMetaData changed to
kCGImageSourceSkipMetadata in Mountain Lion.
2013-10-23 Brady Eidson <beidson@apple.com>
Make IDBDatabaseBackendLevelDB.cpp be cross platform
https://bugs.webkit.org/show_bug.cgi?id=123027
Attentively reviewed by Dean Jackson.
Move it out of the indexeddb/leveldb directory, and rename it to IDBDatabaseBackendImpl.
Project files:
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp.
* Modules/indexeddb/IDBDatabaseBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h.
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
(WebCore::IDBDatabaseBackendInterface::isIDBDatabaseBackendImpl): Add to support a required cast in LevelDB code.
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
(WebCore::IDBFactoryBackendLevelDB::open):
(WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
* Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::create):
(WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
(WebCore::IDBTransactionBackendLevelDB::scheduleVersionChangeOperation):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
(WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
(WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
2013-10-23 Daniel Bates <dabates@apple.com>
[iOS] Upstream more ARMv7s bits
https://bugs.webkit.org/show_bug.cgi?id=123052
Reviewed by Joseph Pecoraro.
Define exported symbol file for armv7s and arm64.
* Configurations/WebCore.xcconfig:
2013-10-23 Krzysztof Wolanski <k.wolanski@samsung.com>
[GTK] accessibility/self-referencing-aria-labelledby.html is failing
https://bugs.webkit.org/show_bug.cgi?id=121594
Reviewed by Mario Sanchez Prada.
According to http://www.w3.org/TR/REC-html40/struct/objects.html#edef-IMG
description of image element should be determined by alt attribute, then
if it is empty by title attributte.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetDescription):
2013-10-15 Andreas Kling <akling@apple.com>
Tighten animation-driven restyle to operate on Element only.
<https://webkit.org/b/122820>
Text nodes are never directly animated, so we can tighten this code
to work on Element only. This happens naturally since the code was
already working with RenderElement everywhere.
Reviewed by Antti Koivisto.
2013-10-22 Andreas Kling <akling@apple.com>
Even more PassRef<RenderStyle>!
<https://webkit.org/b/123147>
Convert more of the WebCore code to use PassRef for RenderStyle
in places where they are known to be non-null.
Re-landing this without region styling since that caused some
assertions last time.
Reviewed by Antti Koivisto.
2013-10-22 Zoltan Horvath <zoltan@webkit.org>
Refactor LineBreaker::nextSegmentBreak, add BreakingContext that holds all its state
https://bugs.webkit.org/show_bug.cgi?id=123038
Reviewed by David Hyatt.
I followed Levi's logic on Blink's nextSegmentBreak refactoring (https://chromiumcodereview.appspot.com/25054004).
I mostly did the same changes, but the code is too diverged at this point to just apply that patch on our trunk. The patch
introduces BreakingContext as a separate class. I added new methods for each condition, which were originally located in
nextSegmentBreak. I also removed the goto-s from the code. All the new methods are inline in order to avoid introducing any
performance regression. The change makes the code so much cleaner and understandable.
This change would be the first step of the nextSegmentBreak refactoring, I wanted to keep things in place in RenderBlockLineLayout.cpp
for now, but I'm planning to separate BreakingContext into a new file and do additional changes to make things nicer. I'm tracking
the entire progress under http://webkit.org/b/121261 meta bug.
No new tests, covered by existing tests.
- I updated 1 expected result, because there was a 1 pixel difference on the result, which I believe comes from a rounding situation.
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::currentObject):
(WebCore::BreakingContext::lineBreak):
(WebCore::BreakingContext::lineBreakRef):
(WebCore::BreakingContext::lineWidth):
(WebCore::BreakingContext::atEnd):
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
(WebCore::BreakingContext::initializeForCurrentObject):
(WebCore::BreakingContext::increment):
(WebCore::BreakingContext::handleBR):
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleFloat):
(WebCore::BreakingContext::handleEmptyInline):
(WebCore::BreakingContext::handleReplaced):
(WebCore::nextCharacter):
(WebCore::BreakingContext::handleText):
(WebCore::textBeginsWithBreakablePosition):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
(WebCore::BreakingContext::handleEndOfLine):
(WebCore::LineBreaker::nextSegmentBreak):
2013-10-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r157826.
http://trac.webkit.org/changeset/157826
https://bugs.webkit.org/show_bug.cgi?id=123197
Caused some regions tests to assert (Requested by smfr on
#webkit).
* dom/Document.cpp:
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::styleForRenderer):
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::setComputedStyle):
(WebCore::ElementRareData::resetComputedStyle):
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::textWithDirection):
* page/animation/AnimationController.cpp:
(WebCore::AnimationController::updateAnimations):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::animate):
* page/animation/CompositeAnimation.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
* rendering/RenderElement.h:
(WebCore::RenderElement::setStyleInternal):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::setRegionObjectsRegionStyle):
(WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
(WebCore::RenderRegion::computeStyleInRegion):
(WebCore::RenderRegion::computeChildrenStyleInRegion):
(WebCore::RenderRegion::setObjectStyleInRegion):
* rendering/RenderRegion.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveLocal):
2013-10-22 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Remove HAVE_GLX macro
https://bugs.webkit.org/show_bug.cgi?id=123191
Reviewed by Gyuyoung Kim.
Since r138313, HAVE(GLX) was replaced to USE(GLX) except in GraphicsSurfaceToken.h.
* platform/graphics/surfaces/GraphicsSurfaceToken.h:
Replace HAVE(GLX) to USE(GLX)
2013-10-22 Mark Lam <mark.lam@apple.com>
Gardening: fix broken build on Windows.
https://bugs.webkit.org/show_bug.cgi?id=123174.
Not reviewed.
No new tests.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-10-22 Brady Eidson <beidson@apple.com>
Get rid of IDBObjectStoreBackendLevelDB
https://bugs.webkit.org/show_bug.cgi?id=123174
Reviewed by Tim Horton.
This file was kind of a dumping ground.
Its contents can be merged into IDBBackingStoreInterface and a new IDBIndexWriter class.
Also took the opportunity to do a little bit of RefPtr<> and pointer-vs-reference cleanup.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Removed.
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Removed.
* Modules/indexeddb/IDBIndexWriter.cpp: Added.
(WebCore::IDBIndexWriter::IDBIndexWriter):
(WebCore::IDBIndexWriter::writeIndexKeys):
(WebCore::IDBIndexWriter::verifyIndexKeys):
(WebCore::IDBIndexWriter::addingKeyAllowed):
* Modules/indexeddb/IDBIndexWriter.h: Added.
(WebCore::IDBIndexWriter::create):
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
* Modules/indexeddb/IDBMetadata.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
(WebCore::IDBBackingStoreLevelDB::generateKey):
(WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
(WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
(WebCore::IDBDatabaseBackendLevelDB::setIndexesReady):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::schedulePutOperation):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
(WebCore::PutOperation::perform):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
(WebCore::PutOperation::create):
(WebCore::PutOperation::PutOperation):
2013-10-22 Dean Jackson <dino@apple.com>
[WebGL] Implement a software rendering option on Mac
https://bugs.webkit.org/show_bug.cgi?id=123177
Reviewed by Tim Horton.
Implement a way to force software OpenGL rendering
for WebGL, via a Setting/Preference.
No new tests. We intentionally hide the capabilities of
the renderer from the content, so you can't test for
this setting. However, manual inspection is pretty
obvious. Just go to a page with a complex shader
such as https://www.shadertoy.com/view/lss3WS.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create): If we're forcing software
rendering, mark the context attributes as such.
* page/Settings.in: New setting key.
* platform/graphics/GraphicsContext3D.h: New flag in Attributes.
(WebCore::GraphicsContext3D::Attributes::Attributes):
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D): Slight update to the
algorithm that sets a pixel format. If we're forcing software rendering,
obviously we never want to create an accelerated pixel format.
* platform/graphics/filters/CustomFilterGlobalContext.cpp:
(WebCore::CustomFilterGlobalContext::prepareContextIfNeeded): Set the attribute
here before trying to create the context.
* platform/graphics/filters/CustomFilterGlobalContext.h: Add a forceSoftwareRendering
flag to prepareContextIfNeeded.
* rendering/FilterEffectRenderer.cpp:
(WebCore::createCustomFilterEffect): Check the Setting before creating a custom
filter context.
2013-10-22 Anders Carlsson <andersca@apple.com>
Revert r157445 since it broke certificates on Mac.
<rdar://problem/15246926&15254017&15269117>
* GNUmakefile.list.am:
* PlatformEfl.cmake:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/network/ResourceErrorBase.h:
* platform/network/ResourceResponseBase.h:
* platform/network/cf/CertificateInfoCFNet.cpp: Removed.
* platform/network/cf/ResourceResponse.h:
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::setCertificateChain):
(WebCore::ResourceResponse::certificateChain):
* platform/network/soup/ResourceError.h:
(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::tlsErrors):
(WebCore::ResourceError::setTLSErrors):
(WebCore::ResourceError::certificate):
(WebCore::ResourceError::setCertificate):
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::ResourceError::tlsError):
(WebCore::ResourceError::platformCopy):
(WebCore::ResourceError::platformCompare):
* platform/network/soup/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
(WebCore::ResourceResponse::soupMessageCertificate):
(WebCore::ResourceResponse::setSoupMessageCertificate):
(WebCore::ResourceResponse::soupMessageTLSErrors):
(WebCore::ResourceResponse::setSoupMessageTLSErrors):
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::toSoupMessage):
(WebCore::ResourceResponse::updateFromSoupMessage):
2013-10-22 Jer Noble <jer.noble@apple.com>
[Media] Refactor supportsType() factory method to take a parameters object.
https://bugs.webkit.org/show_bug.cgi?id=122489
Reviewed by Eric Carlson.
In order to support adding new conditional properties with which to decide
what MediaPlayerPrivate subclass to create, replace the two versions of the
supportsType() factory method with a single one taking a parameters object.
At the same time, add a 'isMediaSource' parameter to that object, allowing
MediaPlayerPrivate subclasses which support the same type and codecs but
which do not both support MediaSource to be distinguised.
* platform/graphics/MediaPlayer.cpp:
(WebCore::bestMediaEngineForSupportParameters): Renamed from
bestMediaEngineForTypeAndCodecs.
(WebCore::MediaPlayer::nextBestMediaEngine): Added convenience function.
(WebCore::MediaPlayer::loadWithNextMediaEngine): Call nextBestMediaEngine()
(WebCore::MediaPlayer::supportsType): Pass parameter object.
(WebCore::MediaPlayer::networkStateChanged): Call nextBestMediaEngine().
* platform/graphics/MediaPlayer.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Handle parameter object.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Remove extraneous
extendedSupportsType method.
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Handle parameter object.
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::supportsType): Ditto.
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Remove extraneous
extendedSupportsType method.
(WebCore::MediaPlayerPrivateQTKit::supportsType): Handle parameter object.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType): Ditto.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
* platform/graphics/wince/MediaPlayerPrivateWinCE.h:
2013-10-22 Andreas Kling <akling@apple.com>
Merge SVGRenderBlock::styleWillChange() into styleDidChange().
<https://webkit.org/b/123181>
I meant to do this one in r157787, but better late than never.
Reviewed by Geoffrey Garen.
2013-10-22 Sam Weinig <sam@webkit.org>
CTTE: Modernize RenderBlock a bit
https://bugs.webkit.org/show_bug.cgi?id=123162
Reviewed by Andreas Kling.
Start threading references through RenderBlock. While we
are here, do some selective modernization as well.
2013-10-22 Andreas Kling <akling@apple.com>
Even more PassRef<RenderStyle>!
<https://webkit.org/b/123147>
Convert the remaining WebCore code to use PassRef for RenderStyle
wherever they are known to be non-null.
Reviewed by Antti Koivisto.
2013-10-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r157819.
http://trac.webkit.org/changeset/157819
https://bugs.webkit.org/show_bug.cgi?id=123180
Broke 32-bit builds (Requested by smfr on #webkit).
* Configurations/WebCore.xcconfig:
2013-10-22 Antti Koivisto <antti@apple.com>
Rename deleteLineBoxTree to deleteLines
https://bugs.webkit.org/show_bug.cgi?id=123176
Reviewed by Andreas Kling.
RenderBlock::deleteLineBoxTree -> RenderBlock::deleteLines
RenderInline::deleteLineBoxTree -> RenderInline::deleteLines
2013-10-22 Tim Horton <timothy_horton@apple.com>
{ClipPathOperation, FilterOperation}::getOperationType() should not include 'get'
https://bugs.webkit.org/show_bug.cgi?id=123172
Reviewed by Simon Fraser.
No new tests, just a rename.
"get" in WebCore tends to mean that the function has out arguments; these have no arguments.
Rename FilterOperation::getOperationType() to FilterOperation::type().
I noticed that ClipPathOperation had the same mistake, so I fixed it there too.
Removed long and useless list of files.
2013-10-22 Samuel White <samuel_white@apple.com>
AX: Add paramAttrs to fetch start and end text markers in a given rect.
https://bugs.webkit.org/show_bug.cgi?id=122164
Reviewed by Chris Fleizach.
Added ability to fetch end and start text markers inside a given bounds. This gives ScreenReaders
like VoiceOver a way to retrieve the text markers for a specified column of page text.
Test: platform/mac/accessibility/text-marker-for-bounds.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::mainFrame):
(WebCore::AccessibilityObject::topDocument):
(WebCore::AccessibilityObject::visiblePositionForBounds):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityRenderObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper screenToContents:]):
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2013-10-22 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Match adjustLogicalLineTopAndLogicalHeightIfNeeded's implementation with Blink's
https://bugs.webkit.org/show_bug.cgi?id=123033
Reviewed by David Hyatt.
In Blink I made this function in a bit different way. This change modifies it
to be identical, which helps a lot in the future cross-merging patches.
No new tests, covered by existing texts.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
2013-10-22 Daniel Bates <dabates@apple.com>
[iOS] Upstream more ARMv7s bits
https://bugs.webkit.org/show_bug.cgi?id=123052
Reviewed by Joseph Pecoraro.
* Configurations/WebCore.xcconfig:
2013-10-22 Simon Fraser <simon.fraser@apple.com>
Try to fix Mavericks build; use <> for framework include.
* page/CaptionUserPreferencesMediaAF.cpp:
2013-10-22 Tim Horton <timothy_horton@apple.com>
GammaFilterOperation seems to be dead code
https://bugs.webkit.org/show_bug.cgi?id=123173
Reviewed by Simon Fraser.
* platform/graphics/filters/FilterOperation.cpp:
* platform/graphics/filters/FilterOperation.h:
Remove dead code.
2013-10-22 Antti Koivisto <antti@apple.com>
Rename some line box functions to be just about lines
https://bugs.webkit.org/show_bug.cgi?id=123168
Reviewed by Dave Hyatt.
firstLineBoxBaseline -> firstLineBaseline
hasInlineBoxChildren -> hasLines
Also use hasLines in a bunch of places where firstLineBox() was used.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
Also use hasRenderedText() instead of firstTextBox()
* rendering/RenderFullScreen.cpp:
Fix namespace.
2013-10-22 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Adding Mock class to test RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=122848
Reviewed by Eric Carlson.
The following tests can be run:
RTCPeerConnection-createAnswer.html
RTCPeerConnection-createOffer.html
RTCPeerConnection-ice.html
RTCPeerConnection-localDescription.html
RTCPeerConnection-remoteDescription.html
RTCPeerConnection-state.html
Tests that require a MediaStream object, by invoking getUserMedia,
are not ready to run yet.
No new tests needed.
* CMakeLists.txt:
* platform/mediastream/RTCPeerConnectionHandler.cpp:
(WebCore::createHandler):
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
* platform/mock/RTCNotifiersMock.cpp: Added.
* platform/mock/RTCNotifiersMock.h: Added.
* platform/mock/RTCPeerConnectionHandlerMock.cpp: Added.
* platform/mock/RTCPeerConnectionHandlerMock.h: Copied from Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h.
* platform/mock/TimerEventBasedMock.h: Added.
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::enableMockRTCPeerConnectionHandler):
* testing/Internals.h:
2013-10-22 Zan Dobersek <zdobersek@igalia.com>
WebCore::fillWithEmptyClients adopts new empty clients before leaking their pointers
https://bugs.webkit.org/show_bug.cgi?id=122945
Reviewed by Anders Carlsson.
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients): Store the static empty clients as NeverDestroyed, rather than
adopting the pointer of each heap-allocated object and then immediately leaking that pointer.
2013-10-22 Zan Dobersek <zdobersek@igalia.com>
Simplify HRTFDatabaseLoader's load map
https://bugs.webkit.org/show_bug.cgi?id=122944
Reviewed by Eric Carlson.
* platform/audio/HRTFDatabaseLoader.cpp:
(WebCore::loaderMap): Return a reference to a NeverDestroyed HashMap that maps sample rates to loaders.
(WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
(WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
* platform/audio/HRTFDatabaseLoader.h: Remove the LoaderMap type definition, the private singleton of that type
and the singleton's unused getter.
2013-10-22 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: Support hardware accelerated filters
https://bugs.webkit.org/show_bug.cgi?id=123139
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Export a variety of filter-related things.
* platform/graphics/ca/PlatformCAFilters.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::setFilters):
* platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
(PlatformCAFilters::setFiltersOnLayer):
setFiltersOnLayer should take a PlatformLayer instead of a PlatformCALayer
as its argument, because it doesn't need a PlatformCALayer, and this way
we can share code with the RemoteLayerTreeHost, which only has PlatformLayers
and not PlatformCALayers.
2013-10-22 Brendan Long <b.long@cablelabs.com>
cue.text fails for some track element cues
https://bugs.webkit.org/show_bug.cgi?id=81123
Reviewed by Eric Carlson.
Test: media/track/track-long-captions-file.html
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes): Use buffer when we don't have full lines.
(WebCore::WebVTTParser::fileFinished): Force file to finish parsing.
(WebCore::WebVTTParser::hasRequiredFileIdentifier): Simplify due to using String.
(WebCore::WebVTTParser::collectCueText): Don't automatically create cues when we run out of data.
(WebCore::WebVTTParser::collectNextLine): Use buffer.
* html/track/WebVTTParser.h: Add m_buffer and Finished state.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::notifyFinished): Call m_parser->fileFinished() when done.
2013-10-22 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=123161
Reviewed by Brent Fulgham.
* rendering/RenderFlowThread.h: Move USE(ACCELERATED_COMPOSITING) guard to expose needed type.
2013-10-21 Brady Eidson <beidson@apple.com>
Add a cross-platform IDBRecordIdentifier
https://bugs.webkit.org/show_bug.cgi?id=123138
Reviewed by Andreas Kling.
Add the cross-platform header:
* Modules/indexeddb/IDBRecordIdentifier.h: Added.
(WebCore::IDBRecordIdentifier::create):
(WebCore::IDBRecordIdentifier::encodedPrimaryKey):
(WebCore::IDBRecordIdentifier::version):
(WebCore::IDBRecordIdentifier::reset):
(WebCore::IDBRecordIdentifier::IDBRecordIdentifier):
* WebCore.xcodeproj/project.pbxproj:
* GNUmakefile.list.am:
Remove the old abstract and LevelDB classes:
* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
Use the cross-platform one everywhere:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::putRecord):
(WebCore::IDBBackingStoreLevelDB::deleteRecord):
(WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
(WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
(WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
(WebCore::ObjectStoreCursorImpl::loadCurrentRow):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
(WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
(WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
(WebCore::PutOperation::perform):
2013-10-22 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Possible performance regression after r157567
https://bugs.webkit.org/show_bug.cgi?id=123016
Reviewed by Andreas Kling.
The revision 157567 http://trac.webkit.org/changeset/157567 may have regressed
Parser/html5-full-render by ~1.1% and Parser/html-parser by ~2%. These changes
try to optimize the initial patch, based on Andreas Kling's review.
The patch also adds a couple of refactorings that should make the code easier to read:
- the CSS Shapes functions are now wrapped in a single #if clause
- the CSS Shapes and CSS Regions pre-layout preparations are wrapped in a helper function
The RenderFlowThread::logicalWidthChangedInRegionsForBlock function is optimized by passing
it information about the state of the relayout children flag. If the flag is true already,
some of the steps are skipped.
Tests: no new tests.
* dom/Element.cpp:
(WebCore::Element::webkitGetRegionFlowRanges):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* rendering/RenderBlock.cpp:
(WebCore::shapeInfoRequiresRelayout):
(WebCore::RenderBlock::updateShapesBeforeBlockLayout):
(WebCore::RenderBlock::computeShapeSize):
(WebCore::RenderBlock::prepareShapesAndPaginationBeforeBlockLayout):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
(WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
(WebCore::RenderBlockFlow::ensureRareData):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderElement::isRenderNamedFlowFragmentContainer):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderElement.h:
(WebCore::RenderElement::generatingElement):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
* rendering/RenderFlowThread.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* style/StyleResolveTree.cpp:
(WebCore::Style::elementInsideRegionNeedsRenderer):
2013-10-22 Andreas Kling <akling@apple.com>
CSSStyleSheet constructor functions should return PassRef.
<https://webkit.org/b/123156>
Make CSSStyleSheet::create*() return PassRef and tighten some call
sites that were using them. Most callers didn't need any tweaks to
take advantage of PassRef.
Reviewed by Antti Koivisto.
2013-10-22 Andreas Kling <akling@apple.com>
CTTE: RenderMathMLFraction always has a MathMLInlineContainerElement.
<https://webkit.org/b/123154>
This renderer is never anonymous and always has a corresponding
MathMLInlineContainerElement. Overload element() with a tighter
return type.
Also marked the class FINAL and made most member functions private.
Reviewed by Antti Koivisto.
2013-10-22 Andreas Kling <akling@apple.com>
FontGlyphs constructor functions should return PassRef.
<https://webkit.org/b/123159>
Made the two FontGlyphs creator functions return PassRef and tweaked
the FontGlyphsCache in Font.cpp to make more efficient use of it.
Reviewed by Antti Koivisto.
2013-10-22 Andreas Kling <akling@apple.com>
Fix some more code to use RenderElement instead of RenderObject.
<https://webkit.org/b/123149>
Using RenderElement where possible lets us skip the isRenderElement()
branch in RenderObject::style() and generates much tighter code.
Reviewed by Antti Koivisto.
2013-10-22 Andreas Kling <akling@apple.com>
Merge SVG renderers' styleWillChange() into styleDidChange().
<https://webkit.org/b/123108>
This work can just as well be done after setting the style.
Three more styleWillChange() overloads gone.
Reviewed by Antti Koivisto.
2013-10-22 Andreas Kling <akling@apple.com>
CSSValueList constructor functions should return PassRef.
<https://webkit.org/b/123151>
These functions always return objects, and thus can return PassRef.
Also made CSSValueList::createFromParserValueList() take a reference
since that function is only ever called with a non-null value.
Reviewed by Antti Koivisto.
2013-10-22 Andreas Kling <akling@apple.com>
Avoid parent style ref churn in createTextRendererIfNeeded().
<https://webkit.org/b/123148>
There's no need to take a temporary ref on the parent's RenderStyle
while creating a text renderer. It's not going away, and the text
renderer is not going to participate in ownership afterwards.
Reviewed by Antti Koivisto.
2013-10-22 Andreas Kling <akling@apple.com>
Remove some unnecessary null checks in RenderElement::setStyle().
<https://webkit.org/b/123146>
After assigning the new style to RenderElement::m_style, we know that
it'll be non-null, so remove all the checking for this.
Reviewed by Antti Koivisto.
2013-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce ACCESSIBILITY_OBJECT_TYPE_CASTS to replace manual toFoo() in accessibility child class
https://bugs.webkit.org/show_bug.cgi?id=123140
Reviewed by Andreas Kling.
As a step to let toFoo use TYPE_CASTS_BASE, DEFINE_TYPE_CASTS can be used for toFoo() in accessibility
child class. The DEFINE_TYPE_CASTS will generate plenty more helper functions for accessibility type cast.
No new tests, no behavior changes.
* accessibility/AccessibilityList.h:
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMockObject.h:
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.h:
2013-10-22 Brian Holt <brian.holt@samsung.com>
[GTK] Add WebKit2 API for TLS errors
https://bugs.webkit.org/show_bug.cgi?id=120160
Reviewed by Carlos Garcia Campos.
Added a new constructor for CertificateInfo under Soup.
* platform/network/CertificateInfo.h:
* platform/network/soup/CertificateInfoSoup.cpp:
(WebCore::CertificateInfo::CertificateInfo): New constructor using
GTlsCertificateFlags and GTlsCertificate.
2013-10-22 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Use RenderStyle::hasFlowFrom when needed
https://bugs.webkit.org/show_bug.cgi?id=122543
Reviewed by David Hyatt.
Rename RenderStyle::hasStyleRegion -> RenderStyle::hasFlowFrom.
Use RenderStyle::hasFlowFrom() helper function instead of directly
checking the value of RenderStyle::regionThread().
No change of functionality, covered by existing tests.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::contentToCSSValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didAttachRenderers):
* dom/PseudoElement.h:
(WebCore::pseudoElementRendererIsNeeded):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
* rendering/style/RenderStyle.h:
2013-10-21 Brent Fulgham <bfulgham@apple.com>
[WIN] Properly support reverse animations without needing software fallback.
https://bugs.webkit.org/show_bug.cgi?id=85121
Reviewed by Dean Jackson.
Testing is provided by existing animation tests.
* platform/animation/TimingFunction.h:
(WebCore::CubicBezierTimingFunction::createReversed): Added.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::addAnimation): The early return when performing a reverse or
autoreverse animation is no longer needed.
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
(toCAMediaTimingFunction): Use new reversed function.
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(toCACFTimingFunction): Ditto.
(PlatformCAAnimation::setTimingFunction): Pass 'reverse' flag.
(PlatformCAAnimation::setTimingFunctions): Ditto.
2013-10-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use TYPE_CASTS_BASE for CSS_VALUE_TYPE_CASTS
https://bugs.webkit.org/show_bug.cgi?id=123126
Reviewed by Andreas Kling.
TYPE_CASTS_BASE was moved to common place to be used by all toFoo().
CSS_VALUE_TYPE_CASTS starts to use it for CSS child value. This change
generates plenty more helper functions for toCSSFooValue().
Additionally, this use support that toWebKitCSSFooValue, which couldn't
use CSS_VALUE_TYPE_CASTS macro.
No new tests, no behavior change.
* css/CSSAspectRatioValue.h:
* css/CSSBorderImageSliceValue.h:
* css/CSSCalculationValue.h:
* css/CSSCanvasValue.h:
* css/CSSCrossfadeValue.h:
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.h:
* css/CSSFontFaceSrcValue.h:
* css/CSSFontFeatureValue.h:
* css/CSSFontValue.h:
* css/CSSFunctionValue.h:
* css/CSSGradientValue.h:
* css/CSSGridTemplateValue.h:
* css/CSSImageSetValue.h:
* css/CSSImageValue.h:
* css/CSSInheritedValue.h:
* css/CSSInitialValue.h:
* css/CSSLineBoxContainValue.h:
* css/CSSPrimitiveValue.h:
* css/CSSReflectValue.h:
* css/CSSShadowValue.h:
* css/CSSTimingFunctionValue.h:
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.h:
* css/CSSValueList.h:
* css/CSSVariableValue.h:
* css/WebKitCSSArrayFunctionValue.h:
* css/WebKitCSSFilterValue.h:
* css/WebKitCSSMatFunctionValue.h:
* css/WebKitCSSMixFunctionValue.h:
* css/WebKitCSSSVGDocumentValue.h:
* css/WebKitCSSShaderValue.h:
2013-10-21 Joone Hur <joone.hur@intel.com>
Bad cast with toRenderBoxModelObject in RenderBlock::updateFirstLetter()
https://bugs.webkit.org/show_bug.cgi?id=123013
Reviewed by Andreas Kling.
No new tests because this was reported by Google ClusterFuzz.
https://codereview.chromium.org/25713009/
There is a case that toRenderBoxModelObject causes a crash in RenderBlock::updateFirstLetter()
due to bad cast, so we need to check whether the RenderObject is a RenderBoxModelObject
by running isBoxModelObject() before calling toRenderBoxModelObject.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetter):
2013-10-21 Brady Eidson <beidson@apple.com>
Make IDBTransactionCoordinatorLevelDB cross platform
https://bugs.webkit.org/show_bug.cgi?id=123124
Enthusiastically reviewed by Tim Horton.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
Make more methods pure virtual in the interface:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
Update the name of the class, and use IDBTransactionBackendInterface instead of IDBTransactionBackendLeveDB:
* Modules/indexeddb/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp.
(WebCore::IDBTransactionCoordinator::create):
(WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator):
(WebCore::IDBTransactionCoordinator::~IDBTransactionCoordinator):
(WebCore::IDBTransactionCoordinator::didCreateTransaction):
(WebCore::IDBTransactionCoordinator::didStartTransaction):
(WebCore::IDBTransactionCoordinator::didFinishTransaction):
(WebCore::IDBTransactionCoordinator::isActive):
(WebCore::IDBTransactionCoordinator::processStartedTransactions):
(WebCore::doScopesOverlap):
(WebCore::IDBTransactionCoordinator::canRunTransaction):
* Modules/indexeddb/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h.
Update the name of the class elsewhere:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
(WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
(WebCore::IDBDatabaseBackendLevelDB::transactionCoordinator):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2013-10-21 Daniel Bates <dabates@apple.com>
[iOS] Upstream JSGlobalObject::shouldInterruptScriptBeforeTimeout()
https://bugs.webkit.org/show_bug.cgi?id=123045
Reviewed by Joseph Pecoraro.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage): Added.
(WebCore::JSDOMWindowBase::shouldInterruptScript): Extracted comment and assertion
about null Page object into WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage()
so that it can be shared by both this function and JSDOMWindowBase::shouldInterruptScriptBeforeTimeout().
(WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::shouldInterruptScriptBeforeTimeout): Added.
* bindings/js/JSWorkerGlobalScopeBase.h:
* loader/EmptyClients.h: Added isStopping(). We'll land the iOS chrome client implementation
in a subsequent patch.
* page/ChromeClient.h: Added isStopping().
2013-10-21 Anders Carlsson <andersca@apple.com>
Navigation policy callback not called when performing the same fragment navigation twice
https://bugs.webkit.org/show_bug.cgi?id=123121
<rdar://problem/15230466>
Reviewed by Beth Dakin.
There's code in PolicyChecker::checkNavigationPolicy that will call the decision function right away
if the requests are equal, without consulting any policy client. Because of this, make sure to empty out
the last checked request of the document loader when doing a fragment navigation.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
2013-10-21 Jer Noble <jer.noble@apple.com>
Unreviewed build fix; unprotect the declaration of updateSleepDisabling();
* html/HTMLMediaElement.h:
2013-10-20 Mark Lam <mark.lam@apple.com>
Avoid JSC debugger overhead unless needed.
https://bugs.webkit.org/show_bug.cgi?id=123084.
Reviewed by Geoffrey Garen.
No new tests.
- If no breakpoints are set, we now avoid calling the debug hook callbacks.
- If no break on exception is set, we also avoid exception event debug callbacks.
- When we return from the ScriptDebugServer to the JSC::Debugger, we may no
longer call the debug hook callbacks if not needed. Hence, the m_currentCallFrame
pointer in the ScriptDebugServer may become stale. To avoid this issue, before
returning, the ScriptDebugServer will clear its m_currentCallFrame if
needsOpDebugCallbacks() is false.
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::clearBreakpoints):
(WebCore::ScriptDebugServer::setPauseOnExceptionsState):
(WebCore::ScriptDebugServer::setPauseOnNextStatement):
(WebCore::ScriptDebugServer::breakProgram):
(WebCore::ScriptDebugServer::stepIntoStatement):
(WebCore::ScriptDebugServer::dispatchDidContinue):
(WebCore::ScriptDebugServer::exception):
(WebCore::ScriptDebugServer::didReachBreakpoint):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::reset):
2013-10-21 Myles C. Maxfield <mmaxfield@apple.com>
Grammar markers are not updated when switching between 1x and 2x
https://bugs.webkit.org/show_bug.cgi?id=122146
Reviewed by Dean Jackson.
When running editing/spelling/grammar-markers-hidpi.html, the 2x
grammar/spelling dot resources are cached. If you then run
editing/spelling/grammar-markers.html without tearing down WebKit,
it re-uses the 2x dots. The difference between the two tests is a call
to testRunner.setBackingScaleFactor().
We create a NSColor from an NSImage, and remember it in a static
variable. However, NSColor inspects the current graphics context to
determine which resolution to use, and then remembers that decision.
Therefore, we want to recreate the NSColor whenever the device pixel
ratio changes. This patch adds a new static function to GraphicsContext
which recreates this NSColor every time the ratio changes.
Tests: editing/spelling/grammar-markers.html
editing/spelling/inline_spelling_markers.html
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::makePattern):
(WebCore::GraphicsContext::drawLineForDocumentMarker):
2013-10-21 Simon Fraser <simon.fraser@apple.com>
Use pink layer borders for compositing layers with a contents layer
https://bugs.webkit.org/show_bug.cgi?id=123118
Reviewed by Dean Jackson.
With the existing layer border colors, it's not possible to distinguish an empty
layer from one with solid color, image or video contents. So use a pink color
for those. This makes it easier to diagnose bugs like 122784.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::getDebugBorderInfo):
2013-10-21 Jer Noble <jer.noble@apple.com>
Limit use of display sleep assertion when <video> element is off-screen.
https://bugs.webkit.org/show_bug.cgi?id=123041
Reviewed by Darin Adler.
Use page visibility changes to suspend and resume the use of sleep assertions in
HTMLMediaElement.
Page will propogate the page visibility change notifications to its Documents, which
will further propogate those notifications to registered elements. Upon receiving
these notifications, HTMLMediaElement will release or take a DisplaySleepDisabler
token if necessary.
Also, rename HTMLMediaElement's updateDisableSleep() to updateSleepDisabling() and wrap
the implementation in a PLATFORM(MAC) guard rather than at each call site.
* dom/Document.cpp:
(WebCore::Document::registerForVisibilityStateCallbacks): Added registration method.
(WebCore::Document::unregisterForVisibilityStateCallbacks): Added unregistration method.
(WebCore::Document::visibilityStateChanged): Call all registered clients.
* dom/Document.h:
* dom/Element.h:
(WebCore::Element::visibilityStateChanged): Added default virtual method to be overridden
by subclasses.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Register for the notification, and check the
current status of Document::hidden().
(WebCore::HTMLMediaElement::~HTMLMediaElement): Unregister for the notification.
(WebCore::HTMLMediaElement::visibilityStateChanged): Set m_displaySleepDisablingSuspended
and call updateSleepDisabling().
(WebCore::HTMLMediaElement::shouldDisableSleep): Add a check for m_displaySleepDisablingSuspended.
* html/HTMLMediaElement.h:
* page/Page.cpp:
(WebCore::Page::setVisibilityState): Pass to every child document.
Rename updateDisableSleep() -> updateSleepDisabling():
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
(WebCore::HTMLMediaElement::mediaPlayerRateChanged):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::stop):
2013-10-21 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
MediaStreamTrack now tracks its own state
https://bugs.webkit.org/show_bug.cgi?id=123025
Reviewed by Jer Noble.
The spec says that a MediaStreamSource can be shared by different tracks,
so a track must have its own state tracking, synchronizing with its MediaStreamSource when
the underlying MediaStreamSource changes the readyState.
In the old implementation if a user invoked the stop method, its readyState method was still
returning the MediaStreamSource state, which was wrong.
This also adds a setEnabled method, which can be used to set the state of a track when a
remote peer ends it, for instance.
No new tests needed.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::readyState):
(WebCore::MediaStreamTrack::setState):
(WebCore::MediaStreamTrack::stopProducingData):
(WebCore::MediaStreamTrack::ended):
(WebCore::MediaStreamTrack::sourceStateChanged):
(WebCore::MediaStreamTrack::trackDidEnd):
* Modules/mediastream/MediaStreamTrack.h:
2013-10-21 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: Clean up transaction logging
https://bugs.webkit.org/show_bug.cgi?id=123116
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Export some TextStream functions.
2013-10-21 Brady Eidson <beidson@apple.com>
Transition most use of IDBBackingStoreLevelDB to IDBBackingStoreInterface
https://bugs.webkit.org/show_bug.cgi?id=123105
Reviewed by Anders Carlsson.
Export more required headers:
* WebCore.xcodeproj/project.pbxproj:
Flesh out many of the pure virtual methods on IDBBackingStoreInterface, as well as
the RecordIdentifier and Cursor classes:
* Modules/indexeddb/IDBBackingStoreInterface.h:
(WebCore::IDBBackingStoreInterface::RecordIdentifier::~RecordIdentifier):
(WebCore::IDBBackingStoreInterface::Cursor::~Cursor):
Use IDBBackingStoreInterface, IDBBackingStoreInterface::RecordIdentifier, and
IDBBackingStoreInterface::Cursor wherever possible:
* Modules/indexeddb/IDBFactoryBackendInterface.cpp:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::putRecord):
(WebCore::IDBBackingStoreLevelDB::deleteRecord):
(WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
(WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
(WebCore::ObjectStoreKeyCursorImpl::clone):
(WebCore::ObjectStoreCursorImpl::clone):
(WebCore::IndexKeyCursorImpl::clone):
(WebCore::IndexCursorImpl::clone):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexCursor):
(WebCore::IDBBackingStoreLevelDB::Transaction::Transaction):
(WebCore::IDBBackingStoreLevelDB::Transaction::begin):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
(WebCore::IDBBackingStoreLevelDB::RecordIdentifier::RecordIdentifier):
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
(WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
(WebCore::IDBCursorBackendLevelDB::create):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
(WebCore::IDBDatabaseBackendLevelDB::create):
(WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
(WebCore::IDBDatabaseBackendLevelDB::backingStore):
(WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
(WebCore::IDBDatabaseBackendLevelDB::createTransaction):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::createTransactionBackend):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
(WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys):
(WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
(WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed):
(WebCore::IDBObjectStoreBackendLevelDB::makeIndexWriters):
(WebCore::IDBObjectStoreBackendLevelDB::generateKey):
(WebCore::IDBObjectStoreBackendLevelDB::updateKeyGenerator):
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::create):
(WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
(WebCore::GetOperation::perform):
(WebCore::OpenCursorOperation::perform):
(WebCore::CountOperation::perform):
(WebCore::DeleteRangeOperation::perform):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
(WebCore::CreateObjectStoreOperation::create):
(WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
(WebCore::DeleteObjectStoreOperation::create):
(WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
(WebCore::CreateIndexOperation::create):
(WebCore::CreateIndexOperation::CreateIndexOperation):
(WebCore::DeleteIndexOperation::create):
(WebCore::DeleteIndexOperation::DeleteIndexOperation):
(WebCore::GetOperation::create):
(WebCore::GetOperation::GetOperation):
(WebCore::PutOperation::create):
(WebCore::PutOperation::PutOperation):
(WebCore::OpenCursorOperation::create):
(WebCore::OpenCursorOperation::OpenCursorOperation):
(WebCore::CountOperation::create):
(WebCore::CountOperation::CountOperation):
(WebCore::DeleteRangeOperation::create):
(WebCore::DeleteRangeOperation::DeleteRangeOperation):
(WebCore::ClearOperation::create):
(WebCore::ClearOperation::ClearOperation):
2013-10-21 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes][CSS Regions] Don't apply shape-inside when we have multiple auto-height regions and the height is not resolved
https://bugs.webkit.org/show_bug.cgi?id=123103
Reviewed by David Hyatt.
When we have multiple regions with auto-height, the region's height is not resolved from other elements we can't apply the
the shape on the region. This patch prevents to apply the shape and fixes the behavior for these cases.
Test: fast/regions/shape-inside/shape-inside-on-multiple-autoheight-regions.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutShapeInsideInfo):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
2013-10-21 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: Backing store should take contentsScale into account
https://bugs.webkit.org/show_bug.cgi?id=123106
Reviewed by Simon Fraser.
* WebCore.exp.in:
Export FloatRect::scale.
2013-10-21 Andreas Kling <akling@apple.com>
RenderScrollbarPart doesn't need styleWillChange().
<https://webkit.org/b/123113>
We will call setInline(false) in styleDidChange(), there's no need
to override styleWillChange() just to do it twice.
Reviewed by Darin Adler.
2013-10-21 Mihai Maerean <mmaerean@adobe.com>
[CSS Regions] The layers from the flow thread should be collected under the regions' layers.
https://bugs.webkit.org/show_bug.cgi?id=120457
Reviewed by David Hyatt.
This patch is based on the work of Alexandru Chiculita at https://bugs.webkit.org/attachment.cgi?id=203872&action=review
The composited layers inside the named flow threads are collected as part of the regions (as children of the
GraphicsLayer of the layer that corresponds to the region (which is attached to the parent renderer of
RenderNameFlowFragment)).
When a region displays a layer that needs accelerated compositing we activate the accelerated compositing for
that region too (inside RenderLayerCompositor::computeRegionCompositingRequirements).
This patch has landed before (as http://trac.webkit.org/changeset/156451), but was reverted because
fast/multicol/mixed-positioning-stacking-order.html failed. The fix is inside RenderLayerCompositor::canBeComposited
that only enables compositing for layers inside flow threads that collect the graphics layers under the regions.
Another change from changeset #156451 is that now the region renderers are created as anonymous renderers under
the element that has the flow-from property. When a composited layer is needed for the region, it sits in it's
parent renderer, not in the region renderer (RenderNamedFlowFragment).
Tests: compositing/regions/crash-transform-inside-region.html
compositing/regions/floated-region-with-transformed-child.html
compositing/regions/move-layer-from-one-region-to-another.html
compositing/regions/propagate-region-box-shadow-border-padding-for-video.html
compositing/regions/propagate-region-box-shadow-border-padding.html
compositing/regions/region-as-layer-in-another-flowthread.html
compositing/regions/transform-transparent-positioned-video-inside-region.html
compositing/regions/transformed-layer-inside-transformed-layer.html
compositing/regions/z-index-update.html
compositing/regions/z-index.html
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::propagateStyleToAnonymousChildren): Not for RenderFlowThreads, as they are updated
through the RenderView::styleDidChange function.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout): When the layout of the flow thread is over (including the 2 phase layout),
we update all the mappings between the layers inside the flow thread and the regions where those layers will be
painted.
(WebCore::RenderFlowThread::hasCompositingRegionDescendant): Whether any of the regions has a compositing descendant.
(WebCore::RenderFlowThread::getLayerListForRegion):
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
(WebCore::RenderFlowThread::collectsGraphicsLayersUnderRegions):
(WebCore::RenderFlowThread::updateLayerToRegionMappings): Triggers an update of the layers if a layer has moved
from a region to another since the last update.
(WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
* rendering/RenderFlowThread.h:
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::pushRenderFlowThread):
* rendering/RenderGeometryMap.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::enclosingFlowThreadAncestor):
(WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
(WebCore::RenderLayer::hitTestList):
(WebCore::RenderLayer::calculateLayerBounds): When we calculate the bounds of the RenderView, we ignore those
flow threads that collect the graphics layers under the regions.
(WebCore::RenderLayer::dirtyZOrderLists):
(WebCore::RenderLayer::dirtyNormalFlowList):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::shouldClipCompositedBounds): Not if it's a flow thread that collects the graphics
layers under the regions
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Now adjusts the ancestorCompositingBounds for the FlowThread.
(WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): Make sure that the region propagates
its borders, paddings, outlines or box-shadows to layers inside it.
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements): Now calls computeRegionCompositingRequirements.
(WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Do not iterate the RenderFlowThread directly if
we are going to collect the composited layers as part of regions.
(WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
(WebCore::RenderLayerCompositor::canBeComposited): CSS Regions flow threads do not need to be composited as we
use composited RenderRegions to render the background of the RenderFlowThread.
(WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): If it's a container of a css region.
* rendering/RenderLayerCompositor.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowFragment.h:
(WebCore::RenderNamedFlowFragment::layerOwner): When the content inside the region requires the region to have a
layer, the layer will be created on the region's parent renderer instead. This method returns that renderer
holding the layer. The return value may be null.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::nextRendererForNode):
(WebCore::RenderNamedFlowThread::previousRendererForNode):
(WebCore::RenderNamedFlowThread::addFlowChild):
(WebCore::RenderNamedFlowThread::removeFlowChild):
(WebCore::RenderNamedFlowThread::collectsGraphicsLayersUnderRegions):
* rendering/RenderNamedFlowThread.h: m_flowThreadChildList is now allocated through an OwnPtr to keep the render
arena under the size limit.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
* rendering/RenderRegion.h:
(WebCore::toRenderRegion):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):
* WebCore.exp.in: WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions
2013-10-21 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Fixing mediastream debug build
https://bugs.webkit.org/show_bug.cgi?id=123104
Reviewed by Andreas Kling.
No new tests needed.
* Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
(WebCore::RTCDTMFToneChangeEvent::create):
2013-10-21 Andreas Kling <akling@apple.com>
Merge RenderListMarker::styleWillChange() into styleDidChange().
<https://webkit.org/b/123098>
If the marker's list-style-type or list-style-position changed, we
need to dirty the layout. Move this logic to styleDidChange() so we
can get rid of one styleWillChange() overload.
Reviewed by Antti Koivisto.
2013-10-21 Mihai Maerean <mmaerean@adobe.com>
[CSS Regions] Fix WHITESPACE issues in the CSS grammar.
https://bugs.webkit.org/show_bug.cgi?id=123082
Reviewed by Andreas Kling.
This is a port of Rune Lillesveen's patch from https://codereview.chromium.org/25607005
Fix WHITESPACE issues in the CSS grammar.
A single WHITESPACE token consumes consecutive spaces, but does not consume
spaces separated by comments. That means S* and S+ in CSS grammars need to
accept multiple WHITESPACE tokens. Additionally, white spaces are not
mandatory to separate an @-symbol and the rest of the prelude.
Use space non-terminal instead of WHITESPACE for S+ in calc expressions.
Use maybe_space non-terminal instead of WHITESPACE for S* after @-webkit-filter
and @-webkit-region.
Tests: fast/css/calc-comments-allowed.html
fast/regions/webkit-region-syntax-space.html
* css/CSSGrammar.y.in:
2013-10-21 Anton Obzhirov <a.obzhirov@samsung.com>
[ATK] Use atk_object_notify_state_change instead of manually emitting signals
https://bugs.webkit.org/show_bug.cgi?id=122968
Reviewed by Mario Sanchez Prada.
Refactor emitting "state-change" event to use atk_object_notify_state_change
instead of using g_signal_emit_by_name.
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):
(WebCore::AXObjectCache::postPlatformNotification):
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
(WebCore::AXObjectCache::handleFocusedUIElementChanged):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleDetach):
* editing/atk/FrameSelectionAtk.cpp:
(WebCore::maybeEmitTextFocusChange):
2013-10-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Make TYPE_CASTS_BASE more flexible
https://bugs.webkit.org/show_bug.cgi?id=122951
Reviewed by Andreas Kling.
TYPE_CASTS_BASE is being used by node|element type casts. However, it is difficult
to be used by other type casts. For instance, CSSValue, Accessibility and so on.
This patch modifies TYPE_CASTS_BASE which can support other type casts.
Besides TYPE_CASTS_BASE body is moved from node.h to Assertions.h.
No new tests, no behavior changes.
* dom/Document.h:
* dom/Node.h:
2013-10-21 Santosh Mahto <santosh.ma@samsung.com>
ASSERTION FAILED: !style->propertyIsImportant(propertyID) in WebCore::setTextDecorationProperty
https://bugs.webkit.org/show_bug.cgi?id=122097
Reviewed by Ryosuke Niwa.
When remove format command is called we pushdown the ancestor style
down to its children. Currently applying inline style to iframe
while pushing down style which causes iframe to be reinserted in tree and
triggres again subframe loading which repeats everytime and finally
crash happens. So we should avoid applying inline style to iframe
element as it doesnot reflect in its content while pushing down style
on it.
And ASSERT call has been removed from setTextDecoration property as
the scenario is perfectly valid case.
Test: editing/execCommand/remove-format-textdecoration-in-iframe.html
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Return if
element is iframe.
* editing/EditingStyle.cpp:
(WebCore::StyleChange::setTextDecorationProperty): Remove ASSERT.
2013-10-20 Sam Weinig <sam@webkit.org>
Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 5)
https://bugs.webkit.org/show_bug.cgi?id=122969
Reviewed by Antti Koivisto.
- Move m_lineBoxes to RenderBlockFlow.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::innerTextIfTruncated):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::willBeDestroyed):
(WebCore::RenderBlock::deleteLineBoxTree):
(WebCore::RenderBlock::isSelfCollapsingBlock):
(WebCore::RenderBlock::removeFromDelayedUpdateScrollInfoSet):
(WebCore::RenderBlock::paintContents):
(WebCore::blockDirectionOffset):
(WebCore::inlineDirectionOffset):
(WebCore::RenderBlock::inlineSelectionGaps):
(WebCore::RenderBlock::hitTestContents):
(WebCore::positionForPointRespectingEditingBoundaries):
(WebCore::RenderBlock::positionForPointWithInlineChildren):
(WebCore::RenderBlock::firstLineBoxBaseline):
(WebCore::RenderBlock::inlineBlockBaseline):
(WebCore::RenderBlock::addFocusRingRectsForInlineChildren):
(WebCore::RenderBlock::addFocusRingRects):
(WebCore::RenderBlock::showLineTreeAndMark):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::addOverflowFromInlineChildren):
(WebCore::RenderBlock::hasInlineBoxChildren):
(WebCore::RenderBlock::paintInlineChildren):
(WebCore::RenderBlock::hitTestInlineChildren):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::deleteLineBoxTree):
(WebCore::RenderBlockFlow::hitTestInlineChildren):
(WebCore::RenderBlockFlow::adjustForBorderFit):
(WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
(WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
(WebCore::RenderBlockFlow::firstLineBoxBaseline):
(WebCore::RenderBlockFlow::inlineBlockBaseline):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::positionForBox):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
(WebCore::RenderBlockFlow::paintInlineChildren):
(WebCore::RenderBlockFlow::relayoutForPagination):
(WebCore::RenderBlockFlow::showLineTreeAndMark):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::lineBoxes):
(WebCore::RenderBlockFlow::firstLineBox):
(WebCore::RenderBlockFlow::lastLineBox):
(WebCore::RenderBlockFlow::firstRootBox):
(WebCore::RenderBlockFlow::lastRootBox):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
2013-10-20 Andreas Kling <akling@apple.com>
Avoid unnecessary vector copy in AnimationController event dispatch.
<https://webkit.org/b/122994>
Use Vector's move constructor instead of making a copy of the pending
events queue and then clearing it.
Reviewed by Simon Fraser.
2013-10-19 Brady Eidson <beidson@apple.com>
Add abstract IDBBackingStoreInterface, use it to get IDBDatabaseBackendLevelDB closer to going cross-platform
https://bugs.webkit.org/show_bug.cgi?id=123074
Reviewed by Andreas Kling.
* Modules/indexeddb/IDBBackingStoreInterface.h: Added.
(WebCore::IDBBackingStoreInterface::~IDBBackingStoreInterface):
(WebCore::IDBBackingStoreInterface::Transaction::~Transaction):
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseIntVersion):
(WebCore::IDBBackingStoreLevelDB::createObjectStore):
(WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
(WebCore::IDBBackingStoreLevelDB::getRecord):
(WebCore::IDBBackingStoreLevelDB::putRecord):
(WebCore::IDBBackingStoreLevelDB::clearObjectStore):
(WebCore::IDBBackingStoreLevelDB::deleteRecord):
(WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
(WebCore::IDBBackingStoreLevelDB::createIndex):
(WebCore::IDBBackingStoreLevelDB::deleteIndex):
(WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
(WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
(WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
(WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
(WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
(WebCore::IDBBackingStoreLevelDB::openIndexCursor):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
(WebCore::IDBBackingStoreLevelDB::Transaction::reset):
(WebCore::IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom):
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
(WebCore::IDBCursorBackendLevelDB::deleteFunction):
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
(WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys):
(WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
(WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed):
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
(WebCore::IDBTransactionBackendLevelDB::backingStoreTransaction):
* WebCore.xcodeproj/project.pbxproj:
* GNUmakefile.list.am:
2013-10-20 Andreas Kling <akling@apple.com>
Use PassRef for StyleSheetContents.
<https://webkit.org/b/123083>
Let functions that return newly-constructed StyleSheetContents
objects vend PassRef<StyleSheetContents> instead of PassRefPtr.
Updated functions that take StyleSheetContents in arguments
accordingly. And CSSStyleSheet now has a Ref internally. Woo!
Reviewed by Antti Koivisto.
2013-10-20 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Removing "unused parameter" compiling warnings from WebKit2 and WebCore
https://bugs.webkit.org/show_bug.cgi?id=123075
Reviewed by Andreas Kling.
No new tests needed.
* Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
(WebCore::RTCDTMFToneChangeEvent::create):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(lineAtPositionForAtkBoundary):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
2013-10-19 Andreas Kling <akling@apple.com>
Use PassRef for constructing StyleRules.
<https://webkit.org/b/123072>
Let functions that return newly-constructed StyleRuleFoo objects
vend PassRef<StyleRuleFoo> instead of PassRefPtr.
Since StyleRuleBase::copy() has to return something, we can't rely
on ASSERT_NOT_REACHED() + return nullptr anymore, so I've replaced
those with CRASH(). No call sites actually handled null anyway.
Reviewed by Sam Weinig.
2013-10-19 Jer Noble <jer.noble@apple.com>
Unreviewed roll out of r157695; broke Mac builds.
* Configurations/FeatureDefines.xcconfig:
2013-10-07 Jer Noble <jer.noble@apple.com>
[MSE] [Mac] Enable MediaSource on the Mac
https://bugs.webkit.org/show_bug.cgi?id=122484
Reviewed by Darin Adler.
Enable ENABLE_MEDIA_SOURCE.
* Configurations/FeatureDefines.xcconfig:
2013-10-19 Sam Weinig <sam@webkit.org>
CTTE: Tighten up type usage around InputType::innerTextElement()
https://bugs.webkit.org/show_bug.cgi?id=123078
Reviewed by Anders Carlsson.
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement):
* html/HTMLElement.h:
(WebCore::HTMLElement::isTextControlInnerTextElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::innerTextElement):
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::innerTextElement):
* html/HTMLTextAreaElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::hasVisibleTextArea):
(WebCore::HTMLTextFormControlElement::selection):
(WebCore::HTMLTextFormControlElement::innerTextValue):
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
* html/HTMLTextFormControlElement.h:
* html/InputType.h:
(WebCore::InputType::innerTextElement):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent):
(WebCore::TextFieldInputType::innerTextElement):
* html/TextFieldInputType.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerTextElement::renderer):
* html/shadow/TextControlInnerElements.h:
(WebCore::isTextControlInnerTextElement):
* rendering/RenderObject.h:
(WebCore::RenderObject::isTextControlInnerBlock):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::innerTextElement):
(WebCore::RenderTextControl::styleDidChange):
(WebCore::RenderTextControl::textBlockLogicalWidth):
(WebCore::RenderTextControl::updateFromElement):
(WebCore::RenderTextControl::computeLogicalHeight):
(WebCore::RenderTextControl::hitInnerTextElement):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::styleDidChange):
(WebCore::RenderTextControlSingleLine::autoscroll):
(WebCore::RenderTextControlSingleLine::scroll):
(WebCore::RenderTextControlSingleLine::logicalScroll):
* rendering/RenderTextControlSingleLine.h:
(WebCore::toRenderTextControlInnerBlock):
2013-10-19 Sam Weinig <sam@webkit.org>
Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 4)
https://bugs.webkit.org/show_bug.cgi?id=122969
Reviewed by Andreas Kling.
- Fix classes derived from RenderBlockFlow that were still calling
up to RenderBlock rather than RenderBlockFlow.
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::paint):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::computePreferredLogicalWidths):
(WebCore::RenderFieldset::paintBoxDecorations):
(WebCore::RenderFieldset::paintMask):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::styleDidChange):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::nodeAtPoint):
* rendering/RenderFullScreen.cpp:
(RenderFullScreenPlaceholder::willBeDestroyed):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::styleDidChange):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::styleDidChange):
(WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
(WebCore::RenderMultiColumnBlock::addChild):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::updateFromElement):
* rendering/RenderRuby.cpp:
(WebCore::RenderRubyAsBlock::styleDidChange):
(WebCore::RenderRubyAsBlock::addChild):
(WebCore::RenderRubyAsBlock::removeChild):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::rubyBaseSafe):
(WebCore::RenderRubyRun::addChild):
(WebCore::RenderRubyRun::removeChild):
(WebCore::RenderRubyRun::layout):
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::textAlignmentForLine):
(WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::willBeRemovedFromTree):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::willBeRemovedFromTree):
(WebCore::RenderTableCell::computePreferredLogicalWidths):
(WebCore::RenderTableCell::offsetFromContainer):
(WebCore::RenderTableCell::clippedOverflowRectForRepaint):
(WebCore::RenderTableCell::computeRectForRepaint):
(WebCore::RenderTableCell::styleDidChange):
(WebCore::RenderTableCell::borderLeft):
(WebCore::RenderTableCell::borderRight):
(WebCore::RenderTableCell::borderTop):
(WebCore::RenderTableCell::borderBottom):
(WebCore::RenderTableCell::borderStart):
(WebCore::RenderTableCell::borderEnd):
(WebCore::RenderTableCell::borderBefore):
(WebCore::RenderTableCell::borderAfter):
(WebCore::RenderTableCell::paint):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::styleDidChange):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::scrollWidth):
(WebCore::RenderTextControlSingleLine::scrollHeight):
(WebCore::RenderTextControlSingleLine::scrollLeft):
(WebCore::RenderTextControlSingleLine::scrollTop):
(WebCore::RenderTextControlSingleLine::scroll):
(WebCore::RenderTextControlSingleLine::logicalScroll):
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::layout):
* rendering/RenderView.cpp:
(WebCore::RenderView::layoutContent):
(WebCore::RenderView::addChild):
(WebCore::RenderView::visualOverflowRect):
(WebCore::RenderView::styleDidChange):
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::setStyle):
(WebCore::RenderSVGBlock::updateFromStyle):
(WebCore::RenderSVGBlock::willBeDestroyed):
(WebCore::RenderSVGBlock::styleWillChange):
(WebCore::RenderSVGBlock::styleDidChange):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::flowBoxForRenderer):
2013-10-19 Sam Weinig <sam@webkit.org>
Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=122969
Reviewed by Andreas Kling.
- Move containsNonZeroBidiLevel to RenderBlockFlow.
* editing/Editor.cpp:
(WebCore::Editor::hasBidiSelection):
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::containsNonZeroBidiLevel):
* rendering/RenderBlockFlow.h:
2013-10-18 Sam Weinig <sam@webkit.org>
Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=122969
Reviewed by Antti Koivisto.
- Move truncation (e.g. line clamp and ellipse) support to RenderBlockFlow.
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::EllipsisBox):
(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::markupBox):
(WebCore::EllipsisBox::selectionRect):
(WebCore::EllipsisBox::paintSelection):
(WebCore::EllipsisBox::nodeAtPoint):
* rendering/EllipsisBox.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::shouldCheckLines):
(WebCore::RenderBlockFlow::lineAtIndex):
(WebCore::RenderBlockFlow::lineCount):
(WebCore::getHeightForLineCount):
(WebCore::RenderBlockFlow::heightForLineCount):
(WebCore::RenderBlockFlow::clearTruncation):
* rendering/RenderBlockFlow.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::placeEllipsis):
2013-10-19 Andreas Kling <akling@apple.com>
StyleResolver should deal in PassRef<RenderStyle> where possible.
<https://webkit.org/b/123061>
Make StyleResolver functions that returned or took RenderStyles
by PassRefPtr use PassRef instead where possible.
Reviewed by Anders Carlsson.
2013-10-19 Brady Eidson <beidson@apple.com>
Global rename of the class "IDBBackingStore" to "IDBBackingStoreLevelDB"
Rubberstamped by Anders Carlsson (And Andreas Kling wanted to, but he wasn’t around)
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
2013-10-19 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Link fails.
https://bugs.webkit.org/show_bug.cgi?id=123019
Reviewed by Darin Adler.
Added empty CertificateInfo implementation for Curl.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/network/curl/CertificateInfoCurl.cpp: Added.
(WebCore::CertificateInfo::CertificateInfo):
(WebCore::CertificateInfo::~CertificateInfo):
2013-10-19 Filip Pizlo <fpizlo@apple.com>
libWebCoreTestSupport should have explicit exports
https://bugs.webkit.org/show_bug.cgi?id=123053
Reviewed by Oliver Hunt.
No new tests because there is no change in behavior.
* Configurations/WebCoreTestSupport.xcconfig:
* testing/js/WebCoreTestSupport.h:
2013-10-18 Andreas Kling <akling@apple.com>
Start passing RenderStyle around with PassRef.
<https://webkit.org/b/123051>
Made the RenderStyle::create methods return PassRef<RenderStyle>
and RenderElement::setStyle take a PassRef<RenderStyle>.
Reviewed by Darin Adler.
2013-10-18 Sam Weinig <sam@webkit.org>
Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=122969
Reviewed by Dan Bernstein.
- Make the RootInlineBox constructor take a RenderBlockFlow.
- Move createRootInlineBox, and createAndAppendRootInlineBox to RenderBlockFlow.
* editing/VisibleUnits.cpp:
(WebCore::absoluteLineDirectionPointToLocalPointInBlock):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::locationIncludingFlipping):
(WebCore::InlineBox::flipForWritingMode):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createRootInlineBox):
(WebCore::RenderBlockFlow::createAndAppendRootInlineBox):
(WebCore::createInlineBoxForRenderer):
(WebCore::RenderBlockFlow::createLineBoxes):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::positionLineBox):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::localSelectionRect):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::localSelectionRect):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::RootInlineBox):
(WebCore::RootInlineBox::rendererLineBoxes):
(WebCore::RootInlineBox::placeEllipsis):
(WebCore::RootInlineBox::containingRegion):
(WebCore::RootInlineBox::setContainingRegion):
(WebCore::RootInlineBox::alignBoxesInBlockDirection):
(WebCore::RootInlineBox::beforeAnnotationsAdjustment):
(WebCore::RootInlineBox::lineSnapAdjustment):
(WebCore::RootInlineBox::lineSelectionGap):
(WebCore::RootInlineBox::computeCaretRect):
(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
(WebCore::RootInlineBox::selectionBottom):
(WebCore::RootInlineBox::blockDirectionPointInLine):
(WebCore::RootInlineBox::blockFlow):
(WebCore::RootInlineBox::closestLeafChildForPoint):
(WebCore::RootInlineBox::removeLineBoxFromRenderObject):
(WebCore::RootInlineBox::extractLineBoxFromRenderObject):
(WebCore::RootInlineBox::attachLineBoxToRenderObject):
* rendering/RootInlineBox.h:
* rendering/TrailingFloatsRootInlineBox.h:
* rendering/svg/RenderSVGText.h:
(WebCore::toRenderSVGText):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::SVGRootInlineBox):
(WebCore::SVGRootInlineBox::renderSVGText):
(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
(WebCore::SVGRootInlineBox::layoutRootBox):
* rendering/svg/SVGRootInlineBox.h:
2013-10-18 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: Double-buffering and minimization of repaints
https://bugs.webkit.org/show_bug.cgi?id=123043
Reviewed by Simon Fraser.
No new tests, not yet testable.
* WebCore.exp.in:
Export one version of drawLayerContents and Region::contains.
* WebCore.xcodeproj/project.pbxproj:
Expose WebLayer.h as a private header.
* platform/graphics/mac/WebLayer.h:
Clean up this header, and add a new drawLayerContents that can operate without a CALayer.
* platform/graphics/mac/WebLayer.mm:
(WebCore::drawLayerContents):
Split drawLayerContents into one method that acquires properties CALayer,
and one that just does the painting.
2013-10-18 Anders Carlsson <andersca@apple.com>
Try to fix the Lion build.
* bindings/objc/ObjCNodeFilterCondition.h:
2013-10-18 Daniel Bates <dabates@apple.com>
[iOS] Upstream WebSafe{GCActivityCallback, IncrementalSweeper}IOS
https://bugs.webkit.org/show_bug.cgi?id=123049
Reviewed by Mark Hahnenberg.
* WebCore.xcodeproj/project.pbxproj:
* platform/ios/WebSafeGCActivityCallbackIOS.h: Added.
* platform/ios/WebSafeIncrementalSweeperIOS.h: Added.
2013-10-18 Anders Carlsson <andersca@apple.com>
Remove spaces between template angle brackets
https://bugs.webkit.org/show_bug.cgi?id=123040
Reviewed by Andreas Kling.
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/encryptedmedia/MediaKeys.h:
* Modules/geolocation/Geolocation.h:
* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::positionChanged):
(WebCore::GeolocationController::errorOccurred):
* Modules/geolocation/GeolocationController.h:
* Modules/indexeddb/IDBCallbacks.h:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
* Modules/indexeddb/IDBEventDispatcher.cpp:
(WebCore::IDBEventDispatcher::dispatch):
* Modules/indexeddb/IDBEventDispatcher.h:
* Modules/indexeddb/IDBKey.h:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent):
* Modules/indexeddb/IDBRequest.h:
(WebCore::IDBRequest::onSuccessWithPrefetch):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::dispatchEvent):
* Modules/indexeddb/IDBTransaction.h:
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::sortedTrackListForMenu):
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::activeRanges):
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/MediaSourceBase.cpp:
(WebCore::MediaSourceBase::buffered):
* Modules/mediasource/MediaSourceBase.h:
* Modules/mediasource/MediaSourceRegistry.cpp:
(WebCore::MediaSourceRegistry::unregisterURL):
* Modules/mediasource/MediaSourceRegistry.h:
* Modules/mediasource/SourceBufferList.h:
* Modules/mediasource/WebKitMediaSource.cpp:
(WebCore::WebKitMediaSource::activeRanges):
* Modules/mediasource/WebKitMediaSource.h:
* Modules/mediasource/WebKitSourceBufferList.h:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::scheduledEventTimerFired):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamRegistry.h:
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::scheduledEventTimerFired):
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::scheduledEventTimerFired):
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::stop):
(WebCore::RTCPeerConnection::scheduledEventTimerFired):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCStatsResponse.h:
(WebCore::RTCStatsResponse::result):
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.h:
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::getVoices):
* Modules/speech/SpeechSynthesis.h:
* Modules/webaudio/AudioBuffer.h:
* Modules/webaudio/AudioNode.h:
* Modules/webaudio/AudioNodeOutput.h:
* Modules/webaudio/MediaStreamAudioSource.cpp:
(WebCore::MediaStreamAudioSource::setAudioFormat):
(WebCore::MediaStreamAudioSource::consumeAudio):
* Modules/webaudio/PeriodicWave.h:
* Modules/webaudio/ScriptProcessorNode.h:
* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/DatabaseBackend.h:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::origins):
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::origins):
* Modules/webdatabase/DatabaseServer.h:
* Modules/webdatabase/DatabaseThread.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::interruptAllDatabasesForContext):
(WebCore::DatabaseTracker::origins):
(WebCore::DatabaseTracker::getOpenDatabases):
(WebCore::DatabaseTracker::deleteAllDatabases):
(WebCore::DatabaseTracker::deleteDatabaseFile):
* Modules/webdatabase/DatabaseTracker.h:
* Modules/webdatabase/SQLStatementBackend.cpp:
* Modules/webdatabase/SQLTransactionBackend.cpp:
* Modules/webdatabase/SQLTransactionBackend.h:
* Modules/webdatabase/SQLTransactionCoordinator.cpp:
(WebCore::SQLTransactionCoordinator::shutdown):
* Modules/webdatabase/SQLTransactionCoordinator.h:
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::didReceiveBinaryData):
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::processFrame):
* Modules/websockets/WebSocketChannel.h:
* Modules/websockets/WebSocketChannelClient.h:
(WebCore::WebSocketChannelClient::didReceiveBinaryData):
* Modules/websockets/WebSocketExtensionDispatcher.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::workerGlobalScopeDidReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::~AXObjectCache):
* accessibility/AXObjectCache.h:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::ariaLabeledByText):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityText::AccessibilityText):
* bindings/js/DOMWrapperWorld.h:
* bindings/js/JSDOMBinding.h:
(WebCore::toRefPtrNativeArray):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::call):
* bindings/js/JSMutationCallback.h:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
* bindings/js/PageScriptDebugServer.h:
* bindings/js/ScheduledAction.h:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::collectIsolatedContexts):
* bindings/js/ScriptController.h:
* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptProfile.cpp:
(WebCore::buildInspectorObjectFor):
* bindings/objc/ObjCNodeFilterCondition.h:
* bridge/objc/objc_class.h:
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::invalidate):
* bridge/runtime_root.h:
* css/BasicShapeFunctions.cpp:
(WebCore::basicShapeForValue):
* css/CSSBasicShapes.h:
(WebCore::CSSBasicShapePolygon::values):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForFilter):
* css/CSSFontFace.h:
* css/CSSFontFaceSource.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
(WebCore::CSSFontSelector::getFontFace):
(WebCore::CSSFontSelector::beginLoadTimerFired):
* css/CSSFontSelector.h:
* css/CSSGroupingRule.h:
* css/CSSImageGeneratorValue.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::adoptSelectorVector):
* css/CSSParserValues.h:
* css/CSSPropertySourceData.h:
* css/CSSRuleList.h:
(WebCore::StaticCSSRuleList::rules):
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::fontLoaded):
* css/CSSSegmentedFontFace.h:
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::adoptSelectorVector):
* css/CSSSelectorList.h:
* css/CSSStyleSheet.h:
* css/CSSValue.h:
(WebCore::compareCSSValueVector):
* css/CSSValuePool.h:
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets):
(WebCore::DocumentRuleSets::appendAuthorStyleSheets):
* css/DocumentRuleSets.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchedRuleList):
* css/ElementRuleCollector.h:
* css/FontLoader.h:
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
(WebCore::InspectorCSSOMWrappers::collectFromStyleSheets):
* css/InspectorCSSOMWrappers.h:
* css/MediaList.cpp:
(WebCore::MediaQuerySet::parse):
(WebCore::MediaList::item):
(WebCore::reportMediaQueryWarningIfNeeded):
* css/MediaList.h:
(WebCore::MediaQuerySet::queryVector):
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::eval):
* css/MediaQueryMatcher.h:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM):
* css/PropertySetCSSStyleDeclaration.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addToRuleSet):
(WebCore::RuleSet::addRegionRule):
(WebCore::RuleSet::addChildRules):
(WebCore::RuleSet::addRulesFromSheet):
* css/RuleSet.h:
* css/SelectorFilter.h:
* css/StyleInvalidationAnalysis.cpp:
(WebCore::StyleInvalidationAnalysis::analyzeStyleSheet):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::appendAuthorStyleSheets):
(WebCore::StyleResolver::keyframeStylesForAnimation):
(WebCore::StyleResolver::styleRulesForElement):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
(WebCore::StyleResolver::resolveVariables):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingSVGDocuments):
(WebCore::StyleResolver::loadPendingShaders):
* css/StyleResolver.h:
* css/StyleRule.cpp:
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
(WebCore::StyleRuleGroup::StyleRuleGroup):
(WebCore::StyleRuleMedia::StyleRuleMedia):
(WebCore::StyleRuleSupports::StyleRuleSupports):
(WebCore::StyleRuleRegion::StyleRuleRegion):
* css/StyleRule.h:
(WebCore::StyleRule::parserAdoptSelectorVector):
(WebCore::StyleRulePage::parserAdoptSelectorVector):
(WebCore::StyleRuleGroup::childRules):
(WebCore::StyleRuleMedia::create):
(WebCore::StyleRuleSupports::create):
(WebCore::StyleRuleRegion::create):
(WebCore::StyleRuleHost::create):
(WebCore::StyleRuleHost::StyleRuleHost):
* css/StyleScopeResolver.h:
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parserAppendRule):
(WebCore::childRulesHaveFailedOrCanceledSubresources):
* css/StyleSheetContents.h:
(WebCore::StyleSheetContents::childRules):
(WebCore::StyleSheetContents::importRules):
* css/StyleSheetList.cpp:
(WebCore::StyleSheetList::styleSheets):
(WebCore::StyleSheetList::item):
* css/StyleSheetList.h:
* css/WebKitCSSKeyframesRule.h:
(WebCore::StyleRuleKeyframes::keyframes):
* dom/CheckedRadioButtons.h:
* dom/ClientRectList.h:
* dom/ContainerNode.h:
(WebCore::ChildNodesLazySnapshot::nextNode):
(WebCore::ChildNodesLazySnapshot::takeSnapshot):
* dom/CrossThreadTask.h:
* dom/Document.cpp:
(WebCore::Document::webkitCancelFullScreen):
(WebCore::Document::webkitExitFullscreen):
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::didAssociateFormControlsTimerFired):
* dom/Document.h:
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::removeMarkers):
* dom/DocumentMarkerController.h:
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
(WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
(WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
(WebCore::styleSheetsUseRemUnits):
(WebCore::filterEnabledNonemptyCSSStyleSheets):
(WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/DocumentStyleSheetCollection.h:
* dom/Element.cpp:
(WebCore::Element::attrNodeList):
(WebCore::Element::webkitGetRegionFlowRanges):
* dom/Element.h:
* dom/EventListenerMap.h:
* dom/EventSender.h:
(WebCore::EventSender::timerFired):
* dom/IdTargetObserverRegistry.h:
* dom/MutationCallback.h:
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::takeRecords):
(WebCore::MutationObserver::deliver):
(WebCore::MutationObserver::deliverAllMutations):
* dom/MutationObserver.h:
* dom/MutationObserverRegistration.h:
* dom/NamedFlowCollection.cpp:
(WebCore::NamedFlowCollection::namedFlows):
* dom/NamedFlowCollection.h:
* dom/Node.cpp:
(WebCore::Node::didMoveToNewDocument):
(WebCore::Node::mutationObserverRegistry):
(WebCore::Node::registerMutationObserver):
(WebCore::Node::unregisterMutationObserver):
(WebCore::Node::notifyMutationObserversNodeWillDetach):
* dom/Node.h:
* dom/NodeRareData.h:
* dom/Range.cpp:
(WebCore::Range::processContents):
(WebCore::Range::processNodes):
(WebCore::Range::processAncestorsAndTheirSiblings):
* dom/Range.h:
* dom/ScopedEventQueue.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::reportException):
* dom/ScriptExecutionContext.h:
* dom/ScriptedAnimationController.h:
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::removeChildrenInRange):
(WebCore::CompositeEditCommand::deleteInsignificantText):
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
* editing/CompositeEditCommand.h:
* editing/EditingStyle.cpp:
(WebCore::htmlElementEquivalents):
(WebCore::EditingStyle::conflictsWithImplicitStyleOfElement):
(WebCore::htmlAttributeEquivalents):
(WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
(WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
(WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
(WebCore::styleFromMatchedRulesForElement):
* editing/Editor.cpp:
(WebCore::Editor::countMatchesForText):
* editing/Editor.h:
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock):
(WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
(WebCore::InsertParagraphSeparatorCommand::doApply):
* editing/InsertParagraphSeparatorCommand.h:
* editing/MergeIdenticalElementsCommand.cpp:
(WebCore::MergeIdenticalElementsCommand::doApply):
(WebCore::MergeIdenticalElementsCommand::doUnapply):
* editing/RemoveNodePreservingChildrenCommand.cpp:
(WebCore::RemoveNodePreservingChildrenCommand::doApply):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::removeUnrenderedNodes):
* editing/SimplifyMarkupCommand.cpp:
(WebCore::SimplifyMarkupCommand::doApply):
(WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):
* editing/SimplifyMarkupCommand.h:
* editing/SpellChecker.h:
* editing/SplitElementCommand.cpp:
(WebCore::SplitElementCommand::executeApply):
(WebCore::SplitElementCommand::doUnapply):
* editing/WrapContentsInDummySpanCommand.cpp:
(WebCore::WrapContentsInDummySpanCommand::executeApply):
(WebCore::WrapContentsInDummySpanCommand::doUnapply):
* editing/mac/AlternativeTextUIController.h:
* fileapi/FileList.h:
* history/BackForwardList.h:
* history/HistoryItem.cpp:
(WebCore::HistoryItem::setRedirectURLs):
* history/HistoryItem.h:
* history/mac/HistoryItemMac.mm:
(WebCore::HistoryItem::setTransientProperty):
* html/FormController.h:
* html/HTMLAnchorElement.cpp:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::append):
* html/HTMLCollection.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::checkValidity):
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::validateInteractively):
(WebCore::HTMLFormElement::checkValidity):
(WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
* html/HTMLFormElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::platformTextTracks):
(WebCore::HTMLMediaElement::configureTextTrackGroup):
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.cpp:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setLength):
* html/MediaController.cpp:
(MediaController::asyncEventTimerFired):
* html/MediaController.h:
* html/MediaFragmentURIParser.h:
* html/ValidationMessage.h:
* html/canvas/WebGLFramebuffer.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getAttachedShaders):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLTexture.h:
* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
* html/parser/BackgroundHTMLParser.h:
(WebCore::BackgroundHTMLParser::create):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::startBackgroundParser):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLMetaCharsetParser.h:
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::scan):
(WebCore::TokenPreloadScanner::scanCommon):
* html/parser/HTMLResourcePreloader.h:
* html/parser/XSSAuditor.h:
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ensureInsertionPointList):
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::invalidate):
* html/shadow/ContentDistributor.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* html/shadow/MediaControlElements.h:
* html/track/InbandGenericTextTrack.h:
* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::newCuesParsed):
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::newCuesAvailable):
(WebCore::LoadableTextTrack::newRegionsAvailable):
* html/track/TextTrackCueList.h:
* html/track/TextTrackList.cpp:
(TextTrackList::invalidateTrackIndexesAfterTrack):
(TextTrackList::remove):
(TextTrackList::contains):
* html/track/TextTrackList.h:
* html/track/TrackListBase.cpp:
(TrackListBase::asyncEventTimerFired):
* html/track/TrackListBase.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::getNewCues):
(WebCore::WebVTTParser::getNewRegions):
* html/track/WebVTTParser.h:
* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::addToFrontend):
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
(WebCore::ContentSearchUtils::lineEndings):
(WebCore::ContentSearchUtils::searchInTextByLines):
* inspector/ContentSearchUtils.h:
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchNode):
(WebCore::DOMPatchSupport::diff):
(WebCore::DOMPatchSupport::innerPatchChildren):
* inspector/DOMPatchSupport.h:
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::getProperties):
(WebCore::InjectedScript::getInternalProperties):
(WebCore::InjectedScript::wrapCallFrames):
* inspector/InjectedScript.h:
* inspector/InjectedScriptHost.h:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::enable):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorBaseAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::SelectorProfile::toInspectorObject):
(WebCore::UpdateRegionLayoutTask::onTimer):
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
(WebCore::InspectorCSSAgent::buildArrayForRuleList):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
(WebCore::InspectorCSSAgent::buildArrayForRegions):
(WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::RevalidateStyleAttributeTask::onTimer):
(WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
(WebCore::InspectorDOMAgent::pushNodePathToFrontend):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::getSearchResults):
(WebCore::InspectorDOMAgent::getAttributes):
(WebCore::InspectorDOMAgent::buildObjectForNode):
(WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
(WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
(WebCore::InspectorDOMAgent::styleAttributeInvalidated):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::currentCallFrames):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorHistory.h:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::layersForNode):
(WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
(WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::buildArrayForCookies):
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getProfileHeaders):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::getProperties):
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorState.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::asCSSRuleList):
(WebCore::InspectorStyle::buildArrayForComputedStyle):
(WebCore::InspectorStyle::styleWithProperties):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::lineEndings):
(WebCore::InspectorStyleSheet::buildArrayForRuleList):
(WebCore::InspectorStyleSheetForInlineStyle::lineEndings):
* inspector/InspectorStyleSheet.h:
* inspector/InspectorValues.cpp:
(WebCore::InspectorArrayBase::writeJSON):
* inspector/InspectorValues.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* inspector/ScriptCallStack.cpp:
(WebCore::ScriptCallStack::buildInspectorArray):
* inspector/ScriptCallStack.h:
* loader/CrossOriginPreflightResultCache.h:
* loader/DocumentLoader.cpp:
(WebCore::cancelAll):
(WebCore::setAllDefersLoading):
(WebCore::DocumentLoader::getSubresources):
* loader/DocumentLoader.h:
* loader/FormState.h:
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* loader/ProgressTracker.h:
* loader/ResourceLoadScheduler.h:
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::getNewCues):
(WebCore::TextTrackLoader::getNewRegions):
* loader/TextTrackLoader.h:
* loader/WorkerThreadableLoader.cpp:
(WebCore::workerGlobalScopeDidReceiveData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::removeResource):
(WebCore::ApplicationCache::dump):
* loader/appcache/ApplicationCache.h:
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::getOriginsWithCache):
* loader/archive/Archive.cpp:
(WebCore::Archive::clearAllSubframeArchives):
(WebCore::Archive::clearAllSubframeArchivesImpl):
* loader/archive/Archive.h:
(WebCore::Archive::subresources):
(WebCore::Archive::subframeArchives):
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::addAllResources):
* loader/archive/ArchiveResourceCollection.h:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::createFromSelection):
* loader/archive/cf/LegacyWebArchive.h:
* loader/archive/mhtml/MHTMLParser.h:
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.h:
* loader/cache/MemoryCache.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::notifyPendingLoadDecisions):
* loader/icon/IconDatabase.h:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):
* page/CaptionUserPreferencesMediaAF.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::didAssociateFormControls):
* page/Console.h:
* page/ContentSecurityPolicy.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):
* page/DeviceController.cpp:
(WebCore::DeviceController::dispatchDeviceEvent):
(WebCore::DeviceController::fireDeviceEvent):
* page/DeviceController.h:
* page/EditorClient.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::handleTouchEvent):
* page/EventHandler.h:
* page/FrameView.cpp:
(WebCore::FrameView::serviceScriptedAnimations):
* page/Page.cpp:
(WebCore::Page::findStringMatchingRanges):
* page/Page.h:
* page/PageGroup.h:
* page/Performance.cpp:
(WebCore::Performance::webkitGetEntriesByType):
(WebCore::Performance::webkitGetEntriesByName):
* page/Performance.h:
* page/PerformanceEntryList.cpp:
(WebCore::PerformanceEntryList::appendAll):
* page/PerformanceEntryList.h:
* page/SecurityOriginHash.h:
* page/SecurityPolicy.cpp:
* page/SpeechInputResult.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
* page/animation/AnimationControllerPrivate.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* page/animation/CompositeAnimation.h:
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::appendChild):
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::children):
* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
* page/scrolling/ScrollingThread.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::appendChild):
* page/scrolling/ScrollingTreeNode.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::syncChildPositions):
* platform/CrossThreadCopier.cpp:
* platform/CrossThreadCopier.h:
* platform/DragData.h:
* platform/MainThreadTask.h:
* platform/PODFreeListArena.h:
(WebCore::PODFreeListArena::freeObject):
(WebCore::PODFreeListArena::allocate):
* platform/PODIntervalTree.h:
* platform/PODRedBlackTree.h:
(WebCore::PODRedBlackTree::PODRedBlackTree):
* platform/PlatformSpeechSynthesizer.cpp:
(WebCore::PlatformSpeechSynthesizer::voiceList):
* platform/PlatformSpeechSynthesizer.h:
* platform/RunLoop.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::frameRectsChanged):
(WebCore::ScrollView::clipRectChanged):
(WebCore::ScrollView::setParentVisible):
(WebCore::ScrollView::show):
(WebCore::ScrollView::hide):
* platform/ScrollView.h:
* platform/SharedBuffer.h:
* platform/Supplementable.h:
(WebCore::Supplement::provideTo):
(WebCore::Supplementable::provideSupplement):
* platform/URL.cpp:
(WebCore::findHostnamesInMailToURL):
(WebCore::encodeHostnames):
* platform/audio/AudioBus.h:
* platform/audio/AudioDSPKernelProcessor.h:
* platform/audio/AudioResampler.h:
* platform/audio/DynamicsCompressor.h:
* platform/audio/DynamicsCompressorKernel.h:
* platform/audio/HRTFDatabase.h:
* platform/audio/HRTFKernel.h:
* platform/audio/MultiChannelResampler.h:
* platform/audio/Reverb.h:
* platform/audio/ReverbConvolver.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::copyBufferAndClear):
(WebCore::SharedBuffer::copySomeDataFromDataArray):
* platform/graphics/FloatPolygon.cpp:
(WebCore::FloatPolygon::FloatPolygon):
* platform/graphics/FloatPolygon.h:
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getCachedFontData):
(WebCore::FontCache::purgeInactiveFontData):
* platform/graphics/GlyphMetricsMap.h:
(WebCore::::locatePageSlowCase):
* platform/graphics/GlyphPageTreeNode.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/PlatformTextTrackMenu.h:
* platform/graphics/SimpleFontData.h:
* platform/graphics/WidthCache.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
(WebCore::GraphicsLayerCA::fetchCloneLayers):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/LayerPool.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
(PlatformCAAnimation::setValues):
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/cg/SubimageCacheWithTimer.h:
* platform/graphics/filters/CustomFilterParameterList.h:
* platform/graphics/filters/FilterEffect.h:
* platform/graphics/filters/FilterOperations.h:
(WebCore::FilterOperations::operations):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::Texture):
(WebCore::Texture::create):
* platform/graphics/gpu/Texture.h:
* platform/graphics/mac/ComplexTextController.h:
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::SimpleFontData::getCFStringAttributes):
* platform/graphics/transforms/TransformOperations.h:
(WebCore::TransformOperations::operations):
* platform/ios/PasteboardIOS.mm:
(WebCore::documentFragmentWithRTF):
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
* platform/mediastream/MediaStreamDescriptor.h:
* platform/mediastream/MediaStreamSource.h:
* platform/mediastream/RTCConfiguration.h:
* platform/network/BlobRegistryImpl.h:
* platform/network/HTTPHeaderMap.h:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::parseCacheControlDirectives):
(WebCore::parseCacheHeader):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::clientCerts):
(WebCore::ResourceHandle::createCFURLConnection):
* platform/text/cf/HyphenationCF.cpp:
(WebCore::::createValueForNullKey):
(WebCore::::createValueForKey):
(WebCore::cfLocaleCache):
* plugins/PluginMainThreadScheduler.h:
* rendering/HitTestResult.h:
* rendering/InlineFlowBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintContinuationOutlines):
(WebCore::RenderBlock::removeFromTrackedRendererMaps):
* rendering/RenderBlock.h:
* rendering/RenderButton.h:
* rendering/RenderCounter.cpp:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::GridIterator):
* rendering/RenderGrid.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
(WebCore::RenderLayer::rebuildZOrderLists):
(WebCore::RenderLayer::collectLayers):
* rendering/RenderLayer.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::getRanges):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::getRanges):
* rendering/RenderRegion.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::selectionBounds):
(WebCore::RenderView::setSelection):
* rendering/RootInlineBox.h:
* rendering/shapes/PolygonShape.cpp:
(WebCore::computeShapePaddingBounds):
(WebCore::computeShapeMarginBounds):
* rendering/shapes/PolygonShape.h:
(WebCore::PolygonShape::PolygonShape):
* rendering/shapes/Shape.cpp:
(WebCore::createPolygonShape):
(WebCore::Shape::createShape):
* rendering/shapes/ShapeInfo.h:
* rendering/shapes/ShapeInterval.h:
* rendering/style/QuotesData.cpp:
(WebCore::QuotesData::create):
(WebCore::QuotesData::QuotesData):
* rendering/style/QuotesData.h:
* rendering/style/RenderStyle.cpp:
(WebCore::requireTransformOrigin):
(WebCore::RenderStyle::applyTransform):
* rendering/style/StyleGridData.h:
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/SVGResourcesCache.h:
* storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
(WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
* storage/StorageEventDispatcher.h:
* storage/StorageNamespaceImpl.h:
* storage/StorageThread.h:
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::origins):
* storage/StorageTracker.h:
* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
* svg/SVGAnimatedTypeAnimator.cpp:
(WebCore::SVGElementAnimatedProperties::SVGElementAnimatedProperties):
(WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
* svg/SVGAnimatedTypeAnimator.h:
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::startAnimations):
(WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
(WebCore::SVGDocumentExtensions::addPendingResource):
(WebCore::SVGDocumentExtensions::isElementPendingResources):
(WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
(WebCore::SVGDocumentExtensions::setOfElementsReferencingTarget):
(WebCore::SVGDocumentExtensions::addElementReferencingTarget):
(WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget):
* svg/SVGDocumentExtensions.h:
* svg/SVGFontElement.h:
* svg/SVGGlyphMap.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientTypeAnimated):
* svg/SVGMarkerElement.h:
* svg/SVGPathSegList.h:
* svg/animation/SMILTimeContainer.h:
* svg/graphics/SVGImageCache.h:
* svg/graphics/filters/SVGFilterBuilder.h:
(WebCore::SVGFilterBuilder::addBuiltinEffects):
* svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
(WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
* svg/properties/SVGAnimatedListPropertyTearOff.h:
(WebCore::SVGAnimatedListPropertyTearOff::create):
* svg/properties/SVGAnimatedPropertyTearOff.h:
(WebCore::SVGAnimatedPropertyTearOff::create):
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
(WebCore::SVGAnimatedStaticPropertyTearOff::create):
* svg/properties/SVGAttributeToPropertyMap.cpp:
(WebCore::SVGAttributeToPropertyMap::animatedPropertiesForAttribute):
* svg/properties/SVGAttributeToPropertyMap.h:
* svg/properties/SVGStaticListPropertyTearOff.h:
(WebCore::SVGStaticListPropertyTearOff::create):
* svg/properties/SVGTransformListPropertyTearOff.h:
(WebCore::SVGTransformListPropertyTearOff::create):
(WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
(WebCore::SVGTransformListPropertyTearOff::consolidate):
* workers/DefaultSharedWorkerRepository.h:
* workers/WorkerMessagingProxy.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
* xml/XMLHttpRequestProgressEventThrottle.h:
* xml/XPathNodeSet.cpp:
(WebCore::XPath::NodeSet::sort):
(WebCore::XPath::NodeSet::traversalSort):
* xml/XSLStyleSheet.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
2013-10-18 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Cleaning warning messages from StyleResolveTree
https://bugs.webkit.org/show_bug.cgi?id=123030
Reviewed by Andreas Kling.
No new tests needed.
* style/StyleResolveTree.cpp:
(WebCore::Style::elementInsideRegionNeedsRenderer):
(WebCore::Style::createRendererIfNeeded):
2013-10-18 Brady Eidson <beidson@apple.com>
Get rid of IDBFactoryBackendLevelDB and IDBTransactionBackendLevelDB in IDBDatabaseBackendLevelDB.
https://bugs.webkit.org/show_bug.cgi?id=123039
Reviewed by Anders Carlsson.
Add a few concepts to the interfaces to make this work:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
(WebCore::IDBTransactionBackendInterface::id):
(WebCore::IDBTransactionBackendInterface::IDBTransactionBackendInterface):
Adapt to using Interface ptr’s instead of LevelDB ptr’s:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
(WebCore::IDBDatabaseBackendLevelDB::create):
(WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
(WebCore::IDBDatabaseBackendLevelDB::createObjectStore):
(WebCore::IDBDatabaseBackendLevelDB::deleteObjectStore):
(WebCore::IDBDatabaseBackendLevelDB::createIndex):
(WebCore::IDBDatabaseBackendLevelDB::deleteIndex):
(WebCore::IDBDatabaseBackendLevelDB::get):
(WebCore::IDBDatabaseBackendLevelDB::put):
(WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
(WebCore::IDBDatabaseBackendLevelDB::setIndexesReady):
(WebCore::IDBDatabaseBackendLevelDB::openCursor):
(WebCore::IDBDatabaseBackendLevelDB::count):
(WebCore::IDBDatabaseBackendLevelDB::deleteRange):
(WebCore::IDBDatabaseBackendLevelDB::clear):
(WebCore::IDBDatabaseBackendLevelDB::transactionStarted):
(WebCore::IDBDatabaseBackendLevelDB::transactionFinished):
(WebCore::IDBDatabaseBackendLevelDB::transactionFinishedAndAbortFired):
(WebCore::IDBDatabaseBackendLevelDB::transactionFinishedAndCompleteFired):
(WebCore::IDBDatabaseBackendLevelDB::runIntVersionChangeTransaction):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
(WebCore::IDBObjectStoreBackendLevelDB::makeIndexWriters):
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
(WebCore::IDBTransactionBackendLevelDB::abort):
(WebCore::IDBTransactionBackendLevelDB::commit):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2013-10-18 Dean Jackson <dino@apple.com>
Unable to upload <img src="foo.svg"> as WebGL texture
https://bugs.webkit.org/show_bug.cgi?id=123035
Reviewed by Tim Horton.
If the HTMLImageElement passed to texture2D is an SVG
image, paint it first into a bitmap buffer and upload that.
Note that the SVG image still needs to have an intrinsic
or explicit size - see how the test case must set width and
height.
I also renamed the cache of ImageBuffers since it is
no longer only being used for video frames.
Test: fast/canvas/webgl/tex-image-and-sub-image-2d-with-svg-image.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::WebGLRenderingContext): Rename m_videoCache to m_generatedImageCache.
(WebCore::WebGLRenderingContext::drawImageIntoBuffer): New method that creates an ImageBuffer
of the appropriate size and renders into that.
(WebCore::WebGLRenderingContext::texImage2D): If we see an SVG image, render it first.
(WebCore::WebGLRenderingContext::videoFrameToImage): Renamed m_generatedImageCache.
(WebCore::WebGLRenderingContext::texSubImage2D): If we see an SVG image, render it first.
* html/canvas/WebGLRenderingContext.h: Renaming.
2013-10-18 Brady Eidson <beidson@apple.com>
Move IDBTransactionBackend operations to the IDBTransactionBackend itself..
https://bugs.webkit.org/show_bug.cgi?id=123028
Reviewed by Alexey Proskuryakov.
This gets rid of a big blob of LevelDB specific code from IDBDatabaseBackendLevelDB.cpp,
bringing us much closer to having it be cross platform.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/indexeddb/IDBTransactionBackendInterface.h: Added.
(WebCore::IDBTransactionBackendInterface::~IDBTransactionBackendInterface):
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
(WebCore::IDBCursorBackendLevelDB::CursorAdvanceOperation::perform): Update for new method signature.
(WebCore::IDBCursorBackendLevelDB::CursorIterationOperation::perform): Ditto.
(WebCore::IDBCursorBackendLevelDB::CursorPrefetchIterationOperation::perform): Ditto.
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp: Move all operations into
IDBTransactionBackendLevelDBOperations, then start scheduling them using the new
IDBTransactionBackendInterface scheduling methods.
(WebCore::IDBDatabaseBackendLevelDB::createObjectStore):
(WebCore::IDBDatabaseBackendLevelDB::deleteObjectStore):
(WebCore::IDBDatabaseBackendLevelDB::createIndex):
(WebCore::IDBDatabaseBackendLevelDB::deleteIndex):
(WebCore::IDBDatabaseBackendLevelDB::get):
(WebCore::IDBDatabaseBackendLevelDB::put):
(WebCore::IDBDatabaseBackendLevelDB::setIndexesReady):
(WebCore::IDBDatabaseBackendLevelDB::openCursor):
(WebCore::IDBDatabaseBackendLevelDB::count):
(WebCore::IDBDatabaseBackendLevelDB::deleteRange):
(WebCore::IDBDatabaseBackendLevelDB::clear):
(WebCore::IDBDatabaseBackendLevelDB::createTransaction):
(WebCore::IDBDatabaseBackendLevelDB::runIntVersionChangeTransaction):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h: Move definitions of PendingOpenCall and
PendingDeleteCall to the header.
(WebCore::IDBDatabaseBackendLevelDB::PendingOpenCall::create):
(WebCore::IDBDatabaseBackendLevelDB::PendingOpenCall::callbacks):
(WebCore::IDBDatabaseBackendLevelDB::PendingOpenCall::databaseCallbacks):
(WebCore::IDBDatabaseBackendLevelDB::PendingOpenCall::version):
(WebCore::IDBDatabaseBackendLevelDB::PendingOpenCall::transactionId):
(WebCore::IDBDatabaseBackendLevelDB::PendingOpenCall::PendingOpenCall):
(WebCore::IDBDatabaseBackendLevelDB::PendingDeleteCall::create):
(WebCore::IDBDatabaseBackendLevelDB::PendingDeleteCall::callbacks):
(WebCore::IDBDatabaseBackendLevelDB::PendingDeleteCall::PendingDeleteCall):
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Add a newly required include.
* Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp: Ditto.
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp: Implement the new interface to
handle scheduling of operations in a cross platform manner, then rely on the new
IDBTransactionBackendLevelDBOperations classes for the actual operations.
(WebCore::IDBTransactionBackendLevelDB::create):
(WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
(WebCore::IDBTransactionBackendLevelDB::abort):
(WebCore::IDBTransactionBackendLevelDB::taskTimerFired):
(WebCore::IDBTransactionBackendLevelDB::scheduleCreateObjectStoreOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleDeleteObjectStoreOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleVersionChangeOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleCreateIndexOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleDeleteIndexOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleGetOperation):
(WebCore::IDBTransactionBackendLevelDB::schedulePutOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleSetIndexesReadyOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleOpenCursorOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleCountOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleDeleteRangeOperation):
(WebCore::IDBTransactionBackendLevelDB::scheduleClearOperation):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp: Added.
Move all the LevelDB transaction operations from IDBDatabaseBackendLevelDB to here.
(WebCore::CreateObjectStoreOperation::perform):
(WebCore::CreateIndexOperation::perform):
(WebCore::CreateIndexAbortOperation::perform):
(WebCore::DeleteIndexOperation::perform):
(WebCore::DeleteIndexAbortOperation::perform):
(WebCore::GetOperation::perform):
(WebCore::PutOperation::perform):
(WebCore::SetIndexesReadyOperation::perform):
(WebCore::OpenCursorOperation::perform):
(WebCore::CountOperation::perform):
(WebCore::DeleteRangeOperation::perform):
(WebCore::ClearOperation::perform):
(WebCore::DeleteObjectStoreOperation::perform):
(WebCore::IDBDatabaseBackendLevelDB::VersionChangeOperation::perform):
(WebCore::CreateObjectStoreAbortOperation::perform):
(WebCore::DeleteObjectStoreAbortOperation::perform):
(WebCore::IDBDatabaseBackendLevelDB::VersionChangeAbortOperation::perform):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h: Added.
(WebCore::CreateObjectStoreOperation::create):
(WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
(WebCore::DeleteObjectStoreOperation::create):
(WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
(WebCore::IDBDatabaseBackendLevelDB::VersionChangeOperation::create):
(WebCore::IDBDatabaseBackendLevelDB::VersionChangeOperation::VersionChangeOperation):
(WebCore::CreateObjectStoreAbortOperation::create):
(WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
(WebCore::DeleteObjectStoreAbortOperation::create):
(WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
(WebCore::IDBDatabaseBackendLevelDB::VersionChangeAbortOperation::create):
(WebCore::IDBDatabaseBackendLevelDB::VersionChangeAbortOperation::VersionChangeAbortOperation):
(WebCore::CreateIndexOperation::create):
(WebCore::CreateIndexOperation::CreateIndexOperation):
(WebCore::CreateIndexAbortOperation::create):
(WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
(WebCore::DeleteIndexOperation::create):
(WebCore::DeleteIndexOperation::DeleteIndexOperation):
(WebCore::DeleteIndexAbortOperation::create):
(WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
(WebCore::GetOperation::create):
(WebCore::GetOperation::GetOperation):
(WebCore::PutOperation::create):
(WebCore::PutOperation::PutOperation):
(WebCore::SetIndexesReadyOperation::create):
(WebCore::SetIndexesReadyOperation::SetIndexesReadyOperation):
(WebCore::OpenCursorOperation::create):
(WebCore::OpenCursorOperation::OpenCursorOperation):
(WebCore::CountOperation::create):
(WebCore::CountOperation::CountOperation):
(WebCore::DeleteRangeOperation::create):
(WebCore::DeleteRangeOperation::DeleteRangeOperation):
(WebCore::ClearOperation::create):
(WebCore::ClearOperation::ClearOperation):
2013-10-18 Beth Dakin <bdakin@apple.com>
Rubber-banding is often not smooth on infinitely scrolling websites
https://bugs.webkit.org/show_bug.cgi?id=122985
Reviewed by Simon Fraser.
totalContentsSize is an important part of the calculation for
maximumScrollPosition(). This function is called repeatedly throughout the curve
of a rubber-band to determine the stretch amount. To keep the rubber-band
animation smooth, it should be allowed to finish its animation using the old
totalContentsSize. This patch does that by adding a new variable,
m_totalContentsSizeForRubberBand. This value should almost always be equivalent to
m_totalContentsSize. It will only vary if m_totalContentsSize has changed in the
middle of a rubber-band, and in that case, it will stay equivalent to the old
totalContentSize value until the rubber band animation finishes.
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::totalContentsSizeForRubberBand):
(WebCore::ScrollingTreeScrollingNode::setTotalContentsSizeForRubberBand):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::stopSnapRubberbandTimer):
(WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
2013-10-18 ChangSeok Oh <changseok.oh@collabora.com>
Unreviewed build fix for --no-svg option.
m_svgStyle of RenderStyle is guarded with the ENABLE_SVG flag.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
2013-10-17 Brady Eidson <beidson@apple.com>
Cleanup the Modules group in the WebCore.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=123009
Rubberstamped by Antti Koivisto.
* WebCore.xcodeproj/project.pbxproj:
2013-10-18 Denis Nomiyama <d.nomiyama@samsung.com>
[ATK] Fix invalid signal to set objects to an unknown state "layout-complete"
https://bugs.webkit.org/show_bug.cgi?id=122970
Reviewed by Mario Sanchez Prada.
Removed an invalid signal to set objects to an unknown state
layout-complete. This signal was originally generated to notify DRT
and WKTR in case of page load complete.
It was replaced by ATK:AtkDocument:load-complete, which is already sent
by AXObjectCache::frameLoadingEventPlatformNotification().
There is no new test since the changes are covered by existing ones
(e.g. accessibility/loading-iframe-sends-notification.html).
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification): Removed an invalid
signal to set objects to an unknown state layout-complete.
2013-10-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Generate API documentation for GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=121538
Reviewed by Gustavo Noronha Silva.
* bindings/gobject/GNUmakefile.am: Add a explicit rule for all
.symbols file making them depend on the corresponding header file,
since the .symbols file is generated by the bindings generator.
2013-10-18 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Simplify implementation of atk_text_get_text
https://bugs.webkit.org/show_bug.cgi?id=122644
Reviewed by Chris Fleizach.
Simplified code so we only call textUnderElement() directly once
and only when needed. Also, moved the specific code for ColorWell
objects up to the beginning of that function, so we don't do any
additional efforts like computing text ranges in those cases.
No new tests are needed, just to make sure that the current layout
and unit tests are still passing, which they are.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(textForObject): Fixed a issue that got detected while working on
this patch, which was causing a '\n' to be artificially appended
at the end of text controls all the time.
(webkitAccessibleTextGetText): Simplified function.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::doAXStringForRange): Removed
the check that prevents from pass ranges exceeding the limits of
the element's text, since those will be checked anyway when
calling String::substring().
2013-10-18 Brendan Long <b.long@cablelabs.com>
[GStreamer][GTK] Add GRefPtr::outPtr()
https://bugs.webkit.org/show_bug.cgi?id=122996
Reviewed by Philippe Normand.
No new tests because this is just simplifying existing code.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr specialization for GstToc.
* platform/graphics/gstreamer/GRefPtrGStreamer.h: Same.
* platform/graphics/gstreamer/GStreamerGWorld.cpp: Use GRefPtr::outPtr() to simplify code.
(WebCore::GStreamerGWorld::enterFullscreen):
(WebCore::GStreamerGWorld::exitFullscreen):
(WebCore::GStreamerGWorld::removePlatformVideoSink):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Same.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
(WebCore::MediaPlayerPrivateGStreamer::newTextSample):
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContents):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Same.
(WebCore::MediaPlayerPrivateGStreamerBase::currentVideoSinkCaps):
* platform/network/soup/ResourceHandleSoup.cpp: Same.
(WebCore::HostTLSCertificateSet::computeCertificateHash):
2013-10-17 Alexey Proskuryakov <ap@apple.com>
Don't add an include for return type of a [Custom] function in generated bindings code
https://bugs.webkit.org/show_bug.cgi?id=122972
Reviewed by Sam Weinig.
* bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Don't.
2013-10-17 Andreas Kling <akling@apple.com>
CTTE: RenderMathMLSpace always has a MathMLTextElement.
<https://webkit.org/b/122992>
The renderer is never anonymous and always has a corresponding
MathMLTextElement. Overload element() with a tighter return type.
Also marked the class FINAL and made most methods private.
Reviewed by Antti Koivisto.
* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::RenderMathMLSpace):
(WebCore::RenderMathMLSpace::updateFromElement):
* rendering/mathml/RenderMathMLSpace.h:
2013-10-17 Tim Horton <timothy_horton@apple.com>
PlatformCALayer constructor should take layer type as an argument
https://bugs.webkit.org/show_bug.cgi?id=122915
Reviewed by Anders Carlsson.
No new tests, just restoring old code.
Un-do part of the patch for bug 122915; we can't early-return
in the constructor, there's still more work to do.
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::PlatformCALayerMac):
2013-10-17 Alexandru Chiculita <achicu@adobe.com>
Web Inspector: [CSS Regions] Crash when highlighting a node of a flow with no regions
https://bugs.webkit.org/show_bug.cgi?id=122993
Reviewed by Joseph Pecoraro.
Test: inspector-protocol/dom/highlight-flow-with-no-region.html
Even if a named flow has no regions the content of the flow will still have renderer objects created.
Removed the assumption that all renderers inside a RenderFlowThread will always have an enclosing RenderRegion.
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForRendererFragments):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
2013-10-17 Andreas Kling <akling@apple.com>
CTTE: RenderMathMLOperator always has a MathMLElement.
<https://webkit.org/b/122988>
Reviewed by Antti Koivisto.
The renderer is never anonymous and always has a corresponding
MathMLElement. Overload element() with a tighter return type.
Also marked the class FINAL and made most methods private.
2013-10-17 Nico Weber <thakis@chromium.org>
Fix three bugs in the equals() implementations for css gradients.
https://bugs.webkit.org/show_bug.cgi?id=122987
Reviewed by Andreas Kling.
1. Linear gradients were considered equal if the first gradient has no x and y
position and the second has no x but does have y.
2. Same as 1, for radial gradients. (This doesn't happen in practice as
CSSParser::parseRadialGradient rejects such input, so no test for this case.)
3. Radial gradients without x and y position weren't considered equal even if
they were.
* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::equals):
(WebCore::CSSRadialGradientValue::equals):
2013-10-17 Antoine Quint <graouts@apple.com>
Web Inspector: allow front-end to trigger the system beep sound to signal an error
https://bugs.webkit.org/show_bug.cgi?id=122955
Reviewed by Timothy Hatcher.
New beep() method exposed on InspectorFrontendHost calling into WebCore's systemBeep().
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::beep):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
2013-10-17 Anders Carlsson <andersca@apple.com>
Remove PlatformCAAnimation::supportsValueFunction()
https://bugs.webkit.org/show_bug.cgi?id=122990
Reviewed by Tim Horton.
PlatformCAAnimation::supportsValueFunction always returns true now, so there's no need for it to exist anymore.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2013-10-17 Andreas Kling <akling@apple.com>
CTTE: RenderMathMLFenced always has a MathMLInlineContainerElement.
<https://webkit.org/b/122986>
This renderer is never anonymous and always has a corresponding
MathMLInlineContainerElement. Overload element() with a tighter
return type.
Also marked the class FINAL and made most methods private.
Reviewed by Anders Carlsson.
2013-10-17 Myles C. Maxfield <mmaxfield@apple.com>
Comment AffineTransform::xScale() and yScale() to make their meanings clearer
https://bugs.webkit.org/show_bug.cgi?id=122981
Reviewed by Simon Fraser.
* platform/graphics/transforms/AffineTransform.h:
2013-10-17 Vivek Galatage <vivek.vg@samsung.com>
Remove unnecessary check for RenderLayer and rename ensureLayer to createLayer in RenderLayerModelObject.
https://bugs.webkit.org/show_bug.cgi?id=122928
Reviewed by Darin Adler.
No new tests due to code refactoring.
RenderLayerModelObject::styleDidChange invokes the ensureLayer() only in case of !layer().
Again checking for layer existence would be deemed redundant in ensureLayer.
Replacing it with an ASSERT(!m_layer) and also renaming it to createLayer.
Blink review URL: https://codereview.chromium.org/27246003/
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::createLayer):
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/RenderLayerModelObject.h:
2013-10-17 Tim Horton <timothy_horton@apple.com>
Remove PlatformCALayerMac workaround for <rdar://problem/7390716>
https://bugs.webkit.org/show_bug.cgi?id=122983
Reviewed by Simon Fraser.
Remove a workaround for a bug fixed in Lion.
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::setSublayers):
(PlatformCALayerMac::removeAllSublayers):
(PlatformCALayerMac::adoptSublayers):
2013-10-17 Robert Hogan <robert@webkit.org>
"border-collapse: collapse;" for table removes part of its border (was: Border disappears when close to some elements)
https://bugs.webkit.org/show_bug.cgi?id=8914
Reviewed by David Hyatt.
The table section's side of a collapsed border won't get painted if there are no cells there to paint it. So instead
of relying solely on cells to paint the collapsed border paint the appropriate section of the border if there's no
cell to take care of it.
Tests: fast/table/paint-section-borders-without-cells-rtl.html
fast/table/paint-section-borders-without-cells-vertical-lr-rtl.html
fast/table/paint-section-borders-without-cells-vertical-lr.html
fast/table/paint-section-borders-without-cells-vertical-rl.html
fast/table/paint-section-borders-without-cells.html
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintRowGroupBorder):
(WebCore::RenderTableSection::offsetLeftForRowGroupBorder):
(WebCore::RenderTableSection::offsetTopForRowGroupBorder):
(WebCore::RenderTableSection::verticalRowGroupBorderHeight):
(WebCore::RenderTableSection::horizontalRowGroupBorderWidth):
(WebCore::RenderTableSection::paintRowGroupBorderIfRequired):
(WebCore::physicalBorderForDirection):
(WebCore::RenderTableSection::paintObject):
* rendering/RenderTableSection.h:
2013-10-17 Andreas Kling <akling@apple.com>
StyleRuleFoo::mutableProperties() should return a reference.
<https://webkit.org/b/122962>
The mutableProperties() functions always return objects, so make
them return MutableStylePropertySet&.
Also tweaked the StyleRuleCSSStyleDeclaration constructor to take
references to both the properties and the owner rule since both
are required.
Reviewed by Antti Koivisto.
2013-10-17 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Improve the performance of image valued shapes with large shape-margins
https://bugs.webkit.org/show_bug.cgi?id=122613
Reviewed by Andreas Kling.
The cost of computing the shape-margin boundary of an image-valued shape-outside
is now proportional to (2 * shape-margin + image.height) rather than
(2 * shape-margin * image.height). The performance improvement comes from skipping
sequences of rounded-rectangle intervals that will not contribute to the final
result. Each non-empty row in the original image contributes one rounded-rectangle
whose corner radius is shape-margin, height is 2 * shape-margin, and width is
2 * shape-margin plus the width of the limits of the intervals on the row.
Renamed private method RasterShape::getIntervals() to intervalsAt() to be a little
more consistent with WebKit naming conventions.
There are no new tests since is just an internal refactoring.
* rendering/shapes/RasterShape.cpp:
(WebCore::MarginIntervalGenerator::set): Changed the x1,x2 parameters to an IntShapeInterval.
(WebCore::RasterShapeIntervals::contains): Refactor for the getIntervals() => intervalsAt() rename.
(WebCore::RasterShapeIntervals::getIntervalX1Values): Ditto.
(WebCore::RasterShapeIntervals::getIncludedIntervals): Ditto.
(WebCore::RasterShapeIntervals::getExcludedIntervals): Ditto.
(WebCore::RasterShapeIntervals::computeShapeMarginIntervals): Performance tuning.
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::intervalsAt): Renamed getIntervals().
(WebCore::RasterShapeIntervals::limitIntervalAt): Return the min/max limits of the intervals at Y.
* rendering/shapes/ShapeInterval.h:
(WebCore::ShapeInterval::isEmpty): Added.
2013-10-15 Philippe Normand <pnormand@igalia.com>
[GTK] Add URLMediaStream in the build
https://bugs.webkit.org/show_bug.cgi?id=122833
Reviewed by Carlos Garcia Campos.
* GNUmakefile.am: Add mediastream/gstreamer in include directories list.
* GNUmakefile.list.am: Add DOMURLMediaStream files in the build.
2013-10-17 Andreas Kling <akling@apple.com>
Use PassRef for constructing StylePropertySets.
<https://webkit.org/b/122948>
Make functions that construct StylePropertySets return PassRef
instead of PassRefPtr. Since they never return null, this gets rid
of the extra branch in ~PassRefPtr everywhere.
Also StyleRule* classes now hold a Ref<StylePropertySet>, codifying
the fact that they always have a property set.
Reviewed by Antti Koivisto.
2013-10-17 Andreas Kling <akling@apple.com>
DataRef<T> should use Ref<T> internally.
<https://webkit.org/b/122953>
DataRef is used to hold RenderStyle substructures, and due to the
way style inheritance is implemented, DataRef will always point to
a live object.
Codify this by making DataRef::m_data a Ref, and making all methods
that create substructure objects return PassRef.
Reviewed by Antti Koivisto.
2013-10-17 Mihnea Ovidenie <mihnea@adobe.com>
[CSS Regions] Anonymous nested regions
https://bugs.webkit.org/show_bug.cgi?id=119135
Reviewed by David Hyatt.
Tests: fast/regions/table-caption-as-region.html
fast/regions/table-cell-as-region.html
This patch allows any non-replaced block to behave like a region. When an element is styled with the
-webkit-flow-from property, instead of making the renderer a RenderRegion, we let the original
renderer be created the same way and we add a region as an anonymous child for the renderer.
The anonymous block child, modeled by the new RenderNamedFlowFragment class, will be responsible
for the fragmentation of the named flow thread content.
A RenderBlockFlow object will keep a reference to a RenderNamedFlowFragment(RenderRegion) inside its
rare data structures.
Contains code contributed by Catalin Badea.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Element.cpp: Changed to take the anonymous region into account.
(WebCore::Element::renderRegion):
(WebCore::Element::webkitGetRegionFlowRanges):
* dom/WebKitNamedFlow.cpp: Ditto.
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
* inspector/InspectorOverlay.cpp: Take into account the new model for regions, with an anonymous region inside a block.
(WebCore::buildObjectForRegionHighlight):
(WebCore::buildObjectForElementInfo):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeShapeSize): For a render named flow fragment, there is no need to recompute the shape inside
we can take it from the parent.
(WebCore::RenderBlock::renderName): Make the block that contains a render named flow fragment (region) report RenderRegion.
A future patch that will change this will need to rebase a lot of tests.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::insertedIntoTree): Create the anonymous region if needed (change of -webkit-flow-from determines Node reattach).
(WebCore::RenderBlockFlow::willBeDestroyed): Clean-up the anonymous region if necessary.
(WebCore::RenderBlockFlow::clearFloats): Small style change to make sure that check-webkit-style reports 0 failures on RenderBlockFlow.cpp.
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::styleDidChange): Update the style of the anonymous region too.
(WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded): Helper function to create the anonymous region
and to add it as a child to the block.
(WebCore::RenderBlockFlow::canHaveChildren):
(WebCore::RenderBlockFlow::canHaveGeneratedChildren):
(WebCore::RenderBlockFlow::namedFlowFragmentNeedsUpdate): Force a layout of the anonymous region if the
parent block has percentage height (similar to RenderBlock::updateBlockChildDirtyBitsBeforeLayout)
(WebCore::RenderBlockFlow::updateLogicalHeight): Update the logical height of anonymous region when the height of parent is updated.
(WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::renderNamedFlowFragment):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor): Remove the direct creation of RenderRegion objects since they will be
created as anonymous children of block flow objects.
* rendering/RenderElement.h:
(WebCore::RenderElement::generatingElement): Account for anonymous region if necessary.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent): Take anonymous region into account
and use the anonymous region parent offset/border.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly): Check for style instead of isRenderRegion since
the parent of the anonymous region will get the layer.
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::insertedIntoTree): Call RenderBlockFlow method instead.
* rendering/RenderNamedFlowFragment.cpp: Added. Model the behaviour of the anonymous region.
Has RenderRegion as a base class.
(WebCore::RenderNamedFlowFragment::RenderNamedFlowFragment):
(WebCore::RenderNamedFlowFragment::~RenderNamedFlowFragment):
(WebCore::RenderNamedFlowFragment::setStyleForNamedFlowFragment):
(WebCore::RenderNamedFlowFragment::styleDidChange):
(WebCore::RenderNamedFlowFragment::shouldHaveAutoLogicalHeight):
(WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
* rendering/RenderNamedFlowFragment.h: Added.
(WebCore::RenderNamedFlowFragment::isPseudoElementRegion):
(WebCore::RenderNamedFlowFragment::renderName):
(WebCore::toRenderNamedFlowFragment):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::isRenderNamedFlowFragmentContainer):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderNamedFlowFragment):
* rendering/RenderRegion.h:
* rendering/RenderTableCaption.cpp: Call RenderBlockFlow method instead.
(WebCore::RenderTableCaption::insertedIntoTree):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
(WebCore::writeRenderRegionList):
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::shapeSize):
* style/StyleResolveTree.cpp:
(WebCore::Style::elementInsideRegionNeedsRenderer):
2013-10-17 Krzysztof Czech <k.czech@samsung.com>
[EFL] Properly expose tables in accessibility
https://bugs.webkit.org/show_bug.cgi?id=122894
Reviewed by Chris Fleizach.
All tables should exposed as tables.
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::addChildren):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
2013-10-17 Brendan Long <b.long@cablelabs.com>
[GStreamer] Too many arguments for format in WebKitWebAudioSourceGStreamer.cpp
https://bugs.webkit.org/show_bug.cgi?id=122932
Reviewed by Philippe Normand.
No new tests because this just fixes a build warning.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop): Add another %s for the second part of the pad name.
2013-10-16 Tim Horton <timothy_horton@apple.com>
Attempt to fix the Windows build after http://trac.webkit.org/changeset/157547.
The relevant conversion doesn't happen implicitly.
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
(WebCore::MediaPlayerPrivateFullscreenWindow::wndProc):
2013-10-16 Tim Horton <timothy_horton@apple.com>
Attempt to fix the Windows build after http://trac.webkit.org/changeset/157547.
Apparently some Windows code uses setFrame and I missed it.
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
(WebCore::MediaPlayerPrivateFullscreenWindow::wndProc):
2013-10-16 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: Complete support for simple layer properties
https://bugs.webkit.org/show_bug.cgi?id=122933
Reviewed by Anders Carlsson.
No new tests, not yet testable.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setName):
Don't dump the CALayer pointer if we own a PlatformCALayerRemote.
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
Fix the visible tile wash (my fault!), and make it use setPosition and
setBounds instead of setFrame; while more convenient, it is the only
caller of setFrame, so we'll remove it.
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::isRemote): Added.
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(nullActionsDictionary):
(toCAFilterType):
(PlatformCALayerMac::synchronouslyDisplayTilesInRect):
(PlatformCALayerMac::playerLayer):
Remove setFrame, fix some pointer sides.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
* platform/graphics/ca/win/PlatformCALayerWin.h:
Remove setFrame.
2013-10-16 Andreas Kling <akling@apple.com>
Take RenderObjects out of the arena.
<https://webkit.org/b/122895>
Reviewed by Antti Koivisto.
Stop arena-allocating renderers so we can move forward on improving
render tree memory management. This will also allow rendering code
to take advantage of malloc optimizations.
Line boxes and BiDi runs remain in the arena for now.
2013-10-16 Roger Fong <roger_fong@apple.com>
[Windows] Speculative fix for test, media/video-canvas-drawing-output.html.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createImageForTimeInRect):
2013-10-16 Tim Horton <timothy_horton@apple.com>
PlatformCALayer constructor should take layer type as an argument
https://bugs.webkit.org/show_bug.cgi?id=122915
Reviewed by Simon Fraser.
No new tests, just a minor refactoring.
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::PlatformCALayer):
Add a LayerType argument.
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::PlatformCALayerMac):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::PlatformCALayerWin):
Use the new LayerType argument, and early-return in the case where we
are wrapping a custom PlatformLayer.
Drive-by un-indent the switch in the Mac version.
2013-10-15 Brady Eidson <beidson@apple.com>
Flesh out the DatabaseProcess (and launch it!)
https://bugs.webkit.org/show_bug.cgi?id=122884
Reviewed by Tim Horton.
* English.lproj/Localizable.strings: Add a localizable string.
* WebCore.xcodeproj/project.pbxproj: Export some more headers.
2013-10-16 Tim Horton <timothy_horton@apple.com>
RemoteLayerTree: Add support for more layer properties and transform layers
https://bugs.webkit.org/show_bug.cgi?id=122906
Reviewed by Anders Carlsson.
No new tests, this code is not yet testable.
* WebCore.exp.in:
Export some TextStream and TransformationMatrix stuff.
2013-10-16 KyungTae Kim <ktf.kim@samsung.com>
During editing, merge inline style with overriding other author styles
https://bugs.webkit.org/show_bug.cgi?id=122874
Reviewed by Ryosuke Niwa.
Inline styles need to override other author styles even on DoNotOverrideValues mode.
So, merge and override inline styles to other author styles before merging them to m_mutableStyle.
Test: editing/deleting/merge-div-with-inline-style.html
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
2013-10-16 peavo@outlook.com <peavo@outlook.com>
Emphasis marks has wrong color.
https://bugs.webkit.org/show_bug.cgi?id=122829
Reviewed by Antti Koivisto.
Tests: fast/text/text-emphasis.html.
fast/text/text-emphasis-expected.html.
Emphasis color should be set as fill color, not stroke color.
* rendering/TextPaintStyle.cpp:
(WebCore::updateGraphicsContext):
* rendering/TextPaintStyle.h:
2013-10-16 Antti Koivisto <antti@apple.com>
Move code for finding rendered character offset to RenderTextLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=122892
Reviewed by Andreas Kling.
* rendering/RenderText.cpp:
(WebCore::RenderText::countRenderedCharacterOffsets):
(WebCore::RenderText::containsRenderedCharacterOffset):
Renamed for consistency.
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::countCharacterOffsets):
This used to be Position::renderedPosition.
2013-10-16 Andreas Kling <akling@apple.com>
RenderElement::removeChild() should take child as a reference.
<https://webkit.org/b/122888>
We can't remove a child without a child to remove.
Reviewed by Antti Koivisto.
2013-10-16 Antti Koivisto <antti@apple.com>
Move test for contained caret offset to RenderTextLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=122887
Reviewed by Andreas Kling.
* dom/Position.cpp:
(WebCore::Position::renderedOffset):
(WebCore::Position::isCandidate):
Remove isRenderedText, call RenderText::containsCaretOffset instead.
(WebCore::Position::isRenderedCharacter):
(WebCore::Position::rendersInDifferentPosition):
* dom/Position.h:
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate):
* rendering/InlineTextBox.cpp:
* rendering/InlineTextBox.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::containsCharacterOffset):
(WebCore::RenderText::containsCaretOffset):
* rendering/RenderText.h:
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::containsOffset):
Combined implementations of Position::isRenderedCharacter and Position::isRenderedText.
* rendering/RenderTextLineBoxes.h:
Remove containsCaretOffset(), functionality is now in RenderTextLineBoxes::containsOffset.
2013-10-16 Andreas Kling <akling@apple.com>
RenderElement::isChildAllowed() should take const references.
<https://webkit.org/b/122870>
Reviewed by Anders Carlsson.
The isChildAllowed() functions expect non-null values to be passed,
so enforce this at compile-time.
Reordered some checks to do bit tests before virtual calls.
2013-10-15 Philippe Normand <pnormand@igalia.com>
[GStreamer] video info unset if upstream doesn't query allocation
https://bugs.webkit.org/show_bug.cgi?id=122834
Reviewed by Gustavo Noronha Silva.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkRender): If the sink didn't process any allocation
query then use the configured source pad caps and don't rely on
invalid video info.
2013-10-16 Philippe Normand <pnormand@igalia.com>
[GStreamer] move Logging.h include to GStreamerUtilities.h
https://bugs.webkit.org/show_bug.cgi?id=122886
Reviewed by Gustavo Noronha Silva.
Include Logging.h from GStreamerUtilities.h so the modules using
the LOG_MEDIA macros don't need to bother, especially for Debug builds.
* platform/graphics/gstreamer/GStreamerUtilities.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2013-10-16 Mark Rowe <mrowe@apple.com>
Fix the build after r157478.
Rubber-stamped by Tim Horton.
Due to the way WebCore.exp.in is used, it can't be used to export a differing set of symbols
for different architectures. We often work around this by tweaking code slightly to avoid
needing to export different symbols. However, in this case the symbol name itself encodes an
architecture-specific detail and there's no clear way to avoid the requirement to export it.
To deal with this case we turn to ld's support for wildcards in the symbol export list.
* WebCore.exp.in: Use wildcards in place of the number that represents by how much "this"
should be adjusted when calling through the vtable thunk. Also sort the remainder of the file.
* make-export-file-generator: Don't attempt to verify symbol names that contain wildcard characters.
2013-10-15 Tim Horton <timothy_horton@apple.com>
Two more exports for 32-bit build fix.
The duality of CGFloat means that we use a different
version of getRGBA (and the cast operator)
on 32-bit systems.
* WebCore.exp.in:
2013-10-15 Tim Horton <timothy_horton@apple.com>
Another shot at a build fix; apparently these
do need exporting for some reason, but are different
on 32-bit.
* WebCore.exp.in:
2013-10-15 Alexey Proskuryakov <ap@apple.com>
GenerateIsReachable=ImplContext is confusing
https://bugs.webkit.org/show_bug.cgi?id=122864
Reviewed by Geoffrey Garen.
Renamed to ImplWebGLRenderingContext.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/EXTTextureFilterAnisotropic.idl:
* html/canvas/OESElementIndexUint.idl:
* html/canvas/OESStandardDerivatives.idl:
* html/canvas/OESTextureFloat.idl:
* html/canvas/OESTextureHalfFloat.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLCompressedTextureATC.idl:
* html/canvas/WebGLCompressedTexturePVRTC.idl:
* html/canvas/WebGLCompressedTextureS3TC.idl:
* html/canvas/WebGLDebugRendererInfo.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLDepthTexture.idl:
* html/canvas/WebGLLoseContext.idl:
* WebCore.xcodeproj/project.pbxproj: While at it, added OESElementIndexUint.idl
to Xcode project.
2013-10-15 Tim Horton <timothy_horton@apple.com>
Unreviewed build fix; I don't know how to export.
This may not help.
* WebCore.exp.in:
2013-10-15 Dean Jackson <dino@apple.com>
Add ENABLE_WEB_ANIMATIONS flag
https://bugs.webkit.org/show_bug.cgi?id=122871
Reviewed by Tim Horton.
Eventually might be http://dev.w3.org/fxtf/web-animations/
but this is just engine-internal work at the moment.
* Configurations/FeatureDefines.xcconfig:
2013-10-15 Tim Horton <timothy_horton@apple.com>
Add a PlatformCALayer subclass that proxies its property changes across the process boundary
https://bugs.webkit.org/show_bug.cgi?id=122773
Reviewed by Anders Carlsson.
No new tests, the new drawing area is not yet testable.
* WebCore.exp.in:
Export lots of GraphicsLayerCA stuff so we can inherit from it in WebKit2.
* WebCore.xcodeproj/project.pbxproj:
Make PlatformCAFilters.h a private header.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::initialize):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::initialize):
* platform/graphics/ca/GraphicsLayerCA.h:
Defer creation of the main PlatformCALayer until just after the constructor is finished
so that GraphicsLayerCA subclasses can successfully override createPlatformCALayer.
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::platformLayer):
Make platformLayer virtual so that subclasses which don't have PlatformLayers can override.
2013-10-14 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION: Crash in XMLDocumentParser::startElementNs
https://bugs.webkit.org/show_bug.cgi?id=122817
Reviewed by Darin Adler.
Exit early in startElementNs when listeners and handlers of synchronous events such as load event
removes the inserted node inside parserAppendChild.
Test: fast/parser/xhtml-synchronous-detach-crash.html
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):
2013-10-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove old frontend localizedStrings.js
https://bugs.webkit.org/show_bug.cgi?id=122846
Reviewed by Timothy Hatcher.
* Configurations/WebCore.xcconfig:
* English.lproj/localizedStrings.js: Removed.
* WebCore.xcodeproj/project.pbxproj:
Remove the file and references to it. We no longer need to exclude
localizedString.js from some builds.
2013-10-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove Windows old front-end related code
https://bugs.webkit.org/show_bug.cgi?id=122845
Reviewed by Brent Fulgham.
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
2013-10-15 Morten Stenshorne <mstensho@opera.com>
Add support for the column-fill property
https://bugs.webkit.org/show_bug.cgi?id=117693
Reviewed by David Hyatt.
This is only supported in the (new) region based multicol implementation.
With column-fill support, a lot of multicol tests needed an update.
The old implementation behaved as if column-fill were 'auto', but the
initial value is 'balance', so now we need to be explicit about that.
For auto-height tests it doesn't really matter - such multicols are always
balanced anyway.
Tests: fast/multicol/newmulticol/fixed-height-fill-auto.html
fast/multicol/newmulticol/fixed-height-fill-balance.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ColumnFill):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* rendering/RenderMultiColumnBlock.h:
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
(WebCore::StyleMultiColData::operator==):
* rendering/style/StyleMultiColData.h:
2013-10-15 Andreas Kling <akling@apple.com>
Skip unnecessary null check in RenderText::textLength().
<https://webkit.org/b/122841>
Reviewed by Antti Koivisto.
RenderText will never have a null String in m_text, so textLength()
can grab at the StringImpl directly, avoiding a null check.
2013-10-15 Andreas Kling <akling@apple.com>
FontGenericFamilies should not be ref-counted.
<https://webkit.org/b/122835>
Reviewed by Anders Carlsson.
FontGenericFamilies is singly-owned by Settings.
2013-10-15 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Move RenderBlock::layoutShapeInsideInfo into RenderBlock.cpp
http://bugs.webkit.org/show_bug.cgi?id=122843
Reviewed by Oliver Hunt.
Historically, layoutShapeInsideInfo was a static function in RenderBlockLineLayout, then it has changed to be a member of RenderBlock,
but at that time it hasn't been moved to RenderBlock.cpp. This patch moves it into RenderBlock.cpp next to the Shapes functions. I removed
an unnecessary CSS_SHAPES #ifdef as well from RenderBlock.cpp.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::markShapeInsideDescendantsForLayout):
(WebCore::RenderBlock::layoutShapeInsideInfo):
* rendering/RenderBlockLineLayout.cpp:
2013-10-15 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Build fails.
https://bugs.webkit.org/show_bug.cgi?id=122830
Reviewed by Brent Fulgham.
* platform/network/NetworkStorageSessionStub.cpp:
(WebCore::NetworkStorageSession::createPrivateBrowsingSession): Update to new return type.
2013-10-15 Andreas Kling <akling@apple.com>
FileIconLoader should not be ref-counted.
<https://webkit.org/b/122827>
FileIconLoader is singly-owned by FileInputType.
Reviewed by Antti Koivisto.
2013-10-15 Andreas Kling <akling@apple.com>
RenderText should cache RenderStyle in locals more.
<https://webkit.org/b/122823>
Reviewed by Antti Koivisto.
Now that fetching the RenderStyle has to go through the parent,
we should avoid unnecessary loads by caching style() in a local.
2013-10-15 Ryosuke Niwa <rniwa@webkit.org>
Remove redundant Document::getElementById
https://bugs.webkit.org/show_bug.cgi?id=122813
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/4e8f1c5316415614b84370c602beae4a1008299f
This function simply calls virtual TreeScope::getElementById and Document inherits from TreeScope.
* WebCore.exp.in:
* dom/Document.cpp:
* dom/Document.h:
2013-10-14 Santosh Mahto <santosh.ma@samsung.com>
in safari,the background-color of input[type="search"] can't work
https://bugs.webkit.org/show_bug.cgi?id=119967
Reviewed by Ryosuke Niwa.
When input type=search is styled with css background property then
it does not change the background-color of field. Its happening becasue
search field is not counted as styled control. Thus theme ignores the
css background property. With this patch search field is also counted as
styled control so background property reflects on search field.
Test: fast/forms/search/search-field-background-color.html
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isControlStyled):Now search field is also
a styled control.
2013-10-14 Ryosuke Niwa <rniwa@webkit.org>
EventPath::updateTouchLists traverses through EventPath thrice
https://bugs.webkit.org/show_bug.cgi?id=122804
Reviewed by Benjamin Poulain.
Instead of traversing through EventPath for each TouchList, traverse through TouchList for every EventContext.
This paves our way to have one-pass traversal over EventPath, and evetually to remove EventContext altogether.
This change should also improve the cache hit rate since all Touch objects tend to be allocated at the same time
but this performance improvement is probably not observable.
* dom/EventContext.h:
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedNodeResolver::EventRelatedNodeResolver): Added a new constructor that takes Touch and
and TouchListType. We need to store these two values in order to update EventContext later.
(WebCore::EventRelatedNodeResolver::touch): Added,
(WebCore::EventRelatedNodeResolver::touchListType): Added.
(WebCore::addRelatedNodeResolversForTouchList): Extracted from updateTouchListsInEventPath.
(WebCore::EventPath::updateTouchLists): Moved the loop over m_path here. Notice that the outer loop iterates
over m_path instead of touchList as done in updateTouchListsInEventPath. The inner loop goes through resolvers
and adds Touch objects each EventContext as needed.
2013-10-14 Alexey Proskuryakov <ap@apple.com>
Don't generate a wasteful isObservable check in isReachableFromOpaqueRoots
https://bugs.webkit.org/show_bug.cgi?id=122802
Reviewed by Mark Hahnenberg.
* bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Don't.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:
Updated results.
2013-10-14 Samuel White <samuel_white@apple.com>
AX: fieldset should have GroupRole and legend should be description.
https://bugs.webkit.org/show_bug.cgi?id=122534
Reviewed by Chris Fleizach.
Changes fieldset to derive AXDescription from legend if one is available. Added
convenience method to AccessibilityObject to fetch element if available.
Test: accessibility/fieldset-element.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
(WebCore::AccessibilityNodeObject::alternativeText):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::element):
(WebCore::AccessibilityObject::isARIAHidden):
(WebCore::AccessibilityObject::isDOMHidden):
(WebCore::AccessibilityObject::defaultObjectInclusion):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isHidden):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::getAttribute):
(WebCore::AccessibilitySlider::valueForRange):
(WebCore::AccessibilitySlider::maxValueForRange):
(WebCore::AccessibilitySlider::minValueForRange):
(WebCore::AccessibilitySlider::setValue):
(WebCore::AccessibilitySlider::inputElement):
* accessibility/AccessibilitySlider.h:
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLFieldSetElement.h:
2013-10-14 Roger Fong <roger_fong@apple.com>
Windows select element doesn't draw RTL properly.
https://bugs.webkit.org/show_bug.cgi?id=122785.
Reviewed by Brent Fulgham.
Covered by fast/text/international/pop-up-button-text-alignment-and-direction.html.
Problems include the popup items not drawing on the right hand side and
not respecting the direction or the directional override styling of the option.
The selected element (drawn in the actual select element) also doesn't respect
the style settings of the selected menu option.
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
2013-10-14 Roger Fong <roger_fong@apple.com>
[Windows] Unreviewed build fix.
* WebCore.vcxproj/WebCoreCommon.props:
2013-10-14 Ryosuke Niwa <rniwa@webkit.org>
Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine
https://bugs.webkit.org/show_bug.cgi?id=122776
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/aca89bc4d984705a1f94b623dae0ab03e239a248
Fix modification of whitespace endpoints to not assume it's operating on RenderTexts
During line layout, we use midpoints to identify RenderObjects, or parts of
RenderObjects, that don't need InlineBoxes, usually because of collapsed whitespace.
Prior to actually creating BidiRuns (the precursor to InlineBoxes), we use
checkMidpoints to fix up our lineMidpointState to handle the case where we start
ignoring spaces in our line, but don't stop until somewhere on the following line.
Previously, this function assumed that the final midpoint (called an endpoint)
was a RenderText, but this assumption is wrong if we have a beginning midpoint
created by shouldSkipWhitespaceAfterStartObject (which handles inlines and list
markers) and no endpoint on that line. In that case, we'd instead adjust the
position backwards on the beginning midpoint, which would cause us to fail to
create an InlineBox for the inline or list marker. In the new test added, this
would actually trigger a crash due to an assumption when visually re-ordering
BidiRuns that a non-empty line would actually contain at least one such run.
Test: fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::checkMidpoints):
2013-10-14 Ryosuke Niwa <rniwa@webkit.org>
Assertion failure in Range::processContentsBetweenOffsets
https://bugs.webkit.org/show_bug.cgi?id=122777
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/c15de182774c7859c20d97126eb844ae97b792a4
This patch changes ASSERT statements for checking |endOffset| inbound in Range::processContentsBetweenOffsets()
to limit |endOffset|. This is necessary when DOMNodeRemovedFromDocument event handler splits text nodes,
Range::insertNode() on text node, in the range calling Range::deleteContents().
Test: fast/dom/Range/range-delete-contents-mutation-event-crash.html
* dom/Range.cpp:
(WebCore::Range::processContentsBetweenOffsets):
2013-10-14 Alexey Proskuryakov <ap@apple.com>
Add an empty window.crypto.webkitSubtle
https://bugs.webkit.org/show_bug.cgi?id=122778
Reviewed by Mark Hahnenberg.
Tests: security/crypto-subtle-gc-2.html
security/crypto-subtle-gc-3.html
security/crypto-subtle-gc.html
* DerivedSources.make: Process SubtleCrypto.idl.
* crypto: Added.
* WebCore.xcodeproj/project.pbxproj:
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* bindings/js/JSSubtleCryptoCustom.cpp: Added. Empty for now, but we'll certainly
need custom bindings code here.
* crypto/SubtleCrypto.cpp: Added.
(WebCore::SubtleCrypto::SubtleCrypto):
(WebCore::SubtleCrypto::document):
* crypto/SubtleCrypto.h: Added.
* crypto/SubtleCrypto.idl: Added.
* page/Crypto.cpp:
(WebCore::Crypto::subtle):
* page/Crypto.h:
* page/Crypto.idl:
2013-10-14 Nick Diego Yamane <nick.yamane@openbossa.org>
Remove GestureEvent leftovers from WebCore
<https://webkit.org/b/122780>
Reviewed by Anders Carlsson.
- Removed some remaining references to PlatformGestureEvent, supposed to
be removed by r157316
- TOUCH_ADJUSTMENT should be reworked after GestureEvent feature
removal
* page/EventHandler.cpp:
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
* page/EventHandler.h:
* platform/PlatformEvent.h:
* platform/ScrollAnimatorNone.cpp:
* platform/ScrollableArea.h:
2013-10-14 Nick Diego Yamane <nick.yamane@openbossa.org>
Build fix after r157366
http://bugs.webkit.org/show_bug.cgi?id=122783
When TOUCH_AJUSTMENT is enabled build fails due to some
refactors in TextRender functions.
Reviewed by Anders Carlsson.
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::appendContextSubtargetsForNode):
2013-10-14 Alexandru Chiculita <achicu@adobe.com>
The content of the DOM panel for iframes is not updated until the "onload" event
https://bugs.webkit.org/show_bug.cgi?id=122653
Reviewed by Darin Adler.
Test: http/tests/inspector-protocol/loading-iframe-document-node.html
Renamed InspectorDOMAgent::loadEventFired to InspectorDOMAgent::didCommitLoad and moved the call site
from InspectorInstrumentation::loadEventFiredImpl to InspectorInstrumentation::didCommitLoadImpl.
This is to make sure that it will invalidate the content of the iframe as soon as the frame navigates
to a different page. This way the new node can be retrieved as soon as the page has some content, and
not just when the page is fully loaded.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::didCommitLoad): Renamed from loadEventFired, as it is now called from
didCommitLoadImpl instead.
(WebCore::InspectorDOMAgent::frameDocumentUpdated): Updated comment to point to the new function name.
* inspector/InspectorDOMAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::loadEventFiredImpl): Removed call do InspectorDOMAgent.loadEventFired.
(WebCore::InspectorInstrumentation::didCommitLoadImpl): Added call to InspectorDOMAgent.didCommitLoad.
2013-10-14 Roger Fong <roger_fong@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=122774.
<rdar://problem/6138855>.
Reviewed by Brent Fulgham.
Add a field to keep track of hovered over index.
Use index to determine whether or not to use the existing selected index on the mouse down event.
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::PopupMenuWin):
(WebCore::PopupMenuWin::show):
(WebCore::PopupMenuWin::wndProc):
* platform/win/PopupMenuWin.h:
2013-10-14 Tim Horton <timothy_horton@apple.com>
Virtualize PlatformCALayer
https://bugs.webkit.org/show_bug.cgi?id=122672
Reviewed by Anders Carlsson.
No new tests, just a refactoring.
* WebCore.exp.in:
setGeometryFlipped is on PlatformCALayerMac now.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Add PlatformCALayer.cpp, PlatformCALayerWin.h, and let VS do its
thing with some other files.
* WebCore.xcodeproj/project.pbxproj:
Add PlatformCALayer.cpp and PlatformCALayerMac.h.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::platformLayer):
Make a PlatformCALayerWin explicitly.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createPlatformCALayer):
Added. Decide whether to make a PlatformCALayer{Mac, Win} based on the platform.
Later, we will decide between other subclasses based on other things.
(WebCore::GraphicsLayerCA::filtersCanBeComposited):
Do the same thing for filtersCanBeComposited.
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::setContentsToMedia):
(WebCore::GraphicsLayerCA::setContentsToCanvas):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
Use createPlatformCALayer instead of PlatformCALayer::create.
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
For now, use the PlatformCALayerMac version of filtersCanBeComposited,
since this code is heavily tied to having CALayers in the Web process.
* platform/graphics/ca/GraphicsLayerCA.h:
Include PlatformCALayer.h here so we can get the LayerType enum.
(NOTE-to-be-removed: if there's a better way to do this, I'm open to
suggestions; I couldn't puzzle out nested 'enum class' stuff).
Add the createPlatformCALayers.
* platform/graphics/ca/PlatformCAAnimation.h:
Friend the subclasses too.
* platform/graphics/ca/PlatformCALayer.cpp: Added.
(WebCore::PlatformCALayer::~PlatformCALayer):
Pull the shared part of the PlatformCALayer destructor out.
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::platformLayer):
(WebCore::PlatformCALayer::setOwner):
(WebCore::PlatformCALayer::PlatformCALayer):
Virtualize all the things. Move platform specific members to their new subclasses.
* platform/graphics/ca/mac/PlatformCALayerMac.h: Added.
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
Move the PLATFORM(MAC) implementations from PlatformCALayer to PlatformCALayerMac.
(PlatformCALayer::platformCALayer):
The platformCALayer lookup function is static on PlatformCALayer, so it can't
be moved to the subclasses. It might be a good idea in the future to move towards
a platform-independent mechanism for looking up PlatformCALayers from PlatformLayers,
and to avoid needing to do this as often as we do now.
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::CACFLayerTreeHost):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
Move the PLATFORM(WIN) implementations from PlatformCALayer to PlatformCALayerWin.
(PlatformCALayerWin::create):
(PlatformCALayer::platformCALayer):
* platform/graphics/ca/win/PlatformCALayerWin.h: Added.
* platform/graphics/win/GraphicsContext3DWin.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::createLayerForMovie):
Include PlatformCALayerWin.h and explicitly make PlatformCALayerWins here.
2013-10-14 Hugo Parente Lima <hugo.lima@openbossa.org>
[cmake] MediaControlsApple is used only by Efl port and is on CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=122772
Reviewed by Anders Carlsson.
* CMakeLists.txt: Removed MediaControlsApple.cpp
* PlatformEfl.cmake: Added MediaControlsApple.cpp
2013-10-14 Alexey Proskuryakov <ap@apple.com>
window.crypto doesn't preserve custom properties
https://bugs.webkit.org/show_bug.cgi?id=122770
Reviewed by Mark Hahnenberg.
Test: security/crypto-gc.html
Generate isReachableFromOpaqueRoots that makes Crypto live as long as the document
lives (because that's when it's observable through window object).
* page/Crypto.cpp:
(WebCore::Crypto::Crypto):
(WebCore::Crypto::~Crypto):
(WebCore::Crypto::document):
* page/Crypto.h:
(WebCore::Crypto::create):
Made Crypto a ContextDestructionObserver, so that it can report its document to bindings.
Removed ScriptWrappable, because it seems to have served no purpose in this class.
* page/Crypto.idl: Added GenerateIsReachable. Removed ImplementationLacksVTable,
because the class now has a vtable, and can be checked for bindings integrity.
* page/DOMWindow.cpp: (WebCore::DOMWindow::crypto): Pass a document when creating
crypto.
2013-10-14 Andreas Kling <akling@apple.com>
CTTE: NamedNodeMap always has a corresponding Element.
<https://webkit.org/b/122769>
Reviewed by Anders Carlsson.
Made NamedNodeMap::m_element a reference and remove an assertion
that it's never null.
2013-10-14 Andreas Kling <akling@apple.com>
REGRESSION(r157408): Crashes in RenderFullScreen::wrapRenderer().
Unreviewed crash fix for these two tests:
- fullscreen/full-screen-restrictions.html
- fullscreen/empty-anonymous-block-continuation-crash.html
* rendering/RenderFullScreen.cpp:
(RenderFullScreen::wrapRenderer):
Get the RenderArena from Document like we did before this patch.
2013-10-14 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Image valued shape-outside shapes should update the layout after the image has been loaded
https://bugs.webkit.org/show_bug.cgi?id=122340
Reviewed by Simon Fraser.
Ensure that the an image-valued shape-outside layout is updated after the image has
been loaded.
Test: http/tests/css/css-image-valued-shape.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::imageChanged): Added code for the shape-outside case.
(WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Ditto.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement): Ditto.
(WebCore::RenderElement::setStyle): Ditto.
2013-10-14 Andreas Kling <akling@apple.com>
Remove some silly null checks in Element/NamedNodeMap.
<https://webkit.org/b/122767>
Reviewed by Darin Adler.
Make shouldIgnoreAttributeCase() take a const Element&, exposing
some unnecessary null checks.
2013-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Build fix after r122737.
* dom/Node.h: Add explicit WebCore namespace to macro definition to work around
Visual Studio bug.
2013-10-14 Andreas Kling <akling@apple.com>
Pass Document directly to anonymous renderer constructors.
<https://webkit.org/b/122752>
Reviewed by Antti Koivisto.
Added separate constructors for creating anonymous renderers that
take a Document& instead of a null Element*/Text*.
Removed setDocumentForAnonymous() and all createAnonymous() helpers.
...and RenderObject::m_node is now a Node&, wohoo!
2013-10-13 Sam Weinig <sam@webkit.org>
CTTE: Add more node conversion helpers
https://bugs.webkit.org/show_bug.cgi?id=122737
Reviewed by Darin Adler.
- Factor NODE_TYPE_CASTS into TYPE_CASTS_BASE(ToClassName, FromClassName)
to allow for DOCUMENT_TYPE_CASTS.
- Replace more static_casts<>.
2013-10-14 Zan Dobersek <zdobersek@igalia.com>
Reintroduce PassRefPtr<Event> copy in ScopedEventQueue::dispatchEvent
https://bugs.webkit.org/show_bug.cgi?id=122742
Reviewed by Alexey Proskuryakov.
This is a follow-up to r157219 which introduced a workaround for the GCC's quirky behavior that
was resulting in crashes due to the PassRefPtr<Event> object passed to EventDispatcher::dispatchEvent
being copied and nullified first before retrieving the EventTarget of the Event object wrapped in that
PassRefPtr.
The implementation is now adjusted to first retrieve the pointer to the Event's EventTarget and store
it in a local variable. That variable is then passed as the first parameter to EventDispatcher::dispatchEvent,
and the PassRefPtr<Event> passed directly as the second parameter. Previously the pointer of that PassRefPtr
object was passed in, with a new PassRefPtr being created which would increase the reference count of the
ref-counted object. Passing in the original PassRefPtr avoids the unnecessary reference count increase by creating
a copy. That still nullifies the original PassRefPtr, but that's not a problem anymore.
* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::dispatchEvent):
2013-10-14 Bear Travis <betravis@adobe.com>
[CSS Shapes] Shape-Margin should be animatable
https://bugs.webkit.org/show_bug.cgi?id=122524
Reviewed by Darin Adler.
Mark content for relayout after shape-margin changes, and add shape-margin
to the list of animatable properties.
Tests: fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-margin.html
fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation.html
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add
shape-margin to the map of animatable CSS properties.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Compare shape-margins,
and mark dependent content for relayout if they have changed.
2013-10-14 Arvid Nilsson <anilsson@blackberry.com>
Don't crash after OpenGL robustness reset
https://bugs.webkit.org/show_bug.cgi?id=122750
Reviewed by George Staikos.
JIRA 517132.
Just log the incident and pretend like nothing happened.
No new tests, we don't have repeatable steps to reproduce a robustness
reset.
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::makeContextCurrent):
2013-10-14 Krzysztof Czech <k.czech@samsung.com>
[EFL] Buildfix after r157393
https://bugs.webkit.org/show_bug.cgi?id=122749
Reviewed by Andreas Kling.
Buildfix with error enumeration value 'CSS_FR' not handled in switch.
* css/CSSCalculationValue.cpp:
(WebCore::hasDoubleValue):
2013-10-14 Krzysztof Czech <k.czech@samsung.com>
[EFL] Present replaced objects with 0xFFFC character
https://bugs.webkit.org/show_bug.cgi?id=122744
Reviewed by Mario Sanchez Prada.
Replaced elements should be emitted in GTK/EFL and
marked their presence with the replacement character.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::textIteratorBehaviorForTextRange):
2013-09-16 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Implement support for <flex>
https://bugs.webkit.org/show_bug.cgi?id=115362
Reviewed by Andreas Kling.
From Blink r149134, r149480, r149532, r150287 and r156127 by <jchaffraix@chromium.org>
From Blink r157820 by <svillar@igalia.com>
Added support for flexible lengths ('fr' unit) in CSS Grid Layout
code. This requires the addition of GridLength class to
encapsulate the knowledge of <flex> to the grid layout code.
Also updated the algorithm that computes the layout. It increases
the value of 1fr based on the grid tracks' usedBreath to fraction
ratio (called normalizedFractionValue). This enables increasing
the fraction value while updating the available space to account
for processed grid tracks. The algorithm stops when we run out of
grid tracks or available space (one grid item has an intrinsic
size too big). This matches the specs to the letter for the known
available space case (both the unknown case and the interaction
with 'span' are left out of this patch).
Tests: fast/css-grid-layout/flex-and-minmax-content-resolution-columns.html
fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html
fast/css-grid-layout/flex-content-resolution-columns.html
fast/css-grid-layout/flex-content-resolution-rows.html
* GNUmakefile.list.am: Added GridLength.h to the build system.
* Target.pri: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridTrackBreadth): Replace Length by GridLength.
* css/CSSGrammar.y.in: Added FR support.
* css/CSSParser.cpp: Ditto.
(WebCore::CSSParser::parseGridBreadth):
(WebCore::CSSParser::detectNumberToken):
* css/CSSParserValues.cpp: Added FR support.
(WebCore::CSSParserValue::createCSSValue):
* css/CSSParserValues.h:
(WebCore::CSSParserString::operator[]):
(WebCore::CSSParserString::equalIgnoringCase):
* css/CSSPrimitiveValue.cpp: Added FR support.
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::customCSSText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):
* css/CSSPrimitiveValue.h: Added a couple of missing const.
(WebCore::CSSPrimitiveValue::isFlex):
* css/StyleResolver.cpp: Added FR support.
(WebCore::createGridTrackBreadth):
(WebCore::createGridTrackSize):
* rendering/RenderGrid.cpp:
(WebCore::GridTrackForNormalization::GridTrackForNormalization):
New helper struct to ease the computation of track breadths with
flexible lengths.
(WebCore::GridTrackForNormalization::operator=):
(WebCore::RenderGrid::computePreferredTrackWidth): Replaced Length by GridLength.
(WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Grow grid lines
having a fraction as the MaxTrackSizingFunction.
(WebCore::RenderGrid::computeUsedBreadthOfMinLength): Replaced Length by GridLength.
(WebCore::RenderGrid::computeUsedBreadthOfMaxLength): Ditto.
(WebCore::sortByGridNormalizedFlexValue):
(WebCore::RenderGrid::computeNormalizedFractionBreadth): Increase
the fraction value while updating the available space to account
for processed grid tracks.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::distributeSpaceToTracks): Never shrink track sizes.
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
* rendering/RenderGrid.h:
* rendering/style/GridLength.h: Added.
(WebCore::GridLength::GridLength):
(WebCore::GridLength::isLength):
(WebCore::GridLength::isFlex):
(WebCore::GridLength::length):
(WebCore::GridLength::flex):
(WebCore::GridLength::setFlex):
(WebCore::GridLength::operator==):
* rendering/style/GridTrackSize.h: Replaced Length by GridLength.
(WebCore::GridTrackSize::length):
(WebCore::GridTrackSize::setLength):
(WebCore::GridTrackSize::minTrackBreadth):
(WebCore::GridTrackSize::maxTrackBreadth):
(WebCore::GridTrackSize::setMinMax):
(WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth):
(WebCore::GridTrackSize::hasMaxContentMinTrackBreadth):
(WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth):
(WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth):
2013-10-14 peavo@outlook.com <peavo@outlook.com>
Broken text rendering when input field has selection.
https://bugs.webkit.org/show_bug.cgi?id=122716
Reviewed by Antti Koivisto.
Tests: fast/text/text-rendering-with-input-selection.html.
fast/text/text-rendering-with-input-selection-expected.html.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Check that text has selection.
2013-10-14 Zalan Bujtas <zalan@apple.com>
Unexpected word wrapping for wrapped content then raw content.
https://bugs.webkit.org/show_bug.cgi?id=121130
Reviewed by Antti Koivisto.
When deciding whether a line is considered empty, we need to check if the current
object is fully responsible for the currently uncommitted width. It helps differentiating
<span></span><span>abcd</span> from <span>a</span><span>bcd</span>, where in the first
case when we hit the second <span> the line is still considered empty, as opposed to the
second example.
Test: fast/css/unexpected-word-wrapping-with-non-empty-spans.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineBreaker::nextSegmentBreak):
2013-10-14 Andreas Kling <akling@apple.com>
Be more efficient about passing RenderStyle to attachRenderTree().
<https://webkit.org/b/122743>
Reviewed by Antti Koivisto.
Have attachRenderTree() and createRendererTreeIfNeeded() pass the
RenderStyle in a PassRefPtr to avoid churning the ref count.
2013-10-14 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] 2 span positions are not resolved correctly
https://bugs.webkit.org/show_bug.cgi?id=119717
Reviewed by Andreas Kling.
From Blink r155397 by <jchaffraix@chromium.org>
Test: fast/css-grid-layout/grid-item-bad-resolution-double-span.html
Two opposite 'span' or 'auto' positions should be resolved using
the auto placement algorithm. We were only checking for the 'auto'
case. This also covers the case of other positions that, according
to the spec, should be treated as 'auto'.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionsFromStyle):
2013-10-13 Andreas Kling <akling@apple.com>
Use RenderElement instead of RenderObject in more places.
<https://webkit.org/b/122734>
Reviewed by Antti Koivisto.
Convert some sites to use RenderElement (or type inference) instead
of RenderObject for less branchy code.
2013-10-13 Darin Adler <darin@apple.com>
Deprecate or remove deleteAllValues functions; there are only a few call sites left
https://bugs.webkit.org/show_bug.cgi?id=122738
Reviewed by Anders Carlsson.
* platform/blackberry/CookieMap.cpp:
(WebCore::CookieMap::deleteAllCookiesAndDomains):
* platform/network/blackberry/rss/RSSParserBase.cpp:
(WebCore::RSSFeed::clear):
* platform/win/WCDataObject.cpp:
(WebCore::WCDataObject::~WCDataObject):
Renamed deleteAllValues to deprecatedDeleteAllValues.
2013-10-13 Sam Weinig <sam@webkit.org>
Merge NODE_TYPE_CASTS and ELEMENT_TYPE_CASTS
https://bugs.webkit.org/show_bug.cgi?id=122735
Reviewed by Antti Koivisto.
NODE_TYPE_CASTS and ELEMENT_TYPE_CASTS are identical. Let them become one
with one another.
2013-10-13 Andreas Kling <akling@apple.com>
Uncrashify Document::head() too. (Why am I even awake?)
2013-10-13 Andreas Kling <akling@apple.com>
REGRESSION(r157381): Make Document::body() crash less when there is no documentElement.
Unreviewed.
2013-10-13 Darin Adler <darin@apple.com>
Rewrite Document::body and Document::head in modern style, way clearer and shorter
https://bugs.webkit.org/show_bug.cgi?id=122717
Reviewed by Andreas Kling.
* dom/Document.cpp:
(WebCore::Document::body): Use iterator to make this way easier to read.
(WebCore::Document::head): Ditto.
* html/HTMLTagNames.in: Added generateTypeHelpers for body and head.
== Rolled over to ChangeLog-2013-10-13 ==